0.48 Text - Font Size (Tutorial)

Share your Inkscape tricks and tutorials here.
User avatar
Kjohrf
Posts: 170
Joined: Tue Oct 27, 2009 11:42 am
Location: US
Contact:

0.48 Text - Font Size (Tutorial)

Postby Kjohrf » Mon Sep 06, 2010 10:41 am

While the new 0.48 text control are great, they take some getting used to.
And figuring out the proper text size is always a challenge. Even after
having studied typography some, I still need to remind myself of some things
from time to time. Hopefully this will be helpful to some Inkscape users,
and is not too long. If anyone sees any flaws or additions to this, feel
free to chime in!

First, I did some experiments here, both in Word (2000) and Inkscape may
shed some light on the situation, and prompt some questions.

If you go into Word, type a bunch of single-spaced lines of text in 12-point
Times New Roman, you get:

8-point font, as measured by the cap height, 6-point leading, for a total
line-height of 14-points. Where does the "12" comes in, you ask? I'll
answer that a bit later. For the moment, notice one nice thing: you can
set the baseline-to-baseline height to 12 points, or whatever you want.
That would be handy in Inkscape.

If you do the same thing in Inkscape 0.48, with spacing between lines set
to 1.00, you get:

6.6-point high font (again, the cap height), 4-point leading, for a total
line-height of 9.6 points. At least I can explain where "12" comes in.
See the next experiment.

One more time in Inkscape 0.48, but with spacing between lines set to 1.25,
you get:

6.6-point high font (cap height), 5.4-point leading, for a total line-height
of 12 points! Yay! We have something logical that ends up at 12 points.

But on the other hand, we have some very small text. And why isn't any of
the text 12 points high? Even if you measure from the ascender line all the
way down to the descender line, it's still less than 12 points. I'll keep
you waiting just a bit longer on this.

Maybe this is just one font? I changed the font in the last example to
Century Gothic, and got about 7 pt + 5 pt = 12 pt. Junegull (a fun free
font) is similar to Times New Roman.

Now the typography lesson (and you should have looked up cap height,
ascender line, descender line, and even points if you don't know
what they mean.

Fonts are measured by their em square size. If you type M twice in a
row, the horizontal distance from the start of one to the start of the next,
measured in points, should equal the font size. Well, that's the way it's
supposed to be. But it isn't always, for digital fonts. I just measured
this distance for 12-point Times New Roman in Inkscape 0.48, and it is
about 10.7 points. It's about the same in Word. Why isn't is 12 points?
I don't know.

So after all this, how should you think about selecting font sizes in Inkscape?
That's a good question, I think. I'm constantly having to select larger font
sizes than I intuitively think I should for a given situation. And then select
a small line spacing setting. I'd prefer it if a 12-point font was 12 points
high (again, the cap height), and Inkscape default to, say, 1.25 line spacing,
to give a total of 15 points, baseline to baseline. But that's just not how
fonts are supposed to work, like it or not. I think I'd settle for a 12-point
font with line-spacing at 1.0 producing text with baselines 12 points apart.
That, I think, would be consistent with typographical standards.

While I'm talking about font size, note that there are some peculiarities to the
Inkscape text interface. Let's say that you type some lines of text at a 12-point
font. Then you select a few characters and make them 16-point with the Tool
Controls. If you click anywhere in the text, the Tool Controls will show the
size of the next character. But if you change the font size with that, or with
the Text tool dialog, you will change the font size of all the text, unless you
have 1 or more characters selected.

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: 0.48 Text - Font Size (Tutorial)

Postby prkos » Mon Sep 06, 2010 4:33 pm

Inkscape pixel is 1/90 of an inch, other software usually uses 1/72. This means if you need 10pt - use 12.5 in Inkscape (multiply with 1.25).

Does this help?
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

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

Re: 0.48 Text - Font Size (Tutorial)

Postby ~suv » Mon Sep 06, 2010 9:58 pm

Kjohrf wrote:But on the other hand, we have some very small text. And why isn't any of
the text 12 points high? Even if you measure from the ascender line all the
way down to the descender line, it's still less than 12 points. I'll keep
you waiting just a bit longer on this.
Maybe it got lost or I just don't understand the issue, but since it wasn't mentioned in Kjohrf's post nor in prkos' answer explicitly:

    Inkscape uses 'px' for font size, not 'pt'.
Use prkos' formula to convert between Inkscape and applications which use a different default internal dpi value.
prkos wrote:Inkscape pixel is 1/90 of an inch, other software usually uses 1/72. This means if you need 10pt - use 12.5 in Inkscape (multiply with 1.25).

Related:
font sizes specified in pixels instead of points
text font size wrong

User avatar
Kjohrf
Posts: 170
Joined: Tue Oct 27, 2009 11:42 am
Location: US
Contact:

Re: 0.48 Text - Font Size (Tutorial)

Postby Kjohrf » Tue Sep 07, 2010 12:24 am

Wow. Had never noticed that in the Inkscape Guide. There it is on http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Text-Formatting.html. What a strange way to specify font size, especially if you don't have your default size setting in Document Preferences set to pixels.

Looks like this has been reported as a bug (or feature change request, if you prefer): https://bugs.launchpad.net/inkscape/+bug/168164.

I'll revise my tutorial at some point... Thanks.


Return to “Tricks & Tutorials”