From f02e1d4e1ab37b7bad670e8694e8479e04d43556 Mon Sep 17 00:00:00 2001 From: Lu Wang Date: Fri, 14 Sep 2012 17:53:54 +0800 Subject: [PATCH] don't hurt em size..breaking IE, will fix this later --- src/HTMLRenderer/text.cc | 2 +- src/ff.c | 4 ++-- test/test.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/HTMLRenderer/text.cc b/src/HTMLRenderer/text.cc index 0d22f6e..d47a25d 100644 --- a/src/HTMLRenderer/text.cc +++ b/src/HTMLRenderer/text.cc @@ -359,9 +359,9 @@ void HTMLRenderer::embed_font(const string & filepath, GfxFont * font, FontInfo { // read metrics + int em = ff_get_em_size(); int ascent = ff_get_max_ascent(); int descent = ff_get_max_descent(); - int em = ascent + descent; if(em != 0) { info.ascent = ((double)ascent) / em; diff --git a/src/ff.c b/src/ff.c index b65811f..fb017d7 100644 --- a/src/ff.c +++ b/src/ff.c @@ -228,14 +228,14 @@ int ff_get_max_descent(void) void ff_set_ascent(int a) { cur_fv->sf->pfminfo.os2_winascent = a; - cur_fv->sf->pfminfo.os2_typoascent = a; +// cur_fv->sf->pfminfo.os2_typoascent = a; cur_fv->sf->pfminfo.hhead_ascent = a; } void ff_set_descent(int d) { cur_fv->sf->pfminfo.os2_windescent = d; - cur_fv->sf->pfminfo.os2_typodescent = -d; +// cur_fv->sf->pfminfo.os2_typodescent = -d; cur_fv->sf->pfminfo.hhead_descent = -d; } diff --git a/test/test.py b/test/test.py index 4eb1a02..bb98161 100755 --- a/test/test.py +++ b/test/test.py @@ -5,7 +5,7 @@ DIR = 'pdf' import os with open('out.html','w') as outf: - outf.write('
') + outf.write('
') for f in os.listdir(DIR): if not f.lower().endswith('.pdf'):