adobe-fonts / source-code-pro

Monospaced font family for user interface and coding environments
https://adobe-fonts.github.io/source-code-pro/
SIL Open Font License 1.1
19.74k stars 1.62k forks source link

Variable width font #285

Open curiousdannii opened 2 years ago

curiousdannii commented 2 years ago

I was excited to see that Source Code Pro had a variable option, until I saw that it doesn't have support for variable widths. Any chance that support could be added?

(Or if anyone has suggestions for a similar narrow/condensed/ultra-condensed mono font I'd love to have them. Ideally 80% of the width of SCP or less.) Edit: I found Iosevka and am trying it out now. I'm not sure I like its letterforms quite as much as SCP though.

pauldhunt commented 2 years ago

hi @curiousdannii Source Sans was designed specifically for open source user interface designs and therefore features a semi narrow width. What widths would you like to see added to this project and for what purpose?

curiousdannii commented 2 years ago

Hi Paul, thanks for replying.

I'm working on a mobile Interactive Fiction interpreter, but it's essentially just a mobile console. The code it's running is somewhat width aware, but did not anticipate being run in such a small console, and so it prints over the top of itself. Using 14px SCP my phone can only fit 44 characters per line.

Screenshot using SCP

Switching to Iosevka increased that to 53. I dropped down to 13px and reduced padding a little, and now it fits 58 characters per line.

Screenshot using Iosevka

Iosevka started out having 10 times the file size, but after building a custom version it's down to 3 times the file size. The lower case g is one letterform I'm not as keen on. I'd probably prefer to switch back to SCP or have some other additional font options (I haven't found anything else comparable to Iosevka,) but I guess I'm happy enough with now as it is.

If it's infeasible or way out of scope you can just close this.

pauldhunt commented 2 years ago

Note for future reference: Iosevka glyph width = 500 units; extended styles glyph width = 600 units.