From a4bfab43500e7c7be5f50353bd1293e505bb2e43 Mon Sep 17 00:00:00 2001 From: pcg Date: Thu, 4 Dec 2003 00:43:26 +0000 Subject: [PATCH] *** empty log message *** --- src/defaultfont.C | 22 ++++++++++------------ src/defaultfont.h | 4 ++-- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/defaultfont.C b/src/defaultfont.C index 572e3e6a..91a750b6 100644 --- a/src/defaultfont.C +++ b/src/defaultfont.C @@ -893,13 +893,15 @@ rxvt_fontset::realize_font (int i) if (fonts[i]->loaded) return true; - if (fonts[i]->load (height)) - return fonts[i]->loaded = true; + fonts[i]->loaded = true; - delete fonts[i]; - fonts.erase (fonts.begin () + i); + if (!fonts[i]->load (height)) + { + fonts[i]->cs = CS_UNKNOWN; + return false; + } - return false; + return true; } void @@ -946,15 +948,10 @@ rxvt_fontset::find_font (uint32_t unicode) goto next_font; if (!realize_font (i)) - { - --i; - goto next_font; - } - - //printf ("added font %s for %04lx\n", f->name, unicode); + goto next_font; } - if (f->has_codepoint (unicode)) + if (f->cs != CS_UNKNOWN && f->has_codepoint (unicode)) return i; next_font: @@ -962,6 +959,7 @@ rxvt_fontset::find_font (uint32_t unicode) { fonts.push_back (new_font (fallback->name, fallback->cs)); fallback++; + i = 0; } } diff --git a/src/defaultfont.h b/src/defaultfont.h index f5d7d2b0..b59404cf 100644 --- a/src/defaultfont.h +++ b/src/defaultfont.h @@ -1,5 +1,5 @@ /* - * $Id: defaultfont.h,v 1.5 2003-11-25 15:25:17 pcg Exp $ + * $Id: defaultfont.h,v 1.6 2003-12-04 00:43:26 pcg Exp $ */ #ifndef _DEFAULTFONT_H_ @@ -30,7 +30,7 @@ struct rxvt_font { char *name; codeset cs; - bool loaded; + bool loaded; // wether we tried loading it before (not wether it's loaded) // managed by the font object bool prop; // wether this is a proportional font or has other funny characteristics -- 2.34.1