Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

custom ttf fonts are not loaded correctly #474

Closed
godexsoft opened this issue Sep 6, 2018 · 1 comment
Closed

custom ttf fonts are not loaded correctly #474

godexsoft opened this issue Sep 6, 2018 · 1 comment
Assignees
Labels
Milestone

Comments

@godexsoft
Copy link

I have an issue with getting my custom fonts to work in Macaw.
In fact i found a way to make it work but let me explain what i'm experiencing.

If i attempt to load my custom font like so:
Font(name: "comfortaa", size: 16)
I get a Helvetica font. The reason is because this code:
return MFont(descriptor: fontDesc, size: CGFloat(size))
inside of RenderUtils.loadFont is not locating my font correctly even tho a few lines above the font is found in availableFonts. So it detects lower case 'comfortaa' and sets all descriptors up but iOS refuses to give me the correct font.

If i change this one return line to this everything works as expected (but weight is ignored of course):
return MFont(name: fontName, size: CGFloat(size))

Hope you can fix it somehow so we can at least use this method if we don't specify weight?
Thanks in advance.
Alex

@ystrot ystrot self-assigned this Feb 6, 2019
@ystrot ystrot added the bug label Feb 6, 2019
@ystrot ystrot added this to the 0.9.4 milestone Feb 11, 2019
@ystrot
Copy link
Member

ystrot commented Feb 11, 2019

Fixed in the master and will be available in the 0.9.4 release.

@ystrot ystrot closed this as completed Feb 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants