Werner,

FT_MulFix optimized like this on line 543:
    if ( ua <= 2048 && ub <= 1048576L )
      ua = ( ua * ub + 0x8000UL ) >> 16;

Of course, when we anchor 2048 and use unsigned multiplication, it
should safely have been
     if ( ua <= 2048 && ub <= 2097135L )

but that's not my point. I do not know why 2048 is chosen, but we can
relax the condition similarly to the recent FT_MulDiv change. We can
use this to cover the old range *completely* and grab some more:

    if ( ua + ( ub >> 8 ) <= 8191UL )

So, what was so special about 2048?

Alexei

_______________________________________________
Freetype-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/freetype-devel

Reply via email to