# How do I use a "condensed" font?

**URL:** <https://racket.discourse.group/t/how-do-i-use-a-condensed-font/1804>\
**Category:** Questions & Answers\
**Created:** [March 12, 2023, 5:09pm UTC](https://racket.discourse.group/t/how-do-i-use-a-condensed-font/1804 "2023-03-12T17:09:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![soegaard](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/soegaard/32/19_2.png) [@soegaard](https://racket.discourse.group/u/soegaard)\
**Post date:** [March 12, 2023, 5:09pm UTC](https://racket.discourse.group/t/how-do-i-use-a-condensed-font/1804/1 "2023-03-12T17:09:58Z")

</div>

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.

 ![image](https://global.discourse-cdn.com/free1/uploads/racket/original/2X/0/090bcbd3b937205657b8071cd4820ba8fbcb08fc.png)

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](https://global.discourse-cdn.com/free1/uploads/racket/original/2X/9/911fb7cc6c0b0328203d137e4b490b47af9d36f6.png)

![image](https://global.discourse-cdn.com/free1/uploads/racket/original/2X/f/f356bc2caa208966c4923507fd9320c648374183.jpeg)

---

<div class="post-metadata">

**Author:** ![mflatt](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/mflatt/32/6_2.png) [@mflatt](https://racket.discourse.group/u/mflatt)\
**Post date:** [March 12, 2023, 11:56pm UTC](https://racket.discourse.group/t/how-do-i-use-a-condensed-font/1804/2 "2023-03-12T23:56:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![soegaard](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/soegaard/32/19_2.png) [@soegaard](https://racket.discourse.group/u/soegaard)\
**Post date:** [March 13, 2023, 10:45am UTC](https://racket.discourse.group/t/how-do-i-use-a-condensed-font/1804/3 "2023-03-13T10:45:47Z")

</div>

Thanks, that works as intended.

I found a description of the format here:

> **[Pango.FontDescription.from\_string](https://docs.gtk.org/Pango/type_func.FontDescription.from_string.html)**
>
> Reference for Pango.FontDescription.from\_string

---

<div class="post-metadata">

**Author:** ![robby](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/robby/32/7_2.png) [@robby](https://racket.discourse.group/u/robby)\
**Post date:** [March 13, 2023, 2:44pm UTC](https://racket.discourse.group/t/how-do-i-use-a-condensed-font/1804/4 "2023-03-13T14:44:50Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![benknoble](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/benknoble/32/16_2.png) [@benknoble](https://racket.discourse.group/u/benknoble)\
**Post date:** [March 13, 2023, 5:11pm UTC](https://racket.discourse.group/t/how-do-i-use-a-condensed-font/1804/5 "2023-03-13T17:11:41Z")

</div>

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