[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] Compressed PCF fonts
From: |
David Turner |
Subject: |
Re: [Devel] Compressed PCF fonts |
Date: |
Mon, 04 Feb 2002 19:00:26 +0100 |
Hello Francesco,
Francesco Zappa Nardelli a écrit :
>
> KP> should FreeType have the ability to load these fonts directly?
>
> Hum... FreeType must keep the whole decompressed font file into the
> memory, because the PCF driver gets at random positions into the font
> file (and decompressing the font to a temporary file is not an
> option). This will lead to a bigger memory footprint, even if it
> saves space on disk.
>
I believe that the XFree86 PCF driver doesn't do that. It always
decodes data on-demand from the compressed file, be it tables,
properties or glyph data.
It works by "rewinding" the stream each time, then "skipping"
(while decompressing), until it finds the data the it wants.
This is possible because the data on the file is organized in
a certain way. However, it means a rewind + decompression on
each glyph access..
I don't know about the performance, but a caching scheme should
be used anyway..
The FreeType PCF driver could mimic this behaviour too (and I
believe it could also include its own LZ77 decompressor), but
we're speaking of a complete rewrite here..
Another alternative is to convert everything to a much simpler
format, like SFNT-based bitmap files, which are already
supported by FreeType efficiently
(and that can hold several pixel sizes in a single file, instead
of having a ton of compressed file, one per size, which basically
means that you'll waste some room in your file system anyway..)
> Moreover, if we work with compressed (PCF and BDF) fonts, I do not
> think that improving the BDF driver is an useful thing.
>
I don't really see any benefit in parsing BDF font files in real-time,
even less in decompressing and parsing them in real time.. While
we're at it, why not use XML-based font formats :o)
> Any comment?
>
> Implementing compressed streams in FreeType should be quite easy using
> zlib (once somebody figures out how things work).
>
Yep, I think so..
Regards,
- David
- [Devel] Compressed PCF fonts, Keith Packard, 2002/02/01
- Re: [Devel] Compressed PCF fonts, Werner LEMBERG, 2002/02/02
- Re: [Devel] Compressed PCF fonts, Francesco Zappa Nardelli, 2002/02/04
- Re: [Devel] Compressed PCF fonts, Francesco Zappa Nardelli, 2002/02/04
- Re: [Devel] Compressed PCF fonts, Keith Packard, 2002/02/04
- Re: [Devel] Compressed PCF fonts,
David Turner <=
- Re: [Devel] Compressed PCF fonts, Keith Packard, 2002/02/04
- Re: [Devel] Compressed PCF fonts, David Turner, 2002/02/04
- Re: [Devel] Compressed PCF fonts, Keith Packard, 2002/02/04
- [Devel] PCF bitmap width fix (was: Compressed PCF fonts), Detlef Würkner, 2002/02/05
- [Devel] PCF bitmap height again (was: PCF bitmap width fix), Detlef Würkner, 2002/02/05
- Re: [Devel] PCF bitmap height again (was: PCF bitmap width fix), George Williams, 2002/02/05
- [Devel] Looking for test font..., George Williams, 2002/02/06
- Re: [Devel] Looking for test font..., Werner LEMBERG, 2002/02/07
- [Devel] Proportional font, Xuqiang Bai, 2002/02/07
- Re: [Devel] Looking for test font..., George Williams, 2002/02/07