What Font does Notepad use to display e.g. Hebrew, when it claims to use Lucida Console but Lucida Console doesn't have those characters?

Courier New has the character \u05D0 hebrew letter aleph

some other fonts do too such as Miriam and David.

enter image description here

I can paste that into notepad

Lucida Console does not have the character. Character map shows that Lucida Console doesn't have the character.

Yet notepad displays it even when Lucida Console font is set

enter image description here

So what Font is notepad using?


Windows 7 has a technology called composite font

that is used to describe international font linking and fallback logic source

It allows you to have a virtual font linked from many fonts with limited ranges of character definitions.

Default composite font is called GlobalUserInterface and is located in file
C:\Windows\Fonts\GlobalUserInterface.CompositeFont.

You can use great BabelMap tool to play around and understand implementation of Unicode, Composite fonts and related things.

Also check Font Fallback subsection of Remarks section of this MSDN article to learn some interesting background how such a composite font is built and what are fallback rules.


Finding a font for character (based on the above information):

  1. In any plain text editor/viewer, display the file
    C:\Windows\Fonts\GlobalUserInterface.CompositeFont.
  2. In tag <FontFamily.FamilyMaps>, find definition range for your character.
  3. Search for tag FontFamilyMap containing your range in its Unicode attribute and get font (or list of fonts) given for that range (it is stored in attribute Target).
    Example: in case of character 05D0 the range found in file is 0590-05FF (Hebrew)
    and font substitutions are:
    "Segoe UI, Tahoma, Arial, Arial Unicode MS, Microsoft Sans Serif, Lucida Sans Unicode"

    1. If there was only single font, you have it. Otherwise, let's check the list in order: run BabelMap
    2. Navigate to given character
    3. Switch radio buttons from Composite Font to Single Font
      or alternatively: go to menu Fonts > Font Coverage... and press Calculate button
    4. Switch to fonts in order as they appear in step 3. First font having the glyph displayed is your font.

Note: there are 4 composite font files available, but I verified the right one for your case is GlobalUserInterface.CompositeFont.

This technique is reliable because by searching through the definitions you are doing the same as the Windows is doing.


miro's answer is brilliant, i'm just going to write it slightly differently

There are a four composite font files.

The four are

C:\Windows\Fonts>dir *composite* /s/b

C:\Windows\Fonts\GlobalMonospace.CompositeFont
C:\Windows\Fonts\GlobalSansSerif.CompositeFont
C:\Windows\Fonts\GlobalSerif.CompositeFont
C:\Windows\Fonts\GlobalUserInterface.CompositeFont

C:\Windows\Fonts>

Looking at them once sees that, for example, GlobalMonospace.CompositeFont has 0590-06FF and the fallback fonts listed, just one, is Courier New, which has Aleph. But Miro determined that that's not the composite file used, and that the one used is GlobalUserInterface.CompositeFont

Open this file C:\Windows\Fonts\GlobalUserInterface.CompositeFont

Aleph is \u05D0 so you have to scroll the file down to get to where i'm showing in the pic, but that's the section to look at

The composite font file lists a family of fonts to act as fallback fonts for various ranges of unicode characters, including 0590-06FF (which is the range that includes 05D0/aleph)

    <FontFamilyMap  
        Unicode          = "0000-052F, 0590-06FF, 0750-077F, 1D00-1FFF, 2C60-2C7F, FB00-FB0F, FB1D-FBFF" 
        Target           = "Segoe UI, Tahoma, Arial, Arial Unicode MS, Microsoft Sans Serif, Lucida Sans Unicode"
        Scale            = "1.0"/>

enter image description here

Charmap can reach as far as FFFF which is far enough. Charmap show that it's not in segoeUI. But it is in Tahoma.

enter image description here

Babelmap is interesting because it can show characters past FFFF (not necessary in this case), and also it can show what fonts on your system have a particular unicode character. But to see what font is actually used in practice by notepad, as a fallback font, you need to check that GlobalUserInterface.CompositeFont file. Then look in charmap or babelmap for the first font with the glyph/unicode character that you want.

Babelmap has composite fonts but I think they are custom ones not specifically the custom one used by windows. But one could usefully use babelmap to search for which font has a unicode character, or to look at what characters are within a font, even beyond FFFF.