Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Several metrics issues in Roboto Mono worth fixing together #1832

Open
4 tasks
thundernixon opened this issue Jan 29, 2019 · 17 comments
Open
4 tasks

Several metrics issues in Roboto Mono worth fixing together #1832

thundernixon opened this issue Jan 29, 2019 · 17 comments

Comments

@thundernixon
Copy link
Collaborator

thundernixon commented Jan 29, 2019

In a pull request for a quick fix to the isFixedPitch flag of Roboto Mono, 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:

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 Problem with the box-drawing characters in the Roboto Mono font on Windows 10 #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

🔥 FAIL: Checking OS/2 usWinAscent & usWinDescent.
  • com.google.fonts/check/040
  • 🔥 FAIL OS/2.usWinAscent value should be equal or greater than 2163, but got 1946 instead [code: ascent]
  • 🔥 FAIL OS/2.usWinDescent value should be equal or greater than 555, but got 512 instead [code: descent]
🔥 FAIL: Checking OS/2 Metrics match hhea Metrics.
🔥 FAIL: Checking correctness of monospaced metadata.
  • com.google.fonts/check/033
  • 🔥 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]
  • ⚠️ 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]
🔥 FAIL: Does the font have a DSIG table?
  • com.google.fonts/check/045
  • 🔥 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

image

Roboto Mono Italic

🔥 FAIL: Checking post.italicAngle value.
🔥 FAIL: Checking OS/2 usWinAscent & usWinDescent.
  • com.google.fonts/check/040
  • 🔥 FAIL OS/2.usWinAscent value should be equal or greater than 2163, but got 1946 instead [code: ascent]
  • 🔥 FAIL OS/2.usWinDescent value should be equal or greater than 555, but got 512 instead [code: descent]
🔥 FAIL: Checking OS/2 Metrics match hhea Metrics.
🔥 FAIL: Checking correctness of monospaced metadata.
  • com.google.fonts/check/033
  • 🔥 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]
  • ⚠️ 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]
🔥 FAIL: Does the font have a DSIG table?
  • com.google.fonts/check/045
  • 🔥 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

image

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 showing the effect this has over a line of text:

image

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

@laerm0 laerm0 added this to the Bugs in Font Files 04 Requires Type Design milestone Jan 30, 2019
@mailinglists35
Copy link

repasting my issue from comments in 1408

There is extra vertical spacing for ALL characters

To better understand, open midnight commander inside a latest version putty in a latest version rhel 7 clone. screenshots below at 12pt

normal look (Liberation Mono)
image

roboto mono wrong look
image

this does not seem to happen on native linux terminals (terminator, xfce terminal)
image
image

On Notepad is also visible. Observe another issue that some ascii extended chars are not standard width (ascii extended 186 for example, could more more but I did not verify them all)
image
image

@mailinglists35
Copy link

Also the patch to make it appear in putty works (PR #1824), but it does not appear in windows console:

image

@mailinglists35
Copy link

screenshots from windows 10.0.17134.556

@mailinglists35
Copy link

To appear in windows console, it must meet these conditions

@thundernixon
Copy link
Collaborator Author

Thanks for adding detail and for correcting my assumption on the windows console, @mailinglists35!

Thanks also for including images related to vertical metrics. I did include that in the top comment:

ensure that vertical metrics are consistent across platforms and relatively similar to other monospace fonts

... but it's definitely helpful to have the screenshots showing exactly why it's a problem.

One follow-up question:

I am having difficulties adding any monospace fonts to my windows console. I've tried to follow this guide to add them, but no luck. Have you had success in adding any other fonts, e.g. Fira Mono?

@mailinglists35
Copy link

mailinglists35 commented Jan 30, 2019

I installed/see these non-default fonts on mine:

DejaVu Sans Mono
Inconsolata
Liberation Mono
Menlo

also Lucida Console but can't remember if I installed it or it came with OS

@thundernixon
Copy link
Collaborator Author

Okay, thanks for confirming! It may be that the windows console checks all glyph width metrics before allowing a font, then. I've added a test in the Windows console in the top comment of the issue, to make sure it's addressed when someone has capacity for this.

@twse
Copy link

twse commented Feb 20, 2019

This issue is also related to #360.

@gbmarc1
Copy link

gbmarc1 commented May 2, 2019

I think #1394 pull request also relates to the problem.

@mailinglists35
Copy link

Hi
I understand this is not Urgent priority, but... what is an expected timeline?

Will Google eventually simply drop roboto altogether and make a new one that is working properly this time?

@thundernixon
Copy link
Collaborator Author

thundernixon commented Dec 18, 2019

@mailinglists35 this is only speculation, but I’m guess this can’t really be fixed, without the risk of breaking websites/documents that may be designed using the current width of Roboto Mono Italic. So yes, basically the only two options, as I see it, are:

  • people use a font other than Roboto Mono, if this issue is a blocker for them
  • a new version of Roboto Mono is made, with a slightly different name so it doesn’t break existing things. No idea when/if this would happen, but it is open source, so in some sense, anyone could do it and suggest that it be added to the GF directory

@mangelozzi
Copy link

Robotomono doesnt work with block chars for making borders:
In Neovim, Font: RobotoMono:
image

In Neovim, Font: Consolas:
image

@Secret-chest
Copy link

PLEASE FIX!

@mailinglists35
Copy link

mailinglists35 commented Jun 13, 2023

I eventually gave up on roboto mono and gave up hope Google fixing it.

Fantasque Sans Mono no loop k is now my first choice, seconded by Microsoft's new default Cascadia Mono and macOS' SF Mono ripped from my macOS root filesystem. Recently I stumbled upon Intellij's JetBrains Mono which also looks good. RIP Google Roboto Mono...🤔😥

@Secret-chest
Copy link

Is it any coincidence all 4 fonts you mentioned suck? I don't want a robotic font but neither a fun handwritten one.

@mailinglists35
Copy link

mailinglists35 commented Jun 13, 2023

then good luck finding the font of your taste, what can I say. google does not seem to care how Robot looks on Windows, they just wanted something for Android and it seems to satisfy their original requirements

@Secret-chest
Copy link

For italics, uninstall the italic variants. You will get faux italics, but at least in code editors they're going to be the same width.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants