I'm trying to use lualatex with old, 8-bit, non-Unicode fonts:
\documentclass[a4paper]{article}
\usepackage[utf8]{luainputenc}
\usepackage{t1enc}
\usepackage{lmodern}
\def\myhelvetica{\fontfamily{phv}\selectfont}
\begin{document}
\makeatletter\language=\l@hungarian
\showhyphens{árvíztűrő türkörfúrógép}
\hrule
{\Huge Helló, Wörld, árvíztűrő}
\hrule
{\Huge Helló, Wörld, árvízt\H{u}r\H{o}}
\hrule
{\myhelvetica\Huge Helló, Wörld, árvíztűrő}
\hrule
\end{document}
Everything works except that \showhyphens
shows incorrect hyphenation:
- ár-víz-tű-rő would be correct,
\showhyphens
shows something else. (When using lualatex and fontspec, this is also hyphenated correctly.) I want\showhypens
to show ár-víz-tű-rő here in lualatex, even without fontspec. - tü-kör-fú-ró-gép is hyphenated correctly.
I suspect that the problem is caused by the letters ő and ű, which are at different positions in Unicode and T1 encodings. (All other letters, including ó and é are at the same position.)
Is there a way to convert all hyphenation patterns from Unicode to T1 encoding, something I can add between \documentclass
and \begin{document}
? I won't be using fontspec or any Unicode font in this compilation. The files containing the hyphenation patterns are probably correct, I just want lualatex to load them with a different encoding (T1), or do an in-memory encoding conversion after having loaded them. It's OK for me if some extra Lua code has to be written to make this happen.
I know and I've checked that it works in pdflatex out of the books. However, in this question I'm looking for a way to make it work in lualatex. I'm not looking for advice whether I should be using pdflatex or lualatex: for the purposes of this question I'm committed to lualatex.
lualatex
when not usingfontspec
? In such qa case use simplypdflatex
lualatex
with the old stuffluainputenc
andt1enc
makes no sense!