Add metric override for archDepth
and smallArchDepth
(#1313).
This commit is contained in:
parent
11f11c79a9
commit
6af084ecbc
6 changed files with 12 additions and 6 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
* \[**Breaking**\] Metric override name change: `xheight` → `xHeight`.
|
||||||
* Add variant selector for dot and comma diacritics (#1309).
|
* Add variant selector for dot and comma diacritics (#1309).
|
||||||
* Fix enclosed glyphs' placement when having glyphs with different Y-shifting (#1310).
|
* Fix enclosed glyphs' placement when having glyphs with different Y-shifting (#1310).
|
||||||
|
* Add metric override for `archDepth` and `smallArchDepth` (#1313).
|
||||||
|
|
|
@ -450,7 +450,7 @@ Subsection `metric-override` provides ability to override certain metric values,
|
||||||
| Property | Unit | Default Value | Meaning |
|
| Property | Unit | Default Value | Meaning |
|
||||||
|----------|------|---------|----------|
|
|----------|------|---------|----------|
|
||||||
| `cap` | emu | 735 | Height of `H`. |
|
| `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. |
|
| `sb` | emu | (*varies, 60 for Regular*) | Width of common side-bearings. |
|
||||||
| `accentWidth` | emu | 200 | Width of accent marks. |
|
| `accentWidth` | emu | 200 | Width of accent marks. |
|
||||||
| `accentClearance` | emu | 72 | Vertical clearance of accent marks to the base. |
|
| `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. |
|
| `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. |
|
| `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. |
|
| `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:
|
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:
|
||||||
|
|
||||||
|
|
|
@ -129,7 +129,7 @@ glyph-block Autobuild-Transformed : begin
|
||||||
local forkedParams : Object.create para
|
local forkedParams : Object.create para
|
||||||
set forkedParams.cap0 para.cap
|
set forkedParams.cap0 para.cap
|
||||||
set forkedParams.cap XH
|
set forkedParams.cap XH
|
||||||
set forkedParams.xheight (XH * XH / CAP)
|
set forkedParams.xHeight (XH * XH / CAP)
|
||||||
set forkedParams.diversityM 1
|
set forkedParams.diversityM 1
|
||||||
set forkedParams.diversityF 1
|
set forkedParams.diversityF 1
|
||||||
set forkedParams.diversityI 1
|
set forkedParams.diversityI 1
|
||||||
|
|
|
@ -12,7 +12,7 @@ export : define [calculateMetrics para] : begin
|
||||||
define Width : Math.round para.width
|
define Width : Math.round para.width
|
||||||
define SB para.sb
|
define SB para.sb
|
||||||
define CAP para.cap
|
define CAP para.cap
|
||||||
define XH para.xheight
|
define XH para.xHeight
|
||||||
define Descender : fallback para.descender (XH - CAP)
|
define Descender : fallback para.descender (XH - CAP)
|
||||||
define Contrast : fallback para.contrast 1
|
define Contrast : fallback para.contrast 1
|
||||||
# Key metrics for symbols
|
# Key metrics for symbols
|
||||||
|
|
|
@ -25,7 +25,7 @@ function applyMetricOverride(para, mo, argv) {
|
||||||
|
|
||||||
const validMetricOverrideFields = new Set([
|
const validMetricOverrideFields = new Set([
|
||||||
"cap",
|
"cap",
|
||||||
"xheight",
|
"xHeight",
|
||||||
"sb",
|
"sb",
|
||||||
"accentWidth",
|
"accentWidth",
|
||||||
"accentClearance",
|
"accentClearance",
|
||||||
|
@ -46,7 +46,9 @@ const validMetricOverrideFields = new Set([
|
||||||
"essRatioUpper",
|
"essRatioUpper",
|
||||||
"essRatioLower",
|
"essRatioLower",
|
||||||
"essRatioQuestion",
|
"essRatioQuestion",
|
||||||
"essRatio"
|
"essRatio",
|
||||||
|
"archDepth",
|
||||||
|
"smallArchDepth"
|
||||||
]);
|
]);
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -12,7 +12,7 @@ naming.description = 'Spatial efficient monospace font family for programming. B
|
||||||
leading = 1250 # Default line height times 1000.
|
leading = 1250 # Default line height times 1000.
|
||||||
descenderPad = 0 # Additional line height, added to descender.
|
descenderPad = 0 # Additional line height, added to descender.
|
||||||
cap = 735 # Cap height (as well as ascender).
|
cap = 735 # Cap height (as well as ascender).
|
||||||
xheight = 520 # X-height.
|
xHeight = 520 # X-height.
|
||||||
#descender = -205 # Depth of descender. Currently unused.
|
#descender = -205 # Depth of descender. Currently unused.
|
||||||
winMetricAscenderPad = 0 # Padding of Win ascnder metrics to avoid clipping. See #343
|
winMetricAscenderPad = 0 # Padding of Win ascnder metrics to avoid clipping. See #343
|
||||||
winMetricDescenderPad = 0 # Padding of Win descender metrics to avoid clipping. See #343
|
winMetricDescenderPad = 0 # Padding of Win descender metrics to avoid clipping. See #343
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue