summaryrefslogtreecommitdiff
path: root/doc/context/sources/general/fonts/fonts/fonts-features.tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2016-10-12 20:30:59 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-10-12 20:30:59 +0200
commit1964c078d21c5f1d19a84fa6ef5c038f8ee80652 (patch)
tree833b3c9c678bcc7043560ab2e83daeeb395d6d7c /doc/context/sources/general/fonts/fonts/fonts-features.tex
parent236690a6367b25187d37013e1e7fc196c5c44eb8 (diff)
downloadcontext-1964c078d21c5f1d19a84fa6ef5c038f8ee80652.tar.gz
2016-10-12 17:32:00
Diffstat (limited to 'doc/context/sources/general/fonts/fonts/fonts-features.tex')
-rw-r--r--doc/context/sources/general/fonts/fonts/fonts-features.tex45
1 files changed, 44 insertions, 1 deletions
diff --git a/doc/context/sources/general/fonts/fonts/fonts-features.tex b/doc/context/sources/general/fonts/fonts/fonts-features.tex
index 79085c236..4514f209a 100644
--- a/doc/context/sources/general/fonts/fonts/fonts-features.tex
+++ b/doc/context/sources/general/fonts/fonts/fonts-features.tex
@@ -891,7 +891,7 @@ one never knows what to expect.
How do we know what faces add up to the ligature {\emoji\Man \zwj \Woman \zwj
\Girl \zwj \Boy} and how are we supposed to know that there should {\darkgray
-\type {zwj}} in between? When we input four faces seoarated by zero width
+\type {zwj}} in between? When we input four faces separated by zero width
joiners, we get a four face symbol instead. The reason for having the joiners in
between is probably to avoid unexpected ligatures. The sequence \type {man},
\type {woman}, \type {boy}, \type {boy} gives \type {family}:
@@ -2531,6 +2531,49 @@ unlikely to show up in future versions of the Latin Modern fonts.
\stopsection
+\startsection[title=Discretionaries]
+
+% speed test:
+%
+% \edef\tufte{\cldloadfile{tufte}}
+% \enabledirectives[otf.alwaysdisc]
+% \testfeatureonce{100}{\setbox0\hbox{\tufte \smallcaps \tufte}}\elapsedtime\par
+% \disabledirectives[otf.alwaysdisc]
+% \testfeatureonce{100}{\setbox0\hbox{\tufte \smallcaps \tufte}}\elapsedtime\par
+
+\startbuffer
+\definedfont[cambria*default]
+12\discretionary
+ {3} {4} {5}%
+67\par
+12{\oldstyle\discretionary
+ {3} {4} {5}}%
+67\par
+12\discretionary
+ {3{\oldstyle3}} {{\oldstyle4}4} {5{\oldstyle5}5}%
+67\par
+\stopbuffer
+
+The font handler has to do some magick to get features working with and across
+discretionaries. To some extend you can use font switches inside discretionaries
+but for sure border cases are not dealt with. This works:
+
+\startlinecorrection[blank]
+\startcombination[nx=4,ny=1,location=top]
+ {\framed[align=normal]{\enabledirectives [otf.alwaysdisc]\setupwhitespace[line]\getbuffer}} {1}
+ {\framed[align=normal]{\enabledirectives [otf.alwaysdisc]\hsize1mm\getbuffer}} {2}
+ {\framed[align=normal]{\disabledirectives[otf.alwaysdisc]\setupwhitespace[line]\getbuffer}} {3}
+ {\framed[align=normal]{\disabledirectives[otf.alwaysdisc]\hsize1mm\getbuffer}} {4}
+\stopcombination
+\stoplinecorrection
+
+The first two examples have \type {otf.alwaysdisk} enabled, the last two have it
+disabled.
+
+\typebuffer
+
+\stopsection
+
\startsection[title=Some remarks]
If you talk about features and fonts it is not difficult to end up speaking