Skip to content

Commit

Permalink
improvements (tuning) to calt case substitutions. See issue #251
Browse files Browse the repository at this point in the history
  • Loading branch information
rsms committed Aug 18, 2020
1 parent ded07d0 commit ebdfaf2
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 25 deletions.
2 changes: 1 addition & 1 deletion docs/lab/samples.js
Expand Up @@ -282,7 +282,7 @@ U() U[] U{} \t rightx should be rightx.case
()U []U {}U \t special-cased as "delim' delim -> delim.case"
---U--- \t\t all hyphens should be hyphen.case
U-→(){}[]• \t all should be .case
x[]{}H \t\t "x br br" separate from "cb cb H"
x[] {}H \t\t "x br br" separate from "cb cb H"
left side cascades up to 5 characters:
••••••ABBA••••••
Expand Down
17 changes: 11 additions & 6 deletions src/Inter.glyphs
Expand Up @@ -2,7 +2,8 @@
.appVersion = "1346";
DisplayStrings = (
"/bitcoin 3/space/space/space $60/space/space/space 12¢",
"4¢"
"4¢",
"()[/bracketleft_quill ]/bracketright_quill {}"
);
classes = (
{
Expand Down Expand Up @@ -199271,7 +199272,7 @@ com.typemytype.robofont.guideline.magnetic.pOwuJlK9ke = 5;
},
{
glyphname = parenright;
lastChange = "2019-12-17 15:13:12 +0000";
lastChange = "2020-08-17 23:59:11 +0000";
layers = (
{
components = (
Expand Down Expand Up @@ -199366,6 +199367,7 @@ width = 888;
);
leftKerningGroup = parenright;
widthMetricsKey = parenleft;
note = "!post:decompose";
rightKerningGroup = parenright;
unicode = 0029;
userData = {
Expand Down Expand Up @@ -199515,7 +199517,7 @@ unicode = 005B;
},
{
glyphname = bracketleft_quill;
lastChange = "2019-12-17 15:13:12 +0000";
lastChange = "2020-08-18 00:01:26 +0000";
layers = (
{
components = (
Expand Down Expand Up @@ -199651,7 +199653,7 @@ interface.gridadjust.original = "{'width': 890, 'leftMargin': 289, 'rightMargin'
},
{
glyphname = bracketright;
lastChange = "2019-12-17 15:13:12 +0000";
lastChange = "2020-08-18 00:01:08 +0000";
layers = (
{
components = (
Expand Down Expand Up @@ -199726,12 +199728,13 @@ width = 888;
);
leftKerningGroup = parenright;
widthMetricsKey = parenleft;
note = "!post:decompose";
rightKerningGroup = parenright;
unicode = 005D;
},
{
glyphname = bracketright_quill;
lastChange = "2019-12-17 15:13:12 +0000";
lastChange = "2020-08-18 00:01:15 +0000";
layers = (
{
components = (
Expand Down Expand Up @@ -199805,6 +199808,7 @@ width = 888;
}
);
leftMetricsKey = bracketright;
note = "!post:decompose";
rightMetricsKey = bracketright;
unicode = 2046;
userData = {
Expand Down Expand Up @@ -200457,7 +200461,7 @@ unicode = 007B;
},
{
glyphname = braceright;
lastChange = "2019-12-17 15:13:12 +0000";
lastChange = "2020-08-18 00:01:32 +0000";
layers = (
{
background = {
Expand Down Expand Up @@ -200539,6 +200543,7 @@ width = 888;
);
leftKerningGroup = parenright;
widthMetricsKey = parenleft;
note = "!post:decompose";
rightKerningGroup = parenright;
unicode = 007D;
},
Expand Down
38 changes: 20 additions & 18 deletions src/features/calt.fea
Expand Up @@ -256,32 +256,34 @@ ignore sub @CASE_DELIM_L @LC @UC @CASE_DELIM_L; # (xX)
ignore sub @CASE_DELIM_L @LC @All @UC @CASE_DELIM_L; # (x.X)

#
# e.g. "x-"
# e.g. "x-M"
ignore sub @LC @CASE_L'; # x-
ignore sub @LC [@CASE_L @Whitespace] @CASE_L'; # x--, x -
ignore sub @LC [@CASE_L @Whitespace] [@CASE_L @Whitespace] @CASE_L'; # x---, x --, x -, x- -
ignore sub @LC
[@CASE_L @Whitespace]
[@CASE_L @Whitespace]
[@CASE_L @Whitespace]
@CASE_L'; # x----, x ---, x --, x -, x- --, x- -, x-- -
ignore sub @LC
[@CASE_L @Whitespace]
[@CASE_L @Whitespace]
[@CASE_L @Whitespace]
[@CASE_L @Whitespace]
@CASE_L'; # x----- ...
ignore sub @LC @CASE_L @CASE_L'; # x--
ignore sub @LC @CASE_L @CASE_L @CASE_L'; # x---
# ignore sub @LC [@CASE_L @Whitespace] @CASE_L'; # x--, x -
# ignore sub @LC [@CASE_L @Whitespace] [@CASE_L @Whitespace] @CASE_L'; # x---, x --, x -, x- -
# ignore sub @LC
# [@CASE_L @Whitespace]
# [@CASE_L @Whitespace]
# [@CASE_L @Whitespace]
# @CASE_L'; # x----, x ---, x --, x -, x- --, x- -, x-- -
# ignore sub @LC
# [@CASE_L @Whitespace]
# [@CASE_L @Whitespace]
# [@CASE_L @Whitespace]
# [@CASE_L @Whitespace]
# @CASE_L'; # x----- ...
#
# e.g. "x- "
ignore sub @LC @CASE_L' @Whitespace; # "x- "
ignore sub @LC @CASE_L' @Whitespace @Whitespace; # "x- "
# ignore sub @LC @CASE_L' @Whitespace; # "x- "
# ignore sub @LC @CASE_L' @Whitespace @Whitespace; # "x- "
#
# e.g. "-x"
ignore sub @CASE_L @LC; # -x
ignore sub @CASE_L @CASE_L @LC; # --x
ignore sub @CASE_L @CASE_L @CASE_L @LC; # ---x
ignore sub @CASE_L @CASE_L @CASE_L @CASE_L @LC; # ----x
ignore sub @CASE_L @CASE_L @CASE_L @CASE_L @CASE_L @LC; # -----x
# ignore sub @CASE_L @CASE_L @CASE_L @CASE_L @LC; # ----x
# ignore sub @CASE_L @CASE_L @CASE_L @CASE_L @CASE_L @LC; # -----x

#
# pairs with space, e.g. "( ) M" since we don't support subbing
Expand Down

0 comments on commit ebdfaf2

Please sign in to comment.