font-patcher: Reintroduce fsType fix #692
Merged
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.
Description
[why]
With commit
f7d6fcb
font-patcher: Allow processing of fonts with fsType set
we added support for fonts with the fsType set. This came up in
issue #686 with font 'Bicubik'.
The solution in that commit uses (modern) textual flags in the
fontforge
open() method. But they have been only introduced in 2020,so people using older
fontforge
could not patch anything anymore.This has been reported in issue #691.
As a quick fix the fsType support has been removed with commit
ab6fa3c
Reverts part of #687 * the patcher refuses to patch all/most fonts with this flag in the open options
[how]
Revert ab6fa3c but use the old fashioned numerical open flags
interface instead.
[note]
The textual open() flags have been introduced into
fontforge
s pythoninterface with their commit
fontforge/fontforge@4a76712
Requirements / Checklist
./font-patcher Inconsolata.otf --fontawesome --octicons --pomicons
./gotta-patch-em-all-font-patcher\!.sh Hermit
What does this Pull Request (PR) do?
Reintroduce
fsType
fix as per f7d6fcb but avoiding problem with olderfontforge
How should this be manually tested?
Try to patch some font from
src/
, try to patchBicubik
(or otherfsTyoe
set font).Use
fontforge
revision 20190801 or older, and revision 20200314 or newer.Just the ability to open the font is enough, no need to inspect the patched fonts.
Any background context you can provide?
What are the relevant tickets (if any)?
Screenshots (if appropriate or helpful)
Edit: Just formatting changes
Edit: Add version requirements for tests