Hello,
I am struggling with what *should* be a simple task.
I needed to convert an SVG font (collection of "glyphs") to a regular SVG image readable by a browser or Inkscape. I managed to convert them by writing a program to create individual SVG files for each glyph, then writing a batch file to flip all of them vertically with Inkscape, because for some reason font SVGs have a different Y axis than normal SVG images.
The only issue now is that every single image extends beyond the top border of the canvas a bit, and the canvas is too large in the other directions.
Is there any way (ideally via command line, as there are about 150 images and batch scripts are far faster than me) to at minimum shift each image down, and ideally also size the canvas to the image?
Thanks!
Command Line Transform
Re: Command Line Transform
Hi.
Svg files containing text should be possible to display directly in your browser or by Inkscape without converting each character.
(I have a feeling you are 'jumping over the stream to fetch the water' -
translated Norwegian proverb - meaning; you are making things more difficult than necessary.)
See the SVG specs for text handling; http://www.w3.org/TR/SVG/text.html
Svg files containing text should be possible to display directly in your browser or by Inkscape without converting each character.
(I have a feeling you are 'jumping over the stream to fetch the water' -
translated Norwegian proverb - meaning; you are making things more difficult than necessary.)
See the SVG specs for text handling; http://www.w3.org/TR/SVG/text.html
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
Re: Command Line Transform
Inkscape's coordinate system is flipped compared to the svg specifications.
Check a regular inkscape svg's structure, maybe the global transformation you can copy from it would solve the problem.
Check a regular inkscape svg's structure, maybe the global transformation you can copy from it would solve the problem.
Re: Command Line Transform
Sorry, I should have been more clear. For whatever reason the SVG font will not display on the Smart TV app I am developing, but a regular SVG will display.
I already have extracted and inverted every image from the SVG font, that is not the issue. The main issue is they all extend a bit above the top border of the canvas, so they don't display correctly in an HTML document. I just need to center them and size the canvas to the object. There is already a menu item in Inkscape that does this and it works perfectly, it's just slow when you have hundreds of files to do this to so I was hoping for some automated way to do this.
Thanks!
I already have extracted and inverted every image from the SVG font, that is not the issue. The main issue is they all extend a bit above the top border of the canvas, so they don't display correctly in an HTML document. I just need to center them and size the canvas to the object. There is already a menu item in Inkscape that does this and it works perfectly, it's just slow when you have hundreds of files to do this to so I was hoping for some automated way to do this.
Thanks!