# Why aren't dageshes aligned in Hebrew in LuaLaTex?

I'm trying to typeset a single line of Biblical Hebrew, in which some letters have a dagesh diacritic, which is no problem in my text editor in my chosen font (designed for Biblical Hebrew), but for some reason LuaLaTeX is refusing to put the dagesh in the proper place. MWE below, along with example of what should be produced:

\documentclass{standalone}
\usepackage[nil,bidi=default]{babel}
\babelprovide[import=he]{hebrew}
\usepackage{fontspec}
\setmainfont{KeterYG-Medium}
\begin{document}
כָּל-עֲמַל הָאָדָם, לְפִיהוּ; וְגַם-הַנֶּפֶשׁ, לֹא תִמָּלֵא.
\end{document}

Whereas this is what should be produced:

• No time to investigate, but it looks like all the nikkudim are misaligned. I notice you haven’t actually specified Hebrew as the main language vía Babel or otherwise identified the text as Hebrew Jul 16 at 5:34
• Did you try with [Renderer=Harfbuzz]? Jul 16 at 6:11
• @UlrikeFischer Thank you! Jul 16 at 16:56
• @DonHosek Good job spotting that—embarassingly, I had uploaded the wrong code (the screenshot was, of course, produced by the correct specifying Hebrew because otherwise TeX would render it backwards!)) Fixed now Jul 16 at 16:56

Combining the comment advice together (language selection, plus font rendering) gives:

with various fonts.

MWE

\documentclass{article}%[border=6pt]{standalone}
\usepackage{xcolor}
\usepackage[nil,bidi=default]{babel}
\babelprovide[import=he]{hebrew}
\babelfont{rm}{CMU Serif}
\babelfont[hebrew]{rm}[Path=C:/Users/Public/fonts/1/,
Extension=.ttf,
UprightFont=*-Medium,
Renderer=HarfBuzz,
]{KeterYG}
%
\babelfont[hebrew]{ivrtshfr}[Path=C:/Users/Public/fonts/1/,
Extension=.ttf,
UprightFont=*Regular,
Renderer=HarfBuzz,
]{Shofar}
%
\babelfont[hebrew]{ivrtdvd}[Path=C:/Users/Public/fonts/1/,
Extension=.ttf,
UprightFont=*-Medium,
Renderer=HarfBuzz,
]{TaameyDavidCLM}
%
\babelfont[hebrew]{ivrtash}[Path=C:/Users/Public/fonts/1/,
Extension=.ttf,
UprightFont=*-Medium,
Renderer=HarfBuzz,
]{TaameyAshkenaz}
%
\babelfont[hebrew]{ivrttfc}[Path=C:/Users/Public/fonts/1/,
Extension=.ttf,
UprightFont=*-Medium,
Renderer=HarfBuzz,
]{TaameyFrankCLM}
%
\babeltags{hebrew=hebrew}
%
\begin{document}

{
\selectlanguage{hebrew}
\colorbox{blue!8}{\texthebrew{כָּל-עֲמַל הָאָדָם, לְפִיהוּ; וְגַם-הַנֶּפֶשׁ, לֹא תִמָּלֵא.}}
}

{
\selectlanguage{hebrew}
\textivrtshfr{כָּל-עֲמַל הָאָדָם, לְפִיהוּ; וְגַם-הַנֶּפֶשׁ, לֹא תִמָּלֵא.}
}

{
\selectlanguage{hebrew}
\textivrtash{כָּל-עֲמַל הָאָדָם, לְפִיהוּ; וְגַם-הַנֶּפֶשׁ, לֹא תִמָּלֵא.}
}

{
\selectlanguage{hebrew}
\textivrtdvd{כָּל-עֲמַל הָאָדָם, לְפִיהוּ; וְגַם-הַנֶּפֶשׁ, לֹא תִמָּלֵא.}
}

\end{document}
• Thank you very much! Jul 16 at 16:57