|
On 10/10/2013 10:50, FreeMan wrote:
Maybe this two screenshot give more info, copy and paste from clipbord. same selected text. blackbackgroud in lazarus IDE, other one in "Kate" text editor. 'İ' is okey on kate just font proble and dot is small.I already can tell what is happening. Compare the width of the upper "i" with the width of the "2" below. It is not the same. SynEdit is a monospace ONLY editor. It only works with monospaced fonts. (Some exceptions, see below) SynEdit assumes that the "I" has the same width as every other char. So it assumes that the "S" behind the "I" is exactly above the ")" below. You will note that the caret moves into the middle of the "S" SynEdit makes one call to the OS TextOut function for all chars with the same color. And if the OS does not paint the chars at the pos that a strictly monospaced font would dictate, then SynEdit does not know. But SynEdit will behave as if the OS did. The "," has a diff color. SynEdit makes a new TextOut call to the x-pos where it should be. That is why there is a gap. Text selection changes color, so the gap starts moving around. If you can not change the font, you can set "Extra Char Spacing" in the editor options to 1 or -1 (or any none zero value). Then SynEdit will paint each char on its own (for internal reasons that does mess up script languages like Arab, except on windows) SynEdit detects none monospaced fonts if Latin letters (i,w,m,@) do not have the same width. It only test Latin letters as they are present in most fonts. If SynEdit would include upper dotted i in that test, it would fix your problem. But it would have side effects for people who use such a font, but only use English alphabet. (In which case the font is ok). Same for testing any other none English char. There would always be side effects between different languages (Arab to affect Chinese, or Turkish or English or vice versa...) You can edit "TextDrawer" in SynEdit line 735
change FontData^.NeedETO := ETO; to FontData^.NeedETO := True; It will use more CPU / be slower. It will mess up Arab (except on Win) In the end: Your font is not monospaced. SynEdit only works with monospaced fonts |
-- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

