Fun with FreeType and libotf

Just a short post to share a wonderful C library I recently came across: libotf which provides a really nice API for working with OpenType fonts. Of course, LuaTeX already has excellent support of OpenType fonts through the use of…

A nice UTF-8 decoder

If you want to explore passing UTF-8 string data to/from LuaTeX to your C code/library you may want to convert the UTF-8 data back into Unicode code points (reversing the UTF-8 encoding process discussed in this post). To do that…

Hopefully useful example of \directlua{} expansion

The following example may help to understand a little more about \directlua{} expansion. \documentclass[11pt,twoside]{article} \begin{document} \def\xx{Hello} \def\yy{(} \def\zz{)} \newcommand{\hellofromTeX}[1]{ \directlua{ function Hello(str) tex.print(str) end \xx\yy#1\zz }}   \hellofromTeX{“Hello World”} \end{document} Here’s how it works. Code within \directlua{} is expanded according…