'M' is bold in pdf created in Inkscape, not in SVG

Post questions on how to use or achieve an effect in Inkscape.
User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

'M' is bold in pdf created in Inkscape, not in SVG

Postby brynn » Sun Oct 31, 2010 12:37 pm

Hi Friends,
I've just finished making a PDF using Inkscape, successfully, I'm happy to report, except that the uppercase 'm' (M) appears to be bold in the PDF. And I certainly did not do it on purpose. Here are identical sections of each, the PDF and SVG:

trns bkgd tut pdf Mbold.PNG
PNG of PDF file - bold M obvious
trns bkgd tut pdf Mbold.PNG (94.51 KiB) Viewed 4381 times


trns bkgd tut pdf M-bold.PNG
PNG of SVG file - M highlighted for comparison
trns bkgd tut pdf M-bold.PNG (139.11 KiB) Viewed 4381 times


Both snips are taken from 100% zoom, and I don't understand why they appear unequal. (Usually the Inkscape doc appears bigger in comparison; this is the first time I've compared to PDF.) But my point is that no other characters, upper- or lowercase, appear bolded (which eliminates larger size as the cause of the bolding).

Is this something that should be reported as a bug?
Thanks for your help :D

PS - Hhhmmmm, upon closer inspection, the lowercase 'w' appears slightly bolder than the rest, but not as bold as the M. Just seems weird, lol!

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: 'M' is bold in pdf created in Inkscape, not in SVG

Postby ~suv » Sun Oct 31, 2010 12:43 pm

Could you attach the SVG file? (or one with a sample paragraph of the text, to have a look at the SVG source -- did you paste formatted text from MS Office or another external application?)

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: 'M' is bold in pdf created in Inkscape, not in SVG

Postby ~suv » Sun Oct 31, 2010 1:22 pm

  • What font did you use?
  • Is it a TTF or OTF font?
  • Does the same happen if you use a different font (e.g. Arial) and save a copy as PDF?

[Edit]
Comparing the screenshots it seems that in Inkscape you didn't define a specific font but used the generic 'Sans' [1]. Apparently your PDF viewer decides to use a different font than Inkscape? Or are these screenshots from different versions?

[1] 'Sans' is the default font in Inkscape 0.48. Afaik, on Windows, 'Arial' is used to render the text in this case - the OS or the application can decide which of the actually installed fonts is used to render text with a generic font ('Sans', 'Serif' , 'Monospace', …)
[/Edit]

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: 'M' is bold in pdf created in Inkscape, not in SVG

Postby druban » Sun Oct 31, 2010 2:17 pm

Hi Brynn. If you have a second you could try zooming in on the PDF to about 200% or 400% and let us know if the boldness goes away...?
Your mind is what you think it is.

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

Re: 'M' is bold in pdf created in Inkscape, not in SVG

Postby brynn » Sun Oct 31, 2010 3:35 pm

sample file:

sample bold M.svg
(8.71 KiB) Downloaded 204 times


