Font

object Font

Companion for creating Font instances.

Operations can be chained, e.g. by calling Font.embedFile(...).webCSS(...) if both need to be provided. The final FontDefinition instance that can be used in Laika's and Helium's configuration can be obtained by calling definedAs in the end, where the font resource is mapped to a family name, font weight and style.

Companion
class
trait Product
trait Mirror
class Object
trait Matchable
class Any

Type members

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Inherited from
Mirror

Value members

Concrete methods

def embedFile(name: String): Font

Specifies a font file that can be used for embedding in EPUB or PDF. This is one of the few places in Laika where a real file-system path needs to be provided, not a path from the library's virtual path.

Specifies a font file that can be used for embedding in EPUB or PDF. This is one of the few places in Laika where a real file-system path needs to be provided, not a path from the library's virtual path.

def embedFile(file: File): Font

Specifies a font file that can be used for embedding in EPUB or PDF. This is one of the few places in Laika where a real file-system path needs to be provided, not a path from the library's virtual path.

Specifies a font file that can be used for embedding in EPUB or PDF. This is one of the few places in Laika where a real file-system path needs to be provided, not a path from the library's virtual path.

def embedResource(name: String): Font

Specifies a font file as a classpath resource that can be used for embedding in EPUB or PDF. For theme authors classpath resources are the recommended way of providing default fonts.

Specifies a font file as a classpath resource that can be used for embedding in EPUB or PDF. For theme authors classpath resources are the recommended way of providing default fonts.

def webCSS(url: String): Font

Specifies a URL for a web font which can be auto-linked in a theme template.

Specifies a URL for a web font which can be auto-linked in a theme template.