mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-07-05 17:48:38 +00:00
..
This commit is contained in:
parent
2d80cdc575
commit
af65485eb3
|
@ -304,11 +304,12 @@ void HTMLRenderer::processLink(AnnotLink * al)
|
||||||
x2 = default_ctm[0] * x2 + default_ctm[2] * y2 + default_ctm[4];
|
x2 = default_ctm[0] * x2 + default_ctm[2] * y2 + default_ctm[4];
|
||||||
y2 = default_ctm[1] * x2 + default_ctm[3] * y2 + default_ctm[5];
|
y2 = default_ctm[1] * x2 + default_ctm[3] * y2 + default_ctm[5];
|
||||||
|
|
||||||
|
// TODO, in html, border width is included
|
||||||
html_fout << "<div style=\"position:absolute;"
|
html_fout << "<div style=\"position:absolute;"
|
||||||
<< "left:" << x1 << "px;"
|
<< "left:" << _round(x1) << "px;"
|
||||||
<< "bottom:" << y1 << "px;"
|
<< "bottom:" << _round(y1) << "px;"
|
||||||
<< "width:" << (x2-x1) << "px;"
|
<< "width:" << _round(x2-x1) << "px;"
|
||||||
<< "height:" << (y2-y1) << "px;";
|
<< "height:" << _round(y2-y1) << "px;";
|
||||||
|
|
||||||
auto * border = al->getBorder();
|
auto * border = al->getBorder();
|
||||||
if(border)
|
if(border)
|
||||||
|
|
|
@ -172,9 +172,11 @@ void HTMLRenderer::embed_font(const string & filepath, GfxFont * font, FontInfo
|
||||||
|
|
||||||
info.use_tounicode = (is_truetype_suffix(suffix) || (param->tounicode > 0));
|
info.use_tounicode = (is_truetype_suffix(suffix) || (param->tounicode > 0));
|
||||||
|
|
||||||
|
const char * used_map = nullptr;
|
||||||
|
|
||||||
if(!get_metric_only)
|
if(!get_metric_only)
|
||||||
{
|
{
|
||||||
const char * used_map = font_preprocessor.get_code_map(hash_ref(font->getID()));
|
used_map = font_preprocessor.get_code_map(hash_ref(font->getID()));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Step 1
|
* Step 1
|
||||||
|
@ -383,6 +385,13 @@ void HTMLRenderer::embed_font(const string & filepath, GfxFont * font, FontInfo
|
||||||
|
|
||||||
ffw_set_ascent(ascent);
|
ffw_set_ascent(ascent);
|
||||||
ffw_set_descent(descent);
|
ffw_set_descent(descent);
|
||||||
|
|
||||||
|
if(!get_metric_only)
|
||||||
|
{
|
||||||
|
if(font_8bit)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -439,7 +448,7 @@ void HTMLRenderer::drawString(GfxState * state, GooString * s)
|
||||||
|
|
||||||
while (len > 0) {
|
while (len > 0) {
|
||||||
auto n = font->getNextChar(p, len, &code, &u, &uLen, &dx1, &dy1, &ox, &oy);
|
auto n = font->getNextChar(p, len, &code, &u, &uLen, &dx1, &dy1, &ox, &oy);
|
||||||
|
|
||||||
if(!(_equal(ox, 0) && _equal(oy, 0)))
|
if(!(_equal(ox, 0) && _equal(oy, 0)))
|
||||||
{
|
{
|
||||||
cerr << "TODO: non-zero origins" << endl;
|
cerr << "TODO: non-zero origins" << endl;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user