summaryrefslogtreecommitdiff
path: root/source/fitz/stext-device.c
AgeCommit message (Collapse)Author
2015-04-07Fix some warnings.Tor Andersson
2015-04-07Fix structured text extraction in vertical mode.Robin Watts
When advancing a glyph in vertical mode, it should advance down the page. The origin of the glyph as supplied is bottom left, not top right - allow for this in calculations. Previously glyphs were not being collated into spans because of this.
2015-04-07Structured text extraction; improve glyph bounding box calculations.Robin Watts
In vertical motion mode, when calculating bboxes we should use horizontal rather vertical displacements from the 'axis of movement'. In horizontal mode, we displace by 'ascender' and 'descender'. Those concepts don't rotate with the motion mode, so repurpose those fields to hold bbox.x0 and bbox.x1 in vertical mode.
2015-04-07Use fz_advance_glyph rather than direct FT calls during PDF layout.Robin Watts
2015-02-25Text device; collect matrix and bbox for images too.Robin Watts
We were not filling in the matrix and bbox fields for images collected as part of the text extraction device. Fixed here.
2015-02-20Do not crash on text extraction on pages with no text.Robin Watts
Thanks to malc for pointing out the problem.
2015-02-17Use embedded superclass struct instead of user pointer in devices.Tor Andersson
2015-02-17Add ctx parameter and remove embedded contexts for API regularity.Tor Andersson
Purge several embedded contexts: Remove embedded context in fz_output. Remove embedded context in fz_stream. Remove embedded context in fz_device. Remove fz_rebind_stream (since it is no longer necessary). Remove embedded context in svg_device. Remove embedded context in XML parser. Add ctx argument to fz_document functions. Remove embedded context in fz_document. Remove embedded context in pdf_document. Remove embedded context in pdf_obj. Make fz_page independent of fz_document in the interface. We shouldn't need to pass the document to all functions handling a page. If a page is tied to the source document, it's redundant; otherwise it's just pointless. Fix reference counting oddity in fz_new_image_from_pixmap.
2015-02-17Rename fz_close_* and fz_free_* to fz_drop_*.Tor Andersson
Rename fz_close to fz_drop_stream. Rename fz_close_archive to fz_drop_archive. Rename fz_close_output to fz_drop_output. Rename fz_free_* to fz_drop_*. Rename pdf_free_* to pdf_drop_*. Rename xps_free_* to xps_drop_*.
2013-09-13Fix various compile warnings spotted by the cluster.Robin Watts
2013-06-20Rearrange source files.Tor Andersson