# HG changeset patch # User thib # Date 1218283448 0 # Node ID 8da1d92ac8f870b21dd796ad5866e02695de7c77 # Parent a05bf0823154555044b7e26c53fdb1bc15d82235 Don't create fonts faces for size <= 0, and update objects when their font size is set diff --git a/scn2k/scn2k_grp.cc b/scn2k/scn2k_grp.cc --- a/scn2k/scn2k_grp.cc +++ b/scn2k/scn2k_grp.cc @@ -235,6 +235,7 @@ int GrpObj::PosY() { } void GrpObj::SetUpdate(void) { attr = Attribute (attr | UPDATE_PICTURE); + Update(); //FIXME } void GrpObj::SetPos(int index, int x,int y) { if (index < 0 || index > 8) { @@ -512,7 +513,7 @@ TextStream GrpObj::ParseMoji(const char* str, int def_r ,int def_g, int def_b, int def_size) { // 制御シーケンス付き文字列をparse return ts; } void GrpObj::UpdateMoji(void) { // 文字の大きさ、色などを変更 - if (print_moji.length() == 0) return; + if (print_moji.length() == 0 || print_size <= 2) return; if (pic_parent == 0) return; /* テキストの大きさを得る */ int r, g, b; diff --git a/window/widget.cc b/window/widget.cc --- a/window/widget.cc +++ b/window/widget.cc @@ -63,6 +63,7 @@ void SetFont(const char* font) { #define AnmPtnAlpha WidAnmPtnAlpha XKFont::HorizLayout* DefaultLayout(int text_size) { + if(text_size <= 0) abort();//FIXME: Find why the hell text_size can be <= 0 if (size_to_layout.find(text_size) == size_to_layout.end()) { size_to_layout[text_size] = new XKFont::HorizLayout(wdefault_font.c_str(), text_size); }