freetype
[Top][All Lists]
Advanced

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

Re: [ft] Why is FT_F26Dot6 defined as a signed long


From: Werner LEMBERG
Subject: Re: [ft] Why is FT_F26Dot6 defined as a signed long
Date: Thu, 14 Feb 2019 06:45:29 +0100 (CET)

> I'm curious why FT_F26Dot6 is a signed long and not a FT_Int32?  I
> would have expected it to be a 32 bit fixed point value.

The library is quite old; at the time of its inception, `long' was
32bit on most platforms, and C types like `int32_t' didn't exist yet
(or were so new that just a very small set of compilers supported it
then).

On the other hand, using a 64bit entity has the advantage of tagging
an unsigned 32bit value as `not set', for example, by assigning
value -1 to it.


    Werner

reply via email to

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