lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Format of -dshow-available-fonts output


From: Urs Liska
Subject: Re: Format of -dshow-available-fonts output
Date: Wed, 25 Jul 2018 20:13:36 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0



Am 25.07.2018 um 17:10 schrieb Torsten Hämmerle:
Urs Liska-3 wrote
OK, I now see, there is also a reference to "ignore spaces" somewhere in 
the verbose log output.
I rather suspect (that's a Pango issue) that the font name specified in
LilyPond is tweaked (ignore case and spaces) in order to find the
corresponding font file and then, font strings are extracted from the font
file (see below).


Urs Liska-3 wrote
Then why is LilyPond (in the output of -dshow-available-fots) reporting 
"BoldItalic" and not "Bold Italic"?
The funny thing is: "my" LilyPonds (Linux and Windows) don't report
BoldItalic for TeX Gyre Adventor, but actually Bold Italic.

In other cases, however, LilyPond reports BoldItalic.

Which is what I had initially observed when people showed their results on https://github.com/wbsoft/frescobaldi/pull/1075: different results for different people. Originally I had thought it was related to Qt's reporting of fonts, but by now I have the suspicion that it's related to LilyPond's fontconfig configuration.


When looking into the TFF Names of FontForge, there seems to be a connexion
between string ID "Styles (SubFamily)" and the LilyPond output:

*TeX Gyre Adventor*
Styles (SubFamily): "Bold Italic"
LilyPond reports: TeX Gyre Adventor:style=Bold Italic

<http://lilypond.1069038.n5.nabble.com/file/t3887/adventor-font-info.png> 

*Century Schoolbook L*
Styles (SubFamily): BoldItalic
LilyPond reports: Century Schoolbook L:style=BoldItalic

So, LilyPond just reports the "Styles (SubFamily)" string content of the
font file: sometimes, it's "Bold Italic", sometimes it's "BoldItalic".

There may also be a "Preferred Styles" string ID.
In this case (if there they differ from "Styles (SubFamily)"), these strings
will be reported separated by spaces.

If there are Styles strings in more than one language (most of the times,
it's only English (US)), these strings also will be enumerated separated by
comma.

Family and Preferred Family may also be both reported by LilyPond (separated
by comma), as e.g. if a font comes in different weights etc., e.g.

Preferred Family "Bodoni MT", Families "Bodoni MT", "Bodoni MT Black",
"Bodoni MT Condensed", etc.


*All in all:* Could you check your TeX Gyre Adventor FontForge TTF Names
Styles string? Does it say BoldItalic or Bold Italic?

I've now found out that /usr/share/fonts/X11/Type1/qagbi.pfb actually is a link to /usr/share/texmf/fonts/type1/public/tex-gyre/qagbi.pfb,
so while Debian finds the OpenType version and LilyPond the Type1 version of the font which is installed by the same package.

Opening the Type1 font with FontForge shows the following TTF entries:

  • Family "TeXGyreAdventor"
  • Styles (SubFamily) "BoldItalic"
  • Fullname "TeXGyreAdventor-BoldItalic"

while the TTF entries for the OpenType versions (now expectedly" expose the familiar spaces throughout.

May these irregularities be caused by the font files themselves? 

It looks like it, and the confusion comes from the fact that LilyPond looks for the Type1 fonts and Debian for the OpenType flavour.
And additionally confusing is the fact that *three* of these TeX Gyre fonts are additionally installed in LilyPond's own font directory, in the OpenType variant.

Therefore this works:
      \override TextScript.font-name = "TeX Gyre Schola"
      \override TextScript.font-features = #'("onum")

but this not:
      \override TextScript.font-name = "TeX Gyre Adventor"
      \override TextScript.font-features = #'("onum")

because for the first case the OpenType font is used from LilyPond's own directory (so I assume this is somehow prepended to the search tree) while in the second case the system-installed Type1 font is used. This is also consistent with the fact that LilyPond reports both TeX Gyre Schola and TeXGyreSchola as available fonts, but only TeXGyreAdventor and not TeX Gyre Adventor.

The OpenType versions of both fonts that are installed as system fonts are never used by LilyPond.

So in the end this seems to boil down to two basic questions:

a)
is it possible or desirable to add the directories below /usr/share/texmf/fonts to LilyPond's fontconfig search path (i.e. a feature request/bug report)?

b)
how can I deal with the problem that in some cases (in Type1 fonts?) LilyPond reports "BoldItalic" but needs itself to use "Bold Italic" to access the style?
  • Spliting styles with camel case is not an option because there are also SemiBold styles that have to be kept together, and who knows which fonts also make use of this "feature"?
  • Treating "BoldItalic" specially seems my best bet so far - but this smells already now - just a matter of time until someone finds another corner case where either another style name must be separated or where "BoldItalic" is actually the intended style name ...
Best
Urs

reply via email to

[Prev in Thread] Current Thread [Next in Thread]