Skip to content

Font mapping fails when using line-height #71

@MuhKuh7

Description

@MuhKuh7

In my Avalonia Desktop app I am using font mapping

if (appl.TryGetResource("FigtreeFont", appl.ActualThemeVariant, out var fontRes) && fontRes != null)
{
	htmlPanel.Container.AddFontFamily((FontFamily)fontRes);
	htmlPanel.Container.AddFontFamilyMapping("monospace", "Figtree");
}

with the following CSS:
* { font-family: monospace; }

This works, unless I add line-height:
* { font-family: monospace; line-height: 1.5; }

The line height will change according to the given value, but the font reverts to monospace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions