Suppose text_tm is [1,0,0,1,0,0] (identity)
and ctm is [-1,0,0,1,0,0] (horizontal flip)

and ignore text_scale, horizontal_scale etc.

then dev_dx=-char_dx

hmm. I wish I could make up a sample PDF manually


On Sat, Apr 6, 2013 at 12:21 AM, John Hewson <notifications@github.com>wrote:

> In src/HTMLRenderer/text.cc:
>
> >
> >          if(is_space && (param->space_as_offset))
> >          {
> >              // ignore horiz_scaling, as it's merged in CTM
> > -            text_line_buf->append_offset((dx1 * cur_font_size + cur_letter_space + cur_word_space) * draw_text_scale);
> > +            text_line_buf->append_offset((char_dx * state->getFontSize() + state->getCharSpace() + state->getWordSpace()) * draw_text_scale);
> > +        }
> > +        else if(x + dev_total_dx + dev_dx < xMin - EPS || x + dev_total_dx > xMax + EPS ||
>
> Sorry, yes, char_dx is the unmodified value, I forgot.
>
> dev_dx is always -char_dx
>
> Seems wrong to me...
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/coolwanglu/pdf2htmlEX/pull/114/files#r3675802>
> .
>