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

Allow using both fontAwesome5 and fontAwesome5Solid #105

Merged
merged 1 commit into from
Nov 29, 2021

Conversation

SimonPickup
Copy link
Contributor

Instead of relying on Font.fontNames(forFamilyName:) to return an empty array to trigger loading a font (which assumes one font per fontFamily), check for presence of actual fontName.

However this broke the "Segoe MDL2" font because the font name in the code doesn't match the postscriptname in the .ttf file. Updated the code and renamed the ttf file to match.

Also an unrelated change (which I implemented trying to debug this) calls CTFontManagerRegisterFontsForURL() instead of CTFontManagerRegisterGraphicsFont() which follows Apple's recommendation, and simplifies the code. This is not necessary to fix the bug and can be removed if you wish.

@SimonPickup SimonPickup changed the title Fix #104 Allow using both fontAwesome5 and fontAwesome5Solid Nov 27, 2021
@segecey segecey merged commit 11c7511 into segecey:master Nov 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants