"Jeff L" <[EMAIL PROTECTED]> wrote:
-DWORD WineEngGetGlyphIndices(GdiFont font, LPCWSTR lpstr, INT count, + * */
Strange indentation at the end of a comment.
+DWORD WineEngGetGlyphIndices(HDC hdc, GdiFont font, LPCWSTR lpstr, INT count, LPWORD pgi, DWORD flags) { INT i; - + TEXTMETRICW textm; for(i = 0; i < count; i++) + { pgi[i] = get_glyph_index(font, lpstr[i]); - + if (pgi[i] == 0) + { + if (flags & GGI_MARK_NONEXISTING_GLYPHS) + pgi[i] = 0x001f; /* Indicate non existance */ + else + { + GetTextMetricsW(hdc, &textm); + pgi[i] = textm.tmDefaultChar; + } + } + } return count; }
I'd suggest to move GetTextMetricsW outside of the loop to not kill the performance.
+ WCHAR testtext[] = {'T',0x0000,'s','t',0xffff,0}; + WORD glyphs[(sizeof(testtext)/2)-1]; + TEXTMETRIC textm; + + memset(&lf, 0, sizeof(lf)); + strcpy(lf.lfFaceName, "Symbol"); + lf.lfHeight = 20; + + hfont = CreateFontIndirectA(&lf); + hdc = GetDC(0); + + ok(GetTextMetrics(hdc, &textm), "GetTextMetric failed\n");
Please set tab width to 8 instead of 4 and do not mix tabs and spaces. -- Dmitry.