2

I want to change the appearance of my lozenge character.

I have tried running the following:

(set-fontset-font "fontset-default" ?◊ (font-spec :family "PragmataPro"))

However, if I type and ask Emacs to describe-char, I get the following:

             position: 38 of 74 (50%), column: 37
            character: ◊ (displayed as ◊) (codepoint 9674, #o22712, #x25ca)
              charset: unicode (Unicode (ISO10646))
code point in charset: 0x25CA
               script: symbol
               syntax: w    which means: word
             category: .:Base
             to input: type "C-x 8 RET 25ca" or "C-x 8 RET LOZENGE"
          buffer code: #xE2 #x97 #x8A
            file code: #xE2 #x97 #x8A (encoded by coding system utf-8)
              display: by this font (glyph code)
    xft:-CYEL-Iosevka-normal-normal-normal-*-18-*-*-*-*-0-iso10646-1 (#x9A5)

Character code properties: customize what to show
  name: LOZENGE
  general-category: So (Symbol, Other)
  decomposition: (9674) ('◊')

There are text properties here:
  fontified            t

As you can see, is still being rendered with Iosevka.

I have checked that PragmataPro works globally and that it makes the lozenge character appear different. Note also that the codepoint matches. To check that I'm using the ?◊ argument correctly I've also tried '(#x25ca . #x25ca).

If I ask describe-fontset for fontset-default I get this:

…
◊ (#x25CA)
-*-PragmataPro-*-*-*-*-*-*-*-*-*-*-*-*
…

So the fontspec itself appears to have been changed. Likewise for -*-*-*-*-*-*-*-*-*-*-*-*-fontset-default.

How do I get the altered symbol to render?

  • In general, any character can visually be replaced with one or more different characters using the buffer-display-table and those replacement characters can even be colorized (if so desired). Is that something that could suit your needs? Here is a link to an example: emacs.stackexchange.com/a/9627/2287 I have never played with a different font family though, so it may be necessary to experiment with that idea to know for sure .... – lawlist Sep 18 '19 at 1:37

Your Answer

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

Browse other questions tagged or ask your own question.