freetype-devel
[Top][All Lists]
Advanced

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

[Devel] FreeType gzip support completed


From: David Turner
Subject: [Devel] FreeType gzip support completed
Date: Thu, 31 Oct 2002 23:28:50 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826

Hello,

  I'm happy to announce that FreeType's support for gzip-compressed
  streams is now completed. Currently, this is visible in two ways:

   - the file <freetype/ftgzip.h> (or FT_GZIP_H) provides a new API,
     named "FT_Stream_OpenGzip" that can be used to "embed" an
     existing compressed gzip stream.

     it can be called manually by the application when needed.
     please refer to the documentation comment in the public
     header.

   - the PCF driver was modified to automatically detect
     gzip-compressed streams when it wasn't possible to "read"
     the PCF header correctly. This is automatic and transparent,
     and applications don't need to do anything special to
     benefit from it.

  It is possible to change FreeType to transparently support
  gzipped-compressed fonts of any format, but I've not followed this
  route for now, since I don't want to encourage people to make
  stupid choices (e.g. support gzip-compressed TrueType/Type 1 fonts
  for example)

  The implementation is pretty basic (it simply uses a small buffer,
  and resets the compression completely as soon as a backwards seek
  is needed). As basic as it seems, it works extremely well and
  with little memory footprint.

  The new code is in "src/gzip/ftgzip.c". It is a complete rewrite
  that doesn't contain a single line from Juliusz's previous patch,
  but thanks to him for being a strong inspiration for the new
  code :-)

  By the way, I have copied some of the sources of zlib in order
  to not have nasty library dependency issues for program linking
  with FreeType. Even if this is easy to solve on Unix, this can
  be a hell on Windows and many other platforms.

  As a consequence, the new "ftgzip" component is about 12-16 Kb
  of ix86 code. It is of course disabled with a new configuration
  macro named FT_CONFIG_OPTION_USE_ZLIB

  Enjoy, and please report any problems :-)

- David Turner
- The FreeType Project  (www.freetype.org)




reply via email to

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