diff options
author | Hans Hagen <pragma@wxs.nl> | 2017-03-22 12:26:18 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2017-03-22 12:26:18 +0100 |
commit | 1987348696a38821137cc579a986d37086b87404 (patch) | |
tree | fde5925f2eb57062b23bc32908e6cb313fdd8a95 /doc/context/sources/general/fonts | |
parent | 8516f1b516a309aebe2194af1c049dbfe76635e5 (diff) | |
download | context-1987348696a38821137cc579a986d37086b87404.tar.gz |
2017-03-22 12:03:00
Diffstat (limited to 'doc/context/sources/general/fonts')
-rw-r--r-- | doc/context/sources/general/fonts/fonts/fonts-environment.tex | 2 | ||||
-rw-r--r-- | doc/context/sources/general/fonts/fonts/fonts-extensions.tex | 45 |
2 files changed, 47 insertions, 0 deletions
diff --git a/doc/context/sources/general/fonts/fonts/fonts-environment.tex b/doc/context/sources/general/fonts/fonts/fonts-environment.tex index d15a84fdc..a8de89a42 100644 --- a/doc/context/sources/general/fonts/fonts/fonts-environment.tex +++ b/doc/context/sources/general/fonts/fonts/fonts-environment.tex @@ -1,5 +1,7 @@ \startenvironment fonts-environment + \blockligatures[fi,fl,ff] % we need to do this beforehand + \environment manuals-explaining-environment \environment manuals-explaining-cover diff --git a/doc/context/sources/general/fonts/fonts/fonts-extensions.tex b/doc/context/sources/general/fonts/fonts/fonts-extensions.tex index 4740b40b2..fcb9746f2 100644 --- a/doc/context/sources/general/fonts/fonts/fonts-extensions.tex +++ b/doc/context/sources/general/fonts/fonts/fonts-extensions.tex @@ -2357,6 +2357,51 @@ fall back to a guess. \stopsection +\startsection[title=Ligatures] + +Not all fonts provide ligature control (normally related to languages), so here is a +trick. + +\starttyping +\blockligatures[fi,ff] +\blockligatures[fl] + +\definefontfeature + [default] + [default] + [blockligatures=yes] + +\setupbodyfont[pagella] + +... +\stoptyping + +This way it works globally. Of course you can also bind it to a font instance: + +\startbuffer +\blockligatures[fi,fl] + +\definefontfeature + [default:blockligs] + [default] + [blockligatures=yes] + +\definefont[DemoBlockY][Serif*default:blockligs at 20pt] +\definefont[DemoBlockN][Serif*default at 20pt] + +Here we have no ligatures: {\DemoBlockY fi ff fl}, while here we get +them: {\DemoBlockN fi ff fl}. Of course it also depends on the font. +\stopbuffer + +\typebuffer \start \showfontkerns \getbuffer \par \stop + +There is one limitation: you need to specify the blocked ligatures before a font +gets defined and because we share resources it even has to happen before the +first font gets loaded. So, the \type {\blockligatures} commands go before +setting up the body font. This is no real problem because it's a hack anyway. + +\stopsection + \startsection[title=Collections] {\em Todo.} |