Community
    • Login

    Wonky display of double musical note character

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    fontdisplaybug maybeunicode
    8 Posts 5 Posters 490 Views
    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.
    • M Andre Z EckenrodeM
      M Andre Z Eckenrode
      last edited by

      I normally use Georgia as my font in NPP, and mostly work only with ANSI/1252 text, but occasionally have reason to use Unicode. When trying to enter double musical note character ♫ (Hex 0x266B / Decimal 9835), either via Alt+14 or by copying/pasting from elsewhere, NPP displays a box (standard for missing character) instead of double note, UNLESS I type or paste single note character ♪ (Hex 0x266A / Decimal 9834, Alt+13) immediately before or after the intended double note, in which the double note displays correctly. But if I then delete or backspace over the single note, the double note promptly goes back to being displayed as a box.

      If I change my font to Courier New, the double note gets displayed correctly with or without the single note. Haven’t tried other fonts.

      Behavior is confirmed on multiple Windows machines.

      Also tried typing/pasting the double note character by itself in various other applications (MS Word, Notepad, RJ TextEd) with no display issues.

      Bug?

      On my main laptop, using:

      Notepad++ v8.4.6 (32-bit)
      Build time : Sep 25 2022 - 19:55:26
      Path : C:\Program Files (x86)\Notepad++\Notepad++.exe
      Command Line : -multiInst -nosession
      Admin mode : OFF
      Local Conf mode : OFF
      Cloud Config : OFF
      OS Name : Windows 10 Enterprise (64-bit)
      OS Version : 21H2
      OS Build : 19044.2130
      Current ANSI codepage : 1252
      Plugins :
      ComparePlugin (2.0.1)
      DSpellCheck (1.4.20)
      ElasticTabstops (1.3.1)
      ExtSettings (1.2.1)
      mathpad (0.0.5.5)
      mimeTools (2.8)
      MultiClipboard (2.1)
      NppCalc (1.5)
      NppConverter (4.4)
      NppExport (0.4)
      NPPJSONViewer (1.40)
      NppQrCode32 (0.0.0.1)
      NppSaveAsAdmin (1.0.211)
      NppXmlTreeviewPlugin (2)
      PythonScript (1.5.4)
      SessionMgr (1.4.3)

      On at least one other Windows device tested on, NPP is installed with no additional plugins.

      Alan KilbornA PeterJonesP 2 Replies Last reply Reply Quote 1
      • Alan KilbornA
        Alan Kilborn @M Andre Z Eckenrode
        last edited by

        @M-Andre-Z-Eckenrode

        You might give this preference setting a try (tick the box):

        9c563e46-0e16-4e56-8814-6eee2d25dc8c-image.png

        Be sure to heed the instruction about restarting.

        M Andre Z EckenrodeM 1 Reply Last reply Reply Quote 4
        • PeterJonesP
          PeterJones @M Andre Z Eckenrode
          last edited by PeterJones

          @M-Andre-Z-Eckenrode ,

          If your active document is set to “ANSI” or “Windows-1252”, I am surprised that it will allow those characters at all.

          If I start a new document, switch to ANSI or Windows-1252, and paste just the ♫ character, I can see it. However, if I start with a previously-saved file that is ANSI or Windows-1252 and try to paste one of those, I also get an “unrecognized” symbol.
          If I go back to a new, and paste one or both of those in, and then use a hex-dumper to show the contents, the file on disk actually has 0x3F, which is the ? character… which makes sense, because ANSI/Windows-1252 has no codepoint for one of those characters, so it cannot write any byte to disk to represent that character.

          If you want to use a unicode character, you must use a unicode encoding (UTF-8 or UTF-16). So if your procedure is File > New then Encoding > UTF-8, then paste in just one of those characters, like ♫, it should have no problem displaying the character.

          However, if your active font doesn’t have a glyph for that character, it might show the box instead. If that happens, you might want to use Settings > Preferences > MISC > Use DirectWrite, because that often allows Notepad++ to use the Windows DirectWrite interface to find glyphs for characters that aren’t in the active font.

          1 Reply Last reply Reply Quote 3
          • M Andre Z EckenrodeM
            M Andre Z Eckenrode @Alan Kilborn
            last edited by

            @Alan-Kilborn
            @PeterJones

            Thank you, both. I either didn’t know or forgot about the DirectWrite setting. Thing is, I don’t think I’ve ever used or changed that setting before, but I’ve been using Georgia as my NPP font for years, and I’m almost positive I’ve seen ♫ used in SRT subtitle files I’ve edited in the past.

            @PeterJones said in Wonky display of double musical note character:

            If I start a new document, switch to ANSI or Windows-1252, and paste just the ♫ character, I can see it.

            If you want to use a unicode character, you must use a unicode encoding

            I did indeed have encoding set to UTF-8 prior to typing/pasting ♫, and I’m quite surprised that it was visible for you when you pasted to a new ANSI/1252 doc. That definitely doesn’t work for me — I just get a “?”.

            Either way, it stills seems strange that ♫ is (seemingly) only displayed in conjunction with ♪ without DirectWrite enabled when using the Georgia font, which, for the record, doesn’t appear to include either glyph, as far as I can tell using Windows Character Map or BabelMap. (Neither does Courier New, for that matter.)

            Related: Can anyone recommend a good free program that can summarize relevant details about a font, such as total number of glyphs included, unicode blocks/ranges, etc.?

            guy038G PeterJonesP 2 Replies Last reply Reply Quote 0
            • guy038G
              guy038 @M Andre Z Eckenrode
              last edited by

              @m-andre-z-eckenrode, @peterjones, @alan-kilborn and All,

              I would recommend this software :

              https://babelstone.co.uk/Software/BabelMap.html

              Best Regards,

              guy038

              1 Reply Last reply Reply Quote 0
              • PeterJonesP
                PeterJones @M Andre Z Eckenrode
                last edited by

                @M-Andre-Z-Eckenrode said in Wonky display of double musical note character:

                and I’m quite surprised that it was visible for you when you pasted to a new ANSI/1252 doc. That definitely doesn’t work for me

                Interesting.

                • New > Encoding = ANSI then paste ♫ => ?
                • New > Encoding = Character Sets > Western European > Windows-1252 then paste ♫ => ♫. Until I save the file and close it and reload, at which point it’s a ?
                PeterJonesP 1 Reply Last reply Reply Quote 1
                • PeterJonesP
                  PeterJones @PeterJones
                  last edited by PeterJones

                  Aside: the font that my browser is using for monospace has a mistake in its gylphs:
                  1db47ef2-3de0-47a8-b4cb-28d310f10872-image.png
                  The non-monospace font (in black) correctly shows U+266B ♫ as beamed eighth notes. The monospace font (in red) shows that same character as beamed sixteenth notes instead. Whoops.

                  No, my browser says it’s using DejaVu Sans Mono for fixed-pitch, and charmap shows that DejaVu Sans Mono has four separate glyphs for those notes.

                  80ece08d-4d00-43ba-8b7f-ac1b8571b218-image.png

                  And Notepad++, which is set to use the same font as well, shows the correct glyphs for those four characters
                  869ae6ca-141c-43f1-bde4-9f9d91a7039e-image.png

                  Oh, I bet that the forum stylesheets are overriding my font choices.

                  -----
                  Edit: Yes, the CSS has its own list of fonts before using what the browser is set at. How rude. 24c7109c-0a36-4420-abd1-a3dd122fd0ab-image.png

                  I don’t have Menlo or Monaco, so it would try Consolas, which doesn’t have that glyph, then Courier New, which doesn’t either, then monospace … so it should be trying DejaVu Sans Mono at that point… but doesn’t seem to be. Oh well, browser issue.

                  1 Reply Last reply Reply Quote 1
                  • Apk AndroidA
                    Apk Android
                    last edited by

                    This post is deleted!
                    1 Reply Last reply Reply Quote -1
                    • First post
                      Last post
                    The Community of users of the Notepad++ text editor.
                    Powered by NodeBB | Contributors