inkscape cuts off text upon save, but not in preview

Post questions on how to use or achieve an effect in Inkscape.
pythonscript
Posts: 1
Joined: Sun Jun 05, 2011 1:55 am

inkscape cuts off text upon save, but not in preview

Postby pythonscript » Sun Jun 05, 2011 2:03 am

I'm making a simple SVG with a gradient in the background and a small amount of text in the foreground; within inkscape, the text does not appear cut off, but when I save it and upload it to the web, preview it in another program, etc. the text is cut off on the right side. Can anyone help me with this? An example SVG file is attached.

Thank you for the help!
Attachments
logo-upload.svg
example of problematic file
(4.05 KiB) Downloaded 347 times

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: inkscape cuts off text upon save, but not in preview

Postby brynn » Sun Jun 05, 2011 2:51 pm

Image
Welcome to the forum!

The text is cut off on the right side of your image too! Everything that you want to show on the internet, and in some viewers, must fall inside the image border. Most of your image is inside the border, but the right side of the text isn't.

User avatar
BobSongs
Posts: 324
Joined: Fri Sep 14, 2007 2:18 pm
Location: Montreal, Canada

Re: inkscape cuts off text upon save, but not in preview

Postby BobSongs » Sun Jun 05, 2011 3:27 pm

@Pythonscript

A thought has crossed my mind. Hope this explains things.

The original font you're using is: "TeXGyreChorus".

And as you can probably tell from this font name, it's not your common "Arial" or "Times Roman", right?

So give this a try. In InkScape, do the following:

1. Click the text (in this case "site.co.uk").

2. Path Object to Path (or, from the keyboard: Ctrl + Shift + C).

