Skip to content

LoadFont with "bold" weight will crash #571

@flierz

Description

@flierz

I have an issue with getting my custom fonts to work in Macaw.

SVG file:
text id="A" font-family="Roboto-Bold, Roboto" font-size="30" font-weight="bold" line-spacing="40" fill="#FFFFFF"

It crashes in the following code for unexpectedly found nil while unwrapping an Optional value:
class func loadFont(name: String, size: Int, weight: String?) -> MFont? {
...
fontDesc = fontDesc.withSymbolicTraits(.traitBold)!
...
}

Hope you can fix it.
Thanks in advance.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions