[cairo] building a "tiny" libcairo for embedded system?

Leon Woestenberg leonw at mailcan.com
Fri Feb 10 15:41:31 PST 2006


Hello David,

David Young wrote:

> Does anyone have a recipe for building a tiny libcairo, suitable for an
> embedded system with a tight ROM/RAM budget---e.g., 8/16MB?
> 
> Cairo itself may be acceptably small, but its dependency, libfreetype,
> is gigantic.  Let me know how you have built Cairo without libfreetype.
> 
I have built an older version of cairo without dependencies by stripping 
the font calls completely (compiled for Analog Devices' Blackfin DSP 
using their VisualDSP++). However, these sources now live on some 
back-up CD and are no longer on my systems (but stuck in a box).


In my current work, I stripped down Freetype, though this is targetted 
at a Pentium 4 platform.

Here is a snippet of the build script for Freetype:

----><----
tar xjf freetype-2.1.10.tar.bz2

...

# switch order of CFLAGS and INCLUDE_FLAGS, so that we can pass the 
'custom' include
# directory to override Freetype configuration
sed -i -r 's at FT_CFLAGS.*=.*@FT_CFLAGS  = $\(CFLAGS\) 
$\(INCLUDE_FLAGS\)@g' builds/freetype.mk

# Remove functionality from Freetype
rm -rf 
src/{bdf,cache,cff,cid,gzip,lzw,otvalid,pcf,pfr,psaux,pshinter,psnames,raster,tools,type1,type42,winfonts}

./configure --host=${TARGET} --prefix=/usr CFLAGS="-march=pentium4\ -g" 
CPPFLAGS="-I../custom"

make
----><----

and ftmodule.h:

----><----
FT_USE_MODULE(autofit_module_class)
FT_USE_MODULE(tt_driver_class)
#if 0
FT_USE_MODULE(t1_driver_class)
FT_USE_MODULE(cff_driver_class)
FT_USE_MODULE(t1cid_driver_class)
FT_USE_MODULE(pfr_driver_class)
FT_USE_MODULE(t42_driver_class)
FT_USE_MODULE(winfnt_driver_class)
FT_USE_MODULE(pcf_driver_class)
FT_USE_MODULE(psaux_module_class)
FT_USE_MODULE(psnames_module_class)
FT_USE_MODULE(pshinter_module_class)
FT_USE_MODULE(ft_raster1_renderer_class)
#endif
FT_USE_MODULE(sfnt_module_class)
FT_USE_MODULE(ft_smooth_renderer_class)
#if 0
FT_USE_MODULE(ft_smooth_lcd_renderer_class)
FT_USE_MODULE(ft_smooth_lcdv_renderer_class)
FT_USE_MODULE(otv_module_class)
FT_USE_MODULE(bdf_driver_class)
#endif
----><----



Regards,



Leon.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: leonw.vcf
Type: text/x-vcard
Size: 74 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20060211/826325af/leonw.vcf
-------------- next part --------------
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.15.3/254 - Release Date: 2/8/2006


More information about the cairo mailing list