mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 04:50:09 +00:00
asc/des not working..so re-enable intermediate save
This commit is contained in:
parent
210c1edc70
commit
38e4281562
2
TODO
2
TODO
@ -1,3 +1,5 @@
|
||||
remove intermediate save for asc/des
|
||||
|
||||
bug found in baidu(ubuntu...), bug_chn
|
||||
|
||||
option for tounicode-map
|
||||
|
@ -391,15 +391,13 @@ void HTMLRenderer::embed_font(const string & filepath, GfxFont * font, FontInfo
|
||||
// Generate an intermediate ttf font in order to retrieve the metrics
|
||||
// TODO: see if we can get the values without save/load
|
||||
|
||||
|
||||
/*
|
||||
auto fn = str_fmt("%s/f%llx_.ttf", param->tmp_dir.c_str(), info.id);
|
||||
add_tmp_file((char*)fn);
|
||||
|
||||
ffw_save((char*)fn);
|
||||
ffw_close();
|
||||
ffw_load_font((char*)fn);
|
||||
*/
|
||||
ffw_metric(&info.ascent, &info.descent, &info.em_size);
|
||||
}
|
||||
{
|
||||
auto fn = str_fmt("%s/f%llx%s",
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
|
||||
#include <fontforge.h>
|
||||
#include <baseviews.h>
|
||||
@ -252,8 +253,8 @@ void ffw_metric(double * ascent, double * descent, int * em_size)
|
||||
int a = bb.maxy;
|
||||
int d = bb.miny;
|
||||
|
||||
sf->descent += sf->ascent;
|
||||
sf->ascent = 0;
|
||||
sf->ascent = min((int)round(bb.maxy), em);
|
||||
sf->descent = em - bb.maxy;
|
||||
|
||||
info->os2_winascent = a;
|
||||
info->os2_typoascent = a;
|
||||
|
Loading…
Reference in New Issue
Block a user