Windows Fonts: Changing lfQuality in UIDLGLOGFONT within wxWidgets does not work well

136 views Asked by At

i'm trying to change the Font quality of a wxFont object. I use:

SetNativeFontInfo("0; -16; 0; 0; 0; 700; 0; 0; 0; 1; 0; 0; 3; 48; Consolas");

to set the Font quality. Internally wxWdigets changes a UIDLGLOGFONT struct. The "3" represents the field lfQuality

#define NONANTIALIASED_QUALITY  3

That works fine. However the font family is changed somehow with only the quality token changed. The font is changed from a sans serif fixed font to a fixed font with serifs. Thats a big problem for me.

I looked further and found this when i looked up the internal values for font family:

msdn UIDLGLOGFONT.lfPitchAndFamily Field

in my case wxWidgets set UIDLGLOGFONT.lfPitchAndFamily to 48 which translates to FF_MODERN:

Fonts with constant stroke width (monospace), with or without serifs. Monospace fonts are usually modern. Pica, Elite, and Courier New are examples.

Why does it state "with or without serifs"? How do you change the quality under wxWidgets without adding serifs?

0

There are 0 answers