I like the Fantasque Sans Mono font, and they have a style set (ss01) which has a more "traditional" design for the letter k, but I don't know how to select it in Emacs or in urxvt.


You should already know the basics:

  • install the font and
  • use fc-list to see that it shows the font, and
  • use the family name shown in the output of fc-list in your X resources.

The question is about stylistic sets, i.e., a feature of the fonts:

OS2Vendor: 'PfEd'
Lookup: 1 0 0 "'ss01' Stylistic Set 1 - No loop k" { "'ss01' Stylistic Set 1 - No loop k-1" ("noloop") } ['ss01' ('DFLT' <'dflt' > 'cyrl' <'dflt' > 'grek' <'dflt' > 'latn' <'dflt' > ) ]
Lookup: 1 0 0 "'ss02' Stylistic Set 2 - Flat base i" { } ['ss02' ('DFLT' <'dflt' > 'cyrl' <'dflt' > 'grek' <'dflt' > 'latn' <'dflt' > ) ]
Lookup: 1 0 0 "'ss03' Stylistic Set 3 - No base serif i" { } ['ss03' ('DFLT' <'dflt' > 'cyrl' <'dflt' > 'grek' <'dflt' > 'latn' <'dflt' > ) ]
MarkAttachClasses: 1

The stylistic-set feature is discussed in Using OpenType Features on the Web, e.g., making variations of fonts using the stylistic sets. Without some work, you won't get these variations since fontconfig has no capability for selecting stylistic-sets. You would have to modify the scripts in this font to use that as the default, and (using the modified scripts) generate ".ttf" files using that stylistic-set.

Further reading:

| improve this answer | |
  • So the short answer is that it cannot be done? (except by compiling new TTF files, of course) – Tobia Nov 21 '16 at 14:20
  • yes, that's what I meant by generate – Thomas Dickey Nov 21 '16 at 21:21

You should edit ~/.Xresources. For example:

Emacs.font: DejaVu Sans Mono 10
URxvt.font: xft:DejaVu Sans Mono:size=10

Remember to reload that configuration file with the following command:

xrdb -merge ~/.Xresources

Some links you may find useful:

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.