freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] lightweight freetype?


From: Werner LEMBERG
Subject: Re: [Devel] lightweight freetype?
Date: Thu, 15 Aug 2002 08:43:56 +0200 (CEST)

> 
> - monochrome rendering only (1 bit per pixel) i.e. no antialiasing
> - support for truetype and ps fonts only
> - no hinting and such, since I only want quite big fonts
> 
> I also require that the library have a very small footprint.  1291 KB
> is much too big :)  Reducing FreeType to the above features would
> reduce the footprint, I presume.
> 
> So... does anyone have any pointers for me on how I should go about
> this?  Or does someone have something like this already?  The source
> is quite large and the documentation is quite small :-)
> 
> So far, unless I'm seriously mistaken, it looks like I won't need the
> truetype interpreter since I don't want any hinting.  Same for the
> autohinter and ps hinter.  Also I can leave out some of the font
> format modules since I don't want them.  And I can remove the
> antialiasing code.  Anything else?

In ftmodule.h, simply comment out the modules you don't need (have a
look into modules.txt for the dependencies), then remove the unused
driver subdirectories.  For this suite of drivers:

  psaux_module_class
  psnames_module_class
  pshinter_module_class
  ft_raster1_renderer_class
  sfnt_module_class
  tt_driver_class
  t1_driver_class

plus the `base' and `cache' (the former directory is always needed) I
get a 217kByte libfreetype.a (compiled with `gcc -O2' on my Linux
box).  Removing the `cache' module saves another 15kByte, but I don't
recommend that except that you have already a cache.

Playing around with the options in ftoption.h you can reduce the
library size further by about 20kByte (e.g. by disabling various TT
cmap formats or the PS hinter).  This might be useful if you know in
advance which fonts you will render.


    Werner



reply via email to

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