Inkscape.org
Beginners' Questions Unexpected text sizes using Millimetres to define Text Height
  1. #1
    Barrage Barrage @Barrage

    Hi, I've been working on a couple of documents which are intended to be printed on some Roll Up banner stands therefore I'm working using Millimetres for all sizes. I've noticed that when I add a line of text (for example 10mm high) the actual size of the text is considerably less than expected. I'm not sure how Inkscape measures text relative to the different typography parts so I'm unsure if actual displayed text is correct for Inkscape, or if there is a bug?

    I'm from CAD background so my expectation is that 10mm high = Cap Height (see attached typography parts image)

    Hopefully the other images will show that an example piece of text set to 10mm high, measures far less and reports as font size 10px in the XML editor.

    I'm using the portable version of Inkscape 1.2.1 (9c6d41e410, 2022-07-14)

     

  2. #2
    Tyler Durden Tyler Durden @TylerDurden

    Some background: http://tavmjong.free.fr/blog/?p=1632

    I think most still applies.

  3. #3
    Barrage Barrage @Barrage

    Unless I'm missing something obvious, that blog post seems more concerned with line-spacing than to explain IF/WHY Inkscape/CSS considers Font Size differently from pretty much any other application. I surely can't be the only person to have noticed this but I've yet to find any solution to the issue e.g. extension or conversion factor etc...

  4. #4
    Tyler Durden Tyler Durden @TylerDurden

    Most my graphics/illustration software uses em for font size, not Cap Height.

    I have a few CAD programs I can examine, but fair enough to say that Inkscape is not CAD.

  5. #5
    Barrage Barrage @Barrage
    *

    What's em?

    Here's what my main CAD application shows: Actual measured size and the configured size of the text. All perfectly logical.

    Indeed Inkscape isn't CAD but neither is Blender, yet it does a perfectly acceptable job of unit conversion (although its visible floating-point accuracy can often trigger the OCD in me 😂)

    If the problem isn't Inkscape, and it is simply restricted by the nature of the SVG filetype, then fine. It would be useful to have an interface which would do the conversion to automatically size the text instead of a convoluted sequence of events I've had to go through instead.

    • Placing a guide line
    • Duplicating it
    • Moving the duplicate 10mm upwards (of whatever size the text is required to be)
    • Manually scaling up the text at max zoom until its sized as accurately as possible.

     

     

  6. #6
    Tyler Durden Tyler Durden @TylerDurden

    The SVG filetype follows CSS specifications, which follow typographic conventions in regarding the em size as the size of the font.  Typographic em was covered in the linked document. But, here's some more info: 

    To start, it’s important to know that when typefaces are designed, the letterforms adhere to a number of measurements called vertical metrics, which sit inside a box called an em square. In Latin type, the line where ascenders reach is usually the top-most measurement, followed very closely by cap height (although occasionally these two lines are the same). The next one down is the x-height, followed by the baseline, and then the descender line at the lowest point....

    ...When we set the font size (e.g. 14px), what we’re actually doing is setting the size the em square is scaled to. And although the font size set by us designers tells the software at which size to render the em square, the type design within that em square can theoretically sit wherever the type designer wants it to. The horizontal and vertical positions of the marks that make up any given letterform are very much an arbitrary decision, so, like many things in type and typography, there are no hard-and-fast rules.

    https://fonts.google.com/knowledge/choosing_type/exploring_x_height_the_em_square

    So there would not likely be a simple conversion to reliably make the text height the Cap Height, rather than the em height.

    If you have a specific font (or fonts) where you have a known ratio between the em height and the Cap Height, you could multiply the font height by the ratio by using an expression within the select controls' height numeric box (with the proportion lock set).

     

     

  7. #7
    Guerreiro64 Guerreiro64 @Guerreiro64

    Font designers follow design rules, not engineering ones. If, for example, I took all the lowercase letters of the Arial font and invented putting them all at the same height, do you know what would happen? Visually the round letters would look smaller.

    And letter spacing also follows design rules, see this example:

     

    Letras 005
  8. #8
    Tyler Durden Tyler Durden @TylerDurden

    I'm not sure about design rules, but there are conventions of typography that graphic design and DTP programs follow.

    The OP may be frustrated from an expectation that text will behave similarly when used between disciplines.

    Is one way more correct than another...? Probably not, given the context in which it's used. CAD developers wouldn't want to burden their users with the archaic conventions of picas, points, ems, etc. Similarly, typographic software developers would be pilloried for failing to integrate them in any graphic design software that included text.

  9. #9
    Guerreiro64 Guerreiro64 @Guerreiro64

    Once an engineer wanted me to make a text (I don't remember which font) and he sent me the measurement of each letter.

    I told him that was unnecessary: just indicate the width and height of the word... and I would put it accordingly.

Inkscape Inkscape.org Inkscape Forum Beginners' Questions Unexpected text sizes using Millimetres to define Text Height