Faulty Rendering of accented Hebrew with combining characters in newer TeXLive (2022 and later)
From https://github.com/latex3/babel/issues/313, by @LupinoTech. A new MWE without babel is:
\documentclass{article}
\parindent0pt
\usepackage{fontspec}
\setmainfont[Script=Hebrew]{SBL_Hbrw.ttf}
\begin{document}
{\textdir TRT בְּשְׂ}
\end{document}
The following MEW yields different output with TeXlive (2021 or earlier) versus newer TeXlive (2022 and later, including a freshly updated one):
\documentclass[UKenglish]{article}
\usepackage[bidi=basic]{babel}
\babelfont[hebrew]{rm}{SBL_Hbrw.ttf}
\parindent0pt
\begin{document}
Letters without Sheva: \foreignlanguage{hebrew}{בּשׂ}\\
Letters with Sheva: \foreignlanguage{hebrew}{בְּשְׂ}\\
Moar Context: \foreignlanguage{hebrew}{בְּנוֹת יִשְׂרָאֵל}
\end{document}
The used font file SBL_Hbrw.ttf can be found here.
Older TeXLive renders the code as
while newer TeXLive renders
Note the positions of the "dots" above
ש and inside ב.
If it helps, here are the log files for both tex runs: tl2021.log newest.log
The problem here is Unicode normalization which reorders marks in a way the font doesn't expect. The manual of the font (https://www.sbl-site.org/Fonts/SBLHebrewUserManual1.5x.pdf) recommends to disable normalization which can be done with the -normalize font feature:
\documentclass{article}
\parindent0pt
\usepackage{fontspec}
\setmainfont[Script=Hebrew,RawFeature=-normalize]{SBL_Hbrw.ttf}
\begin{document}
{\textdir TRT בְּשְׂ}
\end{document}
As Jonathan mentioned in the related discussion for HarfBuzz a decade ago this is something which should be resolved on the font level, but we can consider doing similar adjustments to the ones done by HarfBuzz.
A more recent HarfBuzz discussion and change: https://github.com/harfbuzz/harfbuzz/issues/2947