Re: [lazarus] Adding AllowFractionalPositioning to TCarbonDeviceContext

2007-11-05 Thread Mattias Gaertner
On Mon, 05 Nov 2007 01:40:06 +0100 Giuliano Colla [EMAIL PROTECTED] wrote: Mattias Gaertner ha scritto: [...] What I gathered from the discussion is that SynEdit, and other custom controls rely on width(char) x number of chars in string = width(string). Therefore they can only work with

Re: [lazarus] Adding AllowFractionalPositioning to TCarbonDeviceContext

2007-11-05 Thread Giuliano Colla
Mattias Gaertner ha scritto: On Mon, 05 Nov 2007 01:40:06 +0100 Giuliano Colla [EMAIL PROTECTED] wrote: Font size can only be given in either an integer number of pixels, or in Point Size, which (currently) gets rounded to an integer number of pixels, and therefore, given usual font

Re: [lazarus] Adding AllowFractionalPositioning to TCarbonDeviceContext

2007-11-05 Thread Mattias Gärtner
Zitat von Giuliano Colla [EMAIL PROTECTED]: Mattias Gaertner ha scritto: On Mon, 05 Nov 2007 01:40:06 +0100 Giuliano Colla [EMAIL PROTECTED] wrote: Font size can only be given in either an integer number of pixels, or in Point Size, which (currently) gets rounded to an integer

Re: [lazarus] Adding AllowFractionalPositioning to TCarbonDeviceContext

2007-11-05 Thread Giuliano Colla
Mattias Gärtner ha scritto: Zitat von Giuliano Colla [EMAIL PROTECTED]: Mattias Gaertner ha scritto: On Mon, 05 Nov 2007 01:40:06 +0100 Giuliano Colla [EMAIL PROTECTED] wrote: Font size can only be given in either an integer number of pixels, or in Point Size, which

RE: [lazarus] Adding AllowFractionalPositioning to TCarbonDeviceContext

2007-11-05 Thread Hess, Philip J
, November 04, 2007 2:23 PM To: lazarus@miraclec.com 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

RE: [lazarus] Adding AllowFractionalPositioning to TCarbonDeviceContext

2007-11-05 Thread Hess, Philip J
] Sent: Sunday, November 04, 2007 2:23 PM To: lazarus@miraclec.com 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

RE: [lazarus] Adding AllowFractionalPositioning to TCarbonDeviceContext

2007-11-05 Thread Hess, Philip J
-Original Message- From: Tobias Giesen [mailto:[EMAIL PROTECTED] Sent: Sunday, November 04, 2007 2:23 PM To: lazarus@miraclec.com Subject: Re: [lazarus] Adding AllowFractionalPositioning to TCarbonDeviceContext Hi Phil and others, I think if we only make careful amendments

Re: [lazarus] Adding AllowFractionalPositioning to TCarbonDeviceContext

2007-11-05 Thread Tobias Giesen
Hi Philip, thanks for your research! I can confirm that in my program, only TLabel is affected strongly, but TStringGrid also shows slightly incorrect text rendering. TStringGrid does not have any problems with editing text even with my patch, because it seems to use a standard Mac OS Edit field

Re: [lazarus] Adding AllowFractionalPositioning to TCarbonDeviceContext

2007-11-05 Thread Tom Gregorovic
Hi, I vote for solving this issue in Carbon interface. Summary: TSynEdit and components that draw text per partes (to indicate selection, ...) need text functions without fractions and kerning, tracking... But all these typographic features should be otherwise enabled by default. Solution:

[lazarus] Adding AllowFractionalPositioning to TCarbonDeviceContext

2007-11-04 Thread Tobias Giesen
Hello, if we add the property to TCarbonDeviceContext, is that accessible from a custom component in a reasonable way? Would Phil be willing to change a property in TCarbonDeviceContext using the appropriate typecasts? Fractional positioning should never be turned off globally for the

Re: [lazarus] Adding AllowFractionalPositioning to TCarbonDeviceContext

2007-11-04 Thread Mattias Gaertner
On Sun, 04 Nov 2007 15:15:41 +0100 Tobias Giesen [EMAIL PROTECTED] wrote: Hello, if we add the property to TCarbonDeviceContext, is that accessible from a custom component in a reasonable way? Would Phil be willing to change a property in TCarbonDeviceContext using the appropriate

Re: [lazarus] Adding AllowFractionalPositioning to TCarbonDeviceContext

2007-11-04 Thread Tobias Giesen
You can add for example function SetFontFractionalPositioning(DC: HDC; UseFractionalPositioning: boolean): boolean; to carboncanvas.pp Thanks, Mattias! I will propose a new patch based on this sugestion. Then SynEdit and Philip would have to use it, because I think the default should

Re: [lazarus] Adding AllowFractionalPositioning to TCarbonDeviceContext

2007-11-04 Thread Felipe Monteiro de Carvalho
The topic seams to need more discussion before being implemented, so I think it should not be implemented before 0.9.24 thanks, -- Felipe Monteiro de Carvalho _ To unsubscribe: mail [EMAIL PROTECTED] with

Re: [lazarus] Adding AllowFractionalPositioning to TCarbonDeviceContext

2007-11-04 Thread Giuliano Colla
Mattias Gaertner ha scritto: On Sun, 04 Nov 2007 15:15:41 +0100 Tobias Giesen [EMAIL PROTECTED] wrote: Hello, if we add the property to TCarbonDeviceContext, is that accessible from a custom component in a reasonable way? Would Phil be willing to change a property in TCarbonDeviceContext

Re: [lazarus] Adding AllowFractionalPositioning to TCarbonDeviceContext

2007-11-04 Thread Tobias Giesen
There's a Font property, Pitch ... fpfixed That sounds promising. I would like to try and submit a patch which disables the fractional spacing only when the Pitch is fpfixed. Then Philip can try if his component still works. I read somewhere that if TCarbonDeviceContext.BeginTextRender was

Re: [lazarus] Adding AllowFractionalPositioning to TCarbonDeviceContext

2007-11-04 Thread Vincent Snijders
Tobias Giesen schreef: There's a Font property, Pitch ... fpfixed That sounds promising. I would like to try and submit a patch which disables the fractional spacing only when the Pitch is fpfixed. Then Philip can try if his component still works. I read somewhere that if

RE: [lazarus] Adding AllowFractionalPositioning to TCarbonDeviceContext

2007-11-04 Thread Hess, Philip J
] Sent: Sun 11/4/2007 12:47 PM To: lazarus@miraclec.com Subject: Re: [lazarus] Adding AllowFractionalPositioning to TCarbonDeviceContext There's a Font property, Pitch ... fpfixed That sounds promising. I would like to try and submit a patch which disables the fractional spacing only when the Pitch

