Board index » delphi » Need clearer text in preview....

Need clearer text in preview....

OK, so I've finished building  my print preview component. Everything
works great. I built a structure to store all the print commands so
they can be replayed to build any page inside a TImage at any zoom
ratio. It prints boxes, graphics, text, etc. all the good stuff. I use
all the API device methods to get the metrics, pixels per inch, etc...

Now, the problem is that at less than about 80% zoom factor, the text
on the page seems to become "fuzzy" or distorted, I assume because of
the adjustment of the PixelsPerInch property of the TImage.canvas.font
which is how I adjust the text font size. Is there a way that a
"clearer" picture of the text can be obtained or am I stuck with it? I
have also tried to scale the canvas.font.size by the ratio but it
seems worse. I
hesitate to post the code because it involves 3 different units and is
larger than what should be posted here. I would be happy to supply it
to anyone who wants to look at it to see if you can help.

Thanks,

Woody

 

Re:Need clearer text in preview....


Maybe it is becoming fuzzy because of the anti aliasing which windows can
now do for fonts.
Its usually turned on and off using TweakUI, from the control panel. Turn
off Font Smoothing and see if this improves the preview sharpness. If it
does, then yiou will need to look at programatically turning off smoothing
for the duration of the preview, or possibly just for the preview DC, if
that is possible.

Paul Chapman

Quote
Woody wrote in message <74mrfi$c9...@forums.borland.com>...
>OK, so I've finished building  my print preview component. Everything
>works great. I built a structure to store all the print commands so
>they can be replayed to build any page inside a TImage at any zoom
>ratio. It prints boxes, graphics, text, etc. all the good stuff. I use
>all the API device methods to get the metrics, pixels per inch, etc...

>Now, the problem is that at less than about 80% zoom factor, the text
>on the page seems to become "fuzzy" or distorted, I assume because of
>the adjustment of the PixelsPerInch property of the TImage.canvas.font
>which is how I adjust the text font size. Is there a way that a
>"clearer" picture of the text can be obtained or am I stuck with it? I
>have also tried to scale the canvas.font.size by the ratio but it
>seems worse. I
>hesitate to post the code because it involves 3 different units and is
>larger than what should be posted here. I would be happy to supply it
>to anyone who wants to look at it to see if you can help.

>Thanks,

>Woody

Other Threads