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

Some icons are rendered incorrectly in macOS CoreText font engine. #1867

Open
StingKo opened this issue Jan 22, 2025 · 0 comments
Open

Some icons are rendered incorrectly in macOS CoreText font engine. #1867

StingKo opened this issue Jan 22, 2025 · 0 comments

Comments

@StingKo
Copy link

StingKo commented Jan 22, 2025

For example, in the following code, setting the wght variable axis of a “Library Add” icon to 900 causes the size of the internal plus sign to be disproportionate to the external elements.

let attributes: [NSFontDescriptor.AttributeName: Any] = [
            .name: "Material Symbols Outlined",
            .variation:[
                    2003265652: 900 // wght
            ],
]
let descriptor = NSFontDescriptor(fontAttributes: attributes)
let label = NSTextField(labelWithString: "\u{e02e}")
label.font = NSFont(descriptor: descriptor, size: 26)

This is rendered by CoreText:
Image

This is from the Google Fonts website:
Image

After testing, most multi-layered icons exhibit similar issues.

Image
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

No branches or pull requests

1 participant