File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -397,6 +397,12 @@ void TextServerAdvanced::_free_rid(const RID &p_rid) {
397397 MutexLock ftlock (ft_mutex);
398398
399399 FontAdvanced *fd = font_owner.get_or_null (p_rid);
400+ for (const KeyValue<Vector2i, FontForSizeAdvanced *> &ffsd : fd->cache ) {
401+ OversamplingLevel *ol = oversampling_levels.getptr (ffsd.value ->viewport_oversampling );
402+ if (ol != nullptr ) {
403+ ol->fonts .erase (ffsd.value );
404+ }
405+ }
400406 {
401407 MutexLock lock (fd->mutex );
402408 font_owner.free (p_rid);
Original file line number Diff line number Diff line change @@ -121,6 +121,12 @@ void TextServerFallback::_free_rid(const RID &p_rid) {
121121 MutexLock ftlock (ft_mutex);
122122
123123 FontFallback *fd = font_owner.get_or_null (p_rid);
124+ for (const KeyValue<Vector2i, FontForSizeFallback *> &ffsd : fd->cache ) {
125+ OversamplingLevel *ol = oversampling_levels.getptr (ffsd.value ->viewport_oversampling );
126+ if (ol != nullptr ) {
127+ ol->fonts .erase (ffsd.value );
128+ }
129+ }
124130 {
125131 MutexLock lock (fd->mutex );
126132 font_owner.free (p_rid);
You can’t perform that action at this time.
0 commit comments