fixing bug 342257. r=mrbkap

git-svn-id: svn://10.0.0.236/trunk@200646 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
pavlov%pavlov.net 2006-06-22 23:13:30 +00:00
parent 0dab7f590a
commit 12a8003ffb

View File

@ -516,7 +516,7 @@ gfxWindowsTextRun::MeasureOrDrawFast(gfxContext *aContext,
aWString = mString.BeginReading();
aLength = mString.Length();
if (ScriptIsComplex(aWString, aLength, SIC_COMPLEX) == S_OK)
return -1;
return -1; // try uniscribe instead
}
nsRefPtr<gfxASurface> surf = aContext->CurrentSurface();
@ -551,12 +551,20 @@ gfxWindowsTextRun::MeasureOrDrawFast(gfxContext *aContext,
else
ret = GetGlyphIndicesW(aDC, aWString, aLength, glyphs, GGI_MARK_NONEXISTING_GLYPHS);
if (ret == GDI_ERROR) {
NS_WARNING("GetGlyphIndicies failed\n");
free(glyphs);
cairo_win32_scaled_font_done_font(scaledFont);
RestoreDC(aDC, -1);
return 0; // return 0 length
}
for (DWORD i = 0; i < ret; ++i) {
if (glyphs[i] == 0xffff) {
free(glyphs);
cairo_win32_scaled_font_done_font(scaledFont);
RestoreDC(aDC, -1);
return -1;
return -1; // try uniscribe instead
}
}