Ignore X11 fonts on macOS#305
Merged
Merged
Conversation
X11 installations on macOS routinely include a `Vera.ttf` font that does not support Unicode. Fixes #151
Otherwise `Font('modern')` will be interpreted as trying to find a typeface actually named "modern". This construction mostly occurs in tests, not real code, which tends to go through the `KivaFontTrait()` which parses `'modern'` to refer to the sans-serif family in any case.
Codecov Report
@@ Coverage Diff @@
## master #305 +/- ##
==========================================
+ Coverage 33.65% 33.66% +<.01%
==========================================
Files 206 206
Lines 18298 18299 +1
Branches 2411 2411
==========================================
+ Hits 6159 6161 +2
Misses 11747 11747
+ Partials 392 391 -1
Continue to review full report at Codecov.
|
Merged
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.
Fixes #151
Most installations of X11 on macOS include a
Vera.ttffont that is incapable of displaying common Unicode characters.Also, interpret the font family
modernassans-serif. We useFont('modern')in a number of tests to get a "default font". If we go throughKivaFontTrait('modern'), that will parse down toFont(''), which picks upsans-serifanyways. This makes both codepaths consistent. Otherwise,Font('modern')tries to find a typeface actually named "modern" when it's intended as a general family, likesans-serif. This causes warnings in these tests as it falls back to the arbitrary default font instead of looking for a propersans-seriffont.