fonts

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package fonts defines the font preferences consumed by PDF-producing backends.

The package lives outside of both `config` and `backend` to avoid an import cycle: backends import fonts to render PDFs with sensible defaults, while config embeds fonts.Config to let users override those defaults.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Mainfont string `toml:"mainfont"`
	Monofont string `toml:"monofont"`
	Sansfont string `toml:"sansfont"`
}

Config holds font family preferences. Empty fields mean "use backend default".

func Default

func Default() Config

Default returns the platform-appropriate font set.

Values are chosen to be present out-of-the-box on each OS: PT Serif and Menlo ship with macOS; DejaVu is installed by default on most Linux distributions; Times New Roman and Consolas are standard on Windows.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL