5

Can anyone see an error here?

I'm using \newfontfamily{\L}[Script=Lao]{Lao Sangam MN} to switch to Lao, then using \L{ວຽງຈັນ}, but getting ວຽງຈ ັນ in the PDF. No luck in other fonts (all TrueType...I don't have any Lao OTFs).

I'm on a Mac using TexShop.

Minimum Working Example:

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode

\documentclass[12pt]{article}

% PACKAGES

\usepackage{fontspec}
\usepackage{xltxtra}
\usepackage{xunicode}
\defaultfontfeatures{Mapping=tex-text}
\setromanfont[Mapping=tex-text]{Linux Libertine O}
\setsansfont[Scale=MatchLowercase,Mapping=tex-text]{Linux Biolinum O}
\setmonofont[Scale=MatchLowercase]{Linux Libertine Mono O}

% BEGIN

\begin{document}

% RUNTIME TWEAKS

\newfontfamily{\L}[Script=Lao]{Lao Sangam MN}

% BODY

{\L ວຽງຈັນ} (Vientiane)

\end{document}
  • Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – lockstep Jan 6 '13 at 4:52
  • Welcome to TeX.sx! Usually, we don't put a greeting or a "thank you" in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Upvoting is the preferred way here to say "thank you" to users who helped you. – Guido Jan 6 '13 at 5:44
5

The preferred way to use different languages in XeTeX is using the polyglossia package. It seems that the font in question won't render correctly with the ICU renderer, but will with the Apple AAT renderer:

% !TEX TS-program = XeLaTeX

\documentclass{article}
\usepackage{fontspec}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage{lao}
\newfontfamily\laofont[Script=Lao, Renderer=AAT]{Lao Sangam MN}
\begin{document}
\begin{lao}
ວຽງຈັນ
\end{lao}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.