[Re: [lazarus] cvs changes]

Michal Bukovjan mbukovjan at netscape.net
Fri Jan 21 05:46:10 EST 2000


Marc,

I still claim that switching to AllocMem removed lots of weird messages and
the font displayed is now *CORRECT* - this is what I see, so please if nothing
changes for you, don't change it back. I tried that and it only breaks the
font again.

I can also replace all appropriate Dispose calls with FreeMem, to preserve the
pairs, or maybe I could switch back to New and zero the memory manually.

About the HWND (HDC) = 0. Do you think the best way would be to pregenerate a
DC which would have correct properties (for example in initialization part of
gtkwinapi.pp unit) or should we handle the HDC = 0 in each call like GetDC,
SelectObject, etc. separately?

As for the resolution, this may be left from when I was debugging and trying
to figure out why the font displayed is not like expected. You are right and I
will change it back to '*' if it is not already done. The reason I changed it
is because you (or the code :-) assumes that you are running at 120 dpi
resolution, which is not my case (I have 75).

Michal Bukovjan


"Marc Weustink" <Marc.Weustink at cuperus.nl> wrote:
> + From: Michal Bukovjan [mailto:mbukovjan at netscape.net]
> + 
> + New should also work, but it does not zero memory upon 
> + allocation. This was causing all sorts of things, 
> + instead of font of size 10 normal I was getting
> + font 14 italics, etc.
> + You could also see tons of messages like XLFD : could not find
> + courier-*-*-1254545465-14545412-* and other nonsense.
> + 
> + As I changed it to AllocMem, fonts display OK and the error 
> + messages about fonts mostly disappeared.
> 
> It didn't change anything for me, I get still these messages. 
> Second, the origin of these messages is not the memory being 
> zeroed but the fact that GetFont doesn't return valid info 
> on a DC with HWND=0. Thats a part that had a low priority 
> to me so I didn't fix it yet.
> 
> Another thing to keep in mind is that AllocMem/FreeMem and 
> New/Despose should be used together. Since the rest of the 
> API uses dispose, I prefer to use New instead of AllocMem
> 
> Something else.
> I allso saw that you changed the pointsize and the resolution 
> of the XLFD. As far as my docs go this shouldn't be done since
> we are using the font height (and not point size). If you're 
> using font height the pointsize should be empty and a resolution
> should only be given if a pointsize is used. Do you have other 
> sources of info ?
> 
> 
> Marc
> 
> _________________________________________________________________
>      To unsubscribe: mail lazarus-request at miraclec.com with
>                 "unsubscribe" as the Subject
>     archives at http://www.miraclec.com/list_archives/lazarus


____________________________________________________________________
Get your own FREE, personal Netscape WebMail account today at http://webmail.netscape.com.






More information about the Lazarus mailing list