NLS_DIV // has to open a new
} new_line_state;
// The order is according to the appearance in check_state_change
// any state changed
bool all_changed;
// current position
double cur_tx, cur_ty; // real text position, in text coords
bool text_pos_changed;
// font & size
const FontInfo * cur_font_info;
double cur_font_size;
long long cur_fs_id;
bool font_changed;
// transform matrix
long long cur_ttm_id;
bool ctm_changed;
bool text_mat_changed;
// horizontal scaling
bool hori_scale_changed;
// this is CTM * TextMAT in PDF
// [4] and [5] are ignored,
// as we'll calculate the position of the origin separately
double cur_text_tm[6]; // unscaled
// letter spacing
long long cur_ls_id;
double cur_letter_space;
bool letter_space_changed;
// word spacing
long long cur_ws_id;
double cur_word_space;
bool word_space_changed;
// text color
long long cur_color_id;
GfxRGB cur_color;
bool color_changed;
// rise
long long cur_rise_id;
double cur_rise;
bool rise_changed;
// optimize for web
// we try to render the final font size directly
// to reduce the effect of ctm as much as possible
// draw_ctm is cur_ctm scaled by 1/draw_text_scale,
// so everything redenered should be multiplied by draw_text_scale
double draw_text_tm[6];
double draw_font_size;
double draw_text_scale;
// the position of next char, in text coords
// this is actual position (in HTML), which might be different from cur_tx/ty (in PDF)
// also keep in mind that they are not the final position, as they will be transform by CTM (also true for cur_tx/ty)
double draw_tx, draw_ty;
// some metrics have to be determined after all elements in the lines have been seen
// see TextLineBuffer.h
class TextLineBuffer;
friend class TextLineBuffer;
TextLineBuffer * text_line_buf;
// for font reencoding
int32_t * cur_mapping;
char ** cur_mapping2;
int * width_list;
Preprocessor preprocessor;
TmpFiles tmp_files;
// for string formatting
StringFormatter str_fmt;
////////////////////////////////////////////////////
// styles & resources
////////////////////////////////////////////////////
std::unordered_map font_name_map;
std::map font_size_map;
std::map transform_matrix_map;
std::map letter_space_map;
std::map word_space_map;
std::unordered_map color_map;
std::map whitespace_map;
std::map rise_map;
std::map height_map;
const Param * param;
std::ofstream html_fout, css_fout;
std::string html_path, css_path;
static const std::string MANIFEST_FILENAME;
};
} //namespace pdf2htmlEX
#endif /* HTMLRENDERER_H_ */