summaryrefslogtreecommitdiff
path: root/tex/generic
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2017-03-21 14:58:43 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2017-03-21 14:58:43 +0100
commit8516f1b516a309aebe2194af1c049dbfe76635e5 (patch)
tree51f6289fb13f673e03f96a0f4e0aff8eece0780a /tex/generic
parent8e0089484acf80066e7393b1245d59dda211be09 (diff)
downloadcontext-8516f1b516a309aebe2194af1c049dbfe76635e5.tar.gz
2017-03-21 14:27:00
Diffstat (limited to 'tex/generic')
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua59
1 files changed, 28 insertions, 31 deletions
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index d946dedfd..d5ea30f8b 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 : 03/20/17 17:33:01
+-- merge date : 03/21/17 14:21:12
do -- begin closure to overcome local limits and interference
@@ -11784,11 +11784,10 @@ local function readnothing(f,nofcontours)
}
end
local function curveto(m_x,m_y,l_x,l_y,r_x,r_y)
- return {
+ return
l_x+2/3*(m_x-l_x),l_y+2/3*(m_y-l_y),
r_x+2/3*(m_x-r_x),r_y+2/3*(m_y-r_y),
- r_x,r_y,"c"
- }
+ r_x,r_y,"c"
end
local function applyaxis(glyph,shape,points,deltas)
if points then
@@ -11840,8 +11839,8 @@ local function applyaxis(glyph,shape,points,deltas)
end
end
end
+local quadratic=false
local function contours2outlines_normal(glyphs,shapes)
- local quadratic=true
for index=1,#glyphs do
local shape=shapes[index]
if shape then
@@ -11914,7 +11913,7 @@ local function contours2outlines_normal(glyphs,shapes)
if quadratic then
segments[nofsegments]={ x1,y1,x2,y2,"q" }
else
- x1,x2,x2,y2,px,py=curveto(x1,x2,px,py,x2,y2)
+ x1,y1,x2,y2,px,py=curveto(x1,y1,px,py,x2,y2)
segments[nofsegments]={ x1,y1,x2,y2,px,py,"c" }
end
control_pt=false
@@ -11925,7 +11924,7 @@ local function contours2outlines_normal(glyphs,shapes)
if quadratic then
segments[nofsegments]={ x1,y1,x2,y2,"q" }
else
- x1,x2,x2,y2,px,py=curveto(x1,x2,px,py,x2,y2)
+ x1,y1,x2,y2,px,py=curveto(x1,y1,px,py,x2,y2)
segments[nofsegments]={ x1,y1,x2,y2,px,py,"c" }
end
control_pt=current_pt
@@ -11935,16 +11934,16 @@ local function contours2outlines_normal(glyphs,shapes)
if first_pt==last_pt then
else
nofsegments=nofsegments+1
+ local x2,y2=first_pt[1],first_pt[2]
if not control_pt then
- segments[nofsegments]={ first_pt[1],first_pt[2],"l" }
+ segments[nofsegments]={ x2,y2,"l" }
elseif quadratic then
local x1,y1=control_pt[1],control_pt[2]
- segments[nofsegments]={ x1,y1,first_pt[1],first_pt[2],"q" }
+ segments[nofsegments]={ x1,y1,x2,y2,"q" }
else
local x1,y1=control_pt[1],control_pt[2]
- local x2,y2=first_pt[1],first_pt[2]
- x1,x2,x2,y2,px,py=curveto(x1,x2,px,py,x2,y2)
- segments[nofsegments]={ x1,y1,y2,y2,px,py,"c" }
+ x1,y1,x2,y2,px,py=curveto(x1,y1,px,py,x2,y2)
+ segments[nofsegments]={ x1,y1,x2,y2,px,py,"c" }
end
end
end
@@ -11957,7 +11956,6 @@ local function contours2outlines_normal(glyphs,shapes)
end
end
local function contours2outlines_shaped(glyphs,shapes,keepcurve)
- local quadratic=true
for index=1,#glyphs do
local shape=shapes[index]
if shape then
@@ -12048,7 +12046,7 @@ local function contours2outlines_shaped(glyphs,shapes,keepcurve)
segments[nofsegments]={ x1,y1,x2,y2,"q" }
end
else
- x1,x2,x2,y2,px,py=curveto(x1,x2,px,py,x2,y2)
+ x1,y1,x2,y2,px,py=curveto(x1,y1,px,py,x2,y2)
if x1<xmin then xmin=x1 elseif x1>xmax then xmax=x1 end
if y1<ymin then ymin=y1 elseif y1>ymax then ymax=y1 end
if x2<xmin then xmin=x2 elseif x2>xmax then xmax=x2 end
@@ -12072,7 +12070,7 @@ local function contours2outlines_shaped(glyphs,shapes,keepcurve)
segments[nofsegments]={ x1,y1,x2,y2,"q" }
end
else
- x1,x2,x2,y2,px,py=curveto(x1,x2,px,py,x2,y2)
+ x1,y1,x2,y2,px,py=curveto(x1,y1,px,py,x2,y2)
if x1<xmin then xmin=x1 elseif x1>xmax then xmax=x1 end
if y1<ymin then ymin=y1 elseif y1>ymax then ymax=y1 end
if x2<xmin then xmin=x2 elseif x2>xmax then xmax=x2 end
@@ -12094,27 +12092,26 @@ local function contours2outlines_shaped(glyphs,shapes,keepcurve)
nofsegments=nofsegments+1
segments[nofsegments]={ first_pt[1],first_pt[2],"l" }
end
- elseif quadratic then
- local x1,y1=control_pt[1],control_pt[2]
- if x1<xmin then xmin=x1 elseif x1>xmax then xmax=x1 end
- if y1<ymin then ymin=y1 elseif y1>ymax then ymax=y1 end
- if keepcurve then
- nofsegments=nofsegments+1
- segments[nofsegments]={ x1,y1,first_pt[1],first_pt[2],"q" }
- end
else
local x1,y1=control_pt[1],control_pt[2]
local x2,y2=first_pt[1],first_pt[2]
- x1,x2,x2,y2,px,py=curveto(x1,x2,px,py,x2,y2)
if x1<xmin then xmin=x1 elseif x1>xmax then xmax=x1 end
if y1<ymin then ymin=y1 elseif y1>ymax then ymax=y1 end
- if x2<xmin then xmin=x2 elseif x2>xmax then xmax=x2 end
- if y2<ymin then ymin=y2 elseif y2>ymax then ymax=y2 end
- if px<xmin then xmin=px elseif px>xmax then xmax=px end
- if py<ymin then ymin=py elseif py>ymax then ymax=py end
- if keepcurve then
- nofsegments=nofsegments+1
- segments[nofsegments]={ x1,y1,y2,y2,px,py,"c" }
+ if quadratic then
+ if keepcurve then
+ nofsegments=nofsegments+1
+ segments[nofsegments]={ x1,y1,x2,y2,"q" }
+ end
+ else
+ x1,y1,x2,y2,px,py=curveto(x1,y1,px,py,x2,y2)
+ if x2<xmin then xmin=x2 elseif x2>xmax then xmax=x2 end
+ if y2<ymin then ymin=y2 elseif y2>ymax then ymax=y2 end
+ if px<xmin then xmin=px elseif px>xmax then xmax=px end
+ if py<ymin then ymin=py elseif py>ymax then ymax=py end
+ if keepcurve then
+ nofsegments=nofsegments+1
+ segments[nofsegments]={ x1,y1,x2,y2,px,py,"c" }
+ end
end
end
end