google / google/fonts

Several metrics issues in Roboto Mono worth fixing together

Open
#1,832 18 comments 10 reactions 0 assignees View on GitHub
I Font Bug
Dominant language
HTML
Stars
20.5k
Forks
2.9k
Avg merge
1d 21h
Merged PRs (30d)
95

Description

In [a pull request for a quick fix to the `isFixedPitch` flag of Roboto Mono](https://github.com/google/fonts/pull/1824), I came across a few other bugs. I'm not the first person to notice these, but I wanted to track my notes in an issue, and combine the other issues into this one, as I believe the fixing work should be done together.

Related issues:

- [#142, Roboto mono italics different width](https://github.com/google/fonts/issues/142). This has 10 👍 reactions so far, indicated this as a problem that is affecting a substantial number of users.
- [#249, Roboto Mono regular and italic do not display as the same width](https://github.com/google/fonts/issues/249)
- [#251, Roboto Mono is considered variable-pitch by PuTTY in Windows](https://github.com/google/fonts/issues/251) if it isn't completely solved by PR #1824
- [#1408, Roboto Mono unusable for ASCII art / plain text diagrams ](https://github.com/google/fonts/issues/1408) shows that 1) Roboto Mono has arrows which are the wrong character width and 2) line heights are very different from other Monospace fonts

When there is time for a designer to dedicate to fixing Roboto Mono, they should:

- [ ] ensure that all glyphs – across all styles – have the exact same advance width
- [ ] ensure that vertical metrics are consistent across platforms and relatively similar to other monospace fonts
- [ ] potentially, we could also add box-drawing glyphs to close issue #360, though this would get into glyph extension rather than bug-fixing
- [ ] test that these updates allow Roboto Mono to be used in the Windows Console (see thread for more context)

# Roboto Mono Regular - Fontbakery fails

:fire: FAIL: Checking OS/2 usWinAscent & usWinDescent.

* [com.google.fonts/check/040](https://github.com/googlefonts/fontbakery/search?q=com.google.fonts/check/040)
* :fire: **FAIL** OS/2.usWinAscent value should be equal or greater than 2163, but got 1946 instead [code: ascent]
* :fire: **FAIL** OS/2.usWinDescent value should be equal or greater than 555, but got 512 instead [code: descent]

:fire: FAIL: Checking OS/2 Metrics match hhea Metrics.

* [com.google.fonts/check/042](https://github.com/googlefonts/fontbakery/search?q=com.google.fonts/check/042)
* :fire: **FAIL** OS/2 sTypoAscender and hhea ascent must be equal. [code: ascender]

:fire: FAIL: Checking correctness of monospaced metadata.

* [com.google.fonts/check/033](https://github.com/googlefonts/fontbakery/search?q=com.google.fonts/check/033)
* :fire: **FAIL** On monospaced fonts, the value of OS/2.panose.bProportion must be set to 9 (proportion: monospaced), but got 0 instead. [code: mono-bad-panose-proportion]
* :warning: **WARN** Font is monospaced but 34 glyphs (3.266090297790586%) have a different width. You should check the widths of: ['hyphen', 'f', 'gravecomb', 'acutecomb', 'tildecomb', 'hook', 'uni030F', 'dotbelow', 'uni0483', 'uni0484', 'uni0485', 'uni0486', 'uni0488', 'uni0489', 'at.alt', 'uni00AD', 'Dcroat', 'Eth', 'hbar', 'dcaron', 'lcaron', 'ldot', 'tcaron', 'Epsilontonos', 'Etatonos', 'Iotatonos', 'Omicrontonos', 'Upsilontonos', 'Omegatonos', 'exclamdbl', 'dcroat', 'uni20AB', 'uni049E', 'uni049F'] [code: mono-outliers]

:fire: FAIL: Does the font have a DSIG table?

* [com.google.fonts/check/045](https://github.com/googlefonts/fontbakery/search?q=com.google.fonts/check/045)
* :fire: **FAIL** This font lacks a digital signature (DSIG table). Some applications may require one (even if only a dummy placeholder) in order to work properly.


The most obvious problem for a monospace is that some glyphs are not the standard width – a few are around 8% wider than they should be:

![image](https://user-images.githubusercontent.com/7355414/51769729-c18c2c00-20b1-11e9-9351-da1e95731d35.png)

![image](https://user-images.githubusercontent.com/7355414/51769689-af11f280-20b1-11e9-9be8-5d9e080d6e6d.png)

# Roboto Mono Italic

:fire: FAIL: Checking post.italicAngle value.

* [com.google.fonts/check/130](https://github.com/googlefonts/fontbakery/search?q=com.google.fonts/check/130)
* :fire: **FAIL** Font is italic, so post.italicAngle should be non-zero. [code: zero-italic]

:fire: FAIL: Checking OS/2 usWinAscent & usWinDescent.

* [com.google.fonts/check/040](https://github.com/googlefonts/fontbakery/search?q=com.google.fonts/check/040)
* :fire: **FAIL** OS/2.usWinAscent value should be equal or greater than 2163, but got 1946 instead [code: ascent]
* :fire: **FAIL** OS/2.usWinDescent value should be equal or greater than 555, but got 512 instead [code: descent]

:fire: FAIL: Checking OS/2 Metrics match hhea Metrics.

* [com.google.fonts/check/042](https://github.com/googlefonts/fontbakery/search?q=com.google.fonts/check/042)
* :fire: **FAIL** OS/2 sTypoAscender and hhea ascent must be equal. [code: ascender]

:fire: FAIL: Checking correctness of monospaced metadata.

* [com.google.fonts/check/033](https://github.com/googlefonts/fontbakery/search?q=com.google.fonts/check/033)
* :fire: **FAIL** On monospaced fonts, the value of OS/2.panose.bProportion must be set to 9 (proportion: monospaced), but got 0 instead. [code: mono-bad-panose-proportion]
* :warning: **WARN** Font is monospaced but 35 glyphs (3.3621517771373677%) have a different width. You should check the widths of: ['hyphen', 'f', 'gravecomb', 'acutecomb', 'tildecomb', 'hook', 'uni030F', 'dotbelow', 'uni0483', 'uni0484', 'uni0485', 'uni0486', 'uni0488', 'uni0489', 'uniFFFD', 'at.alt', 'uni00AD', 'Dcroat', 'Eth', 'hbar', 'dcaron', 'lcaron', 'ldot', 'tcaron', 'Epsilontonos', 'Etatonos', 'Iotatonos', 'Omicrontonos', 'Upsilontonos', 'Omegatonos', 'exclamdbl', 'dcroat', 'uni20AB', 'uni049E', 'uni049F'] [code: mono-outliers]

:fire: FAIL: Does the font have a DSIG table?

* [com.google.fonts/check/045](https://github.com/googlefonts/fontbakery/search?q=com.google.fonts/check/045)
* :fire: **FAIL** This font lacks a digital signature (DSIG table). Some applications may require one (even if only a dummy placeholder) in order to work properly.


In the Italic, quite a few of the glyphs mentioned (e.g. `/hyphen` are off by just 1 unit (1203 vs the standard 1202). However, quite a few are off by significantly more, which probably isn't killing anyone, but isn't ideal:

![image](https://user-images.githubusercontent.com/7355414/51769858-1760d400-20b2-11e9-9de7-6dcba580e3e9.png)

![image](https://user-images.githubusercontent.com/7355414/51769405-edf37880-20b0-11e9-89ce-286900bc5d45.png)

Of course, the _most significant_ problem here is that the standard width in the regular is 1229, but the standard width in the italic is 1202. This is about 2.25% different. Here's [a codepen test](https://codepen.io/thundernixon/pen/gqPoKE) showing the effect this has over a line of text:

![image](https://user-images.githubusercontent.com/7355414/51770586-5132da00-20b4-11e9-8b7e-4aaebb3bd25d.png)

There are also issues around vertical metrics which probably make display inconsistent between platforms.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.