Module registry

Module registry 

Source
Expand description

StyleRegistry: converts Template styles into indexed collections.

The registry performs the final resolution step in the Blueprint workflow:

Template (YAML, all styles by name)
    |
    v
StyleRegistry::from_template()
    |
    v
StyleRegistry (indexed Vecs: fonts, char_shapes, para_shapes)

This separation mirrors the HTML + CSS model:

  • Template = CSS (named styles in human-friendly format)
  • StyleRegistry = compiled CSS (numeric indices for runtime efficiency)

Each style in the template gets allocated sequential indices (CharShapeIndex, ParaShapeIndex). Fonts are deduplicated: two styles using “한컴바탕” share a single FontIndex.

Structs§

StyleEntry
A resolved style entry with allocated indices.
StyleRegistry
A registry of resolved styles with index-based access.