Drop NWID glyphs for ligatures in quasi-proportionals as they do not … (#2287)

* Drop NWID glyphs for ligatures in quasi-proportionals as they do not make sense for these styles. This change will save around 2MB for each Aile or Etoile font.

* Drop the pr-bump-version as it doesn't quite work. And bump version
This commit is contained in:
Belleve 2024-04-11 18:32:37 -10:00 committed by GitHub
parent 2cdaf91479
commit a8576bec10
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 153 additions and 195 deletions

View file

@ -1,13 +1,13 @@
{
"name": "@iosevka/font-otl",
"version": "29.1.1",
"version": "29.2.0",
"private": true,
"exports": {
".": "./src/index.mjs"
},
"dependencies": {
"@iosevka/font-glyphs": "29.1.1",
"@iosevka/glyph": "29.1.1",
"@iosevka/font-glyphs": "29.2.0",
"@iosevka/glyph": "29.2.0",
"toposort": "^2.0.2"
}
}

View file

@ -1,16 +1,17 @@
export : define [createGsubLookupFromGr gsub glyphStore gr] : begin
export : define [createGsubLookupFromGr gsub glyphStore gr ignoreGr] : begin
local mapping {.}
foreach { gnSrc glyph } [glyphStore.namedEntries] : begin
local gnDst : gr.get glyph
local glyphDst : glyphStore.queryByName gnDst
if glyphDst : set mapping.(gnSrc) gnDst
local fIgnore : ignoreGr && [ignoreGr.get glyph]
if (!fIgnore && glyphDst) : set mapping.(gnSrc) gnDst
return : gsub.createLookup {.type 'gsub_single' .substitutions mapping}
export : define [buildGrFeature gsub glyphStore gr] : begin
export : define [buildGrFeature gsub glyphStore gr ignoreGr] : begin
local rec : gsub.beginBlock
local lookup1 : createGsubLookupFromGr gsub glyphStore gr
local lookup1 : createGsubLookupFromGr gsub glyphStore gr ignoreGr
if [objectIsNotEmpty lookup1.substitutions] : begin
define feature1 : gsub.addCommonFeature : gsub.createFeature gr.otlTag
feature1.addLookup lookup1

View file

@ -25,8 +25,8 @@ define [buildGSUB para glyphStore markGlyphs] : begin
# NWID / WWID
if para.enableNwidWwid : begin
buildGrFeature gsub glyphStore Gr.Nwid
buildGrFeature gsub glyphStore Gr.Wwid
buildGrFeature gsub glyphStore Gr.Nwid [if para.isQuasiProportional Gr.IsCompositeOrLigature null]
buildGrFeature gsub glyphStore Gr.Wwid [if para.isQuasiProportional Gr.IsCompositeOrLigature null]
# lnum / onum
buildGrFeature gsub glyphStore Gr.Lnum