Make essRatio overridable
This commit is contained in:
parent
d9c60a27ae
commit
09bc50a54c
4 changed files with 8 additions and 6 deletions
|
@ -3040,6 +3040,7 @@ Subsection `metric-override` provides ability to override certain metric values,
|
||||||
| `powerlineScaleX`, `powerlineScaleY` | (*ratio*) | 1 | X and Y scale of Powerline glyphs. |
|
| `powerlineScaleX`, `powerlineScaleY` | (*ratio*) | 1 | X and Y scale of Powerline glyphs. |
|
||||||
| `powerlineShiftX`, `powerlineShiftY` | emu | 0 | X and Y shift of Powerline glyphs. |
|
| `powerlineShiftX`, `powerlineShiftY` | emu | 0 | X and Y shift of Powerline glyphs. |
|
||||||
| `onumZeroHeightRatio` | (*ratio*) | 1.145 | Ratio of height of `0` under `onum` feature, to the height of `x`. |
|
| `onumZeroHeightRatio` | (*ratio*) | 1.145 | Ratio of height of `0` under `onum` feature, to the height of `x`. |
|
||||||
|
| `essRatio` | (*ratio*) | (*varies, 1.12 for Regular*) | Ratio of the thickness of the neck of `S`/`s`, to the normal stroke width. |
|
||||||
|
|
||||||
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,8 +129,8 @@ export : define [calculateMetrics para] : begin
|
||||||
define WideWidth3 : if (para.spacing >= 3) WideWidth0 Width
|
define WideWidth3 : if (para.spacing >= 3) WideWidth0 Width
|
||||||
define WideWidth4 : if (para.spacing >= 4) WideWidth0 Width
|
define WideWidth4 : if (para.spacing >= 4) WideWidth0 Width
|
||||||
|
|
||||||
define Ess : Stroke * [fallback para.essx Contrast]
|
define Ess : Stroke * [fallback para.essRatio Contrast]
|
||||||
define EssQuestion : Stroke * [fallback para.essxq Contrast]
|
define EssQuestion : Stroke * [fallback para.essRatioq Contrast]
|
||||||
define HalfStroke : Stroke / 2
|
define HalfStroke : Stroke / 2
|
||||||
define RightSB : Width - SB
|
define RightSB : Width - SB
|
||||||
define Middle : Width / 2
|
define Middle : Width / 2
|
||||||
|
|
|
@ -42,7 +42,8 @@ const validMetricOverrideFields = new Set([
|
||||||
"powerlineScaleX",
|
"powerlineScaleX",
|
||||||
"powerlineShiftY",
|
"powerlineShiftY",
|
||||||
"powerlineShiftX",
|
"powerlineShiftX",
|
||||||
"onumZeroHeightRatio"
|
"onumZeroHeightRatio",
|
||||||
|
"essRatio"
|
||||||
]);
|
]);
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -6,7 +6,7 @@ canonicalStrokeWidthMax = 108 # sync with 900 entry below
|
||||||
stroke = 70 # Primary stroke width
|
stroke = 70 # Primary stroke width
|
||||||
contrast = 1.11 # Stroke width contrast
|
contrast = 1.11 # Stroke width contrast
|
||||||
sb = 64 # Primary sidebearings
|
sb = 64 # Primary sidebearings
|
||||||
essx = 1.12 # Proportion of widen of center of "S"
|
essRatio = 1.12 # Proportion of widen of center of "S"
|
||||||
dotSize = 125 # Size of dots
|
dotSize = 125 # Size of dots
|
||||||
periodSize = 140 # Size of period
|
periodSize = 140 # Size of period
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ vtipfineSlab = 0.9
|
||||||
stroke = 18
|
stroke = 18
|
||||||
contrast = 1.08
|
contrast = 1.08
|
||||||
sb = 72
|
sb = 72
|
||||||
essx = 1.12
|
essRatio = 1.12
|
||||||
dotSize = 53
|
dotSize = 53
|
||||||
periodSize = 55
|
periodSize = 55
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ stroke = 96
|
||||||
stroke = 114
|
stroke = 114
|
||||||
contrast = 1.20
|
contrast = 1.20
|
||||||
sb = 56
|
sb = 56
|
||||||
essx = 1.05
|
essRatio = 1.05
|
||||||
dotSize = 180
|
dotSize = 180
|
||||||
periodSize = 200
|
periodSize = 200
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue