Merge pull request #15495 from poke1024/font-oversampling
Two potential glitches in font oversampling
This commit is contained in:
commit
e1c799f1b4
1 changed files with 14 additions and 1 deletions
|
@ -631,6 +631,7 @@ bool DynamicFontAtSize::update_oversampling() {
|
|||
textures.clear();
|
||||
char_map.clear();
|
||||
oversampling = font_oversampling;
|
||||
valid = false;
|
||||
_load();
|
||||
|
||||
return true;
|
||||
|
@ -973,14 +974,26 @@ void DynamicFont::finish_dynamic_fonts() {
|
|||
|
||||
void DynamicFont::update_oversampling() {
|
||||
|
||||
Vector<Ref<DynamicFont> > changed;
|
||||
|
||||
if (dynamic_font_mutex)
|
||||
dynamic_font_mutex->lock();
|
||||
|
||||
SelfList<DynamicFont> *E = dynamic_fonts.first();
|
||||
while (E) {
|
||||
|
||||
if (E->self()->data_at_size.is_valid() && E->self()->data_at_size->update_oversampling()) {
|
||||
E->self()->emit_changed();
|
||||
changed.push_back(E->self());
|
||||
}
|
||||
E = E->next();
|
||||
}
|
||||
|
||||
if (dynamic_font_mutex)
|
||||
dynamic_font_mutex->unlock();
|
||||
|
||||
for (int i = 0; i < changed.size(); i++) {
|
||||
changed[i]->emit_changed();
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////
|
||||
|
|
Loading…
Reference in a new issue