summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/mkii/cont-new.mkii2
-rw-r--r--tex/context/base/mkii/context.mkii2
-rw-r--r--tex/context/base/mkii/mult-fr.mkii1
-rw-r--r--tex/context/base/mkiv/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/context.mkiv2
-rw-r--r--tex/context/base/mkiv/font-onr.lua41
-rw-r--r--tex/context/base/mkiv/mult-def.lua4
-rw-r--r--tex/context/base/mkiv/mult-prm.lua3
-rw-r--r--tex/context/base/mkiv/pack-com.mkiv50
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin25711 -> 25704 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin425160 -> 425160 bytes
-rw-r--r--tex/context/base/mkiv/strc-flt.mkvi82
-rw-r--r--tex/context/base/mkiv/syst-ini.mkiv2
-rw-r--r--tex/context/base/mkiv/typo-dir.mkiv6
-rw-r--r--tex/context/interface/mkii/keys-fr.xml1
-rw-r--r--tex/context/interface/mkiv/context-en.xml4
-rw-r--r--tex/context/interface/mkiv/i-context.pdfbin847753 -> 847900 bytes
-rw-r--r--tex/context/interface/mkiv/i-direction.xml4
-rw-r--r--tex/context/interface/mkiv/i-readme.pdfbin60775 -> 60775 bytes
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua39
20 files changed, 182 insertions, 63 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index 90be64d47..5a0456528 100644
--- a/tex/context/base/mkii/cont-new.mkii
+++ b/tex/context/base/mkii/cont-new.mkii
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2017.06.27 18:05}
+\newcontextversion{2017.06.29 09:34}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/tex/context/base/mkii/context.mkii b/tex/context/base/mkii/context.mkii
index 8b6845f1a..5b82f4d36 100644
--- a/tex/context/base/mkii/context.mkii
+++ b/tex/context/base/mkii/context.mkii
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2017.06.27 18:05}
+\edef\contextversion{2017.06.29 09:34}
%D For those who want to use this:
diff --git a/tex/context/base/mkii/mult-fr.mkii b/tex/context/base/mkii/mult-fr.mkii
index 318bfc31c..bae157e5a 100644
--- a/tex/context/base/mkii/mult-fr.mkii
+++ b/tex/context/base/mkii/mult-fr.mkii
@@ -687,6 +687,7 @@
\setinterfaceconstant{bottomoffset}{decalageinf}
\setinterfaceconstant{bottomspace}{espaceinf}
\setinterfaceconstant{bottomstate}{etatinf}
+\setinterfaceconstant{break}{break}
\setinterfaceconstant{buffer}{buffer}
\setinterfaceconstant{cache}{cache}
\setinterfaceconstant{calculate}{calculer}
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 03e69e0a5..af97f8b50 100644
--- a/tex/context/base/mkiv/cont-new.mkiv
+++ b/tex/context/base/mkiv/cont-new.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2017.06.27 18:05}
+\newcontextversion{2017.06.29 09:34}
%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/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv
index e7ad05eb5..7a2a20e46 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -41,7 +41,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2017.06.27 18:05}
+\edef\contextversion{2017.06.29 09:34}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/font-onr.lua b/tex/context/base/mkiv/font-onr.lua
index 85d3604b7..9a45d4b73 100644
--- a/tex/context/base/mkiv/font-onr.lua
+++ b/tex/context/base/mkiv/font-onr.lua
@@ -89,7 +89,7 @@ do
local dup = P("dup")
local put = P("put")
local array = P("array")
- local name = P("/") * C((R("az")+R("AZ")+R("09")+S("-_."))^1)
+ local name = P("/") * C((R("az","AZ","09")+S("-_."))^1)
local digits = R("09")^1
local cardinal = digits / tonumber
local spaces = P(" ")^1
@@ -103,32 +103,40 @@ do
return position + 1
end
- local setroutine = function(str,position,index,size)
+ local setroutine = function(str,position,index,size,filename)
local forward = position + tonumber(size)
local stream = decrypt(sub(str,position+1,forward),4330,4)
routines[index] = { byte(stream,1,#stream) }
return forward
end
- local setvector = function(str,position,name,size)
+ local setvector = function(str,position,name,size,filename)
local forward = position + tonumber(size)
if n >= m then
return #str
elseif forward < #str then
+ if n == 0 and name ~= ".notdef" then
+ report_pfb("reserving .notdef at index 0 in %a",filename) -- luatex needs that
+ n = n + 1
+ end
vector[n] = name
- n = n + 1 -- we compensate for notdef at the cff loader end
+ n = n + 1
return forward
else
return #str
end
end
- local setshapes = function(str,position,name,size)
+ local setshapes = function(str,position,name,size,filename)
local forward = position + tonumber(size)
local stream = sub(str,position+1,forward)
if n > m then
return #str
elseif forward < #str then
+ if n == 0 and name ~= ".notdef" then
+ report_pfb("reserving .notdef at index 0 in %a",filename) -- luatex needs that
+ n = n + 1
+ end
vector[n] = name
n = n + 1
chars [n] = decrypt(stream,4330,4)
@@ -144,15 +152,15 @@ do
local p_filterroutines = -- dup <i> <n> RD or -| <n encrypted bytes> NP or |
(1-subroutines)^0 * subroutines * spaces * Cmt(cardinal,initialize)
- * (Cmt(cardinal * spaces * cardinal * p_rd, setroutine) * p_np + P(1))^1
+ * (Cmt(cardinal * spaces * cardinal * p_rd * Carg(1), setroutine) * p_np + P(1))^1
local p_filtershapes = -- /foo <n> RD <n encrypted bytes> ND
(1-charstrings)^0 * charstrings * spaces * Cmt(cardinal,initialize)
- * (Cmt(name * spaces * cardinal * p_rd, setshapes) * p_nd + P(1))^1
+ * (Cmt(name * spaces * cardinal * p_rd * Carg(1) , setshapes) * p_nd + P(1))^1
local p_filternames = Ct (
(1-charstrings)^0 * charstrings * spaces * Cmt(cardinal,initialize)
- * (Cmt(name * spaces * cardinal, setvector) + P(1))^1
+ * (Cmt(name * spaces * cardinal * Carg(1), setvector) + P(1))^1
)
-- /Encoding 256 array
@@ -196,10 +204,9 @@ do
local glyphs = { }
routines, vector, chars = { }, { }, { }
-
if shapestoo then
- lpegmatch(p_filterroutines,binary)
- lpegmatch(p_filtershapes,binary)
+ lpegmatch(p_filterroutines,binary,1,filename)
+ lpegmatch(p_filtershapes,binary,1,filename)
local data = {
dictionaries = {
{
@@ -211,7 +218,7 @@ do
}
fonts.handlers.otf.readers.parsecharstrings(false,data,glyphs,true,true)
else
- lpegmatch(p_filternames,binary)
+ lpegmatch(p_filternames,binary,1,filename)
end
names = vector
@@ -233,7 +240,7 @@ do
if trace_loading then
report_afm("getting index data from %a",pfbname)
end
- for index=1,#vector do
+ for index=0,#vector do -- hm, zero, often space or notdef
local name = vector[index]
local char = characters[name]
if char then
@@ -241,6 +248,10 @@ do
report_afm("glyph %a has index %a",name,index)
end
char.index = index
+ else
+ if trace_indexing then
+ report_afm("glyph %a has index %a but no data",name,index)
+ end
end
end
end
@@ -410,10 +421,6 @@ local fullparser = ( P("StartFontMetrics") * fontdata * name / start )
* ( p_charmetrics + p_kernpairs + p_parameters + (1-P("EndFontMetrics")) )^0
* ( P("EndFontMetrics") / stop )
-local fullparser = ( P("StartFontMetrics") * fontdata * name / start )
- * ( p_charmetrics + p_kernpairs + p_parameters + (1-P("EndFontMetrics")) )^0
- * ( P("EndFontMetrics") / stop )
-
local infoparser = ( P("StartFontMetrics") * fontdata * name / start )
* ( p_parameters + (1-P("EndFontMetrics")) )^0
* ( P("EndFontMetrics") / stop )
diff --git a/tex/context/base/mkiv/mult-def.lua b/tex/context/base/mkiv/mult-def.lua
index 7cee595cd..6843ae3fe 100644
--- a/tex/context/base/mkiv/mult-def.lua
+++ b/tex/context/base/mkiv/mult-def.lua
@@ -7061,6 +7061,10 @@ return {
["pe"]="وضعیت‌پایین",
["ro"]="starejos",
},
+ ["break"]={
+ ["en"]="break",
+ ["nl"]="break",
+ },
["buffer"]={
["en"]="buffer",
["nl"]="buffer",
diff --git a/tex/context/base/mkiv/mult-prm.lua b/tex/context/base/mkiv/mult-prm.lua
index 69221db12..a2a5e39e8 100644
--- a/tex/context/base/mkiv/mult-prm.lua
+++ b/tex/context/base/mkiv/mult-prm.lua
@@ -227,6 +227,7 @@ return {
"begincsname",
"bodydir",
"boxdir",
+ "breakafterdirmode",
"catcodetable",
"clearmarks",
"copyfont",
@@ -1161,4 +1162,4 @@ return {
["xetex"]={
"XeTeXversion",
},
-} \ No newline at end of file
+}
diff --git a/tex/context/base/mkiv/pack-com.mkiv b/tex/context/base/mkiv/pack-com.mkiv
index 8abee1daf..0f5fa1f0c 100644
--- a/tex/context/base/mkiv/pack-com.mkiv
+++ b/tex/context/base/mkiv/pack-com.mkiv
@@ -78,7 +78,7 @@
\newcount\c_pack_combinations_nesting % local
\newcount\c_pack_combinations_x % global
-\newcount\c_pack_combinations_n % global
+\newcount\c_pack_combinations_y % global
\newcount\c_pack_combinations_max % global
\newbox \b_pack_combinations_captions % global
\newbox \b_pack_combinations_temp % global
@@ -93,7 +93,7 @@
\initializeboxstack{\??combination temp}
\newcount\c_pack_combinations_x_saved
-\newcount\c_pack_combinations_n_saved
+\newcount\c_pack_combinations_y_saved
\newcount\c_pack_combinations_max_saved
\newbox \b_pack_combinations_captions_saved
\newbox \b_pack_combinations_temp_saved
@@ -106,7 +106,7 @@
{\advance\c_pack_combinations_nesting\plusone
\ifnum\c_pack_combinations_nesting>\plusone
\c_pack_combinations_x_saved \c_pack_combinations_x
- \c_pack_combinations_n_saved \c_pack_combinations_n
+ \c_pack_combinations_y_saved \c_pack_combinations_y
\c_pack_combinations_max_saved\c_pack_combinations_max
\setbox\b_pack_combinations_captions_saved\box\b_pack_combinations_captions
\setbox\b_pack_combinations_temp_saved \box\b_pack_combinations_temp
@@ -119,7 +119,7 @@
\def\pack_combinations_pop
{\ifnum\c_pack_combinations_nesting>\plusone
\global\c_pack_combinations_x \c_pack_combinations_x_saved
- \global\c_pack_combinations_n \c_pack_combinations_n_saved
+ \global\c_pack_combinations_y \c_pack_combinations_y_saved
\global\c_pack_combinations_max\c_pack_combinations_max_saved
\global\setbox\b_pack_combinations_captions\box\b_pack_combinations_captions_saved
\global\setbox\b_pack_combinations_temp \box\b_pack_combinations_temp_saved
@@ -204,7 +204,7 @@
% \unexpanded\def\stopcombination
% {\bgroup
% \scratchtoks{{}}%
-% \dorecurse\c_pack_combinations_n
+% \dorecurse\c_pack_combinations_y
% {\scratchtoks\expandafter{\the\scratchtoks{}{}}}%
% \expandafter\egroup\the\scratchtoks
% \egroup
@@ -219,7 +219,7 @@
\unexpanded\def\pack_common_caption_stop {\removeunwantedspaces\egroup}
\unexpanded\def\stopcombination
- {\bgroup\normalexpanded{\egroup{}\ntimes{{}{}}\c_pack_combinations_n}% brr
+ {\bgroup\normalexpanded{\egroup{}\ntimes{{}{}}\c_pack_combinations_y}% brr
\dostoptagged
\egroup
\pack_combinations_pop
@@ -271,15 +271,18 @@
\let\combination\empty % permits \combination{}{} handy for cld
\normalexpanded{\pack_combinations_start_indeed[\currentcombinationspec]}}
+\let\pack_combinations_check_x_y\relax
+
\unexpanded\def\pack_combinations_start_indeed[#1*#2*#3]%
{\global\c_pack_combinations_x#1\relax
- \global\c_pack_combinations_n#2\relax
+ \global\c_pack_combinations_y#2\relax
+ \pack_combinations_check_x_y
\dotagcombination
\global\setbox\b_pack_combinations_captions\emptybox
\global\c_pack_combinations_max\c_pack_combinations_x
- \multiply\c_pack_combinations_n\c_pack_combinations_x
+ \multiply\c_pack_combinations_y\c_pack_combinations_x
\tabskip\zeropoint
- \halign \ifx\p_width\v!fit\else to \p_width \fi \bgroup
+ \halign \ifx\p_width\v!fit\else to \p_width \fi \bgroup % repetitive preamble
\aligntab
\m_pack_combinations_leftfiller
\alignmark\alignmark
@@ -382,8 +385,8 @@
\m_pack_combinations_valigner{\box\b_pack_combinations_content}%
% we need to save the caption for a next alignment line
\pack_combinations_save_caption}%
- \ifnum\c_pack_combinations_n>\plusone
- \global\advance\c_pack_combinations_n\minusone
+ \ifnum\c_pack_combinations_y>\plusone
+ \global\advance\c_pack_combinations_y\minusone
\global\advance\c_pack_combinations_x\minusone
\ifcase\c_pack_combinations_x
\doubleexpandafter\pack_combinations_pickup_package_pair_a
@@ -486,19 +489,40 @@
\let\stopfloatcombination\relax
+\unexpanded\def\pack_combinations_float_hack_a#1%
+ {\strc_floats_build_box_separate_split{\getlocalfloat{#1}}%
+ \box\b_strc_floats_separate_content}
+
+\unexpanded\def\pack_combinations_float_hack_b#1%
+ {\box\b_strc_floats_separate_caption}
+
\def\pack_combinations_start_float[#1][#2]%
{\ifinsidefloat\else\dontleavehmode\fi % tricky, floatcombinations fail to align well otherwise
\vbox\bgroup
+ \strc_floats_build_box_separate_set
%\insidecolumnstrue % trick, forces no centering, todo: proper switch/feature
\postcenterfloatmethod\zerocount
\forcelocalfloats
\unexpanded\def\stopfloatcombination{\pack_combinations_stop_float{#1}}}
+\def\pack_combinations_float_check_x_y
+ {\ifnum\numexpr\c_pack_combinations_x*\c_pack_combinations_y\relax<\noflocalfloats\relax
+ \global\c_pack_combinations_x\noflocalfloats
+ \global\c_pack_combinations_y\plusone
+ \fi
+ \let\pack_combinations_check_x_y\relax}%
+
\def\pack_combinations_stop_float#1%
{\scratchtoks\emptytoks
\dorecurse\noflocalfloats
- {\appendetoks{\getlocalfloat{\recurselevel}}{}\to\scratchtoks}% brrr
- \expanded{\startcombination[#1]\the\scratchtoks}\stopcombination
+ {\appendetoks
+ {\pack_combinations_float_hack_a{\recurselevel}}%
+ {\pack_combinations_float_hack_b{\recurselevel}}%
+ \to\scratchtoks}% brrr
+ \let\pack_combinations_check_x_y\pack_combinations_float_check_x_y
+ \doifassignmentelse{#1}
+ {\expanded{\startcombination[#1]\the\scratchtoks}\stopcombination}%
+ {\expanded{\startcombination[#1]\the\scratchtoks}\stopcombination}%
\resetlocalfloats
\egroup}
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index f895df337..4a7516ffe 100644
--- a/tex/context/base/mkiv/status-files.pdf
+++ b/tex/context/base/mkiv/status-files.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf
index 2a8de95c2..c99f701e7 100644
--- a/tex/context/base/mkiv/status-lua.pdf
+++ b/tex/context/base/mkiv/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/strc-flt.mkvi b/tex/context/base/mkiv/strc-flt.mkvi
index 3ad2e86fc..5e31a2714 100644
--- a/tex/context/base/mkiv/strc-flt.mkvi
+++ b/tex/context/base/mkiv/strc-flt.mkvi
@@ -1385,8 +1385,11 @@
\newdimen\d_strc_float_temp_height
\newdimen\d_strc_float_temp_width
-\def\captionminwidth {15\bodyfontsize}
-\def\captionovershoot{2\emwidth}
+\newconditional\c_floats_adapt_to_caption_width
+\newconditional\c_floats_store_minimal_package
+
+\def\captionminwidth {15\bodyfontsize} % can become parameter (but what name)
+\def\captionovershoot{2\emwidth} % can become parameter (but what name)
\let\strc_floats_mark_pag_as_free\relax
@@ -1426,7 +1429,9 @@
\or
% manual
\fi
- \ifcase\c_strc_floats_rotation
+ \ifconditional\c_floats_store_minimal_package
+ % nothing
+ \else\ifcase\c_strc_floats_rotation
\doifnotinset\v!margin\floatlocation % brr, really needed! see wm
{\postcenterfloatbox\d_strc_floats_content
\strc_floats_mark_pag_as_free}%
@@ -1435,7 +1440,7 @@
\global\setbox\floatbox\vpack
{\rotate[\c!rotation=\number\c_strc_floats_rotation]{\box\floatbox}}%
\strc_floats_mark_pag_as_free
- \fi
+ \fi\fi
\egroup}
\def\strc_floats_prepare_no_caption
@@ -1544,6 +1549,10 @@
\fi
\edef\captionhsize{\the\wd\b_strc_floats_content}%
\scratchwidth\floatcaptionparameter\c!maxwidth\relax
+ \ifconditional\c_floats_adapt_to_caption_width
+ \let\captionminwidth \!!zeropoint
+ \let\captionovershoot\!!zeropoint
+ \fi
\ifdim\captionhsize>\scratchwidth
% float is wider than \hsize
\setbox\b_strc_floats_caption\vbox
@@ -1571,6 +1580,9 @@
\ifdim\captionhsize<\captionminwidth\relax
\scratchdimen\captionminwidth % float smaller than min width
\edef\captionhsize{\the\scratchdimen}%
+% \ifconditional\c_floats_adapt_to_caption_width
+% \setbox\b_strc_floats_content\hpack to \captionhsize{\hss\box\b_strc_floats_content\hss}%
+% \fi
\fi
\setbox\scratchbox\vbox % test with overshoot
{\settrialtypesetting
@@ -1903,14 +1915,52 @@
{\global\setbox\floatbox\vbox % pack ? probably not
{\strc_floats_set_local_hsize
\forgetall
- \let\floatcaptionarrangement\s!default
- \processcommacommand[\floatcaptionparameter\c!location]\strc_floats_build_box_step
- \ifcsname\??floatbuilder\floatcaptionarrangement\endcsname
- \lastnamedcs
+ \ifconditional\c_floats_store_minimal_package
+ \strc_floats_build_box_separate_make
\else
- \strc_floats_build_box_default
+ \let\floatcaptionarrangement\s!default
+ \processcommacommand[\floatcaptionparameter\c!location]\strc_floats_build_box_step
+ \ifcsname\??floatbuilder\floatcaptionarrangement\endcsname
+ \lastnamedcs
+ \else
+ \strc_floats_build_box_default
+ \fi
\fi}}
+% special purpose: used in floatcombinations
+
+\newbox\b_strc_floats_separate_content
+\newbox\b_strc_floats_separate_caption
+
+\def\strc_floats_build_box_separate_set
+ {\settrue\c_floats_adapt_to_caption_width
+ \settrue\c_floats_store_minimal_package}
+
+\def\strc_floats_build_box_separate_make
+ {\offinterlineskip
+ \vpack to \onepoint{\box\b_strc_floats_content}\break
+ \vpack to \onepoint{\box\b_strc_floats_caption}}
+
+\def\strc_floats_build_box_separate_split#1%
+ {\setbox\scratchbox\vbox{%
+ \setbox\scratchbox\vpack{#1}%
+ \unvbox\scratchbox\relax
+ \setbox\scratchbox\lastbox
+ %\doloop{%
+ \unvbox\scratchbox
+ \setbox\scratchbox\lastbox
+ % \ifdim\ht\scratchbox=2\onepoint
+ \unvbox\scratchbox
+ \setbox\scratchbox\lastbox
+ % \exitloop
+ % \fi}%
+ \splittopskip\zeropoint
+ \global\setbox\b_strc_floats_separate_content\vsplit\scratchbox to \onepoint
+ \global\setbox\b_strc_floats_separate_caption\vsplit\scratchbox to \onepoint
+ \global\setbox\b_strc_floats_separate_content\vpack{\unvbox\b_strc_floats_separate_content\setbox0\lastbox\unvbox0}%
+ \global\setbox\b_strc_floats_separate_caption\tpack{\unvbox\b_strc_floats_separate_caption\setbox0\lastbox\unvbox0}%
+ }}
+
% \def\strc_floats_build_box_step#1%
% {\doifdefined{\??floatbuilder#1}{\def\floatcaptionarrangement{#1}\quitcommalist}}
@@ -2116,13 +2166,17 @@
\fi
\strc_floats_set_local_dimensions
\global\advance\totalnoffloats\plusone
- \setbox\floatbox\hpack{\strc_float_save_data\box\floatbox}% still needed? we will do renumbering differently
+ \ifconditional\c_floats_store_minimal_package \else
+ \setbox\floatbox\hpack{\strc_float_save_data\box\floatbox}% still needed? we will do renumbering differently
+ \fi
\global\floatheight\htdp\floatbox
\global\floatwidth\wd\floatbox
- \doifnotinset\v!margin\floatlocation % gaat namelijk nog fout
- {\setbox\floatbox\vpack
- {\parindent\zeropoint
- \box\floatbox}}%
+ \ifconditional\c_floats_store_minimal_package \else
+ \doifnotinset\v!margin\floatlocation % gaat namelijk nog fout
+ {\setbox\floatbox\vpack
+ {\parindent\zeropoint
+ \box\floatbox}}%
+ \fi
\wd\floatbox\floatwidth
\ifdim\dimexpr\floatheight+\lineheight\relax<\textheight \else
\global\floatheight\dimexpr\textheight-\lineheight\relax
diff --git a/tex/context/base/mkiv/syst-ini.mkiv b/tex/context/base/mkiv/syst-ini.mkiv
index 380f94e6d..080cffafc 100644
--- a/tex/context/base/mkiv/syst-ini.mkiv
+++ b/tex/context/base/mkiv/syst-ini.mkiv
@@ -1199,4 +1199,6 @@
\ifdefined\prebinoppenalty \else \newcount\prebinoppenalty \fi
\ifdefined\prerelpenalty \else \newcount\prerelpenalty \fi
+\ifdefined\breakafterdirmode \else \newcount\breakafterdirmode \fi
+
\protect \endinput
diff --git a/tex/context/base/mkiv/typo-dir.mkiv b/tex/context/base/mkiv/typo-dir.mkiv
index c5fd6fa41..eaff408ba 100644
--- a/tex/context/base/mkiv/typo-dir.mkiv
+++ b/tex/context/base/mkiv/typo-dir.mkiv
@@ -81,11 +81,17 @@
\fi
\to \everysetupdirections
+\appendtoks
+ \edef\p_option{\directionsparameter\c!break}% name can change
+ \breakafterdirmode\ifx\p_option\v!both\plusone\else\zerocount\fi
+\to \everysetupdirections
+
% bidi: local=obey grouping, global=ignore grouping (unicode has no grouping)
\setupdirections % maybe start/stop
[\c!bidi=\v!off,
\c!method=\v!default,
+ \c!break=\v!both, % experimental value, maybe \v!no will be default (bad name too)
\c!fences=\v!yes]
\unexpanded\edef\bidilre{\normalUchar"202A} % maybe \edef's
diff --git a/tex/context/interface/mkii/keys-fr.xml b/tex/context/interface/mkii/keys-fr.xml
index db6e35ac6..2f2746a52 100644
--- a/tex/context/interface/mkii/keys-fr.xml
+++ b/tex/context/interface/mkii/keys-fr.xml
@@ -693,6 +693,7 @@
<cd:constant name='bottomoffset' value='decalageinf'/>
<cd:constant name='bottomspace' value='espaceinf'/>
<cd:constant name='bottomstate' value='etatinf'/>
+ <cd:constant name='break' value='break'/>
<cd:constant name='buffer' value='buffer'/>
<cd:constant name='cache' value='cache'/>
<cd:constant name='calculate' value='calculer'/>
diff --git a/tex/context/interface/mkiv/context-en.xml b/tex/context/interface/mkiv/context-en.xml
index 328dd8143..b6308269d 100644
--- a/tex/context/interface/mkiv/context-en.xml
+++ b/tex/context/interface/mkiv/context-en.xml
@@ -7580,6 +7580,10 @@
<cd:constant default="yes" type="yes"/>
<cd:constant type="no"/>
</cd:parameter>
+ <cd:parameter name="break">
+ <cd:constant default="yes" type="both"/>
+ <cd:constant type="before"/>
+ </cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf
index 0a55fc4cc..03a1906e2 100644
--- a/tex/context/interface/mkiv/i-context.pdf
+++ b/tex/context/interface/mkiv/i-context.pdf
Binary files differ
diff --git a/tex/context/interface/mkiv/i-direction.xml b/tex/context/interface/mkiv/i-direction.xml
index ad266db6b..c8017d25f 100644
--- a/tex/context/interface/mkiv/i-direction.xml
+++ b/tex/context/interface/mkiv/i-direction.xml
@@ -22,6 +22,10 @@
<cd:constant type="yes" default="yes"/>
<cd:constant type="no"/>
</cd:parameter>
+ <cd:parameter name="break">
+ <cd:constant type="both" default="yes"/>
+ <cd:constant type="before"/>
+ </cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf
index ec3987b83..13cb46287 100644
--- a/tex/context/interface/mkiv/i-readme.pdf
+++ b/tex/context/interface/mkiv/i-readme.pdf
Binary files differ
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 5d67d8059..d793cdf04 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 : c:/data/develop/context/sources/luatex-fonts-merged.lua
-- parent file : c:/data/develop/context/sources/luatex-fonts.lua
--- merge date : 06/27/17 18:05:12
+-- merge date : 06/29/17 09:34:20
do -- begin closure to overcome local limits and interference
@@ -29044,7 +29044,7 @@ do
local dup=P("dup")
local put=P("put")
local array=P("array")
- local name=P("/")*C((R("az")+R("AZ")+R("09")+S("-_."))^1)
+ local name=P("/")*C((R("az","AZ","09")+S("-_."))^1)
local digits=R("09")^1
local cardinal=digits/tonumber
local spaces=P(" ")^1
@@ -29055,30 +29055,38 @@ do
m=size
return position+1
end
- local setroutine=function(str,position,index,size)
+ local setroutine=function(str,position,index,size,filename)
local forward=position+tonumber(size)
local stream=decrypt(sub(str,position+1,forward),4330,4)
routines[index]={ byte(stream,1,#stream) }
return forward
end
- local setvector=function(str,position,name,size)
+ local setvector=function(str,position,name,size,filename)
local forward=position+tonumber(size)
if n>=m then
return #str
elseif forward<#str then
+ if n==0 and name~=".notdef" then
+ report_pfb("reserving .notdef at index 0 in %a",filename)
+ n=n+1
+ end
vector[n]=name
- n=n+1
+ n=n+1
return forward
else
return #str
end
end
- local setshapes=function(str,position,name,size)
+ local setshapes=function(str,position,name,size,filename)
local forward=position+tonumber(size)
local stream=sub(str,position+1,forward)
if n>m then
return #str
elseif forward<#str then
+ if n==0 and name~=".notdef" then
+ report_pfb("reserving .notdef at index 0 in %a",filename)
+ n=n+1
+ end
vector[n]=name
n=n+1
chars [n]=decrypt(stream,4330,4)
@@ -29091,11 +29099,11 @@ do
local p_np=spacing*(P("NP")+P("|"))
local p_nd=spacing*(P("ND")+P("|"))
local p_filterroutines=
- (1-subroutines)^0*subroutines*spaces*Cmt(cardinal,initialize)*(Cmt(cardinal*spaces*cardinal*p_rd,setroutine)*p_np+P(1))^1
+ (1-subroutines)^0*subroutines*spaces*Cmt(cardinal,initialize)*(Cmt(cardinal*spaces*cardinal*p_rd*Carg(1),setroutine)*p_np+P(1))^1
local p_filtershapes=
- (1-charstrings)^0*charstrings*spaces*Cmt(cardinal,initialize)*(Cmt(name*spaces*cardinal*p_rd,setshapes)*p_nd+P(1))^1
+ (1-charstrings)^0*charstrings*spaces*Cmt(cardinal,initialize)*(Cmt(name*spaces*cardinal*p_rd*Carg(1),setshapes)*p_nd+P(1))^1
local p_filternames=Ct (
- (1-charstrings)^0*charstrings*spaces*Cmt(cardinal,initialize)*(Cmt(name*spaces*cardinal,setvector)+P(1))^1
+ (1-charstrings)^0*charstrings*spaces*Cmt(cardinal,initialize)*(Cmt(name*spaces*cardinal*Carg(1),setvector)+P(1))^1
)
local p_filterencoding=(1-encoding)^0*encoding*spaces*digits*spaces*array*(1-dup)^0*Cf(
Ct("")*Cg(spacing*dup*spaces*cardinal*spaces*name*spaces*put)^1
@@ -29121,8 +29129,8 @@ do
local glyphs={}
routines,vector,chars={},{},{}
if shapestoo then
- lpegmatch(p_filterroutines,binary)
- lpegmatch(p_filtershapes,binary)
+ lpegmatch(p_filterroutines,binary,1,filename)
+ lpegmatch(p_filtershapes,binary,1,filename)
local data={
dictionaries={
{
@@ -29134,7 +29142,7 @@ do
}
fonts.handlers.otf.readers.parsecharstrings(false,data,glyphs,true,true)
else
- lpegmatch(p_filternames,binary)
+ lpegmatch(p_filternames,binary,1,filename)
end
names=vector
routines,vector,chars=nil,nil,nil
@@ -29150,7 +29158,7 @@ do
if trace_loading then
report_afm("getting index data from %a",pfbname)
end
- for index=1,#vector do
+ for index=0,#vector do
local name=vector[index]
local char=characters[name]
if char then
@@ -29158,6 +29166,10 @@ do
report_afm("glyph %a has index %a",name,index)
end
char.index=index
+ else
+ if trace_indexing then
+ report_afm("glyph %a has index %a but no data",name,index)
+ end
end
end
end
@@ -29263,7 +29275,6 @@ local p_parameters=P(false)+fontdata*((P("FontName")+P("FullName")+P("FamilyName
+(fontdata*C("AXISHEIGHT")*number*rest)/set_1
)
local fullparser=(P("StartFontMetrics")*fontdata*name/start )*(p_charmetrics+p_kernpairs+p_parameters+(1-P("EndFontMetrics")) )^0*(P("EndFontMetrics")/stop )
-local fullparser=(P("StartFontMetrics")*fontdata*name/start )*(p_charmetrics+p_kernpairs+p_parameters+(1-P("EndFontMetrics")) )^0*(P("EndFontMetrics")/stop )
local infoparser=(P("StartFontMetrics")*fontdata*name/start )*(p_parameters+(1-P("EndFontMetrics")) )^0*(P("EndFontMetrics")/stop )
local function read(filename,parser)
local afmblob=io.loaddata(filename)