Commit c55099de40468eac2d23db40d0409a628be56bcd

David Turner 2001-10-18T11:57:52

changing pixel size computations for better accuracy (experimental)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/src/truetype/ttdriver.c b/src/truetype/ttdriver.c
index 85b9d6a..0b7d8f8 100644
--- a/src/truetype/ttdriver.c
+++ b/src/truetype/ttdriver.c
@@ -207,8 +207,8 @@
     if ( ( face->header.Flags & 8 ) == 0 )
     {
       /* Compute pixel sizes in 26.6 units */
-      dim_x = ( char_width  * horz_resolution ) / 72;
-      dim_y = ( char_height * vert_resolution ) / 72;
+      dim_x = ( char_width  * horz_resolution + 36 ) / 72;
+      dim_y = ( char_height * vert_resolution + 36 ) / 72;
 
       metrics->x_scale = FT_DivFix( dim_x, face->root.units_per_EM );
       metrics->y_scale = FT_DivFix( dim_y, face->root.units_per_EM );