(A comment here. Path Object to path (I'm assuming you're a beginner, forgive me if I'm incorrect) stops your ability to edit text. I.e., adding more words won't be possible from that point. If this isn't an issue, then change the object to a path. If it is an issue, then duplicate your text and paste it elsewhere in your document for later retrieval.)

3. Select your gradient rectangle in the background by clicking it once.

4. Export your image to a .png format:

From the toolbar: SVG Image
From keyboard: Ctrl + Shift + E
From menus: File Export Bitmap...
  • Export Area: leave it at "Selection"
  • Bitmap Size: 300dpi for printing, 96dpi or 72dpi for webpages
  • Filename: Use the Browse button choose where to save the file.

Let me know if that helps to repair things.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: inkscape cuts off text upon save, but not in preview

Postby brynn » Sun Jun 05, 2011 8:48 pm

I don't follow you BobSongs :? :?
You're changing the text to path, then exporting the rectangle only?? Have you maybe left out a step or 2?

Maybe my eyes aren't working. I should probably get some rest and try again tomorrow, lol. :D

User avatar
BobSongs
Posts: 324
Joined: Fri Sep 14, 2007 2:18 pm
Location: Montreal, Canada

Re: inkscape cuts off text upon save, but not in preview

Postby BobSongs » Mon Jun 06, 2011 1:41 am

I've attached a simple SVG file that includes a rectangle, a star, a circle and a swirl to help illustrate what I mentioned in my post.

Load this document into Inkscape.

1. Select only the rectangle and export it to your desktop as a PNG file.
2. Select the rectangle and the circle and export to your desktop.
3. Select the rectangle, the circle and the swirl and export.

Notice the different effects on the exported images.

By selecting only the rectangle, there's no need to trim the other objects where parts lie outside the rectangle's border.

If the text, on the original PC, fits within the borders of the rectangle, then there's no need to select anything other than the rectangle for an export. All objects on top of that rectangle will export with it, including any visible layers. Layers that are made invisible will not export.


drawing.svg
This is the original SVG including rectangle, circle, spiral and star.
(5.13 KiB) Downloaded 207 times
Last edited by BobSongs on Mon Jun 06, 2011 1:23 pm, edited 1 time in total.

User avatar
BobSongs
Posts: 324
Joined: Fri Sep 14, 2007 2:18 pm
Location: Montreal, Canada

Re: inkscape cuts off text upon save, but not in preview

Postby BobSongs » Mon Jun 06, 2011 3:31 am

Out of courtesy, I've done the exporting myself. The three examples below illustrate my point:

Here's what the export looks like if I export with only the rectangle selected:

Image

Here's what the export looks like when I select the rectangle and circle:

Image

And when the rectangle, circle and spiral are selected:

Image

Note that at no time is the star selected when exporting.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: inkscape cuts off text upon save, but not in preview

Postby brynn » Mon Jun 06, 2011 7:42 am

Whoa!! That is wild! The option to export the selection, to me, has always implied JUST the selection, not everything on the canvas found within the borders of the selection.

But I don't think that helps pythonscript. They still would need to select both their text and the rectangle, if the want all of both exported (using the export selection option). Or put the text inside the page border (for the page option). Or use the Drawing option in the first place. If they select just the rectangle, it cuts off the text, just like they've already experienced.

And this is all assuming that they exported it at all. Since they didn't mention it, I was thinking they were using the SVG.

And whether the text is text or a path shouldn't matter at all, to my understanding.

That is definitely interesting about exportig the selection though ;)

User avatar
BobSongs
Posts: 324
Joined: Fri Sep 14, 2007 2:18 pm
Location: Montreal, Canada

Re: inkscape cuts off text upon save, but not in preview

Postby BobSongs » Mon Jun 06, 2011 1:50 pm

brynn wrote:Whoa!! That is wild! The option to export the selection, to me, has always implied JUST the selection, not everything on the canvas found within the borders of the selection.

You're welcome. This was a startling revelation to me and I think I should add a "Quick and Dirty" tutorial to the tutorial pages. I'll deal with this topic more fully there.

brynn wrote:But I don't think that helps pythonscript. They still would need to select both their text and the rectangle, if the want all of both exported (using the export selection option). Or put the text inside the page border (for the page option). Or use the Drawing option in the first place. If they select just the rectangle, it cuts off the text, just like they've already experienced.


pythonscript is using a font on their PC called TeXGyreChorus. This might be a pay-for font for a very professional company or it might be some font found on a "Free fonts" website.

pythonscript has either exported the document in PNG format or is using the SVG file itself on a web page.

TeXGyreChorus is an obscure font, very few PCs will have it installed. Arial, Times New Roman, Verdana, Georgia are more common fonts. A document using an obscure font should have that text turned into paths in order to preserve the text. Inkscape cannot reproduce the font on my PC unless that font's installed. Inkscape will default to something like Arial simply because it doesn't have access to the original. And Arial will display incorrectly.

Either way: when producing an SVG file for the Internet, it's best to turn all text into paths to preserve the typesetting.

brynn wrote:And this is all assuming that they exported it at all. Since they didn't mention it, I was thinking they were using the SVG.

Exactly my point. Since it is SVG, the SVG file is saying "Display the TeXGyreChorus font please" ... and that font is nowhere to be found!

brynn wrote:And whether the text is text or a path shouldn't matter at all, to my understanding.

The only time it matters is when the SVG is forced to display missing fonts. In a PNG export? You're absolutely correct: it doesn't matter. But I agree: this small SVG file pythonscript sent us was probably being used on the web as it is, or sent as an attachment to another PC that doesn't have this font installed. Under those circumstances: convert all text to paths.

;)

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: inkscape cuts off text upon save, but not in preview

Postby brynn » Tue Jun 07, 2011 5:30 am

Oh, I understand now. I thought your suggestion for Text to Path was part of the solution to the text being cut off. But it was just kind of a bonus tip!

TeXGyreChorus is an obscure font, very few PCs will have it installed. Arial, Times New Roman, Verdana, Georgia are more common fonts. A document using an obscure font should have that text turned into paths in order to preserve the text. Inkscape cannot reproduce the font on my PC unless that font's installed. Inkscape will default to something like Arial simply because it doesn't have access to the original. And Arial will display incorrectly.

Yes, I understand that. But why would the substituted font display incorrectly?

User avatar
BobSongs
Posts: 324
Joined: Fri Sep 14, 2007 2:18 pm
Location: Montreal, Canada

Re: inkscape cuts off text upon save, but not in preview

Postby BobSongs » Tue Jun 07, 2011 12:00 pm

brynn wrote:Oh, I understand now. I thought your suggestion for Text to Path was part of the solution to the text being cut off. But it was just kind of a bonus tip!

