lewisje / svgweb

Automatically exported from code.google.com/p/svgweb
Other
0 stars 0 forks source link

Support units-per-em on SVG fonts #495

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In the SVGTextNode code for handling SVG fonts, the positioning and scaling of 
glyph clones uses a 
hard coded value of 2048 for the size of the design grid for the font.

If the font does specify a value other than 2048, the resulting size and 
positioning of glyphs will be 
incorrect.  The default value for units-per-em is 1000.

An example file can be found at svggen/animate-elem-03-t.svg.  In this example 
units-per-em is 
missing and so a value of 1000 should be used.  Using 2048 results in the text 
being rendered 
approx half the size it should be.

Attached is a patch.

Original issue reported on code.google.com by k...@svgmaker.com on 27 May 2010 at 5:24

Attachments:

GoogleCodeExporter commented 8 years ago
Issue 495; Support units-per-em on SVG Fonts.
Thanks to ken@svgmaker.com for the patch.

Applied in r1139.

Original comment by grick23@gmail.com on 29 May 2010 at 3:58