Index: fontEncoding.properties =================================================================== RCS file: /cvsroot/mozilla/gfx/src/windows/fontEncoding.properties,v retrieving revision 3.8 diff -u -8 -p -r3.8 fontEncoding.properties --- fontEncoding.properties 25 Aug 2004 23:02:45 -0000 3.8 +++ fontEncoding.properties 1 Feb 2006 23:23:24 -0000 @@ -57,16 +57,17 @@ encoding.symbol.ttf = Adobe-Symbol-Encoding # TeX's Computer Modern fonts (Roman, Math Italic, Symbol and Extension) encoding.cmr10.ttf = x-ttf-cmr encoding.cmmi10.ttf = x-ttf-cmmi encoding.cmsy10.ttf = x-ttf-cmsy encoding.cmex10.ttf = x-ttf-cmex +encoding.msbm10.ttf = x-ttf-msbm # Mathematica fonts encoding.math1.ttf = x-mathematica1 encoding.math1-bold.ttf = x-mathematica1 encoding.math1mono.ttf = x-mathematica1 encoding.math1mono-bold.ttf = x-mathematica1 Index: nsFontMetricsWin.cpp =================================================================== RCS file: /cvsroot/mozilla/gfx/src/windows/nsFontMetricsWin.cpp,v retrieving revision 3.243 diff -u -8 -p -r3.243 nsFontMetricsWin.cpp --- nsFontMetricsWin.cpp 7 Jan 2006 02:15:02 -0000 3.243 +++ nsFontMetricsWin.cpp 1 Feb 2006 23:23:29 -0000 @@ -4438,16 +4438,44 @@ nsFontWinNonUnicode::nsFontWinNonUnicode mConverter = aConverter; mIsWide = aIsWide; } nsFontWinNonUnicode::~nsFontWinNonUnicode() { } +PRBool +nsFontWinNonUnicode::HasGlyph(PRUint32 ch) +{ + PRUint32 repLen; + nsCOMPtr mapper(do_QueryInterface(mConverter)); + if (mapper) { + PRUnichar charBuf[2] + if (ch & 0xffff0000) { + repLen = 2; + PRUint16 vh, vl; + vh = (PRUint16)(ch & 0x000ffc00) >> 10; + vl = (PRUint16)(ch & 0x000003ff); + charBuf[0] = 0xd800 | vh; + charBuf[1] = 0xdc00 | vl; + } else { + repLen = 1; + charBuf[0] = (PRUnichar)ch; + } + mapper->HasChars((PRUint16*)aCharPt, &repLen); + return (repLen == 0) ? PR_FALSE : PR_TRUE; + } + + if (!mCCMap) + return PR_FALSE; + + return CCMAP_HAS_CHAR_EXT(mCCMap, ch); +} + PRInt32 nsFontWinNonUnicode::GetWidth(HDC aDC, const PRUnichar* aString, PRUint32 aLength) { DEBUG_VERIFY_FONT_HASGLYPH(this, aString, aLength); nsAutoCharBuffer buffer; PRInt32 destLength = aLength;