Skip to content

Commit

Permalink
deprecate fonts.google.com/check/080
Browse files Browse the repository at this point in the history
(fix issue #1996)
  • Loading branch information
felipesanches committed Aug 14, 2018
1 parent 97da365 commit 1f7dfad
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 54 deletions.
15 changes: 0 additions & 15 deletions Lib/fontbakery/specifications/googlefonts.py
Expand Up @@ -102,7 +102,6 @@
, 'com.google.fonts/check/077' # Check all glyphs have codepoints assigned.
#, 'com.google.fonts/check/078' # Check that glyph names do not exceed max length.
, 'com.google.fonts/check/079' # Monospace font has hhea.advanceWidthMax equal to each glyph's advanceWidth?
, 'com.google.fonts/check/080' # METADATA.pb: Ensure designer simple short name.
, 'com.google.fonts/check/081' # METADATA.pb: Fontfamily is listed on Google Fonts API?
, 'com.google.fonts/check/083' # METADATA.pb: check if fonts field only has unique "full_name" values.
, 'com.google.fonts/check/084' # METADATA.pb: check if fonts field only contains unique style:weight pairs.
Expand Down Expand Up @@ -1246,20 +1245,6 @@ def com_google_fonts_check_074(ttFont):
" contain non-ASCII characteres.")


@check(
id = 'com.google.fonts/check/080',
conditions = ['family_metadata']
)
def com_google_fonts_check_080(family_metadata):
"""METADATA.pb: Ensure designer simple short name."""
if len(family_metadata.designer.split(" ")) >= 4 or \
" and " in family_metadata.designer or \
"." in family_metadata.designer or \
"," in family_metadata.designer:
yield FAIL, "\"designer\" key must be simple short name"
else:
yield PASS, "Designer is a simple short name"

@condition
def listed_on_gfonts_api(family_metadata):
if not family_metadata:
Expand Down
39 changes: 0 additions & 39 deletions tests/specifications/googlefonts_test.py
Expand Up @@ -726,45 +726,6 @@ def test_check_074():
assert status == PASS


def test_check_080():
""" METADATA.pb: Ensure designer simple short name. """
from fontbakery.specifications.googlefonts import (com_google_fonts_check_080 as check,
family_metadata,
family_directory)
print ("Test PASS with a good designer name...")
# Our reference Merriweather family has got a good entry
# for designer name on its METADATA.pb file:
fonts = ["data/test/merriweather/Merriweather-Regular.ttf"]
md = family_metadata(family_directory(fonts))
status, message = list(check(md))[-1]
assert status == PASS

print ("Test FAIL: 4 names or more is too much.")
md.designer = "Dude With Many Surnames"
status, message = list(check(md))[-1]
assert status == FAIL

print ("Test PASS: but 3 names is OK!")
md.designer = "This Looks Good"
status, message = list(check(md))[-1]
assert status == PASS

print ("Test FAIL: We won't accept designer names containing dots.")
md.designer = "user.name"
status, message = list(check(md))[-1]
assert status == FAIL

print ("Test FAIL: A list of names is also not OK.")
md.designer = "Peter, Joanna, Bianca"
status, message = list(check(md))[-1]
assert status == FAIL

print ("Test FAIL: And here's another bad one...")
md.designer = "Alice and Bob"
status, message = list(check(md))[-1]
assert status == FAIL


def test_check_081():
""" METADATA.pb: Fontfamily is listed on Google Fonts API? """
from fontbakery.specifications.googlefonts import (com_google_fonts_check_081 as check,
Expand Down

0 comments on commit 1f7dfad

Please sign in to comment.