Repository navigation
GraphiteText: outline fonts through FreeType, a trait on by default - #22
Merged
Merged
Conversation
colemancda
force-pushed
the
feature/text-freetype
branch
from
November 26, 2026 07:19
f69263b to
84ea90f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 3, seventh of the stack, against master. Independent of #21 (layouts).
FreeTypepackage trait, on by default.CFreeTypeis a system library (freetype2by pkg-config;libfreetype-devandbrew install freetypeas providers).swift build --disable-default-traitsleaves it out, and text keeps the built-in bitmap font. I built and tested both ways.FreeTypeFaceloads a font from a path or from memory (with the face index of a collection). Its glyphs are 8-bit coverage in theGlyphImagethe text engine already draws, its metrics are FontInfo's from FreeType's size metrics, and every FreeType call goes through one lock, since faces aren't thread-safe. A font that is bold or italic itself says so, and other styles are drawn from its glyphs.FontFinderfinds installed fonts by family name, in any case, in the folders fonts live in on macOS and Linux (XDG's included): FreeType reads each file's family and style once, on first use, including every face in a collection. ItslookUpplugs intoFontRegistry, so classic names resolve to installed families through the substitutes list.FontRegistryfrom outside.