I've Installed TeX Live 2019 and downloaded HarfTeX. I'm using Visual Studio Code along with LatexWorkshop on Windows 10 and without any problem tex files compile with xelatex and lualatex. What to do now to make HarfTex work with it or with TexStudio?

Here's my problem with lualatex without HarfTeX.

2 Answers 2


Update november 2019

From now on the recommended way to use harfbuzz with luatex and latex is to use a latex format based on the engine luahbtex together with the version 3.11 or newer of luaotfload which contains support for the harf mode.

The binary luahbtex has been added to texlive 2019 for the major OS. It has been connected to the lualatex-dev format. So texlive user can try it out by compiling with lualatex-dev. (see What is "latex-dev"? about what latex-dev means)

MiKTeX has luahbtex too. It has also mapped lualatex-dev to this engine. You should have both executables in the \miktex\bin folder of MiKTeX.

With the new engine and luaotfload 3.11 the example below would look like this. It is no longer needed to load special lua code. Starting with this version the script should be a script in the font (similar to the normal handling with luatex and mode=node).


 কণ্যা এখন কি করিবে? 

With a current fontspec the mode and the script can be selected like this.


 কণ্যা এখন কি করিবে?


Old version (Installation of harftex)

First step

As you are on windows, get binaries from http://w32tex.org/. If you follow the link ctan you will find a link to harftex-w32.tar.xz.

Unpack it and copy harftex.dll, perhaps icudt64.dll, harflatex.exe and harftex.exe to your texlive/<year>/bin/win32 folder.

Create in texmf-local/web2c a fmtutil.cnf with this content

harflatex harftex language.dat,language.dat.lua lualatex.ini
harftex harftex language.def,language.dat.lua luatex.ini

Then create a texmf.cnf in the same directory with this content

TEXINPUTS.harftex   = $TEXMFDOTDIR;$TEXMF/tex/{harftex,luatex,plain,generic,}// 
TEXINPUTS.harflatex = $TEXMFDOTDIR;$TEXMF/tex/{harflatex,lualatex,latex,luatex,generic,}//

LUAINPUTS.harflatex = $TEXMFDOTDIR;$TEXMF/scripts/{$progname,$engine,}/{lua,}//;$TEXMF/tex/{harflatex,lualatex,latex,luatex,generic,}//

Then run in command line

fmtutil-sys --byengine=harftex

You can then try if harflatex works by running a small document with

harflatex test-document

You will see no real difference to using lualatex here. To make use of the additional feature of harflatex more files are needed, but this is then the second step.

Second step

get from https://github.com/khaledhosny/harf/tree/master/src all luafiles and the harfload.sty file. Put them e.g. in texmf-local/tex/latex/harf. Run mktexlsr.

Then test e.g. with this document (I used the noto-font as I don't have yours). The important part is (beside loading the harfload-package) the mode=harf in the font definitions. Fonts with this settings will use harfbuzz in the background. Don't use it for fonts that should use the "normal" lualatex fontloader.


 কণ্যা এখন কি করিবে? \


output with harflatex

enter image description here

output with lualatex for comparision:

enter image description here

  • 1
    I'm experiencing similar problems, but with Arabic. See github.com/khaledhosny/harf/issues/35. I haven't had time to investigate further. Commented May 29, 2019 at 15:57
  • 1
    @Ulrike Fischer, how is it working on your machine? are you on Linux or Mac?
    – user189833
    Commented May 29, 2019 at 17:04
  • 2
    I think it is a change in the binary. On the other pc I still had harftex 0.1.1 but now with 0.1.2 it fails. Some should please make a bug report at github.com/khaledhosny/harftex/issues with a link to the discussion here. I'm busy now. Commented May 29, 2019 at 17:09
  • 1
    I'll report it. Commented May 29, 2019 at 17:23
  • 1
    As I wrote I got if from the ctan.ijs.si server: ctan.ijs.si/mirror/w32tex/current Commented May 30, 2019 at 14:07

harftex for (currently) x86_64-linux, i386-linux, and win32 is now in contrib.texlive.info. One can install it with

  tlmgr --repository https://contrib.texlive.info/current install harftex

If I get access to other binaries I will add them later on.


You must log in to answer this question.