From a8576bec10242a7b17d3ddcbfd814b62fded3ea9 Mon Sep 17 00:00:00 2001 From: Belleve Date: Thu, 11 Apr 2024 18:32:37 -1000 Subject: [PATCH] =?UTF-8?q?Drop=20NWID=20glyphs=20for=20ligatures=20in=20q?= =?UTF-8?q?uasi-proportionals=20as=20they=20do=20not=20=E2=80=A6=20(#2287)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 --- .github/workflows/pr-bump-version.yml | 55 --------- changes/{29.1.1.md => 29.2.0.md} | 1 + package-lock.json | 80 ++++++------- package.json | 2 +- packages/font-glyphs/package.json | 12 +- .../font-glyphs/src/auto-build/composite.ptl | 108 +++++++++--------- packages/font-kits/package.json | 8 +- packages/font-otl/package.json | 6 +- packages/font-otl/src/gsub-gr.ptl | 9 +- packages/font-otl/src/index.ptl | 4 +- packages/font/package.json | 16 +-- packages/geometry-cache/package.json | 4 +- packages/geometry/package.json | 4 +- packages/glyph/package.json | 4 +- packages/glyph/src/relation.mjs | 6 +- packages/param/package.json | 4 +- packages/util/package.json | 2 +- tools/amend-readme/package.json | 4 +- tools/data-export/package.json | 4 +- .../coverage-export/gather-coverage-data.mjs | 3 +- tools/data-export/src/supported-languages.mjs | 4 +- tools/generate-samples/package.json | 4 +- tools/misc/package.json | 4 +- 23 files changed, 153 insertions(+), 195 deletions(-) delete mode 100644 .github/workflows/pr-bump-version.yml rename changes/{29.1.1.md => 29.2.0.md} (86%) diff --git a/.github/workflows/pr-bump-version.yml b/.github/workflows/pr-bump-version.yml deleted file mode 100644 index be6775dd9..000000000 --- a/.github/workflows/pr-bump-version.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: PR Bump Version - -on: - pull_request_target: - branches: [dev] - -jobs: - bump_version_check: - name: Bump version check - if: github.repository == 'be5invis/Iosevka' && github.base_ref == 'dev' - runs-on: ubuntu-latest - - outputs: - changed: ${{ steps.check_changes.outputs.changed }} - - steps: - - name: Checkout PR - uses: actions/checkout@v4 - - - name: Use Node.js - uses: actions/setup-node@v4 - with: - node-version: lts/* - - - name: Bump version - run: | - npm install - npm run bump-ver - - - id: check_changes - name: Check changes - run: | - git config core.autocrlf false - if git diff --quiet; then - echo "changed=0" >> "$GITHUB_OUTPUT" - else - echo "changed=1" >> "$GITHUB_OUTPUT" - fi - - - name: Commit to PR - if: steps.check_changes.outputs.changed == '1' - run: | - git config --local user.email "actions@github.com" - git config --local user.name "GitHub Actions" - git add --all - git commit -m "Bump version" - git push - - - name: Add PR comment - uses: mshick/add-pr-comment@v2 - if : steps.check_changes.outputs.changed == '1' - with: - message: | - Your pull request changes the version number. - A commit has been made to bump the version number. diff --git a/changes/29.1.1.md b/changes/29.2.0.md similarity index 86% rename from changes/29.1.1.md rename to changes/29.2.0.md index f5501f166..d747c1e0e 100644 --- a/changes/29.1.1.md +++ b/changes/29.2.0.md @@ -1,3 +1,4 @@ +* 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. * Make presence of descender serif automatic for GREEK CAPITAL KAI SYMBOL (`U+03CF`). * Make presence of top-left serif automatic for CYRILLIC {CAPITAL|SMALL} LETTER BASHKIR KA (`U+04A0`..`U+04A1`). * Make GREEK SMALL LETTER DIGAMMA (`U+03DD`) respond to top-right serif variants of Greek Capital Gamma (`cv56`). diff --git a/package-lock.json b/package-lock.json index 01a642846..6f82eafbf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@iosevka/monorepo", - "version": "29.1.1", + "version": "29.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@iosevka/monorepo", - "version": "29.1.1", + "version": "29.2.0", "workspaces": [ "packages/*", "tools/*" @@ -4310,16 +4310,16 @@ }, "packages/font": { "name": "@iosevka/font", - "version": "29.1.1", + "version": "29.2.0", "dependencies": { "@iarna/toml": "^2.2.5", - "@iosevka/font-glyphs": "29.1.1", - "@iosevka/font-otl": "29.1.1", - "@iosevka/geometry": "29.1.1", - "@iosevka/geometry-cache": "29.1.1", - "@iosevka/glyph": "29.1.1", - "@iosevka/param": "29.1.1", - "@iosevka/util": "29.1.1", + "@iosevka/font-glyphs": "29.2.0", + "@iosevka/font-otl": "29.2.0", + "@iosevka/geometry": "29.2.0", + "@iosevka/geometry-cache": "29.2.0", + "@iosevka/glyph": "29.2.0", + "@iosevka/param": "29.2.0", + "@iosevka/util": "29.2.0", "harfbuzzjs": "^0.3.4", "ot-builder": "^1.7.3", "semver": "^7.6.0" @@ -4327,100 +4327,100 @@ }, "packages/font-glyphs": { "name": "@iosevka/font-glyphs", - "version": "29.1.1", + "version": "29.2.0", "dependencies": { - "@iosevka/font-kits": "29.1.1", - "@iosevka/geometry": "29.1.1", - "@iosevka/geometry-cache": "29.1.1", - "@iosevka/glyph": "29.1.1", - "@iosevka/util": "29.1.1", + "@iosevka/font-kits": "29.2.0", + "@iosevka/geometry": "29.2.0", + "@iosevka/geometry-cache": "29.2.0", + "@iosevka/glyph": "29.2.0", + "@iosevka/util": "29.2.0", "typo-geom": "^0.15.1" } }, "packages/font-kits": { "name": "@iosevka/font-kits", - "version": "29.1.1", + "version": "29.2.0", "dependencies": { - "@iosevka/geometry": "29.1.1", - "@iosevka/glyph": "29.1.1", - "@iosevka/util": "29.1.1" + "@iosevka/geometry": "29.2.0", + "@iosevka/glyph": "29.2.0", + "@iosevka/util": "29.2.0" } }, "packages/font-otl": { "name": "@iosevka/font-otl", - "version": "29.1.1", + "version": "29.2.0", "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" } }, "packages/geometry": { "name": "@iosevka/geometry", - "version": "29.1.1", + "version": "29.2.0", "dependencies": { - "@iosevka/util": "29.1.1", + "@iosevka/util": "29.2.0", "spiro": "^3.0.1", "typo-geom": "^0.15.1" } }, "packages/geometry-cache": { "name": "@iosevka/geometry-cache", - "version": "29.1.1", + "version": "29.2.0", "dependencies": { - "@iosevka/geometry": "29.1.1", + "@iosevka/geometry": "29.2.0", "@msgpack/msgpack": "^2.8.0" } }, "packages/glyph": { "name": "@iosevka/glyph", - "version": "29.1.1", + "version": "29.2.0", "dependencies": { - "@iosevka/geometry": "29.1.1" + "@iosevka/geometry": "29.2.0" } }, "packages/param": { "name": "@iosevka/param", - "version": "29.1.1", + "version": "29.2.0", "dependencies": { - "@iosevka/util": "29.1.1" + "@iosevka/util": "29.2.0" } }, "packages/util": { "name": "@iosevka/util", - "version": "29.1.1" + "version": "29.2.0" }, "tools/amend-readme": { "name": "@iosevka/amend-readme", - "version": "29.1.1", + "version": "29.2.0", "dependencies": { "@iarna/toml": "^2.2.5", - "@iosevka/param": "29.1.1", + "@iosevka/param": "29.2.0", "@unicode/unicode-15.1.0": "^1.5.2" } }, "tools/data-export": { "name": "@iosevka/data-export", - "version": "29.1.1", + "version": "29.2.0", "dependencies": { "@iarna/toml": "^2.2.5", - "@iosevka/param": "29.1.1", + "@iosevka/param": "29.2.0", "@unicode/unicode-15.1.0": "^1.5.2", "cldr": "^7.5.0" } }, "tools/generate-samples": { "name": "@iosevka/generate-samples", - "version": "29.1.1", + "version": "29.2.0", "dependencies": { - "@iosevka/data-export": "29.1.1" + "@iosevka/data-export": "29.2.0" } }, "tools/misc": { "name": "@iosevka/misc", - "version": "29.1.1", + "version": "29.2.0", "dependencies": { - "@iosevka/util": "29.1.1", + "@iosevka/util": "29.2.0", "semver": "^7.6.0", "wawoff2": "^2.0.1" } diff --git a/package.json b/package.json index e1f0fffa9..5b840fb69 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@iosevka/monorepo", - "version": "29.1.1", + "version": "29.2.0", "workspaces": [ "packages/*", "tools/*" diff --git a/packages/font-glyphs/package.json b/packages/font-glyphs/package.json index 40620a791..0a0ea39db 100644 --- a/packages/font-glyphs/package.json +++ b/packages/font-glyphs/package.json @@ -1,6 +1,6 @@ { "name": "@iosevka/font-glyphs", - "version": "29.1.1", + "version": "29.2.0", "private": true, "exports": { ".": "./src/index.mjs", @@ -8,11 +8,11 @@ "./unicode-knowledge": "./src/meta/unicode-knowledge.mjs" }, "dependencies": { - "@iosevka/font-kits": "29.1.1", - "@iosevka/geometry": "29.1.1", - "@iosevka/geometry-cache": "29.1.1", - "@iosevka/glyph": "29.1.1", - "@iosevka/util": "29.1.1", + "@iosevka/font-kits": "29.2.0", + "@iosevka/geometry": "29.2.0", + "@iosevka/geometry-cache": "29.2.0", + "@iosevka/glyph": "29.2.0", + "@iosevka/util": "29.2.0", "typo-geom": "^0.15.1" } } diff --git a/packages/font-glyphs/src/auto-build/composite.ptl b/packages/font-glyphs/src/auto-build/composite.ptl index 9e8dfc6fb..64fe054a4 100644 --- a/packages/font-glyphs/src/auto-build/composite.ptl +++ b/packages/font-glyphs/src/auto-build/composite.ptl @@ -2,7 +2,7 @@ $$include '../meta/macros.ptl' import [mix linreg clamp fallback] from "@iosevka/util" -import [getGrMesh AnyCvOrCherryPicking CvDecompose Joining hashCv] from "@iosevka/glyph/relation" +import [getGrMesh AnyCvOrCherryPicking CvDecompose Joining hashCv IsCompositeOrLigature] from "@iosevka/glyph/relation" import [hashGeometry] from "@iosevka/geometry" import [Transform] from "@iosevka/geometry/transform" extern Map @@ -1081,11 +1081,12 @@ glyph-block Autobuild-Ligatures : begin glyph-block-import Recursive-Build : Thinner glyph-block-import Autobuild-Enclosure-Shared : CollectJobs CreateDerivedFontFromJobs EnsureComponentGlyphT applyRelations - define [createLigatures prefix fAlwaysCompress _shrink1 _shrinkN wadj1 wadjN kKern demands] : for-width-kinds WideWidth2 + define [createLigatures prefix _shrink1 _shrinkN wadj1 wadjN kKern demands] : for-width-kinds WideWidth2 + local plainLigature : FMosaicWide && para.isQuasiProportional local ww : if FMosaicWide MosaicWidth (MosaicWidth * para.diversityM) local jobs : CollectJobs DECOMPOSABLE NOT-CENTERED ALLOW-PROPORTIONAL prefix MosaicNameSuffix demands - local shrink1 : if (FMosaicWide && !fAlwaysCompress) 1 [clamp 0 1 (_shrink1 * [mix Width ww 0.5] / Width)] - local shrinkN : if (FMosaicWide && !fAlwaysCompress) 1 [clamp 0 1 (_shrinkN * [mix Width ww 0.5] / Width)] + local shrink1 : if plainLigature 1 [clamp 0 1 (_shrink1 * [mix Width ww 0.5] / Width)] + local shrinkN : if plainLigature 1 [clamp 0 1 (_shrinkN * [mix Width ww 0.5] / Width)] local df1 : CreateDerivedFontFromJobs jobs {} : lambda [gs] : Thinner gs shrink1 local dfN : CreateDerivedFontFromJobs jobs {} : lambda [gs] : Thinner gs shrinkN @@ -1117,49 +1118,54 @@ glyph-block Autobuild-Ligatures : begin foreach { i component } [components.entries] : begin set dfgs.(i) : [if i dfN df1].queryByNameEnsured component - if [not : query-glyph gn] : begin - if (FMosaicWide && !fAlwaysCompress) : begin - create-glyph gn [MangleUnicode unicode desiredWidth] : glyph-proc - local decomposition { } - local aw 0 - foreach { i component } [components.entries] : do - local componentG : query-glyph component - include : with-transform [Translate aw 0] : refer-glyph component - set aw : aw + componentG.advanceWidth - decomposition.push component - set-width aw - if decomposable : CvDecompose.set currentGlyph decomposition - : else : begin - local sumChildrenWidth 0 - foreach {i dfg} [dfgs.entries] : begin - set sumChildrenWidth : sumChildrenWidth + dfg.advanceWidth * [if i wadjN wadj1] + if [query-glyph gn] : return nothing - local glyphWidth : if (sumChildrenWidth < ww) MosaicWidth ww - local compressRefWidth : (glyphWidth - SB * 1.25) / (glyphWidth - SB * 2) * glyphWidth - local kern : kKern * glyphWidth - local estKernedUncompressedWidth : sumChildrenWidth - kern * (dfgs.length - 1) - if (dfgs.length > 1) : foreach [cycle : range 0 4] : begin - if (kKern == 0) : begin - set kern : clamp 0 (SB * 7 / 8) ((estKernedUncompressedWidth - compressRefWidth) / (dfgs.length - 1)) - set estKernedUncompressedWidth : sumChildrenWidth - kern * (dfgs.length - 1) + if plainLigature : begin + # Glyph built as a pure ligature. This case is always decomposable + create-glyph gn [MangleUnicode unicode desiredWidth] : glyph-proc + local decomposition { } + local aw 0 + foreach { i component } [components.entries] : do + local componentG : query-glyph component + include : with-transform [Translate aw 0] : refer-glyph component + set aw : aw + componentG.advanceWidth + decomposition.push component + set-width aw + CvDecompose.set currentGlyph decomposition + IsCompositeOrLigature.set currentGlyph + : else : begin + # Glyph is not a pure ligature, do it in the hard way + local sumChildrenWidth 0 + foreach {i dfg} [dfgs.entries] : begin + set sumChildrenWidth : sumChildrenWidth + dfg.advanceWidth * [if i wadjN wadj1] - local compress : clamp 0 1 (compressRefWidth / estKernedUncompressedWidth) + local glyphWidth : if (sumChildrenWidth < ww) MosaicWidth ww + local compressRefWidth : (glyphWidth - SB * 1.25) / (glyphWidth - SB * 2) * glyphWidth + local kern : kKern * glyphWidth + local estKernedUncompressedWidth : sumChildrenWidth - kern * (dfgs.length - 1) + if (dfgs.length > 1) : foreach [cycle : range 0 4] : begin + if (kKern == 0) : begin + set kern : clamp 0 (SB * 7 / 8) ((estKernedUncompressedWidth - compressRefWidth) / (dfgs.length - 1)) + set estKernedUncompressedWidth : sumChildrenWidth - kern * (dfgs.length - 1) - create-glyph gn [MangleUnicode unicode desiredWidth] : glyph-proc - local decomposition { } - local baseOffset : glyphWidth / 2 - estKernedUncompressedWidth * compress / 2 - foreach { i component } [components.entries] : do - local componentAdvance : compress * (dfgs.(i).advanceWidth * [if i wadjN wadj1] - kern) - local componentRefOffset : dfgs.(i).advanceWidth * ([if i wadjN wadj1] - 1) / 2 - if (i === 0) : begin - local placeholder : LigaturePlaceholderImpl glyphWidth baseOffset - decomposition.push placeholder - include [refer-glyph placeholder] AS_BASE ALSO_METRICS - local part : EnsureComponentGlyphT component - LigaturePartImpl dfN componentRefOffset compress componentAdvance - decomposition.push part - include [refer-glyph part] - if decomposable : CvDecompose.set currentGlyph decomposition + local compress : clamp 0 1 (compressRefWidth / estKernedUncompressedWidth) + + create-glyph gn [MangleUnicode unicode desiredWidth] : glyph-proc + local decomposition { } + local baseOffset : glyphWidth / 2 - estKernedUncompressedWidth * compress / 2 + foreach { i component } [components.entries] : do + local componentAdvance : compress * (dfgs.(i).advanceWidth * [if i wadjN wadj1] - kern) + local componentRefOffset : dfgs.(i).advanceWidth * ([if i wadjN wadj1] - 1) / 2 + if (i === 0) : begin + local placeholder : LigaturePlaceholderImpl glyphWidth baseOffset + decomposition.push placeholder + include [refer-glyph placeholder] AS_BASE ALSO_METRICS + local part : EnsureComponentGlyphT component + LigaturePartImpl dfN componentRefOffset compress componentAdvance + decomposition.push part + include [refer-glyph part] + if decomposable : CvDecompose.set currentGlyph decomposition + IsCompositeOrLigature.set currentGlyph foreach job [items-of jobs.nonDecomposable] : LigatureImpl job false foreach job [items-of jobs.decomposableJobs] : LigatureImpl job true @@ -1167,12 +1173,12 @@ glyph-block Autobuild-Ligatures : begin applyRelations jobs.relApplications define ijShrink : clamp 0.6 0.75 : StrokeWidthBlend 0.6 0.75 - createLigatures 'compatLigature1' false ijShrink ijShrink 1 1 [if (para.diversityI < 1) 0 0.2] : list + createLigatures 'compatLigature1' ijShrink ijShrink 1 1 [if (para.diversityI < 1) 0 0.2] : list list 0x132 { 'I' 'J' } list 0x133 { 'i' 'j' } define stdShrink : clamp 0.75 0.9 : StrokeWidthBlend 0.75 0.9 - createLigatures 'compatLigature2' false stdShrink stdShrink 1 1 0 : list + createLigatures 'compatLigature2' stdShrink stdShrink 1 1 0 : list list 0x1C4 { 'D' 'ZCaron' } list 0x1C5 { 'D' 'zCaron' } list 0x1C6 { 'd' 'zCaron' } @@ -1193,7 +1199,7 @@ glyph-block Autobuild-Ligatures : begin list 0x2116 { 'N' 'numeroRightHalf' } list 0x1F190 { 'D' 'J' } WideWidth1 - createLigatures 'romanNumerals1' true 1 1 1 1 0 : list + createLigatures 'romanNumerals1' 1 1 1 1 0 : list list 0x2160 { 'I' } list 0x2164 { 'V' } list 0x2169 { 'X' } @@ -1209,7 +1215,7 @@ glyph-block Autobuild-Ligatures : begin list 0x217E { 'd' } list 0x217F { 'm' } - createLigatures 'romanNumerals2' true stdShrink stdShrink 1 1 0 : list + createLigatures 'romanNumerals2' stdShrink stdShrink 1 1 0 : list list 0x2161 { 'I' 'I' } list 0x2163 { 'I' 'V' } list 0x2165 { 'V' 'I' } @@ -1222,7 +1228,7 @@ glyph-block Autobuild-Ligatures : begin list 0x217A { 'x' 'i' } define romanShrink : clamp 0.625 0.875 : StrokeWidthBlend 0.625 0.875 - createLigatures 'romanNumerals3' true romanShrink romanShrink 1 1 0 : list + createLigatures 'romanNumerals3' romanShrink romanShrink 1 1 0 : list list 0x2162 { 'I' 'I' 'I' } list 0x2166 { 'V' 'I' 'I' } list 0x216B { 'X' 'I' 'I' } @@ -1231,11 +1237,11 @@ glyph-block Autobuild-Ligatures : begin list 0x217B { 'x' 'i' 'i' } define romanShrink4 : clamp 0.5 0.875 : StrokeWidthBlend 0.5 0.875 - createLigatures 'romanNumerals4' true romanShrink4 romanShrink4 1 1 0 : list + createLigatures 'romanNumerals4' romanShrink4 romanShrink4 1 1 0 : list list 0x2167 { 'V' 'I' 'I' 'I' } list 0x2177 { 'v' 'i' 'i' 'i' } - createLigatures 'temperature' false 0.7 0.8 0.75 0.9 0 : list + createLigatures 'temperature' 0.7 0.8 0.75 0.9 0 : list list 0x2103 { 'degree' 'C' } list 0x2109 { 'degree' 'F' } diff --git a/packages/font-kits/package.json b/packages/font-kits/package.json index 7d14764c2..799fb2470 100644 --- a/packages/font-kits/package.json +++ b/packages/font-kits/package.json @@ -1,14 +1,14 @@ { "name": "@iosevka/font-kits", - "version": "29.1.1", + "version": "29.2.0", "private": true, "exports": { "./boole-kit": "./src/boole-kit.mjs", "./spiro-kit": "./src/spiro-kit.mjs" }, "dependencies": { - "@iosevka/geometry": "29.1.1", - "@iosevka/glyph": "29.1.1", - "@iosevka/util": "29.1.1" + "@iosevka/geometry": "29.2.0", + "@iosevka/glyph": "29.2.0", + "@iosevka/util": "29.2.0" } } diff --git a/packages/font-otl/package.json b/packages/font-otl/package.json index 405d1c111..1513dfe7d 100644 --- a/packages/font-otl/package.json +++ b/packages/font-otl/package.json @@ -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" } } diff --git a/packages/font-otl/src/gsub-gr.ptl b/packages/font-otl/src/gsub-gr.ptl index be6fe9b9a..81e174448 100644 --- a/packages/font-otl/src/gsub-gr.ptl +++ b/packages/font-otl/src/gsub-gr.ptl @@ -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 diff --git a/packages/font-otl/src/index.ptl b/packages/font-otl/src/index.ptl index ce8f6c833..bb5e89048 100644 --- a/packages/font-otl/src/index.ptl +++ b/packages/font-otl/src/index.ptl @@ -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 diff --git a/packages/font/package.json b/packages/font/package.json index 9f5d33ce9..8ac97f635 100644 --- a/packages/font/package.json +++ b/packages/font/package.json @@ -1,6 +1,6 @@ { "name": "@iosevka/font", - "version": "29.1.1", + "version": "29.2.0", "private": true, "exports": { ".": "./src/index.mjs", @@ -10,13 +10,13 @@ }, "dependencies": { "@iarna/toml": "^2.2.5", - "@iosevka/font-glyphs": "29.1.1", - "@iosevka/font-otl": "29.1.1", - "@iosevka/geometry": "29.1.1", - "@iosevka/geometry-cache": "29.1.1", - "@iosevka/glyph": "29.1.1", - "@iosevka/param": "29.1.1", - "@iosevka/util": "29.1.1", + "@iosevka/font-glyphs": "29.2.0", + "@iosevka/font-otl": "29.2.0", + "@iosevka/geometry": "29.2.0", + "@iosevka/geometry-cache": "29.2.0", + "@iosevka/glyph": "29.2.0", + "@iosevka/param": "29.2.0", + "@iosevka/util": "29.2.0", "harfbuzzjs": "^0.3.4", "ot-builder": "^1.7.3", "semver": "^7.6.0" diff --git a/packages/geometry-cache/package.json b/packages/geometry-cache/package.json index 884b4d9a1..be03535ef 100644 --- a/packages/geometry-cache/package.json +++ b/packages/geometry-cache/package.json @@ -1,12 +1,12 @@ { "name": "@iosevka/geometry-cache", - "version": "29.1.1", + "version": "29.2.0", "private": true, "exports": { ".": "./src/index.mjs" }, "dependencies": { - "@iosevka/geometry": "29.1.1", + "@iosevka/geometry": "29.2.0", "@msgpack/msgpack": "^2.8.0" } } diff --git a/packages/geometry/package.json b/packages/geometry/package.json index de5ae3d98..9f6716288 100644 --- a/packages/geometry/package.json +++ b/packages/geometry/package.json @@ -1,6 +1,6 @@ { "name": "@iosevka/geometry", - "version": "29.1.1", + "version": "29.2.0", "private": true, "exports": { ".": "./src/index.mjs", @@ -13,7 +13,7 @@ "./spiro-control": "./src/spiro-control.mjs" }, "dependencies": { - "@iosevka/util": "29.1.1", + "@iosevka/util": "29.2.0", "spiro": "^3.0.1", "typo-geom": "^0.15.1" } diff --git a/packages/glyph/package.json b/packages/glyph/package.json index 530e9cb7b..ecad2c399 100644 --- a/packages/glyph/package.json +++ b/packages/glyph/package.json @@ -1,6 +1,6 @@ { "name": "@iosevka/glyph", - "version": "29.1.1", + "version": "29.2.0", "private": true, "exports": { ".": "./src/glyph.mjs", @@ -9,6 +9,6 @@ "./relation": "./src/relation.mjs" }, "dependencies": { - "@iosevka/geometry": "29.1.1" + "@iosevka/geometry": "29.2.0" } } diff --git a/packages/glyph/src/relation.mjs b/packages/glyph/src/relation.mjs index 712826974..3187e31b7 100644 --- a/packages/glyph/src/relation.mjs +++ b/packages/glyph/src/relation.mjs @@ -124,6 +124,7 @@ export const OgonekTrY = BoolProp("OgonekTrY"); export const IsSuperscript = BoolProp("IsSuperscript"); export const IsSubscript = BoolProp("IsSubscript"); export const ScheduleLeaningMark = BoolProp("ScheduleLeaningMark"); +export const IsCompositeOrLigature = BoolProp("IsCompositeOrLigature"); export const Joining = { get(glyph) { @@ -353,7 +354,10 @@ export function createGrDisplaySheet(glyphStore, gn) { sortFeatureDisplaySheet(typographicFeatures); sortFeatureDisplaySheet(charVariantFeatures); - return [typographicFeatures, charVariantFeatures]; + + let charProps = {}; + if (IsCompositeOrLigature.get(glyph)) charProps.isCompositeOrLigature = true; + return [typographicFeatures, charVariantFeatures, charProps]; } function sortFeatureDisplaySheet(sheet) { diff --git a/packages/param/package.json b/packages/param/package.json index c5c9fcde3..72568b770 100644 --- a/packages/param/package.json +++ b/packages/param/package.json @@ -1,6 +1,6 @@ { "name": "@iosevka/param", - "version": "29.1.1", + "version": "29.2.0", "private": true, "exports": { ".": "./src/index.mjs", @@ -9,6 +9,6 @@ "./metric-override": "./src/metric-override.mjs" }, "dependencies": { - "@iosevka/util": "29.1.1" + "@iosevka/util": "29.2.0" } } diff --git a/packages/util/package.json b/packages/util/package.json index 358da6911..9e55781e4 100644 --- a/packages/util/package.json +++ b/packages/util/package.json @@ -1,6 +1,6 @@ { "name": "@iosevka/util", - "version": "29.1.1", + "version": "29.2.0", "private": true, "exports": { ".": "./src/index.mjs", diff --git a/tools/amend-readme/package.json b/tools/amend-readme/package.json index 628103a54..a32421bb5 100644 --- a/tools/amend-readme/package.json +++ b/tools/amend-readme/package.json @@ -1,13 +1,13 @@ { "name": "@iosevka/amend-readme", - "version": "29.1.1", + "version": "29.2.0", "private": true, "exports": { ".": "./src/index.mjs" }, "dependencies": { "@iarna/toml": "^2.2.5", - "@iosevka/param": "29.1.1", + "@iosevka/param": "29.2.0", "@unicode/unicode-15.1.0": "^1.5.2" } } diff --git a/tools/data-export/package.json b/tools/data-export/package.json index fcb2154d1..e254a298f 100644 --- a/tools/data-export/package.json +++ b/tools/data-export/package.json @@ -1,6 +1,6 @@ { "name": "@iosevka/data-export", - "version": "29.1.1", + "version": "29.2.0", "private": true, "exports": { ".": "./src/index.mjs", @@ -10,7 +10,7 @@ }, "dependencies": { "@iarna/toml": "^2.2.5", - "@iosevka/param": "29.1.1", + "@iosevka/param": "29.2.0", "@unicode/unicode-15.1.0": "^1.5.2", "cldr": "^7.5.0" } diff --git a/tools/data-export/src/coverage-export/gather-coverage-data.mjs b/tools/data-export/src/coverage-export/gather-coverage-data.mjs index 3c569be0b..a1cac10cd 100644 --- a/tools/data-export/src/coverage-export/gather-coverage-data.mjs +++ b/tools/data-export/src/coverage-export/gather-coverage-data.mjs @@ -35,7 +35,7 @@ export async function gatherCoverageData(covUpright, covItalic, covOblique) { const cdItalic = covItalic.get(lch); const cdOblique = covOblique.get(lch); if (cdUpright && cdItalic && cdOblique) { - const [glyphName, typoFs, uprightFs] = cdUpright; + const [glyphName, typoFs, uprightFs, charProps] = cdUpright; const [, , italicFs] = cdItalic; const [, , obliqueFs] = cdOblique; @@ -45,6 +45,7 @@ export async function gatherCoverageData(covUpright, covItalic, covOblique) { charName, inFont: true, glyphName: glyphName, + ...charProps, ...putFeatSeries(featureSeriesStore, "typographicFeatureSets", typoFs), ...putFeatSeries(featureSeriesStore, "cvFeatureSetsUpright", uprightFs), ...putFeatSeries(featureSeriesStore, "cvFeatureSetsItalic", italicFs), diff --git a/tools/data-export/src/supported-languages.mjs b/tools/data-export/src/supported-languages.mjs index 1de328bba..f8a71e167 100644 --- a/tools/data-export/src/supported-languages.mjs +++ b/tools/data-export/src/supported-languages.mjs @@ -81,8 +81,8 @@ function getSupportedLangs(supportLocaleSet) { function getRawCoverage(charMap) { const rawCoverage = new Map(); - for (const [gn, codes, tv, cv] of charMap) - for (const u of codes) rawCoverage.set(u, [gn, tv, cv]); + for (const [gn, codes, tv, cv, cp] of charMap) + for (const u of codes) rawCoverage.set(u, [gn, tv, cv, cp]); return rawCoverage; } diff --git a/tools/generate-samples/package.json b/tools/generate-samples/package.json index acb8a6cb3..a191010cb 100644 --- a/tools/generate-samples/package.json +++ b/tools/generate-samples/package.json @@ -1,11 +1,11 @@ { "name": "@iosevka/generate-samples", - "version": "29.1.1", + "version": "29.2.0", "private": true, "exports": { ".": "./src/index.mjs" }, "dependencies": { - "@iosevka/data-export": "29.1.1" + "@iosevka/data-export": "29.2.0" } } diff --git a/tools/misc/package.json b/tools/misc/package.json index c9ebad8cc..9e6f14366 100644 --- a/tools/misc/package.json +++ b/tools/misc/package.json @@ -1,10 +1,10 @@ { "name": "@iosevka/misc", - "version": "29.1.1", + "version": "29.2.0", "private": true, "dependencies": { "semver": "^7.6.0", "wawoff2": "^2.0.1", - "@iosevka/util": "29.1.1" + "@iosevka/util": "29.2.0" } }