Refine shape of U+A666 and U+A667 (#1838).
This commit is contained in:
parent
a3a856c3e4
commit
f7a80d60d2
3 changed files with 32 additions and 15 deletions
|
@ -28,6 +28,11 @@ glyph-block Letter-Latin-Upper-M : begin
|
|||
local xLeftTop : df.leftSB + top * sidesSlope
|
||||
local xRightTop : df.rightSB - top * sidesSlope
|
||||
|
||||
local fHasBottomInnerSerif : match slabType
|
||||
[Just SLAB-FULL] true
|
||||
[Just SLAB-AUTO] SLAB
|
||||
__ false
|
||||
|
||||
local swSideBot : match form
|
||||
[Just FORM-SAN-SMALL] : AdviceStroke 2.5 df.div
|
||||
[Just FORM-SAN] : AdviceStroke 2.5 df.div
|
||||
|
@ -45,7 +50,7 @@ glyph-block Letter-Latin-Upper-M : begin
|
|||
[Just FORM-SAN] : top * 0.55
|
||||
[Just FORM-TURN-W] : top * 0.45
|
||||
[Just FORM-HANGING] : top * 0.3 / (kMidHang * kMidHang)
|
||||
__ : if SLAB Stroke 0
|
||||
__ : if fHasBottomInnerSerif swSideBot 0
|
||||
local kMidShift : match form
|
||||
[Just FORM-FLAT] 0.75
|
||||
__ 0.5
|
||||
|
@ -69,8 +74,8 @@ glyph-block Letter-Latin-Upper-M : begin
|
|||
flat (xRightTop - kMidShift * swSideTop * HVContrast) top [widths.rhs.heading swMiddle Downward]
|
||||
curl (df.middle + 0.5 * swMiddleShrunk * HVContrast) middleY [widths.rhs.heading swMiddleShrunk Downward]
|
||||
|
||||
local sfT : SerifFrame top 0 xLeftTop xRightTop (swRef -- swSideBot) (hSplit -- 3)
|
||||
local sfB : SerifFrame top 0 df.leftSB df.rightSB (swRef -- swSideBot) (hSplit -- 3)
|
||||
local sfT : SerifFrame top 0 xLeftTop xRightTop (swRef -- swSideBot) (hSplit -- 3) (fForceSymmetric -- (form !== FORM-FLAT))
|
||||
local sfB : SerifFrame top 0 df.leftSB df.rightSB (swRef -- swSideBot) (hSplit -- 3) (fForceSymmetric -- (form !== FORM-FLAT))
|
||||
include : match slabType
|
||||
[Just SLAB-NONE] : no-shape
|
||||
[Just SLAB-FULL] : composite-proc sfT.lt.outer sfT.rt.outer sfB.lb.full sfB.rb.full
|
||||
|
|
|
@ -590,15 +590,16 @@ glyph-block Letter-Shared-Shapes : begin
|
|||
Math.min jut (0.5 * ink + [Math.max (Stroke * TanSlope) (0.375 * gap)])
|
||||
|
||||
class CSerifFrame
|
||||
public [new top bot left right swRef swSerif div hSplit] : begin
|
||||
set this.top top
|
||||
set this.bot bot
|
||||
set this.left left
|
||||
set this.right right
|
||||
set this.swRef swRef
|
||||
set this.swSerif swSerif
|
||||
set this.div div
|
||||
set this.hSplit hSplit
|
||||
public [new top bot left right swRef swSerif div hSplit fForceSymmetric] : begin
|
||||
set this.top top
|
||||
set this.bot bot
|
||||
set this.left left
|
||||
set this.right right
|
||||
set this.swRef swRef
|
||||
set this.swSerif swSerif
|
||||
set this.div div
|
||||
set this.hSplit hSplit
|
||||
set this.fForceSymmetric fForceSymmetric
|
||||
|
||||
local ink : HVContrast * swRef
|
||||
local gap : (right - left - hSplit * ink) / (hSplit - 1)
|
||||
|
@ -608,7 +609,7 @@ glyph-block Letter-Shared-Shapes : begin
|
|||
local jut : mix (0.5 * HVContrast * swRef) Jut [Math.min 1 : div * 2.25 / hSplit]
|
||||
local sideJut : jut - 0.5 * ink
|
||||
|
||||
local jutIn : JutIn left right jut swRef hSplit
|
||||
local jutIn : if fForceSymmetric jut : JutIn left right jut swRef hSplit
|
||||
local sideJutIn : jutIn - 0.5 * ink
|
||||
|
||||
local lBarCenter : left + 0.5 * ink
|
||||
|
@ -661,8 +662,18 @@ glyph-block Letter-Shared-Shapes : begin
|
|||
return : new CSerifFrame this.top this.bot l1 r1 this.swRef this.swSerif this.div (r - l + 1)
|
||||
|
||||
glyph-block-export SerifFrame
|
||||
define [SerifFrame] : with-params [top bot left right [swRef Stroke] [swSerif swRef] [div 1] [hSplit 2]] : begin
|
||||
return : new CSerifFrame top bot left right swRef swSerif div hSplit
|
||||
define [SerifFrame] : begin
|
||||
postulate
|
||||
top
|
||||
bot
|
||||
left
|
||||
right
|
||||
swRef -- Stroke
|
||||
swSerif -- swRef
|
||||
div -- 1
|
||||
hSplit -- 2
|
||||
fForceSymmetric -- false
|
||||
return : new CSerifFrame top bot left right swRef swSerif div hSplit fForceSymmetric
|
||||
|
||||
define SerifFrame.fromDf : function [] : with-params [df top bot [swSerif df.mvs]] : begin
|
||||
return : SerifFrame top bot df.leftSB df.rightSB
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue