Anti-nuisance lawsuit warning: The purpose of these notes is to remind me, Zoegond, of stuff or to help me work stuff out. They may contain mistakes.

Quick

  • ($a, $b....) = unpack("A2A7...", $packed)
  • push( array, list )

Thursday, March 11, 2010

SVG text

Experiments show that a line of SVG text has four strata or horizontal layers of equal height:

TOP QUARTER only used by descenders from the line above

UPPER CAPITAL QUARTER only used by upper parts of capitals, and ascenders

UPPER MINISCULE QUARTER midparts of capitals, and upper part of x-height

LOWER QUARTER lowest part of x-height

-------------

DESCENDER QUARTER (overlaps TOP QUARTER of line below
)


That's to say, if you specify your text to have font-size 6 then the space occupied by the four quarters will be 6 units, with each quarter taking up 1.5 units. Similarly you should use 6 as the dy when placing tspans to do multiple lines of text.

(It seems that while Arial follows this pattern, other fonts may not, any unfamiliar font should be experimentally displayed first for measurement).

Followers

Blog Archive