Skip to content

[FEATURE] Add font fallback #1078

@kaiquegazola

Description

@kaiquegazola

Describe your feature request

When rendering data, we may encounter glyphs/chars that are not available in main style font, an example:

Html(
      data: '<span>‟Pessoas que se recuperaram, »’”›⸃⸅⸊⸍⸝⸡ [...]”</span>',
      style: <String, Style>{
        'span': Style(
          fontFamily: 'Lato',
        ),
      },
);

and will render this:

image

Proposal
Flutter TextStyle already solves this with the fontFamilyFallback parameter, just need to expose it to flutter_html Style.

A picture of a cute animal (not mandatory but encouraged)

Metadata

Metadata

Assignees

No one assigned

    Labels

    cssEnhancements/issues with css propertiesenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions