- enhanced reporting of unsupported X font encodings

- added -cp-*- data to font encoding lookup structures
This commit is contained in:
Albert den Haan 2000-08-29 03:51:21 +00:00 committed by Alexandre Julliard
parent c7c4246a99
commit 2ca7b74846
1 changed files with 26 additions and 13 deletions

View File

@ -240,6 +240,7 @@ static fontEncodingTemplate __fETTable[] = {
{ "big5.et", sufch_big5, &__fETTable[17]}, { "big5.et", sufch_big5, &__fETTable[17]},
{ "unicode", sufch_unicode, &__fETTable[18]}, { "unicode", sufch_unicode, &__fETTable[18]},
{ "iso10646", sufch_iso10646, &__fETTable[19]}, { "iso10646", sufch_iso10646, &__fETTable[19]},
{ "cp", sufch_windows, &__fETTable[20]},
/* NULL prefix matches anything so put it last */ /* NULL prefix matches anything so put it last */
{ NULL, sufch_any, NULL }, { NULL, sufch_any, NULL },
}; };
@ -670,20 +671,32 @@ static int LFD_InitFontInfo( fontInfo* fi, const LFD* lfd, LPCSTR fullname )
goto done; goto done;
} }
} }
if (boba->prefix)
{ fi->df.dfCharSet = (BYTE)(boba->sufch[j].charset & 0xff);
WARN("font '%s' has unknown character encoding '%s'\n", fi->internal_charset = boba->sufch[j].charset;
fullname, lfd->charset_encoding); fi->codepage = boba->sufch[j].codepage;
fi->df.dfCharSet = (BYTE)(boba->sufch[j].charset & 0xff); fi->cptable = boba->sufch[j].cptable;
fi->internal_charset = boba->sufch[j].charset; if (boba->prefix)
fi->codepage = boba->sufch[j].codepage; {
fi->cptable = boba->sufch[j].cptable; FIXME("font '%s' has unknown character encoding '%s' in known registry '%s'\n",
j = 254; fullname, lfd->charset_encoding, boba->prefix);
goto done; j = 254;
} }
else
{
FIXME("font '%s' has unknown registry '%s' and character encoding '%s' \n",
fullname, lfd->charset_registry, lfd->charset_encoding);
j = 255;
}
WARN("Defaulting to: df.dfCharSet = %d, internal_charset = %d, codepage = %d, cptable = %d\n",
fi->df.dfCharSet,fi->internal_charset, fi->codepage, fi->cptable);
goto done;
} }
else if (boba->prefix) else if (boba->prefix)
{ {
WARN("font '%s' has known registry '%s' and no character encoding\n",
fullname, lpstr);
for( j = 0; boba->sufch[j].psuffix; j++ ) for( j = 0; boba->sufch[j].psuffix; j++ )
; ;
fi->df.dfCharSet = (BYTE)(boba->sufch[j].charset & 0xff); fi->df.dfCharSet = (BYTE)(boba->sufch[j].charset & 0xff);
@ -702,8 +715,8 @@ done:
/* i - index into fETTable /* i - index into fETTable
* j - index into suffix array for fETTable[i] * j - index into suffix array for fETTable[i]
* except: * except:
* 254 - unknown suffix * 254 - found encoding prefix, unknown suffix
* 255 - no suffix at all. * 255 - no encoding match at all.
*/ */
fi->fi_encoding = 256 * (UINT16)i + (UINT16)j; fi->fi_encoding = 256 * (UINT16)i + (UINT16)j;