summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2013-09-18 23:20:25 +0300
committerMarius <mariausol@gmail.com>2013-09-18 23:20:25 +0300
commit4f56a02a9a2ab1cab1b44248b351b63083c0d215 (patch)
tree830c13a54e3b1cc938d233efa726c94aebeb0d22
parentfe4a089f9636b53d65de1bbf09a27bbfd0a538f8 (diff)
downloadcontext-4f56a02a9a2ab1cab1b44248b351b63083c0d215.tar.gz
beta 2013.09.18 22:06
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4109 -> 4103 bytes
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/spac-chr.lua56
-rw-r--r--tex/context/base/status-files.pdfbin24755 -> 24754 bytes
-rw-r--r--tex/context/base/status-lua.log2
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
7 files changed, 49 insertions, 15 deletions
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index c397f51f8..37c102604 100644
--- a/tex/context/base/cont-new.mkiv
+++ b/tex/context/base/cont-new.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2013.09.18 19:57}
+\newcontextversion{2013.09.18 22:06}
%D This file is loaded at runtime, thereby providing an excellent place for
%D hacks, patches, extensions and new features.
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index ceeaf90a4..b7288b53d 100644
--- a/tex/context/base/context-version.pdf
+++ b/tex/context/base/context-version.pdf
Binary files differ
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index ff39412f0..c73883998 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -25,7 +25,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2013.09.18 19:57}
+\edef\contextversion{2013.09.18 22:06}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/spac-chr.lua b/tex/context/base/spac-chr.lua
index 03c60d275..d59725edf 100644
--- a/tex/context/base/spac-chr.lua
+++ b/tex/context/base/spac-chr.lua
@@ -26,9 +26,9 @@ local insert_node_after = node.insert_after
local remove_node = nodes.remove -- ! nodes
local copy_node_list = node.copy_list
-local nodepool = nodes.pool
local tasks = nodes.tasks
+local nodepool = nodes.pool
local new_penalty = nodepool.penalty
local new_glue = nodepool.glue
@@ -43,6 +43,8 @@ local chardata = characters.data
local typesetters = typesetters
+local unicodeblocks = characters.blocks
+
local characters = typesetters.characters or { } -- can be predefined
typesetters.characters = characters
@@ -51,6 +53,8 @@ local fontparameters = fonthashes.parameters
local fontcharacters = fonthashes.characters
local fontquads = fonthashes.quads
+local setmetatableindex = table.setmetatableindex
+
local a_character = attributes.private("characters")
local a_alignstate = attributes.private("alignstate")
@@ -95,13 +99,6 @@ local function inject_nobreak_space(unicode,head,current,space,spacestretch,spac
return head, current
end
-local keepnbspbefore = {
- [0x094D] = true, -- category mn
- [0x0CCD] = true,
-}
-
-characters.keepnbspbefore = keepnbspbefore -- so we can extend
-
local function nbsp(head,current)
local para = fontparameters[current.font]
if current[a_alignstate] == 1 then -- flushright
@@ -129,18 +126,55 @@ function characters.replacenbspaces(head,nbspaces)
return head
end
+-- This initialization might move someplace else if we need more of it. The problem is that
+-- this module depends on fonts so we have an order problem.
+
+local nbsphash = { } setmetatableindex(nbsphash,function(t,k)
+ for i=unicodeblocks.devanagari.first,unicodeblocks.devanagari.last do nbsphash[i] = true end
+ for i=unicodeblocks.kannada .first,unicodeblocks.kannada .last do nbsphash[i] = true end
+ setmetatableindex(nbsphash,nil)
+ return nbsphash[k]
+end)
+
local methods = {
-- The next one uses an attribute assigned to the character but still we
-- don't have the 'local' value.
+ -- [0x00A0] = function(head,current) -- nbsp
+ -- local next = current.next
+ -- if next and next.id == glyph_code then
+ -- local char = next.char
+ -- if char >= 0x00900 and char <= 0x0097F then
+ -- return false -- devangari
+ -- end
+ -- if char >= 0x00C80 and char <= 0x00CFF then
+ -- return false -- kannada
+ -- end
+ -- end
+ -- local prev = current.prev
+ -- if prev and prev.id == glyph_code then
+ -- local char = prev.char
+ -- if char >= 0x00900 and char <= 0x0097F then
+ -- return false -- devangari
+ -- end
+ -- if char >= 0x00C80 and char <= 0x00CFF then
+ -- return false -- kannada
+ -- end
+ -- end
+ -- return nbsp(head,current)
+ -- end,
+
[0x00A0] = function(head,current) -- nbsp
local next = current.next
- if next and next.id == glyph_code and keepnbspbefore[next.char] then
+ if next and next.id == glyph_code and nbsphash[next.char] then
return false
- else
- return nbsp(head,current)
end
+ local prev = current.prev
+ if prev and prev.id == glyph_code and nbsphash[prev.char] then
+ return false -- kannada
+ end
+ return nbsp(head,current)
end,
[0x2000] = function(head,current) -- enquad
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index a81b02912..0555d1048 100644
--- a/tex/context/base/status-files.pdf
+++ b/tex/context/base/status-files.pdf
Binary files differ
diff --git a/tex/context/base/status-lua.log b/tex/context/base/status-lua.log
index 2bdae9389..2d1cf1c00 100644
--- a/tex/context/base/status-lua.log
+++ b/tex/context/base/status-lua.log
@@ -1,6 +1,6 @@
(cont-yes.mkiv
-ConTeXt ver: 2013.09.18 19:57 MKIV beta fmt: 2013.9.18 int: english/english
+ConTeXt ver: 2013.09.18 22:06 MKIV beta fmt: 2013.9.18 int: english/english
system > 'cont-new.mkiv' loaded
(cont-new.mkiv)
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 190afa692..7352bc5cb 100644
--- a/tex/generic/context/luatex/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : luatex-fonts-merged.lua
-- parent file : luatex-fonts.lua
--- merge date : 09/18/13 19:57:11
+-- merge date : 09/18/13 22:06:17
do -- begin closure to overcome local limits and interference