[Bf-blender-cvs] [a39cc5ae4da] master: Fix for T77478: Quiet Conversion Error/Warning

Harley Acheson noreply at git.blender.org
Sat Jun 6 02:06:18 CEST 2020


Commit: a39cc5ae4da2cd036a61d69b871a89659fd07547
Author: Harley Acheson
Date:   Fri Jun 5 17:05:06 2020 -0700
Branches: master
https://developer.blender.org/rBa39cc5ae4da2cd036a61d69b871a89659fd07547

Fix for T77478: Quiet Conversion Error/Warning

Quiet warning/error about int and float multiplication.

Differential Revision: https://developer.blender.org/D7893

Reviewed by Ray Molenkamp

===================================================================

M	source/blender/blenfont/intern/blf_glyph.c

===================================================================

diff --git a/source/blender/blenfont/intern/blf_glyph.c b/source/blender/blenfont/intern/blf_glyph.c
index 1867df3100c..f46a74a739a 100644
--- a/source/blender/blenfont/intern/blf_glyph.c
+++ b/source/blender/blenfont/intern/blf_glyph.c
@@ -316,7 +316,7 @@ GlyphBLF *blf_glyph_add(FontBLF *font, GlyphCacheBLF *gc, unsigned int index, un
     FT_Outline_EmboldenXY(&font->face->glyph->outline, extra_x, extra_y);
     if ((font->face->face_flags & FT_FACE_FLAG_FIXED_WIDTH) == 0) {
       /* Need to increase advance, but not for fixed-width fonts. */
-      font->face->glyph->advance.x += (int) (extra_x * 1.05f);
+      font->face->glyph->advance.x += (FT_Pos)(((float)extra_x) * 1.05f);
       font->face->glyph->advance.y += extra_y;
     }
     else {



More information about the Bf-blender-cvs mailing list