[Fontconfig] Styles, weights and slants

Simon Cozens simon at simon-cozens.org
Thu Nov 10 05:42:22 UTC 2016

I can't work out how to make FC select fonts with the kind of
granularity I need.

Suppose I have the Arno Pro family, which contains the following faces:

ArnoPro-Regular ArnoPro-Smbd ArnoPro-Bold
ArnoPro-Italic ArnoPro-SmbdItalic ArnoPro-BoldItalic

ArnoPro-Subhead ArnoPro-SmbdSubhead ArnoPro-BoldSubhead
ArnoPro-ItalicSubhead ArnoPro-SmbdItalicSubhead

ArnoPro-Caption ArnoPro-SmbdCaption ArnoPro-BoldCaption
ArnoPro-ItalicCaption ArnoPro-SmbdItalicCaption

ArnoPro-SmText ArnoPro-SmbdSmText ArnoPro-BoldSmText
ArnoPro-ItalicSmText ArnoPro-SmbdItalicSmText ArnoPro-BoldItalicSmText

ArnoPro-Display ArnoPro-SmbdDisplay ArnoPro-BoldDisplay ArnoPro-LightDisplay
ArnoPro-ItalicDisplay ArnoPro-SmbdItalicDisplay
ArnoPro-BoldItalicDisplay ArnoPro-LightItalicDisplay

This works:

$ fc-match 'Arno Pro:slant=Italic:weight=800'
ArnoPro-BoldItalic.otf: "Arno Pro" "Bold Italic"

This doesn't:

$ fc-match 'Arno Pro:slant=Italic:weight=200'
ArnoPro-BoldItalic.otf: "Arno Pro" "Bold Italic"

Is there a way to access the semibold here?

And then display styles are another problem.

This works:

$ fc-match 'Arno Pro:style=Caption'
ArnoPro-Caption.otf: "Arno Pro" "Caption"

This doesn't:

$ fc-match 'Arno Pro:style=Caption:weight=800'
ArnoPro-Caption.otf: "Arno Pro" "Caption"

Nor this:

$ fc-match 'Arno Pro:style=Caption:slant=Italic'
ArnoPro-Caption.otf: "Arno Pro" "Caption"

Is there a way to make this work?

More information about the Fontconfig mailing list