bmfd: HGLYPH is an ULONG. Use offset to glyph entry as HGLYPH instead of the pointer to fix 64bit build.

svn path=/branches/ros-amd64-bringup/; revision=40927
This commit is contained in:
Timo Kreuzer
2009-05-15 12:24:00 +00:00
parent 0794324b2c
commit 5cedbbbe09
2 changed files with 5 additions and 6 deletions

View File

@@ -389,7 +389,7 @@ BmfdQueryFontTree(
{
PBMFD_FILE pfile = (PBMFD_FILE)iFile;
PBMFD_FACE pface;
ULONG i, j, cjOffset, cjSize, cGlyphs, cRuns;
ULONG i, j, cjSize, cGlyphs, cRuns;
CHAR ch, chFirst, ach[256];
WCHAR wc, awc[256];
PFD_GLYPHSET pGlyphSet;
@@ -475,14 +475,13 @@ BmfdQueryFontTree(
pwcrun[0].wcLow = awc[0];
pwcrun[0].cGlyphs = 1;
pwcrun[0].phg = phglyphs;
phglyphs[0] = (HGLYPH)pface->pCharTable;
phglyphs[0] = 0;
/* Walk through all supported chars */
for (i = 1, j = 0; i < cGlyphs; i++)
{
/* Use pointer to glyph entry as hglyph */
cjOffset = (ach[i] - chFirst) * pface->cjEntrySize;
phglyphs[i] = (HGLYPH)(pface->pCharTable + cjOffset);
/* Use offset to glyph entry as hglyph */
phglyphs[i] = (ach[i] - chFirst) * pface->cjEntrySize;
/* Check whether we can append the wchar to a run */
if (awc[i] == awc[i - 1] + 1)

View File

@@ -80,7 +80,7 @@ BmfdQueryGlyphAndBitmap(
ULONG cjSize)
{
PBMFD_FACE pface = pfont->pface;
PGLYPHENTRY pge = (PGLYPHENTRY)hg;
PGLYPHENTRY pge = (PGLYPHENTRY)(pface->pCharTable + hg);
ULONG xSrc, ySrc, cxSrc, cySrc;
ULONG xDst, yDst, cxDst, cyDst;
ULONG xScale, yScale;