Bold font makes cursor appear in the wrong place (fixed)

Bold font makes cursor appear in the wrong place (fixed)

3
NewbieNewbie
3

    Oct 25, 2010#1

    I just installed UE and after setting it up the way I like it, I noticed that the cursor is blinking in the wrong spot on lines that have bolded text. I set keywords and operators to bold, so this happens on most lines, and it makes editing completely impossible. I've been trying to find a replacement for Notepad++ that has inline spell checking and a function list, and at this point I'm seriously considering buying UE, but this is going to be a dealbreaker. Worse yet, I found two other posts (Cursor blinks off position when using proportional fonts and Long standing Ultraedit problem with FIXEDSYS font and bold) dating back to 2005 showing the same problem. I really hope I'm just missing some simple option and that the solution isn't going to be "well don't use bold then". Does anyone know how to fix this?

    (I'm using a trial period version of UE 16.20.0.1011 on WinXP 32 bit.)

    [edit: I should note that this happens with Verdana, which is my font of choice for editing, and Terminal (which it switches to automatically when you check Use OEM Fixed Pitch Font. Arial, FixedSys, and most of the other fonts I have tried have the same problem. In every case, if you go to the end of a line that has bold text in it, the cursor appears before the end of the text, but typing results in letters going on to the end of the line. Perversely, Tahoma has the reverse problem, where the cursor is drawn further out from the end of the line. The cursor appears correct when using Courier New, though the bold is very indistinct, and I have such a loathing for Courier New that I'd rather go back to Notepad++ than be stuck with it in UE.]

    6,603548
    Grand MasterGrand Master
    6,603548

      Oct 25, 2010#2

      Bulgrien wrote an interesting post on page 2 of ClearType fonts.

      For testing I selected in View - Set Font as font Verdana with font style Bold and size 10 pt and I don't see any cursor problem with this proportional font in normal edit mode on a non syntax highlighted file. There is also no display problem with a syntax highlighted file using Verdana bold 10 pt. I must add that non of my syntax highlighting languages make use of font style bold.

      And I don't use ClearType nor Standard method to smooth edges of screen fonts. So I unchecked the Windows XP option Use the following method to smooth edges of screen fonts under Control Panel - Display - Appearance - Effects. See also ClearType FAQ from Microsoft.

      3
      NewbieNewbie
      3

        Oct 25, 2010#3

        Yes, if you do View > Set Font and set the entire font to bold, it does display correctly with the cursor. The problem seems to be when fonts have letters that are displayed in different widths depending on whether they are bold or regular, and that happens with both monospaced and proportional fonts. For instance, Lucida Console and FixedSys are both monospaced fonts, but when you go through Advanced > Configuration > Editor Display > Syntax Highlighting and set, for instance, Keywords to display in bold, the bolded letters are displayed noticably wider than the non-bold letters. It seems that whatever is calculating the cursor position to draw it is only considering the width of the letters in whatever base weight you have selected, and is not calculating them based on how they're actually being displayed. Also, the fact that it's drawing bold and regular letters as different widths in monospaced fonts is an additional problem, as that rather defeats the purpose of monospacing. I can provide screenshots of this when I get home if it would help visualize the problem.

        [edit: I should add that I did try the Font Quality slider at all settings, and while it does change the appearance of the font, it does not affect the cursor positioning problem.]

        The really bad thing about this is that UE is a commercial product, and as far as I can tell, all of its competitors get it right. If it were open source, they could blow this off by simply saying "here's the source, go fix it yourself", but that's not the case here. (I'm at all not arguing for UE to become open source or anything here, just saying.) What I'm amazed by is that apparently no one else uses proportional fonts or bold in a text editor, and so this has been an issue since at least 2005. It's sad too, because it seems to be extremely difficult to find a text editor that does good syntax highlighting, looks decent, has inline spell checking, and has a working function list feature. Notepad++ fails the spell checking and function list (the function list plugin works for PHP, but not much else), Komodo Edit fails the function list and has somewhat wonky highlighting and other strangeness, jEdit fails the look-and-feel, etc., etc. I'm ready to pay for a good editor, and I'm just flabbergasted that UE, after all its advanced features, fails on something so simple as font weights.

        Sorry I'm ranting here, I'm just annoyed. :-/

        6,603548
        Grand MasterGrand Master
        6,603548

          Oct 26, 2010#4

          Well, all you wrote is true. But I think this problem is not a problem for most UltraEdit users because they don't mix normal and bold style. I'm using UltraEdit already more than 10 years, but never used bold, italic or underline style. I think that most text writers using a text editor simply only use normal style. For writing text with different font styles there are word processing applications like Wordpad, MS Word or Writer from the OpenOffice package.

          Also IDM knows about the cursor positioning problem when using normal and bold style mixed for some (probably most) fonts which is the reason why help page about Syntax Highlighting contains the paragraph:
          Help of UE wrote:Additionally for each color group (except Normal Text) font styles of Bold, Italic and Underline are available. These may be selected individually for each color group. With some fonts the underline may not always show correctly, and with bold, the spacing may not be correct for non-fixed pitch fonts.
          For an explanation about fixed pitch font see Monospaced vs Fixed Pitch fonts.

          So what you need to solve the cursor positioning problem is a proportional font looking like Verdana, but is a true fixed pitch font which means that for example a normal a has the same width has a bold a and an italic a and a bold + italic a. Or you wait until IDM releases a version of UltraEdit with no cursor positioning problem with mixed style for non-fixed pitch fonts.

          Fixedsys is a font which should not be used anymore nowadays. This is a font for downwards compatibility with 16-bit DOS applications. Fixedsys is like all other fonts with file extension FON in C:\Windows\Fonts a bitmap font. A bitmap font is using pixels. Such a font is available only for some heights and do not really support font style like bold or italic. Making a bitmap font bold means that Windows must calculate a new bitmap from the bitmap stored in the font. TrueType and OpenType fonts, those with symbol TT or O displayed in the font dialog, are using vectorized glyphs and not pixels. Therefore such fonts can be used with nearly all heights, even none integer (floating point) heights like 11.45 pt. Those fonts are installed often with a set of font files, one for normal style (verdana.ttf), one for bold style (verdanab.ttf), one for italic style (verdanai.ttf) and one for bold + italic style (verdanaz.ttf).

          As bulgrien wrote in ClearType fonts it looks like UltraEdit is not using font style variants correct for highlighting a keyword or block (string, comment) with bold or italic style when the current font is installed with those variants like Verdana.

          PS: Don't think UltraEdit is the only application having problem with font widths. I can tell you that even MS Word 2003 and 2007 have serious problems with fonts and font widths and those problems are much more problematic than the cursor positioning problem in UltraEdit because they can result in destroying the layout of a document.

          3
          NewbieNewbie
          3

            Oct 26, 2010#5

            I know the difference between text editors and word processors. I'm a long time user of Notepad++, which mixes font styles with no problem whatsoever. I also recently tried Komodo Edit, which likewise has no problem with mixed styles. (I know both of those use the Scintilla editing component, so you may take that as either one or two examples of it working correctly, whichever. But I know they are not the only two editors to do this correctly.) I find mixed styles easier to read, and I like proportional fonts for the same reason, even when coding. A proportional font displayed non-proportionally would not be a satisfactory solution to what is a long-solved problem in other editors. The issues that MS Office may or may not have with fonts are not applicable here, and either way, Office's problem, whatever it may be, is not with how the cursor is drawn. It's also my opinion that if mixed font styles are not correctly supported, they should not be presented as an option in the program. I recognize that these are my own opinions, but nevertheless, and with all due respect to your Grand Master status and decade of UE use, I do know what I like and want (and expect) in an editor.

            I have emailed IDM about this and to their credit I got a quick response back saying that they are aware of the problem, it's a high priority, and they are working on it and should have a fix in "not too long". I'm extremely hopeful that this will be the case; I like everything else I see in UE and since I cannot seem to find a free editor that will do everything I want, I'm prepared to pay for one. But I can't justify $60 unless the font problem is fixed. I can deal with a lot of other issues, big and small, in editors, but to me, this thing with the fonts is astonishing. Sorry if I'm coming off as a bit prickly here, but to me the font thing is like driving a brand new shiny sports car which has a radio that is fixed to play some horrible music at high volume, like it was somehow never anticipated by the designers that people might like to listen to something else; it's inexplicable to me, very puzzling indeed. So, I'm very hopeful that it will be fixed and I can use UE. If not, I'll have to find something else.

            [edit: If it makes you feel any better, I just found out that NetBeans does not support word wrap, which is even more astonishing. And for what it's worth, it does not support mixed font styles either, but it also does not have an option for them in the font dialogs.]

            [edit 2, one day later: NetBeans does in fact support mixed font styles, I just wasn't looking in the right place.]

            6,603548
            Grand MasterGrand Master
            6,603548

              Oct 26, 2010#6

              I don't have any problem with the fact that for you a correct display of text with mixed font styles with any proportional TrueType or OpenType font is a very important criteria for the text editor you want to use. With my posts I just wanted to inform you that this is a known problem in UltraEdit and what could be done to avoid this problem. If none of these suggestions are acceptable for you, which of course are limitations from your point of view, it's absolutely okay that you look for another text editor which fulfills all your requirements. UltraEdit is the best text editor for many text writers, but definitely not for all text writers.

              It is good to read that IDM has rated this problem already as high priority issue and that they are working on it. Maybe in a few months when IDM is releasing UltraEdit v17.00 the problem is fixed by the developers of IDM. And maybe in a few months you are still looking for a text editor which has all the features you want and then come back to the UltraEdit website and examine UltraEdit once again.

              901
              MasterMaster
              901

                Oct 31, 2010#7

                I want to confirm what has been expressed thus far. IDM has stated that the Consolas font display issue with Bolded syntax is a separate issue from the cursor position issue with bolded proportional fonts. The fix to the first issue is complete and waiting to be released for public testing. The cursor position problem is slated to be fixed during the current development cycle which likely means that we will not see the fix until UE version 17.

                6,603548
                Grand MasterGrand Master
                6,603548

                  Sep 22, 2012#8

                  IDM continuously improved display of text with proportional fonts and mixed font styles resulting in UE v18.00 in a full support for proportional fonts which means according to list of changes:
                  • Corrected caret positioning issues with fonts that are not fixed-width
                  • Improved syntax highlighting for fonts that are not fixed-width
                  The problems as described by forum member lewallen with font Verdana used regular and bold at same time via syntax highlighting are definitely fixed with UltraEdit v18.00.

                  Update: The problem with text cursor position being wrong on using font style bold for some color groups for syntax highlighted files with using a proportional font like Arial or Verdana and the font style changes while typing code was fixed with UltraEdit for Windows v23.00.0.42 and UEStudio v16.00.0.11. Another special caret positioning issue with usage of proportional fonts was fixed with UltraEdit for Windows v24.00.0.42 and UES v17.00.0.16.