Author: jimtabor
Date: Wed Jul 4 22:44:52 2012
New Revision: 56829
URL:
http://svn.reactos.org/svn/reactos?rev=56829&view=rev
Log:
[Gdi32]
- Implement support for TCI_SRCLOCALE.
Modified:
trunk/reactos/include/psdk/wingdi.h
trunk/reactos/win32ss/gdi/gdi32/objects/font.c
Modified: trunk/reactos/include/psdk/wingdi.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/wingdi.h?rev=…
==============================================================================
--- trunk/reactos/include/psdk/wingdi.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/wingdi.h [iso-8859-1] Wed Jul 4 22:44:52 2012
@@ -952,6 +952,7 @@
#define TCI_SRCCHARSET 1
#define TCI_SRCCODEPAGE 2
#define TCI_SRCFONTSIG 3
+#define TCI_SRCLOCALE 4096
#if (_WIN32_WINNT >= 0x0500)
#define SHADEBLENDCAPS 120
#define COLORMGMTCAPS 121
Modified: trunk/reactos/win32ss/gdi/gdi32/objects/font.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/gdi32/objects/…
==============================================================================
--- trunk/reactos/win32ss/gdi/gdi32/objects/font.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/gdi32/objects/font.c [iso-8859-1] Wed Jul 4 22:44:52 2012
@@ -1785,10 +1785,24 @@
case TCI_SRCCHARSET:
while (index < MAXTCIINDEX && PtrToUlong(lpSrc) !=
FONT_tci[index].ciCharset) index++;
break;
+ case TCI_SRCLOCALE:
+ {
+ LCID lCid = (LCID)PtrToUlong(lpSrc);
+ LOCALESIGNATURE LocSig;
+ INT Ret = GetLocaleInfoW(lCid, LOCALE_FONTSIGNATURE, (LPWSTR)&LocSig, 0);
+ if ( GetLocaleInfoW(lCid, LOCALE_FONTSIGNATURE, (LPWSTR)&LocSig, Ret))
+ {
+ while (index < MAXTCIINDEX && !(LocSig.lsCsbDefault[0]>>index
& 0x0001)) index++;
+ break;
+ }
+ }
default:
+ GdiSetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
if (index >= MAXTCIINDEX || FONT_tci[index].ciCharset == DEFAULT_CHARSET) return
FALSE;
+ DPRINT("Index %d Charset %d CodePage %d FontSig %d\n",
+
index,FONT_tci[index].ciCharset,FONT_tci[index].ciACP,FONT_tci[index].fs.fsCsb[0]);
memcpy(lpCs, &FONT_tci[index], sizeof(CHARSETINFO));
return TRUE;
}