summaryrefslogtreecommitdiff
path: root/tex/context/base/typo-tal.mkiv
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2013-10-30 13:30:00 +0100
committerHans Hagen <pragma@wxs.nl>2013-10-30 13:30:00 +0100
commit73dd1c51aff08a045a08271cf51bacd2d07c802c (patch)
tree6234bb0699da6b365da33d9f616e3c0d5c411d37 /tex/context/base/typo-tal.mkiv
parente6f9ad9a647aacbefad6674fca30e1d8b13f7a6a (diff)
downloadcontext-73dd1c51aff08a045a08271cf51bacd2d07c802c.tar.gz
beta 2013.10.30 13:30
Diffstat (limited to 'tex/context/base/typo-tal.mkiv')
-rw-r--r--tex/context/base/typo-tal.mkiv23
1 files changed, 23 insertions, 0 deletions
diff --git a/tex/context/base/typo-tal.mkiv b/tex/context/base/typo-tal.mkiv
index a34cb8bb6..fb3955aec 100644
--- a/tex/context/base/typo-tal.mkiv
+++ b/tex/context/base/typo-tal.mkiv
@@ -109,4 +109,27 @@
\def\setfirstpasscharacteralign {\let\checkcharacteralign\gobbleoneargument}
\def\setsecondpasscharacteralign{\let\checkcharacteralign\firstofoneargument}
+%D We need fonts to provide tabular digits that is, the digits need to have the same
+%D width.
+
+\definefontfeature
+ [system:tabnum]
+ [tnum=yes,
+ lnum=no]
+
+\newconditional\c_tabl_ntb_char_align_auto_font \settrue\c_tabl_ntb_char_align_auto_font
+
+\installtexdirective % yes or no ?
+ {typesetters.characteralign.autofont}
+ {\settrue \c_tabl_ntb_char_align_auto_font}
+ {\setfalse\c_tabl_ntb_char_align_auto_font}
+
+\def\m_font_feature_auto_tabnum{system:tabnum}
+
+\def\typo_charalign_adapt_font % slow but seldom used
+ {\ifconditional\c_tabl_ntb_char_align_auto_font
+ \let\m_font_feature_asked\m_font_feature_auto_tabnum
+ \font_feature_reset_add_indeed
+ \fi}
+
\protect \endinput