text font size wrong

Bug #168344 reported by Asteppke
4
Affects Status Importance Assigned to Milestone
Inkscape
New
Medium
Unassigned

Bug Description

Inkscape 0.45 calculates font size too small.

Steps to reproduce:
- Create new document in Inkscape
- Write letter "t" as text with font: "Arial", size 11
- Change units in toolbar to mm
- height of letter "t" is 2.193 mm

Other programs like GIMP, Corel Draw, etc. produce a larger size of about
2.8 mm

This messes up im- and export to other programs a lot because it is hard to
create the correct font size.

Thanks for looking into this.

Tags: fonts
Revision history for this message
Bug Importer (bug-importer) wrote :

I don't know how to view in mm, but I created text to fit just inside of a
box, and it looked just that way when I opened it in GIMP, so I don't think
there is a problem, because relative sizes are the same.

Revision history for this message
Bug Importer (bug-importer) wrote :

Go to your inkscape preferences and go down to misc. At top you see the
DPI? That should be the same as your screen, and should be the same as in
GIMP. If the two programs have different values, perhaps that is throwing
things off.

Revision history for this message
Asteppke (asteppke) wrote :

Originator: YES

I try to explain the problem in a more understandable way.

With Inkscape 0.45 (Windows XP) the font size is smaller than in every
other program. When you type a letter with Inkscape the height of letter is
about 20% smaller than in Wordpad, Latex and CorelDraw. I am not very
familiar with all typographic units, but somewhere a conversion takes place
from 11 pt to 2.193 mm in Inkscape, whereas the common value should be
around 2.8 mm.
I deleted my preferences.xml and still have the same problem. It has
nothing to do with exporting or dpi. You can see the height of the letter
in Inkscape by selecting the letter and changing your units in the toolbar
(you can choose between %, pt, px, mm,...).

Just print a sample text in Inkscape and the same text in Wordpad, Word,
Openoffice and compare the size.

Revision history for this message
Thomas Holder (speleo3) wrote :

Originator: NO

The font sizes in Inkscape are not "pt" but "px"! Go to the source of your
svg file and change font-size from "11px" to "11pt" and look what happens
when opening the file in Inkscape again: font size is 13.75 (px) now and
the height of your "t" is 2.74mm (with 90 DPI).

90 px/in = 1.25 px/pt
72 px/in = 1.00 px/pt

Revision history for this message
Asteppke (asteppke) wrote :

Originator: YES

Thank you for this clarification. I did not find this information
mentioned somewhere, the older release notes only mentioned pt when it
comes to text size
(http://wiki.inkscape.org:8080/wiki/index.php/ReleaseNotes041). I did not
look into the svg file unfortunately.

It seems that every other program is using pt instead of px as the text
size unit, is there a possibility to change this behavior without manually
changing every svg file?

Revision history for this message
Guillermo Espertino (Gez) (gespertino-gmail) wrote :

That is so wrong. Points is a standard unit for type. Every program uses points so using pixels (which is tied to the resolution) is imo the worst choice.
The first thing I do when I install inscape is change the default resolution to 300 dpi, because most of my works are for print, so this issue is critic for me.
In my oppinion, the solution should be:
-Set an option in preferences for default units (for objects, for type, etc.)
-Use metric (mm for objects) and points (for type) as defaults.

Using real units instead of pixels makes sense since the default artwork is confined to a standard A4 page, so the user has a fisical measure as reference when starts to work and having pixels as default units can be misleading.

Revision history for this message
Mercury (mercury13) wrote :

I see two ways to improve Inkscape in this thing.

1. In Text tool panel add a unit combobox - "px, pt, mm, etc".
2. Somewhere in preferences add type units (like in Photoshop) - well, everybody knows what 12th font is, but no one knows what is 2mm font is.

Revision history for this message
firebird (nikkie-childrensprogress) wrote :

having same issue. could someone PLEASE tell me how to access the svg source file to change px to pt? I'm a bit confused about accessing that code and haven't found info on that elsewhere

also, how can we get this suggested change/ bug fix implemented?? I put in a vote for Mercury's suggestion #2

thanks a lot!

Revision history for this message
prkos (prkos) wrote :

firebird this bug is marked as a duplicate of another bug report, you should post there so we have it all in one place. If you only need support for using Inkscape you can try Answers section of this website ;)

Since Inkscape's default DPI is 90 (Inkscape's pixel is 1/90 of an inch), and the usual dpi is 72 you need a little math to get pt right.

If you need 10pt type, use 12.5 in Inkscape, so to get pt you want, use the points number, multiply with 1.25 and you get the Inkscape size.

This is equivalent to the post above that mentions editing svg source. If you don't want to calculate anything and use pt, select your text, go to Edit > XML editor (you'll get svg source for your text object), under Style attribute find where font-size is declared and change the number and unit to number and pt as the unit (for example from 10px to 10pt) and now hit Set button. As soon as you hit Set button you will see your entry in pt changed to the equivalent in px. You're done!

Revision history for this message
firebird (nikkie-childrensprogress) wrote :

thanks prkos! that was crystal clear - you rock. i posted your response on the other bug thread. :)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.