From cb9a89d7b3844667abbf9b7f4f472f49cd3444ff Mon Sep 17 00:00:00 2001 From: Lu Wang Date: Sun, 7 Oct 2012 00:51:03 +0800 Subject: [PATCH] .. --- TODO | 5 ----- src/HTMLRenderer/text.cc | 15 +++++++-------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/TODO b/TODO index 0cefabb..88ec458 100644 --- a/TODO +++ b/TODO @@ -4,10 +4,6 @@ Integrate splash/cairo native support for image native support for draw -about glyph width: - - IE - - stretching ratio might not be correct.. letter 'f' - draw non-orthogonal lines with CSS create a glyph for ' ', if there is not in a font @@ -20,7 +16,6 @@ try harder finding glyph names (using fontforge) for CID Type 0 rename single-html -> embed-font/image/css ... merge sub/sup into one line -bug found in baidu(ubuntu...) precise link dest: zoom diff --git a/src/HTMLRenderer/text.cc b/src/HTMLRenderer/text.cc index e464aba..668cbc9 100644 --- a/src/HTMLRenderer/text.cc +++ b/src/HTMLRenderer/text.cc @@ -209,7 +209,7 @@ void HTMLRenderer::embed_font(const string & filepath, GfxFont * font, FontInfo * Step 1 * dump the font file directly from the font descriptor and put the glyphs into the correct slots * * for 8bit + nonTrueType - * re-encoding the font using a PostScript encoding list (glyph id <-> glpyh name) + * re-encoding the font by glyph names * * for 8bit + TrueType * sort the glpyhs as the original order, and later will map GID (instead of char code) to Unicode @@ -296,16 +296,15 @@ void HTMLRenderer::embed_font(const string & filepath, GfxFont * font, FontInfo /* * Step 2 - * map charcode (or GID for CID truetype) - * generate an Consortium encoding file and let fontforge handle it. + * - map charcode (or GID for CID truetype) * - * - Always map to Unicode for 8bit TrueType fonts and CID fonts + * -> Always map to Unicode for 8bit TrueType fonts and CID fonts * - * - For 8bit nonTruetype fonts: - * Try to calculate the correct Unicode value from the glyph names, unless param->always_apply_tounicode is set + * -> For 8bit nonTruetype fonts: + * Try to calculate the correct Unicode value from the glyph names, when collision is detected in ToUnicode Map * - * - * Also fill in the width_list, and set widths accordingly + * - Fill in the width_list, and set widths accordingly + * - Remove unused glyphs */