Skip to content

In cases where a font family doesn't include all variants, the font applied may not be correct. #7

@wryphonedev

Description

@wryphonedev

For example, our font family includes bold and bold-italic variants.
The desired behavior is that the default/body font be rendered with the bold variant, and only content specified italic render in the bold-italic variant.
However, when the "body" font is specified as the bold variant, all content is rendered in the italic variant (regardless of CSS style). This is because the code references the fonts "family" property, and the first instance of a font returned under the family is the italic variant - not the font dictated specifically in the bodyFont parameter.
This issue was corrected in our instance by simply changing references in the HTML attributed string class from font.family to font.fontName. I am happy to submit a pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions