Browse Source

Merge pull request #1730 from zombrodo/fix/1721-printf-wrap

Fix #1721: floor result of scaling kerning based on dpi
Alex Szpakowski 3 years ago
parent
commit
4a579bf2a7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/modules/graphics/Font.cpp

+ 1 - 1
src/modules/graphics/Font.cpp

@@ -333,7 +333,7 @@ float Font::getKerning(uint32 leftglyph, uint32 rightglyph)
 	if (it != kerning.end())
 		return it->second;
 
-	float k = rasterizers[0]->getKerning(leftglyph, rightglyph) / dpiScale + 0.5f;
+	float k = floorf(rasterizers[0]->getKerning(leftglyph, rightglyph) / dpiScale + 0.5f);
 
 	for (const auto &r : rasterizers)
 	{