mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-10-05 19:41:40 +00:00
remove debug code...oops
This commit is contained in:
parent
2ca94990a4
commit
f6508fc86e
@ -19,30 +19,14 @@ using std::max;
|
|||||||
using std::vector;
|
using std::vector;
|
||||||
using std::ostream;
|
using std::ostream;
|
||||||
|
|
||||||
// debug
|
|
||||||
GfxFont * debug_font;
|
|
||||||
double debug_width;
|
|
||||||
|
|
||||||
void HTMLRenderer::LineBuffer::reset(GfxState * state)
|
void HTMLRenderer::LineBuffer::reset(GfxState * state)
|
||||||
{
|
{
|
||||||
//debug
|
|
||||||
debug_font = state->getFont();
|
|
||||||
|
|
||||||
state->transform(state->getCurX(), state->getCurY(), &x, &y);
|
state->transform(state->getCurX(), state->getCurY(), &x, &y);
|
||||||
tm_id = renderer->cur_tm_id;
|
tm_id = renderer->cur_tm_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
void HTMLRenderer::LineBuffer::append_unicodes(const Unicode * u, int l)
|
void HTMLRenderer::LineBuffer::append_unicodes(const Unicode * u, int l)
|
||||||
{
|
{
|
||||||
//debug
|
|
||||||
if(text.size() == 0)
|
|
||||||
{
|
|
||||||
if(debug_font->isCIDFont())
|
|
||||||
debug_width = 0;
|
|
||||||
else
|
|
||||||
debug_width = dynamic_cast<Gfx8BitFont*>(debug_font)->getWidth(u[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
text.insert(text.end(), u, u+l);
|
text.insert(text.end(), u, u+l);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,12 +152,6 @@ void HTMLRenderer::LineBuffer::flush(void)
|
|||||||
|
|
||||||
size_t next_text_idx = min(cur_state_iter->start_idx, cur_offset_iter->start_idx);
|
size_t next_text_idx = min(cur_state_iter->start_idx, cur_offset_iter->start_idx);
|
||||||
|
|
||||||
{
|
|
||||||
double w;
|
|
||||||
auto wid = renderer->install_whitespace(debug_width, w);
|
|
||||||
out << "<span class=\"_ _" << wid << "\">" << "</span>";
|
|
||||||
}
|
|
||||||
|
|
||||||
outputUnicodes(out, (&text.front()) + cur_text_idx, next_text_idx - cur_text_idx);
|
outputUnicodes(out, (&text.front()) + cur_text_idx, next_text_idx - cur_text_idx);
|
||||||
cur_text_idx = next_text_idx;
|
cur_text_idx = next_text_idx;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user