Brace matching causing Draw Indent lines misalignment with some fonts (solved)

Brace matching causing Draw Indent lines misalignment with some fonts (solved)

2
NewbieNewbie
2

    Oct 19, 2022#1

    Hi,

    I use Noto Mono font (but same with Courier or Lucida Console), and when brace matching is running, indent lines are misaligned. (It works well with Courier New or some others, but I prefer Noto Mono.)

    UltraEdit 2022.1.0.100 64-bit Windows 10

    Is there any suggestion (others than using another font, or another C indent style...)?
    image_2022-10-19_104834101.png (8.33KiB)
    Small screenshot of misaligned indent lines on brace highlighting active

    6,603548
    Grand MasterGrand Master
    6,603548

      Oct 19, 2022#2

      Note Mono is a font available only in style regular according to the Wikipedia page about the Noto fonts. That is not good if characters need to be displayed in a different style like bold as the Microsoft GDI+ library used by UltraEdit for Windows have to emulate the bold style for drawing the brace character bold because of the font itself does not support the bold style. Fonts like Courier New or Consolas are fixed pitch fonts with glyphs for the supported characters available for all four styles and all characters have the same width in all four styles, i.e. the font consists of a set of four font files for the styles regular, bold, italic and bold italic.

      The usage of a fixed pitch font with support for at least the font styles regular and bold (and italic and bold italic on having italic and bold italic styles enabled for a color group for a syntax highlighting language) is recommended for editing code in UltraEdit. Otherwise such drawing issues cannot be avoided by UltraEdit.

      The feature auto-brace matching highlights the matching braces always with foreground and background color configured in Manage Themes window on tab Editor for item Brace highlight and uses always the bold style. It is not possible to configure at Advanced - Settings or Configuration - Editor - Braces / strings in UltraEdit for Windows v2022.1.0.112 to use the feature auto-brace matching, but do not use the bold style. That would be a useful option for UltraEdit users who prefer the usage of a font (with fixed width) supporting only the regular style.

      You have the following options in my opinion:
      • Use a fixed pitch font supporting at least the styles regular and bold.
      • Turn off the configuration setting Enable auto-brace matching to avoid getting matching braces displayed bold.
      • Live with the graphical drawling lines issue on caret being left to an opening or closing brace which is highlighted by the feature auto-brace matching.
      • Send an enhancement request to UltraEdit support by email asking for an option to disable the usage of the style bold for matching braces implemented perhaps in a future version of UltraEdit.
      • Send an issue report to UltraEdit support by email explaining the graphical display issue on drawing lines with a fixed width font available only for style regular and hope that the UltraEdit developers find a solution for that display issue which is applied in a future version of UltraEdit.
      • Send an enhancement request to Microsoft support.asking for better handling of fonts available only in style regular on being drawn emulated with style bold.
      • Send an enhancement request to Google support asking for an enhancement of font Noto Mono for style bold with using the same width for all characters as used for style regular.
      • Download and install a free font editor, load the font Noto Mono, create a bold version of each character which most likely takes lots of hours as I know from my own font creations and save the modified font with correct properties as Noto Mono for bold style. Share the Noto Mono font for style bold with the open source community.
      Best regards from an UC/UE/UES for Windows user from Austria

      2
      NewbieNewbie
      2

        Oct 19, 2022#3

        Hi,

        I have found a Noto Mono Bold font on the web, installed it in Windows 10 (right-click->install) and it solves my problems 🙂
        Thanks a lot for your detailed answer.