Adjusted shape of wave ligations (#959).
This commit is contained in:
parent
63032405bc
commit
33af28c07a
8 changed files with 45 additions and 33 deletions
|
@ -1,2 +0,0 @@
|
|||
* Fix broken shape of horn diacritic and `ww` (#957).
|
||||
* Add turned six-pointed asterisk (#958).
|
|
@ -9,4 +9,6 @@
|
|||
* Add vertical-sides variants of `W` and `w` (#950).
|
||||
* Add cursive capital `Z` (#951).
|
||||
* Add flat-hooked Long S and Eszet (#952).
|
||||
* Add slant-sided `M` (#953).
|
||||
* Add slant-sided `M` (#953).
|
||||
* Add turned six-pointed asterisk (#958).
|
||||
* Adjusted shape of wave ligations (#959).
|
|
@ -605,33 +605,6 @@ glyph-block CommonShapes : begin
|
|||
|
||||
define [ForceUpright] : glyph-proc [set this.gizmo : Translate 0 0]
|
||||
|
||||
define [CreateWaveShape dist sw _phaesShift] : begin
|
||||
define WaveResolution 64
|
||||
define WaveMagnitude : dist * (3 / 4) - sw / 2
|
||||
define WaveAdj : TanSlope * WaveMagnitude * (-0.75)
|
||||
define phaseShift : fallback _phaesShift 0
|
||||
define [WaveShapeImpl] : params [left right ts te xsJoin xfJoin diagJoinS diagJoinF] : glyph-proc
|
||||
local resolution : Math.ceil (WaveResolution * (te - ts))
|
||||
local knots {}
|
||||
foreach [pr : range 0 till resolution] : begin
|
||||
local theta : (phaseShift + [mix ts te (pr / resolution)]) * Math.PI * 2
|
||||
local waveRelY : (-1) * [Math.sin theta] - 0.075 * [Math.sin (theta * 3)]
|
||||
knots.push : g2
|
||||
(WaveAdj * waveRelY) + [mix left right (pr / resolution)]
|
||||
SymbolMid + WaveMagnitude * waveRelY
|
||||
include : dispiro
|
||||
widths.center sw
|
||||
if (xsJoin === nothing) {} : if diagJoinS
|
||||
list [g2 xsJoin SymbolMid]
|
||||
list [straight.right.start xsJoin SymbolMid]
|
||||
begin knots
|
||||
if (xfJoin === nothing) {} : if diagJoinF
|
||||
list [g2 xfJoin SymbolMid]
|
||||
list [straight.right.end xfJoin SymbolMid]
|
||||
|
||||
define [WaveShape] : params [left right xsJoin xfJoin diagJoinS diagJoinF [waveCount 1] [unitWidth Width]] : WaveShapeImpl (unitWidth * -left) (unitWidth * (1 + right)) (-left * waveCount) ((1 + right) * waveCount) xsJoin xfJoin diagJoinS diagJoinF
|
||||
return WaveShape
|
||||
|
||||
define [NameUni unicode] : begin
|
||||
local hex : [unicode.toString 16].toUpperCase
|
||||
while (hex.length < 4) : set hex : '0' + hex
|
||||
|
@ -665,4 +638,4 @@ glyph-block CommonShapes : begin
|
|||
corner [mix x1 x2 (-k)] [mix y1 y2 (-k)]
|
||||
corner [mix x1 x2 (1+k)] [mix y1 y2 (1+k)]
|
||||
|
||||
glyph-block-export Rect SquareAt Ring RingAt DotAt RingStroke RingStrokeAt DotStrokeAt CircleRing CircleRingAt CircleDotAt OShape OShapeOutline OBarLeftShape OBarRightShape LeftwardTopSerif LeftwardBottomSerif RightwardTopSerif RightwardBottomSerif CenterTopSerif CenterBottomSerif DownwardRightSerif UpwardRightSerif DownwardLeftSerif UpwardLeftSerif NeedSlab NeedNotItalic VSerifs HSerifs CyrISerifs HBar HBarTop HBarBottom HOverlayBar VBar VBarLeft VBarRight VerticalHook LegShape LeftHook HooktopLeftBar FlatSlashShape hookstart hookend CyrDescender CyrLeftDescender FlipAround ScaleAround Realign ForceUpright DiagCor CreateWaveShape NameUni PointingTo WithAIHSerifsMask WithTransform clear-anchors OBarLeftToothlessShape OBarLeftRoundedShape OBarRightToothlessShape OBarRightRoundedShape AsRadical ExtLineCenter DiagCorDs HCrossBar VERY-FAR MaskAbove MaskBelow MaskLeft MaskRight
|
||||
glyph-block-export Rect SquareAt Ring RingAt DotAt RingStroke RingStrokeAt DotStrokeAt CircleRing CircleRingAt CircleDotAt OShape OShapeOutline OBarLeftShape OBarRightShape LeftwardTopSerif LeftwardBottomSerif RightwardTopSerif RightwardBottomSerif CenterTopSerif CenterBottomSerif DownwardRightSerif UpwardRightSerif DownwardLeftSerif UpwardLeftSerif NeedSlab NeedNotItalic VSerifs HSerifs CyrISerifs HBar HBarTop HBarBottom HOverlayBar VBar VBarLeft VBarRight VerticalHook LegShape LeftHook HooktopLeftBar FlatSlashShape hookstart hookend CyrDescender CyrLeftDescender FlipAround ScaleAround Realign ForceUpright DiagCor NameUni PointingTo WithAIHSerifsMask WithTransform clear-anchors OBarLeftToothlessShape OBarLeftRoundedShape OBarRightToothlessShape OBarRightRoundedShape AsRadical ExtLineCenter DiagCorDs HCrossBar VERY-FAR MaskAbove MaskBelow MaskLeft MaskRight
|
||||
|
|
|
@ -134,6 +134,7 @@ export all : define [buildGlyphs para recursive recursiveCodes] : begin
|
|||
run-glyph-module './number/index.js'
|
||||
|
||||
# Symbols
|
||||
run-glyph-module './symbol/shared.js'
|
||||
run-glyph-module './symbol/punctuation.js'
|
||||
run-glyph-module './symbol/arrow.js'
|
||||
run-glyph-module './symbol/geometric.js'
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
###### GEOMETRIC SHAPES
|
||||
$$include '../../meta/macros.ptl'
|
||||
|
||||
import '../../support/transform' as Transform
|
||||
|
@ -395,6 +394,7 @@ glyph-block Symbol-Arrow : for-width-kinds WideWidth1
|
|||
|
||||
|
||||
do "Wave arrows"
|
||||
glyph-block-import Shared-Symbol-Shapes : CreateWaveShape
|
||||
define WaveSw arrowSw
|
||||
define WaveShape : CreateWaveShape
|
||||
waveArrowAmplitude * 0.4 + WaveSw / 4 * MosaicWidthScalar
|
||||
|
|
|
@ -80,6 +80,7 @@ glyph-block Symbol-Ligation : begin
|
|||
set currentGlyph.autoRefPriority (-3)
|
||||
|
||||
do "Waves"
|
||||
glyph-block-import Shared-Symbol-Shapes : CreateWaveShape
|
||||
define WaveShape : CreateWaveShape dblArrowD dblArrowSw (-1 / 4)
|
||||
|
||||
define LR (2 / 32)
|
||||
|
|
37
font-src/glyphs/symbol/shared.ptl
Normal file
37
font-src/glyphs/symbol/shared.ptl
Normal file
|
@ -0,0 +1,37 @@
|
|||
$$include '../../meta/macros.ptl'
|
||||
|
||||
import '../../support/transform' as Transform
|
||||
import [mix linreg clamp fallback] from '../../support/utils'
|
||||
import [DesignParameters] from '../../meta/aesthetics'
|
||||
|
||||
glyph-module
|
||||
|
||||
glyph-block Shared-Symbol-Shapes : begin
|
||||
|
||||
glyph-block-export CreateWaveShape
|
||||
define [CreateWaveShape dist sw _phaesShift] : begin
|
||||
define WaveResolution 64
|
||||
define WaveMagnitude : dist * (3 / 4) - sw / 2
|
||||
define WaveAdj : TanSlope * WaveMagnitude * (-0.75)
|
||||
define phaseShift : fallback _phaesShift 0
|
||||
define [WaveShapeImpl] : params [left right ts te xsJoin xfJoin diagJoinS diagJoinF] : glyph-proc
|
||||
local resolution : Math.ceil (WaveResolution * (te - ts))
|
||||
local knots {}
|
||||
foreach [pr : range 0 till resolution] : begin
|
||||
local theta : (phaseShift + [mix ts te (pr / resolution)]) * Math.PI * 2
|
||||
local waveRelY : [Math.sin theta] + 0.075 * [Math.sin (theta * 3)]
|
||||
knots.push : g2
|
||||
(WaveAdj * waveRelY) + [mix left right (pr / resolution)]
|
||||
SymbolMid + WaveMagnitude * waveRelY
|
||||
include : dispiro
|
||||
widths.center sw
|
||||
if (xsJoin === nothing) {} : if diagJoinS
|
||||
list [g2 xsJoin SymbolMid]
|
||||
list [straight.right.start xsJoin SymbolMid]
|
||||
begin knots
|
||||
if (xfJoin === nothing) {} : if diagJoinF
|
||||
list [g2 xfJoin SymbolMid]
|
||||
list [straight.right.end xfJoin SymbolMid]
|
||||
|
||||
define [WaveShape] : params [left right xsJoin xfJoin diagJoinS diagJoinF [waveCount 1] [unitWidth Width]] : WaveShapeImpl (unitWidth * -left) (unitWidth * (1 + right)) (-left * waveCount) ((1 + right) * waveCount) xsJoin xfJoin diagJoinS diagJoinF
|
||||
return WaveShape
|
|
@ -139,7 +139,7 @@ define-macro glyph-block-import : syntax-rules
|
|||
UpwardLeftSerif NeedSlab NeedNotItalic VSerifs HSerifs CyrISerifs HBar
|
||||
HBarTop HBarBottom HOverlayBar VBar VBarLeft VBarRight VerticalHook LegShape LeftHook
|
||||
HooktopLeftBar FlatSlashShape hookstart hookend CyrDescender CyrLeftDescender FlipAround
|
||||
ScaleAround Realign ForceUpright DiagCor CreateWaveShape NameUni PointingTo
|
||||
ScaleAround Realign ForceUpright DiagCor NameUni PointingTo
|
||||
WithAIHSerifsMask WithTransform clear-anchors OBarLeftToothlessShape
|
||||
OBarLeftRoundedShape OBarRightToothlessShape OBarRightRoundedShape AsRadical
|
||||
ExtLineCenter DiagCorDs HCrossBar VERY-FAR MaskAbove MaskBelow MaskLeft MaskRight]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue