Tobias, I suspect that my e-mail was blocked because of the screenshots I attached. I won't try to resend them with this e-mail for fear of losing another posting. I'll post them shortly in separate e-mails.
Are there any other controls affected besides TLabel? Most controls are Carbon native based, which do their own rendering. If BeginTextRender could determine what kind of LCL control it's being used for, perhaps it could automatically change the rendering on the fly. For example, if it's a TCustomControl or TGraphicControl it would use the integer-based spacing; if it's a TLabel it would use the fractional spacing. I'm just thinking out loud here before we commit to your proposed approach. I spent quite a bit of time testing this over the weekend. The flag that is causing the effect you see with TLabel is kATSLineUseDeviceMetrics. However, for my purpose I need both kATSLineUseDeviceMetrics and kATSLineDisableAllLayoutOperations. The latter is actually 5 flags in one so I haven't determined which of these I actually need, but the presence of this flag doesn't seem to affect TLabel any, only kATSLineUseDeviceMetrics does as far as I can determine. If you haven't had a chance to look at the link that Colin posted, please do so. Some very interesting stuff here: http://antigrain.com/research/font_rasterization/index.html I don't believe what we're seeing has anything to do with anti-aliasing. It appears as though the Carbon widgetset is leaving antialiasing alone, meaning it's set via system preferences. I played around with this (see text smoothing in Appearances in System Preferences) and it doesn't seem to have any effect on TLabel spacing. It's also possible to see these rendering issues in commercial software. I have a small .rtf file that shows some rendering problems when opened with OS X's TextEdit, but not with Word or Pages or any other word processor. Because each version of an OS probably has different or refined rendering "smarts" there will probably be rendering differences with the same software on different OS versions, so you might find it difficult to hit the TButton rendering target, since the way that it's actually rendered is unknown to us and may change from one version of OS X to the next. Thanks. -Phil -----Original Message----- From: Tobias Giesen [mailto:[EMAIL PROTECTED] Sent: Sunday, November 04, 2007 2:23 PM To: [email protected] Subject: Re: [lazarus] Adding AllowFractionalPositioning to TCarbonDeviceContext Hi Phil and others, I think if we only make careful amendments to carboncanvas.pp and nowhere else, then nobody needs to be horrified any more. I did not see your screenshots! I can confirm that the text won't look identical to the buttons even with my changes, but that is not so important. It might be intended by Apple. So if you could live with the change that Mattias proposed, I would go ahead and prepare a patch to add this function: > function SetFontFractionalPositioning(DC: HDC; > UseFractionalPositioning: boolean): boolean; > to carboncanvas.pp Which you would need to call just once for any Canvas involved. Since this is Carbon-internal, we could include it in 0.9.23. What do you think? Kind Regards, Tobias Giesen Super Flexible Software Ltd. & Co. KG Lessingstr. 42 48485 Neuenkirchen, Germany www.superflexible.com www.tgtools.com ----------------------------------------------------------- Registered at register court Steinfurt as HRA 5061 Liability / general partner: TGTools Ltd. Company No. 05513299 Registered in England and Wales Directors: Tobias Giesen and Claudia Hübl _________________________________________________________________ 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
