Page MenuHome

Blender font: whitespace glyphs metrics issues
Closed, ResolvedPublic

Description

Blender Version
Broken: version: 3.3.0 Alpha, branch: master, commit date: 2022-06-23 19:32, hash: rB41a0411d7938
Worked: never

Short description of error
The kerning for space and no-break space are inconsistent, giving an unpleasant visual impression. In the image below, the spaces on either side of the colon should be even.

Here is a modified version which brings them back to the same as the original, from Deja Vu Sans.

Spacing is now balanced.

Additionally, a NARROW NO-BREAK SPACE (0x202f) glyph is now defined. This whitespace character is used in French before punctuation marks ;!?
Since it is whitespace there isn’t really a glyph outline, but the kerning was copied from DejaVu Sans.

Here is a table of kernings for these fonts, from FontForge’s metrics view:

deja vu sansold blendernew blender
space651651651
nbs6511303651
nnbs409/409

Exact steps for others to reproduce the error

  • Activate translation, select French
  • Select default cube
  • In the viewport, open the N panel to the Item (Élément) tab
  • Mouseover on a Rotation value, and notice the “Radians : 0.000000” label is unbalanced.

Event Timeline

Damien Picard (pioverfour) renamed this task from Blender font: Tweak space glyphs metrics to Blender font: whitespace glyphs metrics issues.Jun 29 2022, 8:53 PM
Damien Picard (pioverfour) updated the task description. (Show Details)

In the image below, the spaces on either side of the colon should be even.

But that text looks to be the word "Clipping" plus a space, then a colon, then "Début". I wouldn't expect it to be even in that case.

If I separate those two words with just a colon I see the following, which is even:

Do you not see similar if you construct such text yourself? Just change an object name to the test text.

Activate translation, select French.. Mouseover on a Rotation value, and notice the “Radians : 0.000000” label is unbalanced.

But change to Spanish or Italian and see it is different. So this indicating a difference in the translated strings for French, not a problem with the font.

Hello Harley, in my image, there is the word “Clipping”, then a no-break space, then a colon, then an ordinary space, then “Début”.

I do see a difference between space and no-break space when I rename objects:

Here is the text for convenience:

Space : break
Space : no-break
Space : narrow no-break

But change to Spanish or Italian and see it is different. So this indicating a difference in the translated strings for French, not a problem with the font.

It is both: Spanish, Italian and English, like practically all languages using the latin alphabet, don’t use spaces before colons and other double punctuation marks. French on the other hand uses (overly specific) spaces. The current translation is using the proper spaces in most places, but the font doesn’t render them properly.

See this article for more info. Actually, I just learned that other countries chose the sensible option not to use those spaces…

Edit: this article is actually wrong: the punctuation marks use non-breaking spaces only before the mark, so that it’s never separated from the previous word and pushed to the next line.

I'm not arguing that there aren't typographical issues with our current font - there are. But I'd be waring of trying to fix any language-specific issues this way, since changing the spacing for colon would negatively affect other languages.

When examining the font for correctness, keep in mind that we are probably going to change it out for a newer version for 3.3 or 3.4. Since adding fallback support we would be breaking up our large font into separate language-specific fonts. details here:https://developer.blender.org/D15235. This would include a newer version of DejaVu:

Damien Picard (pioverfour) claimed this task.

Ah, sorry, I didn’t know about this! That’s great, I just tested this version of the font and the issue is fixed!

So indeed, it can wait for a version or two.

Thanks :)