[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] parthw-cleaned 8e6f37a: [gf] Fixes.
From: |
Parth Wazurkar |
Subject: |
[freetype2] parthw-cleaned 8e6f37a: [gf] Fixes. |
Date: |
Sat, 14 Jul 2018 04:41:19 -0400 (EDT) |
branch: parthw-cleaned
commit 8e6f37a001065b01dd6f13fe9a5c7cfd34c25595
Author: Parth Wazurkar <address@hidden>
Commit: Parth Wazurkar <address@hidden>
[gf] Fixes.
---
src/gf/gfdrivr.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/src/gf/gfdrivr.c b/src/gf/gfdrivr.c
index 3bc8461..08bc887 100644
--- a/src/gf/gfdrivr.c
+++ b/src/gf/gfdrivr.c
@@ -238,17 +238,21 @@
{
FT_Bitmap_Size* bsize = gfface->available_sizes;
- /* FT_UShort x_res, y_res; */
+ FT_UShort x_res, y_res;
bsize->height = (FT_Short) face->gf_glyph->font_bbx_h ;
bsize->width = (FT_Short) face->gf_glyph->font_bbx_w ;
- bsize->size = (FT_Pos) face->gf_glyph->ds << 6 ;
+ bsize->size = (FT_Pos) FT_MulDiv( FT_ABS( face->gf_glyph->ds ),
+ 64 * 7200,
+ 72270L );
- /* x_res = toint( go->hppp * 72.27 ); */
- /* y_res = toint( go->vppp * 72.27 ); */
+ x_res = toint( go->hppp * 72.27 );
+ y_res = toint( go->vppp * 72.27 );
- bsize->y_ppem = (FT_Pos)(bsize->size/10) << 6 ;
- bsize->x_ppem = (FT_Pos)bsize->y_ppem ;
+ bsize->y_ppem = (FT_Pos) toint((face->gf_glyph->ds * y_res)/ 72.27) << 6
;
+ bsize->x_ppem = (FT_Pos)FT_MulDiv( bsize->y_ppem,
+ x_res,
+ y_res ); ;
}
/* Charmaps */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] parthw-cleaned 8e6f37a: [gf] Fixes.,
Parth Wazurkar <=