parent
6268b4556e
commit
e38fff51a3
3 changed files with 30 additions and 29 deletions
|
@ -4,3 +4,4 @@
|
||||||
* Optimize glyph shape for `U+01A6`.
|
* Optimize glyph shape for `U+01A6`.
|
||||||
* Make Aile and Etoile use {`six`|`nine`}.`closed-contour` by default.
|
* Make Aile and Etoile use {`six`|`nine`}.`closed-contour` by default.
|
||||||
* Make `ss20` use `seven`.`curly-serifless` by default.
|
* Make `ss20` use `seven`.`curly-serifless` by default.
|
||||||
|
* Adjust balancing of r with corner hooks (#2394).
|
||||||
|
|
|
@ -15,6 +15,8 @@ glyph-block Letter-Latin-Lower-R : begin
|
||||||
|
|
||||||
local dfN : DivFrame 1
|
local dfN : DivFrame 1
|
||||||
local dfR : DivFrame para.diversityF
|
local dfR : DivFrame para.diversityF
|
||||||
|
|
||||||
|
# Modes
|
||||||
local rStraight 0
|
local rStraight 0
|
||||||
local rSerifed 1
|
local rSerifed 1
|
||||||
local rNarrow 2
|
local rNarrow 2
|
||||||
|
@ -28,17 +30,15 @@ glyph-block Letter-Latin-Lower-R : begin
|
||||||
local stroke : fallback _stroke Stroke
|
local stroke : fallback _stroke Stroke
|
||||||
local strokeA : mix strokeBar stroke 0.5
|
local strokeA : mix strokeBar stroke 0.5
|
||||||
local { rBalanceMultiplier rHookMultiplier rHookSwMultiplier rSerifLeftExtender hookSuperness } : match mode
|
local { rBalanceMultiplier rHookMultiplier rHookSwMultiplier rSerifLeftExtender hookSuperness } : match mode
|
||||||
[Just rStraight] { 1 1 0 0 2.35 }
|
[Just rStraight] { 1 1 0 0 2.35 }
|
||||||
[Just rSerifed] { (4 / 3) (2 / 3) (1 / 4) (1 / 3) 2.35 }
|
[Just rSerifed] { (4 / 3) (2 / 3) (1 / 4) (1 / 3) 2.35 }
|
||||||
[Just rNarrow] { (2 * (df.div - 0.5)) 1 0 0 2.35 }
|
[Just rNarrow] { (2 * (df.div - 0.5)) 1 0 0 2.35 }
|
||||||
[Just rNarrowSerifed] { (5 / 8 * df.div) (3 / 4) 0 (1 / 2 * [Math.max 0 : mix 1 df.div 4]) 2.35 }
|
[Just rNarrowSerifed] { (2 * (df.div - 0.5)) 1 0 0 2.35 }
|
||||||
[Just rCornerHooked] { (2 * (df.div - 0.5)) 1 0 0 2.35 }
|
[Just rCornerHooked] { (5 / 8) 1 0 0 2.35 }
|
||||||
[Just rCornerHookedSerifed] { (4 / 3) (2 / 3) (1 / 4) (1 / 3) 2.35 }
|
[Just rCornerHookedSerifed] { (4 / 3) (2 / 3) (1 / 4) (1 / 3) 2.35 }
|
||||||
[Just rEarless] { 1 1 0 0 2.35 }
|
[Just rEarless] { 1 1 0 0 2.35 }
|
||||||
|
|
||||||
export : local xBar : match mode
|
export : local xBar : df.leftSB + RBalance * rBalanceMultiplier + [HSwToV strokeBar]
|
||||||
[Just rNarrowSerifed] : df.middle + [HSwToV : 0.5 * strokeBar] - RBalance * rBalanceMultiplier
|
|
||||||
__ : df.leftSB + RBalance * rBalanceMultiplier + [HSwToV strokeBar]
|
|
||||||
local rSerifX : xBar - [HSwToV : 0.5 * strokeBar]
|
local rSerifX : xBar - [HSwToV : 0.5 * strokeBar]
|
||||||
local rSerifLeftJut : SideJut + RBalance * (0.3 + rSerifLeftExtender)
|
local rSerifLeftJut : SideJut + RBalance * (0.3 + rSerifLeftExtender)
|
||||||
local rSerifRightJut : rSerifLeftJut * 1.20
|
local rSerifRightJut : rSerifLeftJut * 1.20
|
||||||
|
@ -55,13 +55,11 @@ glyph-block Letter-Latin-Lower-R : begin
|
||||||
export : local fine ShoulderFine
|
export : local fine ShoulderFine
|
||||||
export : local rHookX : df.rightSB + RBalance2 * rBalanceMultiplier - (OX - O)
|
export : local rHookX : df.rightSB + RBalance2 * rBalanceMultiplier - (OX - O)
|
||||||
export : local xArchMiddle : match mode
|
export : local xArchMiddle : match mode
|
||||||
[Just rStraight] : mix (xBar - fine) rHookX (0.54 + 2 * TanSlope * strokeBar / Width)
|
[Just rStraight] : mix (xBar - fine) rHookX (0.54 + 2 * TanSlope * strokeBar / Width)
|
||||||
[Just rSerifed] : mix (xBar - fine) rHookX (0.59 + 2 * TanSlope * strokeBar / Width)
|
[Just rSerifed] : mix (xBar - fine) rHookX (0.59 + 2 * TanSlope * strokeBar / Width)
|
||||||
[Just rNarrow] : mix df.width rHookX : Math.max 1.01 (5 / 4 * [mix 1 dfR.div 2])
|
([Just rNarrow] || [Just rNarrowSerifed]) : mix df.width rHookX : Math.max 1.01 (5 / 4 * [mix 1 dfR.div 2])
|
||||||
[Just rNarrowSerifed] : Math.min ([mix df.width rHookX df.div] - TINY) : xBar + RHook * 1.25 * df.div
|
([Just rCornerHooked] || [Just rCornerHookedSerifed]) : rHookX - [HSwToV : 0.5 * strokeBar]
|
||||||
[Just rCornerHooked] : rHookX - [HSwToV : 0.5 * strokeBar]
|
[Just rEarless] : mix (xBar - [HSwToV strokeBar]) rHookX 0.5
|
||||||
[Just rCornerHookedSerifed] : rHookX - [HSwToV : 0.5 * strokeBar]
|
|
||||||
[Just rEarless] : mix (xBar - [HSwToV strokeBar]) rHookX 0.5
|
|
||||||
local mixpin : match mode
|
local mixpin : match mode
|
||||||
([Just rSerifed] || [Just rCornerHooked] || [Just rCornerHookedSerifed]) : begin
|
([Just rSerifed] || [Just rCornerHooked] || [Just rCornerHookedSerifed]) : begin
|
||||||
0.65 + 0.25 * strokeA / Width + 4 * TanSlope * strokeA / Width
|
0.65 + 0.25 * strokeA / Width + 4 * TanSlope * strokeA / Width
|
||||||
|
@ -175,14 +173,14 @@ glyph-block Letter-Latin-Lower-R : begin
|
||||||
define SmallRConfig : SuffixCfg.weave
|
define SmallRConfig : SuffixCfg.weave
|
||||||
# Body
|
# Body
|
||||||
object
|
object
|
||||||
'' { StandardShape dfN rStraight }
|
'' { StandardShape dfN rStraight rSerifed }
|
||||||
earlessCorner { EarlessCornerShape dfN rEarless }
|
earlessCorner { EarlessCornerShape dfN rEarless rEarless }
|
||||||
earlessRounded { EarlessRoundedShape dfN rEarless }
|
earlessRounded { EarlessRoundedShape dfN rEarless rEarless }
|
||||||
hookless { CompactShape dfN rNarrow }
|
hookless { CompactShape dfN rNarrow rNarrowSerifed }
|
||||||
cornerHooked { CornerHookShape dfN rCornerHooked }
|
cornerHooked { CornerHookShape dfN rCornerHooked rCornerHookedSerifed }
|
||||||
compact { CompactShape dfR rNarrow }
|
compact { CompactShape dfR rNarrow rNarrowSerifed }
|
||||||
hooklessFlap { FlapHooklessShape dfN rNarrow }
|
hooklessFlap { FlapHooklessShape dfN rNarrow rNarrowSerifed }
|
||||||
compactFlap { FlapHooklessShape dfR rNarrow }
|
compactFlap { FlapHooklessShape dfR rNarrow rNarrowSerifed }
|
||||||
|
|
||||||
# Serifs
|
# Serifs
|
||||||
object
|
object
|
||||||
|
@ -191,7 +189,8 @@ glyph-block Letter-Latin-Lower-R : begin
|
||||||
baseSerifed { 0 1 }
|
baseSerifed { 0 1 }
|
||||||
serifed { 1 1 }
|
serifed { 1 1 }
|
||||||
|
|
||||||
foreach { suffix { {F df mode} {doTS doBS} } } [pairs-of SmallRConfig] : do
|
foreach { suffix { {F df modeSans modeSerifed} {doTS doBS} } } [pairs-of SmallRConfig] : do
|
||||||
|
local mode : if (doTS || doBS) modeSerifed modeSans
|
||||||
create-glyph "r.\(suffix)" : glyph-proc
|
create-glyph "r.\(suffix)" : glyph-proc
|
||||||
set-width df.width
|
set-width df.width
|
||||||
include : df.markSet.e
|
include : df.markSet.e
|
||||||
|
|
|
@ -25,8 +25,9 @@ define [buildGSUB para glyphStore markGlyphs] : begin
|
||||||
|
|
||||||
# NWID / WWID
|
# NWID / WWID
|
||||||
if para.enableNwidWwid : begin
|
if para.enableNwidWwid : begin
|
||||||
buildGrFeature gsub glyphStore Gr.Nwid [if para.isQuasiProportional Gr.IsCompositeOrLigature null]
|
local grIgnore : if para.isQuasiProportional Gr.IsCompositeOrLigature null
|
||||||
buildGrFeature gsub glyphStore Gr.Wwid [if para.isQuasiProportional Gr.IsCompositeOrLigature null]
|
buildGrFeature gsub glyphStore Gr.Nwid grIgnore
|
||||||
|
buildGrFeature gsub glyphStore Gr.Wwid grIgnore
|
||||||
|
|
||||||
# lnum / onum
|
# lnum / onum
|
||||||
buildGrFeature gsub glyphStore Gr.Lnum
|
buildGrFeature gsub glyphStore Gr.Lnum
|
||||||
|
@ -74,7 +75,7 @@ define [buildGSUB para glyphStore markGlyphs] : begin
|
||||||
|
|
||||||
# TXTR, "texture" feature
|
# TXTR, "texture" feature
|
||||||
if (para.buildTextureFeature && !para.isQuasiProportional) : begin
|
if (para.buildTextureFeature && !para.isQuasiProportional) : begin
|
||||||
buildGsubTexture gsub glyphStore markGlyphs cvs
|
buildGsubTexture gsub glyphStore markGlyphs cvs
|
||||||
|
|
||||||
gsub.finalize
|
gsub.finalize
|
||||||
return gsub
|
return gsub
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue