Skip to content

Commit

Permalink
Misc (minor) extended latin/cyrillic character tweaks. (#2621)
Browse files Browse the repository at this point in the history
* Make Cyrillic Lower Yn respond to italics.

* Harmonize serifs of upright Sakha Yat with Pe.

* Make Vertical Sides variant of `ww` narrower.
  • Loading branch information
jmcwilliams403 authored Dec 22, 2024
1 parent 476d5bd commit 5827190
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 33 deletions.
4 changes: 2 additions & 2 deletions packages/font-glyphs/src/letter/cyrillic/yat.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ glyph-block Letter-Cyrillic-Yat : begin

local cTop : if SLAB (top - Stroke / 2) top

local _xCrossbarLeft : mix 0 df.leftSB [if SLAB 0.25 0.375]
local _xCrossbarLeft : mix 0 df.leftSB : if SLAB 0.25 0.375
local xCrossbarLeft : fallback xCrossbarLeftOverride _xCrossbarLeft
local xCrossbarRight : mix _xCrossbarLeft (xYeriLeft + [HSwToV : 0.5 * sw]) 2
local yCrossbar : fallback yCrossbarOverride : [mix (top * pBar + sw / 2) cTop [if SLAB 0.625 0.5]] + 0.25 * OverlayStroke
local yCrossbar : fallback yCrossbarOverride : [mix (top * pBar + sw / 2) cTop : if SLAB 0.625 0.5] + 0.25 * OverlayStroke
include : HBar.t xCrossbarLeft xCrossbarRight yCrossbar OverlayStroke

if SLAB : begin
Expand Down
32 changes: 16 additions & 16 deletions packages/font-glyphs/src/letter/greek/upper-lambda-delta.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ glyph-block Letter-Latin-Upper-Lambda-Delta : begin
glyph-block-import Letter-Latin-Upper-A : AShape ASerifs
glyph-block-import Letter-Latin-V : VShapeOutline VShape VHookRightShape

define SLAB-NONE 0
define SLAB-TOP 1
define SLAB-LEFT 2
define SLAB-RIGHT 4
define SLAB-CYRL-BGR 8
define SLAB-NONE 0
define SLAB-TOP 1
define SLAB-LEFT 2
define SLAB-RIGHT 4
define SLAB-SMALL-CYRL 8

define LambeaConfig : SuffixCfg.weave
define LambdaConfig : SuffixCfg.weave
object
straight true
curly false
Expand Down Expand Up @@ -49,16 +49,16 @@ glyph-block Letter-Latin-Upper-Lambda-Delta : begin
local-parameter : hookWidthOuter -- (TailX / 3)
local-parameter : hookWidthInner -- (TailX / 3)
include : VHookRightShape
df -- df
fBarStraight -- fBarStraight
top -- top
sw -- sw
df -- df
fBarStraight -- fBarStraight
top -- top
sw -- sw
hookWidthOuter -- hookWidthOuter
hookWidthInner -- hookWidthInner
include : FlipAround df.middle (top / 2)
include : ASerifs df top sw [maskOffBits slabKind SLAB-LEFT]

foreach { suffix { fStraightBar slabKind } } [Object.entries LambeaConfig] : do
foreach { suffix { fStraightBar slabKind } } [Object.entries LambdaConfig] : do
create-glyph "grek/Lambda.\(suffix)" : glyph-proc
include : MarkSet.capital
include : LambdaShape
Expand All @@ -82,7 +82,7 @@ glyph-block Letter-Latin-Upper-Lambda-Delta : begin
include : LambdaShape
df -- [DivFrame 1]
fBarStraight -- fStraightBar
slabKind -- [bitOr slabKind SLAB-CYRL-BGR]
slabKind -- [bitOr slabKind SLAB-SMALL-CYRL]
top -- XH
sw -- Stroke

Expand Down Expand Up @@ -115,7 +115,7 @@ glyph-block Letter-Latin-Upper-Lambda-Delta : begin
include : LambdaHookLeftShape
df -- df
fBarStraight -- fStraightBar
slabKind -- slabKind
slabKind -- [bitOr slabKind SLAB-SMALL-CYRL]
top -- XH
sw -- df.mvs
hookWidthInner -- (TailX / 3 - [HSwToV : 0.25 * df.mvs])
Expand Down Expand Up @@ -205,10 +205,10 @@ glyph-block Letter-Latin-Upper-Lambda-Delta : begin

derive-glyphs 'cyrl/De.BGR' null 'grek/Delta' : function [src gr] : glyph-proc
include [refer-glyph src] AS_BASE ALSO_METRICS
local descenderOverflow : if SLAB SideJut ((RightSB - SB) * 0.075)
local descenderOverflow : if SLAB SideJut : (RightSB - SB) * 0.075
local xCutLeft SB
local xCutRight RightSB
include : HBar.b (xCutLeft - descenderOverflow) (xCutRight + descenderOverflow) 0
include : VBar.l (xCutLeft - descenderOverflow) (-LongVJut + HalfStroke) Stroke
include : HBar.b (xCutLeft - descenderOverflow) (xCutRight + descenderOverflow) 0
include : VBar.l (xCutLeft - descenderOverflow) (-LongVJut + HalfStroke) Stroke
include : VBar.r (xCutRight + descenderOverflow) (-LongVJut + HalfStroke) Stroke

9 changes: 5 additions & 4 deletions packages/font-glyphs/src/letter/latin-ext/sakha-yat.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,20 @@ glyph-module
glyph-block Letter-Latin-Sakha-Yat : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared-Shapes : SerifFrame
glyph-block-import Letter-Latin-Lower-M : MEnoughSpaceForFullSerifs
glyph-block-import Letter-Cyrillic-Yeri : YeriConfig
glyph-block-import Letter-Cyrillic-Iotified-A : Iotified

define [SakhaYatShape Yeri df top] : glyph-proc
local jut : Math.min Jut : Jut * 0.75 * df.div
include : Yeri top
left -- (df.middle - [HSwToV : 0.5 * df.mvs])
right -- df.rightSB
stroke -- df.mvs
jut -- jut
jut -- [Math.min Jut : Jut * 0.75 * df.div]

include : Iotified.outer df top (df.middle + [HSwToV : 0.5 * df.mvs]) (top - df.mvs * 0.5)
local fEnoughSpaceForFullSerifs : MEnoughSpaceForFullSerifs df
if [not fEnoughSpaceForFullSerifs] : eject-contour 'serifYeriLB'
include : Iotified.[if fEnoughSpaceForFullSerifs 'full' 'outer'] df top (df.middle + [HSwToV : 0.5 * df.mvs]) (top - df.mvs * 0.5)

foreach { suffix { Uc Lc } } [Object.entries YeriConfig] : do
create-glyph "latn/yatSakha.upright.\(suffix)" : glyph-proc
Expand Down
20 changes: 10 additions & 10 deletions packages/font-glyphs/src/letter/latin/upper-a.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ glyph-block Letter-Latin-Upper-A : begin
glyph-block-import Letter-Shared-Shapes : SerifFrame
glyph-block-import Letter-Latin-V : VShapeOutline VShape VCornerHalfWidth

define BODY-CURLY 0
define BODY-STRAIGHT 1
define BODY-ROUND-TOP 2
define BODY-CURLY 0
define BODY-STRAIGHT 1
define BODY-ROUND-TOP 2

define SLAB-NONE 0
define SLAB-TOP 1
define SLAB-LEFT 2
define SLAB-RIGHT 4
define SLAB-CYRL-BGR 8
define SLAB-NONE 0
define SLAB-TOP 1
define SLAB-LEFT 2
define SLAB-RIGHT 4
define SLAB-SMALL-CYRL 8

glyph-block-export AShape
define AShape : namespace
Expand Down Expand Up @@ -122,9 +122,9 @@ glyph-block Letter-Latin-Upper-A : begin
define [ASerifs df top sw slabKind] : glyph-proc : begin
local sf : SerifFrame.fromDf df top 0
if [maskBits slabKind SLAB-LEFT] : include
if ([maskBits slabKind SLAB-CYRL-BGR] && para.isItalic) sf.lb.outer sf.lb.full
if ([maskBits slabKind SLAB-SMALL-CYRL] && para.isItalic) sf.lb.outer sf.lb.full
if [maskBits slabKind SLAB-RIGHT] : include
if ([maskBits slabKind SLAB-CYRL-BGR] && para.isItalic) sf.rb.outer sf.rb.full
if ([maskBits slabKind SLAB-SMALL-CYRL] && para.isItalic) sf.rb.outer sf.rb.full
if [maskBits slabKind SLAB-TOP] : include : intersection [MaskLeft df.middle]
if [maskBits slabKind : bitOr SLAB-LEFT SLAB-RIGHT]
: then : HSerif.lt df.middle top (MidJutSide + [HSwToV : 0.25 * sw]) sf.swSerif
Expand Down
2 changes: 1 addition & 1 deletion packages/font-glyphs/src/letter/latin/w.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ glyph-block Letter-Latin-W : begin
include : implT df XH bodyType slabType

create-glyph "ww.\(suffix)": glyph-proc
local df : include : DivFrame 1 3
local df : include : DivFrame [if (Ldiv / para.diversityM < 1) para.diversityF 1] 3
include : df.markSet.capital

local gap : CAP * 0.05
Expand Down

0 comments on commit 5827190

Please sign in to comment.