Friday, November 12, 2010

wumpus-core

Copperbox revision 1863.

I've re-worked the Text handling code.

SVG output no longer uses a TextEncoder. That it previously used a font specific TextEncoder to lookup symbol names was a design mistake, to get a Unicode code point from a PostScript glyph name it now uses a global lookup table derived from the glyph list. Where the input string encodes a special character as a code point it simply prints the code point as-is and as per the Text.XHtml package character values above ASCII 128 are encoded as code points.

PostScript still needs a encoder per-font, though most of these will be one of the encoding vectors defined in the PostScript Language Reference Manual. At some point I will have to generate lookup tables for these encoding vectors, though Wumpus-Core already has a fall-back lookup table derived from the glyph list. The fall-back lookup is slightly problematic as the some of the entries in the glyph list share the same name (e.g. ncedilla and ncommaaccent). Here the glyph names "mean" the same character but they correspond to different renderings of it and fonts will support one or the other, so it is possible that the lookup might not find the correct character.

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.