package font

Import Path
	github.com/d2lang/mathjax-go/internal/font (on go.dev)

Dependency Relation
	imports 0 packages, and imported by one package


Package-Level Type Names (total 5)
/* sort by: | */
Delimiter is a source-shaped copy of MathJax DelimiterData. Optional-field flags distinguish absent data from zero values. Returned slice fields are cloned and may be modified by callers. Alias rune Direction Direction FullExt [2]float64 HDW [3]float64 HasAlias bool HasFullExt bool HasHDW bool HasMin bool Min float64 SizeChars []rune SizeVariants []int Sizes []float64 Stretch []rune StretchVariants []int SizeVariant returns the font variant for the delimiter's i-th fixed size. StretchVariant returns the font variant for the delimiter's i-th assembly part. func LookupDelimiter(codepoint rune) (Delimiter, bool)
Direction is MathJax FontData.DIRECTION. const DirectionHorizontal const DirectionNone const DirectionVertical
Glyph is a resolved TeX glyph. Codepoint and Variant identify the exact generated table supplying Metrics and Path. Content is MathJax's optional SVG character substitution (the `c` SVGCharOption); when non-empty, callers render its runes instead of Path. Codepoint rune Content string Metrics Metrics Path string Variant Variant func Lookup(variant Variant, codepoint rune) (Glyph, bool) func LookupExact(variant Variant, codepoint rune) (Glyph, bool)
Metrics is MathJax CharData: height, depth, width, and optional character options. Presence flags preserve the distinction between an omitted option and an explicitly supplied zero. Depth float64 HasItalicCorrection bool HasSkew bool Height float64 ItalicCorrection float64 Skew float64 Width float64 func LookupMetrics(variant Variant, codepoint rune) (Metrics, bool)
Variant is a MathJax TeX font variant name. The string values intentionally match TeXFont.defaultChars in MathJax 3.2.2. func Variants() []Variant func Delimiter.SizeVariant(i int) (Variant, bool) func Delimiter.StretchVariant(i int) (Variant, bool) func ExactGlyphCount(variant Variant) int func Lookup(variant Variant, codepoint rune) (Glyph, bool) func LookupExact(variant Variant, codepoint rune) (Glyph, bool) func LookupMetrics(variant Variant, codepoint rune) (Metrics, bool) func LookupPath(variant Variant, codepoint rune) (path, content string, ok bool) func RemapCodepoint(variant Variant, codepoint rune) rune func ValidVariant(variant Variant) bool const Bold const BoldFraktur const BoldItalic const BoldSansSerif const BoldScript const DoubleStruck const Fraktur const Italic const LargeOp const Monospace const Normal const SansSerif const SansSerifBoldItalic const SansSerifItalic const Script const Size3 const Size4 const SmallOp const TeXBoldCalligraphic const TeXBoldOldStyle const TeXCalligraphic const TeXMathItalic const TeXOldStyle const TeXVariant
Package-Level Functions (total 10)
DelimiterCount returns the number of entries in the upstream table.
ExactGlyphCount returns the number of entries in the upstream source table.
Lookup performs MathJax's effective lookup, including variant link and inheritance precedence and Basic Latin/Greek remapping into Unicode's Mathematical Alphanumeric Symbols block.
LookupDelimiter returns the exact MathJax delimiter-table entry.
LookupExact returns only a source-table entry, without variant inheritance or mathematical-alphanumeric remapping.
LookupMetrics is a convenience wrapper for layout code.
LookupPath is a convenience wrapper for SVG code. The boolean reports glyph presence; an empty path is valid for spaces and Content substitutions.
RemapCodepoint applies the effective variant's mathematical-alphabet mapping before glyph lookup, as CommonWrapper.unicodeChars does. Keep the mapped character even when no bundled outline exists: it is also the text fallback.
ValidVariant reports whether variant is a MathJax 3.2.2 TeX variant.
Variants returns the canonical variants in MathJax source order.
Package-Level Constants (total 30)
const Bold Variant = "bold"
const BoldFraktur Variant = "bold-fraktur"
const BoldItalic Variant = "bold-italic"
const BoldSansSerif Variant = "bold-sans-serif"
const BoldScript Variant = "bold-script"
Source hashes cover sorted relative names, NUL, exact source bytes, and NUL.
const DelimiterSourceSHA256 = "440c69fd81371a8ae766accdd2f0ffe560520d0b1c757d8ed4874a454301e174"
const DoubleStruck Variant = "double-struck"
const Fraktur Variant = "fraktur"
const Italic Variant = "italic"
const LargeOp Variant = "-largeop"
const Monospace Variant = "monospace"
const Normal Variant = "normal"
const SansSerif Variant = "sans-serif"
const SansSerifBoldItalic Variant = "sans-serif-bold-italic"
const SansSerifItalic Variant = "sans-serif-italic"
const Script Variant = "script"
const Size3 Variant = "-size3"
const Size4 Variant = "-size4"
const SmallOp Variant = "-smallop"
const SVGSourceSHA256 = "bfc1e17685cb4d3a30eb3ee674f15c6b95519a745030fc3b4d3126cda98ba888"
const TeXBoldCalligraphic Variant = "-tex-bold-calligraphic"
const TeXBoldOldStyle Variant = "-tex-bold-oldstyle"
const TeXCalligraphic Variant = "-tex-calligraphic"
const TeXMathItalic Variant = "-tex-mathit"
const TeXOldStyle Variant = "-tex-oldstyle"
const TeXVariant Variant = "-tex-variant"