mirror of
https://github.com/reactos/reactos.git
synced 2025-04-18 03:34:11 +00:00
Introduce ANSI version of LOGFONT and associated structures
svn path=/trunk/; revision=4433
This commit is contained in:
parent
96719caa15
commit
52dfe36e11
7 changed files with 218 additions and 88 deletions
|
@ -1857,7 +1857,7 @@ CopyMetaFileA(HMETAFILE, LPCSTR);
|
||||||
|
|
||||||
HFONT
|
HFONT
|
||||||
STDCALL
|
STDCALL
|
||||||
CreateFontIndirectA(CONST LOGFONT *);
|
CreateFontIndirectA(CONST LOGFONTA *);
|
||||||
|
|
||||||
HDC
|
HDC
|
||||||
STDCALL
|
STDCALL
|
||||||
|
@ -1878,7 +1878,7 @@ DeviceCapabilitiesA(LPCSTR, LPCSTR, WORD,
|
||||||
|
|
||||||
int
|
int
|
||||||
STDCALL
|
STDCALL
|
||||||
EnumFontFamiliesExA(HDC, LPLOGFONT, FONTENUMEXPROC, LPARAM,DWORD);
|
EnumFontFamiliesExA(HDC, LPLOGFONTA, FONTENUMEXPROC, LPARAM,DWORD);
|
||||||
|
|
||||||
int
|
int
|
||||||
STDCALL
|
STDCALL
|
||||||
|
|
|
@ -472,7 +472,7 @@ typedef struct {
|
||||||
LPCTSTR lpTemplateName;
|
LPCTSTR lpTemplateName;
|
||||||
} CHOOSECOLOR, *LPCHOOSECOLOR;
|
} CHOOSECOLOR, *LPCHOOSECOLOR;
|
||||||
|
|
||||||
typedef struct tagLOGFONT {
|
typedef struct tagLOGFONTA {
|
||||||
LONG lfHeight;
|
LONG lfHeight;
|
||||||
LONG lfWidth;
|
LONG lfWidth;
|
||||||
LONG lfEscapement;
|
LONG lfEscapement;
|
||||||
|
@ -486,8 +486,8 @@ typedef struct tagLOGFONT {
|
||||||
BYTE lfClipPrecision;
|
BYTE lfClipPrecision;
|
||||||
BYTE lfQuality;
|
BYTE lfQuality;
|
||||||
BYTE lfPitchAndFamily;
|
BYTE lfPitchAndFamily;
|
||||||
TCHAR lfFaceName[LF_FACESIZE];
|
CHAR lfFaceName[LF_FACESIZE];
|
||||||
} LOGFONT, *LPLOGFONT, *PLOGFONT;
|
} LOGFONTA, *LPLOGFONTA, *PLOGFONTA;
|
||||||
|
|
||||||
typedef struct tagLOGFONTW {
|
typedef struct tagLOGFONTW {
|
||||||
LONG lfHeight;
|
LONG lfHeight;
|
||||||
|
@ -506,24 +506,61 @@ typedef struct tagLOGFONTW {
|
||||||
WCHAR lfFaceName[LF_FACESIZE];
|
WCHAR lfFaceName[LF_FACESIZE];
|
||||||
} LOGFONTW, *LPLOGFONTW, *PLOGFONTW;
|
} LOGFONTW, *LPLOGFONTW, *PLOGFONTW;
|
||||||
|
|
||||||
typedef struct {
|
#ifdef UNICODE
|
||||||
|
typedef LOGFONTW LOGFONT;
|
||||||
|
typedef LPLOGFONTW LPLOGFONT;
|
||||||
|
typedef PLOGFONTW PLOGFONT;
|
||||||
|
#else
|
||||||
|
typedef LOGFONTA LOGFONT;
|
||||||
|
typedef LPLOGFONTA LPLOGFONT;
|
||||||
|
typedef PLOGFONTA PLOGFONT;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef struct tagCHOOSEFONTA {
|
||||||
DWORD lStructSize;
|
DWORD lStructSize;
|
||||||
HWND hwndOwner;
|
HWND hwndOwner;
|
||||||
HDC hDC;
|
HDC hDC;
|
||||||
LPLOGFONT lpLogFont;
|
LPLOGFONTA lpLogFont;
|
||||||
INT iPointSize;
|
INT iPointSize;
|
||||||
DWORD Flags;
|
DWORD Flags;
|
||||||
DWORD rgbColors;
|
DWORD rgbColors;
|
||||||
LPARAM lCustData;
|
LPARAM lCustData;
|
||||||
LPCFHOOKPROC lpfnHook;
|
LPCFHOOKPROC lpfnHook;
|
||||||
LPCTSTR lpTemplateName;
|
LPCSTR lpTemplateName;
|
||||||
HINSTANCE hInstance;
|
HINSTANCE hInstance;
|
||||||
LPTSTR lpszStyle;
|
LPSTR lpszStyle;
|
||||||
WORD nFontType;
|
WORD nFontType;
|
||||||
WORD ___MISSING_ALIGNMENT__;
|
WORD ___MISSING_ALIGNMENT__;
|
||||||
INT nSizeMin;
|
INT nSizeMin;
|
||||||
INT nSizeMax;
|
INT nSizeMax;
|
||||||
} CHOOSEFONT, *LPCHOOSEFONT;
|
} CHOOSEFONTA, *LPCHOOSEFONTA;
|
||||||
|
|
||||||
|
typedef struct tagCHOOSEFONTW {
|
||||||
|
DWORD lStructSize;
|
||||||
|
HWND hwndOwner;
|
||||||
|
HDC hDC;
|
||||||
|
LPLOGFONTW lpLogFont;
|
||||||
|
INT iPointSize;
|
||||||
|
DWORD Flags;
|
||||||
|
DWORD rgbColors;
|
||||||
|
LPARAM lCustData;
|
||||||
|
LPCFHOOKPROC lpfnHook;
|
||||||
|
LPCWSTR lpTemplateName;
|
||||||
|
HINSTANCE hInstance;
|
||||||
|
LPWSTR lpszStyle;
|
||||||
|
WORD nFontType;
|
||||||
|
WORD ___MISSING_ALIGNMENT__;
|
||||||
|
INT nSizeMin;
|
||||||
|
INT nSizeMax;
|
||||||
|
} CHOOSEFONTW, *LPCHOOSEFONTW;
|
||||||
|
|
||||||
|
#ifdef UNICODE
|
||||||
|
typedef CHOOSEFONTW CHOOSEFONT;
|
||||||
|
typedef LPCHOOSEFONTW LPCHOOSEFONT;
|
||||||
|
#else
|
||||||
|
typedef CHOOSEFONTA CHOOSEFONT;
|
||||||
|
typedef LPCHOOSEFONTA LPCHOOSEFONT;
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct _IDA {
|
typedef struct _IDA {
|
||||||
UINT cidl;
|
UINT cidl;
|
||||||
|
@ -1283,24 +1320,45 @@ typedef struct tagPANOSE {
|
||||||
BYTE bXHeight;
|
BYTE bXHeight;
|
||||||
} PANOSE;
|
} PANOSE;
|
||||||
|
|
||||||
typedef struct tagEXTLOGFONT {
|
typedef struct tagEXTLOGFONTA {
|
||||||
LOGFONT elfLogFont;
|
LOGFONTA elfLogFont;
|
||||||
BCHAR elfFullName[LF_FULLFACESIZE];
|
BCHAR elfFullName[LF_FULLFACESIZE];
|
||||||
BCHAR elfStyle[LF_FACESIZE];
|
BCHAR elfStyle[LF_FACESIZE];
|
||||||
DWORD elfVersion;
|
DWORD elfVersion;
|
||||||
DWORD elfStyleSize;
|
DWORD elfStyleSize;
|
||||||
DWORD elfMatch;
|
DWORD elfMatch;
|
||||||
DWORD elfReserved;
|
DWORD elfReserved;
|
||||||
BYTE elfVendorId[ELF_VENDOR_SIZE];
|
BYTE elfVendorId[ELF_VENDOR_SIZE];
|
||||||
DWORD elfCulture;
|
DWORD elfCulture;
|
||||||
PANOSE elfPanose;
|
PANOSE elfPanose;
|
||||||
} EXTLOGFONT;
|
} EXTLOGFONTA, *LPEXTLOGFONTA;
|
||||||
|
|
||||||
|
typedef struct tagEXTLOGFONTW {
|
||||||
|
LOGFONTW elfLogFont;
|
||||||
|
WCHAR elfFullName[LF_FULLFACESIZE];
|
||||||
|
WCHAR elfStyle[LF_FACESIZE];
|
||||||
|
DWORD elfVersion;
|
||||||
|
DWORD elfStyleSize;
|
||||||
|
DWORD elfMatch;
|
||||||
|
DWORD elfReserved;
|
||||||
|
BYTE elfVendorId[ELF_VENDOR_SIZE];
|
||||||
|
DWORD elfCulture;
|
||||||
|
PANOSE elfPanose;
|
||||||
|
} EXTLOGFONTW, *LPEXTLOGFONTW;
|
||||||
|
|
||||||
|
#ifdef UNICODE
|
||||||
|
typedef EXTLOGFONTW EXTLOGFONT;
|
||||||
|
typedef LPEXTLOGFONTW LPEXTLOGFONT;
|
||||||
|
#else
|
||||||
|
typedef EXTLOGFONTA EXTLOGFONT;
|
||||||
|
typedef LPEXTLOGFONTA LPEXTLOGFONT;
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct tagEMREXTCREATEFONTINDIRECTW
|
typedef struct tagEMREXTCREATEFONTINDIRECTW
|
||||||
{
|
{
|
||||||
EMR emr;
|
EMR emr;
|
||||||
DWORD ihFont;
|
DWORD ihFont;
|
||||||
EXTLOGFONT elfw;
|
EXTLOGFONTW elfw;
|
||||||
} EMREXTCREATEFONTINDIRECTW,
|
} EMREXTCREATEFONTINDIRECTW,
|
||||||
PEMREXTCREATEFONTINDIRECTW;
|
PEMREXTCREATEFONTINDIRECTW;
|
||||||
|
|
||||||
|
@ -1864,18 +1922,47 @@ typedef struct _ENUM_SERVICE_STATUSW {
|
||||||
#define LPENUM_SERVICE_STATUS LPENUM_SERVICE_STATUSA
|
#define LPENUM_SERVICE_STATUS LPENUM_SERVICE_STATUSA
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct tagENUMLOGFONT {
|
typedef struct tagENUMLOGFONTA {
|
||||||
LOGFONT elfLogFont;
|
LOGFONTA elfLogFont;
|
||||||
BCHAR elfFullName[LF_FULLFACESIZE];
|
BCHAR elfFullName[LF_FULLFACESIZE];
|
||||||
BCHAR elfStyle[LF_FACESIZE];
|
BCHAR elfStyle[LF_FACESIZE];
|
||||||
} ENUMLOGFONT;
|
} ENUMLOGFONTA, *LPENUMLOGFONTA;
|
||||||
|
|
||||||
typedef struct tagENUMLOGFONTEX {
|
typedef struct tagENUMLOGFONTW {
|
||||||
LOGFONT elfLogFont;
|
LOGFONTW elfLogFont;
|
||||||
BCHAR elfFullName[LF_FULLFACESIZE];
|
WCHAR elfFullName[LF_FULLFACESIZE];
|
||||||
BCHAR elfStyle[LF_FACESIZE];
|
WCHAR elfStyle[LF_FACESIZE];
|
||||||
BCHAR elfScript[LF_FACESIZE];
|
} ENUMLOGFONTW, *LPENUMLOGFONTW;
|
||||||
} ENUMLOGFONTEX;
|
|
||||||
|
#ifdef UNICODE
|
||||||
|
typedef ENUMLOGFONTW ENUMLOGFONT;
|
||||||
|
typedef LPENUMLOGFONTW LPENUMLOGFONT;
|
||||||
|
#else
|
||||||
|
typedef ENUMLOGFONTA ENUMLOGFONT;
|
||||||
|
typedef LPENUMLOGFONTA LPENUMLOGFONT;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef struct tagENUMLOGFONTEXA {
|
||||||
|
LOGFONTA elfLogFont;
|
||||||
|
BCHAR elfFullName[LF_FULLFACESIZE];
|
||||||
|
BCHAR elfStyle[LF_FACESIZE];
|
||||||
|
BCHAR elfScript[LF_FACESIZE];
|
||||||
|
} ENUMLOGFONTEXA, *LPENUMLOGFONTEXA;
|
||||||
|
|
||||||
|
typedef struct tagENUMLOGFONTEXW {
|
||||||
|
LOGFONTW elfLogFont;
|
||||||
|
WCHAR elfFullName[LF_FULLFACESIZE];
|
||||||
|
WCHAR elfStyle[LF_FACESIZE];
|
||||||
|
WCHAR elfScript[LF_FACESIZE];
|
||||||
|
} ENUMLOGFONTEXW, *LPENUMLOGFONTEXW;
|
||||||
|
|
||||||
|
#ifdef UNICODE
|
||||||
|
typedef ENUMLOGFONTEXW ENUMLOGFONTEX;
|
||||||
|
typedef LPENUMLOGFONTEXW LPENUMLOGFONTEX;
|
||||||
|
#else
|
||||||
|
typedef ENUMLOGFONTEXA ENUMLOGFONTEX;
|
||||||
|
typedef LPENUMLOGFONTEXA LPENUMLOGFONTEX;
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct _EVENTLOGRECORD {
|
typedef struct _EVENTLOGRECORD {
|
||||||
DWORD Length;
|
DWORD Length;
|
||||||
|
@ -2180,13 +2267,29 @@ typedef struct _ICONINFO {
|
||||||
HBITMAP hbmColor;
|
HBITMAP hbmColor;
|
||||||
} ICONINFO, *PICONINFO;
|
} ICONINFO, *PICONINFO;
|
||||||
|
|
||||||
typedef struct tagICONMETRICS {
|
typedef struct tagICONMETRICSA {
|
||||||
UINT cbSize;
|
UINT cbSize;
|
||||||
int iHorzSpacing;
|
int iHorzSpacing;
|
||||||
int iVertSpacing;
|
int iVertSpacing;
|
||||||
int iTitleWrap;
|
int iTitleWrap;
|
||||||
LOGFONT lfFont;
|
LOGFONTA lfFont;
|
||||||
} ICONMETRICS, *LPICONMETRICS;
|
} ICONMETRICSA, *LPICONMETRICSA;
|
||||||
|
|
||||||
|
typedef struct tagICONMETRICSW {
|
||||||
|
UINT cbSize;
|
||||||
|
int iHorzSpacing;
|
||||||
|
int iVertSpacing;
|
||||||
|
int iTitleWrap;
|
||||||
|
LOGFONTW lfFont;
|
||||||
|
} ICONMETRICSW, *LPICONMETRICSW;
|
||||||
|
|
||||||
|
#ifdef UNICODE
|
||||||
|
typedef ICONMETRICSW ICONMETRICS;
|
||||||
|
typedef LPICONMETRICSW LPICONMETRICS;
|
||||||
|
#else
|
||||||
|
typedef ICONMETRICSA ICONMETRICS;
|
||||||
|
typedef LPICONMETRICSA LPICONMETRICS;
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct _IMAGEINFO {
|
typedef struct _IMAGEINFO {
|
||||||
HBITMAP hbmImage;
|
HBITMAP hbmImage;
|
||||||
|
@ -2832,23 +2935,49 @@ typedef struct _NM_UPDOWN {
|
||||||
int iDelta;
|
int iDelta;
|
||||||
} NM_UPDOWNW;
|
} NM_UPDOWNW;
|
||||||
|
|
||||||
typedef struct tagNONCLIENTMETRICS {
|
typedef struct tagNONCLIENTMETRICSA {
|
||||||
UINT cbSize;
|
UINT cbSize;
|
||||||
int iBorderWidth;
|
int iBorderWidth;
|
||||||
int iScrollWidth;
|
int iScrollWidth;
|
||||||
int iScrollHeight;
|
int iScrollHeight;
|
||||||
int iCaptionWidth;
|
int iCaptionWidth;
|
||||||
int iCaptionHeight;
|
int iCaptionHeight;
|
||||||
LOGFONT lfCaptionFont;
|
LOGFONTA lfCaptionFont;
|
||||||
int iSmCaptionWidth;
|
int iSmCaptionWidth;
|
||||||
int iSmCaptionHeight;
|
int iSmCaptionHeight;
|
||||||
LOGFONT lfSmCaptionFont;
|
LOGFONTA lfSmCaptionFont;
|
||||||
int iMenuWidth;
|
int iMenuWidth;
|
||||||
int iMenuHeight;
|
int iMenuHeight;
|
||||||
LOGFONT lfMenuFont;
|
LOGFONTA lfMenuFont;
|
||||||
LOGFONT lfStatusFont;
|
LOGFONTA lfStatusFont;
|
||||||
LOGFONT lfMessageFont;
|
LOGFONTA lfMessageFont;
|
||||||
} NONCLIENTMETRICS, * LPNONCLIENTMETRICS;
|
} NONCLIENTMETRICSA, *LPNONCLIENTMETRICSA;
|
||||||
|
|
||||||
|
typedef struct tagNONCLIENTMETRICSW {
|
||||||
|
UINT cbSize;
|
||||||
|
int iBorderWidth;
|
||||||
|
int iScrollWidth;
|
||||||
|
int iScrollHeight;
|
||||||
|
int iCaptionWidth;
|
||||||
|
int iCaptionHeight;
|
||||||
|
LOGFONTW lfCaptionFont;
|
||||||
|
int iSmCaptionWidth;
|
||||||
|
int iSmCaptionHeight;
|
||||||
|
LOGFONTW lfSmCaptionFont;
|
||||||
|
int iMenuWidth;
|
||||||
|
int iMenuHeight;
|
||||||
|
LOGFONTW lfMenuFont;
|
||||||
|
LOGFONTW lfStatusFont;
|
||||||
|
LOGFONTW lfMessageFont;
|
||||||
|
} NONCLIENTMETRICSW, *LPNONCLIENTMETRICSW;
|
||||||
|
|
||||||
|
#ifdef UNICODE
|
||||||
|
typedef NONCLIENTMETRICSW NONCLIENTMETRICS;
|
||||||
|
typedef LPNONCLIENTMETRICSW LPNONCLIENTMETRICS;
|
||||||
|
#else
|
||||||
|
typedef NONCLIENTMETRICSA NONCLIENTMETRICS;
|
||||||
|
typedef LPNONCLIENTMETRICSA LPNONCLIENTMETRICS;
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct _SERVICE_ADDRESS {
|
typedef struct _SERVICE_ADDRESS {
|
||||||
DWORD dwAddressType;
|
DWORD dwAddressType;
|
||||||
|
@ -4298,25 +4427,25 @@ typedef int CALLBACK (*ENUMMETAFILEPROC) (HDC, HANDLETABLE,
|
||||||
typedef int CALLBACK (*ENHMETAFILEPROC) (HDC, HANDLETABLE,
|
typedef int CALLBACK (*ENHMETAFILEPROC) (HDC, HANDLETABLE,
|
||||||
ENHMETARECORD, int, LPARAM);
|
ENHMETARECORD, int, LPARAM);
|
||||||
|
|
||||||
typedef int CALLBACK (*ENUMFONTSPROCA) (LPLOGFONT, LPTEXTMETRICA, DWORD, LPARAM);
|
typedef int CALLBACK (*ENUMFONTSPROCA) (LPLOGFONTA, LPTEXTMETRICA, DWORD, LPARAM);
|
||||||
typedef int CALLBACK (*ENUMFONTSPROCW) (LPLOGFONT, LPTEXTMETRICW, DWORD, LPARAM);
|
typedef int CALLBACK (*ENUMFONTSPROCW) (LPLOGFONTW, LPTEXTMETRICW, DWORD, LPARAM);
|
||||||
#ifdef UNICODE
|
#ifdef UNICODE
|
||||||
typedef ENUMFONTSPROCW ENUMFONTSPROC;
|
typedef ENUMFONTSPROCW ENUMFONTSPROC;
|
||||||
#else
|
#else
|
||||||
typedef ENUMFONTSPROCA ENUMFONTSPROC;
|
typedef ENUMFONTSPROCA ENUMFONTSPROC;
|
||||||
#endif
|
#endif
|
||||||
typedef int CALLBACK (*FONTENUMPROCA) (ENUMLOGFONT *, NEWTEXTMETRICA *,
|
typedef int CALLBACK (*FONTENUMPROCA) (ENUMLOGFONTA *, NEWTEXTMETRICA *,
|
||||||
int, LPARAM);
|
int, LPARAM);
|
||||||
typedef int CALLBACK (*FONTENUMPROCW) (ENUMLOGFONT *, NEWTEXTMETRICW *,
|
typedef int CALLBACK (*FONTENUMPROCW) (ENUMLOGFONTW *, NEWTEXTMETRICW *,
|
||||||
int, LPARAM);
|
int, LPARAM);
|
||||||
#ifdef UNICODE
|
#ifdef UNICODE
|
||||||
typedef FONTENUMPROCW FONTENUMPROC;
|
typedef FONTENUMPROCW FONTENUMPROC;
|
||||||
#else
|
#else
|
||||||
typedef FONTENUMPROCA FONTENUMPROC;
|
typedef FONTENUMPROCA FONTENUMPROC;
|
||||||
#endif
|
#endif
|
||||||
typedef int CALLBACK (*FONTENUMEXPROCA) (ENUMLOGFONTEX *, NEWTEXTMETRICEXA *,
|
typedef int CALLBACK (*FONTENUMEXPROCA) (ENUMLOGFONTEXA *, NEWTEXTMETRICEXA *,
|
||||||
int, LPARAM);
|
int, LPARAM);
|
||||||
typedef int CALLBACK (*FONTENUMEXPROCW) (ENUMLOGFONTEX *, NEWTEXTMETRICEXW *,
|
typedef int CALLBACK (*FONTENUMEXPROCW) (ENUMLOGFONTEXW *, NEWTEXTMETRICEXW *,
|
||||||
int, LPARAM);
|
int, LPARAM);
|
||||||
#ifdef UNICODE
|
#ifdef UNICODE
|
||||||
typedef FONTENUMEXPROCW FONTENUMEXPROC;
|
typedef FONTENUMEXPROCW FONTENUMEXPROC;
|
||||||
|
|
|
@ -1858,7 +1858,7 @@ CopyMetaFileW(HMETAFILE, LPCWSTR);
|
||||||
|
|
||||||
HFONT
|
HFONT
|
||||||
STDCALL
|
STDCALL
|
||||||
CreateFontIndirectW(CONST LOGFONT *);
|
CreateFontIndirectW(CONST LOGFONTW *);
|
||||||
|
|
||||||
HFONT
|
HFONT
|
||||||
STDCALL
|
STDCALL
|
||||||
|
@ -1885,7 +1885,7 @@ DeviceCapabilitiesW(LPCWSTR, LPCWSTR, WORD,
|
||||||
|
|
||||||
int
|
int
|
||||||
STDCALL
|
STDCALL
|
||||||
EnumFontFamiliesExW(HDC, LPLOGFONT, FONTENUMEXPROC, LPARAM, DWORD);
|
EnumFontFamiliesExW(HDC, LPLOGFONTW, FONTENUMEXPROC, LPARAM, DWORD);
|
||||||
|
|
||||||
int
|
int
|
||||||
STDCALL
|
STDCALL
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
/* GDI logical font object */
|
/* GDI logical font object */
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
LOGFONT logfont;
|
LOGFONTW logfont;
|
||||||
|
HFONT GDIFontHandle;
|
||||||
} TEXTOBJ, *PTEXTOBJ;
|
} TEXTOBJ, *PTEXTOBJ;
|
||||||
|
|
||||||
/* Internal interface */
|
/* Internal interface */
|
||||||
|
@ -45,7 +46,7 @@ W32kCreateFont(int Height,
|
||||||
|
|
||||||
HFONT
|
HFONT
|
||||||
STDCALL
|
STDCALL
|
||||||
W32kCreateFontIndirect(CONST LPLOGFONT lf);
|
W32kCreateFontIndirect(CONST LPLOGFONTW lf);
|
||||||
|
|
||||||
BOOL
|
BOOL
|
||||||
STDCALL
|
STDCALL
|
||||||
|
@ -64,7 +65,7 @@ W32kEnumFontFamilies(HDC hDC,
|
||||||
int
|
int
|
||||||
STDCALL
|
STDCALL
|
||||||
W32kEnumFontFamiliesEx(HDC hDC,
|
W32kEnumFontFamiliesEx(HDC hDC,
|
||||||
LPLOGFONT Logfont,
|
LPLOGFONTW Logfont,
|
||||||
FONTENUMPROC EnumFontFamExProc,
|
FONTENUMPROC EnumFontFamExProc,
|
||||||
LPARAM lParam,
|
LPARAM lParam,
|
||||||
DWORD Flags);
|
DWORD Flags);
|
||||||
|
|
|
@ -152,20 +152,20 @@ ExtTextOutW(
|
||||||
HFONT
|
HFONT
|
||||||
STDCALL
|
STDCALL
|
||||||
CreateFontIndirectA(
|
CreateFontIndirectA(
|
||||||
CONST LOGFONT *lf
|
CONST LOGFONTA *lf
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ANSI_STRING StringA;
|
ANSI_STRING StringA;
|
||||||
UNICODE_STRING StringU;
|
UNICODE_STRING StringU;
|
||||||
HFONT ret;
|
HFONT ret;
|
||||||
LOGFONT tlf;
|
LOGFONTW tlf;
|
||||||
|
|
||||||
RtlInitAnsiString(&StringA, (LPSTR)lf->lfFaceName);
|
RtlInitAnsiString(&StringA, (LPSTR)lf->lfFaceName);
|
||||||
RtlAnsiStringToUnicodeString(&StringU, &StringA, TRUE);
|
RtlAnsiStringToUnicodeString(&StringU, &StringA, TRUE);
|
||||||
memcpy(&tlf, lf, sizeof(LOGFONT));
|
memcpy(&tlf, lf, sizeof(LOGFONTA));
|
||||||
memcpy(&tlf.lfFaceName, &StringU.Buffer, StringU.Length);
|
memcpy(&tlf.lfFaceName, &StringU.Buffer, StringU.Length);
|
||||||
|
|
||||||
ret = CreateFontIndirectW((CONST LOGFONT *)&lf);
|
ret = CreateFontIndirectW(&tlf);
|
||||||
|
|
||||||
RtlFreeUnicodeString(&StringU);
|
RtlFreeUnicodeString(&StringU);
|
||||||
|
|
||||||
|
@ -175,10 +175,10 @@ CreateFontIndirectA(
|
||||||
HFONT
|
HFONT
|
||||||
STDCALL
|
STDCALL
|
||||||
CreateFontIndirectW(
|
CreateFontIndirectW(
|
||||||
CONST LOGFONT *lf
|
CONST LOGFONTW *lf
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return W32kCreateFontIndirect((CONST LPLOGFONT)lf);
|
return W32kCreateFontIndirect((CONST LPLOGFONTW)lf);
|
||||||
}
|
}
|
||||||
|
|
||||||
HFONT
|
HFONT
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* GDIOBJ.C - GDI object manipulation routines
|
* GDIOBJ.C - GDI object manipulation routines
|
||||||
*
|
*
|
||||||
* $Id: gdiobj.c,v 1.21 2003/03/08 00:46:14 gvg Exp $
|
* $Id: gdiobj.c,v 1.22 2003/03/26 08:11:53 gvg Exp $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ static LOGPEN BlackPen =
|
||||||
static LOGPEN NullPen =
|
static LOGPEN NullPen =
|
||||||
{ PS_NULL, { 0, 0 }, 0 };
|
{ PS_NULL, { 0, 0 }, 0 };
|
||||||
|
|
||||||
static LOGFONT OEMFixedFont =
|
static LOGFONTW OEMFixedFont =
|
||||||
{ 0, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, OEM_CHARSET,
|
{ 0, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, OEM_CHARSET,
|
||||||
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"" };
|
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"" };
|
||||||
|
|
||||||
|
@ -61,38 +61,38 @@ static LOGFONT OEMFixedFont =
|
||||||
segment, and (c) Solaris assembler is stupid. */
|
segment, and (c) Solaris assembler is stupid. */
|
||||||
static UINT align_OEMFixedFont = 1;
|
static UINT align_OEMFixedFont = 1;
|
||||||
|
|
||||||
static LOGFONT AnsiFixedFont =
|
static LOGFONTW AnsiFixedFont =
|
||||||
{ 0, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
|
{ 0, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
|
||||||
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"" };
|
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"" };
|
||||||
|
|
||||||
static UINT align_AnsiFixedFont = 1;
|
static UINT align_AnsiFixedFont = 1;
|
||||||
|
|
||||||
static LOGFONT AnsiVarFont =
|
static LOGFONTW AnsiVarFont =
|
||||||
{ 0, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
|
{ 0, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
|
||||||
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"MS Sans Serif" };
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"MS Sans Serif" };
|
||||||
|
|
||||||
static UINT align_AnsiVarFont = 1;
|
static UINT align_AnsiVarFont = 1;
|
||||||
|
|
||||||
static LOGFONT SystemFont =
|
static LOGFONTW SystemFont =
|
||||||
{ 0, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
|
{ 0, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
|
||||||
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"System" };
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"System" };
|
||||||
|
|
||||||
static UINT align_SystemFont = 1;
|
static UINT align_SystemFont = 1;
|
||||||
|
|
||||||
static LOGFONT DeviceDefaultFont =
|
static LOGFONTW DeviceDefaultFont =
|
||||||
{ 0, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
|
{ 0, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
|
||||||
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"" };
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"" };
|
||||||
|
|
||||||
static UINT align_DeviceDefaultFont = 1;
|
static UINT align_DeviceDefaultFont = 1;
|
||||||
|
|
||||||
static LOGFONT SystemFixedFont =
|
static LOGFONTW SystemFixedFont =
|
||||||
{ 0, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
|
{ 0, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
|
||||||
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"" };
|
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"" };
|
||||||
|
|
||||||
static UINT align_SystemFixedFont = 1;
|
static UINT align_SystemFixedFont = 1;
|
||||||
|
|
||||||
/* FIXME: Is this correct? */
|
/* FIXME: Is this correct? */
|
||||||
static LOGFONT DefaultGuiFont =
|
static LOGFONTW DefaultGuiFont =
|
||||||
{ 0, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
|
{ 0, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
|
||||||
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"MS Sans Serif" };
|
0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"MS Sans Serif" };
|
||||||
|
|
||||||
|
|
|
@ -164,7 +164,7 @@ W32kCreateFont(int Height,
|
||||||
DWORD PitchAndFamily,
|
DWORD PitchAndFamily,
|
||||||
LPCWSTR Face)
|
LPCWSTR Face)
|
||||||
{
|
{
|
||||||
LOGFONT logfont;
|
LOGFONTW logfont;
|
||||||
|
|
||||||
logfont.lfHeight = Height;
|
logfont.lfHeight = Height;
|
||||||
logfont.lfWidth = Width;
|
logfont.lfWidth = Width;
|
||||||
|
@ -183,14 +183,14 @@ W32kCreateFont(int Height,
|
||||||
if(Face)
|
if(Face)
|
||||||
memcpy(logfont.lfFaceName, Face, sizeof(logfont.lfFaceName));
|
memcpy(logfont.lfFaceName, Face, sizeof(logfont.lfFaceName));
|
||||||
else
|
else
|
||||||
logfont.lfFaceName[0] = '\0';
|
logfont.lfFaceName[0] = L'\0';
|
||||||
|
|
||||||
return W32kCreateFontIndirect(&logfont);
|
return W32kCreateFontIndirect(&logfont);
|
||||||
}
|
}
|
||||||
|
|
||||||
HFONT
|
HFONT
|
||||||
STDCALL
|
STDCALL
|
||||||
W32kCreateFontIndirect(CONST LPLOGFONT lf)
|
W32kCreateFontIndirect(CONST LPLOGFONTW lf)
|
||||||
{
|
{
|
||||||
HFONT hFont = 0;
|
HFONT hFont = 0;
|
||||||
PTEXTOBJ fontPtr;
|
PTEXTOBJ fontPtr;
|
||||||
|
@ -202,7 +202,7 @@ W32kCreateFontIndirect(CONST LPLOGFONT lf)
|
||||||
fontPtr = TEXTOBJ_LockText( hFont );
|
fontPtr = TEXTOBJ_LockText( hFont );
|
||||||
ASSERT( fontPtr ); //I want to know when this happens
|
ASSERT( fontPtr ); //I want to know when this happens
|
||||||
if( fontPtr ){
|
if( fontPtr ){
|
||||||
memcpy(&fontPtr->logfont, lf, sizeof(LOGFONT));
|
memcpy(&fontPtr->logfont, lf, sizeof(LOGFONTW));
|
||||||
|
|
||||||
if (lf->lfEscapement != lf->lfOrientation) {
|
if (lf->lfEscapement != lf->lfOrientation) {
|
||||||
/* this should really depend on whether GM_ADVANCED is set */
|
/* this should really depend on whether GM_ADVANCED is set */
|
||||||
|
@ -230,7 +230,7 @@ int
|
||||||
STDCALL
|
STDCALL
|
||||||
W32kEnumFontFamilies(HDC hDC,
|
W32kEnumFontFamilies(HDC hDC,
|
||||||
LPCWSTR Family,
|
LPCWSTR Family,
|
||||||
FONTENUMPROC EnumFontFamProc,
|
FONTENUMPROCW EnumFontFamProc,
|
||||||
LPARAM lParam)
|
LPARAM lParam)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
UNIMPLEMENTED;
|
||||||
|
@ -239,8 +239,8 @@ W32kEnumFontFamilies(HDC hDC,
|
||||||
int
|
int
|
||||||
STDCALL
|
STDCALL
|
||||||
W32kEnumFontFamiliesEx(HDC hDC,
|
W32kEnumFontFamiliesEx(HDC hDC,
|
||||||
LPLOGFONT Logfont,
|
LPLOGFONTW Logfont,
|
||||||
FONTENUMPROC EnumFontFamExProc,
|
FONTENUMPROCW EnumFontFamExProc,
|
||||||
LPARAM lParam,
|
LPARAM lParam,
|
||||||
DWORD Flags)
|
DWORD Flags)
|
||||||
{
|
{
|
||||||
|
@ -251,7 +251,7 @@ int
|
||||||
STDCALL
|
STDCALL
|
||||||
W32kEnumFonts(HDC hDC,
|
W32kEnumFonts(HDC hDC,
|
||||||
LPCWSTR FaceName,
|
LPCWSTR FaceName,
|
||||||
FONTENUMPROC FontFunc,
|
FONTENUMPROCW FontFunc,
|
||||||
LPARAM lParam)
|
LPARAM lParam)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
UNIMPLEMENTED;
|
||||||
|
@ -612,7 +612,7 @@ W32kTextOut(HDC hDC,
|
||||||
|
|
||||||
for(i=0; i<FontsLoaded; i++)
|
for(i=0; i<FontsLoaded; i++)
|
||||||
{
|
{
|
||||||
if(wcscmp(FontTable[i].FaceName, (LPSTR)TextObj->logfont.lfFaceName) == 0)
|
if(wcscmp(FontTable[i].FaceName, TextObj->logfont.lfFaceName) == 0)
|
||||||
hFont = FontTable[i].hFont;
|
hFont = FontTable[i].hFont;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue