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

Enable bitmap font usage under CoreText #4115

Merged
merged 2 commits into from
Dec 30, 2024

Conversation

qwerasd205
Copy link
Collaborator

@qwerasd205 qwerasd205 commented Dec 30, 2024

macOS bitmap-only fonts are a poorly documented format, which are often distributed as .dfont or .dfon files. They use a 'bhed' table in place of the usual 'head', but the table format is byte-identical, so enabling the use of bitmap-only fonts only requires us to properly fetch this table while calculating metrics.

ref: https://fontforge.org/docs/techref/bitmaponlysfnt.html

Reverts #3550 for obvious reasons, and may close issue #2168 because this should now mean that bitmap fonts are properly supported under both font backends due to #3837 - unless otb fonts are still not properly supported under FreeType (they are not supported under CoreText because CoreText does not know how to handle them).

I tested this change with the .dfont distribution of Cozette v1.25.2 and saw no visual issues.

macOS bitmap-only fonts are a poorly documented format, which are often
distributed as `.dfont` or `.dfon` files. They use a 'bhed' table in
place of the usual 'head', but the table format is byte-identical, so
enabling the use of bitmap-only fonts only requires us to properly fetch
this table while calculating metrics.

ref: https://fontforge.org/docs/techref/bitmaponlysfnt.html
@mitchellh
Copy link
Contributor

Excellent thank you. ❤️ CI failure is unrelated to you and is fixed on main.

@mitchellh mitchellh merged commit ef542c6 into ghostty-org:main Dec 30, 2024
20 of 21 checks passed
@github-actions github-actions bot added this to the 1.0.1 milestone Dec 30, 2024
@qwerasd205 qwerasd205 deleted the coretext-allow-bitmap branch January 3, 2025 18:43
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.

2 participants