freetype-devel
[Top][All Lists]
Advanced

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

[Devel] patch: check bdf properties WEIGHT_NAME and SLANT case insensiti


From: Mike FABIAN
Subject: [Devel] patch: check bdf properties WEIGHT_NAME and SLANT case insensitively
Date: Wed, 27 Aug 2003 02:58:08 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Rational FORTRAN, linux)

Most bitmap fonts contain the bdf properties WEIGHT_NAME and SLANT
with an upper case first letter like this:

    WEIGHT_NAME "Bold"
    SLANT "I"

But there are quite a few which have these properties all in lower
case like this:

    WEIGHT_NAME "bold"
    SLANT "i"

As freetype checks only for upper case first letters, the weights andd
style of such fonts cannot be properly distinguished by fontconfig,
for example:

    address@hidden:~$ fc-list "etl fixed:foundry=etl:pixelsize=16" family style 
weight foundry file
    /usr/X11R6/lib/X11/fonts/misc/lt1-16b-etl.pcf.gz: ETL 
fixed:style=Regular:weight=100:foundry=ETL
    /usr/X11R6/lib/X11/fonts/misc/lt1-16bi-etl.pcf.gz: ETL 
fixed:style=Regular:weight=100:foundry=ETL
    /usr/X11R6/lib/X11/fonts/misc/lt1-16-etl.pcf.gz: ETL 
Fixed:style=Regular:weight=100:foundry=ETL
    /usr/X11R6/lib/X11/fonts/misc/lt1-16i-etl.pcf.gz: ETL 
fixed:style=Regular:weight=100:foundry=ETL
    address@hidden:~$ 

All fonts above are listed with "style=Regular:weight=100", i.e. they
are identical as far as fontconfig is concerned and when trying to
select such a font one gets a rather random result.

It is probably better if freetype checked this case insensitively.
The attached patch does this and after applying the patch and calling
'fc-cache' the same fc-list command returns:

    address@hidden:~$ fc-list "etl fixed:foundry=etl:pixelsize=16" family style 
weight foundry file
    /usr/X11R6/lib/X11/fonts/misc/lt1-16i-etl.pcf.gz: ETL 
fixed:style=Italic:weight=100:foundry=ETL
    /usr/X11R6/lib/X11/fonts/misc/lt1-16-etl.pcf.gz: ETL 
Fixed:style=Regular:weight=100:foundry=ETL
    /usr/X11R6/lib/X11/fonts/misc/lt1-16b-etl.pcf.gz: ETL 
fixed:style=Bold:weight=200:foundry=ETL
    /usr/X11R6/lib/X11/fonts/misc/lt1-16bi-etl.pcf.gz: ETL fixed:style=Bold 
Italic:weight=200:foundry=ETL
    address@hidden:~$ 

which is more useful.

Attachment: freetype2-bitmap-style.patch
Description: Text Data

-- 
Mike Fabian   <address@hidden>   http://www.suse.de/~mfabian
睡眠不足はいい仕事の敵だ。

reply via email to

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