From 5da5de6681ea50036a8e34f932e77a00a284d95d Mon Sep 17 00:00:00 2001 From: "erik%netscape.com" Date: Mon, 11 Sep 2000 21:03:58 +0000 Subject: [PATCH] bug 33162; instead of zeroing out all Unicodes less than 0x2200, we just zero out the common ones that correspond to CP1252 (for things like smart quotes), so that we can still see most of the JIS X 0208 characters; r=ftang git-svn-id: svn://10.0.0.236/trunk@78762 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/gfx/src/gtk/nsFontMetricsGTK.cpp | 32 +++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/mozilla/gfx/src/gtk/nsFontMetricsGTK.cpp b/mozilla/gfx/src/gtk/nsFontMetricsGTK.cpp index 63b213791b5..6abf810e2cc 100644 --- a/mozilla/gfx/src/gtk/nsFontMetricsGTK.cpp +++ b/mozilla/gfx/src/gtk/nsFontMetricsGTK.cpp @@ -1398,9 +1398,35 @@ SetUpFontCharSetInfo(nsFontCharSetInfo* aSelf) */ if (aSelf->Convert == DoubleByteConvert) { PRUint32* map = aSelf->mMap; - for (PRUint16 i = 0; i < (0x2200 >> 5); i++) { - map[i] = 0; - } +#undef REMOVE_CHAR +#define REMOVE_CHAR(map, c) (map)[(c) >> 5] &= ~(1L << ((c) & 0x1f)) + REMOVE_CHAR(map, 0x20AC); + REMOVE_CHAR(map, 0x201A); + REMOVE_CHAR(map, 0x0192); + REMOVE_CHAR(map, 0x201E); + REMOVE_CHAR(map, 0x2026); + REMOVE_CHAR(map, 0x2020); + REMOVE_CHAR(map, 0x2021); + REMOVE_CHAR(map, 0x02C6); + REMOVE_CHAR(map, 0x2030); + REMOVE_CHAR(map, 0x0160); + REMOVE_CHAR(map, 0x2039); + REMOVE_CHAR(map, 0x0152); + REMOVE_CHAR(map, 0x017D); + REMOVE_CHAR(map, 0x2018); + REMOVE_CHAR(map, 0x2019); + REMOVE_CHAR(map, 0x201C); + REMOVE_CHAR(map, 0x201D); + REMOVE_CHAR(map, 0x2022); + REMOVE_CHAR(map, 0x2013); + REMOVE_CHAR(map, 0x2014); + REMOVE_CHAR(map, 0x02DC); + REMOVE_CHAR(map, 0x2122); + REMOVE_CHAR(map, 0x0161); + REMOVE_CHAR(map, 0x203A); + REMOVE_CHAR(map, 0x0153); + REMOVE_CHAR(map, 0x017E); + REMOVE_CHAR(map, 0x0178); } } else {