Different unicode range names in fontTools.ttLib.tables.O_S_2f_2 and fontTools.unicodedata.Blocks #3269
-
fontTools.ttLib.tables.O_S_2f_2 defines some unicode range names: with the comment # Unicode ranges data from the OpenType OS/2 table specification v1.7
fontTools.unicodedata.Blocks also contains a list of range names, but it is more extensive. Could it be these lists represent the same data? Indeed, one says ranges, the other says blocks and unicode says these are not the same. Can OS/2 only handle the smaller list as it is an older table? I'm just curious about which to use as the definitive source for range names. There is no emergency. from fontTools.ttLib.tables.O_S_2f_2 import OS2_UNICODE_RANGES
from fontTools.unicodedata.Blocks import VALUES
os2Values = set([a[0][0] for a in OS2_UNICODE_RANGES])
both = []
for name in VALUES:
if not name in os2Values:
print("fontTools.unicodedata.Blocks, but not fontTools.ttLib.tables.O_S_2f_2", name)
else:
both.append(name)
print()
for name in os2Values:
if not name in VALUES:
print("fontTools.ttLib.tables.O_S_2f_2 but not fontTools.unicodedata.Blocks", name)
print()
for name in both:
print("fontTools.ttLib.tables.O_S_2f_2 and fontTools.unicodedata.Blocks", name)
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The "Comments" here probably explains most:
The differences in your "fontTools.ttLib.tables.O_S_2f_2 but not fontTools.unicodedata.Blocks" section are mostly case differences or otherwise superficial naming differences, so it appears one is just a superset of the other. |
Beta Was this translation helpful? Give feedback.
The "Comments" here probably explains most:
The differences in your "fontTools.ttLib.tables.O_S_2f_2 but not fontTools.unicodedata.Blocks" section are mostly case differences or otherwise superficial naming differences, so it appears one is just a superset of the other.