Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more character overrides to two Latin locales. #2499

Merged
merged 3 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changes/31.7.0.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
* Fix Macedonian Cyrillic Gje under italics (#2493).
* Improve widths of overline marks of Serbian italic lower Ghe/Pe/Te.
* Remove crossbar variants for `Z`/`z` when under Polish locale (`PLK`).
jmcwilliams403 marked this conversation as resolved.
Show resolved Hide resolved
* Make serif variants for Latin Capital/Small Schwa (`Ə`/`ə`) only appear under Turkic (Turkish/Azerbaijani/etc.) locales (`TRK`, `AZE`, `GAG`, `KAZ`, `TAT`, `CRT`).
jmcwilliams403 marked this conversation as resolved.
Show resolved Hide resolved
* Add Characters:
- COUNTING ROD UNIT DIGIT ONE (`U+1D360`) ... COUNTING ROD TENS DIGIT NINE (`U+1D371`).
- COMPOSITION SYMBOL (`U+2384`).
Expand Down
1 change: 1 addition & 0 deletions packages/font-glyphs/src/letter/cyrillic/orthography.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ glyph-block Letter-Cyrillic-Orthography : begin
orthographic-italic 'cyrl/dche' 0x52D
orthographic-italic 'cyrl/teTall' 0x1C84
orthographic-italic 'cyrl/teThreeLeg' 0x1C85
orthographic-italic 'cyrl/este' null
orthographic-italic 'cyrl/tseRev' 0xA661
orthographic-italic 'cyrl/dzze' 0xA689
orthographic-italic 'cyrl/teMidHook' 0xA68B
Expand Down
8 changes: 0 additions & 8 deletions packages/font-glyphs/src/letter/latin-ext/orthography.ptl

This file was deleted.

4 changes: 2 additions & 2 deletions packages/font-glyphs/src/letter/latin.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ export : define [apply] : begin
run-glyph-module "./latin/lower-y.mjs"
run-glyph-module "./latin/z.mjs"

run-glyph-module "./latin/orthography.mjs"

run-glyph-module "./latin-ext/bidental-percussive.mjs"
run-glyph-module "./latin-ext/egyptological.mjs"
run-glyph-module "./latin-ext/eszet.mjs"
Expand All @@ -71,5 +73,3 @@ export : define [apply] : begin
run-glyph-module "./latin-ext/upper-aa-ao.mjs"
run-glyph-module "./latin-ext/wynn.mjs"
run-glyph-module "./latin-ext/yogh.mjs"

run-glyph-module "./latin-ext/orthography.mjs"
40 changes: 26 additions & 14 deletions packages/font-glyphs/src/letter/latin/lower-e.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,15 @@ glyph-block Letter-Latin-Lower-E : begin
y -- 0
yAttach -- lastKnot.y

create-glyph "Schwa.\(suffix)" : glyph-proc
include : MarkSet.capital
include : Body [DivFrame 1] CAP [AdviceStroke2 2 3 CAP]
include : FlipAround Middle (CAP / 2)

create-glyph "schwa.\(suffix)" : glyph-proc
include [refer-glyph "e.\(suffix)"] AS_BASE ALSO_METRICS
include : FlipAround Middle (XH / 2)

create-glyph "eRev.\(suffix)" : glyph-proc
include : MarkSet.e
include : RevBody [DivFrame 1] XH [AdviceStroke2 2 3 XH]
Expand All @@ -207,8 +216,8 @@ glyph-block Letter-Latin-Lower-E : begin
include : HBar.m [mix SB 0 0.7] [mix RightSB Width 0.7] (XH * 0.25 + Stroke * 0.25)
Math.min [AdviceStroke 5] (0.25 * (XH - 3 * Stroke))

DefineSelectorGlyph "Schwa" suffix [DivFrame 1] 'capital'
DefineSelectorGlyph "schwa" suffix [DivFrame 1] 'e'
DefineSelectorGlyph "cyrl/Schwa" suffix [DivFrame 1] 'capital'
DefineSelectorGlyph "cyrl/schwa" suffix [DivFrame 1] 'e'

define abkCheDf : DivFrame para.diversityM 3

Expand All @@ -218,12 +227,12 @@ glyph-block Letter-Latin-Lower-E : begin
DefineSelectorGlyph "cyrl/abk/cheDescender" suffix abkCheDf 'p'

foreach { suffixSerif { styTop styBot } } [Object.entries CConfig] : do
create-glyph "Schwa.\(suffix).\(suffixSerif)" : glyph-proc
create-glyph "cyrl/Schwa.\(suffix).\(suffixSerif)" : glyph-proc
set-width 0
set-mark-anchor 'cvDecompose' 0 0
include : Body [DivFrame 1] CAP [AdviceStroke2 2 3 CAP] (tailSlab -- styTop) (schwaTail -- true)
include : FlipAround Middle (CAP / 2)
create-glyph "schwa.\(suffix).\(suffixSerif)" : glyph-proc
create-glyph "cyrl/schwa.\(suffix).\(suffixSerif)" : glyph-proc
set-width 0
set-mark-anchor 'cvDecompose' 0 0
include : Body [DivFrame 1] XH [AdviceStroke2 2 3 XH] (tailSlab -- styTop) (schwaTail -- true)
Expand All @@ -246,8 +255,8 @@ glyph-block Letter-Latin-Lower-E : begin
set-mark-anchor 'cvDecompose' 0 0
include : AbkCheShape 1 Body abkCheDf XH (tailSlab -- styBot)

select-variant "Schwa.\(suffix)" (follow -- 'cyrl/ETopSerifOnly')
select-variant "schwa.\(suffix)" (follow -- 'cyrl/eTopSerifOnly')
select-variant "cyrl/Schwa.\(suffix)" (follow -- 'cyrl/ETopSerifOnly')
select-variant "cyrl/schwa.\(suffix)" (follow -- 'cyrl/eTopSerifOnly')
select-variant "cyrl/abk/Che.\(suffix)" (follow -- 'CBottomSerifOnly')
select-variant "cyrl/abk/che.\(suffix)" (follow -- 'cBottomSerifOnly')
select-variant "cyrl/abk/CheDescender.\(suffix)" (follow -- 'CBottomSerifOnly')
Expand All @@ -261,20 +270,23 @@ glyph-block Letter-Latin-Lower-E : begin
select-variant 'eRetroflexHook' 0x1D92 (follow -- 'e')
select-variant 'eWithNotch' 0x2C78 (follow -- 'e')

select-variant 'Schwa' 0x18F
select-variant 'schwa' 0x259

select-variant 'eRev' 0x258 (follow -- 'e')

select-variant 'eBar' 0xAB33 (follow -- 'e')

CreateSelectorVariants 'Schwa' 0x18F [Object.keys SmallEConfig] (follow -- 'e')
alias 'cyrl/Schwa' 0x4D8 'Schwa'
CreateSelectorVariants 'cyrl/Schwa' 0x4D8 [Object.keys SmallEConfig] (follow -- 'Schwa')
alias 'Schwa.TRK' null 'cyrl/Schwa'

CreateSelectorVariants 'schwa' 0x259 [Object.keys SmallEConfig] (follow -- 'e')
alias 'cyrl/schwa' 0x4D9 'schwa'
CreateSelectorVariants 'cyrl/schwa' 0x4D9 [Object.keys SmallEConfig] (follow -- 'schwa')
alias 'schwa.TRK' null 'cyrl/schwa'

CreateSelectorVariants 'cyrl/abk/Che' 0x4BC [Object.keys SmallEConfig] (follow -- 'e')
CreateSelectorVariants 'cyrl/abk/che' 0x4BD [Object.keys SmallEConfig] (follow -- 'e')
CreateSelectorVariants 'cyrl/abk/CheDescender' 0x4BE [Object.keys SmallEConfig] (follow -- 'e')
CreateSelectorVariants 'cyrl/abk/cheDescender' 0x4BF [Object.keys SmallEConfig] (follow -- 'e')
CreateSelectorVariants 'cyrl/abk/Che' 0x4BC [Object.keys SmallEConfig]
CreateSelectorVariants 'cyrl/abk/che' 0x4BD [Object.keys SmallEConfig]
CreateSelectorVariants 'cyrl/abk/CheDescender' 0x4BE [Object.keys SmallEConfig] (follow -- 'cyrl/abk/Che')
CreateSelectorVariants 'cyrl/abk/cheDescender' 0x4BF [Object.keys SmallEConfig] (follow -- 'cyrl/abk/che')

glyph-block-import Letter-Blackboard : BBS BBD
create-glyph 'mathbb/e' 0x1D556 : glyph-proc
Expand Down
28 changes: 28 additions & 0 deletions packages/font-glyphs/src/letter/latin/orthography.ptl
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
$$include '../../meta/macros.ptl'

import [LocalizedForm] from "@iosevka/glyph/relation"

glyph-module

glyph-block Letter-Latin-Orthography : begin
glyph-block-import Common-Derivatives

# Link localization forms
link-gr LocalizedForm.PLK 'CAcute' 'CAcute.PLK'
link-gr LocalizedForm.PLK 'cAcute' 'cAcute.PLK'
link-gr LocalizedForm.PLK 'NAcute' 'NAcute.PLK'
link-gr LocalizedForm.PLK 'nAcute' 'nAcute.PLK'
link-gr LocalizedForm.PLK 'OAcute' 'OAcute.PLK'
link-gr LocalizedForm.PLK 'oAcute' 'oAcute.PLK'
link-gr LocalizedForm.PLK 'SAcute' 'SAcute.PLK'
link-gr LocalizedForm.PLK 'sAcute' 'sAcute.PLK'
link-gr LocalizedForm.PLK 'Z' 'Z.PLK'
link-gr LocalizedForm.PLK 'z' 'z.PLK'
link-gr LocalizedForm.PLK 'ZAcute' 'ZAcute.PLK'
link-gr LocalizedForm.PLK 'zAcute' 'zAcute.PLK'
link-gr LocalizedForm.PLK 'ZDot' 'ZDot.PLK'
link-gr LocalizedForm.PLK 'zDot' 'zDot.PLK'

link-gr LocalizedForm.TRK 'Schwa' 'Schwa.TRK'
link-gr LocalizedForm.TRK 'schwa' 'schwa.TRK'
link-gr LocalizedForm.TRK 'i' 'i.TRK'
10 changes: 6 additions & 4 deletions packages/font-glyphs/src/letter/latin/z.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -361,10 +361,12 @@ glyph-block Letter-Latin-Z : begin
CreateAccentedComposition 'ZCaron' 0x17D 'Z' 'caronAbove' true
CreateAccentedComposition 'zCaron' 0x17E 'z' 'caronAbove' true

CreateAccentedComposition 'ZAcute.PLK' null 'Z' 'kreskaAbove'
CreateAccentedComposition 'zAcute.PLK' null 'z' 'kreskaAbove'
CreateAccentedComposition 'ZDot.PLK' null 'Z' 'kropkaAbove'
CreateAccentedComposition 'zDot.PLK' null 'z' 'kropkaAbove'
alias 'Z.PLK' null 'Z/reduced'
alias 'z.PLK' null 'z/reduced'
CreateAccentedComposition 'ZAcute.PLK' null 'Z/reduced' 'kreskaAbove'
CreateAccentedComposition 'zAcute.PLK' null 'z/reduced' 'kreskaAbove'
CreateAccentedComposition 'ZDot.PLK' null 'Z/reduced' 'kropkaAbove'
CreateAccentedComposition 'zDot.PLK' null 'z/reduced' 'kropkaAbove'

CreateAccentedComposition 'ZStroke' 0x1B5 'Z/reduced' 'barOver'
CreateAccentedComposition 'zStroke' 0x1B6 'z/reduced' 'barOver'
Expand Down
21 changes: 2 additions & 19 deletions packages/font-otl/src/gsub-locl.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,7 @@ export : define [buildLOCL gsub para glyphStore] : begin

# PLK
define loclPLK : latnPLK.addFeature : gsub.createFeature 'locl'
loclPLK.addLookup : gsub.createLookup
.type 'gsub_single'
.substitutions : object
'CAcute' : glyphStore.ensureExists 'CAcute.PLK'
'cAcute' : glyphStore.ensureExists 'cAcute.PLK'
'NAcute' : glyphStore.ensureExists 'NAcute.PLK'
'nAcute' : glyphStore.ensureExists 'nAcute.PLK'
'OAcute' : glyphStore.ensureExists 'OAcute.PLK'
'oAcute' : glyphStore.ensureExists 'oAcute.PLK'
'SAcute' : glyphStore.ensureExists 'SAcute.PLK'
'sAcute' : glyphStore.ensureExists 'sAcute.PLK'
'ZAcute' : glyphStore.ensureExists 'ZAcute.PLK'
'zAcute' : glyphStore.ensureExists 'zAcute.PLK'
'ZDot' : glyphStore.ensureExists 'ZDot.PLK'
'zDot' : glyphStore.ensureExists 'zDot.PLK'
loclPLK.addLookup : createGsubLookupFromGr gsub glyphStore LocalizedForm.PLK

# ROM
define loclROM : gsub.createFeature 'locl'
Expand All @@ -88,10 +74,7 @@ export : define [buildLOCL gsub para glyphStore] : begin
latnKAZ.addFeature loclTRK
latnTAT.addFeature loclTRK
latnCRT.addFeature loclTRK
loclTRK.addLookup : gsub.createLookup
.type 'gsub_single'
.substitutions : object
'i' : glyphStore.ensureExists 'i.TRK'
loclTRK.addLookup : createGsubLookupFromGr gsub glyphStore LocalizedForm.TRK

# VIT
define loclVIT : latnVIT.addFeature : gsub.createFeature 'locl'
Expand Down
4 changes: 4 additions & 0 deletions packages/glyph/src/relation.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ export const LocalizedForm = {
Italic: LinkedGlyphProp("BashkirLocItalic"),
},
CHU: LinkedGlyphProp("ChuvashLoc"),
PLK: LinkedGlyphProp("PolishLoc"),
TRK: LinkedGlyphProp("TurkishLoc"),
IPPH: LinkedGlyphProp("IPALoc"),
};

