bug 35515; get *-iso10646-1 fonts to work by correcting the test for glyph

availability; bug 35665; add support for microsoft-cp1251 fonts
This commit is contained in:
erik%netscape.com 2000-04-13 03:24:13 +00:00
Родитель 8cfc5e80c0
Коммит f2f541d32f
1 изменённых файлов: 2 добавлений и 1 удалений

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

@ -1057,6 +1057,7 @@ static nsFontCharSetMap gCharSetMap[] =
{ "johabs-1", &X11Johab },
{ "johabsh-1", &X11Johab },
{ "ksc5601.1987-0", &KSC5601 },
{ "microsoft-cp1251", &CP1251 },
{ "misc-fontspecific", &Ignore },
{ "sgi-fontspecific", &Ignore },
{ "sun-fontspecific", &Ignore },
@ -1207,7 +1208,7 @@ GetMapFor10646Font(XFontStruct* aFont)
PRInt32 offset = (((row - minByte1) * charsPerRow) - minByte2);
for (PRInt32 cell = minByte2; cell <= maxByte2; cell++) {
XCharStruct* bounds = &aFont->per_char[offset + cell];
if ((!bounds->ascent) && (!bounds->descent)) {
if (bounds->ascent || bounds->descent) {
SET_REPRESENTABLE(map, (row << 8) | cell);
}
}