diff --git a/changes/15.0.0.md b/changes/15.0.0.md index 872c6ce55..fca457636 100644 --- a/changes/15.0.0.md +++ b/changes/15.0.0.md @@ -1,3 +1,5 @@ + * \[**Breaking**\] Metric override name change: `xheight` → `xHeight`. * Add variant selector for dot and comma diacritics (#1309). * Fix enclosed glyphs' placement when having glyphs with different Y-shifting (#1310). + * Add metric override for `archDepth` and `smallArchDepth` (#1313). \ No newline at end of file diff --git a/doc/custom-build.md b/doc/custom-build.md index fe8c7ac10..054f0a098 100644 --- a/doc/custom-build.md +++ b/doc/custom-build.md @@ -450,7 +450,7 @@ Subsection `metric-override` provides ability to override certain metric values, | Property | Unit | Default Value | Meaning | |----------|------|---------|----------| | `cap` | emu | 735 | Height of `H`. | -| `xheight` | emu | 520 | Height of `x`. | +| `xHeight` | emu | 520 | Height of `x`. | | `sb` | emu | (*varies, 60 for Regular*) | Width of common side-bearings. | | `accentWidth` | emu | 200 | Width of accent marks. | | `accentClearance` | emu | 72 | Vertical clearance of accent marks to the base. | @@ -470,6 +470,8 @@ Subsection `metric-override` provides ability to override certain metric values, | `essRatioUpper` | (*ratio*) | (*varies, 1.12 for Regular*) | Ratio of the thickness of the neck of `S`, to the normal stroke width. | | `essRatioLower` | (*ratio*) | (*varies, 1.12 for Regular*) | Ratio of the thickness of the neck of `s`, to the normal stroke width. | | `essRatioQuestion` | (*ratio*) | (*varies, 1.12 for Regular*) | Ratio of the thickness of the neck of `?`, to the normal stroke width. | +| `archDepth` | emu | (*varies, 195 for Regular*) | Depth of the curve segment of arches / O rings in capital letters. | +| `smallArchDepth` | emu | (*varies, 200 for Regular*) | Depth of the curve segment of arches / O rings in small letters. | The values of each item could be either a number, or a string representing an expression so that it could be different for different instance fonts, or depending on default values. The syntax of valid expressions are: diff --git a/font-src/glyphs/auto-build/transformed.ptl b/font-src/glyphs/auto-build/transformed.ptl index dc1a9ee88..fb86720ac 100644 --- a/font-src/glyphs/auto-build/transformed.ptl +++ b/font-src/glyphs/auto-build/transformed.ptl @@ -129,7 +129,7 @@ glyph-block Autobuild-Transformed : begin local forkedParams : Object.create para set forkedParams.cap0 para.cap set forkedParams.cap XH - set forkedParams.xheight (XH * XH / CAP) + set forkedParams.xHeight (XH * XH / CAP) set forkedParams.diversityM 1 set forkedParams.diversityF 1 set forkedParams.diversityI 1 diff --git a/font-src/meta/aesthetics.ptl b/font-src/meta/aesthetics.ptl index 5fffc0ecd..39a8bb8ec 100644 --- a/font-src/meta/aesthetics.ptl +++ b/font-src/meta/aesthetics.ptl @@ -12,7 +12,7 @@ export : define [calculateMetrics para] : begin define Width : Math.round para.width define SB para.sb define CAP para.cap - define XH para.xheight + define XH para.xHeight define Descender : fallback para.descender (XH - CAP) define Contrast : fallback para.contrast 1 # Key metrics for symbols diff --git a/font-src/support/metric-override.js b/font-src/support/metric-override.js index bc35f3c9a..c54048b8d 100644 --- a/font-src/support/metric-override.js +++ b/font-src/support/metric-override.js @@ -25,7 +25,7 @@ function applyMetricOverride(para, mo, argv) { const validMetricOverrideFields = new Set([ "cap", - "xheight", + "xHeight", "sb", "accentWidth", "accentClearance", @@ -46,7 +46,9 @@ const validMetricOverrideFields = new Set([ "essRatioUpper", "essRatioLower", "essRatioQuestion", - "essRatio" + "essRatio", + "archDepth", + "smallArchDepth" ]); /////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/params/parameters.toml b/params/parameters.toml index a3a56e36b..02ce39941 100644 --- a/params/parameters.toml +++ b/params/parameters.toml @@ -12,7 +12,7 @@ naming.description = 'Spatial efficient monospace font family for programming. B leading = 1250 # Default line height times 1000. descenderPad = 0 # Additional line height, added to descender. cap = 735 # Cap height (as well as ascender). -xheight = 520 # X-height. +xHeight = 520 # X-height. #descender = -205 # Depth of descender. Currently unused. winMetricAscenderPad = 0 # Padding of Win ascnder metrics to avoid clipping. See #343 winMetricDescenderPad = 0 # Padding of Win descender metrics to avoid clipping. See #343