Is there a way in LuaLaTeX (second best would be XeTeX) to finetune the positioning of Hebrew vowel signs? For some fonts if both vowels and cantillation marks are present, they might overlap, which should be avoided. I would need something similar as \skew
in plain LaTeX.
-
I think this is something that the font should take care of, rather than TeX.– brian-ammonJul 24, 2018 at 14:16
-
@brian-ammon Indeed, but sometimes it doesn't and I need to kludge– Kazi bácsiJul 24, 2018 at 14:33
-
2as always, a test document would help (and also in this case spell out which are the vowels and where you want them moved to...)– David CarlisleJul 24, 2018 at 18:57
1 Answer
Sure, you can do this. But first make sure:
- You can't use a better font
- You have correctly set up your font
Consider this example which only uses the SBL BibLit font, but with different open type settings. The correct output is only obtained when fontspec
is passed Script=Hebrew,Contextuals=Alternate
.
If you leave out Contextuals=Alternate
, the furtive patah is wrong. If you leave out Script=Hebrew
, everything is completely messed up.
But frankly, I would use a better font rather than manually moving things.
Note: I'd be surprised if the manually constructed word copies and pastes correctly.
MWE
\documentclass{article}
\usepackage{fontspec}
\newfontfamily\sblgood{SBL BibLit}[Script=Hebrew,Contextuals=Alternate]
\newfontfamily\sblhalfbaked{SBL BibLit}[Script=Hebrew]
\newfontfamily\sblbad{SBL BibLit}
\begin{document}
\textdir TRT \pardir TRT
\sblgood
וְר֣וּחַ
\sblhalfbaked
וְר֣וּחַ
וְר֣וּח\kern -4.75pt ַ
\sblbad
וְר֣וּחַ
ו\kern -2pt ְ\kern 2pt
ר\kern -3.5pt ֣\kern 3.5pt
ו\kern -2pt\lower 4pt\hbox{ ֺ}\kern -0.5pt
ח\kern -4.75pt ַ
\end{document}
-
Perfect! Sometimes you need it if you use rafe or similar stuff even with SBL Hebrew font. Nov 13, 2018 at 17:45
-
@Kazibácsi, do you have an example word that renders wrong with SBL Hebrew (and reference from BHS)?
xetex
uses a better font shaping library thanluatex
, so that might be an issue. Or could actually be a bug in either font or shaping library that should be fixed. As far as I know, SBL Hebrew is meant to reliably be able to produce everything in the BHS. Nov 13, 2018 at 23:31 -
How can I know that I should add
Contextuals=Alternate
? And why isn't it default?– ZvikaJan 21, 2019 at 8:22 -
@Zvika, Perhaps you could ask a new question (with a good MWE for people to test). I can't remember exactly how I discovered I needed to use
Contextuals=Alternate
. Perhaps just by trial and error and looking at what OpenType features the font supports.xetex
renders וְר֣וּחַ correctly withoutContextuals=Alternate
. But I'm not sure if this is becausexetex
turns this feature on by default or because it's font rendering of complex scripts is superior toluatex
. Jan 21, 2019 at 14:00