freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] limiting the heap memory used by a TrueType font


From: Werner LEMBERG
Subject: Re: [ft-devel] limiting the heap memory used by a TrueType font
Date: Sun, 30 Dec 2007 08:39:38 +0100 (CET)

Sorry for the late reply.

> [...] what I have done is essential for the platform I am working
> on, and may well be essential for other low-RAM devices.  In my
> current work we can use large TrueType fonts (~2BM Japanese fonts,
> for example) successfully with my changes; we cannot use them
> without my changes.  Also, my CMAP code is entirely non-invasive; it
> doesn't change the FreeType code or API at all but is an optional
> add-on.  (You call a function that gets the memory offset of the
> charmap, stores it, then unloads the CMAP table; then you use a
> replacement function instead of FT_Get_Char_Index.)

Good.

> Note also that what I propose is optional; and can be tuned to
> affect CMAP, LOCA, etc., tables above a certain size only; and if
> made a run-time option rather than a compile-time option (I
> mentioned this in my first message), can be made to work only for
> non-memory-mapped files.

Sounds good, too.

> Here is a working and tested alternative version of
> tt_face_get_location; in this code, the pointer
> face->glyph_locations has been replaced by an offset
> face->glyph_locations_offset. [...]
> 
> In conclusion I believe that what I have done is not only useful -
> in fact, essential - to my current project but of potential use to
> FreeType users on other devices with limited heap memory.

Graham, can you provide patches?  Personally, I favour a compile-time
solution (either you need it, or you don't need it), but in case you
think it is essential to make it a run-time option, I don't object.


    Werner




reply via email to

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