SynEdit is not the only custom control that was fixed by the change to 
BeginTextRender that disabled the fractional positioning of characters. This 
was an important fix since proportional font characters do not have whole 
number widths, yet they can only be displayed on a device using whole pixels. 
Without disabling this, then width(char) x number of chars in string <> 
width(string), which is what was causing the problem in SynEdit (and any other 
text editor type custom controls). Note that all char and string width 
functions return a whole number, so individual char widths get rounded.

Tobias, what fonts are you using? Could you post your example app. I'm not 
seeing the char positioning differences here.

Please be careful making any changes to this. I believe Canvas.OutText calls 
ExtTextOut with DX=nil so the suggested workaround may break some other things 
that were fixed with the BeginTextRender change.

Thanks.

-Phil


-----Original Message-----
From: Mattias Gaertner [mailto:[EMAIL PROTECTED]
Sent: Sat 11/3/2007 2:19 PM
To: lazarus@miraclec.com
Subject: Re: [lazarus] Carbon Widgetset: character spacing problems
 
On Sat, 03 Nov 2007 20:14:02 +0100
Tobias Giesen <[EMAIL PROTECTED]> wrote:

> > SynEdit needs disabled fractional positions. It sets DX<>nil.
> 
> So, can you add some kind of condition so that they are only disabled
> when necessary? The collateral damage seems to be considerable.

I have no carbon at the moment to test.
Have you tried

if DX<>nil then
  enable...
else
  disable...
?

Mattias

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

<<winmail.dat>>

Reply via email to