adam@cfi.COM (adam) (05/10/89)
We have written a Windows application that draws a fair amount of text, and does it in several different sizes, styles, and faces. It looks great on our AT with an EGA display. However, when we run it on other machines (i.e. a '386 running Windows/386 and a VGA, and a zenith laptop with a mono CGA) the fonts come out in unexpected sizes and styles. This is especially distressing when it happpens to items like the values on our graph axes. Question: Is there a way to select and use fonts which will preserve port- ability between displays? Currently, I'm using the MM_TEXT map mode, and getting the fonts I want by partially populating a LOGFONT struct and using CreateFontIndirect(). Also, in what is probably a related problem, I have found that if I start my application, then bring up Excel, and then put Excel away, when my application redisplays it shows only garbage (black splotches where the text should be) for certain of my fonts. This does not go away when I cause a repaint of the screen; only re-running my app will fix this. Any suggestions? ===================================================================== "Yes ma'am, I do Windows." -- Adam Marx, The Consumer Financial Institute, Waltham, MA 617-899-6500 {decvax!yale|allegra|ihnp4|ucbvax!cbosgd}!ima!cfisun!adam adam@CFI.COM
cig@genrad.com (Charles I. Ganimian Jr.) (05/17/89)
In article <499@cfisun.UUCP> adam@cfi.COM (Adam Marx -CFI-) writes: >We have written a Windows application that draws a fair amount of text, >and does it in several different sizes, styles, and faces. It looks great >on our AT with an EGA display. However, when we run it on other machines >(i.e. a '386 running Windows/386 and a VGA, and a zenith laptop with a >mono CGA) the fonts come out in unexpected sizes and styles. This is >especially distressing when it happpens to items like the values on our >graph axes. > >Question: Is there a way to select and use fonts which will preserve port- >ability between displays? > I would also like to know how to do this. >Currently, I'm using the MM_TEXT map mode, and getting the fonts I want by >partially populating a LOGFONT struct and using CreateFontIndirect(). > > >Also, in what is probably a related problem, I have found that if I start >my application, then bring up Excel, and then put Excel away, when my >application redisplays it shows only garbage (black splotches where the >text should be) for certain of my fonts. This does not go away when I >cause a repaint of the screen; only re-running my app will fix this. >Any suggestions? > >"Yes ma'am, I do Windows." The problem is that for some reason excel (and some other appps) will leave you in a state where you end up with the "PREVIEW" font, instead of the font you had. I had the same problem using the system font in my app, what I had to do was to make sure I selected the system font every time I got a font and not ASSumed that I would get it. Oh well just another week burned away... good luck charlie g. p.s. to check if I was right check to see what font you have, I forget the function but I think it is GetTextFace