Am 17.07.2018 um 19:43 schrieb Aaron
Hill:
On
2018-07-17 08:06, Urs Liska wrote:
If I have a family of "Libre Baskerville
Condensed" and the detail
string "Libre Baskerville Condensed:style=Italic"
this probably means the italic variant of that font. And in fact
there
are three instances of that font with three different styles.
And "Monotype Modern Std,Modern MT Std
Condensed:style=Condensed,Regular"
Is it possible that the styles are listed in reverse order?
FontConfig should be deterministic, but I do not believe there is
any attempt at sorting. On my system, consider the output from
fc-list: (I have very few fonts installed)
/usr/share/fonts/truetype/dejavu/DejaVuSerif-Bold.ttf: DejaVu
Serif:style=Bold
/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf: DejaVu Sans
Mono:style=Book
/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf: DejaVu
Sans:style=Book
/usr/share/fonts/truetype/AlexBrush-Regular.ttf: Alex
Brush:style=Regular
/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf: DejaVu
Sans:style=Bold
/usr/share/fonts/opentype/KaushanScript-Regular.otf: Kaushan
Script:style=Regular
/usr/share/fonts/truetype/dejavu/DejaVuSansMono-Bold.ttf: DejaVu
Sans Mono:style=Bold
/usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf: DejaVu
Serif:style=Book
The order is consistent from run to run, however it is not sorted
by anything obvious to me. You should probably not rely on
anything in the ordering of entries and/or styles. As such, it
would be necessary to merge the results and sort them for display
to the user.
Well, it seems apart from the fact that
some font files seem to be
duplicated on my system it seems that many font families are not
reported in one step but in multiple steps that have to be
merged
manually.
I'll do some tests and may report back.
I suspect there might be other properties that are there to
disambiguate the results, for instance code page or language
support. You could try running `fc-list : family familylang
fontversion` for more details. If you really want all the
details, just use the verbose option: `fc-list -v`; but be
prepared for a LOT of data. ;)
Of course I can use the fontconfig commands to investigate the
matter, but in the end I'll have to take what LilyPond reports. I'm
a little bit disappointed that it doesn't tell me the filenames.
Further tests have shown that my initial impression of reversed
style/fontname matches was wrong. The number of items left and right
of the colon vary wildly, and my current conclusion is:
- Each entry covers exactly one font face (= font file)
- One or more names (left side) are synonymous
- One or more styles (right side) are synonymous as well
Take this example (the formatting is already the result of
parsing into Python objects:
EB Garamond
['EB Garamond', 'EB Garamond 08']
['08 Italic', 'Cursiva', 'kurzíva', 'kursiv', 'Πλάγια', 'Italic',
'Kursivoitu', 'Italique', 'Dőlt', 'Corsivo', 'Cursief', 'Kursywa',
'Itálico', 'Курсив', 'İtalik', 'Poševno', 'Etzana']
EB Garamond
['EB Garamond', 'EB Garamond 08']
['Standard', '08 Regular', 'Normal', 'obyčejné', 'Κανονικά',
'Regular', 'Normaali', 'Normál', 'Normale', 'Standaard',
'Normalny', 'Обычный', 'Normálne', 'Navadno', 'Arrunta']
EB Garamond SC
['EB Garamond SC', 'EB Garamond SC 08']
['Standard', '08 Regular', 'Normal', 'obyčejné', 'Κανονικά',
'Regular', 'Normaali', 'Normál', 'Normale', 'Standaard',
'Normalny', 'Обычный', 'Normálne', 'Navadno', 'Arrunta']
The plain string is the "font family".
The first Python list is the comma-separated first part of the
entry, the second list the comma-separated list following ":style="
I would read this as having two independent variants "EB Garamond"
and "EB Garamond SC" where both can be addressed with an alias "...
08".
EB Garamond is available in two styles: Italic and Regular, with
both styles having numerous aliases. The SC variant is only
available as Regular with numerous aliases.
Does this sound reasonable?
Urs
--
Aaron Hill
_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user
|