Author: sgasiorek
Date: Sat May 19 17:55:23 2007
New Revision: 26839
URL:
http://svn.reactos.org/svn/reactos?rev=26839&view=rev
Log:
- add support for ETO_GLYPH_INDEX in NtGdiExtTextOut.
(fixes character shift problem in QT apps) see bug #975
Modified:
trunk/reactos/subsystems/win32/win32k/objects/text.c
Modified: trunk/reactos/subsystems/win32/win32k/objects/text.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/text.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/text.c Sat May 19 17:55:23 2007
@@ -1863,7 +1863,11 @@
for (i = Start; i < Count; i++)
{
- glyph_index = FT_Get_Char_Index(face, *TempText);
+ if (fuOptions & ETO_GLYPH_INDEX)
+ glyph_index = *TempText;
+ else
+ glyph_index = FT_Get_Char_Index(face, *TempText);
+
if (!(realglyph = NtGdiGlyphCacheGet(face, glyph_index,
TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight)))
{
@@ -1913,21 +1917,28 @@
for (i = 0; i < Count; i++)
{
- glyph_index = FT_Get_Char_Index(face, *String);
+ if (fuOptions & ETO_GLYPH_INDEX)
+ glyph_index = *String;
+ else
+ glyph_index = FT_Get_Char_Index(face, *String);
+
if (!(realglyph = NtGdiGlyphCacheGet(face, glyph_index,
TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight)))
{
- error = FT_Load_Glyph(face, glyph_index, FT_LOAD_DEFAULT);
-
- if (error)
- {
- DPRINT1("WARNING: Failed to load and render glyph! [index: %u]\n",
glyph_index);
- IntUnLockFreeType;
- goto fail;
- }
- glyph = face->glyph;
- realglyph = NtGdiGlyphCacheSet(face, glyph_index,
- TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight, glyph, RenderMode);
+ error = FT_Load_Glyph(face, glyph_index, FT_LOAD_DEFAULT);
+
+ if (error)
+ {
+ DPRINT1("WARNING: Failed to load and render glyph! [index: %u]\n",
glyph_index);
+ IntUnLockFreeType;
+ goto fail;
+ }
+ glyph = face->glyph;
+ realglyph = NtGdiGlyphCacheSet(face,
+ glyph_index,
+
TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight,
+ glyph,
+ RenderMode);
}
// DbgPrint("realglyph: %x\n", realglyph);
// DbgPrint("TextLeft: %d\n", TextLeft);