1
0
mirror of synced 2025-12-19 17:48:10 -05:00

Merge commit '4c9db329d9303a64b0cd7a3d40be24d2b5e667fa' into chrissimpkins-update-axisregistry

This commit is contained in:
Chris Simpkins
2022-12-06 19:09:18 -05:00
15 changed files with 201 additions and 20 deletions

View File

@@ -0,0 +1,56 @@
---
name: Add Axis
about: Submit a custom axis to Google Fonts Axis Registry.
title: 'Add [Axis (TAG) Name]'
labels: '--new-axis'
assignees: ''
---
## Font Project introducing the axis
(Provide the name and GitHub repo of the font introducing the axis)
## Validate the incoming custom axis against the Axis Registry
Please inspect the current [Axis Registry](https://github.com/googlefonts/axisregistry/tree/main/Lib/axisregistry/data) and determine if there is already a custom axis that could be used for the variation purpose on the font. We should ensure it's not a duplicated concept.
## Short description of what the axis does
Describe the effect of the axis in the font. Over what does it operates (stems, terminals, serifs, etc) how changes happen.
## Image
Attach here a pic or a gif showing the axis behavior.
## Why is the axis needed
Please provide an expected case of use from the users point of view, reasoning on why or how the users might use or would benefit from the axis.
This explanation would help to discern the validity of the axis itself and its definitions such as the ranges. This information could be used to create additional educational content.
## Axis metadata fields
Complete the following metadata field for the axis. You can read about the [Axis Metadata Fields](https://github.com/googlefonts/axisregistry#axis-metadata-fields) in the Readme section of this repository.
- For the time being every custom axis is registered with only one fallback, which should be named "Default" and the value should match the axis `default_value`.
- The description gives users more context about what the axis does or how it can be used. It should be written in a general way allowing it to make sense for other cases and should include a clarificacion of the range. This text is used on the Type Tester tab of the font specimen page, under the info button (i) next to the axis name.
```
#[Four letter axis TAG] based on (url of the font's repository introducing the axis)
tag: ""
display_name: ""
min_value:
default_value:
max_value:
precision:
fallback {
name: "Default"
value: 0.00
}
fallback_only: false
description: ""
````

View File

@@ -0,0 +1,14 @@
---
name: Anything Else
about: Submit an issue for a new feature or existing axis revision.
title: ''
labels: '--review-axis'
assignees: ''
---
**Describe the issue**
A clear and concise description of what the issue or proposal is.
**Screenshots**
If applicable, add screenshots to help explain your proposal.

View File

@@ -1,8 +1,69 @@
Below are the most important changes from each release.
## Upcoming release: 0.3.11 (2022-Dic-??)
- ...
## 0.3.10 (2022-Nov-24)
- Better issue templates (PR #94)
- build_stat: improve elided axisvalues (PR #95)
## 0.3.9 (2022-Oct-27)
- loosen protobuf dependency on setup.py so that it is easier to install axisregistry as a dependency of other projects (such as fontbakery) (https://github.com/googlefonts/axisregistry/commit/bb213824f9b8a6215b9b78c28f59773e0bd93515)
- #91 Added ROND axis
- #55 Added YROT axis
- #55 Added XROT axis
## 0.3.8 (2022-Oct-10)
- fix_stat do not drop nameids <= 25 (PR #88)
## 0.3.7 (2022-Oct-10)
- build_stat: do not rm fvar axis name records (PR #87)
## 0.3.6 (2022-Oct-07)
- Added YEAR axis (PR #53)
- Added ELSH axis (PR #56)
- Changed EGRD to ELGR (PR #57)
- Added EHLT and EDPT (PR #61)
- Added HEXP axis (PR #79)
## 0.3.5 (2022-Jul-01)
- Move nameid25 to its own func (PR #52)
## 0.3.4 (2022-Jul-01)
- Fix typo and ensure tox runs tests correctly (PR #50)
## 0.3.3 (2022-Jul-01)
- Don't delete name IDs which are shared with the STAT table (PR #49)
## 0.3.2 (2022-Jun-27)
- added _fvar_instance_collision function, which determines whether a family of fonts will have fvar instances which collide.
- build_vf_name_table: only use v1 name tables if fvar instances match (PR #48)
## 0.3.1 (2022-Jun-24)
- AxisRegistry: add items method. Fixed googlefonts/gftools#576 (PR #47)
## 0.3.0 (2022-Jun-23)
- Add name builder (PR #31)
- Add illustrations (PRs #29, #30, #32 and #35)
- Reduce length of parametric axis descriptions (PR #34)
- y_transparent_descender.textproto Use depth, not height (PR #36)
- tox: use black (PR #39)
## 0.2.0 (2022-Mar-14)
- Remove pre-processing of fallback names and simplify API
## 0.1.1 (2022-Mar-14)
- Fix typos on cursive and monospace axes descriptions.
- Remove space characteres from fallback name entries of all axes. (issue #7)

View File

@@ -234,14 +234,17 @@ def build_stat(ttFont, sibling_ttFonts=[]):
for axis, fallback in fallbacks_in_siblings:
if axis in seen_axes:
continue
value = 0.0
elided_value = axis_registry[axis].default_value
elided_fallback = axis_registry.fallback_for_value(axis, elided_value)
a = {
"tag": axis,
"name": axis_registry[axis].display_name,
"values": [{"name": "Normal", "value": value, "flags": 0x2}],
"values": [
{"name": elided_fallback.name, "value": elided_value, "flags": 0x2}
],
}
if axis in LINKED_VALUES and value in LINKED_VALUES[axis]:
a["values"][0]["linkedValue"] = LINKED_VALUES[axis][value]
if axis in LINKED_VALUES and elided_value in LINKED_VALUES[axis]:
a["values"][0]["linkedValue"] = LINKED_VALUES[axis][elided_value]
res.append(a)
buildStatTable(ttFont, res, macNames=False)

View File

@@ -0,0 +1,15 @@
# BNCE based on https://github.com/arrowtype/shantell-sans
tag: "BNCE"
display_name: "Bounce"
min_value: -100
default_value: 0
max_value: 100
precision: 0
fallback {
name: "Default"
value: 0
}
fallback_only: false
description:
"Shift glyphs up and down in the Y dimension, resulting "
"in an uneven, bouncy baseline."

View File

@@ -0,0 +1,15 @@
# INFM based on https://github.com/arrowtype/shantell-sans
tag: "INFM"
display_name: "Informality"
min_value: 0
default_value: 0
max_value: 100
precision: 0
fallback {
name: "Default"
value: 0
}
fallback_only: false
description:
"Adjusts overall design from formal and traditional (0%)"
" to informal and unconventional (up to 100%)."

View File

@@ -0,0 +1,16 @@
# SPAC based on https://github.com/gferreira/roboto-flex-spac
tag: "SPAC"
display_name: "Spacing"
min_value: -100.0
default_value: 0.0
max_value: 100.0
precision: -1
fallback {
name: "Default"
value: 0
}
fallback_only: false
description:
"Adjusts the overall letter spacing of a font. "
"The range is a relative percentage change from "
"the familys default spacing, so the default value is 0."

View File

@@ -1,4 +1,4 @@
#Rotation in X, based on https://github.com/andyclymer/Tilt-Typeface
# Rotation in X, based on https://github.com/googlefonts/Tilt-Fonts
tag: "XROT"
display_name: "Rotation in X"
min_value: -180
@@ -11,4 +11,5 @@ fallback {
}
fallback_only: false
description:
"Letters rotate around the X axis."
"Letters rotate left and right, negative values to the left"
" and positive values to the right, in the X dimension."

View File

@@ -1,4 +1,4 @@
#Rotation in Y, based on https://github.com/andyclymer/Tilt-Typeface
# Rotation in Y, based on https://github.com/googlefonts/Tilt-Fonts
tag: "YROT"
display_name: "Rotation in Y"
min_value: -180
@@ -11,5 +11,5 @@ fallback {
}
fallback_only: false
description:
"Letters rotate around the Y axis."
"Letters rotate up and down, negative values tilt down"
" and positive values tilt up, in the Y dimension."

View File

@@ -43,5 +43,5 @@ setup(
],
python_requires=">=3.7",
setup_requires=["setuptools_scm>=4,<6.1"],
install_requires=["protobuf==3.19.4", "fonttools"],
install_requires=["protobuf>=3.19.4", "fonttools"],
)

View File

@@ -89,7 +89,7 @@
<AxisValue index="10" Format="3">
<AxisIndex value="3"/>
<Flags value="2"/> <!-- ElidableAxisValueName -->
<ValueNameID value="288"/> <!-- Normal -->
<ValueNameID value="289"/> <!-- Roman -->
<Value value="0.0"/>
<LinkedValue value="1.0"/>
</AxisValue>

View File

@@ -94,15 +94,15 @@
<AxisValue index="10" Format="3">
<AxisIndex value="3"/>
<Flags value="2"/> <!-- ElidableAxisValueName -->
<ValueNameID value="529"/> <!-- Normal -->
<ValueNameID value="529"/> <!-- Roman -->
<Value value="0.0"/>
<LinkedValue value="1.0"/>
</AxisValue>
<AxisValue index="11" Format="1">
<AxisIndex value="4"/>
<Flags value="2"/> <!-- ElidableAxisValueName -->
<ValueNameID value="529"/> <!-- Normal -->
<Value value="0.0"/>
<ValueNameID value="530"/> <!-- Normal -->
<Value value="100.0"/>
</AxisValue>
</AxisValueArray>
<ElidedFallbackNameID value="2"/> <!-- Italic -->

View File

@@ -88,7 +88,7 @@
<AxisValue index="9" Format="3">
<AxisIndex value="2"/>
<Flags value="2"/> <!-- ElidableAxisValueName -->
<ValueNameID value="280"/> <!-- Normal -->
<ValueNameID value="466"/> <!-- Roman -->
<Value value="0.0"/>
<LinkedValue value="1.0"/>
</AxisValue>
@@ -96,12 +96,12 @@
<AxisIndex value="3"/>
<Flags value="2"/> <!-- ElidableAxisValueName -->
<ValueNameID value="280"/> <!-- Normal -->
<Value value="0.0"/>
<Value value="100.0"/>
</AxisValue>
<AxisValue index="11" Format="3">
<AxisIndex value="4"/>
<Flags value="2"/> <!-- ElidableAxisValueName -->
<ValueNameID value="280"/> <!-- Normal -->
<ValueNameID value="466"/> <!-- Roman -->
<Value value="0.0"/>
<LinkedValue value="1.0"/>
</AxisValue>

View File

@@ -83,14 +83,14 @@
<AxisValue index="9" Format="3">
<AxisIndex value="2"/>
<Flags value="2"/> <!-- ElidableAxisValueName -->
<ValueNameID value="283"/> <!-- Normal -->
<ValueNameID value="285"/> <!-- Roman -->
<Value value="0.0"/>
<LinkedValue value="1.0"/>
</AxisValue>
<AxisValue index="10" Format="3">
<AxisIndex value="3"/>
<Flags value="2"/> <!-- ElidableAxisValueName -->
<ValueNameID value="283"/> <!-- Normal -->
<ValueNameID value="285"/> <!-- Roman -->
<Value value="0.0"/>
<LinkedValue value="1.0"/>
</AxisValue>

View File

@@ -448,7 +448,7 @@ def test_stat(fp, sibling_fps):
build_stat(font, siblings)
stat_fp = fp.replace(".ttf", "_STAT.ttx")
### output good files
## output good files
# with open(stat_fp, "w") as doc:
# got = dump(font["STAT"], font)
# doc.write(got)