Skip to content

Commit

Permalink
Improve widths of overlines in Serbian italics. (#2496)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcwilliams403 authored Sep 10, 2024
1 parent 635ad0c commit 9a22719
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 29 deletions.
1 change: 1 addition & 0 deletions changes/31.6.2.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
- Fix Macedonian Cyrillic Gje under italics (#2493).
- Improve widths of overline marks of Serbian italic lower Ghe/Pe/Te.
14 changes: 6 additions & 8 deletions packages/font-glyphs/src/letter/latin/lower-il.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ glyph-block Letter-Latin-Lower-I : begin
glyph-block-import Common-Derivatives
glyph-block-import Mark-Adjustment : LeaningAnchor ExtendBelowBaseAnchors
glyph-block-import Letter-Shared : CreateAccentedComposition CreateMultiAccentedComposition
glyph-block-import Letter-Shared : CreateCommaCaronComposition
glyph-block-import Letter-Shared : CreateTurnedLetter
glyph-block-import Letter-Shared : CreateCommaCaronComposition CreateTurnedLetter
glyph-block-import Letter-Shared-Shapes : FlatHookDepth DiagTail
glyph-block-import Letter-Shared-Shapes : CurlyTail BeltOverlay PalatalHook
glyph-block-import Letter-Shared-Shapes : RetroflexHook LetterBarOverlay RightwardTailedBar
Expand Down Expand Up @@ -265,8 +264,8 @@ glyph-block Letter-Latin-Lower-I : begin
maskOut -- [MaskAbove maskY]

create-glyph "lHighBar.\(suffix)" : glyph-proc
include [refer-glyph "l.\(suffix)"] AS_BASE ALSO_METRICS
local df : DivFrame div
include [refer-glyph "l.\(suffix)"] AS_BASE ALSO_METRICS
include : LetterBarOverlay.m.in [xMiddleT df] XH (Ascender - [if Serif Stroke 0])

create-glyph "grek/tau.\(suffix)" : glyph-proc
Expand All @@ -276,7 +275,6 @@ glyph-block Letter-Latin-Lower-I : begin
include : Body df XH xMiddle
include : Marks df XH xMiddle
include : HBar.t df.leftSB df.rightSB XH

currentGlyph.deleteBaseAnchor 'trailing'

create-glyph "cyrl/Twe/middle.\(suffix)" : glyph-proc
Expand All @@ -288,8 +286,8 @@ glyph-block Letter-Latin-Lower-I : begin

create-glyph "cyrl/twe/middle.\(suffix)" : glyph-proc
local df : include : DivFrame div
include : Body df XH [XMiddle.Center df]
include : Marks df XH [XMiddle.Center df]
include : Body df XH [XMiddle.Center df]
include : Marks df XH [XMiddle.Center df]
currentGlyph.deleteBaseAnchor 'trailing'
set-mark-anchor 'cvDecompose' (df.width / 2) XH

Expand Down Expand Up @@ -319,8 +317,8 @@ glyph-block Letter-Latin-Lower-I : begin
alias 'cyrl/Iota' 0xA646 'latn/Iota'

select-variant 'cyrl/ghe.SRB/base' (shapeFrom -- 'dotlessi') (follow -- 'cyrl/ghe.SRB')
CreateAccentedComposition 'cyrl/ghe.SRB' null 'cyrl/ghe.SRB/base' 'macronAbove'
CreateMultiAccentedComposition 'cyrl/gje.SRB' null 'cyrl/ghe.SRB/base' { 'macronAbove' 'acuteAbove' }
CreateAccentedComposition 'cyrl/ghe.SRB' null 'cyrl/ghe.SRB/base' 'sbRsbOverlineAbove/diversityI'
CreateMultiAccentedComposition 'cyrl/gje.SRB' null 'cyrl/ghe.SRB/base' { 'sbRsbOverlineAbove/diversityI' 'acuteAbove' }

CreateTurnedLetter 'turni' 0x1D09 'i' HalfAdvance (XH / 2)
CreateTurnedLetter 'grek/turniota' 0x2129 'latn/iota' HalfAdvance (XH / 2)
Expand Down
4 changes: 2 additions & 2 deletions packages/font-glyphs/src/letter/latin/lower-m.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,8 @@ glyph-block Letter-Latin-Lower-M : begin
select-variant 'cyrl/shcha/reduced.italic' (shapeFrom -- 'cyrl/shcha.italic') (follow -- 'cyrl/shcha.italic/reduced')
alias 'cyrl/shcha/reduced.BGR' null 'cyrl/shcha/reduced.italic'

derive-composites 'cyrl/te.SRB' null 'cyrl/sha.italic' 'macronAbove'
derive-composites 'cyrl/te/reduced.SRB' null 'cyrl/sha/reduced.italic' 'macronAbove'
derive-composites 'cyrl/te.SRB' null 'cyrl/sha.italic' 'sbRsbOverlineAbove/diversityM'
derive-composites 'cyrl/te/reduced.SRB' null 'cyrl/sha/reduced.italic' 'sbRsbOverlineAbove/diversityM'

glyph-block-import Letter-Blackboard : BBS BBD BBBarLeft
create-glyph 'mathbb/m' 0x1D55E : glyph-proc
Expand Down
34 changes: 17 additions & 17 deletions packages/font-glyphs/src/letter/latin/u.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ glyph-block Letter-Latin-U : begin

derive-glyphs 'cyrl/pe.SRB' null 'cyrl/i.italic' : lambda [src gr] : glyph-proc
include [refer-glyph src] AS_BASE ALSO_METRICS
include [refer-glyph 'macronAbove']
include [refer-glyph 'sbRsbOverlineAbove']

derive-glyphs 'cyrl/tetse.italic' null 'cyrl/tse.italic' : lambda [src gr] : glyph-proc
include [refer-glyph src] AS_BASE ALSO_METRICS
Expand Down Expand Up @@ -418,6 +418,22 @@ glyph-block Letter-Latin-U : begin
if SLAB : begin
include : HSerif.lt SB XH SideJut

CreateAccentedComposition 'uDieresis' 0xFC 'u' 'dieresisAbove'
CreateAccentedComposition 'uLongBarOver' 0x289 'u' 'hStrike'
CreateAccentedComposition 'smcpUStroke' 0x1D7E 'smcpU' 'hStrike'

# Sideways dieresis for U+1D1E
derive-glyphs "uDieresisSidewaysMark" null "dieresisAboveAlwaysUpright" : function [gns] : glyph-proc
local ww : Width * para.diversityM
set-width 0
set-mark-anchor 'cvDecompose' 0 0
include : PointingTo ww XH ww 0 : function [] : glyph-proc
include : refer-glyph gns
include : Translate (XH / 2 + Width / 2) (ww - SB - XH - AccentHeight)
include : Translate 0 (SB / 2)

CreateAccentedComposition 'uDieresisSideways' 0x1D1E 'uDieresisSidewaysBase' 'uDieresisSidewaysMark'

glyph-block-import Letter-Blackboard : BBS BBD BBBarRight
create-glyph 'mathbb/U' 0x1D54C : glyph-proc
include : MarkSet.capital
Expand All @@ -436,19 +452,3 @@ glyph-block Letter-Latin-U : begin
include : df.markSet.e
include [refer-glyph 'mathbb/n']
include : FlipAround Middle (XH / 2)

CreateAccentedComposition 'uDieresis' 0xFC 'u' 'dieresisAbove'
CreateAccentedComposition 'uLongBarOver' 0x289 'u' 'hStrike'
CreateAccentedComposition 'smcpUStroke' 0x1D7E 'smcpU' 'hStrike'

# Sideways dieresis for U+1D1E
derive-glyphs "uDieresisSidewaysMark" null "dieresisAboveAlwaysUpright" : function [gns] : glyph-proc
local ww : Width * para.diversityM
set-width 0
set-mark-anchor 'cvDecompose' 0 0
include : PointingTo ww XH ww 0 : function [] : glyph-proc
include : refer-glyph gns
include : Translate (XH / 2 + Width / 2) (ww - SB - XH - AccentHeight)
include : Translate 0 (SB / 2)

CreateAccentedComposition 'uDieresisSideways' 0x1D1E 'uDieresisSidewaysBase' 'uDieresisSidewaysMark'
28 changes: 26 additions & 2 deletions packages/font-glyphs/src/marks/above.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,8 @@ glyph-block Mark-Above : begin
set-width 0
include : StdAnchors.wide

local leftEnd (markMiddle - markExtend * 1.5)
local rightEnd (markMiddle + markExtend * 1.5)
local leftEnd : markMiddle - markExtend * 1.5
local rightEnd : markMiddle + markExtend * 1.5

include : dispiro
flat leftEnd aboveMarkMid [widths.center : 2 * markHalfStroke]
Expand All @@ -490,6 +490,30 @@ glyph-block Mark-Above : begin
flat (SB - Width) aboveMarkMid [widths.center : 2 * markHalfStroke]
curl (RightSB - Width) aboveMarkMid

create-glyph 'sbRsbOverlineAbove/diversityI' : glyph-proc
local df : DivFrame para.diversityI
set-width 0
include : StdAnchors.impl 'above' 0 (1.5 * df.div)

local leftEnd : markMiddle - (df.rightSB - df.leftSB) / 2
local rightEnd : markMiddle + (df.rightSB - df.leftSB) / 2

include : dispiro
flat leftEnd aboveMarkMid [widths.center : 2 * markHalfStroke]
curl rightEnd aboveMarkMid

create-glyph 'sbRsbOverlineAbove/diversityM' : glyph-proc
local df : DivFrame para.diversityM
set-width 0
include : StdAnchors.impl 'above' 0 (1.5 * df.div)

local leftEnd : markMiddle - (df.rightSB - df.leftSB) / 2
local rightEnd : markMiddle + (df.rightSB - df.leftSB) / 2

include : dispiro
flat leftEnd aboveMarkMid [widths.center : 2 * markHalfStroke]
curl rightEnd aboveMarkMid

create-glyph 'latin1macron' 0xAF : glyph-proc
local df : include : DivFrame 1
include : dispiro
Expand Down

0 comments on commit 9a22719

Please sign in to comment.