programmingfonts icon indicating copy to clipboard operation
programmingfonts copied to clipboard

Request: support font variants

Open latortuga opened this issue 4 years ago • 2 comments

Hi there, I was linked to this today and it's really neat!

I wondered if you might add support for variants of these fonts. For example, my chosen font is Droid Sans Mono, and it has a couple variations (slashed zero, dotted zero) which aren't in the list. I imagine other fonts have a similar issue.

Thanks for the cool project!

latortuga avatar Jan 25 '21 21:01 latortuga

There are a lot of ways fonts can have these variants. Sometimes they give out different font files, sometimes someone make a fork just to tweak some details, and sometimes there are Open Type options you can use. I think I might try adding some buttons to toggle common Open Type options like ligatures and slashed/dotted zeroes.

braver avatar Jan 29 '21 06:01 braver

I experimented a bit here. A font like Input has dotted zeroes in its default download, but can be switched to slashed via font-feature-settings: 'zero';. So the data we have on fonts needs to be changed as well: some fonts have both styles of zero. And of course ligatures can be switched off as well. All of this is assuming your editor supports settings like font-feature-settings. Sublime Text (at least in v4), Atom and VS Code do, but what about IDE's and terminals etc.? That's one reason some fonts, again take Input for example, have "download configurators" where you select the variants you want beforehand so you can get them everywhere. And why sometimes a font is forked simply to change the style of the zero.

So right now, I'm focused on what you can expect from a font out of the box on most systems where you want to use them. I like the idea of gathering more information about styles available in fonts, and the settings you might toggle to get what you want. But that similar to all the many weights that some fonts come with. It would require gathering a lot of data, and exposing the options in the UI at programmingfonts.org in some way. It's work I'm sure would be cool to accomplish at some point, it would expand the focus of the website, but it's also not the kind of work I enjoy doing the most right now. Maybe some rainy day.

braver avatar Jan 31 '21 16:01 braver