1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-09-28 17:21:29 +00:00

fixe multiplier, don't make it too big

This commit is contained in:
Lu Wang 2012-09-21 21:02:54 +08:00
parent 1c48a9a4e1
commit 1c5ea6daee
3 changed files with 8 additions and 7 deletions

2
TODO
View File

@ -1,3 +1,5 @@
intermediate asc/des
fix auto hint
bug found in baidu(ubuntu...), bug_chn

View File

@ -146,7 +146,7 @@ void HTMLRenderer::check_state_change(GfxState * state)
double new_draw_ctm[6];
memcpy(new_draw_ctm, cur_ctm, sizeof(new_draw_ctm));
double new_draw_scale = (param->font_size_multiplier) * sqrt(new_draw_ctm[2] * new_draw_ctm[2] + new_draw_ctm[3] * new_draw_ctm[3]);
double new_draw_scale = (param->font_size_multiplier) / (param->zoom) * sqrt(new_draw_ctm[2] * new_draw_ctm[2] + new_draw_ctm[3] * new_draw_ctm[3]);
double new_draw_font_size = cur_font_size;
if(_is_positive(new_draw_scale))

View File

@ -185,12 +185,6 @@ void HTMLRenderer::embed_font(const string & filepath, GfxFont * font, FontInfo
const char * used_map = nullptr;
ffw_metric(&info.ascent, &info.descent, &info.em_size);
if(param->debug)
{
cerr << "Ascent: " << info.ascent << " Descent: " << info.descent << endl;
}
if(!get_metric_only)
{
used_map = font_preprocessor.get_code_map(hash_ref(font->getID()));
@ -399,6 +393,11 @@ void HTMLRenderer::embed_font(const string & filepath, GfxFont * font, FontInfo
ffw_save((char*)fn);
ffw_close();
}
if(param->debug)
{
cerr << "Ascent: " << info.ascent << " Descent: " << info.descent << endl;
}
}
void HTMLRenderer::drawString(GfxState * state, GooString * s)