Re: [ft-devel] What is 26.6 fractional points?

2010-01-14 Thread Ken Sharp

At 19:21 13/01/2010 +, rsr wrote:

Hi,
Can any one please explain me what is

nominal width, 26.6 fractional points


Its a way of representing a non-integer number in a 32-bit word. The first 
26 bits are used to represent the integer portion of the number so the 
integer can vary from 0 to 67,108,864. The remaining 6 are used to 
represent the fractional portion.


Do a Google for fixed precision arithmetic or see Wikipedia

http://en.wikipedia.org/wiki/Fixed-point_arithmetic

You *are* a software developer, right ?




___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] freetype compilation warnings

2010-01-14 Thread Sean McBride
On 1/12/10 11:09 AM, Sean McBride said:

On 1/12/10 4:43 AM, David Bevan said:

All the proposed solutions assume that there is a (known) integer size
which matches the pointer size.

There is: intptr_t.  But it's part of C99, which freetype can not require. :(

I would expect something like the following to work (though I don't have
a suitable compiler to hand to test).

#define ALL_POINTS  (FT_UShort*)((FT_Byte*)(NULL) - 1);

Clever!  I'll commit this to VTK and we'll see tomorrow.

Well, this silenced Visual Studio, but now another compiler on another
machine is complaining:

http://www.cdash.org/CDash/viewBuildError.php?type=1buildid=514717

warning #2061-D: integer operation result is out of range

I think perhaps it would be better to change this code instead of being
'cleaver'.  Perhaps instead we could use a struct that contains a bool
and a pointer.  The bool could indicate this special ALL_POINTS state.

--

Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com
Mac Software Developer  Montréal, Québec, Canada




___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel