summaryrefslogtreecommitdiff
path: root/tex/context/base/hand-ini.mkiv
blob: 41e9db415fbf9070503ca13554392da98615220a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
%D \module
%D   [       file=hand-ini,
%D        version=2008.02.12,
%D          title=\CONTEXT\ Handling Macros,
%D       subtitle=Initialization,
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

%D Handling is implemented differently in \MKIV. Maybe I'll cook up
%D some compatibility hack.

% \definefontfeature[demo][default][mode=node,expansion=quality]
% \definefontfeature[demo][default][mode=node,protrusion=pure]

\unprotect

%D New stuff.

\def\setupfontexpansion [#1][#2]{\ctxlua{commands.setupfontexpansion ("#1","#2")}}
\def\setupfontprotrusion[#1][#2]{\ctxlua{commands.setupfontprotrusion("#1","#2")}}

%D Old stuff.

\def\fonthandlingerror{\writestatus\m!fonts{font handling is replaced by features in mkiv}}

\def\enableadjusting  {\pdfadjustspacing\plustwo  }  \let\enableexpansion \enableadjusting
\def\disableadjusting {\pdfadjustspacing\zerocount}  \let\disableexpansion\disableadjusting
\def\enableprotruding {\pdfprotrudechars\plustwo  }
\def\disableprotruding{\pdfprotrudechars\zerocount}

\appendtoks \disableadjusting  \to \everyforgetall % Here or not here?
\appendtoks \disableprotruding \to \everyforgetall % Here or not here?

\def\startfonthandling             #1{\fonthandlingerror\fonthandlingerror\gobbleuntil\stopfonthandling} % can't happen
\def\definefonthandling              {\dotripleempty\dodefinefonthandling}
\def\setupfonthandling               {\dodoubleempty\dosetupfonthandling }
\def\dodefinefonthandling[#1][#2][#3]{\fonthandlingerror}
\def\dosetupfonthandling     [#1][#2]{\fonthandlingerror}
\def\usehandling                 [#1]{\fonthandlingerror}

%D Just to be sure, maybe users use it:

\let\fonthandling\empty

\protect \endinput