diff options
author | Karl Berry <karl@freefriends.org> | 2019-12-05 21:23:07 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-12-05 21:23:07 +0000 |
commit | 0ed7b2cd92f7a81334f612df3e37211f8333ae75 (patch) | |
tree | 2bcbe01d8e86cbf57d64069a153346da4936b00a /Master/texmf-dist/doc/luatex/barracuda/test | |
parent | 7f43f3692e1354166c0623faf83c84b23d041ea3 (diff) |
barracuda (5dec19)
git-svn-id: svn://tug.org/texlive/trunk@53034 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/luatex/barracuda/test')
35 files changed, 2735 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-barracuda-package/01-barracuda-latex-test.pdf b/Master/texmf-dist/doc/luatex/barracuda/test/test-barracuda-package/01-barracuda-latex-test.pdf Binary files differnew file mode 100644 index 00000000000..a075d25db11 --- /dev/null +++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-barracuda-package/01-barracuda-latex-test.pdf diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-barracuda-package/01-barracuda-latex-test.tex b/Master/texmf-dist/doc/luatex/barracuda/test/test-barracuda-package/01-barracuda-latex-test.tex new file mode 100644 index 00000000000..33a81aeb5dd --- /dev/null +++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-barracuda-package/01-barracuda-latex-test.tex @@ -0,0 +1,13 @@ +% !TeX program = LuaLaTeX +% Copyright (C) 2019 Roberto Giacomelli + +% test file: make a Code39 barcodes in a LaTeX document + +\documentclass{article} +\usepackage{barracuda} + +\begin{document} +A\barracuda{code39}{123QWE}A +\end{document} + + diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-code128/001-code128-test.lua b/Master/texmf-dist/doc/luatex/barracuda/test/test-code128/001-code128-test.lua new file mode 100644 index 00000000000..78645612dca --- /dev/null +++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-code128/001-code128-test.lua @@ -0,0 +1,32 @@ +-- Copyright (C) 2018 Roberto Giacomelli + +local barracuda = require "barracuda" +local barcode = barracuda:get_barcode_class() +local c128, err = barcode:new_encoder("code128") +assert(not err, err) + +print(c128._NAME) +print(c128._VERSION) + +local info = c128:info() +print("encoder name = ", info.name) +print("description = ", info.description) +for k, tp in ipairs(info.param) do + print(k, tp.name, tp.value) +end + +local symb = c128:from_string("123") +print("Symbol char list:") +for _, c in ipairs(symb._code_data) do + print(c) +end + +local canvas = barracuda:new_canvas() + +symb:append_ga(canvas) + +-- driver library +local drv = barracuda:get_driver() +drv:save("svg", canvas, "c128-123") + + diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-code128/002-code128-test.pdf b/Master/texmf-dist/doc/luatex/barracuda/test/test-code128/002-code128-test.pdf Binary files differnew file mode 100644 index 00000000000..c3c8460bc7e --- /dev/null +++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-code128/002-code128-test.pdf diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-code128/002-code128-test.tex b/Master/texmf-dist/doc/luatex/barracuda/test/test-code128/002-code128-test.tex new file mode 100644 index 00000000000..eeaf60e4832 --- /dev/null +++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-code128/002-code128-test.tex @@ -0,0 +1,125 @@ +% !TeX program = LuaTeX +% Copyright (C) 2019 Roberto Giacomelli + +\newbox\mybox +\nopagenumbers + +Code 128 encoder test. + +Test 1: one simple barcode with default parameter: + +\directlua{ +barracuda = require "barracuda" +} + +\directlua{ +local barcode = barracuda:get_barcode_class() + +local c128, err = barcode:new_encoder("code128") +assert(not err, err) + +local symbo, err = c128:from_string("5465468132546812") +assert(not err, err) + +local canvas = barracuda:new_canvas() +symbo:append_ga(canvas) + +local drv = barracuda:get_driver() +drv:ga_to_hbox(canvas, "mybox") +} +\vrule A\vrule\box\mybox \vrule A\vrule + +Test 2: two symbols, different anchor. The first symbol (more longer than the +second one) takes the anchor parameters from the super class Barcode, while +the second one takes anchors from itself: + +\directlua{ +local barcode = barracuda:get_barcode_class() +local ok, err = barcode:set_param{ax = 1, ay = 1} % super class set up +assert(ok, err) +assert(barcode.ax == 1, "barcode ax is "..tostring(barcode.ax)) + +local c128, err = barcode:enc_by_name("code128") +assert(c128.ax == 1, "c128 ax is "..tostring(c128.ax)) + +local s1, err = c128:from_string("12345678901234567890"); assert(s1, err) +local s2, err = c128:from_string("0987654321", {ax = 0, ay = 0}); assert(s2, err) + +local s1_ax = s1:get_param("ax") +assert(s1.ax == 1, "1 ax is "..tostring(s1.ax)) +local s2_ax = s2:get_param("ax") +assert(s2.ax == 0, "0 ax is "..tostring(s2.ax)) + +local canvas = barracuda:new_canvas() +s1:append_ga(canvas) +s2:append_ga(canvas) + +local drv = barracuda:get_driver() +drv:ga_to_hbox(canvas, "mybox") +}\box\mybox + +Test 3: play with the barcodes height (ydim parameter). The vertical anchor ay +will take to super class Barcode, previously set to 1.0. So, the symbols will +be aligned to the top: + +\directlua{ +local c128, err = barracuda:get_barcode_class() + :enc_by_name "code128"; assert(c128, err) + +local s, err = c128:from_string("123456"); assert(s, err) +local canvas = barracuda:new_canvas() +s:append_ga(canvas) + +local ok, err = s:set_param("ydim", tex.sp "30mm") +s:append_ga(canvas, tex.sp "20mm") + +local ok, err = s:set_param("ydim", tex.sp "60mm") +s:append_ga(canvas, tex.sp "40mm") + +local drv = barracuda:get_driver() +drv:ga_to_hbox(canvas, "mybox") +}\box\mybox + +Test 4: set up vertical anchor globally to 0.0, locally to the encoder to 0.5 +and locally to 1.0: + +\directlua{ +local barcode = barracuda:get_barcode_class() +% set ay globally to 0.0 +local ok, err = barcode:set_param("ay", 0); assert(ok, err) + +local c128, err = barcode:enc_by_name "code128"; assert(c128, err) +local s, err = c128:from_string("ABCDEFGHI"); assert(s, err) + +local canvas = barracuda:new_canvas() +local _, err = s:append_ga(canvas); assert(not err, err) + +% set ay to 0.5 for the encoder +local ok, err = c128:set_param("ay", 0.5); assert(ok, err) +local _, err = s:append_ga(canvas, tex.sp "30mm"); assert(not err, err) +% set locally to the symbol ay to 1.0 +local ok, err = s:set_param("ay", 1) +local _, err = s:append_ga(canvas, tex.sp "60mm"); assert(not err, err) + +local drv = barracuda:get_driver() +drv:ga_to_hbox(canvas, "mybox") +}\box\mybox + +Test 5: uint() costructor and save a file with PDF literal code: + +\directlua{ +local barcode = barracuda:get_barcode_class() +local c128, err = barcode:enc_by_name("code128"); assert(c128, err) +local s, e = c128:from_uint(1234567890); assert(s, e) +local canvas = barracuda:new_canvas() +local _, errc = s:append_ga(canvas); assert(not errc, errc) +local drv = barracuda:get_driver() +drv:ga_to_hbox(canvas, "mybox") +drv:save("native", canvas, "02-05-pdfliteral") +}\box\mybox + +That's all folk! + +\bye + +function Driver:save(id_drv, ga, filename, ext) --> ok, err
\ No newline at end of file diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-code128/02-05-pdfliteral.txt b/Master/texmf-dist/doc/luatex/barracuda/test/test-code128/02-05-pdfliteral.txt new file mode 100644 index 00000000000..fe16d33c50b --- /dev/null +++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-code128/02-05-pdfliteral.txt @@ -0,0 +1,43 @@ +q +-53.574521 -14.173154 1.190545 28.346308 re +-51.788704 -14.173154 0.595272 28.346308 re +-50.002887 -14.173154 1.785817 28.346308 re +f +S +-47.026524 -14.173154 0.595272 28.346308 re +-45.835979 -14.173154 1.190545 28.346308 re +-43.454889 -14.173154 1.785817 28.346308 re +f +S +-40.478527 -14.173154 0.595272 28.346308 re +-38.097437 -14.173154 0.595272 28.346308 re +-36.906892 -14.173154 1.190545 28.346308 re +f +S +-33.930530 -14.173154 1.785817 28.346308 re +-30.358895 -14.173154 0.595272 28.346308 re +-29.168350 -14.173154 1.190545 28.346308 re +f +S +-27.382533 -14.173154 1.190545 28.346308 re +-23.810898 -14.173154 0.595272 28.346308 re +-22.620353 -14.173154 0.595272 28.346308 re +f +S +-20.834536 -14.173154 1.190545 28.346308 re +-19.048719 -14.173154 2.381090 28.346308 re +-16.072356 -14.173154 1.190545 28.346308 re +f +S +-14.286539 -14.173154 0.595272 28.346308 re +-12.500722 -14.173154 2.381090 28.346308 re +-8.929087 -14.173154 0.595272 28.346308 re +f +S +-7.738542 -14.173154 1.190545 28.346308 re +-4.762180 -14.173154 1.785817 28.346308 re +-2.381090 -14.173154 0.595272 28.346308 re +-1.190545 -14.173154 1.190545 28.346308 re +f +S +Q
\ No newline at end of file diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-code128/c128-123.svg b/Master/texmf-dist/doc/luatex/barracuda/test/test-code128/c128-123.svg new file mode 100644 index 00000000000..9f5b5847aaa --- /dev/null +++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-code128/c128-123.svg @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Barracuda package (https://github.com/robitex/barracuda) --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" + "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg xmlns="http://www.w3.org/2000/svg" + version="1.1" + width="18.479903mm" height="9.999947mm" + viewBox="-2.099989 -9.999947 18.479903 9.999947" +> + <g stroke="black"> + <path d="M0.209999 -9.999947V-0.000000" style="stroke-width:0.419998"/> + <path d="M0.734996 -9.999947V-0.000000" style="stroke-width:0.209999"/> + <path d="M1.364993 -9.999947V-0.000000" style="stroke-width:0.209999"/> + </g> + <g stroke="black"> + <path d="M2.414987 -9.999947V-0.000000" style="stroke-width:0.209999"/> + <path d="M3.254983 -9.999947V-0.000000" style="stroke-width:0.629997"/> + <path d="M4.199978 -9.999947V-0.000000" style="stroke-width:0.419998"/> + </g> + <g stroke="black"> + <path d="M4.829975 -9.999947V-0.000000" style="stroke-width:0.419998"/> + <path d="M5.774970 -9.999947V-0.000000" style="stroke-width:0.629997"/> + <path d="M6.614965 -9.999947V-0.000000" style="stroke-width:0.209999"/> + </g> + <g stroke="black"> + <path d="M7.139962 -9.999947V-0.000000" style="stroke-width:0.419998"/> + <path d="M7.874959 -9.999947V-0.000000" style="stroke-width:0.209999"/> + <path d="M8.504955 -9.999947V-0.000000" style="stroke-width:0.629997"/> + </g> + <g stroke="black"> + <path d="M9.344951 -9.999947V-0.000000" style="stroke-width:0.209999"/> + <path d="M10.289946 -9.999947V-0.000000" style="stroke-width:0.419998"/> + <path d="M11.024942 -9.999947V-0.000000" style="stroke-width:0.209999"/> + </g> + <g stroke="black"> + <path d="M11.759938 -9.999947V-0.000000" style="stroke-width:0.419998"/> + <path d="M12.914932 -9.999947V-0.000000" style="stroke-width:0.629997"/> + <path d="M13.544929 -9.999947V-0.000000" style="stroke-width:0.209999"/> + <path d="M14.069926 -9.999947V-0.000000" style="stroke-width:0.419998"/> + </g> +</svg> + diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/001-code39-test.lua b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/001-code39-test.lua new file mode 100644 index 00000000000..e4a8569e938 --- /dev/null +++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/001-code39-test.lua @@ -0,0 +1,41 @@ +-- Copyright (C) 2019 Roberto Giacomelli +-- test Code 39 encoder + +local barracuda = require "barracuda" + +for k, v in pairs(barracuda) do + print(k,v) +end + +local barcode = barracuda:get_barcode_class() + +local c39, err = barcode:new_encoder("code39") +assert(not err, err) + +print(c39._NAME) +print(c39._VERSION) + +local info = c39:info() + +print("encoder name = ", info.name) +print("description = ", info.description) + +for k, tp in ipairs(info.param) do + print(k, tp.name, tp.value) +end + +local symb = c39:from_string("123") + +print("print internal representation of chars") +for _, c in ipairs(symb.code) do + print(c) +end +print() + +local canvas = barracuda:new_canvas() +symb:append_ga(canvas) + +-- native driver +local drv = barracuda:get_driver() + +for _, code in ipairs(canvas._data) do print(code) end diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/002-code39-test.pdf b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/002-code39-test.pdf Binary files differnew file mode 100644 index 00000000000..060a61e8929 --- /dev/null +++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/002-code39-test.pdf diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/002-code39-test.tex b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/002-code39-test.tex new file mode 100644 index 00000000000..73f91aac430 --- /dev/null +++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/002-code39-test.tex @@ -0,0 +1,120 @@ +% !TeX program = LuaTeX +% Copyright (C) 2019 Roberto Giacomelli + +\newbox\mybox +\nopagenumbers + +Test 1: Code 39 symbol with default parameters: + +\directlua{ +local barracuda = require "barracuda" +local c39, err = barracuda:get_barcode_class() + :new_encoder("code39") +assert(not err, err) + +local symbol, err = c39:from_string("ABC12QJ31") +assert(not err, err) + +local canvas = barracuda:new_canvas() +symbol:append_ga(canvas) +local drv = barracuda:get_driver() +drv:ga_to_hbox(canvas, "mybox") +} +\box\mybox + +Test 2: get the reference of the previous encoder and typeset two +Code 39 symbols on the same canvas, one above to the other: + +\directlua{ +local barracuda = require "barracuda" +local c39, err = barracuda:get_barcode_class() + :enc_by_name("code39") + assert(c39, err) + +local s1, err = c39:from_string("ZKPQJ31"); assert(s1, err) +local s2, err = c39:from_string("RTFG746", {text_vpos="top"}); assert(s2, err) + +local canvas = barracuda:new_canvas() +s1:append_ga(canvas) + +local h2 = s2:get_param("height") +s2:append_ga(canvas, 0.0, h2 + tex.sp "5pt") +local drv = barracuda:get_driver() +drv:ga_to_hbox(canvas, "mybox") +} +\box\mybox + +Test 3: with the same encoder print a symbol, change globally the height, +and reprint the same symbol again on the same canvas: + +\directlua{ +local barracuda = require "barracuda" +local c39, err = barracuda:get_barcode_class() + :enc_by_name("code39") + assert(c39, err) + +local s1, err = c39:from_string("ZKPQJ31"); assert(s1, err) + +local canvas = barracuda:new_canvas() +s1:append_ga(canvas) + +local h = s1:get_param("height") +c39:set_param("height", 2*h) +c39:set_param {text_vpos = "top"} + +s1:append_ga(canvas, 0.0, h + tex.sp "5pt") + +local drv = barracuda:get_driver() +drv:ga_to_hbox(canvas, "mybox") +} +\box\mybox + +Test 4: do the same in test 3 but change locally parameters as +height and text properties: + +\directlua{ +local barracuda = require "barracuda" +local c39, err = barracuda:get_barcode_class() + :enc_by_name("code39") + assert(c39, err) + +local s1, err = c39:from_string("0123456789"); assert(s1, err) + +local canvas = barracuda:new_canvas() +s1:append_ga(canvas) +local h, err = s1:get_param("height"); assert(h, err) +local ok, err = s1:set_param{ + height = h/2, + text_enabled = true, + text_vpos = "bottom", + text_hpos = "spaced", + text_star = true, + ay = 1, +}; assert(ok, err) +s1:append_ga(canvas, 0.0, - tex.sp "5pt") + +local drv = barracuda:get_driver() +drv:ga_to_hbox(canvas, "mybox") +} +\box\mybox + +Test 5: create a new encoder with a large module value: + +\directlua{ +local barracuda = require "barracuda" +local barcode = barracuda:get_barcode_class() + +local c39, err = barcode:new_encoder("code39", "e2", {module = tex.sp "0.5mm"}) +assert(c39, err) + +local s1, err = c39:from_string("02040608"); assert(s1, err) + +local canvas = barracuda:new_canvas() +s1:append_ga(canvas) + +local drv = barracuda:get_driver() +drv:ga_to_hbox(canvas, "mybox") +} +\box\mybox + +\bye diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/003-code39-test.pdf b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/003-code39-test.pdf Binary files differnew file mode 100644 index 00000000000..66b04e61e38 --- /dev/null +++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/003-code39-test.pdf diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/003-code39-test.tex b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/003-code39-test.tex new file mode 100644 index 00000000000..a4ba3d6e81c --- /dev/null +++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/003-code39-test.tex @@ -0,0 +1,53 @@ +% !TeX program = LuaTeX +% Copyright (C) 2019 Roberto Giacomelli + +\newbox\mybox +\nopagenumbers + +Test 3: the same Code 39 symbol drawing multiple time on the same canvas + +\directlua{ +local barracuda = require "barracuda" +local c39, err = barracuda:get_barcode_class() + :new_encoder("code39") +assert(not err, err) +local err +local symbol +symbol, err = c39:from_string("ABCDEF12QJ31+") +assert(not err, err) + +local ok, err = c39:set_param("text_vpos", "top") +assert(ok, err) + +local canvas = barracuda:new_canvas() +symbol:append_ga(canvas) + +local ok, err = symbol:set_param("text_hpos", "center") +assert(ok, err) +symbol:append_ga(canvas, tex.sp "4.5cm") + +local ok, err = symbol:set_param("text_hpos", "right") +assert(ok, err) +symbol:append_ga(canvas, tex.sp "9.0cm") + +local ok, err = c39:set_param("text_vpos", "bottom") +assert(ok, err) + +local ok, err = symbol:set_param("text_hpos", "left") +symbol:append_ga(canvas, 0, tex.sp "-2.0cm") + +local ok, err = symbol:set_param("text_hpos", "center") +assert(ok, err) +symbol:append_ga(canvas, tex.sp "4.5cm", tex.sp "-2.0cm") + +local ok, err = symbol:set_param("text_hpos", "right") +assert(ok, err) +symbol:append_ga(canvas, tex.sp "9.0cm", tex.sp "-2.0cm") + +local drv = barracuda:get_driver() +drv:ga_to_hbox(canvas, "mybox") +} +\box\mybox +\bye + + diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/004-code39-test.pdf b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/004-code39-test.pdf Binary files differnew file mode 100644 index 00000000000..3c96d9233b4 --- /dev/null +++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/004-code39-test.pdf diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/004-code39-test.tex b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/004-code39-test.tex new file mode 100644 index 00000000000..559dc943837 --- /dev/null +++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/004-code39-test.tex @@ -0,0 +1,46 @@ +% !TeX program = LuaTeX +% Copyright (C) 2019 Roberto Giacomelli + +\newbox\mybox +\nopagenumbers + +Test 4: check uint costructor: + +\directlua{ +barracuda = require "barracuda" +local c39, err = barracuda:get_barcode_class() + :new_encoder("code39") +assert(not err, err) +local err +local symbol +symbol, err = c39:from_uint(0, {text_hpos="center"}) +assert(not err, err) + +local canvas = barracuda:new_canvas() +symbol:append_ga(canvas) + +local drv = barracuda:get_driver() +drv:ga_to_hbox(canvas, "mybox") +} +\box\mybox + +\directlua{ +local c39, err = barracuda:get_barcode_class() + :enc_by_name("code39") +assert(c39, err) +local e +local symbol +symbol, e = c39:from_uint(0123456789, {text_hpos="spaced",text_star=true}) +assert(not e, e) + +local canvas = barracuda:new_canvas() +symbol:append_ga(canvas) + +local drv = barracuda:get_driver() +drv:ga_to_hbox(canvas, "mybox") +} +\box\mybox + +\bye + + diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/005-code39-test.lua b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/005-code39-test.lua new file mode 100644 index 00000000000..4ac0ff171d6 --- /dev/null +++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/005-code39-test.lua @@ -0,0 +1,8 @@ + +-- Code 39 test file number 5 + +local barracuda = require "barracuda" +barracuda:save("code39", "ABCDEFG", "my_barcode") + +-- end of test file + diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/006-code39-test.lua b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/006-code39-test.lua new file mode 100644 index 00000000000..d33ad4ffaf1 --- /dev/null +++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/006-code39-test.lua @@ -0,0 +1,45 @@ + +local cm = 1864679.8110236 -- sp + +local barracuda = require "barracuda" +local c39, err = barracuda:get_barcode_class() + :new_encoder("code39") +assert(not err, err) +local err +local symbol +symbol, err = c39:from_string("ABCDEF12QJ31+") +assert(not err, err) + +local ok, err = c39:set_param("text_vpos", "top") +assert(ok, err) + +local canvas = barracuda:new_canvas() +symbol:append_ga(canvas) + +local ok, err = symbol:set_param("text_hpos", "center") +assert(ok, err) +symbol:append_ga(canvas, 4.5*cm) + +local ok, err = symbol:set_param("text_hpos", "right") +assert(ok, err) +symbol:append_ga(canvas, 9.0*cm) + +local ok, err = c39:set_param("text_vpos", "bottom") +assert(ok, err) + +local ok, err = symbol:set_param("text_hpos", "left") +symbol:append_ga(canvas, 0, -2.0*cm) + +local ok, err = symbol:set_param("text_hpos", "center") +assert(ok, err) +symbol:append_ga(canvas, 4.5*cm, -2.0*cm) + +local ok, err = symbol:set_param("text_hpos", "right") +assert(ok, err) +symbol:append_ga(canvas, 9.0*cm, -2.0*cm) + +local drv = barracuda:get_driver() +drv:save("svg", canvas, "006-six") + + + diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/006-six.svg b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/006-six.svg new file mode 100644 index 00000000000..25ce8bb34cd --- /dev/null +++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/006-six.svg @@ -0,0 +1,653 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Barracuda package (https://github.com/robitex/barracuda) --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" + "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg xmlns="http://www.w3.org/2000/svg" + version="1.1" + width="132.036779mm" height="33.746381mm" + viewBox="-2.539987 -10.873169 132.036779 33.746381" +> + <g stroke="black"> + <path d="M0.095249 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M0.666746 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M1.142994 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M1.714491 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M2.190738 -7.999958V-0.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M2.666986 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M3.143233 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M3.524231 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M4.095728 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M4.571976 -7.999958V-0.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M5.048223 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M5.524471 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M6.000718 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M6.572215 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M7.048463 -7.999958V-0.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M7.619960 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M8.191457 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M8.667704 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M9.239201 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M9.620199 -7.999958V-0.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M10.001197 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M10.382195 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M10.858443 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M11.525189 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M12.001437 -7.999958V-0.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M12.572934 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M13.049181 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M13.525429 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M14.192175 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M14.573173 -7.999958V-0.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M14.954171 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M15.430419 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M16.001916 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M16.668662 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M17.049660 -7.999958V-0.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M17.525908 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M18.002155 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M18.573652 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M18.954650 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M19.430898 -7.999958V-0.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M19.907145 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M20.383393 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M21.050139 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M21.431137 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M21.907385 -7.999958V-0.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M22.383632 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M22.764630 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M23.145628 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M23.621876 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M24.383872 -7.999958V-0.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M24.860119 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M25.241117 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M25.717365 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M26.479361 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M26.955608 -7.999958V-0.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M27.431856 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M28.003353 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M28.670099 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M29.051097 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M29.432095 -7.999958V-0.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M29.908343 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M30.384590 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M30.956087 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M31.337085 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M31.813333 -7.999958V-0.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M32.289580 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M32.861077 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M33.242075 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M33.813572 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M34.385069 -7.999958V-0.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M34.766067 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M35.337564 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M35.813812 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M36.385309 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M36.861556 -7.999958V-0.000000" style="stroke-width:0.190499"/> + </g> + <text x="0.000000" y="-8.773169" font-family="Verdana" font-size="2.877000"> + ABCDEF12QJ31+ </text> + <g stroke="black"> + <path d="M45.095249 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M45.666746 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M46.142994 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M46.714491 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M47.190738 -7.999958V-0.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M47.666986 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M48.143233 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M48.524231 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M49.095728 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M49.571976 -7.999958V-0.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M50.048223 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M50.524471 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M51.000718 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M51.572215 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M52.048463 -7.999958V-0.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M52.619960 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M53.191457 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M53.667704 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M54.239201 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M54.620199 -7.999958V-0.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M55.001197 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M55.382195 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M55.858443 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M56.525189 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M57.001437 -7.999958V-0.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M57.572934 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M58.049181 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M58.525429 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M59.192175 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M59.573173 -7.999958V-0.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M59.954171 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M60.430419 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M61.001916 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M61.668662 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M62.049660 -7.999958V-0.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M62.525908 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M63.002155 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M63.573652 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M63.954650 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M64.430898 -7.999958V-0.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M64.907145 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M65.383393 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M66.050139 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M66.431137 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M66.907385 -7.999958V-0.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M67.383632 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M67.764630 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M68.145628 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M68.621876 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M69.383872 -7.999958V-0.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M69.860119 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M70.241117 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M70.717365 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M71.479361 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M71.955608 -7.999958V-0.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M72.431856 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M73.003353 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M73.670099 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M74.051097 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M74.432095 -7.999958V-0.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M74.908343 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M75.384590 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M75.956087 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M76.337085 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M76.813333 -7.999958V-0.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M77.289580 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M77.861077 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M78.242075 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M78.813572 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M79.385069 -7.999958V-0.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M79.766067 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M80.337564 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M80.813812 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M81.385309 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M81.861556 -7.999958V-0.000000" style="stroke-width:0.190499"/> + </g> + <text x="63.478403" y="-8.773169" font-family="Verdana" font-size="2.877000" text-anchor="middle"> + ABCDEF12QJ31+ </text> + <g stroke="black"> + <path d="M90.095249 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M90.666746 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M91.142994 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M91.714491 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M92.190738 -7.999958V-0.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M92.666986 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M93.143233 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M93.524231 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M94.095728 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M94.571976 -7.999958V-0.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M95.048223 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M95.524471 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M96.000718 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M96.572215 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M97.048463 -7.999958V-0.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M97.619960 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M98.191457 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M98.667704 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M99.239201 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M99.620199 -7.999958V-0.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M100.001197 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M100.382195 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M100.858443 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M101.525189 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M102.001437 -7.999958V-0.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M102.572934 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M103.049181 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M103.525429 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M104.192175 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M104.573173 -7.999958V-0.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M104.954171 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M105.430419 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M106.001916 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M106.668662 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M107.049660 -7.999958V-0.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M107.525908 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M108.002155 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M108.573652 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M108.954650 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M109.430898 -7.999958V-0.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M109.907145 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M110.383393 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M111.050139 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M111.431137 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M111.907385 -7.999958V-0.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M112.383632 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M112.764630 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M113.145628 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M113.621876 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M114.383872 -7.999958V-0.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M114.860119 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M115.241117 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M115.717365 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M116.479361 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M116.955608 -7.999958V-0.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M117.431856 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M118.003353 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M118.670099 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M119.051097 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M119.432095 -7.999958V-0.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M119.908343 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M120.384590 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M120.956087 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M121.337085 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M121.813333 -7.999958V-0.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M122.289580 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M122.861077 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M123.242075 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M123.813572 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M124.385069 -7.999958V-0.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M124.766067 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M125.337564 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M125.813812 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M126.385309 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M126.861556 -7.999958V-0.000000" style="stroke-width:0.190499"/> + </g> + <text x="126.956806" y="-8.773169" font-family="Verdana" font-size="2.877000" text-anchor="end"> + ABCDEF12QJ31+ </text> + <g stroke="black"> + <path d="M0.095249 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M0.666746 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M1.142994 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M1.714491 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M2.190738 12.000042V20.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M2.666986 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M3.143233 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M3.524231 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M4.095728 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M4.571976 12.000042V20.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M5.048223 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M5.524471 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M6.000718 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M6.572215 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M7.048463 12.000042V20.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M7.619960 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M8.191457 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M8.667704 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M9.239201 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M9.620199 12.000042V20.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M10.001197 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M10.382195 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M10.858443 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M11.525189 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M12.001437 12.000042V20.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M12.572934 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M13.049181 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M13.525429 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M14.192175 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M14.573173 12.000042V20.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M14.954171 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M15.430419 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M16.001916 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M16.668662 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M17.049660 12.000042V20.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M17.525908 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M18.002155 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M18.573652 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M18.954650 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M19.430898 12.000042V20.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M19.907145 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M20.383393 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M21.050139 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M21.431137 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M21.907385 12.000042V20.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M22.383632 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M22.764630 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M23.145628 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M23.621876 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M24.383872 12.000042V20.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M24.860119 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M25.241117 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M25.717365 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M26.479361 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M26.955608 12.000042V20.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M27.431856 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M28.003353 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M28.670099 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M29.051097 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M29.432095 12.000042V20.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M29.908343 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M30.384590 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M30.956087 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M31.337085 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M31.813333 12.000042V20.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M32.289580 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M32.861077 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M33.242075 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M33.813572 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M34.385069 12.000042V20.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M34.766067 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M35.337564 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M35.813812 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M36.385309 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M36.861556 12.000042V20.000000" style="stroke-width:0.190499"/> + </g> + <text x="0.000000" y="22.873212" font-family="Verdana" font-size="2.877000"> + ABCDEF12QJ31+ </text> + <g stroke="black"> + <path d="M45.095249 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M45.666746 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M46.142994 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M46.714491 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M47.190738 12.000042V20.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M47.666986 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M48.143233 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M48.524231 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M49.095728 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M49.571976 12.000042V20.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M50.048223 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M50.524471 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M51.000718 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M51.572215 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M52.048463 12.000042V20.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M52.619960 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M53.191457 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M53.667704 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M54.239201 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M54.620199 12.000042V20.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M55.001197 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M55.382195 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M55.858443 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M56.525189 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M57.001437 12.000042V20.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M57.572934 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M58.049181 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M58.525429 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M59.192175 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M59.573173 12.000042V20.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M59.954171 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M60.430419 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M61.001916 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M61.668662 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M62.049660 12.000042V20.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M62.525908 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M63.002155 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M63.573652 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M63.954650 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M64.430898 12.000042V20.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M64.907145 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M65.383393 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M66.050139 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M66.431137 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M66.907385 12.000042V20.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M67.383632 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M67.764630 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M68.145628 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M68.621876 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M69.383872 12.000042V20.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M69.860119 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M70.241117 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M70.717365 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M71.479361 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M71.955608 12.000042V20.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M72.431856 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M73.003353 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M73.670099 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M74.051097 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M74.432095 12.000042V20.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M74.908343 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M75.384590 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M75.956087 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M76.337085 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M76.813333 12.000042V20.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M77.289580 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M77.861077 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M78.242075 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M78.813572 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M79.385069 12.000042V20.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M79.766067 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M80.337564 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M80.813812 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M81.385309 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M81.861556 12.000042V20.000000" style="stroke-width:0.190499"/> + </g> + <text x="63.478403" y="22.873212" font-family="Verdana" font-size="2.877000" text-anchor="middle"> + ABCDEF12QJ31+ </text> + <g stroke="black"> + <path d="M90.095249 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M90.666746 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M91.142994 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M91.714491 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M92.190738 12.000042V20.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M92.666986 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M93.143233 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M93.524231 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M94.095728 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M94.571976 12.000042V20.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M95.048223 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M95.524471 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M96.000718 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M96.572215 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M97.048463 12.000042V20.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M97.619960 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M98.191457 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M98.667704 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M99.239201 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M99.620199 12.000042V20.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M100.001197 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M100.382195 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M100.858443 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M101.525189 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M102.001437 12.000042V20.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M102.572934 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M103.049181 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M103.525429 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M104.192175 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M104.573173 12.000042V20.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M104.954171 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M105.430419 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M106.001916 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M106.668662 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M107.049660 12.000042V20.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M107.525908 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M108.002155 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M108.573652 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M108.954650 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M109.430898 12.000042V20.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M109.907145 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M110.383393 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M111.050139 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M111.431137 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M111.907385 12.000042V20.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M112.383632 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M112.764630 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M113.145628 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M113.621876 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M114.383872 12.000042V20.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M114.860119 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M115.241117 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M115.717365 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M116.479361 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M116.955608 12.000042V20.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M117.431856 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M118.003353 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M118.670099 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M119.051097 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M119.432095 12.000042V20.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M119.908343 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M120.384590 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M120.956087 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M121.337085 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M121.813333 12.000042V20.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M122.289580 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M122.861077 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M123.242075 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M123.813572 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M124.385069 12.000042V20.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M124.766067 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M125.337564 12.000042V20.000000" style="stroke-width:0.190499"/> + <path d="M125.813812 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M126.385309 12.000042V20.000000" style="stroke-width:0.380998"/> + <path d="M126.861556 12.000042V20.000000" style="stroke-width:0.190499"/> + </g> + <text x="126.956806" y="22.873212" font-family="Verdana" font-size="2.877000" text-anchor="end"> + ABCDEF12QJ31+ </text> +</svg> + diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/my_barcode.svg b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/my_barcode.svg new file mode 100644 index 00000000000..426fb3de867 --- /dev/null +++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/my_barcode.svg @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Barracuda package (https://github.com/robitex/barracuda) --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" + "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg xmlns="http://www.w3.org/2000/svg" + version="1.1" + width="27.177857mm" height="10.873169mm" + viewBox="-2.539987 -7.999958 27.177857 10.873169" +> + <g stroke="black"> + <path d="M0.095249 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M0.666746 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M1.142994 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M1.714491 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M2.190738 -7.999958V-0.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M2.666986 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M3.143233 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M3.524231 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M4.095728 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M4.571976 -7.999958V-0.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M5.048223 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M5.524471 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M6.000718 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M6.572215 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M7.048463 -7.999958V-0.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M7.619960 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M8.191457 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M8.667704 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M9.239201 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M9.620199 -7.999958V-0.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M10.001197 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M10.382195 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M10.858443 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M11.525189 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M12.001437 -7.999958V-0.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M12.572934 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M13.049181 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M13.525429 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M14.192175 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M14.573173 -7.999958V-0.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M14.954171 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M15.430419 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M16.001916 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M16.668662 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M17.049660 -7.999958V-0.000000" style="stroke-width:0.190499"/> + </g> + <g stroke="black"> + <path d="M17.430658 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M17.811656 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M18.192654 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M18.859401 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M19.430898 -7.999958V-0.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M19.907145 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M20.478642 -7.999958V-0.000000" style="stroke-width:0.190499"/> + <path d="M20.954890 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M21.526387 -7.999958V-0.000000" style="stroke-width:0.380998"/> + <path d="M22.002634 -7.999958V-0.000000" style="stroke-width:0.190499"/> + </g> + <text x="0.000000" y="2.873212" font-family="Verdana" font-size="2.877000"> + ABCDEFG </text> +</svg> + diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/001-13-ean-test.pdf b/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/001-13-ean-test.pdf Binary files differnew file mode 100644 index 00000000000..0e8abb933f9 --- /dev/null +++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/001-13-ean-test.pdf diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/001-13-ean-test.tex b/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/001-13-ean-test.tex new file mode 100644 index 00000000000..c0a4db3894e --- /dev/null +++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/001-13-ean-test.tex @@ -0,0 +1,220 @@ +% !TeX program = LuaTeX +% Copyright (C) 2019 Roberto Giacomelli + +\newbox\mybox +\nopagenumbers + +EAN encoder test. + +Test 1: one simple barcode EAN13 with default parameter: + +\directlua{ +local barracuda = require "barracuda" +local barcode = barracuda:get_barcode_class() + +local ean13, err = barcode:new_encoder("ean-13") +assert(not err, err) + +local symbo, err = ean13:from_string("8006194056290") +assert(not err, err) + +local canvas = barracuda:new_canvas() +symbo:append_ga(canvas) + +local drv = barracuda:get_driver() +drv:ga_to_hbox(canvas, "mybox") +} +\vrule A\vrule\box\mybox \vrule A\vrule + +\medskip +Test 2: one simple EAN8 barcode with default parameter: + +\directlua{ +local barracuda = require "barracuda" +local barcode = barracuda:get_barcode_class() + +local ean8, err = barcode:new_encoder("ean-8") +assert(not err, err) + +local symbo, err = ean8:from_string("96385074") +assert(not err, err) + +local canvas = barracuda:new_canvas() +symbo:append_ga(canvas) + +local drv = barracuda:get_driver() +drv:ga_to_hbox(canvas, "mybox") +} +\vrule A\vrule\box\mybox \vrule A\vrule + +\medskip +Test 3: one simple EAN5 barcode with default parameter: + +\directlua{ +local barracuda = require "barracuda" +local barcode = barracuda:get_barcode_class() +local ean5, err = barcode:new_encoder("ean-5") +assert(not err, err) +local symbo, err = ean5:from_string("54495") +assert(not err, err) +local canvas = barracuda:new_canvas() +symbo:append_ga(canvas) +local drv = barracuda:get_driver() +drv:ga_to_hbox(canvas, "mybox") +} +\vrule A\vrule\box\mybox \vrule A\vrule + +\medskip +Test 4: one simple EAN2 barcode with default parameter: + +\directlua{ +local barracuda = require "barracuda" +local barcode = barracuda:get_barcode_class() +local ean2, err = barcode:new_encoder("ean-2") +assert(not err, err) +local symbo, err = ean2:from_string("53") +assert(not err, err) +local canvas = barracuda:new_canvas() +symbo:append_ga(canvas) +local drv = barracuda:get_driver() +drv:ga_to_hbox(canvas, "mybox") +} +\vrule A\vrule\box\mybox \vrule A\vrule + +\medskip +Test 5: EAN13 + EAN5 barcode with default parameter: + +\directlua{ +local barracuda = require "barracuda" +local barcode = barracuda:get_barcode_class() +local ean, err = barcode:new_encoder("ean-13+5"); assert(not err, err) +local n = 123456789012 +local c = ean:checksum(n) +local s = n .. c +local symbo, err = ean:from_string(s.."12345") +assert(not err, err) +local canvas = barracuda:new_canvas() +symbo:append_ga(canvas) +local drv = barracuda:get_driver() +drv:ga_to_hbox(canvas, "mybox") +} +\vrule Test 5\vrule\box\mybox \vrule Test 5\vrule + +\medskip +Test 6: EAN13 + EAN2 barcode with default parameter: + +\directlua{ +local barracuda = require "barracuda" +local barcode = barracuda:get_barcode_class() +local ean, err = barcode:new_encoder("ean-13+2"); assert(not err, err) +local n = 123456789012 +local c = ean:checksum(n) +local s = n .. c +local symbo, err = ean:from_string(s.."12") +assert(not err, err) +local canvas = barracuda:new_canvas() +symbo:append_ga(canvas) +local drv = barracuda:get_driver() +drv:ga_to_hbox(canvas, "mybox") +} +\vrule Test 6\vrule\box\mybox \vrule Test 6\vrule + +\medskip +Test 7: EAN8 + EAN5 barcode with default parameter: + +\directlua{ +local barracuda = require "barracuda" +local barcode = barracuda:get_barcode_class() +local ean, err = barcode:new_encoder("ean-8+5"); assert(not err, err) +local n = 1234567 +local c = ean:checksum(n) +local s = n .. c +local symbo, err = ean:from_string(s.."12345") +assert(not err, err) +local canvas = barracuda:new_canvas() +symbo:append_ga(canvas) +local drv = barracuda:get_driver() +drv:ga_to_hbox(canvas, "mybox") +} +\vrule Test 7\vrule\box\mybox \vrule Test 7\vrule + +\medskip +Test 8: EAN8 + EAN2 barcode with default parameter: + +\directlua{ +local barracuda = require "barracuda" +local barcode = barracuda:get_barcode_class() +local ean, err = barcode:new_encoder("ean-8+2"); assert(not err, err) +local n = 7865431 +local c = ean:checksum(n) +local s = n .. c +local symbo, err = ean:from_string(s.."88") +assert(not err, err) +local canvas = barracuda:new_canvas() +symbo:append_ga(canvas) +local drv = barracuda:get_driver() +drv:ga_to_hbox(canvas, "mybox") +} +\vrule Test 8\vrule\box\mybox \vrule Test 8\vrule + +\medskip +Test 9: draw an EAN13 symbol with a user defined height. + +\smallskip +We will test also the function barcode:enc\_by\_name(bc\_type, name), +reusing encoders generated previuosly. The height parameter remain local +to the object symbol. +\smallskip + +\directlua{ +local barracuda = require "barracuda" +local barcode = barracuda:get_barcode_class() +local ean, err = barcode:enc_by_name("ean-13"); assert(not err, err) +local n = 818571884348 +local c = ean:checksum(n) +local s = n .. c +local symbo, err = ean:from_string(s); assert(not err, err) +local ok, err = symbo:set_param("height", tex.sp "5mm"); assert(ok, err) +local canvas = barracuda:new_canvas() +symbo:append_ga(canvas) + +local s2, err = ean:from_uint(8001120972163); assert(not err, err) +s2:append_ga(canvas, tex.sp "45mm", 0) + +local drv = barracuda:get_driver() +drv:ga_to_hbox(canvas, "mybox") +} +\vrule Test 9\vrule\box\mybox \vrule Test 9\vrule + +\medskip +Test 10: draw EAN13 symbols with a user defined height. + +\smallskip +The parameter height is setting up in the encoder so it will be global. +\smallskip + +\directlua{ +local barracuda = require "barracuda" +local barcode = barracuda:get_barcode_class() +local ean, err = barcode:enc_by_name("ean-13"); assert(not err, err) +local ok, err = ean:set_param("height", tex.sp "5mm"); assert(ok, err) +local n = 758458535897; local c = ean:checksum(n); local s = n .. c +local s1, err = ean:from_string(s); assert(not err, err) +local canvas = barracuda:new_canvas() +s1:append_ga(canvas) +local s2, err = ean:from_uint(8001120972163); assert(not err, err) +s2:append_ga(canvas, tex.sp "40mm", 0) +local s3, err = ean:from_uint(8000570000310); assert(not err, err) +local ok, e = s3:set_param{height = tex.sp "10mm"}; assert(ok, e) +s3:append_ga(canvas, tex.sp "90mm", 0) +local drv = barracuda:get_driver() +drv:ga_to_hbox(canvas, "mybox") +} +\vrule Test 10\vrule\box\mybox \vrule Test 10\vrule + +\medskip +That's all folk! + +\bye + + diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/002-ean-test.pdf b/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/002-ean-test.pdf Binary files differnew file mode 100644 index 00000000000..568050371c8 --- /dev/null +++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/002-ean-test.pdf diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/002-ean-test.tex b/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/002-ean-test.tex new file mode 100644 index 00000000000..2c82373b61a --- /dev/null +++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/002-ean-test.tex @@ -0,0 +1,12 @@ +% !TeX program = LuaTeX +\nopagenumbers +\newbox\mybox +\directlua{ + local barracuda = require "barracuda" + barracuda:hbox("ean-13", "8006194056290", "mybox") +} +\pagewidth=80mm +\pageheight=60mm +\box\mybox +\bye + diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/003-ean-test.pdf b/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/003-ean-test.pdf Binary files differnew file mode 100644 index 00000000000..baa5a5b9cd4 --- /dev/null +++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/003-ean-test.pdf diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/003-ean-test.tex b/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/003-ean-test.tex new file mode 100644 index 00000000000..59b17c4c073 --- /dev/null +++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/003-ean-test.tex @@ -0,0 +1,16 @@ +% !TeX program = LuaLaTeX +\documentclass{standalone} +\usepackage{fontspec} +\setmainfont{ocrb10.otf} +\newbox\mybox +\directlua{ + local barracuda = require "barracuda" + barracuda:hbox("ean-13", "8006194056290", "mybox") +} + +\begin{document} +\box\mybox +\end{document} + + + diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/004-ean-test.lua b/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/004-ean-test.lua new file mode 100644 index 00000000000..017e0725b8b --- /dev/null +++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/004-ean-test.lua @@ -0,0 +1,9 @@ + +local barracuda = require "barracuda" +barracuda:save("ean-13", "8006194056290", "8006194056290") + + + + + + diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/8006194056290.svg b/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/8006194056290.svg new file mode 100644 index 00000000000..f7965e94d4c --- /dev/null +++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/8006194056290.svg @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Barracuda package (https://github.com/robitex/barracuda) --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" + "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg xmlns="http://www.w3.org/2000/svg" + version="1.1" + width="37.289804mm" height="25.279878mm" + viewBox="-3.629981 -24.499871 37.289804 25.279878" +> + <g stroke="black"> + <path d="M0.164999 -24.499871V-0.000000" style="stroke-width:0.329998"/> + <path d="M0.824996 -24.499871V-0.000000" style="stroke-width:0.329998"/> + </g> + <g stroke="black"> + <path d="M2.309988 -24.499871V-1.649991" style="stroke-width:0.659997"/> + <path d="M3.134984 -24.499871V-1.649991" style="stroke-width:0.329998"/> + </g> + <g stroke="black"> + <path d="M3.794980 -24.499871V-1.649991" style="stroke-width:0.329998"/> + <path d="M5.114973 -24.499871V-1.649991" style="stroke-width:0.989995"/> + </g> + <g stroke="black"> + <path d="M6.104968 -24.499871V-1.649991" style="stroke-width:0.329998"/> + <path d="M7.259962 -24.499871V-1.649991" style="stroke-width:1.319993"/> + </g> + <g stroke="black"> + <path d="M8.579955 -24.499871V-1.649991" style="stroke-width:0.659997"/> + <path d="M9.899948 -24.499871V-1.649991" style="stroke-width:0.659997"/> + </g> + <g stroke="black"> + <path d="M11.054942 -24.499871V-1.649991" style="stroke-width:0.329998"/> + <path d="M12.044937 -24.499871V-1.649991" style="stroke-width:0.989995"/> + </g> + <g stroke="black"> + <path d="M13.034931 -24.499871V-1.649991" style="stroke-width:0.329998"/> + <path d="M14.519924 -24.499871V-1.649991" style="stroke-width:0.659997"/> + </g> + <g stroke="black"> + <path d="M15.344919 -24.499871V-0.000000" style="stroke-width:0.329998"/> + <path d="M16.004916 -24.499871V-0.000000" style="stroke-width:0.329998"/> + </g> + <g stroke="black"> + <path d="M16.994911 -24.499871V-1.649991" style="stroke-width:0.989995"/> + <path d="M18.314904 -24.499871V-1.649991" style="stroke-width:0.329998"/> + </g> + <g stroke="black"> + <path d="M18.974900 -24.499871V-1.649991" style="stroke-width:0.329998"/> + <path d="M20.294893 -24.499871V-1.649991" style="stroke-width:0.989995"/> + </g> + <g stroke="black"> + <path d="M21.284888 -24.499871V-1.649991" style="stroke-width:0.329998"/> + <path d="M21.944885 -24.499871V-1.649991" style="stroke-width:0.329998"/> + </g> + <g stroke="black"> + <path d="M23.759875 -24.499871V-1.649991" style="stroke-width:0.659997"/> + <path d="M24.749870 -24.499871V-1.649991" style="stroke-width:0.659997"/> + </g> + <g stroke="black"> + <path d="M26.234862 -24.499871V-1.649991" style="stroke-width:0.989995"/> + <path d="M27.224857 -24.499871V-1.649991" style="stroke-width:0.329998"/> + </g> + <g stroke="black"> + <path d="M28.544850 -24.499871V-1.649991" style="stroke-width:0.989995"/> + <path d="M29.864843 -24.499871V-1.649991" style="stroke-width:0.329998"/> + </g> + <g stroke="black"> + <path d="M30.524839 -24.499871V-0.000000" style="stroke-width:0.329998"/> + <path d="M31.184836 -24.499871V-0.000000" style="stroke-width:0.329998"/> + </g> + <text x="-3.629981" y="0.780007" font-family="Verdana" font-size="2.877000"> + 8 </text> + <text y="0.780007" font-family="Verdana" font-size="2.877000" text-anchor="middle"> + <tspan x="2.043326">0</tspan> + <tspan x="4.459979">0</tspan> + <tspan x="6.876631">6</tspan> + <tspan x="9.293284">1</tspan> + <tspan x="11.709936">9</tspan> + <tspan x="14.126589">4</tspan> + </text> + <text y="0.780007" font-family="Verdana" font-size="2.877000" text-anchor="middle"> + <tspan x="17.223246">0</tspan> + <tspan x="19.639899">5</tspan> + <tspan x="22.056551">6</tspan> + <tspan x="24.473204">2</tspan> + <tspan x="26.889856">9</tspan> + <tspan x="29.306509">0</tspan> + </text> +</svg> + diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-ga-pdfliteral/001-ga-pdfliteral-test.pdf b/Master/texmf-dist/doc/luatex/barracuda/test/test-ga-pdfliteral/001-ga-pdfliteral-test.pdf Binary files differnew file mode 100644 index 00000000000..b8a7477c7fc --- /dev/null +++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-ga-pdfliteral/001-ga-pdfliteral-test.pdf diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-ga-pdfliteral/001-ga-pdfliteral-test.tex b/Master/texmf-dist/doc/luatex/barracuda/test/test-ga-pdfliteral/001-ga-pdfliteral-test.tex new file mode 100644 index 00000000000..1a5ed80d0c5 --- /dev/null +++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-ga-pdfliteral/001-ga-pdfliteral-test.tex @@ -0,0 +1,740 @@ +% !TeX program = LuaTeX +% test for ga-canvas pdfliteral driver +% +% Copyright (C) 2019 Roberto Giacomelli +% see LICENSE.txt file + +---ga--- is a binary format as an istruction set similar to +a sort of assembler language that describes simple graphic +objects like lines and rectangles. +This file contains tests aiming to check the pdfliteral +driver capability to render such ga streams---usually a Lua +array. + +The pdfliteral driver directly inserts PDF vector graphic +primitives within the output and should be intented as the +"native" driver of barracuda package. + +The complete reference of the ---ga--- format is available +throgh out the content of the "ga-grammar.tex" file. + +Please note that all dimensions are in scaled point, the +very small \TeX{} internal unit, in fact we have that +65536sp = 1pt. + +Running the source file with luatex. The typesetting engine +executes the directlua macro, so vector graphics appear in +the PDF output file. + +\newbox\mybox +\directlua{ + driver = require [[lib-driver.brcd-driver]] % global Lua variables + pt = tex.sp [[1pt]] % 1pt = 65536sp +} + +Let's start drawing an horizontal line 100pt long: +\directlua{ + local ga = {_data = {33, 0*pt, 100*pt, 0*pt}} + driver:ga_to_hbox(ga, [[mybox]]) +}\box\mybox + +or two different parallel lines 24pt long: +\directlua{ + local ga = {_data = {33, 0*pt, 24*pt, 0*pt, 33, 0*pt, 24*pt, 5*pt}} + driver:ga_to_hbox(ga, [[mybox]]) +}\box\mybox + +and again two horizontal lines 10pt thick, touching a corner: +\directlua{ + local ga = {_data = { + 1, 10*pt, + 33, -24*pt, 0*pt, -5*pt, + 33, 0*pt, 24*pt, 5*pt, + }} + driver:ga_to_hbox(ga, [[mybox]]) +}\box\mybox + +Several vertical lines with its horizontal limits: +\directlua{ + local ga = { _data = { + 34, -20*pt, 20*pt, 0*pt, + 34, -15*pt, 15*pt, 5*pt, + 34, -10*pt, 10*pt, 10*pt, + 34, -5*pt, 5*pt, 15*pt, + 34, -.5*pt, .5*pt, 20*pt, + 34, -5*pt, 5*pt, 25*pt, + 34, -10*pt, 10*pt, 30*pt, + 34, -15*pt, 15*pt, 35*pt, + 34, -20*pt, 20*pt, 40*pt, + 1, .05*pt, + 33, 0*pt, 40*pt, -20*pt, + 33, 0*pt, 40*pt, 20*pt, + }} + driver:ga_to_hbox(ga, [[mybox]]) +}\box\mybox + +Finally a little rectangle: +\directlua{ + local ga = {_data = { + 1, 5*pt, + 48, 0*pt, 0*pt, 15*pt, 10*pt, + }} + driver:ga_to_hbox(ga, [[mybox]]) +}\box\mybox + +\bigskip +Test number 1: a vbar 2pt width, 20pt height: +\directlua{ + % vbar: <36> y1 y2 <nbars> x1 w1 x2 w2 ... xn wn + local ga = {_data = {36, 0, 20*pt, 1, 0.0, 2*pt}} + driver:ga_to_hbox(ga, [[mybox]]) +}\box\mybox + +\bigskip +Test number 2: ten vbars in a row equally spaced by 10pt: +\directlua{ + local ga = {36, 0, 10*pt, 10,} + for i = 0, 9 do + ga[i*2 + 5] = 5*pt + i*20*pt + ga[i*2 + 6] = 10*pt + end + driver:ga_to_hbox({_data = ga}, [[mybox]]) +}\vrule\box\mybox\vrule + +\bigskip +Test number 3: two series of vbars 10pt and 5pt large: +\directlua{ + local ga = {36, 0, 10*pt, 10,} + for i = 0, 9 do + ga[i*2 + 5] = 5*pt + i*20*pt + ga[i*2 + 6] = 10*pt + end + ga[25] = 36 % vbar opcode + ga[26] = 2.5*pt % y1 + ga[27] = 7.5*pt % y2 + ga[28] = 9 % number of bars + for i = 0, 8 do + ga[i*2 + 29] = 15*pt + i*20*pt + ga[i*2 + 30] = 5*pt + end + driver:ga_to_hbox({_data = ga}, [[mybox]]) +}\vrule\box\mybox\vrule + +\bigskip +Test number 4: a bunch of thin vertical bars (25): +\directlua{ + local ga = {} + ga[1] = 36 % vbar opcode + ga[2] = 5*pt % y1 + ga[3] = 25*pt % y2 + ga[4] = 25 % number of bars + for i = 0, 24 do + ga[i*2 + 5] = 1*pt + i*4*pt + ga[i*2 + 6] = 2*pt + end + driver:ga_to_hbox({_data = ga}, [[mybox]]) +}\vrule A\box\mybox A\vrule + +\bigskip +Test number 5: two rows of a bunch of thin bars: +\directlua{ + local ga = {} + ga[1] = 36 % vbar opcode + ga[2] = 5*pt % y1 + ga[3] = 25*pt % y2 + ga[4] = 25 % number of bars + for i = 0, 24 do + ga[i*2 + 5] = 1*pt + i*4*pt + ga[i*2 + 6] = 2*pt + end + ga[55] = 36 % vbar opcode + ga[56] = 25*pt % y1 + ga[57] = 45*pt % y2 + ga[58] = 24 % number of bars + for i = 0, 23 do + ga[i*2 + 59] = 3*pt + i*4*pt + ga[i*2 + 60] = 2*pt + end + driver:ga_to_hbox({_data = ga}, [[mybox]]) +}\vrule\box\mybox\vrule + +\bigskip +Test number 6: staircase of Vbars (manually data definition): +\directlua{ + local ga = { + 36, % vbar opcode + 0*pt, % y1 + 20*pt, % y2 + 1, % number of bars + 5*pt, % x + 10*pt, % w + 36, % vbar opcode + 20*pt, % y1 + 40*pt, % y2 + 1, % number of bars + 15*pt, % x + 10*pt, % w + 36, % vbar opcode + 40*pt, % y1 + 60*pt, % y2 + 1, % number of bars + 25*pt, % x + 10*pt, % w + } + driver:ga_to_hbox({_data = ga}, [[mybox]]) +}\vrule\box\mybox\vrule + +\bigskip +Test number 7: vbars with spaced text, in three different rows: +\directlua{ + local ga = {} + ga[1] = 36 % vbar opcode + ga[2] = 0*pt % y1 + ga[3] = 20*pt % y2 + ga[4] = 8 % number of bars + for i = 1,8 do + ga[3 + i*2] = i * 2 * 5*pt % x coordinate of bar axis + ga[4 + i*2] = 5*pt % bar width + end + ga[21] = 36 % vbar opcode + ga[22] = 30*pt % y1 + ga[23] = 50*pt % y2 + ga[24] = 8 % number of bars + for i = 1,8 do + ga[23 + i*2] = i * 2 * 5*pt % x coordinate of bar axis + ga[24 + i*2] = 5*pt % bar width + end + % 131 <x1: FLOAT> <xgap: FLOAT> <ay: DIM> <ypos: DIM> <c: CHARS> + ga[41] = 131 % opcode text_xspaced + ga[42] = 10*pt % x coordinate of the first glyph axis + ga[43] = 10*pt % x gap among glyphs + ga[44] = 0.5 % half height + ga[45] = 25*pt % y coordinate of glyps + ga[46] = 65 % A + ga[47] = 66 % B + ga[48] = 67 % C + ga[49] = 68 % D + ga[50] = 69 % E + ga[51] = 70 % F + ga[52] = 71 % G + ga[53] = 72 % H + ga[54] = 0 + driver:ga_to_hbox({_data = ga}, [[mybox]]) +}\vrule\box\mybox\vrule + +\bigskip +Test number 8: spaced text (checking the correct vertical alignment): +\directlua{ + local ga = {} + ga[1] = 36 % vbar opcode + ga[2] = 0*pt % y1 + ga[3] = 20*pt % y2 + ga[4] = 8 % number of bars + for i = 1,8 do + ga[3 + i*2] = i * 2 * 5*pt % x coordinate of bar axis + ga[4 + i*2] = 1*pt % bar width + end + ga[21] = 36 % vbar opcode + ga[22] = 40*pt % y1 + ga[23] = 60*pt % y2 + ga[24] = 8 % number of bars + for i = 1,8 do + ga[23 + i*2] = i * 2 * 5*pt % x coordinate of bar axis + ga[24 + i*2] = 1*pt % bar width + end + % 131 <x1: FLOAT> <xgap: FLOAT> <ay: DIM> <ypos: DIM> <c: CHARS> + ga[41] = 131 % opcode text_xspaced + ga[42] = 10*pt % x coordinate of the first glyph axis + ga[43] = 10*pt % x gap among glyphs + ga[44] = 0.0 % half height + ga[45] = 30*pt % y coordinate of glyps + ga[46] = 65 % A + ga[47] = 66 % B + ga[48] = 67 % C + ga[49] = string.byte("Q") + ga[50] = 69 % E + ga[51] = 70 % F + ga[52] = 71 % G + ga[53] = 72 % H + ga[54] = 0 + ga[55] = 131 % opcode text_xspaced + ga[56] = 10*pt % x coordinate of the first glyph axis + ga[57] = 10*pt % x gap among glyphs + ga[58] = 1.0 % half height + ga[59] = 30*pt % y coordinate of glyps + ga[60] = 49 % 1 + ga[61] = 50 % 2 + ga[62] = 51 % 3 + ga[63] = 52 % 4 + ga[64] = 53 % 5 + ga[65] = 54 % 6 + ga[66] = 55 % 7 + ga[67] = 56 % 8 + ga[68] = 0 + driver:ga_to_hbox({_data = ga}, [[mybox]]) +}\vrule\box\mybox\vrule + +\bigskip +Test number 9: spaced text, check correct vertical alignment: +\directlua{ + local ga = {} + ga[1] = 36 % vbar opcode + ga[2] = 0*pt % y1 + ga[3] = 20*pt % y2 + ga[4] = 8 % number of bars + for i = 1,8 do + ga[3 + i*2] = i * 2 * 5*pt % x coordinate of bar axis + ga[4 + i*2] = 8*pt % bar width + end + ga[21] = 36 % vbar opcode + ga[22] = 40*pt % y1 + ga[23] = 60*pt % y2 + ga[24] = 8 % number of bars + for i = 1,8 do + ga[23 + i*2] = i * 2 * 5*pt % x coordinate of bar axis + ga[24 + i*2] = 8*pt % bar width + end + % 131 <x1: FLOAT> <xgap: FLOAT> <ay: DIM> <ypos: DIM> <c: CHARS> + ga[41] = 131 % opcode text_xspaced + ga[42] = 10*pt % x coordinate of the first glyph axis + ga[43] = 10*pt % x gap among glyphs + ga[44] = 0.0 % half height + ga[45] = 20*pt % y coordinate of glyps + ga[46] = 65 % A + ga[47] = 66 % B + ga[48] = 67 % C + ga[49] = 68 % D + ga[50] = 69 % E + ga[51] = 70 % F + ga[52] = 71 % G + ga[53] = 72 % H + ga[54] = 0 + ga[55] = 131 % opcode text_xspaced + ga[56] = 10*pt % x coordinate of the first glyph axis + ga[57] = 10*pt % x gap among glyphs + ga[58] = 1.0 % half height + ga[59] = 40*pt % y coordinate of glyps + ga[60] = 49 % 1 + ga[61] = 50 % 2 + ga[62] = 51 % 3 + ga[63] = 52 % 4 + ga[64] = 53 % 5 + ga[65] = 54 % 6 + ga[66] = 55 % 7 + ga[67] = 56 % 8 + ga[68] = 0 + driver:ga_to_hbox({_data = ga}, [[mybox]]) +}\vrule\box\mybox\vrule + +\bigskip +Test number 10: two centered texts aligned to the baseline: +\directlua{ + local ga = {} + % 130 <ax: FLOAT> <ay: FLOAT> <xpos: DIM> <ypos: DIM> <c: CHARS> + ga[ 1] = 130 % opcode text + ga[ 2] = 0.5 % ax relative x coordinate + ga[ 3] = 1.0 % ay relative y coordinate + ga[ 4] = 0.0 % x position + ga[ 5] = 0.0 % y position + ga[ 6] = 65 % A + ga[ 7] = string.byte("Q") % Q depth glyph + ga[ 8] = 67 % C + ga[ 9] = 0 + ga[10] = 130 % opcode text + ga[11] = 0.5 % ax + ga[12] = 0.0 % ay + ga[13] = 0.0 % x + ga[14] = 0.0 % y + ga[15] = 48 % 0 + ga[16] = 49 % 1 + ga[17] = 50 % 2 + ga[18] = 51 % 3 + ga[19] = 52 % 4 + ga[20] = 53 % 5 + ga[21] = 54 % 6 + ga[22] = 55 % 7 + ga[23] = 56 % 8 + ga[24] = 57 % 9 + ga[25] = 0 + driver:ga_to_hbox({_data = ga}, [[mybox]]) +}\vrule\box\mybox\vrule + +\bigskip +So far, we have manually build data for ga stream. Next we are going to +use the ga-canvas library. + +\bigskip +In fact, all the previous tests are rebuild with the ga-canvas library. + +Test 1: a vbar 2pt width, 20pt height: +\directlua{ + gacanvas = require "lib-geo.brcd-gacanvas" + local ga = gacanvas:new() + local vbar = {_yline = {0.0, 2*pt}} + local err = ga:encode_Vbar(vbar, 0.0, 0.0, 20*pt) % x, w + assert(not err, err) + driver:ga_to_hbox(ga, [[mybox]]) +}\box\mybox + +\bigskip +Test 2: ten vbars equally spaced by 10pt: +\directlua{ + local ga = gacanvas:new() + local data = {} + for i = 0, 9 do + data[i*2 + 1] = 5*pt + i*20*pt % x + data[i*2 + 2] = 10*pt % w + end + local bars = {_yline = data} + local err = ga:encode_Vbar(bars, 0.0, 0.0, 10*pt) + assert(not err, err) + driver:ga_to_hbox(ga, [[mybox]]) +}\vrule\box\mybox\vrule + +\bigskip +Test 3: two series of vbars 10pt and 5pt large: +\directlua{ + local b1 = {} + for i = 0, 9 do + b1[i*2 + 1] = i*20*pt + b1[i*2 + 2] = 10*pt + end + local b2 = {} + for i = 0, 8 do + b2[i*2 + 1] = i*20*pt + b2[i*2 + 2] = 5*pt + end + local ga = gacanvas:new() + local err = ga:encode_Vbar({_yline=b1}, 0.0, 0.0, 10*pt) + assert(not err, err) + err = ga:encode_Vbar({_yline=b2}, 10.0*pt, 2.5*pt, 7.5*pt) + assert(not err, err) + driver:ga_to_hbox(ga, [[mybox]]) +}\vrule\box\mybox\vrule + +\bigskip +Test 4: a bunch of thin bars: +\directlua{ + local b = {} + for i = 0, 24 do + b[i*2 + 1] = 1*pt + i*4*pt + b[i*2 + 2] = 2*pt + end + local ga = gacanvas:new() + local err = ga:encode_Vbar({_yline=b}, 0.0, 5*pt, 25*pt) + assert(not err, err) + driver:ga_to_hbox(ga, [[mybox]]) +}\vrule{ }\box\mybox{ }\vrule + +\bigskip +Test 5: two levels of a bunch of thin bars: +\directlua{ + local b = {} + for i = 0, 24 do + b[i*2 + 1] = i*4*pt + b[i*2 + 2] = 2*pt + end + local b = {_yline=b} + local ga = gacanvas:new() + local err = ga:encode_Vbar(b, 0.0, 5*pt, 25*pt) + assert(not err, err) + err = ga:encode_Vbar(b, 2*pt, 25*pt, 45*pt, b) + driver:ga_to_hbox(ga, [[mybox]]) +}\vrule\box\mybox\vrule + +\bigskip +Test number 6: staircase of bars (manual insertion of data): +\directlua{ + local b = {_yline={0.0, 10*pt}} + local ga = gacanvas:new() + local err = ga:encode_Vbar(b, 0.0, 0.0, 20*pt) + assert(not err, err) + err = ga:encode_Vbar(b, 10*pt, 20*pt, 40*pt) + assert(not err, err) + err = ga:encode_Vbar(b, 20*pt, 40*pt, 60*pt) + assert(not err, err) + driver:ga_to_hbox(ga, [[mybox]]) +}\vrule\box\mybox\vrule + +\bigskip +Test number 7: vbars with spaced text, all in three rows: +\directlua{ + local b = {} + for i = 0,7 do + b[i*2+1] = i*10*pt + b[i*2+2] = 5*pt + end + local vb = {_yline=b} + local ga = gacanvas:new() + local err = ga:encode_Vbar(vb, 0.0, 0.0, 20*pt) + assert(not err, err) + local err = ga:encode_Vbar(vb, 0.0, 30*pt, 50*pt) + assert(not err, err) + local txt = {codepoint = { + 65, % A + 66, % B + 67, % C + 68, % D + 69, % E + 70, % F + 71, % G + 72, % H + }} + err = ga:encode_Text_xspaced(txt, 0.0, 10*pt, 25*pt, 0.5) + assert(not err, err) + driver:ga_to_hbox(ga, [[mybox]]) +}\vrule\box\mybox\vrule + +\bigskip +Test 8: spaced text, check correct vertical alignment: +\directlua{ + local b = {} + for i = 0,7 do + b[i*2+1] = i*10*pt + b[i*2+2] = 2*pt + end + b = {_yline=b} + local ga = gacanvas:new() + local err = ga:encode_Vbar(b, 0.0, 0.0, 20*pt) + assert(not err, err) + local err = ga:encode_Vbar(b, 0.0, 40*pt, 60*pt) + assert(not err, err) + local c = { codepoint = { + 65, % A + 66, % B + 67, % C + string.byte("Q"), + 69, % E + 70, % F + 71, % G + 72, % H + }} + err = ga:encode_Text_xspaced(c, 0.0, 10*pt, 30*pt, 0.0) + assert(not err, err) + local n = { codepoint = { + 49, % 1 + 50, % 2 + 51, % 3 + 52, % 4 + 53, % 5 + 54, % 6 + 55, % 7 + 56, % 8 + }} + err = ga:encode_Text_xspaced(n, 0.0, 10*pt, 30*pt, 1.0) + assert(not err, err) + driver:ga_to_hbox(ga, [[mybox]]) +}\vrule\box\mybox\vrule + +\bigskip +Test number 9: spaced text, check correct vertical alignment: +\directlua{ + local b = {} + for i = 0,7 do + b[i*2+1] = i*10*pt + b[i*2+2] = 8*pt + end + b = {_yline = b} + local ga = gacanvas:new() + local err = ga:encode_Vbar(b, 0.0, 0.0, 20*pt) + assert(not err, err) + local err = ga:encode_Vbar(b, 0.0, 40*pt, 60*pt) + assert(not err, err) + local c = { codepoint = { + 65, % A + 66, % B + 67, % C + string.byte("Q"), + 69, % E + 70, % F + 71, % G + 72, % H + }} + err = ga:encode_Text_xspaced(c, 0.0, 10*pt, 20*pt, 0.0) + assert(not err, err) + local n = { codepoint = { + 49, % 1 + 50, % 2 + 51, % 3 + 52, % 4 + 53, % 5 + 54, % 6 + 55, % 7 + 56, % 8 + }} + err = ga:encode_Text_xspaced(n, 0.0, 10*pt, 40*pt, 1.0) + assert(not err, err) + driver:ga_to_hbox(ga, [[mybox]]) +}\vrule{ }\box\mybox{ }\vrule + +\bigskip +Test number 10: two centered texts and baseline aligned: +\directlua{ + local n = { codepoint = { + 48, % 0 + 49, % 1 + 50, % 2 + 51, % 3 + 52, % 4 + 53, % 5 + 54, % 6 + 55, % 7 + 56, % 8 + 57, % 9 + }} + local ga = gacanvas:new() + local err = ga:encode_Text(n, 0, 0, 0.5, 0) + assert(not err, err) + local a = { codepoint = { + 65, % A + string.byte("Q"), % Q + 67, % C + }} + err = ga:encode_Text(a, 0, 0, 0.5, 1) + assert(not err, err) + driver:ga_to_hbox(ga, [[mybox]]) +}\vrule\box\mybox\vrule + +\bigskip +Test number 11: two centered texts aligned: +\directlua{ + local n = { codepoint = { + 48, % 0 + 49, % 1 + 50, % 2 + 51, % 3 + 52, % 4 + 53, % 5 + 54, % 6 + 55, % 7 + 56, % 8 + 57, % 9 + }} + local ga = gacanvas:new() + local err = ga:encode_Text(n, 0, 0, 0.5, 1) + assert(not err, err) + local a = { codepoint = { + 65, % A + string.byte("Q"), % Q + 67, % C + }} + err = ga:encode_Text(a, 0, 0, 0.5, 0) + assert(not err, err) + driver:ga_to_hbox(ga, [[mybox]]) +}\vrule\box\mybox\vrule + +\bigskip +Test number 12: text\_xwidth opcode: + +\directlua{ + local n = { codepoint = { + 48, % 0 + 49, % 1 + 50, % 2 + 51, % 3 + 52, % 4 + 53, % 5 + 54, % 6 + 55, % 7 + 56, % 8 + 57, % 9 + }} + local ga = gacanvas:new() + local err = ga:encode_Text_xwidth(n, 0, tex.sp "5cm", 0, 0) + assert(not err, err) + driver:ga_to_hbox(ga, [[mybox]]) +}\vrule\box\mybox\vrule + +\vrule\hbox to 5cm{0 \hfill9}\vrule + +\bigskip +Test number 13: text\_xwidth with different size: +\smallskip + +\directlua{ + local n = {codepoint = { + 48, % 0 + 49, % 1 + 50, % 2 + 51, % 3 + 52, % 4 + 53, % 5 + 54, % 6 + 55, % 7 + 56, % 8 + 57, % 9 + }} + local ga = gacanvas:new() + % (txt, x1, x2, ypos, ay) --> err + local err = ga:encode_Text_xwidth(n, tex.sp "0mm", tex.sp "50mm", 0, 0) + assert(not err, err) + local err = ga:encode_Text_xwidth(n, tex.sp "5mm", tex.sp "45mm", tex.sp "3mm", 0) + assert(not err, err) + local err = ga:encode_Text_xwidth(n, tex.sp "10mm", tex.sp "40mm", tex.sp "6mm", 0) + assert(not err, err) + local err = ga:encode_Text_xwidth(n, tex.sp "15mm", tex.sp "35mm", tex.sp "9mm", 0) + assert(not err, err) + local err = ga:encode_Text_xwidth(n, tex.sp "20mm", tex.sp "30mm", tex.sp "12mm", 0) + assert(not err, err) + local err = ga:encode_Text_xwidth(n, tex.sp "24mm", tex.sp "26mm", tex.sp "15mm", 0) + assert(not err, err) + driver:ga_to_hbox(ga, [[mybox]]) +}\vrule\box\mybox\vrule + +\bigskip +Test number 14: place bars and text as text\_xwidth: +\smallskip + +\directlua{ + local b = {} + for i = 0, 9 do + b[i*2 + 1] = i*12*pt + b[i*2 + 2] = 0.4*pt + end + b = {_yline = b} + local n = {codepoint = { 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,}} + local ga = gacanvas:new() + % (vbar, x0, y1, y2) --> err + local err = ga:encode_Vbar(b, 0.0, 0*pt, 25*pt) + local err = ga:encode_Vbar(b, 0.0, 32*pt, 42*pt) + assert(not err, err) + % (txt, x1, x2, ypos, ay) --> err + local err = ga:encode_Text_xwidth(n, 0*pt, 108*pt, 25*pt, 0) + assert(not err, err) + driver:ga_to_hbox(ga, [[mybox]]) +}\vrule\box\mybox\vrule + +\smallskip +\directlua{ + local b = {} + for i = 0, 8 do + b[i*2 + 1] = i*12*pt + b[i*2 + 2] = 0.2*pt + end + b = {_yline = b} + local n = { 48, 49, 50, 51, string.byte([[x]]), 53, 54, 55, 56,} + n = {codepoint = n} + local ga = gacanvas:new() + % x0, y1, y2, bars + local err = ga:encode_Vbar(b, 0.0, 0*pt, 25*pt) + local err = ga:encode_Vbar(b, 0.0, 32*pt, 42*pt) + assert(not err, err) + % (txt, x1, x2, ypos, ay) --> err + local err = ga:encode_Text_xwidth(n, 0*pt, 96*pt, 25*pt, 0) + assert(not err, err) + driver:ga_to_hbox(ga, [[mybox]]) +}\vrule\box\mybox\vrule + +\bigskip +Test number 15: place text\_xwidth when text is only two chars long: + +\directlua{ + local n = {codepoint = { 48, 56,}} % 0 and 8 + local ga = gacanvas:new() + % (txt, x1, x2, ypos, ay) --> err + local err = ga:encode_Text_xwidth(n, 0*pt, 32*pt, 25*pt, 0) + assert(not err, err) + driver:ga_to_hbox(ga, [[mybox]]) +}\vrule\box\mybox\vrule + +\bye diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-ga-svg/001-ga-svg-test.lua b/Master/texmf-dist/doc/luatex/barracuda/test/test-ga-svg/001-ga-svg-test.lua new file mode 100644 index 00000000000..2f932235cb1 --- /dev/null +++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-ga-svg/001-ga-svg-test.lua @@ -0,0 +1,28 @@ +-- test SVG driver output + +local barracuda = require "barracuda" +local driver = barracuda:get_driver() + +local mm = 186467.9811 -- 1 mm in sp +local ga1 = { _data = { 1, 1*mm, + 34, 10*mm, 100*mm, 0*mm, -- vline, y1, y2, x + 34, 20*mm, 90*mm, 10*mm, + 34, 30*mm, 80*mm, 20*mm, + 34, 40*mm, 70*mm, 30*mm, + 34, 50*mm, 60*mm, 40*mm, +}} + +driver:save("svg", ga1, "test-01") + +local ga2 = { _data = { + 1, 5*mm, + 34, 0*mm, 50*mm, 2.5*mm, + 33, 0*mm, 50*mm, 40*mm, +}} + +driver:save("svg", ga2, "test-02") + + + + + diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-ga-svg/002-ga-svg-test.lua b/Master/texmf-dist/doc/luatex/barracuda/test/test-ga-svg/002-ga-svg-test.lua new file mode 100644 index 00000000000..8f10d6dfbf7 --- /dev/null +++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-ga-svg/002-ga-svg-test.lua @@ -0,0 +1,18 @@ +-- test SVG driver output + +local barracuda = require "barracuda" +local barcode = barracuda:get_barcode_class() +local driver = barracuda:get_driver() + +local opt = {module = 15 * 0.0254 * 186467, height = 12 * 186467} + +local c39, err = barcode:new_encoder("code39", nil, opt) +assert(not err, err) + +local symbol, err = c39:from_string("ABC000Z") +assert(not err, err) + +local canvas = barracuda:new_canvas() +symbol:append_ga(canvas) + +driver:save("svg", canvas, "test-code39")
\ No newline at end of file diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-ga-svg/test-01.svg b/Master/texmf-dist/doc/luatex/barracuda/test/test-ga-svg/test-01.svg new file mode 100644 index 00000000000..77e3ba6e0c0 --- /dev/null +++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-ga-svg/test-01.svg @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Barracuda package (https://github.com/robitex/barracuda) --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" + "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg xmlns="http://www.w3.org/2000/svg" + version="1.1" + width="41.000000mm" height="90.000000mm" + viewBox="-0.500000 -100.000000 41.000000 90.000000" +> + <path d="M0.000000 -100.000000V-10.000000" + style="stroke:#000000;stroke-width:1.000000" + /> + <path d="M10.000000 -90.000000V-20.000000" + style="stroke:#000000;stroke-width:1.000000" + /> + <path d="M20.000000 -80.000000V-30.000000" + style="stroke:#000000;stroke-width:1.000000" + /> + <path d="M30.000000 -70.000000V-40.000000" + style="stroke:#000000;stroke-width:1.000000" + /> + <path d="M40.000000 -60.000000V-50.000000" + style="stroke:#000000;stroke-width:1.000000" + /> +</svg> + diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-ga-svg/test-02.svg b/Master/texmf-dist/doc/luatex/barracuda/test/test-ga-svg/test-02.svg new file mode 100644 index 00000000000..ff7862b12f0 --- /dev/null +++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-ga-svg/test-02.svg @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Barracuda package (https://github.com/robitex/barracuda) --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" + "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg xmlns="http://www.w3.org/2000/svg" + version="1.1" + width="50.000000mm" height="50.000000mm" + viewBox="0.000000 -50.000000 50.000000 50.000000" +> + <path d="M2.500000 -50.000000V-0.000000" + style="stroke:#000000;stroke-width:5.000000" + /> + <path d="M0.000000 -40.000000H50.000000" + style="stroke:#000000;stroke-width:5.000000" + /> +</svg> + diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-ga-svg/test-code39.svg b/Master/texmf-dist/doc/luatex/barracuda/test/test-ga-svg/test-code39.svg new file mode 100644 index 00000000000..8453a6bdebc --- /dev/null +++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-ga-svg/test-code39.svg @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Barracuda package (https://github.com/robitex/barracuda) --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" + "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg xmlns="http://www.w3.org/2000/svg" + version="1.1" + width="51.815727mm" height="14.873148mm" + viewBox="-3.809980 -11.999937 51.815727 14.873148" +> + <g stroke="black"> + <path d="M0.190499 -11.999937V-0.000000" style="stroke-width:0.380998"/> + <path d="M1.333493 -11.999937V-0.000000" style="stroke-width:0.380998"/> + <path d="M2.285988 -11.999937V-0.000000" style="stroke-width:0.761996"/> + <path d="M3.428982 -11.999937V-0.000000" style="stroke-width:0.761996"/> + <path d="M4.381477 -11.999937V-0.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M5.333972 -11.999937V-0.000000" style="stroke-width:0.761996"/> + <path d="M6.286467 -11.999937V-0.000000" style="stroke-width:0.380998"/> + <path d="M7.048463 -11.999937V-0.000000" style="stroke-width:0.380998"/> + <path d="M8.191457 -11.999937V-0.000000" style="stroke-width:0.380998"/> + <path d="M9.143952 -11.999937V-0.000000" style="stroke-width:0.761996"/> + </g> + <g stroke="black"> + <path d="M10.096447 -11.999937V-0.000000" style="stroke-width:0.380998"/> + <path d="M11.048942 -11.999937V-0.000000" style="stroke-width:0.761996"/> + <path d="M12.001437 -11.999937V-0.000000" style="stroke-width:0.380998"/> + <path d="M13.144431 -11.999937V-0.000000" style="stroke-width:0.380998"/> + <path d="M14.096926 -11.999937V-0.000000" style="stroke-width:0.761996"/> + </g> + <g stroke="black"> + <path d="M15.239920 -11.999937V-0.000000" style="stroke-width:0.761996"/> + <path d="M16.382914 -11.999937V-0.000000" style="stroke-width:0.761996"/> + <path d="M17.335409 -11.999937V-0.000000" style="stroke-width:0.380998"/> + <path d="M18.478403 -11.999937V-0.000000" style="stroke-width:0.380998"/> + <path d="M19.240399 -11.999937V-0.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M20.002395 -11.999937V-0.000000" style="stroke-width:0.380998"/> + <path d="M20.764391 -11.999937V-0.000000" style="stroke-width:0.380998"/> + <path d="M22.097884 -11.999937V-0.000000" style="stroke-width:0.761996"/> + <path d="M23.240878 -11.999937V-0.000000" style="stroke-width:0.761996"/> + <path d="M24.193373 -11.999937V-0.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M24.955369 -11.999937V-0.000000" style="stroke-width:0.380998"/> + <path d="M25.717365 -11.999937V-0.000000" style="stroke-width:0.380998"/> + <path d="M27.050858 -11.999937V-0.000000" style="stroke-width:0.761996"/> + <path d="M28.193852 -11.999937V-0.000000" style="stroke-width:0.761996"/> + <path d="M29.146347 -11.999937V-0.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M29.908343 -11.999937V-0.000000" style="stroke-width:0.380998"/> + <path d="M30.670339 -11.999937V-0.000000" style="stroke-width:0.380998"/> + <path d="M32.003832 -11.999937V-0.000000" style="stroke-width:0.761996"/> + <path d="M33.146826 -11.999937V-0.000000" style="stroke-width:0.761996"/> + <path d="M34.099321 -11.999937V-0.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M34.861317 -11.999937V-0.000000" style="stroke-width:0.380998"/> + <path d="M36.194810 -11.999937V-0.000000" style="stroke-width:0.761996"/> + <path d="M37.337804 -11.999937V-0.000000" style="stroke-width:0.761996"/> + <path d="M38.290299 -11.999937V-0.000000" style="stroke-width:0.380998"/> + <path d="M39.052295 -11.999937V-0.000000" style="stroke-width:0.380998"/> + </g> + <g stroke="black"> + <path d="M39.814291 -11.999937V-0.000000" style="stroke-width:0.380998"/> + <path d="M40.957285 -11.999937V-0.000000" style="stroke-width:0.380998"/> + <path d="M41.909779 -11.999937V-0.000000" style="stroke-width:0.761996"/> + <path d="M43.052773 -11.999937V-0.000000" style="stroke-width:0.761996"/> + <path d="M44.005268 -11.999937V-0.000000" style="stroke-width:0.380998"/> + </g> + <text x="0.000000" y="2.873212" font-family="Verdana" font-size="2.877000"> + ABC000Z </text> +</svg> + diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-i2of5/001-i2of5-test.pdf b/Master/texmf-dist/doc/luatex/barracuda/test/test-i2of5/001-i2of5-test.pdf Binary files differnew file mode 100644 index 00000000000..3aa107681c4 --- /dev/null +++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-i2of5/001-i2of5-test.pdf diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-i2of5/001-i2of5-test.tex b/Master/texmf-dist/doc/luatex/barracuda/test/test-i2of5/001-i2of5-test.tex new file mode 100644 index 00000000000..43c652d66a8 --- /dev/null +++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-i2of5/001-i2of5-test.tex @@ -0,0 +1,187 @@ +% !TeX program = LuaTeX +% Copyright (C) 2019 Roberto Giacomelli + +\newbox\mybox +\nopagenumbers + +\directlua{barracuda = require "barracuda"} + +Interleaved 2 of 5 encoder test. + +Test 1: one simple barcode with default parameters: + +\directlua{ +local barcode = barracuda:get_barcode_class() + +local enc, err = barcode:new_encoder("i2of5"); assert(not err, err) +local symbo, err = enc:from_uint(54654681); assert(not err, err) +local canvas = barracuda:new_canvas(); symbo:append_ga(canvas) +local drv = barracuda:get_driver() +drv:ga_to_hbox(canvas, "mybox") +} +\vrule A\vrule\box\mybox \vrule A\vrule + +\bigskip +Test 2: one simple barcode with default parameter: + +\directlua{ +local barcode = barracuda:get_barcode_class() +local enc, err = barcode:enc_by_name("i2of5"); assert(not err, err) +local symbo, err = enc:from_uint(1234567895); assert(not err, err) +local canvas = barracuda:new_canvas(); symbo:append_ga(canvas) +local drv = barracuda:get_driver() +drv:ga_to_hbox(canvas, "mybox") +} +\vrule A\vrule\box\mybox \vrule A\vrule + +% check digit tests + +\directlua{% verify check digits, the last one +local code = { + 7352621, + 9624764, + 7592881, + 5344147, + 742238, + 199766, + 4544739, + 2774794, + 8509895, + 8285157, + 5387564, + 5534371, + 2155678, + 4529545, + 4689164, + 1674910, + 5317837, + 4117698, +} +local barcode = barracuda:get_barcode_class() +local enc, err = barcode:enc_by_name("i2of5"); assert(not err, err) +for _, n in ipairs(code) do + local smbl, err = enc:from_uint(n, {check_digit_policy="verify"}) + assert(not err, err) +end +} + +\directlua{% check digits evaluation +local code = { + ["735262"] = 1, + ["962476"] = 4, + ["759288"] = 1, + ["534414"] = 7, + ["74223"] = 8, + ["19976"] = 6, + ["454473"] = 9, + ["277479"] = 4, + ["850989"] = 5, + ["828515"] = 7, + ["538756"] = 4, + ["553437"] = 1, + ["215567"] = 8, + ["452954"] = 5, + ["468916"] = 4, + ["167491"] = 0, + ["531783"] = 7, + ["411769"] = 8, +} +local barcode = barracuda:get_barcode_class() +local enc, err = barcode:enc_by_name("i2of5"); assert(not err, err) +for sc, ck in pairs(code) do + local n = tonumber(sc) + local c, err = enc:get_checkdigit(n) + assert(not err, err) + assert(c == ck, "Wrong check digit "..c.." vs "..ck .." for "..sc) +end +} + +\bigskip +Test 3: one simple barcode with check digit automatically added: + +\directlua{ +local barcode = barracuda:get_barcode_class() +local enc, err = barcode:enc_by_name("i2of5"); assert(not err, err) +local symbo, err = enc:from_uint(454473, {check_digit_policy="add"}) +assert(not err, err) +local canvas = barracuda:new_canvas(); symbo:append_ga(canvas) +local drv = barracuda:get_driver() +drv:ga_to_hbox(canvas, "mybox") +} +\vrule A\vrule\box\mybox \vrule A\vrule + +\bigskip +Test 4: a second simple barcode with check digit automatically added: + +\directlua{ +local barcode = barracuda:get_barcode_class() +local enc, err = barcode:enc_by_name("i2of5"); assert(not err, err) +local symbo, err = enc:from_uint(74223, {check_digit_policy="add"}) +assert(not err, err) +local canvas = barracuda:new_canvas(); symbo:append_ga(canvas) +local drv = barracuda:get_driver() +drv:ga_to_hbox(canvas, "mybox") +} +\vrule A\vrule\box\mybox \vrule A\vrule + +\bigskip +Test 5: a symbol with native check digits: + +\directlua{ +local barcode = barracuda:get_barcode_class() +local enc, err = barcode:enc_by_name("i2of5"); assert(not err, err) +local symbo, err = enc:from_uint(121891259, {check_digit_policy="verify"}) +assert(not err, err) +local canvas = barracuda:new_canvas(); symbo:append_ga(canvas) +local drv = barracuda:get_driver() +drv:ga_to_hbox(canvas, "mybox") +} +\vrule A\vrule\box\mybox \vrule A\vrule + +\bigskip +Test 6: bearer bars please: + +\directlua{ +local barcode = barracuda:get_barcode_class() +local enc, err = barcode:enc_by_name("i2of5"); assert(not err, err) +local symbo, err = enc:from_uint(747867239, {bearer_bars_enabled = true}) +assert(not err, err) +local canvas = barracuda:new_canvas(); symbo:append_ga(canvas) +local drv = barracuda:get_driver() +drv:ga_to_hbox(canvas, "mybox") +} +\vrule A\vrule\box\mybox \vrule A\vrule + +\bigskip +Test 7: bearer bars all around the symbol: + +\directlua{ +local barcode = barracuda:get_barcode_class() +local enc, err = barcode:enc_by_name("i2of5"); assert(not err, err) +local symbo, err = enc:from_uint(986790868, {bearer_bars_enabled = true, bearer_bars_layout="frame"}) +assert(not err, err) +local canvas = barracuda:new_canvas(); symbo:append_ga(canvas) +local drv = barracuda:get_driver() +drv:ga_to_hbox(canvas, "mybox") +} +\vrule A\vrule\box\mybox \vrule A\vrule + +\bigskip +Test 8: bearer bars all around the symbol (with string costructor): + +\directlua{ +local barcode = barracuda:get_barcode_class() +local enc, err = barcode:enc_by_name("i2of5"); assert(not err, err) +local symbo, err = enc:from_string("986790868", {bearer_bars_enabled = true, bearer_bars_layout="frame"}) +assert(not err, err) +local canvas = barracuda:new_canvas(); symbo:append_ga(canvas) +local drv = barracuda:get_driver() +drv:ga_to_hbox(canvas, "mybox") +} +\vrule A\vrule\box\mybox \vrule A\vrule + +That's all folks! + +\bye + + |