Module ir Copy item path Source geom layout module AbsoluteRef A stable absolute reference.
The fingerprint is used to identify the item and likely unique between
different svg documents. The (local) def id is only unique within the svg
document. AbsoluteRefResolver The resolver for an archived AbsoluteRef ArchivedAbsoluteRef An archived AbsoluteRef ArchivedAxes An archived Axes ArchivedBuildInfo An archived BuildInfo ArchivedColor32Item An archived Color32Item ArchivedColorTransform An archived ColorTransform ArchivedDefId An archived DefId ArchivedFlatModule An archived FlatModule ArchivedFontItem An archived FontItem ArchivedFontRef An archived FontRef ArchivedGlyphRef An archived GlyphRef ArchivedGradientItem An archived GradientItem ArchivedGroupRef An archived GroupRef ArchivedHtmlItem An archived HtmlItem ArchivedImage An archived Image ArchivedImageGlyphItem An archived ImageGlyphItem ArchivedImageItem An archived ImageItem ArchivedIncrFontPack An archived IncrFontPack ArchivedIncrGlyphPack An archived IncrGlyphPack ArchivedItemPack An archived ItemPack ArchivedLayoutRegionRepr An archived LayoutRegionRepr ArchivedLayoutSourceMapping An archived LayoutSourceMapping ArchivedLinkItem An archived LinkItem ArchivedOutlineGlyphItem An archived OutlineGlyphItem ArchivedPage An archived Page ArchivedPathItem An archived PathItem ArchivedPatternItem An archived PatternItem ArchivedRgba8Item An archived Rgba8Item ArchivedScalar An archived Scalar ArchivedTextItem An archived TextItem ArchivedTextItemContent An archived TextItemContent ArchivedTextShape An archived TextShape ArchivedTransform An archived Transform ArchivedTransformedRef An archived TransformedRef Axes A container with a horizontal and vertical component. AxesResolver The resolver for an archived Axes BuildInfo BuildInfoResolver The resolver for an archived BuildInfo Color32Item A 32-bit color in a specific color space.
Note: some backends may not support 32-bit colors. Color32ItemResolver The resolver for an archived Color32Item ColorTransform ColorTransformResolver The resolver for an archived ColorTransform DefId The local id of a svg item.
This id is only unique within the svg document. DefIdResolver The resolver for an archived DefId FlatModule Flatten module so that it can be serialized. FlatModuleResolver The resolver for an archived FlatModule FontItem Reference a font item in a more friendly format to compress and store
information. The fonts are locally stored in the svg module.
With a font reference, we can get both the font metric and the font data.
The font_hash is to let it safe to be cached.
By estimation, https://stackoverflow.com/a/29628053/9323228
If the hash algorithm for font_hash is good enough.
When you have about 500 fonts (in windows), the collision rate is about: FontItemResolver The resolver for an archived FontItem FontRef Reference a font item in a more friendly format to compress and store
information, similar to GlyphRef . FontRefResolver The resolver for an archived FontRef FrozenModule GlyphRef Reference a glyph item in a more friendly format to compress and store
information. The glyphs are locally stored in the svg module.
With a glyph reference, we can get both the font metric and the glyph data.
The font_hash is to let it safe to be cached, please see
crate::vector::ir::FontItem for more details. GlyphRefResolver The resolver for an archived GlyphRef GradientItem Item representing an <gradient/> element. GradientItemResolver The resolver for an archived GradientItem GroupRef References to a group of items with translates.
Absolute positioning items at their corresponding points. GroupRefResolver The resolver for an archived GroupRef HtmlItem Item representing an <image/> element. HtmlItemResolver The resolver for an archived HtmlItem Image Data of an <image/> element. ImageGlyphItem A image glyph item. ImageGlyphItemResolver The resolver for an archived ImageGlyphItem ImageItem Item representing an <image/> element. ImageItemResolver The resolver for an archived ImageItem ImageResolver The resolver for an archived Image IncrFontPack Flatten mapping fingerprints to glyph items. IncrFontPackResolver The resolver for an archived IncrFontPack IncrGlyphPack Flatten mapping fingerprints to glyph items. IncrGlyphPackResolver The resolver for an archived IncrGlyphPack ItemPack References to a set of items. ItemPackResolver The resolver for an archived ItemPack LayoutMappingSelector LayoutNestSelector LayoutRegionPagesRAII LayoutRegionRepr Describing LayoutRegionReprResolver The resolver for an archived LayoutRegionRepr LayoutRegionSourceMappingRAII LayoutSourceMapping LayoutSourceMappingResolver The resolver for an archived LayoutSourceMapping LinkItem Item representing an <a/> element. LinkItemResolver The resolver for an archived LinkItem Module A finished module that stores all the vector items.
The vector items shares the underlying data.
The vector items are flattened and ready to be serialized. ModuleView MultiVecDocument Module with multiple documents, corresponding to multiple
typst::model::Document rearranged by LayoutRegion . OutlineGlyphItem An outline glyph item. OutlineGlyphItemResolver The resolver for an archived OutlineGlyphItem Page References to a page frame. PageResolver The resolver for an archived Page PathItem Item representing an <path/> element. PathItemResolver The resolver for an archived PathItem PatternItem Item representing an <pattern/> element. PatternItemResolver The resolver for an archived PatternItem Rect Rgba8Item Item representing an 8-bit color item. Rgba8ItemResolver The resolver for an archived Rgba8Item Scalar Scalar value of Vector representation.
Note: Unlike Typst’s Scalar, all lengths with Scalar type are in pt. ScalarResolver The resolver for an archived Scalar TextItem A text item.
Item representing an <g><text/><g/> element. TextItemContent The content metadata of a TextItem . TextItemContentResolver The resolver for an archived TextItemContent TextItemResolver The resolver for an archived TextItem TextShape The shape metadata of a TextItem . TextShapeResolver The resolver for an archived TextShape Transform A scale-skew-translate transformation. TransformResolver The resolver for an archived Transform TransformedRef References to a vec item with transform.
Item representing an <g/> element applied with a TransformItem . TransformedRefResolver The resolver for an archived TransformedRef VecDocument Module with page references, corresponding to a typst::model::Document. ArchivedColorSpace An archived ColorSpace ArchivedFlatGlyphItem An archived FlatGlyphItem ArchivedGradientKind An archived GradientKind ArchivedGradientStyle An archived GradientStyle ArchivedLayoutRegion An archived LayoutRegion ArchivedLayoutRegionNode An archived LayoutRegionNode ArchivedModuleMetadata An archived ModuleMetadata ArchivedPageMetadata An archived PageMetadata ArchivedPathStyle An archived PathStyle ArchivedSourceMappingNode An archived SourceMappingNode ArchivedTransformItem An archived TransformItem ArchivedVecItem An archived VecItem ColorSpace A color space for mixing. ColorSpaceResolver The resolver for an archived ColorSpace FlatGlyphItem The glyph item definition with all of variants of GlyphItem other than
GlyphItem::Raw, hence it is serializable. FlatGlyphItemResolver The resolver for an archived FlatGlyphItem GlyphItem A glyph item. GradientKind Kind of gradients for GradientItem . GradientKindResolver The resolver for an archived GradientKind GradientStyle Attributes that is applicable to the GradientItem . GradientStyleResolver The resolver for an archived GradientStyle LayoutRegion Describing LayoutRegionNode Describing LayoutRegionNodeResolver The resolver for an archived LayoutRegionNode LayoutRegionResolver The resolver for an archived LayoutRegion LayoutSelectorExpr ModuleMetadata metadata that can be attached to a module. ModuleMetadataResolver The resolver for an archived ModuleMetadata PageMetadata metadata that can be attached to a module. PageMetadataResolver The resolver for an archived PageMetadata PathStyle Attributes that is applicable to the PathItem . PathStyleResolver The resolver for an archived PathStyle SourceMappingNode Source mapping from vec item to source span. SourceMappingNodeResolver The resolver for an archived SourceMappingNode TransformItem Item representing all the transform that is applicable to a
super::VecItem . See https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/transform TransformItemResolver The resolver for an archived TransformItem VecItem A vector item that is specialized for representing
typst::model::Document or its subtypes. VecItemResolver The resolver for an archived VecItem EuclidMinMax FontIndice ItemIndice LayoutSelector ModuleStream Trait of a streaming representation of a module. ToItemMap as_svg_id Create a xml id from the given prefix and the def id of this reference.
Note that the def id may not be stable across compilation.
Note that the entire html document shares namespace for ids. Abs length in pt. Angle Angle in radians FontPack References to a set of fonts. GlyphPack References to a set of glyphs. ImmutStr ItemMap Point Point in (x pt, y pt) Ratio Ratio within range [0, 1] RefItemMap RefItemMapSync RefItemMapT Size Size in (width pt, height pt) SpanId A span location in the source code.
Note: it is unsafe to transfer a span across processes.
Note: a span id is only ensured correct within the same compilation
lifespan.