Inkscape Community

Help Using Inkscape => Beyond the Basics => Topic started by: brynn on October 15, 2015, 03:51:02 PM

Title: text to path, or not?
Post by: brynn on October 15, 2015, 03:51:02 PM
Hi Friends,
This just may be a case of my brain not being in gear, because it seems like I should know this.

Anyway, I know that if you're making an Inkscape image which contains text, that's destined for the internet, you should convert the text to path, if you want to make sure that the font you used shows up.  I know that's true for SVG files.

But what about if you export the image to PNG?  Does exporting it to raster essentially make the text into an image, so that you don't need to convert to path?  Or does the text remain text, and you should still convert to paths, to retain the font you used?

Thanks for your help  :)
Title: Re: text to path, or not?
Post by: brynn on October 15, 2015, 06:00:17 PM
Because part of the reason I'm asking, is for some of the tutorials I make for this website.  http://forum.inkscapecommunity.com/index.php?action=articles;cat=2

So like this tutorial (http://forum.inkscapecommunity.com/index.php?action=articles;sa=view;article=13), for example, or this one (http://forum.inkscapecommunity.com/index.php?action=articles;sa=view;article=15), I often write the tutorials in Inkscape.  (because it's convenient - I can also draw up the illustrations right there) . When I'm finished, I export a PNG and embed the image into the article.

If I convert the text to path, the text definitely cannot be read by translator software (because it's not text).  But if the text is remaining as text when I export to PNG, then I would run the risk of the font I use not showing.  But at least non-English speakers would be able to translate it.

So if exporting an image with text to PNG leaves the text as text, maybe I won't be so worried about the font I choose.  Because then non-English speakers can translate the tutorials.

Or if exporting to PNG un-text-ifies the text...well, first, I don't have to convert the text to paths at all; and maybe I should use the articles feature's text editor for the text part of the articles.  Because that should definitely be translatable.
Title: Re: text to path, or not?
Post by: Lazur on October 16, 2015, 12:53:32 AM
Bit confused about the problem -png-s can have no layers nor vector parts like texts.
By exporting you should get exactly what's on screen. If you export the svg to png on a machine where the used font is not installed, then you cannot make an exact match.
This case it would be better to convert text to path but I assume it is unnecessary in your case.
Title: Re: text to path, or not?
Post by: brynn on October 16, 2015, 05:12:25 PM
Quote
-png-s can have no layers nor vector parts like texts

No, not vector text.  But raster editors like GIMP have text tools.  Isn't text from a raster editor readable by things like translation software?

Quote
If you export the svg to png on a machine where the used font is not installed, then you cannot make an exact match.

What?  Of course I have the font installed, or I couldn't have typed it in Inkscape.  Then I export to PNG.  But what do you see when I put the PNG in the article?

Ok, so look at this tutorial:  http://forum.inkscapecommunity.com/index.php?action=articles;sa=view;article=15

What kind of font do you see?

A while ago, someone (can't remember who, but maybe you) told me it wasn't showing the font I used, and was showing their computer's default font.  So I changed the text to path.

But later, I've been thinking about it.  If that's a PNG, it shouldn't matter whether the text is converted to path or not.  So I thought maybe I had some misunderstanding about it.  If they didn't see the font I used, and saw the font their computer substituted, then the text is probably readable by translation software.  Maybe that's a good thing, even though my font doesn't show through for them.

Now I've changed it back so the PNG comes from text (not path).  Do you see a not usual kind of font??  Or do you see a substitution?
Title: Re: text to path, or not?
Post by: Lazur on October 16, 2015, 06:29:48 PM
The text tool in gimp is vector. Even in mspaint the text tool is vector, as long as it's active. After flattening to another layer it's no more a text.
Technically text=set of characters linked from a font file=vector.
(Except for bitmap fonts, but that's completely out of the regular users hands.)


You can type in the text object, but if you open it somewehere without that font installed you will see text displayed with a replacement font.

On that exported png I see the font you used. But for translation it would need an ocr program, and even then, someone knowing the font you used to make it matching.
If it was vector and no text but paths, it couldn't be edited as text -translated-. Then the exact characters would be used, and, (by default) the text attributes stored with that converted object -can be read in the xml editor.
Title: Re: text to path, or not?
Post by: brynn on October 16, 2015, 07:32:10 PM
Quote
The text tool in gimp is vector. Even in mspaint the text tool is vector, as long as it's active

Oh, I had no idea about that!  I thought there was some kind of raster text.  What about text outside of graphics?  Are the fonts that we install in our computers, vectors too?  Like the text that I'm typing and you're reading.  Is it vector too?

Ok, I guess I'm back where I started then, at least understanding about text converted to PNG.

OCR - optical character recognition?  But what about google translate or bing translator.  Do they use ocr?  If I wanted visitors to be able to translate tutorials, would I have to use an SVG image (with text, not paths), instead of PNG?  Or not even then?
Title: Re: text to path, or not?
Post by: Lazur on October 17, 2015, 06:01:55 AM
Font files containing each character as vectors. There is an option in inkscape to create somekind of fonts -svg fonts-. You can assign vector shapes-glypths to unicode characters.
The feature is lacking a bit because even inkscape cannot use those svg fonts. Some browsers may support them, at least there are plans on making svg fonts available. A benefit would be using characters with multiple fills, that then could be stored in css.
The svg fonts are easier to import to fontforge, otherwise you would need to open each character one by one. Other things that font files can adress, like ligatures or hinting can be added there, then you can save your work as a new font file.

So yes, fonts are vectors with additional info. But not all font formats use the same kind of cubic B?ziers you see in inkscape, truetype is based on quadratic B?ziers.
https://fontforge.github.io/bezier.html (https://fontforge.github.io/bezier.html)

Texts on screen are stored as vectors -like, you can zoom in to this page and the characters are scaled up without pixelation.


The mentione translating is based on text, they could hardly bear raster images. Like, they would need a sepate background without the text flattened to add anything on top.
Title: Re: text to path, or not?
Post by: brynn on October 17, 2015, 12:36:49 PM
Very interesting!

Where you learn all this stuff?  School? 
Title: Re: text to path, or not?
Post by: Lazur on October 17, 2015, 05:07:01 PM
From here and there, on the net. There are quite good explanations on wikipedia for those who interested:

truetype (https://en.wikipedia.org/wiki/TrueType)
opentype (https://en.wikipedia.org/wiki/OpenType)
type 1 (https://en.wikipedia.org/wiki/PostScript_fonts#Type_1)


There was this site with quite alot of typographic discuss:
typophile (http://typophile.com/)
-their site loaded very slow, hope they will move to a bigger server-

Haven't looked into creating fonts, but this one is mandatory:
fontforge (http://fontforge.github.io/en-US/)


On svg fonts, probably Suv has some good links, can't remember them exactly.
Maybe it was related to mozilla's working group or something similar.
Title: Re: text to path, or not?
Post by: brynn on October 17, 2015, 06:49:41 PM
Well, thanks for your help!  :D
Title: Re: text to path, or not?
Post by: styxlawyer on October 18, 2015, 01:55:44 PM
There's some very good tutorials on YouTube about creating fonts with Inkscape. I've used it several time to create scalable logos to import into printed circuit board layouts as importing raster graphics is always a bit flaky.

Try this link (https://www.google.co.uk/search?client=opera&q=svg+font+editor+inkscape+tutorial&sourceid=opera&ie=UTF-8&oe=UTF-8)