-
-
Notifications
You must be signed in to change notification settings - Fork 189
Font configuration
The .font
[docs] function overrides the global font configuration.
A font family can be loaded from any of the following sources (case-sensitive):
- From file:
path/to/font.ttf
- From URL:
https://example.com/font.ttf
- From system fonts:
Arial
,Times New Roman
- From Google Fonts:
GoogleFonts:Roboto
,GoogleFonts:Noto Sans
The function can set custom font families via the following optional parameters:
-
main
: font family for all text content. Also applies to headings if the current theme does not specify a different font for them; -
heading
: font family for headings (titles). Overridesmain
; -
code
: font family for code blocks and code spans. Overridesmain
.
Example:
.font {fonts/Inter.ttf} heading:{GoogleFonts:Poppins} code:{Courier New}
Font resources are processed by the media storage system. This ensures that, for example, HTML output will include local fonts in the output directory for increased portability.
Note that system fonts, on the other hand, may not be installed on all devices. While this shouldn't affect PDF output, it can be problematic when sharing HTML output.
-
size
: base font size. Other elements, such as headings, will scale accordingly. For example12px
.
- Figures
- Image size
- TeX formulas
- Table caption
- Decorative headings
- Alerts (quote types)
- Quotation source
- Page breaks
- Text symbols (text replacement)
- Syntax of a function call
- Declaring functions
- Dynamic typing
- Including other Quarkdown files
- Importing external libraries
- Localization
- Document metadata
- Theme
- CSS
- Fonts
- Page format
- Page margin content
- Page counter
- Automatic page break
- Numbering
- Paragraph style
- Caption position
- Table of contents
- Bibliography
- Stacks (row, column, grid)
- Container
- Align
- Float
- Figure
- Clip
- Box
- Collapsible
- Whitespace
- Variables
- Optionality
- Math
- Conditional statements
- Loops
- Let
- Destructuring
- String manipulation
- Table manipulation: sorting, computing, and more
- Generators
- String
- Number
- Markdown content
- Boolean
- None
- Enumeration entry
- Iterable
- Dictionary
- Range
- Lambda
- Size(s)
- Color
- Dynamic
- Paper: abstract, definitions, theorems, and more