From 5cf5a1c72500ce7003702a8591b640ddf55061d6 Mon Sep 17 00:00:00 2001 From: Lu Wang Date: Fri, 31 Aug 2012 23:23:03 +0800 Subject: [PATCH] fix use_to_unicode --- src/HTMLRenderer/text.cc | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/HTMLRenderer/text.cc b/src/HTMLRenderer/text.cc index 5009d05..ffa8c9a 100644 --- a/src/HTMLRenderer/text.cc +++ b/src/HTMLRenderer/text.cc @@ -172,11 +172,9 @@ void HTMLRenderer::embed_font(const path & filepath, GfxFont * font, FontInfo & Gfx8BitFont * font_8bit = nullptr; - if(get_metric_only) - { - info.use_tounicode = false; - } - else + info.use_tounicode = ((suffix == ".ttf") || (font->isCIDFont()) || (param->always_apply_tounicode)); + + if(!get_metric_only) { /* * Step 1 @@ -259,8 +257,6 @@ void HTMLRenderer::embed_font(const path & filepath, GfxFont * font, FontInfo & * */ - info.use_tounicode = ((suffix == ".ttf") || (font->isCIDFont()) || (param->always_apply_tounicode)); - auto ctu = font->getToUnicode(); ofstream map_fout(tmp_dir / (fn + ".encoding"));