separate fonts for English and Hindi text
-
of course, we can set a font in menu - Settings - Style Configurator - Global Styles.
But that allows only a single font.
often different languages look good in different fonts.
For me, I would like English text to be in Times New Roman, and Hindi (Devanagari) text in Arial Unicoce MS.
But, I don’t have option to have two fonts like that.
Have a look at MS word how they allow setting two fonts for diffrent languages under complex scripts.
may be something can be thought up, as a text editor is only having one font because txt file doesn’t have coding for different fonts, but language itself is a coding, if we can somehow define different fonts for “character code range”, it is possible.
Thanks.
Rawat
-
For me, I would like English text to be in Times New Roman, and Hindi (Devanagari) text in Arial Unicoce MS.
Scintilla (which is what Notepad++ uses internally) does not parse text this way. It uses a lexer to figure out what the syntax highlighting needs to do. You can however specify different font’s based on the style (such as comments) and through a scripting plugin can also specify character sets for those styles.
-
@V-S-Rawat said:
may be something can be thought up, as a text editor is only having one font because txt file doesn’t have coding for different fonts, but language itself is a coding, if we can somehow define different fonts for “character code range”, it is possible.
One way to achieve similar effect is to use “User defined language”.
Go to Languages-> define your language…
For example you want to apply this to .txt files: “create new”
then input “txt” in the “Ext.” box.
Then go to “keywords” section. In one of empty boxes, say “1st group” you input all the characters (simply space-separated) you want to show in different font or style. Then tick “Prefix mode” checkbox on. On same group press “styler button” to adjust style.This should (partially) work, at least it worked for me with Cyrillic letters.
However it is just a tweak and there may be side effects and glitches, because
of punctuation with latin codes, etc. -
Insightful method. Really creative. I couldn’t think of it myself.
though, for a lazy like me, it is too much work, so I would avoid doing all this.
Thanks a lot for giving such a good method though.
Rawat