XeLaTeX / Lucida Calligraphy를 사용한 적절한 대시

XeLaTeX / Lucida Calligraphy를 사용한 적절한 대시

XeLaTeX와 함께 Lucida Calligraphy 글꼴을 사용할 때 대시가 올바르게 작동하지 않습니다. --긴 대시 대신 두 개의 작은 대시가 제공됩니다. 어떻게 수리할 수 있나요?

MWE:

\documentclass[12pt]{scrartcl}
\usepackage{titlesec}
\usepackage{xltxtra}
\newfontfamily\headingfont{Lucida Calligraphy}
\titleformat{\section}{\LARGE\headingfont\filcenter}
\renewcommand{\maketitlehooka}{\headingfont}
\begin{document}
\section*{Hello-World}
\section*{Hello--World}
\section*{Hello---World}
\end{document}

답변1

이 기능은 , Ligatures=TeX로 선언된 글꼴에만 기본적으로 추가됩니다 \setmainfont. TeX 합자 를 추가하지 않으면 \setsansfont로 선언된 글꼴에서는 활성화되지 않습니다 .\newfontfamily

문자를 직접 사용할 수 있습니다.

또는 TeX 합자가 다음을 통해 적용되어야 함을 명시적으로 지정할 수 있습니다.[Ligatures=TeX]

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

\documentclass[12pt]{scrartcl}
\usepackage{titlesec}
\usepackage{fontspec}
\newfontfamily\headingfont[Ligatures=TeX]{Lucida Calligraphy}
\titleformat{\section}{\LARGE\headingfont\filcenter}
\renewcommand{\maketitlehooka}{\headingfont}
\begin{document}
\section*{Hello-World}
\section*{Hello--World}
\section*{Hello---World}
\section*{Hello–World}
\section*{Hello—World}


\end{document}

관련 정보