Yes, I pasted it from OpenOffice Writer. But the Ms were never bolded in that original.
I used Microsoft Sans Serif.
Don't know what kind of font it is -- just that it's pretty standard. (Because I know that unstable fonts don't do well in PDF.)
I think MS Sans is just about the same as Arial, as far as stability or commonality. But I'll try Arial if you want, just lmk.

[Edit]
Comparing the screenshots it seems that in Inkscape you didn't define a specific font but used the generic 'Sans' [1]. Apparently your PDF viewer decides to use a different font than Inkscape? Or are these screenshots from different versions?

[1] 'Sans' is the default font in Inkscape 0.48. Afaik, on Windows, 'Arial' is used to render the text in this case - the OS or the application can decide which of the actually installed fonts is used to render text with a generic font ('Sans', 'Serif' , 'Monospace', …)
[/Edit]


"...screenshots from different versions?" of what? Different versions of what?
I'm not sure what you mean about the info in your edit. You're saying that Adobe Reader might display a different font than what was formatted? Or that the conversion to PDF might code in a different font? Is this in the case of an unusual or rare font? Or is it just what always happens?

Well, all I can say at the moment, is that I specifically formatted every last paragraph in Microsoft Sans Serif (sometimes called MS Sans) 14 size (except for the titles and subtitles, which are same font, but size 18 and 16 respectively) while in Inkscape, in the SVG. I did not use default font on purpose, I purposely tried NOT to use default. I'm on Windows 7, and don't understand what happens during conversion to PDF, or in display of PDF in Adobe Reader. (For some reason which I don't understand, the default font in my Inkscape 0.48 is Segoe Print????)

druban, the bolding doesn't seem as obvious at 200 to 400%. But compared to bolding that I specifically formatted, it's also hard to see at that zoom level. So I can't answer yes to your question.

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: 'M' is bold in pdf created in Inkscape, not in SVG

Postby ~suv » Sun Oct 31, 2010 6:00 pm

brynn wrote:"...screenshots from different versions?" of what? Different versions of what?
Sorry for not better explaining: I meant different versions of the SVG file in the work process, which use(d) different fonts e.g. for testing or for comparing readability in Inkscape and in the PDF viewer on-screen.

I understand now that you always used "Microsoft Sans Serif" in Inkscape. The PDF viewer as seen on your screenshot renders the text in a different font though (looks similar to Verdana, has different proportions than "Microsoft Sans Serif").

brynn wrote:I'm not sure what you mean about the info in your edit.
It could have played a role if in Inkscape you had used the generic font 'Sans', but you didn't, so it is not relevant here.
brynn wrote:You're saying that Adobe Reader might display a different font than what was formatted?
possibly yes (I do not know, but it looks like that, from your screenshot)
brynn wrote:Or that the conversion to PDF might code in a different font?
less likely, but could happen when dealing with a generic font (like 'Sans')
brynn wrote:Is this in the case of an unusual or rare font?
should not matter as long as the font is installed, of decent quality and available in Inkscape.
brynn wrote:Or is it just what always happens?
no - usually it does not happen.

brynn wrote:(…) I specifically formatted every last paragraph in Microsoft Sans Serif (sometimes called MS Sans) 14 size (except for the titles and subtitles, which are same font, but size 18 and 16 respectively) while in Inkscape, in the SVG.
Thanks for providing additional details and a sample SVG file.

When comparing the rendering of the SVG file in Inkscape 0.48 to the PDF file I exported (i.e. used 'File > Save a copy as…') from Inkscape 0.48 on Mac OS X 10.5.8, I do not see the same differences (see attached screenshot). The font is installed, as can be seen in the controls bar of the text tool in Inkscape, embedded in the PDF file and used by Apple's default PDF viewer.

Note that I do not have a bold version of the font installed, hence the heading 'Traditional "Cropping"' isn't rendered bold even though formatted as bold in Inkscape. But your Inkscape screenshot shows the same (no boldening of the header in Inkscape) so it doesn't play a role in why your PDF file is displayed differently with incorrectly rendered, fatter 'M's:

Image

brynn wrote:(For some reason which I don't understand, the default font in my Inkscape 0.48 is Segoe Print????)
You can change the default font in the 'Text & Font' dialog: choose a font and font size and click on 'Set as default' in the lower left corner of the dialog.

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

Re: 'M' is bold in pdf created in Inkscape, not in SVG

Postby brynn » Sun Oct 31, 2010 9:23 pm

So it sounds like you do not have Adobe Reader, or what I'm guessing is more likely, Adobe Reader isn't Mac-supported.

Can someone with Windows and/or Adobe Reader make a test PDF file out of my SVG? I was using Inkscape 0.48 on Windows 7 64-bit, and my Reader, I just updated...like yesterday.....version 9.4.0.

You know, now that you mention it, the font in my PDF does NOT look like MS Sans Serif. I thought it looked strange, but the first thing that caught my attention was the bold 'M's. (I thought the bold Ms was a symptom of a larger problem, causing the font not to look right.) How do we determine whether the problem is with Inkscape's conversion to PDF, or Adobe Reader's display of Inkscape-made PDFs? Just wait for more tests with the same programs I used? Or...??

I don't mind doing some research on this, I just don't know where to start. Well, besides Launchpad. I'll definitely do some searching there, but suspect you'll have a better idea what to look for :mrgreen:

Thanks for info on changing my default font :D

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: 'M' is bold in pdf created in Inkscape, not in SVG

Postby ~suv » Sun Oct 31, 2010 9:32 pm

brynn wrote:So it sounds like you do not have Adobe Reader
I have had no need to install Adobe Reader so far -- the tools provided by the operating system as well as FLOSS tools based on GhostScript, cairo and poppler have been sufficient to handle PS, EPS and PDF files.

brynn wrote:or what I'm guessing is more likely, Adobe Reader isn't Mac-supported.
No, it is my choice not to install Adobe Reader (it is available for Mac OS X, too).

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: 'M' is bold in pdf created in Inkscape, not in SVG

Postby druban » Tue Nov 02, 2010 6:06 am

Hi Brynn i took the svg that you posted, opened it in inkscape and saved as PDF. I then opened the PDF in Reader 9.4.0. The font is displayed properly at any zoom with no bolding. I am using Windows xp. I am attaching the PDF for you to view on your system. If the problem recurs with this file then we have eliminated Inkscape as the source of the problem....
Mtest.pdf
(24.35 KiB) Downloaded 270 times

There is a setting in Reader "to use local fonts." I have never known this to cause a conflict in any but the oldest possible PDF formats, but you might try unchecking this.
Your mind is what you think it is.

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: 'M' is bold in pdf created in Inkscape, not in SVG

Postby ~suv » Tue Nov 02, 2010 8:01 am

druban wrote:Hi Brynn i took the svg that you posted, opened it in inkscape and saved as PDF.

not brynn here ;) some additional notes nevertheless, maybe useful...

Your PDF file renders identically to the one I exported here on OS X (again not using Adobe Reader but Apple's Preview.app). The PDF files are also nearly identical with regard to file size, version and embedded fonts:

druban's PDF file:

Code: Select all

$ pdfinfo Mtest-druban.pdf
Creator:        cairo 1.8.8 (http://cairographics.org)
Producer:       cairo 1.8.8 (http://cairographics.org)
Tagged:         no
Pages:          1
Encrypted:      no
Page size:      800 x 560 pts
File size:      24934 bytes
Optimized:      no
PDF version:    1.4

$ pdffonts Mtest-druban.pdf
name                                 type              emb sub uni object ID
------------------------------------ ----------------- --- --- --- ---------
MicrosoftSansSerif                   CID TrueType      yes no  yes      5  0
MicrosoftSansSerif                   CID TrueType      yes no  yes      6  0


~suv's PDF file:

Code: Select all

$ pdfinfo "sample bold M-cairo-1.8.10.pdf"
Creator:        cairo 1.8.10 (http://cairographics.org)
Producer:       cairo 1.8.10 (http://cairographics.org)
Tagged:         no
Pages:          1
Encrypted:      no
Page size:      800 x 560 pts
File size:      24920 bytes
Optimized:      no
PDF version:    1.4

$ pdffonts "sample bold M-cairo-1.8.10.pdf"
name                                 type              emb sub uni object ID
------------------------------------ ----------------- --- --- --- ---------
MicrosoftSansSerif                   CID TrueType      yes no  yes      5  0
MicrosoftSansSerif                   CID TrueType      yes no  yes      6  0


Both have all glyphs which occur in the text embedded, from the font "Micorsoft Sans Serif", both are PDF version 1.4. To get the expected appearance, the embedded fonts should be used to render the file, not locally installed ones (as far as I understand the mentioned setting in Adobe Reader).

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

Re: 'M' is bold in pdf created in Inkscape, not in SVG

Postby brynn » Tue Nov 02, 2010 12:44 pm

A-HA!!
Ok, the M is still bold in appearance with drubann's test PDF. But at first I thought it wasn't. Then I noticed that druban's test file had opened at 78%. When I changed it to 100%, the bold Ms returned. When I opened my original PDF file, and changed to 75%, the M problem resolved.

So maybe it's something like druban was thinking from the start? Except backwards....?? He suggested increaseing zoom might resolve it, but decreasing zoom did resolve it.

vwanweb
Posts: 169
Joined: Sun Jun 06, 2010 1:48 pm

Re: 'M' is bold in pdf created in Inkscape, not in SVG

Postby vwanweb » Tue Nov 02, 2010 1:28 pm

just a note, I was advised earlier to use Basic Sans Serif for portable document work. It is my understanding that the font Inkscape uses for its Use Interface is Basic Sans Serif. Justfor the sake of sanity I stay away from any MS based fonts, as we all know MS does not play well when it comes to open portable formatting.

-vw

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: 'M' is bold in pdf created in Inkscape, not in SVG

Postby druban » Tue Nov 02, 2010 4:29 pm

~suv wrote:Your PDF file renders identically to the one I exported here on OS X (again not using Adobe Reader but Apple's Preview.app). The PDF files are also nearly identical with regard to file size, version and embedded fonts....


I too used Inkscape to export the PDF, so it's not surprising that it should be identical... :D If I used some other program (PDFwriter) to write the PDF the results would be different, especially the size....

brynn wrote:Ok, the M is still bold in appearance with drubann's test PDF. But at first I thought it wasn't. Then I noticed that druban's test file had opened at 78%. When I changed it to 100%, the bold Ms returned. When I opened my original PDF file, and changed to 75%, the M problem resolved...

Resolved is not quite the word I would use! Your system is rendering text very unevenly and not, I think, the way it is supposed to.. see the png below. does your system render like this at the same zooms in the pic? It really should. If it is only the 100% zoom that is affected, then you might have cleartype enabled for text smoothing (antialiasing) and it might look better once it is disabled.
brynn.png
brynn.png (60.76 KiB) Viewed 4214 times
Your mind is what you think it is.

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

Re: 'M' is bold in pdf created in Inkscape, not in SVG

Postby brynn » Wed Nov 03, 2010 8:16 am

Thanks vwanweb. But I don't have Basic Sans Serif.
as we all know MS does not play well when it comes to open portable formatting.

Well no, I didn't know that. This was the largest and most complicated doc I've ever made for PDF, so I'm still learning. I only know PDF from the Inkscape perspective. I don't know how to make one using Adobe software.

druban, my system renders the file almost identical to your PNGs. Anything below about 90% zoom is fine, normal like yours. Anything above 110% is mostly ok, almost exactly like yours. For some reason, it's hard for me to discern above 100% zoom, partly because the font that I did format to be bold (subtitle "Traditional "Cropping"") does not show bold to me. So I can't compare it. I think over 100% zoom probably is fine, normal, and that it's just "my eyes" are not dependable here.

I have checked my display settings, and I do have ClearType enabled. Also, I have it set to display text at 125%, rather than the default 100%. It's just easier for me to read. But I did try disabling the ClearType. Not only did it NOT solve the bold M problem, it made all the text throughout my system hard to read. Plus, if the problem was with ClearType, wouldn't it affect more than just 'M'?

But, I think the bottom line, at this point, is that the problem is not with Inkscape. And I feel fairly comfortable that most people will be able to use the PDF and view it normally. Even with the bold M, it's not illegible. I just wanted to rule out a problem with Inkscape.

So unless you or ~suv or vwanweb (or anyone) can find any evidence that points to Inkscape, I think I'm ready to call this "case closed". If I run into any more problems, or learn more about it, I'll bring it up again.

Meanwhile, I'm ready to upload it and would value your input, if you have a chance to read it....if the forum server can stay up long enough, lol! (It's gone down on me twice lately.)

Many thanks for everyone's help; as always, it's much appreciated :D

vwanweb
Posts: 169
Joined: Sun Jun 06, 2010 1:48 pm

Re: 'M' is bold in pdf created in Inkscape, not in SVG

Postby vwanweb » Thu Nov 04, 2010 9:50 am

Thanks vwanweb. But I don't have Basic Sans Serif.



Here is a link to a short and sweet outline for safe fonts to use for web designs, IMO this applies to .pdf (portable) work as well. Looks like the top three recommended fonts are:
>Arial
>Times New Roman
>Verdana
This site also explains the terms sans vs sans serif.
http://www.theinternetdigest.net/archive/websafefonts.html

Oops, I was advised earlier that the font inkscape uses for its UI is Basic Sans SF.

After following this posting looks like I will be using Arial or Times New Roman for porting text from now on.
http://web.mit.edu/jmorzins/www/fonts.html

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

Re: 'M' is bold in pdf created in Inkscape, not in SVG

Postby brynn » Thu Nov 04, 2010 10:38 am

Oh wow, thanks vwanweb!
These will be very helpful resources :D

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: 'M' is bold in pdf created in Inkscape, not in SVG

Postby ~suv » Thu Nov 04, 2010 3:22 pm

vwanweb wrote:a link to a short and sweet outline for safe fonts to use for web designs, IMO this applies to .pdf (portable) work as well.
What do you mean with 'safe' fonts? Availability is not an issue for PDFs created with Inkscape, because since 0.47 the fonts are always embedded in the PDF file (can't be turned off) [1]. If it comes to readability, it certainly depends on how the PDFs will be used: for printing, display fonts (designed to ease reading on-screen, like web sites in browsers) are often not the best choice.

vwanweb wrote:Oops, I was advised earlier that the font inkscape uses for its UI is Basic Sans SF.
Do you have a link to this font "Basic Sans SF" (is it freely available? what font format and license?), or a link to where you got this advice from?

Inkscape itself does not set the font for the GUI (assuming that's what you are referring to) [2], that's in the hands of the GTK+ toolkit which has its own default font (depending on platform), or even picks up the appearance settings from the OS (i.e. depending on the theme used).

If OTOH you are referring to the default font in Inkscape's text tool: if your default is set to 'Basic Sans SF', it is a setting you yourself applied: Inkscape 0.47 used 'Bitstream Vera Sans' as default, 0.48 uses the generic font 'Sans'. But the default can be changed any time in the 'Text and Fonts…' dialog. (Note that a custom default font setting is stored in the preferences file and thus 'survives' an upgrade).

[1] font embedding in PDF is not the same as the export option 'Convert texts to paths' in Inkscape: the typeface for each glyph in the font is embedded in the PDF file, and no locally installed fonts are needed to display the PDF file identically on different systems because the PDF viewer can use the fonts that come embedded with the PDF file. The text in the PDF file is still text and can be copied (if allowed) as text in the PDF viewer and pasted into text editors or word processors/office suites.

If Inkscape uses recent cairo libs, the fonts will not only be embedded, but subsetted as well (i.e. only the characters that are actually used in the file are embedded). This mostly influences the file size and editing, but not the appearance of the PDF file across systems and platforms.

If you share the SVG (or, if need be, the PDF file) for editing on different platforms, the issue is different and requires the fonts to be locally installed (though even this doesn't guarantee that Inkscape finds fonts with matching names).


[2] The GUI font can't be changed from within Inkscape, and is not related to the fonts Inkscape uses for text content displayed on-canvas (Text tool).

User avatar
tomh
Posts: 218
Joined: Sat Feb 14, 2009 10:14 pm

Re: 'M' is bold in pdf created in Inkscape, not in SVG

Postby tomh » Fri Nov 05, 2010 12:21 am

brynn wrote:A-HA!!
Ok, the M is still bold in appearance with drubann's test PDF. But at first I thought it wasn't. Then I noticed that druban's test file had opened at 78%. When I changed it to 100%, the bold Ms returned. When I opened my original PDF file, and changed to 75%, the M problem resolved.


Zoom dependence in font rendering normally means that Font hinting (or lack of it) is playing a role in how it is displayed. I know that PDF's created in Scribus also display the same problem, but I can't remember the details as to why it happens.

Blog post showing a similar problem in Scribus.The apple preview.app should support font hinting which is designed to stop this kind of problem. Changing the font used may help if the hinting data in the font is incorrect and is causing the problem.


Return to “Help with using Inkscape”