summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/typo-cap.lua
diff options
context:
space:
mode:
authorTaco Hoekwater <taco@elvenkind.com>2010-05-24 14:05:02 +0000
committerTaco Hoekwater <taco@elvenkind.com>2010-05-24 14:05:02 +0000
commit57ea7dad48fbf2541c04e434c31bde655ada3ac4 (patch)
tree1f8b43bc7cb92939271e1f5bec610710be69097f /Master/texmf-dist/tex/context/base/typo-cap.lua
parent6ee41e1f1822657f7f23231ec56c0272de3855e3 (diff)
here is context 2010.05.24 13:05
git-svn-id: svn://tug.org/texlive/trunk@18445 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/typo-cap.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/typo-cap.lua14
1 files changed, 10 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/context/base/typo-cap.lua b/Master/texmf-dist/tex/context/base/typo-cap.lua
index c232ac72851..5f741da7c1d 100644
--- a/Master/texmf-dist/tex/context/base/typo-cap.lua
+++ b/Master/texmf-dist/tex/context/base/typo-cap.lua
@@ -1,6 +1,6 @@
if not modules then modules = { } end modules ['typo-cap'] = {
version = 1.001,
- comment = "companion to typo-cap.tex",
+ comment = "companion to typo-cap.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
license = "see context related readme files"
@@ -20,10 +20,10 @@ local glyph = node.id("glyph")
local kern = node.id("kern")
local fontdata = fonts.ids
+local fontchar = fonts.chr
local chardata = characters.data
cases = cases or { }
-cases.enabled = false
cases.actions = { }
cases.attribute = attributes.private("case")
@@ -51,7 +51,8 @@ local function helper(start, code, codes, special, attribute, once)
start.font = lastfont
end
end
- local ifc = fontdata[fnt].characters
+ -- local ifc = fontdata[fnt].characters
+ local ifc = fontchar[fnt]
local ucs = dc[codes]
if ucs then
local ok = true
@@ -149,7 +150,8 @@ actions[8] = function(start)
lastfont = nil
local ch = start.char
local mr = math.random
- local tfm = fontdata[start.font].characters
+ -- local tfm = fontdata[start.font].characters
+ local tfm = fontchar[start.font]
if chardata[ch].lccode then
while true do
local d = chardata[mr(1,0xFFFF)]
@@ -202,3 +204,7 @@ chars.handle_casing = nodes.install_attribute_handler {
namespace = cases,
processor = cases.process,
}
+
+function cases.enable()
+ tasks.enableaction("processors","chars.handle_casing")
+end