Hi Mattias, I don't believe the issue is one of proportional fonts using monospaced font character spacing. Monospaced fonts use the same width for all chars. Disabling fractional positioning of the char glyphs means treating each char's width as a whole number. For example, if the period (.) has a width of 3.3, I believe this means treat it as having a width of 4.
Thanks. -Phil -----Original Message----- From: Mattias Gaertner [mailto:[EMAIL PROTECTED] Sent: Sat 11/3/2007 4:00 PM To: [email protected] Subject: Re: [lazarus] Carbon Widgetset: character spacing problems On Sat, 3 Nov 2007 16:40:38 -0400 "Hess, Philip J" <[EMAIL PROTECTED]> wrote: > As I feared, your fix busted my custom control. Please revert the > change until a better solution is arrived at. > > Please don't assume that the LCL is the entire universe. SynEdit is not part of the LCL and Canvas.TextOut is a quite important function. It should not print a proportional font monospaced. > I'm porting > a large custom control that had character positioning problems on > Carbon (other widgetsets were fine) until Tomas fixed > BeginTextRender. Now it's broken again for me. I undid the change, although I'm not sure why you need proportional fonts printed monospaced. Mattias > > Thanks. > > -Phil > > > -----Original Message----- > From: Mattias Gaertner [mailto:[EMAIL PROTECTED] > Sent: Sat 11/3/2007 3:24 PM > To: [email protected] > Subject: Re: [lazarus] Carbon Widgetset: character spacing problems > > On Sat, 3 Nov 2007 16:09:16 -0400 > "Hess, Philip J" <[EMAIL PROTECTED]> wrote: > > > 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. > > AFAIK only synedit needs monospace fonts. What other text editor's do > you mean? > > > > 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. > > Yes, afaik only SynEdit fills DX. All others don't use it. If DX<>nil > every character is placed at a custom position. With DX=nil the > widgetset should paint the text normal. > > > Mattias > > _________________________________________________________________ > To unsubscribe: mail [EMAIL PROTECTED] with > "unsubscribe" as the Subject > archives at http://www.lazarus.freepascal.org/mailarchives > _________________________________________________________________ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
<<winmail.dat>>
