profile
viewpoint

Ask questionsScripting constants changed in 1536d58fb5969c73644337053c8af2ffe3e0ae82

In commit 1536d58fb5969c73644337053c8af2ffe3e0ae82 the value of the constant causing ttf_flag_nohints was changed from 0x8 to 0x80000. 0x8 now means ps_flag_nohints.

In the case of python scripting, omit-instructions continues to map to 0x8 (now ps_flag_nohints, previously ttf_flag_nohints).

This change in values broke the build of the DejaVu fonts which uses both the constants and the python names to strip the tt instructions. I believe that this is also in violation of the documentation:

no-hints

Do not include PS hints

omit-instructions

Do not include TrueType instructions

I've submitted a patch downstream to fix the build: https://bugs.archlinux.org/task/67500

But this patch is distro specific because some distros might ship fontforge versions from before 1536d58fb5969c73644337053c8af2ffe3e0ae82.

fontforge/fontforge

Answer questions mahkoh

You are saying that 1536d58 inadvertently flipped omit-instructions and no-hints.

Yes

It made fm_flag_nopshints omit TTF instructions

Not quite. fm_flag_nopshints does what the name says. However, fm_flag_nopshints has the wrong numerical value 8 instead of 0x80000 and the python engine maps omit-instructions to fm_flag_nopshints instead of fm_flag_nottfhints. So the bug is a bit spread out.


Fundamentally this was an api break. But it happened in 2019-03 and at this point there might be fonts depending on the new behavior. For example if the DejaVu font is fixed in arch by applying my patch to the DejaVu package, then the package will break again if you make a release with the old behavior restored.

useful!

Related questions

AddressSanitizer: BUS on unknown address hot 1
Symbol not found: _PyBool_Type hot 1
source:https://uonfu.com/
Github User Rank List