Bug 82125 - Creates bogus 'bold' entries in fonts.scale
Creates bogus 'bold' entries in fonts.scale
Status: CLOSED RAWHIDE
Product: Red Hat Raw Hide
Classification: Retired
Component: ttmkfdir (Show other bugs)
1.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Yu Shao
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-01-17 16:37 EST by Enrico Scholz
Modified: 2008-05-01 11:38 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-01-19 18:51:15 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Enrico Scholz 2003-01-17 16:37:13 EST
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):

ttmkfdir-3.0.7-1
Comment 1 Yu Shao 2003-01-18 08:12:02 EST
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
robust.     

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 11:09:10 EST
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
available.

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 18:51:15 EST
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.