]> git.tdb.fi Git - ttf2png.git/blobdiff - ttf2png.c
Round kerning values to nearest integer rather than down
[ttf2png.git] / ttf2png.c
index eabe1ca93b588f6419c6ac76479cd44b4b99eef4..e890e33643084f7784c8d23e280555c425e8fec4 100644 (file)
--- a/ttf2png.c
+++ b/ttf2png.c
@@ -543,7 +543,7 @@ int init_font(Font *font, FT_Face face, const Range *ranges, unsigned n_ranges,
                                kern = &font->kerning[font->n_kerning++];
                                kern->left_code = font->glyphs[i].code;
                                kern->right_code = font->glyphs[j].code;
-                               kern->distance = kerning.x/64;
+                               kern->distance = (kerning.x+32)/64;
                        }
                }