Alex Rivera | Logout

Emacs: Font setup for displaying unicode characters in OSX

Asked 2012-06-06T00:00:03.607
9

I'm trying to display special unicode characters, in particular the mathematical operator in emacs. Specifically:

             position: 283 of 317 (89%), column: 0
            character:  (displayed as ) (codepoint 120046, #o352356, #x1d4ee)
    preferred charset: unicode (Unicode (ISO10646))
code point in charset: 0x1D4EE
               syntax: w    which means: word
             category: .:Base, L:Left-to-right (strong)
          buffer code: #xF0 #x9D #x93 #xAE
            file code: #xF0 #x9D #x93 #xAE
               (encoded by coding system utf-8-unix)
              display: no font available
         Unicode data:
                 Name: MATHEMATICAL BOLD SCRIPT SMALL E
             Category: Letter, Lowercase
      Combining class: Ll
        Bidi category: Ll
        Decomposition: font e

Character code properties: customize what to show
  name: MATHEMATICAL BOLD SCRIPT SMALL E
  general-category: Ll (Letter, Lowercase)
  decomposition: (font 101) (font 'e')

There are text properties here:
  fontified            t

I'm using GNU Emacs 24 a recent nightly binary. The text above displays fine on my browser and in TextEdit however, the special characters come up empty when viewed in emacs.

I read this from an old Emacs 22 manual: "A fontset does not necessarily specify a font for all character codes. If a fontset specifies no font for a certain character, or if it specifies a font that does not exist on your system, then it cannot display that character. It will display an empty box instead." - This is the exact behavior I am observing

It seems I may need to build a fontset to be able to display such arbitrary characters (starting with the Xdefaults or Xresources files).

How can I identify which font families I will need to include in the fontset to display Math operators (most online examples refer to languages li

Edit
Report

1 Answer

3

The function set-fontset-font may be used to specify which font to use for any range of characters; e.g.,

(set-fontset-font t '(#x1d4ee . #x1d4ee) (font-spec :family "FreeSerif"))
answered 2012-06-06T09:35:31.080

Your Answer