diff options
author | Marius <mariausol@gmail.com> | 2012-10-19 01:20:13 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2012-10-19 01:20:13 +0300 |
commit | 69d2352af4b60929b37fc49f3bdb263977016244 (patch) | |
tree | db5eb11398e345dfa23b4c4500fb93575d2afb7c /tex/context/base/font-sol.mkvi | |
parent | c18f7cbe51449a611ea1819fedd9a4ff18529b7d (diff) | |
download | context-69d2352af4b60929b37fc49f3bdb263977016244.tar.gz |
stable 2012.05.30 11:26
Diffstat (limited to 'tex/context/base/font-sol.mkvi')
-rw-r--r-- | tex/context/base/font-sol.mkvi | 123 |
1 files changed, 0 insertions, 123 deletions
diff --git a/tex/context/base/font-sol.mkvi b/tex/context/base/font-sol.mkvi deleted file mode 100644 index b40e37ced..000000000 --- a/tex/context/base/font-sol.mkvi +++ /dev/null @@ -1,123 +0,0 @@ -%D \module -%D [ file=font-sol, -%D version=2009.05.19, -%D title=\CONTEXT\ Font Macros, -%D subtitle=Solutions, -%D author=Hans Hagen, -%D date=\currentdate, -%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] -%C -%C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. - -\writestatus{loading}{ConTeXt Node Support / Splitters} - -% todo: pass color for tracing - -%D This module is specially made for the oriental \TEX\ project. The working is as -%D follows (and tuned for fonts like Idris' Husayni. The following method came to -%D my mind after a couple of Skype sessions with Idris while working on the rough -%D edges of the Husayni font and playing with font dynamics. -%D -%D \startitemize[packed] -%D -%D \item We define a couple of features sets, some can have stylistics variants -%D that result in the same words getting a different width. Normally this -%D happens in a goodies file. -%D -%D \item We group such features in a solution set. A solutionset can be enabled -%D by setting an attribute. -%D -%D \item For each paragraph we identify words that get this set applied. We replace -%D these words by a user node that refers to the original. -%D -%D \item For each word we apply the features to a copy that we associate with this -%D original word. -%D -%D \item At the end we have a paragraph (node list) with user nodes that point to a -%D cache that has originals and processed variants. -%D -%D \item When the paragraph is broken into lines we optimize the spacing by -%D substituting variants. -%D -%D \stopitemize -%D -%D This approach permits us to use a dedicated paragraph builder, one that treats -%D the user nodes special and takes the alternatives into account. -%D -%D Currently we assume only one solution being active. Maybe some day I'll support -%D a mixture. This is only one way of optimizing and after several experiments this -%D one was chosen as testcase. It took quite some experiments (and time) to get thus -%D far. -%D -%D The is experimental code for the Oriental \TEX\ project and aspects of it might -%D change. -%D -%D \starttyping -%D \setupfontsolutions[method={random,preroll},criterium=1,randomseed=101] -%D -%D \definefontsolution % actually only the last run needs to be done this way -%D [FancyHusayni] -%D [goodies=husayni, -%D solution=experimental] -%D -%D \definedfont[husayni*husayni-default at 24pt] -%D \setupinterlinespace[line=36pt] -%D \righttoleft -%D \enabletrackers[parbuilders.solutions.splitters.colors] -%D \setfontsolution[FancyHusayni] -%D alb alb alb \par -%D \resetfontsolution -%D \disabletrackers[parbuilders.solutions.splitters.colors] -%D \stoptyping - -\registerctxluafile{font-sol}{1.001} - -\unprotect - -\definesystemattribute[splitter][public] - -\installcorenamespace{fontsolution} - -\installcommandhandler \??fontsolution {fontsolution} \??fontsolution - -\let\setupfontsolutions\setupfontsolution - -\appendtoks - \ctxcommand{definefontsolution("\currentfontsolution",{ % these are frozen - goodies = "\fontsolutionparameter\s!goodies", - solution = "\fontsolutionparameter\c!solution", - less = "\fontsolutionparameter\c!less", - more = "\fontsolutionparameter\c!more", - })} -\to \everydefinefontsolution - -\unexpanded\def\setfontsolution[#solution]% just one - {\edef\currentfontsolution{#solution}% - \ctxcommand{setfontsolution("\currentfontsolution",{ - method = "\fontsolutionparameter\c!method", - criterium = "\fontsolutionparameter\c!criterium", - % randomseed = "\fontsolutionparameter\c!random", - })}} - -\unexpanded\def\resetfontsolution % resets all - {\ctxcommand{resetfontsolution()}% - \let\currentfontsolution\empty} - -\unexpanded\def\startfontsolution % [#1] - {\pushmacro\currentfontsolution - \setfontsolution} - -\unexpanded\def\stopfontsolution - {\ifhmode\par\fi - \ctxcommand{stopfontsolution()}% - \popmacro\currentfontsolution} - -% We initialize this module at the \LUA\ end. -% -% \setupfontsolutions -% [\c!method={\v!normal,preroll}, -% \c!criterium=0] - -\protect |