Expand Down Expand Up @@ -192,6 +194,8 @@ export const AnyLocalizedForm = {
if (LocalizedForm.BSH.Upright.get(glyph)) grs.push(LocalizedForm.BSH.Upright);
if (LocalizedForm.BSH.Italic.get(glyph)) grs.push(LocalizedForm.BSH.Italic);
if (LocalizedForm.CHU.get(glyph)) grs.push(LocalizedForm.CHU);
if (LocalizedForm.PLK.get(glyph)) grs.push(LocalizedForm.PLK);
if (LocalizedForm.TRK.get(glyph)) grs.push(LocalizedForm.TRK);
if (LocalizedForm.IPPH.get(glyph)) grs.push(LocalizedForm.IPPH);
if (grs.length) return grs;
return null;
Expand Down
8 changes: 8 additions & 0 deletions params/variants.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2569,11 +2569,19 @@ tagKind = "letter"
rank = 1
description = "`e` with flat crossbar"
selector.e = "flatCrossbar"
selector.Schwa = "flatCrossbar"
selector.schwa = "flatCrossbar"
selector."cyrl/abk/Che" = "flatCrossbar"
selector."cyrl/abk/che" = "flatCrossbar"

[prime.e.variants.rounded]
rank = 2
description = "`e` with more rounded shape"
selector.e = "rounded"
selector.Schwa = "flatCrossbar"
selector.schwa = "rounded"
selector."cyrl/abk/Che" = "flatCrossbar"
selector."cyrl/abk/che" = "rounded"



Expand Down
Loading