From 2f35f6f04f46e7acd68eee2672f885a973321b2c Mon Sep 17 00:00:00 2001 From: be5invis Date: Tue, 11 Jul 2023 01:03:46 -0700 Subject: [PATCH] More glyph ID saves --- font-src/glyphs/auto-build/composite.ptl | 8 ++------ font-src/support/gr.mjs | 12 ++++++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/font-src/glyphs/auto-build/composite.ptl b/font-src/glyphs/auto-build/composite.ptl index 99b0809a7..38d4c5292 100644 --- a/font-src/glyphs/auto-build/composite.ptl +++ b/font-src/glyphs/auto-build/composite.ptl @@ -631,7 +631,7 @@ glyph-block AutoBuild-Enclosure : begin define [digitNoSuffix d] : return '' define [digitSansSerifSuffix d] : if (d == 1 || d == 7) '/sansSerif' '' - define [digitHasSerif d] : !SLAB && (d == 2 || d == 3 || d == 4 || d == 5) + define [digitHasSerif d] : SLAB && (d == 2 || d == 3 || d == 4 || d == 5) do "Single-digit circled" local compositions : list @@ -666,6 +666,7 @@ glyph-block AutoBuild-Enclosure : begin do "Double-digit circled" local compositions : list list null {'markBaseSpace'} WideWidth1 + list 0x2789 {'one/sansSerif.lnum' 'zero.lnum'} WideWidth1 list 0x1F16D {'C' 'C'} WideWidth2 list 0x1F12D {'C' 'D'} WideWidth1 list 0x1F12E {'W' 'z'} WideWidth1 @@ -674,11 +675,6 @@ glyph-block AutoBuild-Enclosure : begin foreach [j : range 36 till 50] : compositions.push : list (0x32B1 + j - 36) [digitGlyphNames j] WideWidth1 createCircledGlyphs 2 compositions - do "Double-digit sans-serif circled" - local compositions : list - foreach [j : range 10 till 10] : compositions.push : list (0x2789 + j - 10) [digitGlyphNames j] WideWidth1 - createSansSerifCircledGlyphs 2 compositions - do "Single-digit inset circled" local compositions : list list 0x24FF {'zero.lnum'} WideWidth1 diff --git a/font-src/support/gr.mjs b/font-src/support/gr.mjs index 22a34e09f..cd62b93e1 100644 --- a/font-src/support/gr.mjs +++ b/font-src/support/gr.mjs @@ -339,14 +339,18 @@ export function createGrDisplaySheet(glyphStore, gid) { } else { queryCvFeatureTagsOf(charVariantFeatures, gid, glyph, null); } + + sortFeatureDisplaySheet(typographicFeatures); + sortFeatureDisplaySheet(charVariantFeatures); return [typographicFeatures, charVariantFeatures]; } +function sortFeatureDisplaySheet(sheet) { + return sheet.sort((a, b) => (a.name < b.name ? -1 : a.name > b.name ? 1 : 0)); +} + function FeatureSeries(name, groups) { - return { - name, - groups - }; + return { name, groups }; } function displayQueryPairFeatures(gs, gid, name, grCis, grTrans, sink) {