NativeElixirPdfUtilities.HtmlToPdf.FontFallback (native_elixir_pdf_utilities v0.8.0)
View SourceResolves styled text graphemes to fonts before layout and PDF writing.
The selected CSS face is tried first, followed by the remaining requested families, configured font faces, and the bundled fallback faces. Adjacent graphemes using the same face remain one text node so layout can measure and wrap the final font runs.
Summary
Functions
Resolves every styled text node to font faces that contain its graphemes.
Types
@type error_reason() :: :invalid_document | :invalid_encoding | :unsupported_glyph
@type styled_tree() :: NativeElixirPdfUtilities.HtmlToPdf.Style.styled_tree()
Functions
@spec resolve(styled_tree()) :: {:ok, styled_tree()} | {:error, {error_reason(), NativeElixirPdfUtilities.Diagnostics.diagnostic()}}
Resolves every styled text node to font faces that contain its graphemes.