freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] New `ftcolor.h' draft (Re: Freetype-devel Digest, Vol 16


From: Hin-Tak Leung
Subject: Re: [ft-devel] New `ftcolor.h' draft (Re: Freetype-devel Digest, Vol 161, Issue 6)
Date: Thu, 7 Jun 2018 10:24:29 +0000 (UTC)

> From: Werner LEMBERG <address@hidden>
> To: address@hidden
> Cc: address@hidden
> Subject: Re: [ft-devel] New `ftcolor.h'
> draft
   
> >> What should be the default
> then?  Black opaque, 0x000000FF?
> > 
> > Shouldn't this depend on
> palette_types?
> > 0xFFFFFFFF for
> FT_PALETTE_USABLE_WITH_DARK_BACKGROUND
> > 0x000000FF for
> FT_PALETTE_USABLE_WITH_LIGHT_BACKGROUND
 
> Sounds sensible.  Thanks for the
> idea!

I would also suggest having a look at Cairo. I remember getting really confused 
about converting freetype bitmaps to cairo drawing surface a while ago, 
although I resolved all the issues in the end. If I remember correctly, the 
issues are:

- freetype's bitmaps are always in the same order, regardless of 
host-endianness. Cairo bitmaps are in host-endianness. So bytes/bits need to be 
swapped between platforms from one to the other depending on the host 
endianness.


BTW, Cairo RGBA values have the alpha channel in the higher byte. i.e. it is 
0xAABBGGRR, I think. 





reply via email to

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