Problem with: Use the following method to smooth edges of screen fonts: if ClearType is selected

A

active

In control panel/Display/Appearance/Effects if :

'Use the following method to smooth edges of screen fonts' is checked and

ClearType is selected in the combobox (no problem if Standard is selected)

I get a crazy font display in parts of my picturebox.



Do you have any info regarding this?





Thanks for any help!
 
R

rowe_newsgroups

In control panel/Display/Appearance/Effects if :

'Use the following method to smooth edges of screen fonts' is checked and

ClearType is selected in the combobox (no problem if Standard is selected)

I get a crazy font display in parts of my picturebox.

Do you have any info regarding this?

Thanks for any help!

You don't have a small sample app that demonstrates this do you? I
have been experimenting and can't get the error to reproduce.

Thanks,

Seth Rowe
 
A

active

No, It's really a complex application with library and a few projects.

But by checking and unchecking and selecting Standard or ClearType many
times while not changing anything else I can verify what I said.

The font looks like it's been printed twice, with poor registration.
Once blue and once red.

Thanks a lot for trying
 
R

rowe_newsgroups

No, It's really a complex application with library and a few projects.

But by checking and unchecking and selecting Standard or ClearType many
times while not changing anything else I can verify what I said.

The font looks like it's been printed twice, with poor registration.
Once blue and once red.

Thanks a lot for trying

I've had plenty of problems with ClearType displaying correctly, but
not in any of my applications. I notice plenty of font "smearing" in
MS Access 2007 forms and Powerpoint.

Have you tried forcing the picturebox to refresh itself by calling
PictureBox.Invalidate() or PictureBox.Refresh()? I not sure if the
picturebox supports them, but you could even experiment with
Control.SetStyle and tell the picturebox to use
(Optimized)DoubleBuffer or maybe Antialiasing - perhaps one of those
will clear up the font.

By the way, how are you putting the text into the picturebox? Are you
printing it with GDI DrawString or using a label etc...

Thanks,

Seth Rowe
 
H

Herfried K. Wagner [MVP]

active said:
But by checking and unchecking and selecting Standard or ClearType many
times while not changing anything else I can verify what I said.

The font looks like it's been printed twice, with poor registration.
Once blue and once red.

This behavior is "by design" but can be fixed. The problem arises from the
way ClearType increases readability: RGB values of certain pixels
surrounding the text are manipulated. By drawing the same text several
times at the same position, those values get added up and are shown in the
wrong color. What you have to do is simply clearing the area on which you
want to draw the text.
 
A

active

I don't know why this Clear fixes it but I found by cut and try that it
does.

It occurred to me that I don't know what the bitmap pixels are set to if I
don't initialize (clear) them.

Do you know?

I suppose an un-initialize background might have some value that causes
problems.

Comment?



thanks
 
A

active

Trying things I found that initializing the bitmap to some color before I
draw the strings fixes it.
I don't know what the bitmap pixels are set to if I don't initialize them.

Do you know?

Thanks again
 
A

active

The pixel values of a newly created bitmap are (0,0,0,0)
Transparent black.

Sort of a wierd color to draw strings on.

My bitmap displays a white but I now believe it's the background pixels I
see, not the Image (bitmap) pixels.

Don't know what smooth edges does but doing it with transparent black might
be the problem.

Do you know of a description of what smooth edges does?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top