Fix IPPH forms for {super|sub}script beta/chi. (#2365)

This commit is contained in:
John McWilliams 2024-06-03 12:59:16 -04:00 committed by GitHub
parent dba3477cdb
commit 29d00e8473
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 19 additions and 5 deletions

View file

@ -1 +1,2 @@
* Improve glyph shape of INVERTED LOW KAVYKA WITH KAVYKA ABOVE (`U+2E46`).
* Fix IPPH/APPH localization for superscript/subscript Greek Lower Beta and Chi (`U+1D5D`, `U+1D61`, `U+1D66`, `U+1D6A`).

View file

@ -30,3 +30,5 @@ export : define [apply] : begin
run-glyph-module "./greek/sampi.mjs"
run-glyph-module "./greek/qoppa.mjs"
run-glyph-module "./greek/orthography.mjs"

View file

@ -0,0 +1,13 @@
$$include '../../meta/macros.ptl'
import [LocalizedForm] from "@iosevka/glyph/relation"
glyph-module
glyph-block Letter-Greek-Orthography : begin
glyph-block-import Common-Derivatives
# Link localization forms
link-gr LocalizedForm.IPPH 'grek/beta' 'latn/beta'
link-gr LocalizedForm.IPPH 'grek/chi' 'latn/chi'

View file

@ -88,10 +88,6 @@ export : define [buildLOCL gsub para glyphStore] : begin
define loclIPPH : gsub.createFeature 'locl'
grekIPPH.addFeature loclIPPH
grekAPPH.addFeature loclIPPH
loclIPPH.addLookup : gsub.createLookup
.type 'gsub_single'
.substitutions : object
'grek/beta' : glyphStore.ensureExists 'latn/beta'
'grek/chi' : glyphStore.ensureExists 'latn/chi'
loclIPPH.addLookup : createGsubLookupFromGr gsub glyphStore LocalizedForm.IPPH
gsub.endBlockAtFront rec

View file

@ -30,6 +30,7 @@ export const LocalizedForm = {
Italic: LinkedGlyphProp("SerbianLocItalic"),
},
BGR: LinkedGlyphProp("BulgarianLoc"),
IPPH: LinkedGlyphProp("IPALoc"),
};
export const Texture = {
@ -183,6 +184,7 @@ export const AnyLocalizedForm = {
if (LocalizedForm.SRB.Upright.get(glyph)) grs.push(LocalizedForm.SRB.Upright);
if (LocalizedForm.SRB.Italic.get(glyph)) grs.push(LocalizedForm.SRB.Italic);
if (LocalizedForm.BGR.get(glyph)) grs.push(LocalizedForm.BGR);
if (LocalizedForm.IPPH.get(glyph)) grs.push(LocalizedForm.IPPH);
if (grs.length) return grs;
return null;
},