4

I've renamed this to reflect what I've learned. The details below track the issue.

ORIGINAL POST:

I'm trying to install a set of OpenType Helvetica fonts. The font installation is failing because the "Thin" fonts are described in the font properties as "Light", triggering a "this font is already installed on your system" error.

  1. When I open either font in KFontView, the font name is "Helvetica, Light".
  2. When I click on File Properties and go to the "Information" tag, the "Font.Weight" is "Light" for both fonts.
  3. When I open up the fonts in FontForge, the Thin font says "Thin" and the Light font says "Light".
  4. When I save the thin font as an sfd file from FontForge and open it in Kate, the string "Light" can't be found.
  5. When I open up the thin font binary (oft) in Kate the string "Light" can't be found.

I'm pretty sure I want to change the font.weight property of the Thin files to be "Thin" so that a) I can install them and b) their metadata will be correct. But for the life of me I can't figure out where the font properties on the properties dialog are even stored; much less how to change them.

The only potential solution I've come up with so far (and I haven't tried it) is to install the Thin fonts, go into the font-config database to correct the names, and then install the Light fonts. Aside from being a PITA and presumably losing my changes if I have to reinstall the fonts, this just seems like a Bad Idea.

I'm happy to provide more information as requested.

REVISION (27 JAN 2010)

Additional information:

  1. This is strictly a Qt or KDE issue. Moving the fonts into /usr/local/share/fonts and then calling "fc-cache" installs the fonts just fine. These fonts still don't appear in the KDE Font Installer, however.

  2. Looking (lightly) at the source code, the font metadata that is messing up KDE is possibly stored in the UDS. There are too many generic terms for Google to be much help; so I'm not sure if the UDS is owned by the filesystem (ext3), the Qt toolkit, or (not likely) by KDE.

  3. KMail treats fonts like MS Office on Windows. It hides all but the font family from the user and expects to find just bold, italic, and bold italic styles. It's not much use for testing this issue.

  4. OpenOffice is better in that it shows the font families in the toolbar but shows all the styles in the text properties dialog. Unfortunately this code appears to be buggy; changing the style to anything other than the basic bold and italic didn't work.

  5. Scribus treats fonts properly. After running fc-cache Scribus worked perfectly.

2 Answers 2

2

It sounds very much like an error in Qt/KDE and should certainly report it:

https://help.ubuntu.com/community/ReportingBugs

https://bugs.kde.org/

Otherwise, nothing you try is going to help if the Qt font indexer has a problem with this font. Make sure to include details and steps to reproduce.

1
0

For anyone having a similar issue—I had it with Candara Light, which KDE kept insisting was Candara Regular—open the font in FontForge and make sure that the font's OS/2 Weight Class has the correct setting. (Detailed instructions are below.)

Note that internally, i.e. in the font file, this setting is a pure number. This would explain why the OP couldn't find the string 'Light' anywhere in the file itself: what appears in the actual file is the number '300', not the string 'Light'.

More on Weight Class

That Weight Class is a number is documented e.g. here (look for usWeightClass). In principle it can be any integer between 1 and 999, but FontForge restricts it to be a multiple of 100. According to both FontForge and the linked document, the correspondences between these numbers and verbal descriptors ('Light', 'Regular', and so on) are as follows:

100 Thin
200 Extra-Light
300 Light
400 Regular
500 Medium
600 Semi-Bold
700 Bold
800 Extra-Bold
900 Black

(The linked document also includes 950 Extra Black.)

It seems that the verbal descriptor is added by FontForge for user convenience.

The following fact is an additional confirmation that this setting is internally a pure number: if the same font is opened in a different font manager, what is shown is just the number, without the verbal descriptor. For example, open the same font in the Typograph font manager. (I'm running this under wine; Typograph is a commercial product, but you can download it and use certain features—like the ones I'm about to describe—even without buying it.) Right-click on the font, select Properties, select the tab called Metric, and look under 'Windows metric data'. There will be an entry called 'WeightClass'. This will be a pure number, the same number as the number that appears in FontForge under OS/2 Weight Class.

How to change theOS/2 Weight Class in FontForge

Open the font in FontForge. In FontForge's menu bar, select Element, then Font Info… In the window that opens, on the left, select OS/2. In the main area, make sure the Misc. tab is selected, and look at the Weight Class field. Change it as necessary, press OK at the bottom of the window, and then generate (not save, generate) the font anew. (In other words, in FontForge's menu bar, select File, and then Generate Fonts…)

In my case, Weight Class was originally set to 400 Regular. But then I changed it to 300 Light, and this fixed the problem for me.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .