resolve and document fontbakery FAILs

pull/735/head
Stephen Nixon 2019-03-26 16:04:28 -04:00
rodzic 7919f1e099
commit 6ee86a64b8
11 zmienionych plików z 234 dodań i 127 usunięć

Wyświetl plik

@ -234,11 +234,11 @@ capHeight = 1374;
customParameters = (
{
name = typoAscender;
value = 1870;
value = 1980;
},
{
name = typoDescender;
value = -530;
value = -644;
},
{
name = typoLineGap;
@ -246,19 +246,19 @@ value = 0;
},
{
name = winAscent;
value = 1870;
value = 2164;
},
{
name = winDescent;
value = 530;
value = 1000;
},
{
name = hheaAscender;
value = 1870;
value = 1980;
},
{
name = hheaDescender;
value = -530;
value = -644;
},
{
name = hheaLineGap;
@ -300,11 +300,11 @@ capHeight = 1386;
customParameters = (
{
name = typoAscender;
value = 1870;
value = 1980;
},
{
name = typoDescender;
value = -530;
value = -644;
},
{
name = typoLineGap;
@ -312,19 +312,19 @@ value = 0;
},
{
name = winAscent;
value = 1870;
value = 2164;
},
{
name = winDescent;
value = 530;
value = 1000;
},
{
name = hheaAscender;
value = 1870;
value = 1980;
},
{
name = hheaDescender;
value = -530;
value = -644;
},
{
name = hheaLineGap;
@ -107244,6 +107244,10 @@ name = "Remove Features";
value = (
cpsp
);
},
{
name = weightClass;
value = 300;
}
);
interpolationWeight = 62;
@ -107260,6 +107264,10 @@ name = "Remove Features";
value = (
cpsp
);
},
{
name = weightClass;
value = 400;
}
);
interpolationWeight = 84;
@ -107270,11 +107278,10 @@ instanceInterpolations = {
name = Regular;
},
{
exports = 0;
customParameters = (
{
name = weightClass;
value = 900;
value = 450;
},
{
name = "Remove Features";
@ -107289,6 +107296,7 @@ instanceInterpolations = {
"B67F0F2D-EC95-4CB8-966E-23AE86958A69" = 0.64583;
};
name = Retina;
weightClass = Normal;
},
{
customParameters = (
@ -107297,6 +107305,10 @@ name = "Remove Features";
value = (
cpsp
);
},
{
name = weightClass;
value = 500;
}
);
interpolationWeight = 112;
@ -107334,6 +107346,10 @@ name = "Remove Features";
value = (
cpsp
);
},
{
name = weightClass;
value = 700;
}
);
interpolationWeight = 158;

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -1,57 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ttFont sfntVersion="\x00\x01\x00\x00" ttLibVersion="3.32">
<OS_2>
<!-- The fields 'usFirstCharIndex' and 'usLastCharIndex'
will be recalculated by the compiler -->
<version value="4"/>
<xAvgCharWidth value="600"/>
<usWeightClass value="400"/>
<usWidthClass value="5"/>
<fsType value="00000000 00000000"/>
<ySubscriptXSize value="650"/>
<ySubscriptYSize value="600"/>
<ySubscriptXOffset value="0"/>
<ySubscriptYOffset value="75"/>
<ySuperscriptXSize value="650"/>
<ySuperscriptYSize value="600"/>
<ySuperscriptXOffset value="0"/>
<ySuperscriptYOffset value="350"/>
<yStrikeoutSize value="50"/>
<yStrikeoutPosition value="315"/>
<sFamilyClass value="0"/>
<panose>
<bFamilyType value="0"/>
<bSerifStyle value="0"/>
<bWeight value="0"/>
<bProportion value="0"/>
<bContrast value="0"/>
<bStrokeVariation value="0"/>
<bArmStyle value="0"/>
<bLetterForm value="0"/>
<bMidline value="0"/>
<bXHeight value="0"/>
</panose>
<ulUnicodeRange1 value="11100000 00000000 00000010 11101111"/>
<ulUnicodeRange2 value="01010010 00000000 11111000 11111011"/>
<ulUnicodeRange3 value="00000000 00000000 00000000 00001000"/>
<ulUnicodeRange4 value="00000000 00000000 00000000 00000000"/>
<achVendID value="CTDB"/>
<fsSelection value="00000000 11000000"/>
<usFirstCharIndex value="13"/>
<usLastCharIndex value="65535"/>
<sTypoAscender value="935"/>
<sTypoDescender value="-265"/>
<sTypoLineGap value="0"/>
<usWinAscent value="935"/>
<usWinDescent value="265"/>
<ulCodePageRange1 value="01100000 00000000 00000000 10011111"/>
<ulCodePageRange2 value="11011111 11010111 00000000 00000000"/>
<sxHeight value="525"/>
<sCapHeight value="687"/>
<usDefaultChar value="0"/>
<usBreakChar value="32"/>
<usMaxContext value="5"/>
</OS_2>
</ttFont>

Wyświetl plik

@ -267,11 +267,10 @@ But instead we have got: 'Copyright 2012-2015 The Mozilla Foundation, Telefonica
</details>
<details>
<summary>🔥 <b>FAIL:</b> Checking OS/2 usWinAscent & usWinDescent.</summary>
<summary>🔥 <b>FAIL:</b> Variable font weight coordinates must be multiples of 100.</summary>
* [com.google.fonts/check/family/win_ascent_and_descent](https://github.com/googlefonts/fontbakery/search?q=com.google.fonts/check/family/win_ascent_and_descent)
* 🔥 **FAIL** OS/2.usWinAscent value should be equal or greater than 2100, but got 1870 instead [code: ascent]
* 🔥 **FAIL** OS/2.usWinDescent value should be equal or greater than 1000, but got 530 instead [code: descent]
* [com.google.fonts/check/varfont_weight_instances](https://github.com/googlefonts/fontbakery/search?q=com.google.fonts/check/varfont_weight_instances)
* 🔥 **FAIL** Found an variable font instance with 'wght'=450.0. This should instead be a multiple of 100.
</details>
<details>
@ -444,9 +443,9 @@ But instead we have got: 'Copyright 2012-2015 The Mozilla Foundation, Telefonica
| | FiraCode-Light.ttf |
|:--- | ---:|
| Dehinted Size | 238.0kb |
| Dehinted Size | 238.1kb |
| Hinted Size | 236.1kb |
| Increase | -1996 bytes |
| Increase | -1992 bytes |
| Change | -0.8 % |
@ -494,7 +493,7 @@ The version string must ideally include a git commit hash and either a 'dev' or
<summary> <b>INFO:</b> Font contains all required tables?</summary>
* [com.google.fonts/check/required_tables](https://github.com/googlefonts/fontbakery/search?q=com.google.fonts/check/required_tables)
* **INFO** This font contains the following optional tables [GPOS, gasp, DSIG, loca, GSUB, prep]
* **INFO** This font contains the following optional tables [GSUB, loca, GPOS, DSIG, gasp, prep]
* 🍞 **PASS** Font contains all required tables.
</details>
@ -808,6 +807,13 @@ The version string must ideally include a git commit hash and either a 'dev' or
* [com.google.fonts/check/varfont/has_HVAR](https://github.com/googlefonts/fontbakery/search?q=com.google.fonts/check/varfont/has_HVAR)
* 🍞 **PASS** This variable font contains an HVAR table.
</details>
<details>
<summary>🍞 <b>PASS:</b> Checking OS/2 usWinAscent & usWinDescent.</summary>
* [com.google.fonts/check/family/win_ascent_and_descent](https://github.com/googlefonts/fontbakery/search?q=com.google.fonts/check/family/win_ascent_and_descent)
* 🍞 **PASS** OS/2 usWinAscent & usWinDescent values look good!
</details>
<details>
<summary>🍞 <b>PASS:</b> Checking OS/2 Metrics match hhea Metrics.</summary>
@ -850,13 +856,6 @@ The version string must ideally include a git commit hash and either a 'dev' or
* [com.google.fonts/check/varfont_has_instances](https://github.com/googlefonts/fontbakery/search?q=com.google.fonts/check/varfont_has_instances)
* 🍞 **PASS** OK
</details>
<details>
<summary>🍞 <b>PASS:</b> Variable font weight coordinates must be multiples of 100.</summary>
* [com.google.fonts/check/varfont_weight_instances](https://github.com/googlefonts/fontbakery/search?q=com.google.fonts/check/varfont_weight_instances)
* 🍞 **PASS** OK
</details>
<details>
<summary>🍞 <b>PASS:</b> Checking with ftxvalidator.</summary>

Wyświetl plik

@ -1,49 +1,9 @@
# QA Notes – checking & polishing Fira Code for Google Fonts
- [ ] autohint static TTFs
- [x] autohint static TTFs
## Checks to resolve
<details>
<summary>🔥 <b>FAIL:</b> Variable font weight coordinates must be multiples of 100.</summary>
* [com.google.fonts/check/varfont_weight_instances](https://github.com/googlefonts/fontbakery/search?q=com.google.fonts/check/varfont_weight_instances)
* 🔥 **FAIL** Found an variable font instance with 'wght'=450.0. This should instead be a multiple of 100.
</details>
- (fontmake also started to fail, as "Retina" instance was given a custom param of `weightClass: 900`)
- [x] uncheck "Retina" instance as `is active` instance
- [ ] file issue with FontBakery to ask Dave/Marc about this `450` weight "Retina" instance
----------------------------
<details>
<summary>🔥 <b>FAIL:</b> Checking OS/2 usWinAscent & usWinDescent.</summary>
* [com.google.fonts/check/family/win_ascent_and_descent](https://github.com/googlefonts/fontbakery/search?q=com.google.fonts/check/family/win_ascent_and_descent)
* 🔥 **FAIL** OS/2.usWinAscent value should be equal or greater than 1050, but got 935 instead [code: ascent]
* 🔥 **FAIL** OS/2.usWinDescent value should be equal or greater than 500, but got 265 instead [code: descent]
</details>
- [ ] run script to correct vertical metrics, recheck
----------------------------
<details>
<summary><b>[119] FiraCode-Light.ttf</b></summary>
<details>
<summary>🔥 <b>FAIL:</b> Checking file is named canonically.</summary>
* [com.google.fonts/check/canonical_filename](https://github.com/googlefonts/fontbakery/search?q=com.google.fonts/check/canonical_filename)
* 🔥 **FAIL** This is a variable font, but it is using a naming scheme typical of a static font.
* 🔥 **FAIL** Please change the font filename to use one of the following valid suffixes for variable fonts: VF, Italic-VF, Roman-VF
</details>
<details>
<summary>🔥 <b>FAIL:</b> Checking OS/2 usWeightClass.</summary>
@ -52,6 +12,8 @@
</details>
- [ ] explore to find why this would be happening ...
- Encode Sans gets an OS/2 usWeightClass of `100`, matching its default instance.
======================================================================================
@ -69,7 +31,22 @@ But instead we have got: 'Copyright 2012-2015 The Mozilla Foundation, Telefonica
- additionally, it's unclear how the original copyright on Fira Mono & Fira Code should best be integrated to credit all designers involved
- [x] file issue on fontbakery (https://github.com/googlefonts/fontbakery/issues/2419)
- [ ] confirm that current approach is fine (https://github.com/google/fonts/issues/1460#issuecomment-476713822)
- [x] confirm that current approach is fine (https://github.com/google/fonts/issues/1460#issuecomment-476713822) (seems okay, based on Hangouts discussion)
----------------------------
<details>
<summary><b>[119] FiraCode-Light.ttf</b></summary>
<details>
<summary>🔥 <b>FAIL:</b> Checking file is named canonically.</summary>
* [com.google.fonts/check/canonical_filename](https://github.com/googlefonts/fontbakery/search?q=com.google.fonts/check/canonical_filename)
* 🔥 **FAIL** This is a variable font, but it is using a naming scheme typical of a static font.
* 🔥 **FAIL** Please change the font filename to use one of the following valid suffixes for variable fonts: VF, Italic-VF, Roman-VF
</details>
- [x] ask if/when this is changing (via hangouts) – Marc: "Well batch the vfs once theyve implemented it"
----------------------------
@ -102,4 +79,63 @@ But instead we have got: 'Copyright 2012-2015 The Mozilla Foundation, Telefonica
- [x] remove © symbol
----------------------------
<details>
<summary><b>[31] Family checks</b></summary>
<details>
<summary>🔥 <b>FAIL:</b> METADATA.pb: According Google Fonts standards, families should have a Regular style.</summary>
* [com.google.fonts/check/metadata/has_regular](https://github.com/googlefonts/fontbakery/search?q=com.google.fonts/check/metadata/has_regular)
* 🔥 **FAIL** This family lacks a Regular (style: normal and weight: 400) as required by Google Fonts standards.
</details>
- [x] this issue is already filed with fontbakery (https://github.com/googlefonts/fontbakery/issues/2378)
----------------------------
<details>
<summary>🔥 <b>FAIL:</b> Checking OS/2 usWinAscent & usWinDescent.</summary>
* [com.google.fonts/check/family/win_ascent_and_descent](https://github.com/googlefonts/fontbakery/search?q=com.google.fonts/check/family/win_ascent_and_descent)
* 🔥 **FAIL** OS/2.usWinAscent value should be equal or greater than 1050, but got 935 instead [code: ascent]
* 🔥 **FAIL** OS/2.usWinDescent value should be equal or greater than 500, but got 265 instead [code: descent]
</details>
- [x] run script to correct vertical metrics, recheck
- [x] ~~add issue~~ issue exists to gf-docs to update vertical metrics to recommendation at https://github.com/googlefonts/fontbakery/issues/2164#issuecomment-436595886 (will track / manage separately)
----------------------------
<details>
<summary>🔥 <b>FAIL:</b> Glyph names are all valid?</summary>
* [com.google.fonts/check/valid_glyphnames](https://github.com/googlefonts/fontbakery/search?q=com.google.fonts/check/valid_glyphnames)
* 🔥 **FAIL** The following glyph names do not comply with naming conventions: ['numbersign_numbersign_numbersign.liga', 'numbersign_numbersign_numbersign_numbersign.liga', 'numbersign_underscore_parenleft.liga', 'backslash_backslash_backslash.rem', 'numbersign_numbersign_numbersign.liga.rem', 'numbersign_numbersign_numbersign_numbersign.liga.rem', 'semicolon_semicolon_semicolon.rem', 'quadrantUpperLeftAndLowerLeftAndLowerRight', 'quadrantUpperLeftAndUpperRightAndLowerLeft', 'quadrantUpperLeftAndUpperRightAndLowerRight', 'quadrantUpperRightAndLowerLeftAndLowerRight', 'whiteSquareWithUpperLeftQuadrant', 'whiteSquareWithLowerLeftQuadrant', 'whiteSquareWithLowerRightQuadrant', 'whiteSquareWithUpperRightQuadrant', 'asciitilde_asciitilde_greater.liga', 'ampersand_ampersand_ampersand.rem', 'asciitilde_asciitilde_asciitilde.rem'] A glyph name may be up to 31 characters in length, must be entirely comprised of characters from the following set: A-Z a-z 0-9 .(period) _(underscore). and must not start with a digit or period. There are a few exceptions such as the special character ".notdef". The glyph names "twocents", "a1", and "_" are all valid, while "2cents" and ".twocents" are not.
</details>
- [x] issue filed at https://github.com/tonsky/FiraCode/issues/730 – I'm guessing this won't cause any real issues on the web fonts.
- I'll leave these glyphs as they are for now, and let @tonsky handle it if it seems to be the cause of an actual user issue
----------------------------
<details>
<summary>🔥 <b>FAIL:</b> Variable font weight coordinates must be multiples of 100.</summary>
* [com.google.fonts/check/varfont_weight_instances](https://github.com/googlefonts/fontbakery/search?q=com.google.fonts/check/varfont_weight_instances)
* 🔥 **FAIL** Found an variable font instance with 'wght'=450.0. This should instead be a multiple of 100.
</details>
- (fontmake also started to fail, as "Retina" instance was given a custom param of `weightClass: 900`)
- [x] uncheck "Retina" instance as `is active` instance
- [x] file issue with FontBakery to ask Dave/Marc about this `450` weight "Retina" instance (https://github.com/googlefonts/fontbakery/issues/2420)-
- [x] change if you find a better approach to keep Retina without disrupting builds / Regular weight
- To set up the instance in GlyhpsApp such that it exports a font as expected: "Retina" gets a custom parameter of `weightClass: 450`, and a glyphs menu-weight of "Normal." Tested in axis-praxis, it seems to work well. All instances have a `weightClass` custom parameter.
----------------------------

Wyświetl plik

@ -0,0 +1,113 @@
#MenuTitle: Set Vertical Metric Params
# -*- coding: utf-8 -*-
font = Glyphs.font
print(font)
__doc__="""
Assumes the masters keep the same vertical metrics.
I am not sure whether winAscent and winDescent should be different between masters,
otherwise, but you should check if that's the case before using this script
on a font where min/max heights are different between styles.
Useful when created; may or may not match the latest Google Fonts vertical metrics standards.
"""
font = Glyphs.font
caps = ["A", "Aacute", "Abreve", "Acircumflex", "Adieresis", "Agrave", "Amacron", "Aogonek", "Aring", "Aringacute", "Atilde", "AE", "AEacute", "B", "C", "Cacute", "Ccaron", "Ccedilla", "Ccircumflex", "Cdotaccent", "D", "Eth", "Dcaron", "Dcroat", "Ddotbelow", "E", "Eacute", "Ebreve", "Ecaron", "Ecircumflex", "Edieresis", "Edotaccent", "Edotbelow", "Egrave", "Emacron", "Eogonek", "Etilde", "F", "G", "Gbreve", "Gcircumflex", "Gcommaaccent", "Gdotaccent", "H", "Hbar", "Hcircumflex", "Hdotbelow", "I", "IJ", "Iacute", "Ibreve", "Icircumflex", "Idieresis", "Idotaccent", "Idotbelow", "Igrave", "Imacron", "Iogonek", "Itilde", "J", "Jcircumflex", "K", "Kcommaaccent", "L", "Lacute", "Lcaron", "Lcommaaccent", "Ldot", "Lslash", "M", "N", "Nacute", "Ncaron", "Ncommaaccent", "Ndotaccent", "Eng", "Ntilde", "O", "Oacute", "Obreve", "Ocircumflex", "Odieresis", "Odotbelow", "Ograve", "Ohungarumlaut", "Omacron", "Oogonek", "Oslash", "Oslashacute", "Otilde", "OE", "P", "Thorn", "Q", "R", "Racute", "Rcaron", "Rcommaaccent", "Rdotbelow", "S", "Sacute", "Scaron", "Scircumflex", "Sdotbelow", "Schwa", "T", "Tbar", "Tcaron", "Tdotbelow", "U", "Uacute", "Ubreve", "Ucircumflex", "Udieresis", "Udotbelow", "Ugrave", "Uhungarumlaut", "Umacron", "Uogonek", "Uring", "Utilde", "V", "W", "Wacute", "Wcircumflex", "Wdieresis", "Wgrave", "X", "Y", "Yacute", "Ycircumflex", "Ydieresis", "Ygrave", "Ytilde", "Z", "Zacute", "Zcaron", "Zdotaccent", "Zdotbelow", "uni015E", "uni0162", "uni01C4", "uni01C5", "uni01C7", "uni01C8", "uni01CA", "uni01CB", "uni01F1", "uni01F2", "uni0218", "uni021A" ]
lowercase = ["a", "aacute", "abreve", "acircumflex", "adieresis", "agrave", "amacron", "aogonek", "aring", "aringacute", "atilde", "ae", "aeacute", "b", "c", "cacute", "ccaron", "ccedilla", "ccircumflex", "cdotaccent", "d", "eth", "dcaron", "dcroat", "ddotbelow", "e", "eacute", "ebreve", "ecaron", "ecircumflex", "edieresis", "edotaccent", "edotbelow", "egrave", "emacron", "eogonek", "etilde", "schwa", "f", "g", "gbreve", "gcircumflex", "gcommaaccent", "gdotaccent", "h", "hbar", "hcircumflex", "hdotbelow", "i", "dotlessi", "iacute", "ibreve", "icircumflex", "idieresis", "idotbelow", "igrave", "ij", "imacron", "iogonek", "itilde", "j", "dotlessj", "jcircumflex", "k", "kcommaaccent", "kgreenlandic", "l", "lacute", "lcaron", "lcommaaccent", "ldot", "lslash", "m", "n", "nacute", "napostrophe", "ncaron", "ncommaaccent", "ndotaccent", "eng", "ntilde", "o", "oacute", "obreve", "ocircumflex", "odieresis", "odotbelow", "ograve", "ohungarumlaut", "omacron", "oogonek", "oslash", "oslashacute", "otilde", "oe", "p", "thorn", "q", "r", "racute", "rcaron", "rcommaaccent", "rdotbelow", "s", "sacute", "scaron", "scircumflex", "sdotbelow", "germandbls", "t", "tbar", "tcaron", "tdotbelow", "u", "uacute", "ubreve", "ucircumflex", "udieresis", "udotbelow", "ugrave", "uhungarumlaut", "umacron", "uni015F", "uni0163", "uni01C6", "uni01C9", "uni01CC", "uni01F3", "uni0219", "uni021B", "uogonek", "uring", "utilde", "v", "w", "wacute", "wcircumflex", "wdieresis", "wgrave", "x", "y", "yacute", "ycircumflex", "ydieresis", "ygrave", "ytilde", "z", "zacute", "zcaron", "zdotaccent", "zdotbelow", "c_t", "f_b", "f_f", "f_f_b", "f_f_h", "f_f_i", "f_f_j", "f_f_k", "f_f_l", "f_f_t", "f_h", "f_i", "f_j", "f_k", "f_l", "f_t", "s_t", ]
# starter values
mainMaxDescent = 0
mainMaxDescentGlyph = ""
maxDescent = 0
mainMaxAscent = 0
mainMaxAscentGlyph = ""
maxAscent = 0
# find highest and lowest point in font
for glyph in font.glyphs:
# get total yMax and yMin, for win values
for layer in glyph.layers:
# get descender of current layer
descent = layer.bounds.origin.y
# get ascender of current layer
ascent = layer.bounds.size.height + descent
# if descent/ascent of current layer is greater than previous max descents/ascents, update the max descent/ascent
if descent <= maxDescent:
maxDescent = descent
maxDescentGlyph = glyph.name
if ascent >= maxAscent:
maxAscent = ascent
maxAscentGlyph = glyph.name
# get descender of current layer
descent = layer.bounds.origin.y
# get ascender of current layer (total height of layer, subtracting value of descender)
ascent = layer.bounds.size.height + descent
# get maximums of only letters in list vars, for typo and hhea values
if glyph.name in caps:
for layer in glyph.layers:
if ascent >= mainMaxAscent:
mainMaxAscent = ascent
mainMaxAscentGlyph = glyph.name
if glyph.name in lowercase:
# if descent/ascent of current layer is greater than previous max descents/ascents, update the max descent/ascent
if descent <= mainMaxDescent:
mainMaxDescent = descent
mainMaxDescentGlyph = glyph.name
# check values for sanity
print(maxDescentGlyph, maxDescent, maxAscentGlyph, maxAscent)
# make lineGap so that the total of `ascent + descent + lineGap` equals 120% of UPM size
UPM = font.upm
totalSize = maxAscent + abs(maxDescent)
# lineGap = int((UPM * 1.2)) - totalSize
# print(UPM, UPM * 1.2, totalSize, lineGap)
## use highest/lowest points to set custom parameters for winAscent and winDescent
## following vertical metric schema from https://github.com/googlefonts/gf-docs/tree/master/VerticalMetrics (actually, that source must be updated to better recommendations found at https://github.com/googlefonts/fontbakery/issues/2164#issuecomment-436595886)
font.customParameters["Use Typo Metrics"] = True
for master in font.masters:
# Win Ascent/Descent = Font bbox yMax/yMin
master.customParameters["winAscent"] = maxAscent
master.customParameters["winDescent"] = abs(maxDescent)
typoLineGap = 0
master.customParameters["typoLineGap"] = typoLineGap
master.customParameters["hheaLineGap"] = typoLineGap
typoDescender = mainMaxDescent
master.customParameters["typoDescender"] = typoDescender
master.customParameters["hheaDescender"] = typoDescender
typoAscender = mainMaxAscent
master.customParameters["typoAscender"] = typoAscender
master.customParameters["hheaAscender"] = typoAscender