hi Herbert, Thank you for your suggestion. I didn't apply SetFont() before calling >> UpdateFromHDC(). But I don't know how to generate parameters for >> WinSalGraphics::SetFont in my scenario. >> > > Mostly set ImplFontSelectData's mpFontData member and set some useful > defaults (e.g. mnHeight=mfExactHeight=16, mnWidth=0, mnOrientation=0, > mbVertical=false, etc.) before calling SetFont. I'd do all of the HDC > mangling business outside of the EnumFontFamiliesEx loop though.
Thank you for your kind help. It seems a little complex. Is there any other way to set right CAMP to the ImplWinFontData object. I just need to know if a font contains the missing characters. I failed to find a appropriate Windows API to get that information before I try function HasChar(). > > > So many similar classes related font such as ImplFontData, >> ImplFontSelectData, ImplWinFontData make me confused very much. >> > > I know what you mean. The class names should be renamed for more clarity as > I suggested in the vcl/inc/outfont.hxx comments (e.g. ImplFontData to > PhysicalFontFace, ImplFontCache to LogicalFontManager, ImplDevFontListData > to PhysicalFontFamily, ImplFontEntry to LogicalFontInstance, > ImplFontSelectData to PhysicalFontRequest, etc.) On the other hand renaming > classes that have been in the source tree for much longer than even > longtimers are working on the project does not always help. Neither for > developers and especially not for automatic tools like stacktrace-matchers. > > May I enumerate the fonts in mpFontList of OutPutDevice instead of >> EnumFontFamiliesExW for performance consideration. >> > > Yes, you should do it outside of the EnumFontFamilies loop. Iterate over > every ImplFontData entry of every maDevFontList element and ignore all fonts > that only provide a default ImplFontCharMap. > > > --- > Herbert Duerr > [email protected] > > Many thanks. Yanmin Jia
