Comment 103 for bug 105900

Revision history for this message
In , Mfabian (mfabian) wrote :

The reason why this problem doesn’t show up in Gnome applications
is apparently the following code in pangofc-fontmap.c niear line 1918
in function pango_fc_family_list_faces:

       if (weight <= FC_WEIGHT_MEDIUM)
  {
    if (slant == FC_SLANT_ROMAN)
      {
        has_face[REGULAR] = TRUE;
        style = "Regular";
      }
    else
      {
        has_face[ITALIC] = TRUE;
        style = "Italic";
      }
  }
       else
  {
    if (slant == FC_SLANT_ROMAN)
      {
        has_face[BOLD] = TRUE;
        style = "Bold";
      }
    else
      {
        has_face[BOLD_ITALIC] = TRUE;
        style = "Bold Italic";
      }
  }

i.e. the 4 basic faces get special treatment, probably because Pango
wants to translate them on its own using gettext.

A font which had a more exotic style, say "Condensed" translated
in many languages would probably show the problem reportedd
here in Gnome as well.

(Qt has problems with fonts with many styles anyway, see bug #369466
and bug 330658 for example).