mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-23 20:01:22 +00:00
Set cbThis element of GLYPHSET structure before calling Windows funtion.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@27325 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
cc3aa3610d
commit
c6461004e3
2 changed files with 18 additions and 1 deletions
|
@ -1,4 +1,9 @@
|
|||
2008-11-20 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
2008-12-17 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/winlib/WIN32FontInfo.m (-coveredCharacterSet): Set cbThis
|
||||
element of GLYPHSET structure before calling Windows funtion.
|
||||
|
||||
2008-12-17 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Tools/gpbs.m: Remove use of private method for connection keepalive.
|
||||
Keepalive is now enabled in base when necessary.
|
||||
|
|
|
@ -201,12 +201,24 @@ NSLog(@"No glyph for U%d", c);
|
|||
HFONT old;
|
||||
|
||||
ms = [NSMutableCharacterSet new];
|
||||
if (!ms)
|
||||
return nil;
|
||||
|
||||
hdc = CreateCompatibleDC(NULL);
|
||||
old = SelectObject(hdc, hFont);
|
||||
count = (unsigned)GetFontUnicodeRanges(hdc, 0);
|
||||
if (count > 0)
|
||||
{
|
||||
gs = (GLYPHSET*)objc_malloc(count);
|
||||
if (!gs)
|
||||
{
|
||||
SelectObject(hdc, old);
|
||||
DeleteDC(hdc);
|
||||
RELEASE(ms);
|
||||
return nil;
|
||||
}
|
||||
|
||||
gs->cbThis = count;
|
||||
if ((unsigned)GetFontUnicodeRanges(hdc, gs) == count)
|
||||
{
|
||||
numberOfGlyphs = gs->cGlyphsSupported;
|
||||
|
|
Loading…
Reference in a new issue