Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why svg font is mirrored?

Tags:

svg

svg-font

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?

like image 246
Vyacheslav Slinko Avatar asked Jan 07 '13 20:01

Vyacheslav Slinko


People also ask

Why does my font change in SVG?

The SVG format contains a piece of font information and when this font isn't available it replaces the font with another one.

How do SVG fonts work?

SVG fonts are a new version of an Open Type format and contain things that fonts have never been able to contain, like transparency and colour information. They work fantastically for fonts that resemble brush strokes and contain semi-transparent areas.

What does SVG font mean?

An SVG font is a newer font technology with some unique features. SVG stands for Scalable Vector Graphics, thus the SVG glyph format can feature multiple colors, gradients or patterns that are actually embedded into the characters.


1 Answers

"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

like image 152
Robert Longson Avatar answered Nov 15 '22 11:11

Robert Longson