Forum     Help     Donate
13,019 free fonts, 339 visitors online
Login or register»
Abstract Fonts - 13019 free fonts
Random Font
Searching for 'zeroes'

(1) Forum matches | View All Forum Results
1 posts view forum post #6724 Alex, your code looks a lot simpler. I tried it, and it doesn't return zero. But it returns 4, no matter which font I select! Even ::GetGlyphOutline() which earlier returned zero, now returns 4. (See my question, end part). I wrote the buffer to a file, and checked those four bytes it had written and they all turned out to be zeroes. I'm posting the code of my function here, see if you can find any problems! CDC dc; CFont font; font.CreateFontIndirect(&logfont); dc.CreateCompatibleDC(NULL); dc.SelectObject(&font); char tmpstr[50]=""; void* buffer;//=NULL; const MAT2 transmat={1,0,0,1}; GLYPHMETRICS glyphmetrics; int bufsize=0; bufsize=dc.GetGlyphOutline('A',GGO_BITMAP,&glyphmetrics,0,NULL,&transmat); if(bufsize==GDI_ERROR) MessageBox("error"); buffer=malloc(bufsize); dc.GetGlyphOutline('A',GGO_BITMAP,&glyphmetrics,bufsize,buffer,&transmat); sprintf(tmpstr,"%u",bufsize); MessageBox(tmpstr); [/b:790d19a291] I wonder what the problem is. Outside this func. I have the following code: fontdialog.GetCurrentFont(&logfont);[/b:790d19a291] where fontdilaog is a font selection dialog. What could be the problem :(? In selecting the font in CFont object font? Earlier, I had made font it the member var. of the class which has this function code, and it gave a debug assertion error, and took me to a func called CGDIObject::Attach() or something like that. I wonder where the problem is :(
(10) Related keywords
No category matches
No designer matches

(3) Commercial matches | Hide

(3) Free Fonts

Forum - Font Catalogs (PDF) - Complete font list - Help - Contact us - Link to Abstract Fonts | server #9 | | copyright © abstract fonts government of canada