diff options
author | Harley Acheson <harley.acheson@gmail.com> | 2021-11-13 20:39:18 +0300 |
---|---|---|
committer | Harley Acheson <harley.acheson@gmail.com> | 2021-11-13 20:39:18 +0300 |
commit | 73047c69ea803a35f3eb4082b5ccdc7d2c53514d (patch) | |
tree | 6ae8aaf0a693f2a0a983f3fedaca9aff971dc16c /source/blender/blenfont/intern/blf_thumbs.c | |
parent | e8a8bb67fcefa5e935214e1af1ec3da38465dda1 (diff) |
BLF: Use Floats for Font Point Sizes
Allow the use of floating-point values for font point sizes, which
allows greater precision and flexibility for text output.
See D8960 for more information, details, and justification.
Differential Revision: https://developer.blender.org/D8960
Reviewed by Campbell Barton
Diffstat (limited to 'source/blender/blenfont/intern/blf_thumbs.c')
-rw-r--r-- | source/blender/blenfont/intern/blf_thumbs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenfont/intern/blf_thumbs.c b/source/blender/blenfont/intern/blf_thumbs.c index 12a83f7634e..bbdb26a61b6 100644 --- a/source/blender/blenfont/intern/blf_thumbs.c +++ b/source/blender/blenfont/intern/blf_thumbs.c @@ -95,7 +95,7 @@ void BLF_thumb_preview(const char *filename, const size_t draw_str_i18n_len = strlen(draw_str_i18n); int draw_str_i18n_nbr = 0; - blf_font_size(font, (unsigned int)MAX2(font_size_min, font_size_curr), dpi); + blf_font_size(font, (float)MAX2(font_size_min, font_size_curr), dpi); gc = blf_glyph_cache_find(font, font->size, font->dpi); /* There will be no matching glyph cache if blf_font_size() failed to set font size. */ if (!gc) { |