You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[why]
When an existing font file is read from a buffer and then written back
into a buffer all Panose values will be zero.
The problem has been most likly been introduced with PR opentypejs#630 (but I did
not check that).
There are two disjunct data structures in the font.tables.os2 object
that describe the panose values:
* An array with the Panose values `.panose = [ 1, 2, ...]`
* Dedicated properties for each Panose value e.g. `.bFamilyType`
The aforementioned PR seems to address only fonts created from scratch
and not parsed from a buffer.
Writing out the font into a buffer will always use the dedicated Panose
properties and ignore the .panose array.
Parsing a font does set the array but not the dedicated properties. They
are not even existing then.
[how]
When an existing font is parsed the `.panose` array is filled (as
before). But now the dedicated properties are also created and filled
with the individual values.
[note]
The written font is always using the dedicated values. If a user changes
the panose array that will have no effect. There are no checks if the
data is consistent. Having the same data in two disjunct structures is
not so nice to handle.
Signed-off-by: Fini Jastrow <[email protected]>
0 commit comments