From 6fc1a9b117ad6983a536980eea68852a0686f587 Mon Sep 17 00:00:00 2001 From: Belleve Invis Date: Sat, 4 Apr 2020 13:06:00 -0700 Subject: [PATCH] Expand the ligation set for colons to all dotty operators (#476). --- changes/3.0.0-rc.6.md | 3 +- glyphs/symbol-punctuation.ptl | 30 +++++++++--- ligation-set.toml | 24 +++++----- otl/gsub-ligation.ptl | 89 +++++++++++++++++++++++++++++------ 4 files changed, 112 insertions(+), 34 deletions(-) diff --git a/changes/3.0.0-rc.6.md b/changes/3.0.0-rc.6.md index a669c7a387..ebd5518415 100644 --- a/changes/3.0.0-rc.6.md +++ b/changes/3.0.0-rc.6.md @@ -7,4 +7,5 @@ * Fixed missing `TM` and `SM` symbol. * Fixed weight of dotted numbers. * Fix APL symbols' metric under Aile. - * Make `m.shortleg` more distinctive (#471). \ No newline at end of file + * Make `m.shortleg` more distinctive (#471). + * Expand the ligation set for colons to all dotty operators (#476). \ No newline at end of file diff --git a/glyphs/symbol-punctuation.ptl b/glyphs/symbol-punctuation.ptl index 1fcd54e79e..faadae62cc 100644 --- a/glyphs/symbol-punctuation.ptl +++ b/glyphs/symbol-punctuation.ptl @@ -401,19 +401,12 @@ glyph-block Symbol-Punctuation : begin include : refer-glyph "period" include : refer-glyph "xhPeriod" save 'colon' ':' - save 'colon.dmid' branch apply-transform : Upright apply-transform : Translate 0 (symbolMid - XH / 2) apply-transform : Italify save 'colon.mid' - branch - local delta : Math.max 0 : WIDTH / 2 - (XH - PERIODSIZE) / 2 - apply-transform : Translate delta 0 - save 'colon.dright' - apply-transform : Translate (-2 * delta) 0 - save 'colon.dleft' sketch # holowColon define sw : adviceBlackness 5 @@ -1382,3 +1375,26 @@ glyph-block Symbol-Punctuation : begin quadcontrols 0.5 0 g4 (RIGHTSB - OX) 0 save "undertie" 0x203F + + do "Ligation Variants" + define dotLikePunctuations : list + * "colon" + * "semicolon" + * "period" + * "period.center" + * "comma" + * "question" + * "exclam" + + foreach [baseName : items-of dotLikePunctuations] : sketch + include [refer-glyph baseName] AS_BASE ALSO_METRICS + save (baseName + ".lig.dMid") + local delta : Math.max 0 : WIDTH / 2 - (XH - PERIODSIZE) / 2 + apply-transform : Translate delta 0 + save (baseName + '.lig.dRight') + apply-transform : Translate (-delta / 2) 0 + save (baseName + '.lig.dRightHalf') + apply-transform : Translate (-delta) 0 + save (baseName + '.lig.dLeftHalf') + apply-transform : Translate (-delta / 2) 0 + save (baseName + '.lig.dLeft') diff --git a/ligation-set.toml b/ligation-set.toml index fe3e06c09a..b692f99558 100644 --- a/ligation-set.toml +++ b/ligation-set.toml @@ -66,9 +66,9 @@ desc = 'Center asterisk in `(*` and `*)`' ligGroup = "plusplus" desc = 'Enable ligation for `++` and further plus-chaining' -[simple.calt-colons] -ligGroup = "colons" -desc = 'Enable ligation for `::` and `:::`' +[simple.calt-kern-dotty] +ligGroup = "kern-dotty" +desc = 'Move connecting dotty punctuations closer, like for `::`, `:::` and `...`.' [simple.calt-logic] ligGroup = "logic" @@ -97,24 +97,24 @@ desc = 'Enable ligation for `