diff options
author | Luigi Scarso <luigi.scarso@gmail.com> | 2020-02-15 12:45:08 +0000 |
---|---|---|
committer | Luigi Scarso <luigi.scarso@gmail.com> | 2020-02-15 12:45:08 +0000 |
commit | 1eb99bf05849e3108129d32eaacaa40c9e266c4b (patch) | |
tree | 23d14dd9414feedf2c78eb5029a5c7ed60c2bca2 /Build/source/texk/web2c/luatexdir/luaharfbuzz | |
parent | c919a62f6a535e0c586534c9ac6d8f671d91c02c (diff) |
sync with luatex rev. 7287
git-svn-id: svn://tug.org/texlive/trunk@53789 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/luaharfbuzz')
22 files changed, 517 insertions, 723 deletions
diff --git a/Build/source/texk/web2c/luatexdir/luaharfbuzz/README-win.md b/Build/source/texk/web2c/luatexdir/luaharfbuzz/README-win.md deleted file mode 100644 index d7a769ffa4b..00000000000 --- a/Build/source/texk/web2c/luatexdir/luaharfbuzz/README-win.md +++ /dev/null @@ -1,53 +0,0 @@ -# Building Harfbuzz and _luaharfbuzz_ on Windows - -## Building Harfbuzz - -### Prerequisites -* [Visual Studio Community Edition](https://www.visualstudio.com/vs/community/) -* C++ Support for Visual Studio (See [here](http://stackoverflow.com/questions/31953769/visual-studio-doesnt-have-cl-exe)) - -### Building -* Download the Harfbuzz source for win32 from the [releases pages](https://github.com/behdad/harfbuzz/releases) (look for a zip file that ends with _-win32_, for e.g. _harfbuzz-1.4.2-win32.zip_), and unzip it. -* Launch the Visual Studio developer prompt for the platform you want to target. This is very important. For e.g, on my 64-bit system, I am using _VS2015 x64 Native Tools Command Prompt_ -* Navigate to the _win32_ folder in the Harfbuzz source tree and do `nmake /f Makefile.vc CFG=release` -* This should generate _harfbuzz.lib_ and _harfbuzz-vs14.dll_. - -## Copying Harfbuzz headers and DLL to the right locations -The Harfbuzz headers and DLLs must be copied to the right locations, for Lua and LuaRocks to be able to find them during installation and running: - -* Copy all the Harfbuzz header (_src/*.h_) files to _C:\external\include\harfbuzz_. This is where LuaRocks will look for them by default. Make sure the header files are in the _harfbuzz_ sub-directory under _C:\external\include_, otherwise it will not work. -* Copy _harfbuzz.lib_ and _harfbuzz-vs14.dll_ to the folder _C:\external\lib_. This is where LuaRocks will look for them by default. -* Copy _harfbuzz-vs14.dll_ to _C:\Windows\System32_. This is where running programs can locate the Harfbuzz DLL. - -## Installing Lua and LuaRocks -It is highly recommended that you install Lua 5.2 and LuaRocks in a sandboxed environment on your machine. [Hererocks] makes it dead simple to do on Windows. Make sure you have installed Python first. On my system, I just did `chocolatey install python`, but you can use an alternate method and skip running that command below. - -[Hererocks]:https://github.com/mpeterv/hererocks - -``` -chocolatey install python -wget https://raw.githubusercontent.com/mpeterv/hererocks/latest/hererocks.py -python hererocks.py lua52 -l5.2 -rlatest -source lua52/bin/activate -``` -## Install _luaharfbuzz_ -If you followed the steps in the previous sections, and have a sandboxed Lua installation, which the Lua program on %PATH%, then doing the following should just work: - -``` -C:\> luarocks install luaharfbuzz -``` - -This will download the _luaharfbuzz_ source, compile the C modules, link them against Lua and Harfbuzz, and install it in the right location. - -## Test -Test whether the installation was successful by loading _luaharfbuzz_ in the Lua REPL - -``` -C:\> lua -Lua 5.2.4 Copyright (C) 1994-2015 Lua.org, PUC-Rio -> hb = require("harfbuzz") -> print(hb.version()) -1.4.1 -> -``` - diff --git a/Build/source/texk/web2c/luatexdir/luaharfbuzz/README.md b/Build/source/texk/web2c/luatexdir/luaharfbuzz/README.md index f5a900c65b1..c5cee58f869 100644 --- a/Build/source/texk/web2c/luatexdir/luaharfbuzz/README.md +++ b/Build/source/texk/web2c/luatexdir/luaharfbuzz/README.md @@ -19,10 +19,17 @@ HarfBuzz is an OpenType text shaping engine. It is used in software like Qt, Pango, Firefox, Chromium, XeTeX and LibreOffice. _luaharfbuzz_ provides bindings for the most common types in Harfbuzz. The -initial motivation for building it is to use Harfbuzz with the [LuaTeX] +initial motivation for building it was to use Harfbuzz with the [LuaTeX] typesetting system. However, the module isn’t tied to LuaTeX in any way. It can be used with any Lua codebase. +luaharfbuzz is currently being used inside [HarfTeX], a TeX engine built +on top of LuaTeX and designed to use Harfbuzz for shaping text. For more +details read this TUGboat journal article titled [Bringing world scripts to LuaTeX: The +HarfBuzz experiment][tugboat-article] + +[HarfTeX]: https://github.com/khaledhosny/harftex +[tugboat-article]: https://tug.org/TUGboat/tb40-1/tb124hosny-harfbuzz.pdf [LuaTeX]:luatex.org ## Installing Harfbuzz @@ -43,9 +50,6 @@ brew install harfbuzz apt-get install libharfbuzz0b libharfbuzz-dev ``` -#### Windows -Getting the whole setup running on Windows is very tedious, so all instructions are in their own file [README-win.md](https://github.com/deepakjois/luaharfbuzz/blob/master/README-win.md). - #### Other Platforms _Send a pull request if you want to include specific instructions to install Harfbuzz on your preferred platform._ @@ -139,6 +143,8 @@ In order to make changes to the code and run the tests, the following dependenci * [Busted](http://olivinelabs.com/busted/) – `luarocks install busted` * [luacheck](luacheck.readthedocs.org) – `luarocks install luacheck` +* [luacov](https://keplerproject.github.io/luacov/) – `luarocks install luacov` +* [ldoc](https://stevedonovan.github.io/ldoc/) – `luarocks install ldoc` Run the test suite: ``` @@ -150,5 +156,10 @@ Lint the codebase: make lint ``` +Generate documentation from sources: +``` +make doc +``` + ## Contact Open a Github issue, or email me at <deepak.jois@gmail.com>. diff --git a/Build/source/texk/web2c/luatexdir/luaharfbuzz/config.ld b/Build/source/texk/web2c/luatexdir/luaharfbuzz/config.ld index 95d27f9a39f..d37be652ca9 100644 --- a/Build/source/texk/web2c/luatexdir/luaharfbuzz/config.ld +++ b/Build/source/texk/web2c/luatexdir/luaharfbuzz/config.ld @@ -1,6 +1,6 @@ project = 'luaharfbuzz' description = 'Lua bindings to Harfbuzz' -full_description = 'The documentation is available on the @{https://github.com/deepakjois/luaharfbuzz/wiki|wiki}' +full_description = 'The documentation is available on the @{https://github.com/ufytex/luaharfbuzz/wiki|wiki}' use_markdown_titles = true backtick_references = false title = 'luaharfbuzz Documentation' 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> diff --git a/Build/source/texk/web2c/luatexdir/luaharfbuzz/fonts/TwitterColorEmoji-SVGinOT.ttf b/Build/source/texk/web2c/luatexdir/luaharfbuzz/fonts/TwitterColorEmoji-SVGinOT.ttf Binary files differnew file mode 100644 index 00000000000..a60d3ff3198 --- /dev/null +++ b/Build/source/texk/web2c/luatexdir/luaharfbuzz/fonts/TwitterColorEmoji-SVGinOT.ttf diff --git a/Build/source/texk/web2c/luatexdir/luaharfbuzz/luaharfbuzz-1.0.0-1.rockspec b/Build/source/texk/web2c/luatexdir/luaharfbuzz/luaharfbuzz-1.0.0-1.rockspec deleted file mode 100644 index c7cd2cc8c93..00000000000 --- a/Build/source/texk/web2c/luatexdir/luaharfbuzz/luaharfbuzz-1.0.0-1.rockspec +++ /dev/null @@ -1,51 +0,0 @@ -package = "luaharfbuzz" -version = "1.0.0-1" -source = { - url = "git://github.com/deepakjois/luaharfbuzz", - tag = "v1.0.0" -} -description = { - summary = "Lua bindings for the Harfbuzz text shaping library", - homepage = "https://github.com/deepakjois/luaharfbuzz", - license = "MIT", - maintainer = "Deepak Jois <deepak.jois@gmail.com>" -} -dependencies = { - "lua >= 5.2" -} -external_dependencies = { - HARFBUZZ = { - header = "harfbuzz/hb.h" - } -} -build = { - type = "builtin", - modules = { - harfbuzz = "src/harfbuzz.lua", - luaharfbuzz = { - incdirs = { - "$(HARFBUZZ_INCDIR)/harfbuzz" - }, - libdirs = { - "$(HARFBUZZ_LIBDIR)" - }, - libraries = { - "harfbuzz" - }, - sources = { - "src/luaharfbuzz/luaharfbuzz.c", - "src/luaharfbuzz/blob.c", - "src/luaharfbuzz/face.c", - "src/luaharfbuzz/font.c", - "src/luaharfbuzz/buffer.c", - "src/luaharfbuzz/feature.c", - "src/luaharfbuzz/tag.c", - "src/luaharfbuzz/unicode.c", - "src/luaharfbuzz/script.c", - "src/luaharfbuzz/direction.c", - "src/luaharfbuzz/language.c", - "src/luaharfbuzz/class_utils.c" - } - } - } -} diff --git a/Build/source/texk/web2c/luatexdir/luaharfbuzz/luaharfbuzz-1.1.0-1.rockspec b/Build/source/texk/web2c/luatexdir/luaharfbuzz/luaharfbuzz-1.1.0-1.rockspec new file mode 100644 index 00000000000..17a84532b73 --- /dev/null +++ b/Build/source/texk/web2c/luatexdir/luaharfbuzz/luaharfbuzz-1.1.0-1.rockspec @@ -0,0 +1,46 @@ +package = "luaharfbuzz" +version = "1.1.0-1" +source = { + url = "git://github.com/ufytex/luaharfbuzz", + tag = "v1.1.0" +} +description = { + summary = "Lua bindings for the Harfbuzz text shaping library", + homepage = "https://github.com/ufytex/luaharfbuzz", + license = "MIT", + maintainer = "Deepak Jois <deepak.jois@gmail.com>" +} +dependencies = { + "lua >= 5.2" +} +build = { + type = "builtin", + modules = { + harfbuzz ="src/harfbuzz.lua", + luaharfbuzz= { + sources = { + "src/luaharfbuzz/luaharfbuzz.c", + "src/luaharfbuzz/blob.c", + "src/luaharfbuzz/face.c", + "src/luaharfbuzz/font.c", + "src/luaharfbuzz/buffer.c", + "src/luaharfbuzz/feature.c", + "src/luaharfbuzz/tag.c", + "src/luaharfbuzz/ot.c", + "src/luaharfbuzz/unicode.c", + "src/luaharfbuzz/script.c", + "src/luaharfbuzz/direction.c", + "src/luaharfbuzz/language.c", + "src/luaharfbuzz/class_utils.c" + }, + libraries = {"harfbuzz"}, + incdirs = {"$(HARFBUZZ_INCDIR)/harfbuzz"}, + libdirs = {"$(HARFBUZZ_LIBDIR)"} + } + } +} +external_dependencies = { + HARFBUZZ = { + header = "harfbuzz/hb.h" + } +} diff --git a/Build/source/texk/web2c/luatexdir/luaharfbuzz/luaharfbuzz-scm-1.rockspec b/Build/source/texk/web2c/luatexdir/luaharfbuzz/luaharfbuzz-scm-1.rockspec index 108dde354fc..31ae2ab4fb7 100644 --- a/Build/source/texk/web2c/luatexdir/luaharfbuzz/luaharfbuzz-scm-1.rockspec +++ b/Build/source/texk/web2c/luatexdir/luaharfbuzz/luaharfbuzz-scm-1.rockspec @@ -1,3 +1,4 @@ +rockspec_format = "3.0" package = "luaharfbuzz" version = "scm-1" source = { @@ -7,7 +8,9 @@ description = { summary = "Lua bindings for the Harfbuzz text shaping library", homepage = "https://github.com/ufytex/luaharfbuzz", license = "MIT", - maintainer = "Deepak Jois <deepak.jois@gmail.com>" + maintainer = "Deepak Jois <deepak.jois@gmail.com>", + issues_url = "https://github.com/ufytex/luaharfbuzz/issues", + labels = {"unicode", "fonts"} } dependencies = { "lua >= 5.2" diff --git a/Build/source/texk/web2c/luatexdir/luaharfbuzz/spec/buffer_spec.lua b/Build/source/texk/web2c/luatexdir/luaharfbuzz/spec/buffer_spec.lua index 1950354eaf6..d0a7757e3bf 100644 --- a/Build/source/texk/web2c/luatexdir/luaharfbuzz/spec/buffer_spec.lua +++ b/Build/source/texk/web2c/luatexdir/luaharfbuzz/spec/buffer_spec.lua @@ -167,6 +167,61 @@ describe("harfbuzz.Buffer", function() b:set_cluster_level(harfbuzz.Buffer.CLUSTER_LEVEL_CHARACTERS) assert.are_equal(harfbuzz.Buffer.CLUSTER_LEVEL_CHARACTERS, b:get_cluster_level()) end) + + it("can get the replacement glyph for invisible characters of the buffer", function() + local b = harfbuzz.Buffer.new() + assert.are_equal(0, b:get_invisible_glyph()) + end) + + it("can set the replacement glyph for invisible characters of the buffer", function() + local b = harfbuzz.Buffer.new() + b:set_invisible_glyph(3) + assert.are_equal(3, b:get_invisible_glyph()) + end) + + it("can get the replacement codepoint of the buffer", function() + local b = harfbuzz.Buffer.new() + assert.are_equal(0xFFFD, b:get_replacement_codepoint()) + end) + + it("can set the replacement codepoint of the buffer", function() + local b = harfbuzz.Buffer.new() + b:set_replacement_codepoint(0xFFFF) + assert.are_equal(0xFFFF, b:get_replacement_codepoint()) + b:add_utf8("\xFF") + local glyphs = b:get_glyphs() + assert.are_equal(1, #glyphs) + assert.are_equal(0xFFFF, glyphs[1].codepoint) + end) + + it("can get the flags of the buffer", function() + local b = harfbuzz.Buffer.new() + assert.are_equal(harfbuzz.Buffer.FLAG_DEFAULT, b:get_flags()) + end) + + it("can set the flags of the buffer", function() + local b = harfbuzz.Buffer.new() + b:set_flags(harfbuzz.Buffer.FLAG_DEFAULT | harfbuzz.Buffer.FLAG_BOT) + assert.are_equal(harfbuzz.Buffer.FLAG_DEFAULT | harfbuzz.Buffer.FLAG_BOT, b:get_flags()) + end) + + it("can clear the buffer", function() + local b = harfbuzz.Buffer.new() + b:add_utf8("abc") + b:set_flags(harfbuzz.Buffer.FLAG_DEFAULT | harfbuzz.Buffer.FLAG_BOT) + b:clear_contents() + assert.are_equal(0, b:get_length()) + assert.are_equal(harfbuzz.Buffer.FLAG_DEFAULT | harfbuzz.Buffer.FLAG_BOT, b:get_flags()) + end) + + it("can reset the buffer", function() + local b = harfbuzz.Buffer.new() + b:add_utf8("abc") + b:set_flags(harfbuzz.Buffer.FLAG_DEFAULT | harfbuzz.Buffer.FLAG_BOT) + b:reset() + assert.are_equal(0, b:get_length()) + assert.are_equal(harfbuzz.Buffer.FLAG_DEFAULT, b:get_flags()) + end) end) diff --git a/Build/source/texk/web2c/luatexdir/luaharfbuzz/spec/harfbuzz_spec.lua b/Build/source/texk/web2c/luatexdir/luaharfbuzz/spec/harfbuzz_spec.lua index 966a1865faf..dfae07d8e65 100644 --- a/Build/source/texk/web2c/luatexdir/luaharfbuzz/spec/harfbuzz_spec.lua +++ b/Build/source/texk/web2c/luatexdir/luaharfbuzz/spec/harfbuzz_spec.lua @@ -140,12 +140,28 @@ describe("harfbuzz module", function() assert.are_same(layers,f:ot_color_glyph_get_layers(100)) end) - it("can check color layers", function() + it("can check PNG glyph support", function() local f = harfbuzz.Face.new('fonts/notocoloremoji-subset.ttf') assert.are_equal(false,face:ot_color_has_png()) assert.are_equal(true,f:ot_color_has_png()) end) + it("can check SVG glyph support", function() + local f = harfbuzz.Face.new('fonts/TwitterColorEmoji-SVGinOT.ttf') + assert.are_equal(false,face:ot_color_has_svg()) + assert.are_equal(true,f:ot_color_has_svg()) + end) + + it("can return glyph color png", function() + local f = harfbuzz.Face.new('fonts/TwitterColorEmoji-SVGinOT.ttf') + + assert.are_equal(nil,face:ot_color_glyph_get_svg(100)) + assert.are_equal(nil,f:ot_color_glyph_get_svg(0)) + assert.are_same(751,f:ot_color_glyph_get_svg(5):get_length()) + assert.are_same(804,f:ot_color_glyph_get_svg(6):get_length()) + assert.are_same("<?xml version='1.0' encoding='UTF-8'?>",f:ot_color_glyph_get_svg(5):get_data():sub(1, 38)) + end) + it("can return script tags", function() local t local tags = { @@ -320,6 +336,30 @@ describe("harfbuzz module", function() local f = harfbuzz.Feature.new(fs) assert.are_equal(fs, tostring(f)) end) + + it("has visible fields", function() + local f = harfbuzz.Feature.new('-kern') + print(getmetatable(f).__index) + assert.are_equal(tostring(f.tag), 'kern') + assert.are_equal(f.value, 0) + assert.are_equal(f.start, nil) + assert.are_equal(f._end, nil) + + f = harfbuzz.Feature.new('aalt[3:5]=4') + assert.are_equal(tostring(f.tag), 'aalt') + assert.are_equal(f.value, 4) + assert.are_equal(f.start, 3) + assert.are_equal(f._end, 5) + end) + + it("has editable fields", function() + local f = harfbuzz.Feature.new('-kern') + f.tag, f.value, f.start, f._end = harfbuzz.Tag.new"aalt", 4, 3, 5 + assert.are_equal(tostring(f), "aalt[3:5]=4") + + f.tag, f.value, f.start, f._end = harfbuzz.Tag.new"harf", 0, nil, nil + assert.are_equal(tostring(f), "-harf") + end) end) describe("harfbuzz.Tag", function() diff --git a/Build/source/texk/web2c/luatexdir/luaharfbuzz/src/harfbuzz.luadoc b/Build/source/texk/web2c/luatexdir/luaharfbuzz/src/harfbuzz.luadoc index 3b11636fae9..3a30a03c904 100644 --- a/Build/source/texk/web2c/luatexdir/luaharfbuzz/src/harfbuzz.luadoc +++ b/Build/source/texk/web2c/luatexdir/luaharfbuzz/src/harfbuzz.luadoc @@ -1,8 +1,8 @@ ----------- -- Lua bindings to Harfbuzz. --- * [Wiki](http://github.com/deepakjois/luaharfbuzz/wiki) --- * [Source on Github](https://github.com/deepakjois/luaharfbuzz) --- * [API Coverage Status](https://github.com/deepakjois/luaharfbuzz/blob/master/status/done.txt) +-- * [Wiki](http://github.com/ufytex/luaharfbuzz/wiki) +-- * [Source on Github](https://github.com/ufytex/luaharfbuzz) +-- * [API Coverage Status](https://github.com/ufytex/luaharfbuzz/blob/master/status/done.txt) -- -- @author Deepak Jois <<deepak.jois@gmail.com>> -- @copyright 2016 @@ -23,7 +23,7 @@ -- * `script`: A `Script` object representing the script. -- * `language`: A `Language` object representing the language. -- * `features`: features to enable, specified as either of the following. --- - comma-separated list of features. See [feature string syntax reference](https://github.com/deepakjois/luaharfbuzz/wiki/Feature-Strings) +-- - comma-separated list of features. See [feature string syntax reference](https://github.com/ufytex/luaharfbuzz/wiki/Feature-Strings) -- - table of `Feature` objects -- @function shape @@ -291,7 +291,7 @@ -- @type Feature --- Wraps `hb_feature_from_string` --- @param feature_string See [feature string syntax reference](https://github.com/deepakjois/luaharfbuzz/wiki/Feature-Strings) +-- @param feature_string See [feature string syntax reference](https://github.com/ufytex/luaharfbuzz/wiki/Feature-Strings) -- @function Feature.new --- Wraps `hb_feature_to_string`. diff --git a/Build/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/buffer.c b/Build/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/buffer.c index 11f803693fd..4eb78ec7a9a 100644 --- a/Build/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/buffer.c +++ b/Build/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/buffer.c @@ -1,27 +1,20 @@ #include "luaharfbuzz.h" #ifdef LuajitTeX -static void lua_len (lua_State *L, int i) { - switch (lua_type(L, i)) { - case LUA_TSTRING: - lua_pushnumber(L, (lua_Number)lua_objlen(L, i)); - break; - case LUA_TTABLE: - if (!luaL_callmeta(L, i, "__len")) - lua_pushnumber(L, (lua_Number)lua_objlen(L, i)); - break; - case LUA_TUSERDATA: - if (luaL_callmeta(L, i, "__len")) - break; - /* FALLTHROUGH */ - default: - luaL_error(L, "attempt to get length of a %s value", - lua_typename(L, lua_type(L, i))); - } + +static int lua_absindex (lua_State *L, int i) { + if (i < 0 && i > LUA_REGISTRYINDEX) + i += lua_gettop(L) + 1; + return i; +} +static int lua_geti (lua_State *L, int index, lua_Integer i) { + index = lua_absindex(L, index); + lua_pushinteger(L, i); + lua_gettable(L, index); + return lua_type(L, -1); } #endif - static int buffer_new(lua_State *L) { Buffer *b; @@ -59,6 +52,22 @@ static int buffer_set_direction(lua_State *L) { return 0; } +static int buffer_get_flags(lua_State *L) { + Buffer *b = (Buffer *)luaL_checkudata(L, 1, "harfbuzz.Buffer"); + + lua_pushinteger(L, hb_buffer_get_flags(*b)); + return 1; +} + +static int buffer_set_flags(lua_State *L) { + Buffer *b = (Buffer *)luaL_checkudata(L, 1, "harfbuzz.Buffer"); + + unsigned int l = luaL_checkinteger(L, 2); + + hb_buffer_set_flags(*b, l); + return 0; +} + static int buffer_get_language(lua_State *L) { Buffer *b = (Buffer *)luaL_checkudata(L, 1, "harfbuzz.Buffer"); @@ -97,25 +106,56 @@ static int buffer_set_script(lua_State *L) { return 0; } +static int buffer_get_invisible_glyph(lua_State *L) { + Buffer *b = (Buffer *)luaL_checkudata(L, 1, "harfbuzz.Buffer"); + + lua_pushinteger(L, hb_buffer_get_invisible_glyph(*b)); + return 1; +} + +static int buffer_set_invisible_glyph(lua_State *L) { + Buffer *b = (Buffer *)luaL_checkudata(L, 1, "harfbuzz.Buffer"); + + hb_codepoint_t cp = (hb_codepoint_t) luaL_checkinteger(L, 2); + + hb_buffer_set_invisible_glyph(*b, cp); + return 0; +} + +static int buffer_get_replacement_codepoint(lua_State *L) { + Buffer *b = (Buffer *)luaL_checkudata(L, 1, "harfbuzz.Buffer"); + + lua_pushinteger(L, hb_buffer_get_replacement_codepoint(*b)); + return 1; +} + +static int buffer_set_replacement_codepoint(lua_State *L) { + Buffer *b = (Buffer *)luaL_checkudata(L, 1, "harfbuzz.Buffer"); + + hb_codepoint_t cp = (hb_codepoint_t) luaL_checkinteger(L, 2); + + hb_buffer_set_replacement_codepoint(*b, cp); + return 0; +} + static int buffer_add_codepoints(lua_State *L) { Buffer *b = (Buffer *)luaL_checkudata(L, 1, "harfbuzz.Buffer"); unsigned int item_offset; int item_length; + int i; luaL_checktype(L, 2, LUA_TTABLE); item_offset = luaL_optinteger(L, 3, 0); item_length = luaL_optinteger(L, 4, -1); - lua_len (L, 2); - unsigned int n = luaL_checkinteger(L, -1); - lua_pop(L, 1); + int n = lua_rawlen(L, 2); hb_codepoint_t *text = (hb_codepoint_t *) malloc(n * sizeof(hb_codepoint_t)); - lua_pushnil(L); int i = 0; - while (lua_next(L, 2) != 0) { + for (i = 0; i != n; ++i) { + lua_geti(L, 2, i + 1); hb_codepoint_t c = (hb_codepoint_t) luaL_checkinteger(L, -1); - text[i++] = c; + text[i] = c; lua_pop(L, 1); } @@ -126,6 +166,20 @@ static int buffer_add_codepoints(lua_State *L) { return 0; } +static int buffer_clear_contents(lua_State *L) { + Buffer *b = (Buffer *)luaL_checkudata(L, 1, "harfbuzz.Buffer"); + + hb_buffer_clear_contents(*b); + return 0; +} + +static int buffer_reset(lua_State *L) { + Buffer *b = (Buffer *)luaL_checkudata(L, 1, "harfbuzz.Buffer"); + + hb_buffer_reset(*b); + return 0; +} + static int buffer_add_utf8(lua_State *L) { Buffer *b = (Buffer *)luaL_checkudata(L, 1, "harfbuzz.Buffer"); const char *text; @@ -238,14 +292,22 @@ static const struct luaL_Reg buffer_methods[] = { { "__gc", buffer_destroy }, { "add_utf8", buffer_add_utf8 }, { "add_codepoints", buffer_add_codepoints }, + { "clear_contents", buffer_clear_contents }, { "set_direction", buffer_set_direction }, { "get_direction", buffer_get_direction }, + { "set_flags", buffer_set_flags }, + { "get_flags", buffer_get_flags }, { "set_language", buffer_set_language }, { "get_language", buffer_get_language }, { "set_script", buffer_set_script }, { "get_script", buffer_get_script }, + { "set_invisible_glyph", buffer_set_invisible_glyph }, + { "get_invisible_glyph", buffer_get_invisible_glyph }, + { "set_replacement_codepoint", buffer_set_replacement_codepoint }, + { "get_replacement_codepoint", buffer_get_replacement_codepoint }, { "get_glyphs", buffer_get_glyphs }, { "guess_segment_properties", buffer_guess_segment_properties }, + { "reset", buffer_reset }, { "reverse", buffer_reverse }, { "get_length", buffer_get_length }, { "get_cluster_level", buffer_get_cluster_level }, @@ -264,6 +326,12 @@ static const struct luahb_constant_t buffer_constants[] = { { "CLUSTER_LEVEL_MONOTONE_CHARACTERS", HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS }, { "CLUSTER_LEVEL_CHARACTERS", HB_BUFFER_CLUSTER_LEVEL_CHARACTERS }, { "CLUSTER_LEVEL_DEFAULT", HB_BUFFER_CLUSTER_LEVEL_DEFAULT }, + { "FLAG_DEFAULT", HB_BUFFER_FLAG_DEFAULT }, + { "FLAG_BOT", HB_BUFFER_FLAG_BOT }, + { "FLAG_EOT", HB_BUFFER_FLAG_EOT }, + { "FLAG_PRESERVE_DEFAULT_IGNORABLES", HB_BUFFER_FLAG_PRESERVE_DEFAULT_IGNORABLES }, + { "FLAG_REMOVE_DEFAULT_IGNORABLES", HB_BUFFER_FLAG_REMOVE_DEFAULT_IGNORABLES }, + { "FLAG_DO_NOT_INSERT_DOTTED_CIRCLE", HB_BUFFER_FLAG_DO_NOT_INSERT_DOTTED_CIRCLE }, { "GLYPH_FLAG_UNSAFE_TO_BREAK", HB_GLYPH_FLAG_UNSAFE_TO_BREAK }, { "GLYPH_FLAG_DEFINED", HB_GLYPH_FLAG_DEFINED }, { NULL, 0 } diff --git a/Build/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/face.c b/Build/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/face.c index ddb05581fae..5538c704571 100644 --- a/Build/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/face.c +++ b/Build/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/face.c @@ -398,6 +398,31 @@ static int face_ot_color_has_png(lua_State *L) { return 1; } +static int face_ot_color_has_svg(lua_State *L) { + Face *f = (Face *)luaL_checkudata(L, 1, "harfbuzz.Face"); + + lua_pushboolean(L, hb_ot_color_has_svg(*f)); + return 1; +} + +static int face_ot_color_glyph_get_svg(lua_State *L) { + Face *f = (Face *)luaL_checkudata(L, 1, "harfbuzz.Face"); + hb_codepoint_t gid = (hb_codepoint_t) luaL_checkinteger(L, 2); + hb_blob_t* blob = hb_ot_color_glyph_reference_svg(*f, gid); + + if (hb_blob_get_length(blob) != 0) { + Blob *b = (Blob *)lua_newuserdata(L, sizeof(*b)); + luaL_getmetatable(L, "harfbuzz.Blob"); + lua_setmetatable(L, -2); + + *b = blob; + } else { + lua_pushnil(L); + } + + return 1; +} + static int face_destroy(lua_State *L) { Face *f = (Face *)luaL_checkudata(L, 1, "harfbuzz.Face"); @@ -419,6 +444,8 @@ static const struct luaL_Reg face_methods[] = { { "ot_color_has_layers", face_ot_color_has_layers }, { "ot_color_glyph_get_layers", face_ot_color_glyph_get_layers }, { "ot_color_has_png", face_ot_color_has_png }, + { "ot_color_has_svg", face_ot_color_has_svg }, + { "ot_color_glyph_get_svg", face_ot_color_glyph_get_svg }, { "ot_layout_get_script_tags", face_ot_layout_get_script_tags }, { "ot_layout_get_language_tags", face_ot_layout_get_language_tags }, { "ot_layout_get_feature_tags", face_ot_layout_get_feature_tags }, diff --git a/Build/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/feature.c b/Build/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/feature.c index 1a3cf0a7815..d6cd1ec325b 100644 --- a/Build/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/feature.c +++ b/Build/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/feature.c @@ -26,7 +26,63 @@ static int feature_to_string(lua_State *L) { return 1; } +static const char *feature_tag_ptr; +static const char *feature_value_ptr; +static const char *feature_start_ptr; +static const char *feature_end_ptr; + +static int feature_index(lua_State *L) { + Feature* f = (Feature *)luaL_checkudata(L, 1, "harfbuzz.Feature"); + const char *key = lua_tostring(L, 2); + + if (key == feature_tag_ptr) { + Tag *tag = (Tag *)lua_newuserdata(L, sizeof(*tag)); + luaL_getmetatable(L, "harfbuzz.Tag"); + lua_setmetatable(L, -2); + *tag = f->tag; + } else if (key == feature_value_ptr) { + lua_pushinteger(L, f->value); + } else if (key == feature_start_ptr) { + if (f->start == HB_FEATURE_GLOBAL_START) + lua_pushnil(L); + else + lua_pushinteger(L, f->start); + } else if (key == feature_end_ptr) { + if (f->end == HB_FEATURE_GLOBAL_END) + lua_pushnil(L); + else + lua_pushinteger(L, f->end); + } else { + lua_pushnil(L); + } + return 1; +} + +static int feature_newindex(lua_State *L) { + Feature* f = (Feature *)luaL_checkudata(L, 1, "harfbuzz.Feature"); + const char *key = lua_tostring(L, 2); + + if (key == feature_tag_ptr) { + f->tag = *(Tag *)luaL_checkudata(L, 3, "harfbuzz.Tag"); + } else if (key == feature_value_ptr) { + f->value = luaL_checkinteger(L, 3); + } else if (key == feature_start_ptr) { + if (lua_toboolean(L, 3)) + f->start = luaL_checkinteger(L, 3); + else + f->start = HB_FEATURE_GLOBAL_START; + } else if (key == feature_end_ptr) { + if (lua_toboolean(L, 3)) + f->end = luaL_checkinteger(L, 3); + else + f->end = HB_FEATURE_GLOBAL_END; + } + return 0; +} + static const struct luaL_Reg feature_methods[] = { + { "__index", feature_index }, + { "__newindex", feature_newindex }, { "__tostring", feature_to_string }, { NULL, NULL }, }; @@ -37,5 +93,18 @@ static const struct luaL_Reg feature_functions[] = { }; int register_feature(lua_State *L) { + lua_pushliteral(L, "tag"); + feature_tag_ptr = lua_tostring(L, -1); + (void) luaL_ref (L, LUA_REGISTRYINDEX); + lua_pushliteral(L, "value"); + feature_value_ptr = lua_tostring(L, -1); + (void) luaL_ref (L, LUA_REGISTRYINDEX); + lua_pushliteral(L, "start"); + feature_start_ptr = lua_tostring(L, -1); + (void) luaL_ref (L, LUA_REGISTRYINDEX); + lua_pushliteral(L, "_end"); /* _end instead of end to avoid Lua keyword */ + feature_end_ptr = lua_tostring(L, -1); + (void) luaL_ref (L, LUA_REGISTRYINDEX); + return register_class(L, "harfbuzz.Feature", feature_methods, feature_functions, NULL); } diff --git a/Build/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/font.c b/Build/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/font.c index 2c59ce55a67..c601673647e 100644 --- a/Build/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/font.c +++ b/Build/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/font.c @@ -184,7 +184,7 @@ static int font_ot_color_glyph_get_png(lua_State *L) { luaL_getmetatable(L, "harfbuzz.Blob"); lua_setmetatable(L, -2); - *b = hb_ot_color_glyph_reference_png(*f, gid); + *b = blob; } else { lua_pushnil(L); } diff --git a/Build/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/luaharfbuzz.c b/Build/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/luaharfbuzz.c index c41a46bb7e9..ac7081f0183 100644 --- a/Build/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/luaharfbuzz.c +++ b/Build/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/luaharfbuzz.c @@ -1,30 +1,42 @@ #include "luaharfbuzz.h" +#ifdef LuajitTeX +static int lua_absindex (lua_State *L, int i) { + if (i < 0 && i > LUA_REGISTRYINDEX) + i += lua_gettop(L) + 1; + return i; +} +static int lua_geti (lua_State *L, int index, lua_Integer i) { + index = lua_absindex(L, index); + lua_pushinteger(L, i); + lua_gettable(L, index); + return lua_type(L, -1); +} +#endif int shape_full (lua_State *L) { - int i = 0; Font *font = (Font *)luaL_checkudata(L, 1, "harfbuzz.Font"); Buffer *buf = (Buffer *)luaL_checkudata(L, 2, "harfbuzz.Buffer"); + unsigned int i; luaL_checktype(L, 3, LUA_TTABLE); luaL_checktype(L, 4, LUA_TTABLE); unsigned int num_features = lua_rawlen(L, 3); Feature *features = (Feature *) malloc (num_features * sizeof(hb_feature_t)); - lua_pushnil(L); - while (lua_next(L, 3) != 0) { + for (i = 0; i != num_features; ++i) { + lua_geti(L, 3, i + 1); Feature* f = (Feature *)luaL_checkudata(L, -1, "harfbuzz.Feature"); - features[i++] = *f; + features[i] = *f; lua_pop(L, 1); } const char **shapers = NULL; size_t num_shapers = lua_rawlen(L, 4); if (num_shapers) { - i = 0; shapers = (const char**) calloc (num_shapers + 1, sizeof(char*)); - lua_pushnil(L); - while (lua_next(L, 4) != 0) { - shapers[i++] = luaL_checkstring(L, -1); + for (i = 0; i != num_shapers; ++i) { + lua_geti(L, 4, i + 1); + shapers[i] = luaL_checkstring(L, -1); lua_pop(L, 1); } } diff --git a/Build/source/texk/web2c/luatexdir/luaharfbuzz/status/full_api.txt b/Build/source/texk/web2c/luatexdir/luaharfbuzz/status/full_api.txt index d68c9b0f239..3b6728fcefb 100644 --- a/Build/source/texk/web2c/luatexdir/luaharfbuzz/status/full_api.txt +++ b/Build/source/texk/web2c/luatexdir/luaharfbuzz/status/full_api.txt @@ -1,4 +1,12 @@ +hb_aat_layout_feature_type_get_name_id +hb_aat_layout_feature_type_get_selector_infos +hb_aat_layout_get_feature_types +hb_aat_layout_has_positioning +hb_aat_layout_has_substitution +hb_aat_layout_has_tracking +hb_blob_copy_writable_or_fail hb_blob_create +hb_blob_create_from_file hb_blob_create_sub_blob hb_blob_destroy hb_blob_get_data @@ -17,10 +25,12 @@ hb_buffer_add_utf16 hb_buffer_add_utf32 hb_buffer_add_utf8 hb_buffer_allocation_successful +hb_buffer_append hb_buffer_clear_contents hb_buffer_create hb_buffer_deserialize_glyphs hb_buffer_destroy +hb_buffer_diff hb_buffer_get_cluster_level hb_buffer_get_content_type hb_buffer_get_direction @@ -28,6 +38,7 @@ hb_buffer_get_empty hb_buffer_get_flags hb_buffer_get_glyph_infos hb_buffer_get_glyph_positions +hb_buffer_get_invisible_glyph hb_buffer_get_language hb_buffer_get_length hb_buffer_get_replacement_codepoint @@ -51,6 +62,7 @@ hb_buffer_set_cluster_level hb_buffer_set_content_type hb_buffer_set_direction hb_buffer_set_flags +hb_buffer_set_invisible_glyph hb_buffer_set_language hb_buffer_set_length hb_buffer_set_message_func @@ -59,17 +71,25 @@ hb_buffer_set_script hb_buffer_set_segment_properties hb_buffer_set_unicode_funcs hb_buffer_set_user_data -hb_coretext_face_create -hb_coretext_face_get_cg_font -hb_coretext_font_get_ct_font +hb_color_get_alpha +hb_color_get_blue +hb_color_get_green +hb_color_get_red hb_direction_from_string hb_direction_to_string +hb_face_builder_add_table +hb_face_builder_create +hb_face_collect_unicodes +hb_face_collect_variation_selectors +hb_face_collect_variation_unicodes +hb_face_count hb_face_create hb_face_create_for_tables hb_face_destroy hb_face_get_empty hb_face_get_glyph_count hb_face_get_index +hb_face_get_table_tags hb_face_get_upem hb_face_get_user_data hb_face_is_immutable @@ -101,13 +121,16 @@ hb_font_funcs_set_glyph_extents_func hb_font_funcs_set_glyph_from_name_func hb_font_funcs_set_glyph_func hb_font_funcs_set_glyph_h_advance_func +hb_font_funcs_set_glyph_h_advances_func hb_font_funcs_set_glyph_h_kerning_func hb_font_funcs_set_glyph_h_origin_func hb_font_funcs_set_glyph_name_func hb_font_funcs_set_glyph_v_advance_func +hb_font_funcs_set_glyph_v_advances_func hb_font_funcs_set_glyph_v_kerning_func hb_font_funcs_set_glyph_v_origin_func hb_font_funcs_set_nominal_glyph_func +hb_font_funcs_set_nominal_glyphs_func hb_font_funcs_set_user_data hb_font_funcs_set_variation_glyph_func hb_font_get_empty @@ -115,29 +138,33 @@ hb_font_get_extents_for_direction hb_font_get_face hb_font_get_glyph hb_font_get_glyph_advance_for_direction +hb_font_get_glyph_advances_for_direction hb_font_get_glyph_contour_point hb_font_get_glyph_contour_point_for_origin hb_font_get_glyph_extents hb_font_get_glyph_extents_for_origin hb_font_get_glyph_from_name hb_font_get_glyph_h_advance +hb_font_get_glyph_h_advances hb_font_get_glyph_h_kerning hb_font_get_glyph_h_origin hb_font_get_glyph_kerning_for_direction hb_font_get_glyph_name hb_font_get_glyph_origin_for_direction hb_font_get_glyph_v_advance +hb_font_get_glyph_v_advances hb_font_get_glyph_v_kerning hb_font_get_glyph_v_origin hb_font_get_h_extents hb_font_get_nominal_glyph hb_font_get_parent hb_font_get_ppem +hb_font_get_ptem hb_font_get_scale hb_font_get_user_data -hb_font_get_v_extents hb_font_get_var_coords_normalized hb_font_get_variation_glyph +hb_font_get_v_extents hb_font_glyph_from_string hb_font_glyph_to_string hb_font_is_immutable @@ -148,6 +175,7 @@ hb_font_set_funcs hb_font_set_funcs_data hb_font_set_parent hb_font_set_ppem +hb_font_set_ptem hb_font_set_scale hb_font_set_user_data hb_font_set_var_coords_design @@ -157,6 +185,7 @@ hb_font_subtract_glyph_origin_for_direction hb_ft_face_create hb_ft_face_create_cached hb_ft_face_create_referenced +hb_ft_font_changed hb_ft_font_create hb_ft_font_create_referenced hb_ft_font_get_face @@ -167,15 +196,80 @@ hb_glib_blob_create hb_glib_get_unicode_funcs hb_glib_script_from_script hb_glib_script_to_script -hb_icu_get_unicode_funcs -hb_icu_script_from_script -hb_icu_script_to_script +hb_glyph_info_get_glyph_flags +hb_gobject_aat_layout_feature_selector_get_type +hb_gobject_aat_layout_feature_type_get_type +hb_gobject_blob_get_type +hb_gobject_buffer_cluster_level_get_type +hb_gobject_buffer_content_type_get_type +hb_gobject_buffer_diff_flags_get_type +hb_gobject_buffer_flags_get_type +hb_gobject_buffer_get_type +hb_gobject_buffer_serialize_flags_get_type +hb_gobject_buffer_serialize_format_get_type +hb_gobject_direction_get_type +hb_gobject_face_get_type +hb_gobject_feature_get_type +hb_gobject_font_funcs_get_type +hb_gobject_font_get_type +hb_gobject_glyph_flags_get_type +hb_gobject_glyph_info_get_type +hb_gobject_glyph_position_get_type +hb_gobject_map_get_type +hb_gobject_memory_mode_get_type +hb_gobject_ot_color_palette_flags_get_type +hb_gobject_ot_layout_glyph_class_get_type +hb_gobject_ot_math_constant_get_type +hb_gobject_ot_math_glyph_part_flags_get_type +hb_gobject_ot_math_glyph_part_get_type +hb_gobject_ot_math_glyph_variant_get_type +hb_gobject_ot_math_kern_get_type +hb_gobject_ot_var_axis_flags_get_type +hb_gobject_script_get_type +hb_gobject_segment_properties_get_type +hb_gobject_set_get_type +hb_gobject_shape_plan_get_type +hb_gobject_unicode_combining_class_get_type +hb_gobject_unicode_funcs_get_type +hb_gobject_unicode_general_category_get_type +hb_gobject_user_data_key_get_type +hb_graphite2_face_get_gr_face +hb_graphite2_font_get_gr_font hb_language_from_string hb_language_get_default hb_language_to_string +hb_map_allocation_successful +hb_map_clear +hb_map_create +hb_map_del +hb_map_destroy +hb_map_get +hb_map_get_empty +hb_map_get_population +hb_map_get_user_data +hb_map_has +hb_map_is_empty +hb_map_reference +hb_map_set +hb_map_set_user_data +hb_ot_color_glyph_get_layers +hb_ot_color_glyph_reference_png +hb_ot_color_glyph_reference_svg +hb_ot_color_has_layers +hb_ot_color_has_palettes +hb_ot_color_has_png +hb_ot_color_has_svg +hb_ot_color_palette_color_get_name_id +hb_ot_color_palette_get_colors +hb_ot_color_palette_get_count +hb_ot_color_palette_get_flags +hb_ot_color_palette_get_name_id hb_ot_font_set_funcs +hb_ot_layout_collect_features hb_ot_layout_collect_lookups +hb_ot_layout_feature_get_characters hb_ot_layout_feature_get_lookups +hb_ot_layout_feature_get_name_ids hb_ot_layout_feature_with_variations_get_lookups hb_ot_layout_get_attach_points hb_ot_layout_get_glyph_class @@ -191,16 +285,19 @@ hb_ot_layout_language_get_feature_tags hb_ot_layout_language_get_required_feature hb_ot_layout_language_get_required_feature_index hb_ot_layout_lookup_collect_glyphs +hb_ot_layout_lookups_substitute_closure hb_ot_layout_lookup_substitute_closure hb_ot_layout_lookup_would_substitute hb_ot_layout_script_find_language hb_ot_layout_script_get_language_tags +hb_ot_layout_script_select_language hb_ot_layout_table_choose_script hb_ot_layout_table_find_feature_variations hb_ot_layout_table_find_script hb_ot_layout_table_get_feature_tags hb_ot_layout_table_get_lookup_count hb_ot_layout_table_get_script_tags +hb_ot_layout_table_select_script hb_ot_math_get_constant hb_ot_math_get_glyph_assembly hb_ot_math_get_glyph_italics_correction @@ -210,16 +307,28 @@ hb_ot_math_get_glyph_variants hb_ot_math_get_min_connector_overlap hb_ot_math_has_data hb_ot_math_is_glyph_extended_shape +hb_ot_name_get_utf16 +hb_ot_name_get_utf32 +hb_ot_name_get_utf8 +hb_ot_name_list_names hb_ot_shape_glyphs_closure hb_ot_shape_plan_collect_lookups hb_ot_tag_from_language +hb_ot_tags_from_script +hb_ot_tags_from_script_and_language +hb_ot_tags_to_script_and_language hb_ot_tag_to_language hb_ot_tag_to_script -hb_ot_tags_from_script hb_ot_var_find_axis +hb_ot_var_find_axis_info hb_ot_var_get_axes hb_ot_var_get_axis_count +hb_ot_var_get_axis_infos +hb_ot_var_get_named_instance_count hb_ot_var_has_data +hb_ot_var_named_instance_get_design_coords +hb_ot_var_named_instance_get_postscript_name_id +hb_ot_var_named_instance_get_subfamily_name_id hb_ot_var_normalize_coords hb_ot_var_normalize_variations hb_script_from_iso15924_tag @@ -246,8 +355,11 @@ hb_set_intersect hb_set_invert hb_set_is_empty hb_set_is_equal +hb_set_is_subset hb_set_next hb_set_next_range +hb_set_previous +hb_set_previous_range hb_set_reference hb_set_set hb_set_set_user_data @@ -268,6 +380,20 @@ hb_shape_plan_get_shaper hb_shape_plan_get_user_data hb_shape_plan_reference hb_shape_plan_set_user_data +hb_subset +hb_subset_input_create_or_fail +hb_subset_input_destroy +hb_subset_input_drop_tables_set +hb_subset_input_get_desubroutinize +hb_subset_input_get_drop_hints +hb_subset_input_get_retain_gids +hb_subset_input_glyph_set +hb_subset_input_nameid_set +hb_subset_input_reference +hb_subset_input_set_desubroutinize +hb_subset_input_set_drop_hints +hb_subset_input_set_retain_gids +hb_subset_input_unicode_set hb_tag_from_string hb_tag_to_string hb_unicode_combining_class |