r=pedemont, sr=blizzard (platform specific), a=mkaply
OS/2 only - Don't attempt to draw hellip with the default font if you are not 1252
This commit is contained in:
mkaply%us.ibm.com 2004-04-09 02:41:24 +00:00
Родитель 2a8e91761a
Коммит 0070e36d91
1 изменённых файлов: 10 добавлений и 6 удалений

Просмотреть файл

@ -1673,16 +1673,20 @@ nsFontMetricsOS2::FindWesternFont()
mWesternFont = font;
}
#define IS_SPECIAL(x) ((x == 0x20AC) || /* euro */ \
(x == 0x2022) || /* bull */ \
#define IS_SPECIAL_WO_ELLIPSE(x) \
((x == 0x20AC) || /* euro */ \
(x == 0x2022) || /* bull */ \
(x == 0x201C) || /* ldquo */ \
(x == 0x201D) || /* rdquo */ \
(x == 0x2018) || /* lsquo */ \
(x == 0x2019) || /* rsquo */ \
(x == 0x2026) || /* hellip */ \
(x == 0x2013) || /* ndash */ \
(x == 0x2014)) /* mdash */
#define IS_SPECIAL(x) \
(IS_SPECIAL_WO_ELLIPSE(x) || \
(x == 0x2026)) /* hellip */
nsresult
nsFontMetricsOS2::ResolveForwards(HPS aPS,
const PRUnichar* aString,
@ -1735,14 +1739,14 @@ nsFontMetricsOS2::ResolveForwards(HPS aPS,
{
while (running && firstChar < lastChar)
{
if ((*currChar >= 0x0080 && *currChar <= 0x00FF) || IS_SPECIAL(*currChar))
if ((*currChar >= 0x0080 && *currChar <= 0x00FF) || IS_SPECIAL_WO_ELLIPSE(*currChar))
{
if (!mWesternFont) {
FindWesternFont();
}
fontSwitch.mFont = mWesternFont;
while( ++currChar < lastChar ) {
if ((*currChar < 0x0080 || *currChar > 0x00FF) && !IS_SPECIAL(*currChar))
if ((*currChar < 0x0080 || *currChar > 0x00FF) && !IS_SPECIAL_WO_ELLIPSE(*currChar))
break;
}
running = (*aFunc)(&fontSwitch, firstChar, currChar - firstChar, aData);
@ -1752,7 +1756,7 @@ nsFontMetricsOS2::ResolveForwards(HPS aPS,
// Use currently selected font
fontSwitch.mFont = mFontHandle;
while( ++currChar < lastChar ) {
if ((*currChar >= 0x0080 && *currChar <= 0x00FF) || IS_SPECIAL(*currChar))
if ((*currChar >= 0x0080 && *currChar <= 0x00FF) || IS_SPECIAL_WO_ELLIPSE(*currChar))
break;
}
running = (*aFunc)(&fontSwitch, firstChar, currChar - firstChar, aData);