Why svg font is mirrored?

1.2k Views Asked by At

I have SVG file with element <path d="..." />

I'm converted that file to SVG font:

<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg">
    <defs>
        <font id="somefont" horiz-adv-x="1000">
            <font-face font-family="somefont" units-per-em="1000"/>
            <glyph unicode="a" d="..."/>
        </font>
    </defs>
</svg>

Attribute d isn't changed, but font is mirrored by x axis.

Why that happens and how to fix it?

2

There are 2 best solutions below

0
On BEST ANSWER

"Unlike standard graphics in SVG, where the initial coordinate system has the y-axis pointing downward (see The initial coordinate system), the design grid for SVG fonts, along with the initial coordinate system for the glyphs, has the y-axis pointing upward for consistency with accepted industry practice for many popular font formats."

Source: http://www.w3.org/TR/SVG/fonts.html

3
On

Can be converted to right glyphs with that script:

#!/usr/bin/env fontforge
Open("source.svg")
Generate("converted.svg")