freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] TODO


From: Detlef Würkner
Subject: Re: [Devel] TODO
Date: Sun, 15 Jun 2003 11:39:27 +0200

address@hidden (Werner LEMBERG) wrote:

> A longer time ago Detlef asked the following:
> 
> > * Find out which type of available bitmap sizes to use:
> >   The width == height approach of the PCF driver or the width !=
> >   height approach of the BDF driver. Then implement the same
> >   behaviour in both drivers and, if possible, the FNT driver.
> 
> Is this still an issue?  Since David is quite silent now I want to
> fix such buglets to make a new release soon.

In the meantime I'm using my own modified PCF and BDF font drivers just
to make sure all bitmap-only drivers report their available sizes in
pixels, width*height...

IIRC there currently exist the following FreeType2 font drivers that
support (embedded) bitmaps and their behaviour is as follows.
Please correct me if I'm wrong:

driver |truetype|bdf   |pcf   |winfnt 
-------+--------+------+------+------
units  |ppi     |pixels|pixels|pixels
reports|Y*Y     |Y*Y   |Y*Y   |X*Y

ppi means pixels per inch (or something similar). pixels means the
character bounding box in pixels. X*Y means width*height of the bounding
box, Y*Y means that the width is lost, overwritten by the height (which
matters if you want to use the width as pixel width of a fixed-width
bitmap font, for proportional fonts this is not very important).

One of the latest patches did change the bdf driver:

2003-04-25  Werner Lemberg  <address@hidden>
        * src/bdf/bdfdrivr.c (BDF_Face_Init): Set pixel width and height
        similar to the PCF driver.

Before this patch BDF reported X*Y, now it reports Y*Y.

IMHO its not possible to change the winfnt driver to ppi instead of
pixels since there is no resolution info in the fnt files? Also there
exist fnt/fon files with multiple fonts with the same height but
different width. The output of a font listing tool:

----8<----
Font file: WINC:WINDOWS/FONTS/APP850.FON
Font type: winfonts
There is 1 face in this file.
   type: fixed size
direction: horizontal
fixed width: yes
glyph names: no
Terminal Regular
fixed size
   0: height 6, width 4
   1: height 12, width 5
   2: height 8, width 6
   3: height 12, width 7
   4: height 18, width 10
   5: height 16, width 12
   6: height 8, width 8
   7: height 12, width 8
----8<----

But it would be possible to change bdf and pcf drivers to behave like the
winfnt driver.

If the truetype driver uses ppi or pixels, quadratic or not, is currently
not very important since the normal usage of it is to specify the DPI for
scalable fonts and it falls back to builtin bitmaps if possible. In
future when FreeType2 will support bitmap-only truetype fonts it may be
an issues how the driver reports the bitmap sizes.

Ciao, Detlef
-- 
_ // address@hidden
\X/  Detlef Wuerkner, Langgoens/Germany



reply via email to

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