[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] New Infinality Release

From: Alexei Podtelezhnikov
Subject: Re: [ft-devel] New Infinality Release
Date: Wed, 19 Dec 2012 17:47:51 -0500

>>> In your integrated code you use FT_UInt for the rule scaling factor,
>>> with 1000 being a unit.  This contradicts the general FreeType
>>> practice of using FT_Fixed to represent fractional numbers.  I would
>>> strongly suggest switching to FT_Fixed, with 0x10000 representing a
>>> unit.  Then all arithmetic will follow naturally with FT_MulFix, and
>>> FT_DivFix.
> I'm OK converting all this over to FT_Fixed, however I think it will make
> maintaining it more confusing and tedious.

You can do this:

{ "DejaVu Sans", 12, "Regular Class", 'm', 0.95 * 0x10000L },

I think the compiler will get it. See for example
src/cff/cffload.c:1362:      priv->expansion_factor = (FT_Fixed)( 0.06
* 0x10000L );
src/type1/t1load.c:2091:    priv->expansion_factor = (FT_Fixed)( 0.06
* 0x10000L );
src/type1/t1load.c:2092:    priv->blue_scale       = (FT_Fixed)(
0.039625 * 0x10000L * 1000 );

reply via email to

[Prev in Thread] Current Thread [Next in Thread]