Skip to main content

shape_visual_items

Function shape_visual_items 

Source
pub fn shape_visual_items<T: ParsedFontTrait>(
    visual_items: &[VisualItem],
    font_chain_cache: &HashMap<FontChainKey, FontFallbackChain>,
    fc_cache: &FcFontCache,
    loaded_fonts: &LoadedFonts<T>,
    debug_messages: &mut Option<Vec<LayoutDebugMessage>>,
) -> Result<Vec<ShapedItem>, LayoutError>
Expand description

Shape visual items into ShapedItems using pre-loaded fonts.

This function does NOT load any fonts - all fonts must be pre-loaded and passed in. If a required font is not in loaded_fonts, the text will be skipped with a warning.