From d80ce3009064eb5bd88c6254ae1fac02f4b763b8 Mon Sep 17 00:00:00 2001 From: Hidenori Takeshima Date: Mon, 14 Aug 2000 13:25:43 +0000 Subject: [PATCH] Added checking for broken font cache. Added supporting for iso10646 encoding. --- graphics/x11drv/xfont.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/graphics/x11drv/xfont.c b/graphics/x11drv/xfont.c index 70ea998aa76..ce26c4b5d44 100644 --- a/graphics/x11drv/xfont.c +++ b/graphics/x11drv/xfont.c @@ -199,6 +199,10 @@ static SuffixCharset sufch_unicode[] = { { "0", DEFAULT_CHARSET, 0 }, { NULL, DEFAULT_CHARSET, 0 }}; +static SuffixCharset sufch_iso10646[] = { + { "1", DEFAULT_CHARSET, 0 }, + { NULL, DEFAULT_CHARSET, 0 }}; + /* Each of these must be matched explicitly */ static SuffixCharset sufch_any[] = { { "fontspecific", SYMBOL_CHARSET, CP_SYMBOL }, @@ -234,6 +238,7 @@ static fontEncodingTemplate __fETTable[] = { { "gb2312.1980", sufch_gb2312, &__fETTable[16]}, { "big5.et", sufch_big5, &__fETTable[17]}, { "unicode", sufch_unicode, &__fETTable[18]}, + { "iso10646", sufch_iso10646, &__fETTable[19]}, /* NULL prefix matches anything so put it last */ { NULL, sufch_any, NULL }, }; @@ -2059,6 +2064,8 @@ static BOOL XFONT_ReadCachedMetrics( int fd, int res, unsigned x_checksum, int x if( offset > length || (int)(pfi->next) != j++ ) goto fail; + if( pfi->df.dfPixHeight == 0 ) goto fail; + pfi->df.dfFace = pfr->lfFaceName; if( pfi->fi_flags & FI_SCALABLE ) { -- 2.11.4.GIT