[MPEG-OTSPEC] "font directory" / "offset table" / "table directory"
Laurence Penney
lorp at lorp.org
Sun Aug 30 22:39:00 CEST 2020
> On 30 Aug 2020, at 20:43, Peter Constable <pgcon6 at msn.com> wrote:
>
> Separating the fingerprint from the rest of the structure would end up being messy in describing the organization of TTCs … it feels cleaner to say the offsets are to the table directory of each font resource, and that the font resource beings with sfntVersion.
Yes, that makes sense.
>> To avoid confusion it may be helpful to provide pseudocode for calculating them.
>
> There are similar fields in cmap format 4, and they are described with formulae. E.g., "2 × (2**floor(log2(segCount)))". Now, one of the issues opened on that chapter is that someone wasn't familiar with the Fortran "**" operator and so misunderstood the intent. It seems like something less language specific is needed. Taking that in mind, something similar could be done here. E.g., "pow(floor(log2(numTables)), 2) × 16". Or include both prose description and formula.
Good point, "**" is not clear to whippersnappers.
BTW the two definitions can be made identical apart from the factors 16 (for table directory) and 2 (for cmap). Please also consider an asterisk (*) over the typographic multiply sign, unless the whole thing uses math typography, and also consider the ascii circumflex (^) over pow().
- Laurence
More information about the mpeg-otspec
mailing list