mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-07-07 10:20:33 +00:00
use old behaviour of em/asc/des
This commit is contained in:
parent
d9c728b911
commit
8b4ecd68ea
|
@ -85,6 +85,7 @@ void HTMLRenderer::LineBuffer::flush(void)
|
|||
<< "\""
|
||||
<< " class=\"l t" << tm_id
|
||||
<< " h" << renderer->install_height(max_ascent)
|
||||
<< "\" data-asc=\"" << max_ascent
|
||||
<< "\">";
|
||||
|
||||
auto cur_state_iter = states.begin();
|
||||
|
|
|
@ -359,9 +359,11 @@ void HTMLRenderer::embed_font(const string & filepath, GfxFont * font, FontInfo
|
|||
|
||||
{
|
||||
// read metrics
|
||||
int em = ff_get_em_size();
|
||||
// int em = ff_get_em_size();
|
||||
int ascent = ff_get_max_ascent();
|
||||
int descent = ff_get_max_descent();
|
||||
int em = ascent + descent;
|
||||
|
||||
if(em != 0)
|
||||
{
|
||||
info.ascent = ((double)ascent) / em;
|
||||
|
|
4
src/ff.c
4
src/ff.c
|
@ -229,14 +229,14 @@ int ff_get_max_descent(void)
|
|||
void ff_set_ascent(int a)
|
||||
{
|
||||
cur_fv->sf->pfminfo.os2_winascent = a;
|
||||
// cur_fv->sf->pfminfo.os2_typoascent = a;
|
||||
cur_fv->sf->pfminfo.os2_typoascent = a;
|
||||
cur_fv->sf->pfminfo.hhead_ascent = a;
|
||||
}
|
||||
|
||||
void ff_set_descent(int d)
|
||||
{
|
||||
cur_fv->sf->pfminfo.os2_windescent = d;
|
||||
// cur_fv->sf->pfminfo.os2_typodescent = -d;
|
||||
cur_fv->sf->pfminfo.os2_typodescent = -d;
|
||||
cur_fv->sf->pfminfo.hhead_descent = -d;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user