xtim
Friday, March 27, 2009
 
Improved spacing
Part of the problem I was seeing with the spacing was that we guess the spaces based on glyph bounding boxes, and I was passing the font's declared bounding box for each glyph. Swapped to using the explicitly-declared width for each glyph (while retaining the bounding-box height) and that improved things a great deal.

Surprised to see that the bounding box of some the the glyphs is actually wider than the font's declared bounding box. Not sure why that would be. Maybe a buggy font?

Also using the text-position advance arguments of the TJ operator to generate implicit spaces when the position is advanced by more than a quarter of a bounding box.

Added a basic check to look for paragraph breaks (based on line indentation) and use that to split text into separate blocks.

Next to track individual word boundaries and generate word maps.

T

Labels: ,


Comments: Post a Comment

<< Home

Powered by Blogger