Repository navigation
GraphiteText: list a collection's faces by count and each font file once; tag swift-freetype - #24
Merged
Merged
Conversation
… other tests' files
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.
Summary
FreeTypeFace.faceCount: how many faces the font file has (at least 1), read from swift-freetype.FontFinderlists a collection's faces by that count (1 ..< faceCount), where it probed indexes up to an arbitrary 32 and stopped at the first that wouldn't open. An ordinary font file no longer makes a failed open of index 1, and a face that won't open is skipped without ending the collection.FontFinderreads each font file once. Folders inside others (/System/Library/Fonts/Supplementalis inside/System/Library/Fonts) listed their files twice before.from: "0.1.1", in place of themasterbranch.0.1.1is the revision this was built and tested against. A version dependency also lets packages that depend on Graphite by version use it, which a branch dependency doesn't.The swift-freetype update to 0.1.1 needed no code changes: its changes since the previous pin are additive (
namedInstancehas a default;GlyphOutlinegained fields we don't construct).Testing
FontFinderTests: no face is listed twice; each file's faces are listed from 0 and within itsfaceCount; collections are listed whole, exactly the faces that open; an ordinary.ttfhas one face. They use the machine's system fonts, so a collection is only exercised where the machine has a.ttc.FreeTypetrait, are left to CI.