Re: CreateFont - create font of exact size / font mapper
From: James Brown (remove_james_dot_brown7_at_virgin_dot_net)
Date: 01/06/05
- Next message: John Carson: "Re: Splitter Windows"
- Previous message: RLN: "Re: ScreenSaver"
- In reply to: mandards_at_gmail.com: "CreateFont - create font of exact size / font mapper"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 6 Jan 2005 09:17:22 -0000
<mandards@gmail.com> wrote in message
news:1104837319.527466.252180@f14g2000cwb.googlegroups.com...
> Hi,
>
> I have to implement a functionality in which user mentions the point
> size for the font to be applied on a text box. I am developing this in
> pure Win32 GDI, without any MFC help.
>
> I have used MulDiv operation to convert the point size to obtain height
> of the required font and then subsequently used this height in the
> CreateFont API.
>
> The font mapper in CreateFont "looks for the largest font that does not
> exceed the requested size" ... as mentioned in the help for the
> CreateFont API in MSDN.
>
> Consequently, a range of requested font heights (calculated above) are
> mapped to single font size. This results into sudden increments in the
> rendered font.
>
> I wish to know how I can create a font of the exact height as
> calculated using MulDiv or in other words overcome the font height
> related behaviour of the font mapper.
> All suggestions are welcome!
>
> Thanks and regards,
> Mandar
>
There is an interesting chapter on these issues in the book
"Windows Graphics Programming" by Feng Yuang, the entire
book is from the win32 perspective - I can only suggest you buy a copy..
James
--- www.catch22.net Free win32 software, sourcecode and tutorials
- Next message: John Carson: "Re: Splitter Windows"
- Previous message: RLN: "Re: ScreenSaver"
- In reply to: mandards_at_gmail.com: "CreateFont - create font of exact size / font mapper"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|