Skip to content

Commit

Permalink
Add Characters:
Browse files Browse the repository at this point in the history
  - CYRILLIC SMALL LETTER UNBLENDED UK (`U+1C88`) (#1517).
  - CYRILLIC CAPITAL LETTER MONOGRAPH UK (`U+A64A`) (#1517).
  - CYRILLIC SMALL LETTER MONOGRAPH UK (`U+A64B`) (#1517).
  • Loading branch information
be5invis committed May 13, 2023
1 parent 27c894b commit 2874d1a
Show file tree
Hide file tree
Showing 11 changed files with 168 additions and 64 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ end_of_line = lf
trim_trailing_whitespace = true
indent_style = tab
indent_size = 4
insert_final_newline = true

[*.{js,jsx,ts,tsx}]
insert_final_newline = true
Expand All @@ -16,7 +17,6 @@ block_comment_end = */
[*.md]
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = false

# The indent size used in the `package.json` file cannot be changed
Expand Down
4 changes: 4 additions & 0 deletions changes/22.1.3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Add Characters:
- CYRILLIC SMALL LETTER UNBLENDED UK (`U+1C88`) (#1517).
- CYRILLIC CAPITAL LETTER MONOGRAPH UK (`U+A64A`) (#1517).
- CYRILLIC SMALL LETTER MONOGRAPH UK (`U+A64B`) (#1517).
1 change: 1 addition & 0 deletions font-src/glyphs/letter/cyrillic.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export : define [apply] : begin
run-glyph-module "./cyrillic/te-midhook.mjs"
run-glyph-module "./cyrillic/tse.mjs"
run-glyph-module "./cyrillic/tshe.mjs"
run-glyph-module "./cyrillic/lower-uk.mjs"
run-glyph-module "./cyrillic/yat.mjs"
run-glyph-module "./cyrillic/yeri.mjs"
run-glyph-module "./cyrillic/yu.mjs"
Expand Down
9 changes: 6 additions & 3 deletions font-src/glyphs/letter/cyrillic/iotified-a.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,15 @@ glyph-block Letter-Cyrillic-Iotified-A : begin
local xIotifiedBarRight : df.leftSB + HVContrast * df.mvs
local botGap : Math.max ((df.rightSB - df.leftSB) * 0.08) [AdviceStroke 6]
include : difference
WithTransform [ApparentTranslate shift 0] : ALetterShape subDf CAP df.mvs fStraightBar slabKind
intersection [MaskBelow df.mvs] [MaskLeft : mix xIotifiedBarRight [Math.min (subDf.leftSB + shift) (xIotifiedBarRight + botGap)] 0.5]
WithTransform [ApparentTranslate shift 0]
ALetterShape subDf fStraightBar slabKind CAP df.mvs
intersection [MaskBelow df.mvs]
MaskLeft : mix xIotifiedBarRight [Math.min (subDf.leftSB + shift) (xIotifiedBarRight + botGap)] 0.5

include : difference
Iotified.A df CAP [mix df.leftSB df.rightSB (3 / 4)] (CAP / 2) (fCapital -- true)
WithTransform [ApparentTranslate shift 0] [AMaskShape subDf CAP df.mvs fStraightBar slabKind]
WithTransform [ApparentTranslate shift 0]
AMaskShape subDf fStraightBar CAP df.mvs

do "iotified a"
glyph-block-import Letter-Latin-Lower-A : DoubleStorey
Expand Down
37 changes: 37 additions & 0 deletions font-src/glyphs/letter/cyrillic/lower-uk.ptl
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
$$include '../../../meta/macros.ptl'

import [mix linreg clamp fallback] from"../../../support/utils.mjs"

glyph-module

glyph-block Letter-Cyrillic-Lower-Blended-Uk : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives

create-glyph 'cyrl/uk' 0xA64B : glyph-proc
include : MarkSet.b

local kLeftX 0.8
local kLeftY 0.875
local kRightX 1
local kRightY 1
local yCross : mix 0 Ascender 0.45

local stress : AdviceStroke 2.75
local fine : AdviceStroke 3

local smallRingRadius : (0.25 * (RightSB - SB)) + 0.5 * fine
local subDf : DivFrame ((2 * smallRingRadius + 2 * SB) / Width)
local ada : ArchDepthAOf smallRingRadius subDf.width
local adb : ArchDepthBOf smallRingRadius subDf.width

include : dispiro
g4.down.start [mix Middle SB kLeftX] [mix 0 Ascender kLeftY] [widths.lhs.heading stress Downward]
g4 Middle yCross [widths.center stress]
g4 (Middle + smallRingRadius - OX) ada [widths.rhs fine]
arcvh
g4 (Middle + CorrectionOMidX * fine) O
archv
g4 (Middle - smallRingRadius + OX) adb
g4 Middle yCross [widths.center stress]
g4.up.mid [mix Middle RightSB kRightX] [mix 0 Ascender kRightY] [widths.lhs.heading stress Upward]
25 changes: 17 additions & 8 deletions font-src/glyphs/letter/cyrillic/small-yus.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,20 @@ glyph-block Letter-Cyrillic-SmallYus : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared-Shapes : SerifFrame
glyph-block-import Letter-Latin-V : VShape
glyph-block-import Letter-Latin-Upper-A : LambdaShape DeltaShape AMaskShape
glyph-block-import Letter-Cyrillic-Iotified-A : Iotified

define [CyrSmallYusShape df top straightBar _fine] : glyph-proc
local fine : fallback _fine : AdviceStroke 3.3 df.div
include : LambdaShape df top fine straightBar (slab -- false)
include : LambdaShape
df -- df
fBarStraight -- straightBar
top -- top
sw -- fine
slab -- false
include : intersection
HBar.t df.leftSB df.rightSB (top / 2) fine
AMaskShape df top fine straightBar
AMaskShape df straightBar top fine
include : VBar.m df.middle (top / 2) 0 fine

if SLAB : begin
Expand All @@ -28,11 +32,16 @@ glyph-block Letter-Cyrillic-SmallYus : begin
include : tagged 'serifMB' sf.mb.full

define [CyrClosedSmallYusShape df top straightBar _fine] : glyph-proc
local fine : fallback _fine : AdviceStroke 3.3 df.div
include : DeltaShape df top fine straightBar (slab -- false)
local fine : fallback _fine : AdviceStroke 2.75 df.div
include : DeltaShape
df -- df
top -- top
sw -- fine
fBarStraight -- straightBar
slab -- false
include : intersection
HBar.t df.leftSB df.rightSB (top / 2) fine
AMaskShape df top fine straightBar
AMaskShape df straightBar top fine

if SLAB : begin
local sf : SerifFrame.fromDf df top 0 (swSerif -- fine)
Expand All @@ -54,14 +63,14 @@ glyph-block Letter-Cyrillic-SmallYus : begin
create-forked-glyph 'cyrl/smallYus.curly' : CyrSmallYusShape df XH false

create-glyph : glyph-proc
local df : DivFrame para.diversityM 3
local df : DivFrame 1
set-width df.width
include : df.markSet.capital
create-forked-glyph 'cyrl/SmallYusClosed.straight' : CyrClosedSmallYusShape df CAP true
create-forked-glyph 'cyrl/SmallYusClosed.curly' : CyrClosedSmallYusShape df CAP false

create-glyph : glyph-proc
local df : DivFrame 1 3
local df : DivFrame 1
set-width df.width
include : df.markSet.e
create-forked-glyph 'cyrl/smallYusClosed.straight' : CyrClosedSmallYusShape df XH true
Expand Down
4 changes: 2 additions & 2 deletions font-src/glyphs/letter/latin-ext/upper-aa-ao.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ glyph-block Letter-Latin-Upper-AE-OE : begin
define [AHalfShape pShift df top fStraightBar slabKind] : begin
local { subDf shift } : SubDfAndShift pShift df
return : WithTransform [ApparentTranslate shift 0]
ALetterShape subDf top df.mvs fStraightBar slabKind
ALetterShape subDf fStraightBar slabKind top df.mvs

define [AHalfShapeMask pShift df top fStraightBar slabKind] : begin
local { subDf shift } : SubDfAndShift pShift df
return : WithTransform [ApparentTranslate shift 0]
AMaskShape subDf top df.mvs fStraightBar
AMaskShape subDf fStraightBar top df.mvs

define SLAB-NONE 0
define SLAB-TOP 1
Expand Down
50 changes: 32 additions & 18 deletions font-src/glyphs/letter/latin/upper-a.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,16 @@ glyph-block Letter-Latin-Upper-A : begin
glyph-block-import Letter-Shared : SetGrekUpperTonos CreateOgonekComposition
glyph-block-import Letter-Shared-Shapes : SerifFrame
glyph-block-import Letter-Latin-V : VShapeOutline VShape
glyph-block-export LambdaShape AMaskShape DeltaShape

define SLAB-NONE 0
define SLAB-TOP 1
define SLAB-LEFT 2
define SLAB-RIGHT 4

glyph-block-export AMaskShape
define [AMaskShape df top sw barStraight] : new-glyph : glyph-proc
include : VShapeOutline df top sw barStraight
include : FlipAround ([DivFrame df.div].width / 2) (top / 2)
define [AMaskShape] : params [df fBarStraight top sw] : new-glyph : glyph-proc
include : VShapeOutline df fBarStraight top sw
include : FlipAround (df.width / 2) (top / 2)

define [ABarPosition fBaseSlabs top] : mix [if fBaseSlabs Stroke 0] top (XH / 2 / CAP)

Expand All @@ -48,12 +47,12 @@ glyph-block Letter-Latin-Upper-A : begin
: else : HSerif.lt df.middle top [mix MidJutSide LongJut 0.5] sf.swSerif

glyph-block-export ALetterShape
define [ALetterShape] : params [df top sw fStraightBar slabKind] : new-glyph : glyph-proc
include : VShape df top sw fStraightBar
define [ALetterShape] : params [df fStraightBar slabKind top sw] : new-glyph : glyph-proc
include : VShape df fStraightBar top sw
include : FlipAround df.middle (top / 2)
define yBar : ABarPosition [maskBits slabKind : bitOr SLAB-LEFT SLAB-RIGHT] top
include : tagged 'crossBar'
intersection [HBar.t 0 df.width yBar] [AMaskShape df top sw fStraightBar]
intersection [HBar.t 0 df.width yBar] [AMaskShape df fStraightBar top sw]
include : ASerifs df top sw slabKind

foreach { suffix { fStraightBar slabKind } } [Object.entries AConfig] : do
Expand Down Expand Up @@ -93,36 +92,51 @@ glyph-block Letter-Latin-Upper-A : begin
turned 'turnA' 0x2C6F 'A' Middle (CAP / 2)

# Lambda
define [LambdaShape] : params [df top sw barStraight [slab SLAB]] : glyph-proc
include : VShape df top sw barStraight
glyph-block-export LambdaShape
define [LambdaShape] : params [df fBarStraight top sw [slab SLAB]] : glyph-proc
include : VShape df fBarStraight top sw
include : FlipAround df.middle (top / 2)
local sf : SerifFrame.fromDf df top 0
include : NeedSlab slab : composite-proc sf.lb.full sf.rb.full

create-glyph 'grek/Lambda.straight' : composite-proc [MarkSet.capital]
LambdaShape [DivFrame 1] CAP Stroke true
LambdaShape [DivFrame 1] true CAP Stroke
create-glyph 'grek/Lambda.curly' : composite-proc [MarkSet.capital]
LambdaShape [DivFrame 1] CAP Stroke false
LambdaShape [DivFrame 1] false CAP Stroke
create-glyph 'grek/smcpLambda.straight' : composite-proc [MarkSet.e]
LambdaShape [DivFrame 1] XH Stroke true
LambdaShape [DivFrame 1] true XH Stroke
create-glyph 'grek/smcpLambda.curly' : composite-proc [MarkSet.e]
LambdaShape [DivFrame 1] XH Stroke false
LambdaShape [DivFrame 1] false XH Stroke

select-variant 'grek/Lambda' 0x39B
select-variant 'grek/smcpLambda' 0x1D27 (follow -- 'grek/Lambda')
alias 'latinLambda' 0x245 'grek/Lambda'

# Delta
define [DeltaShape df top sw barStraight] : union
LambdaShape df top sw barStraight (slab -- false)
glyph-block-export DeltaShape
define [DeltaShape] : params [df top sw fBarStraight] : union
LambdaShape
df -- df
fBarStraight -- fBarStraight
top -- top
sw -- sw
slab -- false
intersection
HBar.b 0 df.width 0 sw
AMaskShape df top sw barStraight
AMaskShape df fBarStraight top sw

create-glyph 'grek/Delta.straight' : composite-proc [MarkSet.capital]
DeltaShape [DivFrame 1] CAP Stroke true
DeltaShape
df -- [DivFrame 1]
fBarStraight -- true
top -- CAP
sw -- Stroke
create-glyph 'grek/Delta.curly' : composite-proc [MarkSet.capital]
DeltaShape [DivFrame 1] CAP Stroke false
DeltaShape
df -- [DivFrame 1]
fBarStraight -- false
top -- CAP
sw -- Stroke

select-variant 'grek/Delta' 0x394

Expand Down
6 changes: 3 additions & 3 deletions font-src/glyphs/letter/latin/upper-y.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ glyph-block Letter-Latin-Upper-Y : begin
local maskLT : slabType == SLAB-ALL || slabType == SLAB-MOTION
local maskRT : slabType == SLAB-ALL

include : tagged 'strokeLT' : WithSerifOverflowMask maskLT CAP 0 SB RightSB
include : tagged 'strokeLT' : WithSerifOverflowMask maskLT top bot SB RightSB
HalfXStrand bodyType SLAB SB top Middle cross 0.1 0.4 0.28
include : tagged 'strokeRT' : WithSerifOverflowMask maskRT CAP 0 SB RightSB
include : tagged 'strokeRT' : WithSerifOverflowMask maskRT top bot SB RightSB
HalfXStrand bodyType SLAB RightSB top Middle cross 0.1 0.4 0.28
include : VBar.m Middle bot (cross + HalfStroke)
include : tagged 'strokeVMid' : VBar.m Middle bot (cross + HalfStroke)
set-base-anchor 'overlay' Middle cross

define [YenOverlayShape slabType] : glyph-proc
Expand Down
Loading

0 comments on commit 2874d1a

Please sign in to comment.