freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] endianness macros


From: Werner LEMBERG
Subject: Re: [ft-devel] endianness macros
Date: Wed, 17 Aug 2016 07:45:52 +0200 (CEST)

> If I understand correctly FreeType API, only TrueType header tables
> are parsed and readily available as structures.
> 
> https://www.freetype.org/freetype2/docs/reference/ft2-truetype_tables.html

Yes.

> Other tables like loca and glyf can be provided to the user as byte
> streams through FT_Load_Sfnt_Table, but user has to parse it.

Correct.

> So endianness becomes important to parse integers.

IMHO it's the job of the application to handle that – even if FreeType
internally provides routines.

> Freetype documentation can be improved here, btw.

What do you mean?  Please explain.

> Freetype does not seem to provide macros to parse integers with
> endianness in mind. Do you think we should have public
> 
> FT_OT_TO_INT16
> FT_OT_TO_INT32
> 
> Something like this?
> http://linux.die.net/man/3/endian

Rather not.  You can highly optimize table access with manually
written code if you only need some data of it.  In case the tables get
loaded into buffers, people will use their usual routines to parse the
data anyways.


    Werner

reply via email to

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