mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
- add support for ETO_GLYPH_INDEX in NtGdiExtTextOut.
(fixes character shift problem in QT apps) see bug #975 svn path=/trunk/; revision=26839
This commit is contained in:
parent
9341afafbf
commit
d6c16357c0
1 changed files with 23 additions and 12 deletions
|
@ -1863,7 +1863,11 @@ NtGdiExtTextOut(
|
|||
|
||||
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 @@ NtGdiExtTextOut(
|
|||
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
|
|
Loading…
Reference in a new issue