Bug 82125 - Creates bogus 'bold' entries in fonts.scale
Summary: Creates bogus 'bold' entries in fonts.scale
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: ttmkfdir
Version: 1.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Yu Shao
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2003-01-17 21:37 UTC by Enrico Scholz
Modified: 2008-05-01 15:38 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2003-01-19 23:51:15 UTC

Attachments (Terms of Use)

Description Enrico Scholz 2003-01-17 21:37:13 UTC
Description of problem:

'ttmkfdir' creates bold *and* medium entries for regular fonts:

## install e.g. ttfonts-ja
$ cp /usr/share/fonts/ja/TrueType/kochi-gothic.ttf .
$ ttmkfdir
$ cat fonts.scale
kochi-gothic.ttf -misc-Kochi Gothic-bold-r-normal--0-0-0-0-c-0-adobe-standard
kochi-gothic.ttf -misc-Kochi Gothic-medium-r-normal--0-0-0-0-c-0-adobe-standard

This seems to happens with any regular ttf font and is bad because application
which are trying to display bold fonts are using the medium style.

Version-Release number of selected component (if applicable):


Comment 1 Yu Shao 2003-01-18 13:12:02 UTC
Yeah, that is intented behavior, but right now, ttmkfdir will only do that for X
FreeType backend. 

The reason we do it this way is current FreeType backend still can not generate
bold and italic fonts, with those extra bogus entries, applications can be more

There was one old KDE bug(also in bugzilla, couldn't find it now) that if there
are no bold or italic entries, the corresponding bold or italic characters will
be unreadable. Not sure if the bug is still with KDE, but I think there are
other applictions still can not handle it.

Comment 2 Enrico Scholz 2003-01-18 16:09:10 UTC
This new behavior causes problems when both regular and bold fonts are
installed. E.g. when using M$ webfonts, I have arial-medium in arial.ttf and
arial-bold in arialbd.ttf. 'ttmkfdir' creates the following entries in fonts.scale:

| arial.ttf -monotype-Arial-medium-r-normal--0-0-0-0-p-0-ascii-0
| ...
| arial.ttf   -monotype-Arial-bold-r-normal--0-0-0-0-p-0-ascii-0
| arialbd.ttf -monotype-Arial-bold-r-normal--0-0-0-0-p-0-ascii-0

When having an application which wants to use 'arial-bold', xfs chooses the
first matching entry. In this case this is the regular font from arial.ttf and
the application will display the information non-boldly although a bold font is

I think that applications should be fixed which are not robust without
bold/italic fonts. On the first glance, omitting additional 'bold' entries seems
to prevent this problem but this does not work when 'arial.ttf' and
'arialbd.ttf' are in different directories.

Comment 3 Yu Shao 2003-01-19 23:51:15 UTC
Yeah, I thought about this before, but if there are fonts like those, I will
revert it. Thanks!

Note You need to log in before you can comment on or make changes to this bug.