TeXGyreChorus is an obscure font, very few PCs will have it installed. Arial, Times New Roman, Verdana, Georgia are more common fonts. A document using an obscure font should have that text turned into paths in order to preserve the text. Inkscape cannot reproduce the font on my PC unless that font's installed. Inkscape will default to something like Arial simply because it doesn't have access to the original. And Arial will display incorrectly.

Yes, I understand that. But why would the substituted font display incorrectly?

Ahhh! Excellent question, brynn. First off: yes, essentially a "bonus tip". And since the font wasn't rendering, my suspicion was that the SVG was being used where it had no access to it's source font(s). Second: The incorrect display is due to what I understand to be the general "font substitution weakness"--not of Inkscape specifically, but of any application trying to display a document with a missing font.

I believe that Inkscape's font substitution system is no more complex than any other software. Using Arial in place of any and every missing font is not going to render a layout properly. Also, some PCs may just have a very rudimentary set of fonts installed. It's known that keeping a low font count can help a PC run faster.

The best way to preserve any text layout when sending a document to another PC (Inkscape documents, specifically) is to covert all fonts to paths. The very best way to preserve a document's text layout is to include all fonts in the e-mail while giving instructions to the recipient how that can install these fonts. In Linux, the user creates a .fonts folder in the home directory and puts all fonts there. In Windows a user can install the fonts, but a neat trick is to simply double-click each one. As each one is displayed in a font box the system considers it "installed", making them display in any document that uses them.

Off topic:
If you have two identical PCs that each have identical copies of Windows XP Home SP3 installed along with Microsoft Office 2003, then any document made on the one will appear identical on the other.

However, if PC1 adds a copy of CorelDRAW along with 550 new fonts, then we have a problem. When a new Word document is created on PC1 using 25 different fonts taken from CorelDRAW, it will not be rendered the same way on PC2. Send a copy of this document to PC2 by both e-mail and facsimile, and the person using PC2 will see a discrepancy. The facsimile will have sweeping calligraphic fonts, graffiti fonts, rock-and-roll fonts and so forth, all of which will be replaced by the blander Arial, Times New Roman, Georgia, Tahoma and so forth in an attempt to compensate for the missing fonts.

At this point we can see that two identical machines are no longer truly compatible until PC2 installs CorelDRAW along with the corresponding missing fonts. Once done, the documents shared between them will be identical.
Last edited by BobSongs on Tue Jun 07, 2011 3:10 pm, edited 1 time in total.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: inkscape cuts off text upon save, but not in preview

Postby brynn » Tue Jun 07, 2011 2:03 pm

Very interesting, thanks for the lesson!

rwills
Posts: 1
Joined: Wed Jun 08, 2011 2:23 am

Re: inkscape cuts off text upon save, but not in preview

Postby rwills » Wed Jun 08, 2011 2:41 am

I hope this isn't too irrelevant to this thread but i think my experience might put this subject into perspective.

I love the Chicago font! I know, I know, that dates me. But I still love it, you have no idea how much bad printing
I have seen over the years. Chicago is clean and crisp and scales wonderfully.

But, it just doesn't matter....none of the MS/PC programs or printers would accept it. And now even Apple does not
use it. And I have all my old written materials on my old G3, created in AppleWorks. To access that material in
Pages, I have to transfer the AW files to TextEdit and then open in Pages. And delete all the old formatting.

A minor inconvenience, but i still mourn the loss of a lovely font that was easy on my poor old eyes to read.

We are all of us, bound with the chains of our fickle desires, to meet the demands of our machine masters!

User avatar
BobSongs
Posts: 324
Joined: Fri Sep 14, 2007 2:18 pm
Location: Montreal, Canada

Re: inkscape cuts off text upon save, but not in preview

Postby BobSongs » Wed Jun 08, 2011 5:59 am

rwills: I must admit that the Chicago font was definitely a thing of beauty. It gave Apple products such a distinctive look. I believe many PC users drooled with jealousy.

But as you can see if you click my Chicago link, replacing this with Arial or Times New Roman would be disastrous. These fonts can't be reshaped to fit the exact kerning of Chicago. Also, each font has it's own spacing between itself and the line below it. Chicago and Arial are not a perfect match.


Return to “Help with using Inkscape”