[why]
When the font file is not existing the message we get is either
unreadable or missleading (at least for normal users).
[how]
Explicitely state why we can not open a font file, at least in the cases
where we can.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The Nerd Font Version is not added to the SFNT Version.
This is also a TODO item in `font-patcher`.
The SFNT-Revision is not updated at all.
[how]
Set the SFNT Version and Revision.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[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>
[why]
When fontforge is not able to open the font we fail with a meaninless
exception. Users might think that the font-patcher script itself is
broken.
[how]
Exit the script with a hint how to get more information if fontforge was
not able to open the font.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Through fsType certain restrictions can be set on a font. When fontforge
is used in interactive mode the user can override the restrictions with
a popup dialogue. The font-patcher script dies instead, without any
meaningful message.
[how]
Allow the script to ignore fsType settings when opening.
The restrictions will still persist into the generated patched font.
[note]
This came up with Bicubik by Anton Kudin, that has fsType = 2
(modification restriction) set.
Fixes: #686
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>