freetype
[Top][All Lists]
Advanced

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

[ft] Why is FT_F26Dot6 defined as a signed long


From: Wink Saville
Subject: [ft] Why is FT_F26Dot6 defined as a signed long
Date: Wed, 13 Feb 2019 16:01:09 -0800

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. But, since its defined
as a signed long:

$ find . -type f -name "*.h" | xargs grep 'FT_F26Dot6;'
./freetype/fttypes.h:  typedef signed long  FT_F26Dot6;

On my 64 bit linux box with gcc 8.2.1 it's 64 bits long. I tested this by
adding the following to example1.c [1]:

  fprintf ( stderr, "sizeof(FT_F26Dot6)=%d\n", sizeof(FT_F26Dot6));

and it prints 8:

$ ./example1
sizeof(FT_F26Dot6)=8
usage: ./example1 font angle sample-text

The same question applies to FT_Fixed and maybe other types too.

[1]: https://www.freetype.org/freetype2/docs/tutorial/example1.c


reply via email to

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