svg-glyph-extractor
v1.1.0
Published
Extract glyphs in an SVG file into separate SVGs as paths.
Downloads
4
Readme
SVG Glyph Extractor
Extracts glyph
Elements from an SVG into separate SVGs as path
Elements.
The glyphs are centered in a square canvas with padding on all sides.
Example:
...
<glyph glyph-name="u10800" unicode="𐠀" horiz-adv-x="1396"
d="M782 0h-168v525l-456 -456l-108 108l540 540l-540 540l108 108l456 -456v525h168v-525l456 456l108 -108l-540 -540l540 -540l-108 -108l-456 456v-525z" />
...
Gets converted into:
<?xml version="1.0" ?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1577.4 1577.4">
<path transform="translate(90.70000000000005 71.70000000000005)"
d="M782 0h-168v525l-456 -456l-108 108l540 540l-540 540l108 108l456 -456v525h168v-525l456 456l108 -108l-540 -540l540 -540l-108 -108l-456 456v-525z"/>
</svg>