Default font for Devanagiri script
-
Hello,
how do i find out which font is used to display the Devanagiri script when I copy text from the web to a Npp buffer? The Style Configurator shows that the default font is Courier New but this font officially does not support any glyphs from 0x900 onwards. This would mean that some other Windows font is being used. Is there a way to find out which font this is exactly? The standard fonts dont seen to be the ones being used.
Regards,
Szoshi -
are you sure that you have checked Default style under Style?
The reason why asking is because once you open the dialog it refers to global override per default.In addition, it is possible that a language (programming) overwrites it or an attribute
to the language, so check the used language from Language list box and redo your checks.If this doesn’t help, explain what you are doing in more detail so that we are able to replicate it and see if there is an issue.
-
Hello Ekopalypse,
many thanks for your reply. The language tab shows Global Styles and the Style tab shows Global override. I have a feeling though that it has nothing to do with my issue.
My issue is as follows:
The Indic script is rendered very well at low sizes in Npp. I am pretty sure that Npp does not implement its own rendering scheme but simply uses the one provided by Windows. I now want that exact font in a Word document but it does not seem to be a standard Microsoft font for Devanagiri. I am pretty sure that Npp associates some Devanagiri font to use for scripts which do not support the glyphs (Courier New for e.g.) I just need to know how to find out which font is being used.Regards,
SzoshiP.S.: A simple copy paste to word does not workk as Word shows no option to paste with formatting in this case.
-
did you test Default Style item to see which font is used?
Concerning the rendering, I have to say that I never did a research how exactly this is working under the hood. -
I copied the table from the Wikipedia:Devanagari page into Notepad++, where I’m using DejaVu Sans Mono as my default font
U+090x ऀ ँ ं ः ऄ अ आ इ ई उ ऊ ऋ ऌ ऍ ऎ ए U+091x ऐ ऑ ऒ ओ औ क ख ग घ ङ च छ ज झ ञ ट U+092x ठ ड ढ ण त थ द ध न ऩ प फ ब भ म य U+093x र ऱ ल ळ ऴ व श ष स ह ऺ ऻ ़ ऽ ा ि U+094x ी ु ू ृ ॄ ॅ ॆ े ै ॉ ॊ ो ौ ् ॎ ॏ U+095x ॐ ॑ ॒ ॓ ॔ ॕ ॖ ॗ क़ ख़ ग़ ज़ ड़ ढ़ फ़ य़ U+096x ॠ ॡ ॢ ॣ । ॥ ० १ २ ३ ४ ५ ६ ७ ८ ९ U+097x ॰ ॱ ॲ ॳ ॴ ॵ ॶ ॷ ॸ ॹ ॺ ॻ ॼ ॽ ॾ ॿ
It renders correctly in Notepad++, even though DejaVu Sans Mono has none of the Devanagari.
This thread from about a year ago talks more about how Windows handles fallback fonts.
From
c:\windows\fonts\GlobalUserInterface.CompositeFont
, I see:<!-- Devanagari 0900-097F --> <FontFamilyMap Unicode = "0900-097F" Target = "Mangal" Scale = "1.0"/>
And
GlobalMonospace.CompositeFont
shows:<!-- Devanagari 0900-097F --> <FontFamilyMap Unicode="0900-097F" Target="Mangal" Scale="1.0" />
Based on my interpretations from a year ago, that would say that Windows would look for a font called “Mangal”… but I don’t have that font.
The first font I could find (using charmap.exe) that had Devanagari characters was Nirmala UI. I don’t know if that’s the fallback font (because I don’t know enough about these glyphs to be able to recognize font-differences in them), but my guess (and it is only a guess) is that there’s some other fallback path defined in one of those
.CompositeFont
files which provides for fallbacks, even when the fonts specified for a certain character-range aren’t there.Oh, no, I was wrong: that wasn’t my first; I just didn’t go back far enough. My first (alphabetically) is “Adobe Devanagari”, and “Arial Unicode MS” also has it. I now bet the fallback was one of those two.
-
well, know I’m confused - I thought Npp does not use the fallback mechanism.
-
@Ekopalypse said:
I thought Npp does not use the fallback mechanism.
You are right. I had forgotten that was one of the major points of last year’s thread (that’s what I get for not re-reading everything).
I wonder if Don added some sort of fallback mechanism since then? Or maybe Microsoft got more pushy about its fallback fonts, and can use them (or some other fallback variant) under certain circumstances, even when the app isn’t explicit? I don’t know.
But what I’m sure about is that my Notepad++ is set up for DejaVu Sans Mono, which doesn’t have those glyphs, but Notepad++ was displaying them.
For more reading, see last month’s ₹ Rupees-symbol discussion, which also brought up Devanagari.
Font fallbacks are weird, apparently.
-
Hello Peter,
this is exactly the information I was looking for. I just do not understand the inner workings of Windows or Npp well enough to have figured this out myself. Nirmala is the font that I was looking for. This looks like a preferred fall back font as it supports more than just one script (12 actually) with its 4400+ glyphs These 12 scripts can in turn be used for around 25 odd languages!
If you ever need any help with the Devanagiri script you can ping me. I owe you one :)
Regards,
Szoshi -
Hello, @naachhilfe-aachen, @peterjones, @ekopalypse, and All,
May be, this post to @v-s-rawat ( and all the discussion, of course ) could be of interest for you !
https://notepad-plus-plus.org/community/topic/17223/why-does-appears-as-in-npp/5
You could, as well, download the Devanagari Google Noto font, for some tests ;-))
Best Regards,
guy038