mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 07:17:42 -05:00
Merge commit godotengine/godot@80a3d205f1
This commit is contained in:
@@ -2807,8 +2807,12 @@ void TextServerFallback::_font_draw_glyph(const RID &p_font_rid, const RID &p_ca
|
||||
}
|
||||
}
|
||||
bool skip_oversampling = fd->msdf || fd->fixed_size > 0;
|
||||
uint64_t oversampling_level = CLAMP(oversampling_factor, 0.1, 100.0) * 64;
|
||||
oversampling_factor = double(oversampling_level) / 64.0;
|
||||
if (skip_oversampling) {
|
||||
oversampling_factor = 1.0;
|
||||
} else {
|
||||
uint64_t oversampling_level = CLAMP(oversampling_factor, 0.1, 100.0) * 64;
|
||||
oversampling_factor = double(oversampling_level) / 64.0;
|
||||
}
|
||||
|
||||
Vector2i size;
|
||||
if (skip_oversampling) {
|
||||
@@ -2947,14 +2951,18 @@ void TextServerFallback::_font_draw_glyph_outline(const RID &p_font_rid, const R
|
||||
}
|
||||
}
|
||||
bool skip_oversampling = fd->msdf || fd->fixed_size > 0;
|
||||
uint64_t oversampling_level = CLAMP(oversampling_factor, 0.1, 100.0) * 64;
|
||||
oversampling_factor = double(oversampling_level) / 64.0;
|
||||
if (skip_oversampling) {
|
||||
oversampling_factor = 1.0;
|
||||
} else {
|
||||
uint64_t oversampling_level = CLAMP(oversampling_factor, 0.1, 100.0) * 64;
|
||||
oversampling_factor = double(oversampling_level) / 64.0;
|
||||
}
|
||||
|
||||
Vector2i size;
|
||||
if (skip_oversampling) {
|
||||
size = _get_size_outline(fd, Vector2i(p_size, p_outline_size));
|
||||
} else {
|
||||
size = Vector2i(p_size * 64 * oversampling_factor, p_outline_size);
|
||||
size = Vector2i(p_size * 64 * oversampling_factor, p_outline_size * oversampling_factor);
|
||||
}
|
||||
|
||||
FontForSizeFallback *ffsd = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user