Replies: 2 comments 6 replies
-
That snippet should work on almost all types in GSUB/GPOS. Does it not? |
Beta Was this translation helpful? Give feedback.
5 replies
-
Here's the relevant routine from otlBuilder: def getCompiledSize_(self, subtables):
size = 0
for st in subtables:
w = OTTableWriter()
w["LookupType"] = CountReference(
{"LookupType": st.LookupType}, "LookupType"
)
# We need to make a copy here because compiling
# modifies the subtable (finalizing formats etc.)
copy.deepcopy(st).compile(w, self.font)
size += len(w.getAllData())
return size |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
I want to figure out why in a particular font added kerning has an outsized impact on file size. For this, I'd like to now the byte count of the serialized (sub)table data inside the GPOS table. What's the easiest way to get at them?
Edit: this measures lookup size, but I still want to measure subtable size:
Beta Was this translation helpful? Give feedback.
All reactions