1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-07-03 08:38:39 +00:00

don't decompose ligature when tounicode map is not used, need more fix laster

This commit is contained in:
Lu Wang 2012-09-28 17:25:12 +08:00
parent 6a4c0856a7
commit 10c55cffcb

View File

@ -522,13 +522,21 @@ void HTMLRenderer::drawString(GfxState * state, GooString * s)
}
else
{
if((param->decompose_ligature) && all_of(u, u+uLen, isLegalUnicode))
if(cur_font_info->use_tounicode)
{
line_buf.append_unicodes(u, uLen);
if((param->decompose_ligature) && all_of(u, u+uLen, isLegalUnicode))
{
line_buf.append_unicodes(u, uLen);
}
else
{
Unicode uu = check_unicode(u, uLen, code, font);
line_buf.append_unicodes(&uu, 1);
}
}
else
{
Unicode uu = (cur_font_info->use_tounicode ? check_unicode(u, uLen, code, font) : unicode_from_font(code, font));
Unicode uu = unicode_from_font(code, font);
line_buf.append_unicodes(&uu, 1);
}
}