Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    separate fonts for English and Hindi text

    General Discussion
    complex scripts hindi multiple fonts
    3
    4
    4360
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • V S Rawat
      V S Rawat last edited by

      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

      Mikhail V 1 Reply Last reply Reply Quote 0
      • dail
        dail last edited by

        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.

        1 Reply Last reply Reply Quote 1
        • Mikhail V
          Mikhail V @V S Rawat last edited by

          @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.

          1 Reply Last reply Reply Quote 1
          • V S Rawat
            V S Rawat last edited by

            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

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright © 2014 NodeBB Forums | Contributors