[Solved] Letters chopped off in highlights of code tools. lazarus / 21-General ---------------------------------------------------------------------- jamie · 2023-05-31 21:00 has anyone noticed if you use the code tools to show the inners of a unit specifying a letter to show the letter you specified gets colored but I noticed it does not always fully draw without the following letter overlapping it. For example, somewhere in the text editor type. System.O  and wait. you will see the list of entries with O's color red in my IDE, scroll down and notice how some of them get chopped a little and looks like a letter C instead. This is on Windows 10, if that matters, and it seems like it's been around for a while. ---------------------------------------------------------------------- dsiders · 2023-05-31 23:07 Quote from: jamie on May 31, 2023, 11:00:49 pmhas anyone noticed if you use the code tools to show the inners of a unit specifying a letter to show the letter you specified gets colored but I noticed it does not always fully draw without the following letter overlapping it. For example, somewhere in the text editor type. System.O  and wait. you will see the list of entries with O's color red in my IDE, scroll down and notice how some of them get chopped a little and looks like a letter C instead. This is on Windows 10, if that matters, and it seems like it's been around for a while. I cannot reproduce using 2.2.4, 2.2.6, or 2.3.0. I tried it on Win 8.1 and Win 11. I don't have access to Win 10 ATM. I tried various fonts in the editors.  Which font are you using? In any case, I cannot reproduce. My code tools pop-ups look correct. ---------------------------------------------------------------------- jamie · 2023-05-31 23:24 Ok, lets see if I can insert an image. ---------------------------------------------------------------------- Martin_fr · 2023-05-31 23:37 What font and size have you setup? I think I can see it on my system, just missing a single line of a pixel an M or W. Compared to how they look in the editor. ---------------------------------------------------------------------- jamie · 2023-05-31 23:53 The only info I can find in the options for Font and size is the editor and that is Size 10 Courier New. is that what you are looking for? I use a default install, I have never changed those settings. I have 96 PPI/100% 1920x1080 on a 24 inch monitor. ---------------------------------------------------------------------- Martin_fr · 2023-06-01 00:05 Ok, with courier it is more noticeable. The next letter is one pixel to far left. ---------------------------------------------------------------------- jamie · 2023-06-01 00:12 maybe a ROUND should be used instead of a trunk ---------------------------------------------------------------------- cdbc · 2023-06-01 05:48 Hi @jamie: Qt 5.6 on PCLinuxOS does it too, seems to me, when bolded. Regards Benny ---------------------------------------------------------------------- jamie · 2023-06-01 12:23 Well, it's always good to see widget compatibility is well supported! ---------------------------------------------------------------------- Martin_fr · 2023-06-01 12:30 Should be reported as bug ---------------------------------------------------------------------- Martin_fr · 2023-06-01 12:48 You also may try the following path Code: Diff  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i diff --git a/ide/sourceeditprocs.pas b/ide/sourceeditprocs.pasindex 209d2dc061..e58a18b1b8 100644--- a/ide/sourceeditprocs.pas+++ b/ide/sourceeditprocs.pas@@ -38,7 +38,7 @@ interface uses   Classes, SysUtils, RegExpr,   // LCL-  LCLType, Graphics, Controls,+  LCLType, Graphics, Controls, LCLIntf,   // LazUtils   LazFileUtils, LazStringUtils,   // SynEdit@@ -303,6 +303,7 @@ function PaintCompletionItem(const AKey: string; ACanvas: TCanvas; X, Y,   HintModifier: TPascalHintModifier;   HelperForNode: TCodeTreeNode; begin+  SetBkMode(ACanvas.Handle, TRANSPARENT);   if Colors<>nil then   begin     if ItemSelected then  Not sure, if it is an issue in Canvas.TextOut itself or what it is.... ---------------------------------------------------------------------- jamie · 2023-06-01 16:43 I believe it's what as stated, BOLD is producing a wider image and it needs to be adjusted one pixel. I don't see what you did would help? But then again, I am getting old and comes with that is confusion! ---------------------------------------------------------------------- Martin_fr · 2023-06-01 17:43 Well, as I said, on my IDE there was one pixel missing too. (Usually just filled with some anti aliased pixels, so not easy to spot, but missing). With the patch, on my Setup the Pixel was there. Did you apply the patch and test? ---------------------------------------------------------------------- paweld · 2023-06-02 08:56 Martin - thank you, your patch solved problem. Lazarus 2.3 trunk, font "Consolas" ---------------------------------------------------------------------- Martin_fr · 2023-06-02 09:51 And here is an image with the Courier font (as in the original report). The image is heavily magnified. It contains the same word in - source edit - non bold - source edit - bold (as comment) - non-fixed: completion - fixed: completion The spacing is the same in all of them. All letters -across all lines - start in the same pixel column. Every 8 pixel. It is just that the "b", even though it is on the correct position paints into the space of the "O". And yes, proportional fonts do that nowadays. If it is painted in one swoop, there is no problem. But if it is painted in several pieces, the "b" paints its background over the "O". ---------------------------------------------------------------------- jamie · 2023-06-02 11:15 Yes, it solved the issue for me, too. Good job.