Missing Subfamilies / Styles after Truetype Font Installation

Asked by valle

I tried to install some new truetype font on Ubuntu 7.10 Gutsy. Basic installation works without problem, but some subfamilies (aka styles: bold, italic, regular, book, light) are missing though they are installed. For example after installing the following 8 font files:

Chantilly-Bold.ttf
Chantilly-BoldItalic.ttf
Chantilly-Italic.ttf
Chantilly-Light.ttf
Chantilly-LightItalic.ttf
Chantilly-Medium.ttf
Chantilly-MediumItalic.ttf
Chantilly-Regular.ttf

I get the following results:

1.) gnome-font-viewer works for every file.
2.) nautilus fonts:/// shows only 4 subfamilies: fonts:///Chantilly, fonts:///Chantilly Bold, fonts:///Chantilly Bold Italic and fonts:///Chantilly Italic
3.) OpenOffice shows only Light, Italic, Bold and Bold-Italic in the font dialog
4.) OpenOffice seems to replace Light with Bold or Medium when actually drawing the font
5.) gnome-specimen list 10 instead of 8 subfamilies (I installed also ChantillySerif, ChantillyCd, etc)
6.) gnome-specimen displays/draws a light font when I selcect a bold or regular font
7.) etc.

Can anybody help? What do I have to do?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
valle
Solved:
Last query:
Last reply:
Revision history for this message
valle (simtec) said :
#1

I am not sure if this is a font, X-Window, Gnome or application issue? Does nobody have the same problem? Any help is welcome!

Revision history for this message
valle (simtec) said :
#2

It seems that I found a solution that partly solves my problem. My fonts have a "Preferred Family" and a "Preferred Subfamily" defined. With fontforge one can clear the preferred family and subfamily entry. After that my font shows up as separate fonts, e.g. ChantillySerial, ChantillySerial-Light, ChantillySerial-Medium, etc. Only ChantillySerial contains all 4 subfamillies (Regular, Italic, Bold, Bold-Italic) the other fonts contain only regular and italic.

The following link did help to understand the problem: http://forums.gentoo.org/viewtopic-t-566403.html

I used the following script (usage: ./script *.ttf) to clear the preferred entry.

<script>
#!/usr/bin/fontforge
# Clears all preferred values

i=1
while ( i<$argc )

  Open($argv[i])

  #Preferred Family
  SetTTFName(0x409,16,"")

  #Preferred Subfamily
  SetTTFName(0x409,17,"")

  Generate($argv[i]:r + ".ttf")
  i = i+1

endloop
</script>