Skip to content

Commit

Permalink
Renamed check IDs adding "varfont" for consistency with other IDs:
Browse files Browse the repository at this point in the history
- **[com.google.fonts/check/wdth_valid_range]** => com.google.fonts/check/varfont/wdth_valid_range
- **[com.google.fonts/check/wght_valid_range]** => com.google.fonts/check/varfont/wght_valid_range
(issue fonttools#2572)
  • Loading branch information
felipesanches committed Aug 9, 2019
1 parent a0fb6ca commit 3b81918
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -10,6 +10,10 @@ A more detailed list of changes is available in the corresponding milestones for
- **[com.google.fonts/check/metadata/undeclared_fonts]:** "Ensure METADATA.pb lists all font binaries" (issue #2575)
- **[com.google.fonts/check/varfont/slnt_range:]** "The variable font 'slnt' (Slant) axis coordinate specifies positive values in its range?" (issue #2572)

### Renamed check IDs:
- **[com.google.fonts/check/wdth_valid_range]** => com.google.fonts/check/varfont/wdth_valid_range
- **[com.google.fonts/check/wght_valid_range]** => com.google.fonts/check/varfont/wght_valid_range


## 0.7.10 (2019-Aug-06)
### Note-worthy code changes
Expand Down
8 changes: 4 additions & 4 deletions Lib/fontbakery/profiles/fvar.py
Expand Up @@ -192,7 +192,7 @@ def com_google_fonts_check_varfont_bold_wght_coord(ttFont, bold_wght_coord):


@check(
id = 'com.google.fonts/check/wght_valid_range',
id = 'com.google.fonts/check/varfont/wght_valid_range',
rationale = """
According to the Open-Type spec's registered
design-variation tag 'wght' available at
Expand All @@ -205,7 +205,7 @@ def com_google_fonts_check_varfont_bold_wght_coord(ttFont, bold_wght_coord):
'request': 'https://github.com/googlefonts/fontbakery/issues/2264'
}
)
def com_google_fonts_check_wght_valid_range(ttFont):
def com_google_fonts_check_varfont_wght_valid_range(ttFont):
"""The variable font 'wght' (Weight) axis coordinate
must be within spec range of 1 to 1000 on all instances."""

Expand All @@ -226,7 +226,7 @@ def com_google_fonts_check_wght_valid_range(ttFont):


@check(
id = 'com.google.fonts/check/wdth_valid_range',
id = 'com.google.fonts/check/varfont/wdth_valid_range',
rationale = """
According to the Open-Type spec's registered
design-variation tag 'wdth' available at
Expand All @@ -238,7 +238,7 @@ def com_google_fonts_check_wght_valid_range(ttFont):
misc_metadata = {
}
)
def com_google_fonts_check_wdth_valid_range(ttFont):
def com_google_fonts_check_varfont_wdth_valid_range(ttFont):
"""The variable font 'wdth' (Weight) axis coordinate
must be within spec range of 1 to 1000 on all instances."""

Expand Down
4 changes: 2 additions & 2 deletions Lib/fontbakery/profiles/opentype.py
Expand Up @@ -46,6 +46,8 @@
'com.google.fonts/check/varfont/regular_opsz_coord',
'com.google.fonts/check/varfont/bold_wght_coord',
'com.google.fonts/check/varfont/slnt_range',
'com.google.fonts/check/varfont/wght_valid_range',
'com.google.fonts/check/varfont/wdth_valid_range',
'com.google.fonts/check/loca/maxp_num_glyphs',
'com.adobe.fonts/check/cff2_call_depth',
'com.adobe.fonts/check/cff_call_depth',
Expand All @@ -66,8 +68,6 @@
'com.google.fonts/check/points_out_of_bounds',
'com.google.fonts/check/all_glyphs_have_codepoints',
'com.google.fonts/check/monospace_max_advancewidth',
'com.google.fonts/check/wght_valid_range',
'com.google.fonts/check/wdth_valid_range',
'com.google.fonts/check/code_pages',
]

Expand Down
10 changes: 5 additions & 5 deletions tests/profiles/fvar_test.py
Expand Up @@ -216,10 +216,10 @@ def test_check_varfont_bold_wght_coord():
assert status == FAIL and message.code == "not-700"


def test_check_wght_valid_range():
def test_check_varfont_wght_valid_range():
""" The variable font 'wght' (Weight) axis coordinate
must be within spec range of 1 to 1000 on all instances. """
from fontbakery.profiles.fvar import com_google_fonts_check_wght_valid_range as check
from fontbakery.profiles.fvar import com_google_fonts_check_varfont_wght_valid_range as check

# Our reference varfont, CabinVFBeta.ttf, has
# all instances within the 1-1000 range
Expand Down Expand Up @@ -247,10 +247,10 @@ def test_check_wght_valid_range():
assert status == FAIL and message.code == "out-of-range"


def test_check_wdth_valid_range():
def test_check_varfont_wdth_valid_range():
""" The variable font 'wdth' (Width) axis coordinate
must be within spec range of 1 to 1000 on all instances. """
from fontbakery.profiles.fvar import com_google_fonts_check_wdth_valid_range as check
from fontbakery.profiles.fvar import com_google_fonts_check_varfont_wdth_valid_range as check

# Our reference varfont, CabinVFBeta.ttf, has
# all instances within the 1-1000 range
Expand Down Expand Up @@ -278,7 +278,7 @@ def test_check_wdth_valid_range():
assert status == FAIL and message.code == "out-of-range"


def test_check_slnt_range():
def test_check_varfont_slnt_range():
""" The variable font 'slnt' (Slant) axis coordinate
specifies positive values in its range? """
from fontbakery.profiles.fvar import com_google_fonts_check_varfont_slnt_range as check
Expand Down

0 comments on commit 3b81918

Please sign in to comment.