I want to get information about fonts (ttf or otf), like the family name and the style.
If possible, I don't want to install extra software like otfinfo
. Since fontconfig
is installed everywhere, a good option seems to be
fc-scan --format "%{family} %{style}\n" font.ttf
However, the output is
Bookman Old Style Cursiva,kurzíva,kursiv,Πλάγια,Italic,Kursivoitu,Italique,Dőlt,Corsivo,Cursief,Kursywa,Itálico,Курсив,İtalik,Poševno,Etzana
where the style is in all the different languages the font supports. How can I restrict the output of fc-scan
to the system language or English?
Desired output would be Bookman Old Style Italic
for the case above.
To get the font information in the system language, use