mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-23 20:01:22 +00:00
use unicode structures
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@24440 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6d7783d6ef
commit
cb05788788
2 changed files with 7 additions and 7 deletions
|
@ -104,7 +104,7 @@ NSString *win32_font_family(NSString *fontName)
|
||||||
|
|
||||||
static
|
static
|
||||||
void add_font(NSMutableArray *fontDefs, NSString *fontName,
|
void add_font(NSMutableArray *fontDefs, NSString *fontName,
|
||||||
ENUMLOGFONTEXW *lpelfe, NEWTEXTMETRICEX *lpntme)
|
ENUMLOGFONTEXW *lpelfe, NEWTEXTMETRICEXW *lpntme)
|
||||||
{
|
{
|
||||||
NSArray *fontDef;
|
NSArray *fontDef;
|
||||||
NSString *fontStyle;
|
NSString *fontStyle;
|
||||||
|
@ -133,7 +133,7 @@ void add_font(NSMutableArray *fontDefs, NSString *fontName,
|
||||||
[fontDefs addObject: fontDef];
|
[fontDefs addObject: fontDef];
|
||||||
}
|
}
|
||||||
|
|
||||||
int CALLBACK fontenum(ENUMLOGFONTEXW *lpelfe, NEWTEXTMETRICEX *lpntme,
|
int CALLBACK fontenum(ENUMLOGFONTEXW *lpelfe, NEWTEXTMETRICEXW *lpntme,
|
||||||
DWORD FontType, LPARAM lParam)
|
DWORD FontType, LPARAM lParam)
|
||||||
{
|
{
|
||||||
NSString *fontName;
|
NSString *fontName;
|
||||||
|
@ -166,7 +166,7 @@ void enumerate_font(NSMutableArray *fontDefs, NSString *fontFamily)
|
||||||
RELEASE(pool);
|
RELEASE(pool);
|
||||||
}
|
}
|
||||||
|
|
||||||
int CALLBACK fontfamilyenum(ENUMLOGFONTEXW *lpelfe, NEWTEXTMETRICEX *lpntme,
|
int CALLBACK fontfamilyenum(ENUMLOGFONTEXW *lpelfe, NEWTEXTMETRICEXW *lpntme,
|
||||||
DWORD FontType, LPARAM lParam)
|
DWORD FontType, LPARAM lParam)
|
||||||
{
|
{
|
||||||
NSString *fontName;
|
NSString *fontName;
|
||||||
|
@ -230,7 +230,7 @@ int CALLBACK fontfamilyenum(ENUMLOGFONTEXW *lpelfe, NEWTEXTMETRICEX *lpntme,
|
||||||
if (!done)
|
if (!done)
|
||||||
{
|
{
|
||||||
HDC hdc;
|
HDC hdc;
|
||||||
LOGFONT logfont;
|
LOGFONTW logfont;
|
||||||
int res;
|
int res;
|
||||||
CREATE_AUTORELEASE_POOL(pool);
|
CREATE_AUTORELEASE_POOL(pool);
|
||||||
|
|
||||||
|
@ -244,7 +244,7 @@ int CALLBACK fontfamilyenum(ENUMLOGFONTEXW *lpelfe, NEWTEXTMETRICEX *lpntme,
|
||||||
// This get ignored
|
// This get ignored
|
||||||
logfont.lfItalic = 0;
|
logfont.lfItalic = 0;
|
||||||
logfont.lfWeight = FW_NORMAL;
|
logfont.lfWeight = FW_NORMAL;
|
||||||
res = EnumFontFamiliesEx(hdc, &logfont, (FONTENUMPROC)fontfamilyenum,
|
res = EnumFontFamiliesExW(hdc, &logfont, (FONTENUMPROCW)fontfamilyenum,
|
||||||
(LPARAM)self, 0);
|
(LPARAM)self, 0);
|
||||||
|
|
||||||
ReleaseDC(NULL, hdc);
|
ReleaseDC(NULL, hdc);
|
||||||
|
|
|
@ -204,7 +204,7 @@ NSString *win32_font_family(NSString *fontName);
|
||||||
- (BOOL) setupAttributes
|
- (BOOL) setupAttributes
|
||||||
{
|
{
|
||||||
HDC hdc;
|
HDC hdc;
|
||||||
TEXTMETRIC metric;
|
TEXTMETRICW metric;
|
||||||
HFONT old;
|
HFONT old;
|
||||||
LOGFONTW logfont;
|
LOGFONTW logfont;
|
||||||
NSRange range;
|
NSRange range;
|
||||||
|
@ -238,7 +238,7 @@ NSString *win32_font_family(NSString *fontName);
|
||||||
}
|
}
|
||||||
|
|
||||||
old = SelectObject(hdc, hFont);
|
old = SelectObject(hdc, hFont);
|
||||||
GetTextMetrics(hdc, &metric);
|
GetTextMetricsW(hdc, &metric);
|
||||||
SelectObject(hdc, old);
|
SelectObject(hdc, old);
|
||||||
ReleaseDC(NULL, hdc);
|
ReleaseDC(NULL, hdc);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue