Mercurial > otakunoraifu
comparison window/widget.cc @ 14:8da1d92ac8f8
Don't create fonts faces for size <= 0, and update objects when their font size is set
author | thib |
---|---|
date | Sat, 09 Aug 2008 12:04:08 +0000 |
parents | 223b71206888 |
children | 5f548e5957a8 |
comparison
equal
deleted
inserted
replaced
13:a05bf0823154 | 14:8da1d92ac8f8 |
---|---|
61 #define AnmAlpha WidAnmAlpha | 61 #define AnmAlpha WidAnmAlpha |
62 #define AnmPtnSolid WidAnmPtnSolid | 62 #define AnmPtnSolid WidAnmPtnSolid |
63 #define AnmPtnAlpha WidAnmPtnAlpha | 63 #define AnmPtnAlpha WidAnmPtnAlpha |
64 | 64 |
65 XKFont::HorizLayout* DefaultLayout(int text_size) { | 65 XKFont::HorizLayout* DefaultLayout(int text_size) { |
66 if(text_size <= 0) abort();//FIXME: Find why the hell text_size can be <= 0 | |
66 if (size_to_layout.find(text_size) == size_to_layout.end()) { | 67 if (size_to_layout.find(text_size) == size_to_layout.end()) { |
67 size_to_layout[text_size] = new XKFont::HorizLayout(wdefault_font.c_str(), text_size); | 68 size_to_layout[text_size] = new XKFont::HorizLayout(wdefault_font.c_str(), text_size); |
68 } | 69 } |
69 return size_to_layout[text_size]; | 70 return size_to_layout[text_size]; |
70 } | 71 } |