[Lazarus] Editor font disturbed after upgrading to r19705

Martin Friebe lazarus at mfriebe.de
Fri May 1 13:05:56 CEST 2009


Bart wrote:
> On 4/30/09, Martin Friebe <lazarus at mfriebe.de> wrote:
>   
>> It looks to me like it uses a different font. certainly it looks like it
>>  believes the font was proportional (that is why you get the odd spacing,
>>  because SynEdit forces it into a grid).
>>
>>  The last font-related changes in synedit where in revision 185xx (so
>>  before your last good revision).
>>     
>>  Maybe you could put some debugln into Synedit.SizeOrFontChanged and see
>>  which font is really used? Otherwise I have no idea.
>>     
>
> I can certainly do so, but in which unit is this method?
>   
I have attached a patch with a few debugln in it. I don't know if they 
will show anything useful, since I have no idea what is going on.
If you apply it, you need to start lazarus with a logfile, to capture 
the output. (There is a command line switch, but I have to find it 
myself / I usually compile as none "window app", which means my Lazarus 
runs with a console-window showing all the output)

Also if you do this, test it with only one Synedit open. (You can 
compile a standalone app, with one SynEdit, and set the font from inside 
the app)

> I wrote a small test program that has a synmemo and a memo
> It sets the fonts of  both the memo and synmemo the same
> and then queries their names etc and writes them in the editcontrols
> below (see attachments)
>
> In r18956 when setting the font (via fontdialog) to Courier New 10
> point normal you see that the fonts look exactly the same in synmemo
> and memo (normal_couriernew.png).
> In r19705 they look very different indeed (bug_couriernew.png).
>   
Memos are native controls, so they are drawn differently.

If you use the same font, (and in normal, bold, italic) for Labels 
and/or StaticText, does it look correct there?
Note, the spacing will be ok there, because neither of them forces the 
mono-spacing. But does it actually look like the expected Courier New, 
and is it truly monospaced?

> So at least it looks like the synmemo thinks it's font is courier new...
>
>   
>>  I haven't got  Win9x, so I can't test. On XP it looks fine.
>>
>>     
>
> I tested the compiled programs under XP and they behaved normally (and
> absolutely the same): the courier new font looks OK and the same in
> synmemo and memo.
>
> So we have a win9x specific bug?
> (Delphi with a tsynmemo and a tmemo behaves just fine on my win9x system)
>
> Bart
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fontinfo.patch
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20090501/018a2b1e/attachment-0007.ksh>


More information about the Lazarus mailing list