mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 04:50:09 +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
|
fix auto hint
|
||||||
|
|
||||||
bug found in baidu(ubuntu...), bug_chn
|
bug found in baidu(ubuntu...), bug_chn
|
||||||
|
@ -146,7 +146,7 @@ void HTMLRenderer::check_state_change(GfxState * state)
|
|||||||
double new_draw_ctm[6];
|
double new_draw_ctm[6];
|
||||||
memcpy(new_draw_ctm, cur_ctm, sizeof(new_draw_ctm));
|
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;
|
double new_draw_font_size = cur_font_size;
|
||||||
if(_is_positive(new_draw_scale))
|
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;
|
const char * used_map = nullptr;
|
||||||
|
|
||||||
ffw_metric(&info.ascent, &info.descent, &info.em_size);
|
ffw_metric(&info.ascent, &info.descent, &info.em_size);
|
||||||
|
|
||||||
if(param->debug)
|
|
||||||
{
|
|
||||||
cerr << "Ascent: " << info.ascent << " Descent: " << info.descent << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!get_metric_only)
|
if(!get_metric_only)
|
||||||
{
|
{
|
||||||
used_map = font_preprocessor.get_code_map(hash_ref(font->getID()));
|
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_save((char*)fn);
|
||||||
ffw_close();
|
ffw_close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(param->debug)
|
||||||
|
{
|
||||||
|
cerr << "Ascent: " << info.ascent << " Descent: " << info.descent << endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void HTMLRenderer::drawString(GfxState * state, GooString * s)
|
void HTMLRenderer::drawString(GfxState * state, GooString * s)
|
||||||
|
Loading…
Reference in New Issue
Block a user