From 086a72586347d312215218ae7f34b8bb55190dd9 Mon Sep 17 00:00:00 2001 From: Lu Wang Date: Tue, 26 Feb 2013 00:40:35 +0800 Subject: [PATCH] .. --- src/HTMLRenderer/font.cc | 4 ++-- src/util/ffw.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/HTMLRenderer/font.cc b/src/HTMLRenderer/font.cc index 9ea9264..b128626 100644 --- a/src/HTMLRenderer/font.cc +++ b/src/HTMLRenderer/font.cc @@ -484,10 +484,10 @@ void HTMLRenderer::embed_font(const string & filepath, GfxFont * font, FontInfo /* * Step 5 - * Generate the font + * Generate the font and load the metrics * * Ascent/Descent are not used in PDF, and the values in PDF may be wrong or inconsistent (there are 3 sets of them) - * We need to reload in order to retrieve/fix accurate ascent/descent + * We need to reload in order to retrieve/fix accurate ascent/descent, some info won't be written to the font by fontforge until saved. */ string fn = (char*)str_fmt("%s/f%llx%s", (param->single_html ? param->tmp_dir : param->dest_dir).c_str(), diff --git a/src/util/ffw.c b/src/util/ffw.c index 572209b..1e6dbb8 100644 --- a/src/util/ffw.c +++ b/src/util/ffw.c @@ -380,7 +380,8 @@ void ffw_set_widths(int * width_list, int mapping_len, && (((sc->width > width_list[i] + EPS) && (squeeze_wide)) || ((sc->width < width_list[i] - EPS) && (stretch_narrow))))) { - real transform[6]; transform[0] = ((double)width_list[i]) / (sc->width); + real transform[6]; + transform[0] = ((double)width_list[i]) / (sc->width); transform[3] = 1.0; transform[1] = transform[2] = transform[4] = transform[5] = 0; FVTrans(cur_fv, sc, transform, NULL, fvt_alllayers | fvt_dontmovewidth);