freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] Big endian still searching


From: Antoine Leca
Subject: Re: [Devel] Big endian still searching
Date: Fri, 13 Apr 2001 18:44:19 +0200

Mike Owens wrote:
> 
> Still searching for documentation on how to set up library to support Big 
> Endian structure.

There is NO such a thing, because there are NO need for it.

Now for a more detailled explanation: Freetype 2.x comes from (guess what...)
Freetype 1.x  And Freetype 1.x is "restricted" to the TrueType fonts.

OTOH, it happens that the TrueType format were developped by Apple (you may know
that), and Apple's machine, at least since 1984, are big-endian (that I am sure
you know). Therefore, the base format for *any* >8-bit integer in the TrueType
format, is to use big-endian.

Now, it also happened that David began coding on Freetype using a PC (strange, 
not?)
And it was forced *from day 1* to use ad-hoc routines that reads the integer in 
the
reversed order. It does that reading the stream in (big-endian) order and 
building
the integers in memory as needs come (i.e., the 1.x library never, ever, has a
"swapped", little-endian, image of the font file; that explains the memory
requirements, which cannot be cutted down, even with memory mapped files).

And nobody came with the "strange" idea to use directly the big-endian values 
from
the font file, probably because the gain is restricted to the very minority...

I do not enough of .PFB to know if endianness is a problem (I would guess no),
but I cannot conceive of a reason why the scheme of avoiding *at all cost*
machine dependance (particularly something very known such as endianness)
would have been brocken by David during the developpement of Freetype 2.

So you can use the library without any fear with your big-endian embeeded 
system.


Good luck,

Antoine



reply via email to

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