Monday, May 30, 2011

wumpus-drawing

Copperbox revision 2426.

I've added support for upright text - this is text that calculates the vertical size of its orientation rectangle and bounding box from the baseline to the cap height (ignoring the descender depth).

In certain circumstances, accounting for descender depth can produce an ill-balanced drawing when none of the characters in the input string actually have descenders - e.g. drawing numbers within a rectangle frame produces a top heavy drawing as all the digits are the height of caps but none descend. To rectify this, I've extended the API's for PosChar and SimpleText with Up versions of the exported functions. Multi-line text doesn't suffer from this ill-balanced centering, so I haven't needed to extend the DocText API.

Blog Archive

About Me

My photo
Disambiguating biog as there are a few Stephen Tetley's in the world. I'm neither a cage fighter or yachtsman. I studied Fine Art in the nineties (foundation Bradford 1992, degree Cheltenham 1992 - 95) then Computing part-time at Leeds Met graduating in 2003. I'm the Stephen Tetley on Haskell Cafe and Stackoverflow.