mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-21 20:50:07 +00:00
fixe multiplier, don't make it too big
This commit is contained in:
parent
1c48a9a4e1
commit
1c5ea6daee
2
TODO
2
TODO
@ -1,3 +1,5 @@
|
||||
intermediate asc/des
|
||||
|
||||
fix auto hint
|
||||
|
||||
bug found in baidu(ubuntu...), bug_chn
|
||||
|
@ -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))
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user