How do I use a "condensed" font?

Hi All,

Due to space constraints I'd like to use the "condensed" version of "DejaVu Sans".
In the macOS FontBook it has "condensed" listed as one of its styles.

I can't figure out how to load it with (make-object font% ...).
Any hints?

The reason I need it? I am working on some playing cards, and the tens
need two characters to write 10. Commercial playing cards solve the
problem by writing the 10 with a condensed font.

image

Does using "DejaVu Sans,Condensed" as a face name work?

A "face" name for font% is parsed by Pango, and I think Pango recognizes "Condensed" like that.

2 Likes

Thanks, that works as intended.

I found a description of the format here:

2 Likes

Does it make sense to add some of that to our documentation? I've also had questions along these lines in the past and still couldn't remember to be able to offer help here.

2 Likes

I think both @soegaard's link and a mention of how the face name is
parsed would be great additions.

2 Likes