1
0
mirror of https://github.com/ryanoasis/nerd-fonts.git synced 2025-01-31 12:27:22 +02:00

font-patcher: Reintroduce fsType fix

[why]
With commit
  f7d6fcb5 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
  ab6fa3c5 Reverts part of #687 * the patcher refuses to patch all/most fonts with this flag in the open options

[how]
Revert f7d6fcb5 but use the old fashioned numerical open flags
interface instead.

[note]
The textual open() flags have been introduced into `fontforge`s python
interface with their commit

4a76712f0c

  Font Open flag improvements
  * Document more Open flags
  * Add string tuple interface to python FontOpen API

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
Fini Jastrow 2021-11-28 11:06:17 +01:00
parent ab6fa3c562
commit f554ed50c6

View File

@ -52,7 +52,7 @@ class font_patcher:
self.setup_arguments()
self.config = configparser.ConfigParser(empty_lines_in_values=False, allow_no_value=True)
try:
self.sourceFont = fontforge.open(self.args.font)
self.sourceFont = fontforge.open(self.args.font, 1) # 1 = ("fstypepermitted",))
except Exception:
sys.exit(projectName + ": Can not open font, try to open with fontforge interactively to get more information")
self.setup_font_names()