Fontenc(또는 libertine)에 버그가 있나요?

Fontenc(또는 libertine)에 버그가 있나요?

저는 aprox로 책을 집필 중입니다. 200+ A5 페이지. pdflatex에서 xelatex로 마이그레이션하는 과정에서 몇 가지 심각한 레이아웃 차이를 발견했습니다. 문제를 추적하기 위해 pdflatex에 대한 MWE를 따르게 되었습니다.

\documentclass[paper=a5,pagesize,fontsize=13pt]{scrbook}
\usepackage{showframe}
\usepackage[T1]{fontenc}
\usepackage[osf]{libertine}

\begin{document}
Hello, here is some text without a meaning. This text
should show what a printed text will look like at this place.
\end{document}

만약에

\usepackage[T1]{fontenc}

적용되면 첫 번째 텍스트 줄은 "This text"로 끝납니다. 주석 처리된 경우 "이 텍스트는 다음과 같습니다"로 끝나며 전체 상자가 생성됩니다.

답변1

차이점은 다음과 같습니다.

OT1:

.\OT1/LinuxLibertineT-TOsF/m/n/13 i
.\OT1/LinuxLibertineT-TOsF/m/n/13 n
.\OT1/LinuxLibertineT-TOsF/m/n/13 g
.\OT1/LinuxLibertineT-TOsF/m/n/13 .
.\glue 3.7921 plus 4.875 minus 0.36096
.\OT1/LinuxLibertineT-TOsF/m/n/13  (ligature Th)
.\OT1/LinuxLibertineT-TOsF/m/n/13 i
.\OT1/LinuxLibertineT-TOsF/m/n/13 s
.\glue 3.25 plus 1.625 minus 1.08289
.\OT1/LinuxLibertineT-TOsF/m/n/13 t
.\OT1/LinuxLibertineT-TOsF/m/n/13 e
.\kern-0.091
.\OT1/LinuxLibertineT-TOsF/m/n/13 x
.\OT1/LinuxLibertineT-TOsF/m/n/13 t

T1:

....\T1/LinuxLibertineT-TOsF/m/n/13 i
....\T1/LinuxLibertineT-TOsF/m/n/13 n
....\T1/LinuxLibertineT-TOsF/m/n/13 g
....\T1/LinuxLibertineT-TOsF/m/n/13 .
....\glue 3.7921 plus 4.875 minus 0.36096
....\T1/LinuxLibertineT-TOsF/m/n/13 T
....\T1/LinuxLibertineT-TOsF/m/n/13 h
....\T1/LinuxLibertineT-TOsF/m/n/13 i
....\T1/LinuxLibertineT-TOsF/m/n/13 s
....\glue 3.25 plus 1.625 minus 1.08289
....\T1/LinuxLibertineT-TOsF/m/n/13 t
....\T1/LinuxLibertineT-TOsF/m/n/13 e
....\kern-0.091
....\T1/LinuxLibertineT-TOsF/m/n/13 x
....\T1/LinuxLibertineT-TOsF/m/n/13 t

즉, OT1 글꼴에는 T1 글꼴에 없는 Th 합자가 있습니다. 이는 다소 놀라운 일이지만 반드시 버그는 아닙니다. 그 이후에는 단어 길이가 부분적으로 다르기 때문에 단락 줄 바꿈이 다른 경로를 취하기에 충분합니다.

다음과 같은 합자를 피할 수 있습니다

\documentclass[paper=a5,pagesize,fontsize=13pt]{scrbook}
\usepackage{showframe}
%\usepackage[T1]{fontenc}
\usepackage[osf]{libertine}

%\showoutput

\begin{document}
Hello, here is some text without a meaning. T{}his text
should show what a printed text will look like at this place.
\end{document}

답변2

OT1 글꼴에서 두려운 Th 합자를 로드 microtype하고 발행하여 비활성화할 수 있습니다.

\DisableLigatures[T]{encoding=OT1}

그러나 다음 예에서 볼 수 있듯이 T에 대한 커닝도 비활성화된다는 단점이 있습니다.

\documentclass[paper=a5,pagesize,fontsize=13pt]{scrbook}
\usepackage{showframe}
\usepackage[T1]{fontenc}
\usepackage[osf]{libertine}

\usepackage{microtype}
\DisableLigatures[T]{encoding=OT1}

\begin{document}

\fontencoding{OT1}\selectfont

Hello, here is some text without a meaning. This text
should show what a printed text will look like at this place.

To

\fontencoding{T1}\selectfont

Hello, here is some text without a meaning. This text
should show what a printed text will look like at this place.

To

\end{document}

여기에 이미지 설명을 입력하세요

따라서 문제에 대한 실제 해결책은 없습니다. 패키지 관리자에게 libertineOT1 인코딩에서 Th 합자를 비활성화하는 옵션을 추가하도록 요청할 수 있습니다(새로운 가상 글꼴 세트가 필요함). 내 생각에는 이것은매우합자가 정말 끔찍하다고 생각하기 때문에 좋은 기능입니다.

관련 정보