Skip to content

HtmlFromXamlConverter.cs doesn't set units on CSS font-size attribute #46

Open
@ghost

Description

For all I know setting the units on a CSS font-size attribute is mandatory. I updated line 162 to the following in order to make it specify the font-size in points:

css = "font-size:" 
    + Math.Round(double.Parse(xamlReader.Value, CultureInfo.InvariantCulture) / (96.0 / 72.0), 2)
      .ToString("0.##", CultureInfo.InvariantCulture) + "pt;";

This only works for when the FontSize in the XAML is specified in points and without units (as it's generated by XamlWriter.Save).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions