Skip to main content
added 182 characters in body
Source Link
Jun Inoue
  • 225
  • 2
  • 7

Yikes. I had a fresh look at this after a good night's sleep, and it turns out I was wrong to say that setting the :fontset attribute doesn't work. My test code had a critical typo, and I also tried custom-theme-set-faces etc. in addition to set-face-attribute, and then mixed things up. Sorry for the confusion.

To set the record straight:

  • You can apply a fontset to a face by setting its :fontset attribute with set-face-attribute. The face will then use all fonts in the set as expected. EDIT: the values of :font, :family etc. override :fontset, so if you're modifying a pre-existing face like variable-pitch, be sure to adjust those other attributes as well.
  • However, you cannot set the :fontset attribute using custom-theme-set-faces or defface, which ignore that attribute.
  • The manual currently says in some places that you can pass in a fontset for the :font attribute or the font argument of set-face-font, but this is misleading at best: the fontset will be stripped of the "set" part and be treated as just an ASCII font.

I think the second bullet means that there's no way to enable/disable fontsets with themes, but someone more knowledgeable on themes will have to set me straight on this.

Yikes. I had a fresh look at this after a good night's sleep, and it turns out I was wrong to say that setting the :fontset attribute doesn't work. My test code had a critical typo, and I also tried custom-theme-set-faces etc. in addition to set-face-attribute, and then mixed things up. Sorry for the confusion.

To set the record straight:

  • You can apply a fontset to a face by setting its :fontset attribute with set-face-attribute. The face will then use all fonts in the set as expected.
  • However, you cannot set the :fontset attribute using custom-theme-set-faces or defface, which ignore that attribute.
  • The manual currently says in some places that you can pass in a fontset for the :font attribute or the font argument of set-face-font, but this is misleading at best: the fontset will be stripped of the "set" part and be treated as just an ASCII font.

I think the second bullet means that there's no way to enable/disable fontsets with themes, but someone more knowledgeable on themes will have to set me straight on this.

Yikes. I had a fresh look at this after a good night's sleep, and it turns out I was wrong to say that setting the :fontset attribute doesn't work. My test code had a critical typo, and I also tried custom-theme-set-faces etc. in addition to set-face-attribute, and then mixed things up. Sorry for the confusion.

To set the record straight:

  • You can apply a fontset to a face by setting its :fontset attribute with set-face-attribute. The face will then use all fonts in the set as expected. EDIT: the values of :font, :family etc. override :fontset, so if you're modifying a pre-existing face like variable-pitch, be sure to adjust those other attributes as well.
  • However, you cannot set the :fontset attribute using custom-theme-set-faces or defface, which ignore that attribute.
  • The manual currently says in some places that you can pass in a fontset for the :font attribute or the font argument of set-face-font, but this is misleading at best: the fontset will be stripped of the "set" part and be treated as just an ASCII font.

I think the second bullet means that there's no way to enable/disable fontsets with themes, but someone more knowledgeable on themes will have to set me straight on this.

Source Link
Jun Inoue
  • 225
  • 2
  • 7

Yikes. I had a fresh look at this after a good night's sleep, and it turns out I was wrong to say that setting the :fontset attribute doesn't work. My test code had a critical typo, and I also tried custom-theme-set-faces etc. in addition to set-face-attribute, and then mixed things up. Sorry for the confusion.

To set the record straight:

  • You can apply a fontset to a face by setting its :fontset attribute with set-face-attribute. The face will then use all fonts in the set as expected.
  • However, you cannot set the :fontset attribute using custom-theme-set-faces or defface, which ignore that attribute.
  • The manual currently says in some places that you can pass in a fontset for the :font attribute or the font argument of set-face-font, but this is misleading at best: the fontset will be stripped of the "set" part and be treated as just an ASCII font.

I think the second bullet means that there's no way to enable/disable fontsets with themes, but someone more knowledgeable on themes will have to set me straight on this.