Re: [lazarus] Adding AllowFractionalPositioning to TCarbonDeviceContext

2007-11-04 Thread Tobias Giesen
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

Re: [lazarus] Adding AllowFractionalPositioning to TCarbonDeviceContext

2007-11-04 Thread Felipe Monteiro de Carvalho
Hi, I don't understand the issue. The Screen cannot display fractional character positions anyway, so why would this make any difference? My current guess is that the adequate position is being truncaded rather then rounded, and that would cause in the worse case a 1 pixel difference from where

Re: [lazarus] Adding AllowFractionalPositioning to TCarbonDeviceContext

2007-11-04 Thread Colin Western
Felipe Monteiro de Carvalho wrote: Hi, I don't understand the issue. The Screen cannot display fractional character positions anyway, so why would this make any difference? There is a rather nice demo of how to do exactly that at: http://antigrain.com/research/font_rasterization/index.html

Re: [lazarus] Adding AllowFractionalPositioning to TCarbonDeviceContext

2007-11-04 Thread Mattias Gaertner
On Sun, 4 Nov 2007 20:43:29 +0100 Felipe Monteiro de Carvalho [EMAIL PROTECTED] wrote: Hi, I don't understand the issue. The Screen cannot display fractional character positions anyway, so why would this make any difference? Yes, it can - with antialising. gtk/pango knows fractional

Re: [lazarus] Adding AllowFractionalPositioning to TCarbonDeviceContext

2007-11-04 Thread willem
In my opinion lazarus should be delphi compatible. I know of other users who will switch to lazarus if 100 % compatibility is achieved. regards Giuliano Colla schreef: Mattias Gaertner ha scritto: On Sun, 04 Nov 2007 15:15:41 +0100 Tobias Giesen [EMAIL PROTECTED] wrote: Hello, if we add

Re: [lazarus] Adding AllowFractionalPositioning to TCarbonDeviceContext

2007-11-04 Thread Mattias Gaertner
On Sun, 04 Nov 2007 18:29:40 +0100 Giuliano Colla [EMAIL PROTECTED] wrote: Mattias Gaertner ha scritto: On Sun, 04 Nov 2007 15:15:41 +0100 Tobias Giesen [EMAIL PROTECTED] wrote: Hello, if we add the property to TCarbonDeviceContext, is that accessible from a custom component

Re: [lazarus] Adding AllowFractionalPositioning to TCarbonDeviceContext

2007-11-04 Thread Mattias Gaertner
On Sun, 04 Nov 2007 23:51:48 +0100 willem [EMAIL PROTECTED] wrote: In my opinion lazarus should be delphi compatible. I got the feeling my example was misunderstood. The example shows, how to extend the carbon intf and access it from an LCL application. This way the LCL is kept Delphi

Re: [lazarus] Adding AllowFractionalPositioning to TCarbonDeviceContext

2007-11-04 Thread Giuliano Colla
Hess, Philip J ha scritto: I agree with Giuliano, so add me to the ranks of the horrified. TFont.Pitch doesn't appear to be used in any LCL or Carbon widgetset logic, so that might work. Please be sure to document in the patch that this is used only as a switch and has nothing to do with mono

Re: [lazarus] Adding AllowFractionalPositioning to TCarbonDeviceContext

2007-11-04 Thread Giuliano Colla
Mattias Gaertner ha scritto: On Sun, 04 Nov 2007 18:29:40 +0100 Giuliano Colla [EMAIL PROTECTED] wrote: [...] There's a Font property, Pitch, which is intended exactly for this purpose. Its possible values are fpdefault (i.e. use the font pitch as defined in the font itself), fpfixed