17.05.2014 Views

PDFlib Text Extraction Toolkit (TET) Manual

PDFlib Text Extraction Toolkit (TET) Manual

PDFlib Text Extraction Toolkit (TET) Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Glyph calculations for vertical writing mode.<br />

the end point calculation works as follows:<br />

For CJK text with vertical writing mode<br />

x end = x<br />

y end = y - fontsize<br />

The upper left and lower right corners of the glyph box can be calculated as follows (for<br />

beta=0):<br />

ulx = x - width/2 * cos(alpha)<br />

uly = y - width/2 * sin(alpha)<br />

lrx = ulx + width * cos(alpha) + dir * fontsize * sin(alpha)<br />

lry = uly + width * sin(alpha) - dir * fontsize * cos(alpha)<br />

with dir=1 in the default case topdown={output=false} and dir=-1 if topdown={output=<br />

true} (see »Top-down coordinate system«, page 73).<br />

78 Chapter 6: <strong>Text</strong> <strong>Extraction</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!