-
-
Notifications
You must be signed in to change notification settings - Fork 690
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
Initial implementation of Cocoa and iOS font loading. #1399
Conversation
GTK may have the same issue, though it hasn't been a problem for the tests so far. If necessary, we could find the internal name using the same library as the Android tests: toga/android/tests_backend/fonts.py Lines 106 to 107 in 30fabb4
|
@mhsmith I've taken a swing at getting this working with fonttools - and it mostly works on both iOS and Cocoa. There's still an issue with fonts like Endor that support multiple weights/variants from a single file. I still think it should be possible to get this working without needing fonttools, but a working solution based on a third party package is a better option than something not working at all. |
9fd3ceb
to
9240da3
Compare
The macOS build is currently failing because of an issue with binary merging; beeware/briefcase#1483 should address the problem. |
Add font registration to Cocoa and iOS backends.
This supports most use of custom fonts. The only piece missing are variant fonts - fonts where a single font file contains the details for multiple weights/variants. The Endor font is an example of this. Cocoa and iOS will render the font, but not with bold/italic variations, even if the font allows it. Fonts that are non-variant (e.g., the Roboto fonts) aren't affected by this.
My inclination is to say this is complete as a fix for #1837; document the lack of support for variant fonts as a platform detail, and open a ticket to address the missing feature once this lands.
PR Checklist: