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

Hotfix: update roboto mono isFixedPitch flag to true #1824

Merged
merged 1 commit into from
May 24, 2019

Conversation

thundernixon
Copy link
Collaborator

Fixes Issue #225 by setting isFixedPitch from 0 to 1.

Uses this shell script to TTX files, update the value, and TTX them back.

@thundernixon
Copy link
Collaborator Author

We should probably also update the sources, but I am having trouble finding them on GitHub. @davelab6, do you know where I could find them?

@m4rc1e
Copy link
Collaborator

m4rc1e commented Jan 25, 2019

You haven't bumped the version number. Use gftools-update-version.py in your shell script as well.

Personally I'd fix this using python with fontTools but since its small change It's ok.

@thundernixon
Copy link
Collaborator Author

thundernixon commented Jan 25, 2019

@m4rc1e thanks for catching that and for suggesting a good way to do so!

I'm not sure if this is a problem, but currently, there is a seeming mismatch in the font version numbers of Roboto Mono. The name table includes:

<namerecord nameID="5" platformID="3" platEncID="1" langID="0x409">
      Version 2.000986; 2015; ttfautohint (v1.3)
</namerecord>

However, the head table includes:

<fontRevision value="2.00099"/>

gftools-update-version.py will only recognize and update the version number in the nameID 5, and doesn't touch the head table. Is this working as expected?

I've bumped the version numbers, and just need to sort out the proper commits for this PR.

I looked at using TTlib for this, but was having a hard time understanding how to use it right away. I do want to develop my abilities with fontTools, however, so if you have any suggestions on how to get started or where to find good documentation, I'm keen to learn more.

@m4rc1e
Copy link
Collaborator

m4rc1e commented Jan 25, 2019

I suspect the previous version number was meant to be v2.001. This looks like a rounding issue to me. I'd Just bump your fonts to 2.002 for both the head fontRevision and nametable entry.

cc @anthrotype

@thundernixon
Copy link
Collaborator Author

Okay, thanks @m4rc1e! I've bumped the version to 2.002 in both spots, and set the isFixedPitch to 1.

I upgraded the shell script in a few ways, such as automatically checking and reporting that the changes were made: https://gist.github.com/thundernixon/583dbfaf018bde2c118352e162103375

@thundernixon
Copy link
Collaborator Author

thundernixon commented Jan 25, 2019

During today's meeting, the question was asked whether the isFixedPitch issue would be caught by FontBakery today. Yes, it's part of Check 33.

However, checking into this led me to find several FontBakery FAILs that seem problematic (including in another part of Check 33, covering Panose values).

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.

@davelab6 Should I file each of these as separate issues, all of them as one big issue, or work on fixing them in this PR? If it's a priority to fix them ASAP, is there an available upstream repo? So far, I haven't been able to find the source repo.

image

@davelab6
Copy link
Member

davelab6 commented Jan 26, 2019 via email

@m4rc1e m4rc1e self-requested a review January 28, 2019 10:20
Copy link
Collaborator

@m4rc1e m4rc1e left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixedpitch and v number bumped successfully

Diffing: RobotoMono-Bold.ttf
WARNING:diffenator.dump:Font doesn't have GPOS table. No kerns found
WARNING:diffenator.dump:Font doesn't have GPOS table. No kerns found
INFO:diffenator.diff:'diff_nametable'  0.06 ms
INFO:diffenator.diff:'diff_attribs'  0.18 ms
INFO:diffenator.diff:'diff_glyphs'  4.16 ms
INFO:diffenator.diff:'diff_kerning'  0.76 ms
INFO:diffenator.diff:'diff_metrics'  2.97 ms
INFO:diffenator.diff:'diff_marks'  1.19 ms
INFO:diffenator.diff:'diff_marks'  1.18 ms
****names modified****

id                  string_a            string_b            
(5, 3, 1, 1033)     Version 2.000986... Version 2.002; 2... 

****attribs modified****

table               attrib              value_a             value_b             
head                fontRevision        2.00099             2.002               
head                modified            2015/05/21 18:38... 2019/01/25 18:55... 
post                isFixedPitch        0                   1                   
Diffing: RobotoMono-BoldItalic.ttf
WARNING:diffenator.dump:Font doesn't have GPOS table. No kerns found
WARNING:diffenator.dump:Font doesn't have GPOS table. No kerns found
INFO:diffenator.diff:'diff_nametable'  0.06 ms
INFO:diffenator.diff:'diff_attribs'  0.17 ms
INFO:diffenator.diff:'diff_glyphs'  2.59 ms
INFO:diffenator.diff:'diff_kerning'  1.04 ms
INFO:diffenator.diff:'diff_metrics'  2.34 ms
INFO:diffenator.diff:'diff_marks'  1.23 ms
INFO:diffenator.diff:'diff_marks'  1.14 ms
****names modified****

id                  string_a            string_b            
(5, 3, 1, 1033)     Version 2.000986... Version 2.002; 2... 

****attribs modified****

table               attrib              value_a             value_b             
head                modified            2015/05/21 18:38... 2019/01/25 18:55... 
head                fontRevision        2.00099             2.002               
post                isFixedPitch        0                   1                   
Diffing: RobotoMono-Italic.ttf
WARNING:diffenator.dump:Font doesn't have GPOS table. No kerns found
WARNING:diffenator.dump:Font doesn't have GPOS table. No kerns found
INFO:diffenator.diff:'diff_nametable'  0.06 ms
INFO:diffenator.diff:'diff_attribs'  0.20 ms
INFO:diffenator.diff:'diff_glyphs'  2.58 ms
INFO:diffenator.diff:'diff_kerning'  0.66 ms
INFO:diffenator.diff:'diff_metrics'  1.68 ms
INFO:diffenator.diff:'diff_marks'  0.64 ms
INFO:diffenator.diff:'diff_marks'  0.65 ms
****names modified****

id                  string_a            string_b            
(5, 3, 1, 1033)     Version 2.000986... Version 2.002; 2... 

****attribs modified****

table               attrib              value_a             value_b             
head                fontRevision        2.00099             2.002               
head                modified            2015/05/21 18:38... 2019/01/25 18:55... 
post                isFixedPitch        0                   1                   
Diffing: RobotoMono-Light.ttf
WARNING:diffenator.dump:Font doesn't have GPOS table. No kerns found
WARNING:diffenator.dump:Font doesn't have GPOS table. No kerns found
INFO:diffenator.diff:'diff_nametable'  0.07 ms
INFO:diffenator.diff:'diff_attribs'  0.18 ms
INFO:diffenator.diff:'diff_glyphs'  2.88 ms
INFO:diffenator.diff:'diff_kerning'  0.72 ms
INFO:diffenator.diff:'diff_metrics'  1.75 ms
INFO:diffenator.diff:'diff_marks'  0.71 ms
INFO:diffenator.diff:'diff_marks'  0.64 ms
****names modified****

id                  string_a            string_b            
(5, 3, 1, 1033)     Version 2.000986... Version 2.002; 2... 

****attribs modified****

table               attrib              value_a             value_b             
head                fontRevision        2.00099             2.002               
head                modified            2015/05/21 18:38... 2019/01/25 18:55... 
post                isFixedPitch        0                   1                   
Diffing: RobotoMono-LightItalic.ttf
WARNING:diffenator.dump:Font doesn't have GPOS table. No kerns found
WARNING:diffenator.dump:Font doesn't have GPOS table. No kerns found
INFO:diffenator.diff:'diff_nametable'  0.06 ms
INFO:diffenator.diff:'diff_attribs'  0.18 ms
INFO:diffenator.diff:'diff_glyphs'  2.42 ms
INFO:diffenator.diff:'diff_kerning'  0.68 ms
INFO:diffenator.diff:'diff_metrics'  1.85 ms
INFO:diffenator.diff:'diff_marks'  0.73 ms
INFO:diffenator.diff:'diff_marks'  0.70 ms
****names modified****

id                  string_a            string_b            
(5, 3, 1, 1033)     Version 2.000986... Version 2.002; 2... 

****attribs modified****

table               attrib              value_a             value_b             
head                fontRevision        2.00099             2.002               
head                modified            2015/05/21 18:38... 2019/01/25 18:55... 
post                isFixedPitch        0                   1                   
Diffing: RobotoMono-Medium.ttf
WARNING:diffenator.dump:Font doesn't have GPOS table. No kerns found
WARNING:diffenator.dump:Font doesn't have GPOS table. No kerns found
INFO:diffenator.diff:'diff_nametable'  0.06 ms
INFO:diffenator.diff:'diff_attribs'  0.18 ms
INFO:diffenator.diff:'diff_glyphs'  2.32 ms
INFO:diffenator.diff:'diff_kerning'  0.66 ms
INFO:diffenator.diff:'diff_metrics'  1.66 ms
INFO:diffenator.diff:'diff_marks'  0.79 ms
INFO:diffenator.diff:'diff_marks'  0.64 ms
****names modified****

id                  string_a            string_b            
(5, 3, 1, 1033)     Version 2.000986... Version 2.002; 2... 

****attribs modified****

table               attrib              value_a             value_b             
head                modified            2015/05/21 18:38... 2019/01/25 18:55... 
head                fontRevision        2.00099             2.002               
post                isFixedPitch        0                   1                   
Diffing: RobotoMono-MediumItalic.ttf
WARNING:diffenator.dump:Font doesn't have GPOS table. No kerns found
WARNING:diffenator.dump:Font doesn't have GPOS table. No kerns found
INFO:diffenator.diff:'diff_nametable'  0.06 ms
INFO:diffenator.diff:'diff_attribs'  0.21 ms
INFO:diffenator.diff:'diff_glyphs'  2.90 ms
INFO:diffenator.diff:'diff_kerning'  0.72 ms
INFO:diffenator.diff:'diff_metrics'  1.71 ms
INFO:diffenator.diff:'diff_marks'  0.66 ms
INFO:diffenator.diff:'diff_marks'  0.63 ms
****names modified****

id                  string_a            string_b            
(5, 3, 1, 1033)     Version 2.000986... Version 2.002; 2... 

****attribs modified****

table               attrib              value_a             value_b             
head                modified            2015/05/21 18:38... 2019/01/25 18:55... 
head                fontRevision        2.00099             2.002               
post                isFixedPitch        0                   1                   
Diffing: RobotoMono-Regular.ttf
WARNING:diffenator.dump:Font doesn't have GPOS table. No kerns found
WARNING:diffenator.dump:Font doesn't have GPOS table. No kerns found
INFO:diffenator.diff:'diff_nametable'  0.10 ms
INFO:diffenator.diff:'diff_attribs'  0.20 ms
INFO:diffenator.diff:'diff_glyphs'  2.26 ms
INFO:diffenator.diff:'diff_kerning'  0.67 ms
INFO:diffenator.diff:'diff_metrics'  1.63 ms
INFO:diffenator.diff:'diff_marks'  0.65 ms
INFO:diffenator.diff:'diff_marks'  0.62 ms
****names modified****

id                  string_a            string_b            
(5, 3, 1, 1033)     Version 2.000986... Version 2.002; 2... 

****attribs modified****

table               attrib              value_a             value_b             
head                modified            2015/05/21 18:38... 2019/01/25 18:55... 
head                fontRevision        2.00099             2.002               
post                isFixedPitch        0                   1                   
Diffing: RobotoMono-Thin.ttf
WARNING:diffenator.dump:Font doesn't have GPOS table. No kerns found
WARNING:diffenator.dump:Font doesn't have GPOS table. No kerns found
INFO:diffenator.diff:'diff_nametable'  0.05 ms
INFO:diffenator.diff:'diff_attribs'  0.17 ms
INFO:diffenator.diff:'diff_glyphs'  2.25 ms
INFO:diffenator.diff:'diff_kerning'  0.65 ms
INFO:diffenator.diff:'diff_metrics'  1.65 ms
INFO:diffenator.diff:'diff_marks'  0.64 ms
INFO:diffenator.diff:'diff_marks'  0.75 ms
****names modified****

id                  string_a            string_b            
(5, 3, 1, 1033)     Version 2.000986... Version 2.002; 2... 

****attribs modified****

table               attrib              value_a             value_b             
head                modified            2015/05/21 18:38... 2019/01/25 18:55... 
head                fontRevision        2.00099             2.002               
post                isFixedPitch        0                   1                   
Diffing: RobotoMono-ThinItalic.ttf
WARNING:diffenator.dump:Font doesn't have GPOS table. No kerns found
WARNING:diffenator.dump:Font doesn't have GPOS table. No kerns found
INFO:diffenator.diff:'diff_nametable'  0.06 ms
INFO:diffenator.diff:'diff_attribs'  0.22 ms
INFO:diffenator.diff:'diff_glyphs'  2.62 ms
INFO:diffenator.diff:'diff_kerning'  0.77 ms
INFO:diffenator.diff:'diff_metrics'  1.78 ms
INFO:diffenator.diff:'diff_marks'  0.65 ms
INFO:diffenator.diff:'diff_marks'  0.73 ms
****names modified****

id                  string_a            string_b            
(5, 3, 1, 1033)     Version 2.000986... Version 2.002; 2... 

****attribs modified****

table               attrib              value_a             value_b             
head                modified            2015/05/21 18:38... 2019/01/25 18:55... 
head                fontRevision        2.00099             2.002               
post                isFixedPitch        0                   1  

@thundernixon
Copy link
Collaborator Author

Once merged, this will close:

For other metrics issues, I've I moved my screenshots from above into a new issue that groups a couple of related issues. Hopefully, we can get someone to address width and vertical metrics in the same go. Let me know if I need to do anything else here! Thanks

@thundernixon
Copy link
Collaborator Author

I've created issue #1832 to encapsulate remaining metric issues in Roboto Mono which would make sense to fix at the same time. In that issue, one person has noted that even with the isFixedPitch flag set to true, Roboto Mono still isn't available for use in the Windows console.

@thundernixon
Copy link
Collaborator Author

@davelab6 this hotfix is complete. Should I merge it, or should I let you or Marc?

@davelab6
Copy link
Member

davelab6 commented Jan 30, 2019 via email

@thundernixon
Copy link
Collaborator Author

Okay, thanks for clarifying! Just wanted to be sure I wasn't leaving any open loops.

@musm
Copy link

musm commented Apr 8, 2019

@davelab6 is it appropriate to merge now?

@shana
Copy link

shana commented May 16, 2019

Any ETA on when this PR will be merged?

@f2l2pe
Copy link

f2l2pe commented May 23, 2019

Would love to use roboto mono on my windows terminals. Any updates?

@SidShetye
Copy link

Where can the font (with this fix) be downloaded from?

@arrowtype
Copy link
Collaborator

In response to @SidShetye, the files are at https://github.com/thundernixon/fonts/tree/5338537ef835a3d9ccf8faf386399f13a30605e2/apache/robotomono

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

Successfully merging this pull request may close these issues.

8 participants