diff options
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/luaharfbuzz/docs')
6 files changed, 7 insertions, 566 deletions
diff --git a/Build/source/texk/web2c/luatexdir/luaharfbuzz/docs/examples/core_types.lua.html b/Build/source/texk/web2c/luatexdir/luaharfbuzz/docs/examples/core_types.lua.html index fe9e5c39c9b..6345ea3c6fa 100644 --- a/Build/source/texk/web2c/luatexdir/luaharfbuzz/docs/examples/core_types.lua.html +++ b/Build/source/texk/web2c/luatexdir/luaharfbuzz/docs/examples/core_types.lua.html @@ -101,7 +101,7 @@ glyphs = buf:get_glyphs() </div> <!-- id="main" --> <div id="about"> <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i> -<i style="float:right;">Last updated 2019-04-13 17:03:03 </i> +<i style="float:right;">Last updated 2019-07-31 18:39:39 </i> </div> <!-- id="about" --> </div> <!-- id="container" --> </body> diff --git a/Build/source/texk/web2c/luatexdir/luaharfbuzz/docs/examples/custom_callbacks.lua.html b/Build/source/texk/web2c/luatexdir/luaharfbuzz/docs/examples/custom_callbacks.lua.html deleted file mode 100644 index eff09e27b8d..00000000000 --- a/Build/source/texk/web2c/luatexdir/luaharfbuzz/docs/examples/custom_callbacks.lua.html +++ /dev/null @@ -1,85 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> -<head> - <title>luaharfbuzz Documentation</title> - <link rel="stylesheet" href="../ldoc.css" type="text/css" /> -</head> -<body> - -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - - -<div id="main"> - - -<!-- Menu --> - -<div id="navigation"> -<br/> -<h1>luaharfbuzz</h1> - - - - -<h2>Examples</h2> -<ul class="nowrap"> - <li><a href="../examples/core_types.lua.html">core_types.lua</a></li> - <li><strong>custom_callbacks.lua</strong></li> - <li><a href="../examples/harfbuzz_setup.lua.html">harfbuzz_setup.lua</a></li> - <li><a href="../examples/ot_font_loader.lua.html">ot_font_loader.lua</a></li> - <li><a href="../examples/package_path_searcher.lua.html">package_path_searcher.lua</a></li> -</ul> -<h2>Modules</h2> -<ul class="nowrap"> - <li><a href="../index.html">harfbuzz</a></li> -</ul> - -</div> - -<div id="content"> - - <h2>custom_callbacks.lua</h2> -<pre> -<span class="comment">-- Switch off some callbacks -</span>callback.register(<span class="string">"hyphenate"</span>, <span class="keyword">false</span>) -callback.register(<span class="string">"ligaturing"</span>, <span class="keyword">false</span>) -callback.register(<span class="string">"kerning"</span>, <span class="keyword">false</span>) - -<span class="comment">-- Add debug statements to some callbacks -</span>callback.register(<span class="string">"post_linebreak_filter"</span>, <span class="keyword">function</span>() - texio.write_nl(<span class="string">"POST_LINEBREAK"</span>) - <span class="keyword">return</span> <span class="keyword">true</span> -<span class="keyword">end</span>) - -callback.register(<span class="string">"hpack_filter"</span>, <span class="keyword">function</span>() - texio.write_nl(<span class="string">"HPACK"</span>) - <span class="keyword">return</span> <span class="keyword">true</span> -<span class="keyword">end</span>) - -callback.register(<span class="string">"vpack_filter"</span>, <span class="keyword">function</span>() - texio.write_nl(<span class="string">"VPACK"</span>) - <span class="keyword">return</span> <span class="keyword">true</span> -<span class="keyword">end</span>) - -callback.register(<span class="string">"buildpage_filter"</span>, <span class="keyword">function</span>(extrainfo) - texio.write_nl(<span class="string">"BUILDPAGE_FILTER "</span>..extrainfo) -<span class="keyword">end</span>)</pre> - - -</div> <!-- id="content" --> -</div> <!-- id="main" --> -<div id="about"> -<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.5</a></i> -<i style="float:right;">Last updated 2016-08-31 21:59:58 </i> -</div> <!-- id="about" --> -</div> <!-- id="container" --> -</body> -</html> diff --git a/Build/source/texk/web2c/luatexdir/luaharfbuzz/docs/examples/harfbuzz_setup.lua.html b/Build/source/texk/web2c/luatexdir/luaharfbuzz/docs/examples/harfbuzz_setup.lua.html deleted file mode 100644 index dba607a9f6c..00000000000 --- a/Build/source/texk/web2c/luatexdir/luaharfbuzz/docs/examples/harfbuzz_setup.lua.html +++ /dev/null @@ -1,231 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> -<head> - <title>luaharfbuzz Documentation</title> - <link rel="stylesheet" href="../ldoc.css" type="text/css" /> -</head> -<body> - -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - - -<div id="main"> - - -<!-- Menu --> - -<div id="navigation"> -<br/> -<h1>luaharfbuzz</h1> - - - - -<h2>Examples</h2> -<ul class="nowrap"> - <li><a href="../examples/core_types.lua.html">core_types.lua</a></li> - <li><a href="../examples/custom_callbacks.lua.html">custom_callbacks.lua</a></li> - <li><strong>harfbuzz_setup.lua</strong></li> - <li><a href="../examples/ot_font_loader.lua.html">ot_font_loader.lua</a></li> - <li><a href="../examples/package_path_searcher.lua.html">package_path_searcher.lua</a></li> -</ul> -<h2>Modules</h2> -<ul class="nowrap"> - <li><a href="../index.html">harfbuzz</a></li> -</ul> - -</div> - -<div id="content"> - - <h2>harfbuzz_setup.lua</h2> -<pre> -<span class="comment">-- Allow external Lua modules to be loaded. -</span><span class="global">dofile</span> <span class="string">'package_path_searcher.lua'</span> - -<span class="comment">-- Attach a OpenType font loader to define_font callback. -</span><span class="global">require</span> <span class="string">'ot_font_loader'</span> - -<span class="comment">-- Disable some callbacks, and attach debug logging to others. -</span><span class="global">require</span> <span class="string">'custom_callbacks'</span> - -<span class="comment">-- List all callbacks -</span><span class="keyword">local</span> serpent = <span class="global">require</span> <span class="string">'serpent'</span> -texio.write_nl(serpent.block(callback.list())) - -<span class="comment">-- Load luaharfbuzz -</span><span class="keyword">local</span> harfbuzz = <span class="global">require</span> <span class="string">'harfbuzz'</span> - -<span class="keyword">local</span> lt_to_hb_dir = { TLT = <span class="string">"ltr"</span>, TRT = <span class="string">"rtl"</span> } -<span class="comment">-- local hb_to_lt_dir = { ltr = "TLT", rtl = "TRT" } -</span> -<span class="keyword">local</span> <span class="keyword">function</span> upem_to_sp(v,font) - <span class="keyword">return</span> <span class="global">math</span>.floor(v / font.units_per_em * font.size) -<span class="keyword">end</span> - -<span class="comment">-- Print the contents of a nodelist. -</span><span class="comment">-- Glyph nodes are printed as UTF-8 characters, while other nodes are printed -</span><span class="comment">-- by calling node.type on it, along with the subtype of the node. -</span><span class="keyword">local</span> <span class="keyword">function</span> show_nodes (head, raw) - <span class="keyword">local</span> nodes = <span class="string">''</span> - <span class="keyword">for</span> item <span class="keyword">in</span> node.traverse(head) <span class="keyword">do</span> - <span class="keyword">local</span> i = item.id - <span class="keyword">if</span> i == node.id(<span class="string">"glyph"</span>) <span class="keyword">then</span> - <span class="keyword">if</span> raw <span class="keyword">then</span> i = <span class="global">string</span>.format(<span class="string">'<glyph %d>'</span>, item.char) <span class="keyword">else</span> i = unicode.utf8.char(item.char) <span class="keyword">end</span> - <span class="keyword">else</span> - i = <span class="global">string</span>.format(<span class="string">'<%s%s>'</span>, node.<span class="global">type</span>(i), ( item.subtype <span class="keyword">and</span> (<span class="string">"("</span>.. item.subtype .. <span class="string">")"</span>) <span class="keyword">or</span> <span class="string">''</span>)) - <span class="keyword">end</span> - nodes = nodes .. i .. <span class="string">' '</span> - <span class="keyword">end</span> - texio.write_nl(nodes) - <span class="keyword">return</span> <span class="keyword">true</span> -<span class="keyword">end</span> - -<span class="comment">-- Process a paragraph nodelist and shape it with Harfbuzz. -</span><span class="comment">-- Only works for the most simple paragraphs. Check the assertions in the code -</span><span class="comment">-- to understand what kind of nodes the shaping routine is expecting at -</span><span class="comment">-- any point. -</span><span class="keyword">local</span> <span class="keyword">function</span> process_nodes(head) - <span class="comment">-- Pointer to traverse head nodelist -</span> <span class="keyword">local</span> head_slider = head - - <span class="comment">-- First node is a local_par -</span> <span class="global">assert</span>(head_slider.id == node.id(<span class="string">"local_par"</span>), <span class="string">"local_par expected"</span>) - - <span class="comment">-- Get direction -</span> <span class="keyword">local</span> dir = head_slider.dir - texio.write_nl(<span class="string">"direction is: "</span>..dir) - - - <span class="comment">-- Second node is indentation -</span> head_slider = head_slider.<span class="global">next</span> - <span class="global">assert</span>(head_slider.id == node.id(<span class="string">"hlist"</span>) <span class="keyword">and</span> head_slider.subtype == <span class="number">3</span>, <span class="string">"parindent hlist expected"</span>) - - <span class="comment">-- Check if font can be shaped by Harfbuzz -</span> <span class="keyword">local</span> fontid = head_slider.<span class="global">next</span>.font - texio.write_nl(<span class="string">"fontid is "</span>..fontid) - <span class="keyword">local</span> font = font.getfont(fontid) - <span class="keyword">if</span> <span class="keyword">not</span> font.harfbuzz <span class="keyword">then</span> <span class="keyword">return</span> head <span class="keyword">end</span> - texio.write_nl(<span class="string">"paragraph can be shaped by Harfbuzz"</span>) - - <span class="comment">-- Initialise new head -</span> <span class="keyword">local</span> new_head = node.copy_list(head, head_slider.<span class="global">next</span>) - <span class="global">assert</span>(node.length(new_head) == <span class="number">2</span>, <span class="string">"expected two nodes in new_head"</span>) - - <span class="comment">-- Pointer to traverse new heade nodelist -</span> <span class="keyword">local</span> new_head_slider = node.slide(new_head) - - <span class="comment">-- Build text -</span> <span class="keyword">local</span> codepoints = { } - <span class="keyword">while</span> head_slider.<span class="global">next</span>.id ~= node.id(<span class="string">"penalty"</span>) <span class="keyword">do</span> - head_slider = head_slider.<span class="global">next</span> - <span class="keyword">if</span> head_slider.id == node.id(<span class="string">"glyph"</span>) <span class="keyword">then</span> - <span class="global">table</span>.insert(codepoints, head_slider.char) - <span class="keyword">elseif</span> head_slider.id == node.id(<span class="string">"glue"</span>) <span class="keyword">and</span> head_slider.subtype == <span class="number">13</span> <span class="keyword">then</span> - <span class="global">table</span>.insert(codepoints, <span class="number">0x20</span>) - <span class="keyword">else</span> - <span class="global">error</span>(<span class="global">string</span>.format(<span class="string">"Cant handle node of type %s, subtype %s"</span>, node.<span class="global">type</span>(head_slider.id), <span class="global">tostring</span>(head_slider.subtype))) - <span class="keyword">end</span> - <span class="keyword">end</span> - - <span class="comment">-- Initialise new tail at the last penalty node. -</span> <span class="keyword">local</span> new_tail = head_slider.<span class="global">next</span> - - <span class="comment">-- Skip over penalty node -</span> head_slider = head_slider.<span class="global">next</span>.<span class="global">next</span> - - <span class="comment">-- Last node is a \parfillskip -</span> <span class="global">assert</span>(head_slider.id == node.id(<span class="string">"glue"</span>) <span class="keyword">and</span> head_slider.subtype == <span class="number">15</span>, <span class="string">"\\parfillskip expected"</span>) - <span class="global">assert</span>(<span class="keyword">not</span> head_slider.<span class="global">next</span>, <span class="string">"Expected this to be the last node."</span>) - - <span class="comment">-- Shape text -</span> <span class="keyword">local</span> buf = harfbuzz.Buffer.new() - buf:set_cluster_level(harfbuzz.Buffer.HB_BUFFER_CLUSTER_LEVEL_CHARACTERS) - buf:add_codepoints(codepoints) - harfbuzz.shape(font.harfbuzz.font,buf, { direction = lt_to_hb_dir[dir] }) - - <span class="comment">-- Create new nodes from shaped text -</span> <span class="keyword">if</span> dir == <span class="string">'TRT'</span> <span class="keyword">then</span> buf:reverse() <span class="keyword">end</span> - <span class="keyword">local</span> glyphs = buf:get_glyph_infos_and_positions() - - <span class="keyword">for</span> _, v <span class="keyword">in</span> <span class="global">ipairs</span>(glyphs) <span class="keyword">do</span> - <span class="keyword">local</span> n,k <span class="comment">-- Node and (optional) Kerning -</span> <span class="keyword">local</span> char = font.backmap[v.codepoint] - <span class="keyword">if</span> codepoints[v.cluster+<span class="number">1</span>] == <span class="number">0x20</span> <span class="keyword">then</span> - <span class="global">assert</span>(char == <span class="number">0x20</span> <span class="keyword">or</span> char == <span class="number">0xa0</span>, <span class="string">"Expected char to be 0x20 or 0xa0"</span>) - n = node.new(<span class="string">"glue"</span>) - n.subtype = <span class="number">0</span> - n.width = font.parameters.space - n.stretch = font.parameters.space_stretch - n.shrink = font.parameters.space_shrink - new_head_slider.<span class="global">next</span> = n - <span class="keyword">else</span> - <span class="comment">-- Create glyph node -</span> n = node.new(<span class="string">"glyph"</span>) - n.font = fontid - n.char = char - n.subtype = <span class="number">1</span> - - <span class="comment">-- Set offsets from Harfbuzz data -</span> n.yoffset = upem_to_sp(v.y_offset, font) - n.xoffset = upem_to_sp(v.x_offset, font) - <span class="keyword">if</span> dir == <span class="string">'TRT'</span> <span class="keyword">then</span> n.xoffset = n.xoffset * -<span class="number">1</span> <span class="keyword">end</span> - - <span class="comment">-- Adjust kerning if Harfbuzz’s x_advance does not match glyph width -</span> <span class="keyword">local</span> x_advance = upem_to_sp(v.x_advance, font) - <span class="keyword">if</span> <span class="global">math</span>.abs(x_advance - n.width) > <span class="number">1</span> <span class="keyword">then</span> <span class="comment">-- needs kerning -</span> k = node.new(<span class="string">"kern"</span>) - k.kern = (x_advance - n.width) - <span class="keyword">end</span> - - <span class="comment">-- Insert glyph node into new list, -</span> <span class="comment">-- adjusting for direction and kerning. -</span> <span class="keyword">if</span> k <span class="keyword">then</span> - <span class="keyword">if</span> dir == <span class="string">'TRT'</span> <span class="keyword">then</span> <span class="comment">-- kerning goes before glyph -</span> k.<span class="global">next</span> = n - new_head_slider.<span class="global">next</span> = k - <span class="keyword">else</span> <span class="comment">-- kerning goes after glyph -</span> n.<span class="global">next</span> = k - new_head_slider.<span class="global">next</span> = n - <span class="keyword">end</span> - <span class="keyword">else</span> <span class="comment">-- no kerning -</span> new_head_slider.<span class="global">next</span> = n - <span class="keyword">end</span> - <span class="keyword">end</span> - new_head_slider = node.slide(new_head_slider) - <span class="keyword">end</span> - - new_head_slider.<span class="global">next</span> = new_tail - texio.write_nl(<span class="string">"No. of nodes after shaping: "</span>..node.length(new_head)) - show_nodes(new_head, <span class="keyword">true</span>) - <span class="keyword">return</span> new_head -<span class="keyword">end</span> - -<span class="comment">-- Callback function -</span><span class="keyword">local</span> <span class="keyword">function</span> show_and_process_nodes(head) - texio.write_nl(<span class="string">"No. of nodes: "</span>..node.length(head)) - show_nodes(head) - <span class="keyword">return</span> process_nodes(head) -<span class="keyword">end</span> - -<span class="comment">-- Register shaping callback -</span>callback.register(<span class="string">"pre_linebreak_filter"</span>, show_and_process_nodes)</pre> - - -</div> <!-- id="content" --> -</div> <!-- id="main" --> -<div id="about"> -<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.5</a></i> -<i style="float:right;">Last updated 2016-08-31 21:59:58 </i> -</div> <!-- id="about" --> -</div> <!-- id="container" --> -</body> -</html> diff --git a/Build/source/texk/web2c/luatexdir/luaharfbuzz/docs/examples/ot_font_loader.lua.html b/Build/source/texk/web2c/luatexdir/luaharfbuzz/docs/examples/ot_font_loader.lua.html deleted file mode 100644 index 1abf52eebde..00000000000 --- a/Build/source/texk/web2c/luatexdir/luaharfbuzz/docs/examples/ot_font_loader.lua.html +++ /dev/null @@ -1,139 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> -<head> - <title>luaharfbuzz Documentation</title> - <link rel="stylesheet" href="../ldoc.css" type="text/css" /> -</head> -<body> - -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - - -<div id="main"> - - -<!-- Menu --> - -<div id="navigation"> -<br/> -<h1>luaharfbuzz</h1> - - - - -<h2>Examples</h2> -<ul class="nowrap"> - <li><a href="../examples/core_types.lua.html">core_types.lua</a></li> - <li><a href="../examples/custom_callbacks.lua.html">custom_callbacks.lua</a></li> - <li><a href="../examples/harfbuzz_setup.lua.html">harfbuzz_setup.lua</a></li> - <li><strong>ot_font_loader.lua</strong></li> - <li><a href="../examples/package_path_searcher.lua.html">package_path_searcher.lua</a></li> -</ul> -<h2>Modules</h2> -<ul class="nowrap"> - <li><a href="../index.html">harfbuzz</a></li> -</ul> - -</div> - -<div id="content"> - - <h2>ot_font_loader.lua</h2> -<pre> -<span class="keyword">local</span> harfbuzz = <span class="global">require</span>(<span class="string">'harfbuzz'</span>) - -<span class="comment">-- Load OpenType font. -</span><span class="comment">-- https://tug.org/TUGboat/tb33-1/tb103isambert.pdf -</span><span class="keyword">local</span> <span class="keyword">function</span> read_font (name, size, fontid) - <span class="keyword">if</span> size < <span class="number">0</span> <span class="keyword">then</span> - size = size * tex.sp(<span class="string">"10pt"</span>) / -<span class="number">1000</span> - <span class="keyword">end</span> - - <span class="comment">-- Load file using fontloader.open -</span> <span class="keyword">local</span> f = fontloader.open (name) - <span class="keyword">local</span> fonttable = fontloader.to_table(f) - fontloader.close(f) - - <span class="keyword">local</span> metrics = { - name = fonttable.fontname, - fullname = fonttable.fontname..fontid, - psname = fonttable.fontname, - <span class="global">type</span> = <span class="string">"real"</span>, - filename = name, - format = <span class="global">string</span>.match(<span class="global">string</span>.lower(name), <span class="string">"otf$"</span>) <span class="keyword">and</span> <span class="string">"opentype"</span> <span class="keyword">or</span> <span class="global">string</span>.match(<span class="global">string</span>.lower(name), <span class="string">"ttf$"</span>) <span class="keyword">and</span> <span class="string">"truetype"</span>, - embedding = <span class="string">'subset'</span>, - size = size, - designsize = fonttable.design_size*<span class="number">6553.6</span>, - cidinfo = fonttable.cidinfo, - units_per_em = fonttable.units_per_em - } - - <span class="comment">-- Scaling for font metrics -</span> <span class="keyword">local</span> mag = size / fonttable.units_per_em - - <span class="comment">-- Find glyph for 0x20, and get width for spacing glue. -</span> <span class="keyword">local</span> space_glyph = fonttable.map.map[<span class="number">0x20</span>] - <span class="keyword">local</span> space_glyph_table = fonttable.glyphs[space_glyph] - <span class="keyword">local</span> space_glyph_width = space_glyph_table.width * mag - - metrics.parameters = { - slant = <span class="number">0</span>, - space = space_glyph_width, - space_stretch = <span class="number">1.5</span> * space_glyph_width, - space_shrink = <span class="number">0.5</span> * space_glyph_width, - x_height = fonttable.pfminfo.os2_xheight * mag, - quad = <span class="number">1.0</span> * size, - extra_space = <span class="number">0</span> - } - - <span class="comment">-- Save backmap in TeX font, so we can get char code from glyph index -</span> <span class="comment">-- obtainded from Harfbuzz -</span> metrics.backmap = fonttable.map.backmap - - metrics.characters = { } - <span class="keyword">for</span> char, glyph <span class="keyword">in</span> <span class="global">pairs</span>(fonttable.map.map) <span class="keyword">do</span> - <span class="keyword">local</span> glyph_table = fonttable.glyphs[glyph] - metrics.characters[char] = { - index = glyph, - width = glyph_table.width * mag, - name = glyph_table.name, - } - <span class="keyword">if</span> glyph_table.boundingbox[<span class="number">4</span>] <span class="keyword">then</span> - metrics.characters[char].height = glyph_table.boundingbox[<span class="number">4</span>] * mag - <span class="keyword">end</span> - <span class="keyword">if</span> glyph_table.boundingbox[<span class="number">2</span>] <span class="keyword">then</span> - metrics.characters[char].depth = -glyph_table.boundingbox[<span class="number">2</span>] * mag - <span class="keyword">end</span> - <span class="keyword">end</span> - - <span class="comment">-- Store Harfbuzz data in the font to retrieve it in the shaping routine. -</span> <span class="keyword">local</span> face = harfbuzz.Face.new(name) - metrics.harfbuzz = { - face = face, - font = harfbuzz.Font.new(face) - } - - <span class="keyword">return</span> metrics -<span class="keyword">end</span> - -<span class="comment">-- Register OpenType font loader in define_font callback. -</span>callback.register(<span class="string">'define_font'</span>, read_font, <span class="string">"font loader"</span>)</pre> - - -</div> <!-- id="content" --> -</div> <!-- id="main" --> -<div id="about"> -<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.5</a></i> -<i style="float:right;">Last updated 2016-08-31 21:59:58 </i> -</div> <!-- id="about" --> -</div> <!-- id="container" --> -</body> -</html> diff --git a/Build/source/texk/web2c/luatexdir/luaharfbuzz/docs/examples/package_path_searcher.lua.html b/Build/source/texk/web2c/luatexdir/luaharfbuzz/docs/examples/package_path_searcher.lua.html deleted file mode 100644 index 9ff317b2ea0..00000000000 --- a/Build/source/texk/web2c/luatexdir/luaharfbuzz/docs/examples/package_path_searcher.lua.html +++ /dev/null @@ -1,104 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> -<head> - <title>luaharfbuzz Documentation</title> - <link rel="stylesheet" href="../ldoc.css" type="text/css" /> -</head> -<body> - -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - - -<div id="main"> - - -<!-- Menu --> - -<div id="navigation"> -<br/> -<h1>luaharfbuzz</h1> - - - - -<h2>Examples</h2> -<ul class="nowrap"> - <li><a href="../examples/core_types.lua.html">core_types.lua</a></li> - <li><a href="../examples/custom_callbacks.lua.html">custom_callbacks.lua</a></li> - <li><a href="../examples/harfbuzz_setup.lua.html">harfbuzz_setup.lua</a></li> - <li><a href="../examples/ot_font_loader.lua.html">ot_font_loader.lua</a></li> - <li><strong>package_path_searcher.lua</strong></li> -</ul> -<h2>Modules</h2> -<ul class="nowrap"> - <li><a href="../index.html">harfbuzz</a></li> -</ul> - -</div> - -<div id="content"> - - <h2>package_path_searcher.lua</h2> -<pre> -<span class="comment">-- Allows Lua modules to be loaded from package.path and package.cpath. -</span><span class="comment">-- -</span><span class="comment">-- This behavior is overridden by default in LuaTeX. This module reverts the -</span><span class="comment">-- packaging searching logic to use package.path and package.cpath first, -</span><span class="comment">-- failing which it tries to use the overridden loading logic (which uses -</span><span class="comment">-- kpse). -</span><span class="comment">-- -</span><span class="comment">-- Package Loading References: -</span><span class="comment">-- 1. http://www.lua.org/manual/5.2/manual.html#pdf-package.searchers -</span><span class="comment">-- 2. LuaTeX Manual, Section 3.2, Lua behavior -</span> -<span class="keyword">local</span> make_loader = <span class="keyword">function</span>(path, pos,loadfunc) - <span class="keyword">local</span> default_loader = <span class="global">package</span>.searchers[pos] - <span class="keyword">local</span> loader = <span class="keyword">function</span>(name) - <span class="keyword">local</span> file = <span class="global">package</span>.searchpath(name,path) - <span class="keyword">if</span> <span class="keyword">not</span> file <span class="keyword">then</span> - <span class="keyword">local</span> msg = <span class="string">"\n\t[lualoader] Search failed"</span> - <span class="keyword">local</span> ret = default_loader(name) - <span class="keyword">if</span> <span class="global">type</span>(ret) == <span class="string">"string"</span> <span class="keyword">then</span> - <span class="keyword">return</span> msg ..ret - <span class="keyword">elseif</span> <span class="global">type</span>(ret) == <span class="string">"nil"</span> <span class="keyword">then</span> - <span class="keyword">return</span> msg - <span class="keyword">else</span> - <span class="keyword">return</span> ret - <span class="keyword">end</span> - <span class="keyword">end</span> - <span class="keyword">local</span> loader,err = loadfunc(file) - <span class="keyword">if</span> <span class="keyword">not</span> loader <span class="keyword">then</span> - <span class="keyword">return</span> <span class="string">"\n\t[lualoader] Loading error:\n\t"</span>..err - <span class="keyword">end</span> - <span class="keyword">return</span> loader - <span class="keyword">end</span> - <span class="global">package</span>.searchers[pos] = loader -<span class="keyword">end</span> - -<span class="keyword">local</span> binary_loader = <span class="keyword">function</span>(file) - <span class="keyword">local</span> base = file:match(<span class="string">"/([^%.]+)%.[%w]+$"</span>) - <span class="keyword">local</span> symbol = base:gsub(<span class="string">"%."</span>,<span class="string">"_"</span>) - <span class="keyword">return</span> <span class="global">package</span>.loadlib(file, <span class="string">"luaopen_"</span>..symbol) -<span class="keyword">end</span> - -make_loader(<span class="global">package</span>.path,<span class="number">2</span>,<span class="global">loadfile</span>) -make_loader(<span class="global">package</span>.cpath,<span class="number">3</span>, binary_loader)</pre> - - -</div> <!-- id="content" --> -</div> <!-- id="main" --> -<div id="about"> -<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.5</a></i> -<i style="float:right;">Last updated 2016-08-31 21:59:58 </i> -</div> <!-- id="about" --> -</div> <!-- id="container" --> -</body> -</html> diff --git a/Build/source/texk/web2c/luatexdir/luaharfbuzz/docs/index.html b/Build/source/texk/web2c/luatexdir/luaharfbuzz/docs/index.html index 443a4117ffc..d1aaf74c0fa 100644 --- a/Build/source/texk/web2c/luatexdir/luaharfbuzz/docs/index.html +++ b/Build/source/texk/web2c/luatexdir/luaharfbuzz/docs/index.html @@ -66,9 +66,9 @@ <p> <ul> - <li><a href="http://github.com/deepakjois/luaharfbuzz/wiki">Wiki</a></li> - <li><a href="https://github.com/deepakjois/luaharfbuzz">Source on Github</a></li> - <li><a href="https://github.com/deepakjois/luaharfbuzz/blob/master/status/done.txt">API Coverage Status</a></li> + <li><a href="http://github.com/ufytex/luaharfbuzz/wiki">Wiki</a></li> + <li><a href="https://github.com/ufytex/luaharfbuzz">Source on Github</a></li> + <li><a href="https://github.com/ufytex/luaharfbuzz/blob/master/status/done.txt">API Coverage Status</a></li> </ul> </p> <h3>Info:</h3> @@ -651,7 +651,7 @@ <li><code>language</code>: A <code>Language</code> object representing the language.</li> <li><code>features</code>: features to enable, specified as either of the following. <ul> - <li>comma-separated list of features. See <a href="https://github.com/deepakjois/luaharfbuzz/wiki/Feature-Strings">feature string syntax reference</a></li> + <li>comma-separated list of features. See <a href="https://github.com/ufytex/luaharfbuzz/wiki/Feature-Strings">feature string syntax reference</a></li> <li>table of <code>Feature</code> objects</li> </ul></li> </ul> @@ -1774,7 +1774,7 @@ <h3>Parameters:</h3> <ul> <li><span class="parameter">feature_string</span> - See <a href="https://github.com/deepakjois/luaharfbuzz/wiki/Feature-Strings">feature string syntax reference</a> + See <a href="https://github.com/ufytex/luaharfbuzz/wiki/Feature-Strings">feature string syntax reference</a> </li> </ul> @@ -2822,7 +2822,7 @@ </div> <!-- id="main" --> <div id="about"> <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i> -<i style="float:right;">Last updated 2019-05-01 16:42:35 </i> +<i style="float:right;">Last updated 2019-07-31 18:39:39 </i> </div> <!-- id="about" --> </div> <!-- id="container" --> </body> |