Skip to main content

Module context

Module context 

Source

Structs§

Context
The typesetting context (a subset of context_main in horzBox.ml).
MathCmdId
Opaque handle to the context’s installed math command (v0.0.6 context_main.math_command). The closure VALUE lives lang-side in Interp::math_commands — this crate cannot depend on rustyfi_lang::Value, so this is the same id-into-an-Interp-table seam as ImageId/HookId (hbox.rs).
PageGeometry
Page geometry (A4 with even margins by default).
ScriptFont
One script’s font selection within a Context::font_scheme: upstream font_with_ratio (horzBox.ml) folded into a plain struct. ratio scales ctx.font_size for this script’s glyphs; rising is a further fraction-of-size baseline raise (fontInfo.ml’s get_font_with_ratio).

Enums§

HyphenLang
The set of Knuth–Liang hyphenation dictionaries a Context may have installed. Deliberately a Copy tag with no dependency on the hyphenation crateContext is cloned constantly, so it cannot own a hyphenation::Standard dictionary (~89 KiB, not cheaply clonable). The dictionaries live in a process-global load-once cache in crates/rustyfi-lang/src/hyphenation.rs, keyed by this tag.
Language
v0.0.6 CharBasis.language_system (the port’s language variant decl).
MathScriptLevel
SATySFi 0.1’s math_script_level (dev-0-1-0 src/backend/horzBox.ml: 139-142) — how many script-nesting levels deep the current math reading context sits. V0_0 never reads it (its script-size shrink is a fixed per-call constant, not context-carried).
PaperSize
v0.0.6’s page_size (primitives.cppo.ml:203-212) — the paper-size constant set page-break’s first argument selects from, the port of get_pdf_paper (handlePdf.ml:406, Pdfpaper.t dims from pdfpaper.ml).
Script
v0.0.6 CharBasis.script, SURFACE subset: the four constructors a script VALUE can carry (get_script, evalUtil.ml:235-241; the port’s script variant decl, prim_types.rs script_decl). Upstream’s internal-only CommonNarrow/CommonWide/Inherited (charBasis.ml:11-13) arise solely inside the char decoder; context storage never sees them. Discriminants index langsys_scheme.

Functions§

default_script_space_map
default_script_space_map (primitives.cppo.ml:487-494): the four Latin↔CJK directions carry space_latin_cjk, every other ordered pair is unset. Only the natural ratio survives into layout — see Context::script_space_map.