texcache

package
v0.3.41 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(expr string, fontSizeDots float32, pp ppath.Path)

Add adds a new entry

func DeleteUnused

func DeleteUnused()

DeleteUnused deletes any cache entries that have not been accessed since the cache was loaded. Use this in generate functions that save all generated cache.

func Get

func Get(expr string, fontSizeDots float32) ppath.Path

Get tries to get a cached path for given equation at given fontsize in dots. returns nil if not available.

func Open

func Open(filename string) error

Open opens saved cache entries from given file If the filename ends in .gz, it is unzipped for reading.

func OpenFS

func OpenFS(fsys fs.FS, filename string) error

OpenFS opens saved cache entries from given file system (e.g., for embed). If the filename ends in .gz, it is unzipped for reading.

func SaveAs

func SaveAs(filename string) error

SaveAs saves cache entries to given file If the filename ends in .gz, it is zipped. When generating, can call DeleteUnused to filter all unused items.

func SetShapeMath

func SetShapeMath()

SetShapeMath sets the standard text shaping math function to use only cached math paths, not live generation of paths from TeX. This saves a lot of memory in the resulting executable, and is recommended for any math-heavy uses where all the equations can be cached in advance (e.g., the content system).

Types

This section is empty.

Jump to

Keyboard shortcuts

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