[MPEG-OTSPEC] Some research on TT instructions and cubics

Laurence Penney lorp at lorp.org
Fri Sep 22 15:07:52 CEST 2023

That issue is well defined in the proposed scheme, by using a flag that was previously reserved:

> 0x80 CUBIC Bit 7: Off-curve point belongs to a cubic-Bezier segment

> On 22 Sep 2023, at 14:00, Hin-Tak Leung <htl10 at users.sourceforge.net> wrote:
> Just a caution: My recall of the exact details is a bit fuzzy, not having looked at it after a few years, but I remember there is an "optimization" details of the quadratic which will break very badly under cubic: in the typical cubic you get on-off-off-on-off-off-on, right? In quadratic it is a lot simpler, just on-off-on-off-on-off- (theoretically). I believe there is a clever optimisation to save a few bytes somewhere which says, if you have off-off, it implies a hidden on-point in the middle. This saves a few bytes as you don't encode the middle on-point. This obviously will break in the cubic case, as you now have an ambiguity: does two off-off points means two quadratic with an implied hidden middle on-point, or is it the middle of a cubic?
> Microsoft or Apple people (or even freetype people) more familiar with TT instructions can correct me and/or fill in the details.

More information about the mpeg-otspec mailing list