Font

laika.theme.config.Font
See theFont companion object
case class Font

Represents a font resource, either based on a local classpath or file system resource, or a web font URL, or both.

E-book formats like EPUB or PDF require a local font file to be available for embedding. A web font URL can only be used for website generation.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def definedAs(family: String, weight: FontWeight, style: FontStyle): FontDefinition

Creates the final FontDefinition instance that can be used in Laika's and Helium's configuration by mapping the font resource to a family name, font weight and style.

Creates the final FontDefinition instance that can be used in Laika's and Helium's configuration by mapping the font resource to a family name, font weight and style.

Attributes

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.

Attributes

def embedFile(file: FilePath): 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.

Attributes

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.

Attributes

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.

Attributes

Deprecated methods

def embedFile(file: File): Font

Attributes

Deprecated
true

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product