Skip to content

Text bounds not supporting font weight #241

@JoachimM7

Description

@JoachimM7

The bounds()-function in the Text.swift only returns the size of the normal weighted font. So for bold fonts for example the bounds are wrong. Line no. 95 should be changed to:

font = MFont.systemFont(ofSize: CGFloat(f.size), weight: getWeight(f.weight))

As well you have to copy the getWeight-function, but I would suggest to return MFont.Weight.regular as default.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions