4

I was using the following preamble with lualatex. I have many sanskrit words using unconventional Roman script, such as ahaḿtattva, rúpa, tanmátra.

\documentclass[12pt, b5paper]{book}
\usepackage{fontspec}

It worked well with the default font, until I changed to a new font:

\setmainfont{Calluna-Regular}

All the special characters previously worked out fine now all disappeared. Instead, I get warnings such as:

LaTeX Font Warning: Font shape `EU2/Calluna-Regular(0)/m/sl' undefined using `EU2/Calluna-Regular(0)/m/n' instead on input line 11.

If I typeset each character manually, such as \'{a}, \'{u}, then I can get the special characters back. But doesn't work in \'{m}, nothing shows. With \'{t}, only normal t will show.

When compiling with XeLaTeX, some special characters, such as , can show correctly. I'd prefer to use LuaLaTeX for its better microtype support.

Is that because the font I've chosen does not support these special characters? But it does support \'{a}, \'{u}, etc. Why doesn't it print these characters by itself as in default font?

Can I redirect the font table to correct font instead? If so, how to do that?

I cannot use the Sanskrit support in polyglossia, because I'm using a different Roman script.

I would like to stick to the new font, compile with LuaLaTeX, and show all the special characters correctly.

egreg
  • 1,121,712
Roshnii
  • 107
  • 4
  • 2
    Calluna has á and ú, and I have no trouble using them directly rather than with \'{}. But Calluna (even the version you have to pay for) has no ḿ; unless you want to play with combining accents, you should choose a font with the characters you need. – Thérèse Sep 03 '15 at 18:27
  • By the way, a better way to invoke Calluna is \setmainfont{Calluna}[Contextuals=Alternate]. – Thérèse Sep 03 '15 at 18:29
  • I’ve just been examining the characters in Emacs, as copied and pasted from your question, and as typed directly by me. Yours are composed, so, for the characters Calluna does have, you’re probably running into the difficulty discussed at http://tex.stackexchange.com/q/229044 – Thérèse Sep 03 '15 at 19:09
  • 1
    The font misses both U+0301 (the combining acute accent), which explains why you don't get accents; if I type directly á and ú, I get the characters. However, the font also misses ḿ (U+1E3F). My advice is to use a different font. You may consider Erewhon, for instance, that's distributed with TeX Live and MiKTeX. – egreg Sep 03 '15 at 19:43
  • Thanks, @egreg. It should be obvious, but I never had occasion to notice before today that the combining acute accent (U+0301) is distinct from the acute accent which is a spacing character (U+00B4). I tried pressing the latter into service by \llap-ing it over the m, but the result was not attractive, and the t with an accent was even worse. These special characters really need to be designed by a professional. – Thérèse Sep 03 '15 at 20:14
  • 1
    @Thérèse You can try \accent"00B4 m, but it's vastly preferable to either have the combining accent or the precomposed glyph. – egreg Sep 03 '15 at 20:18
  • For special Latin characters in other languages, the safest bet is always an SIL font. – Sverre Sep 04 '15 at 06:05
  • Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Martin Schröder Sep 04 '15 at 12:56
  • @egreg Thank you. How can I find out which characters does a certain font have? – Roshnii Sep 04 '15 at 15:51
  • @Roshnii On my Mac I have UnicodeChecker that, when presented a character, lists in a drop down menu all system fonts that have it. I also install as system fonts all OpenType/TrueType fonts in the TeX Live distribution, which is the reason why UnicodeChecker works. – egreg Sep 04 '15 at 15:54
  • After posting the question, I've tried to use the following packages metre and tipa with Lualatex. They both have the same issues that @Thérèse mentioned in the comment. But if I force Lualatex to compile, then with package metre, \acutus{m}, it works. To conclude, \accent"00B4 m, and \acutus{m} with package metre, both work with Lualatex, but print out slightly different characters. – Roshnii Sep 04 '15 at 17:38
  • Without a MWE, I don’t quite understand your last comment. But if you don’t have a Mac and the UnicodeChecker egreg mentioned, try http://www.fileformat.info/info/unicode/char/1e3f/fontsupport.htm – Thérèse Sep 04 '15 at 17:47

1 Answers1

6

The Calluna font misses U+0301 (COMBINING ACUTE ACCENT), so your input that uses it will not produce the accent. On the other hand the precomposed glyphs for á and ú exist, but not ḿ (U+1E3F LATIN SMALL LETTER M WITH ACUTE). There's no “t with acute” in Unicode, so you can't get it either.

However, you can use lower level TeX features, in this case \accent:

\documentclass[12pt, b5paper]{book}
\usepackage{fontspec}

\setmainfont{Calluna}

\newcommand{\ppacute}[1]{\accent"00B4 #1}

\begin{document}

aha\ppacute{m}tattva, rúpa, tanmátra

\ppacute{t}

\end{document}

enter image description here

I strongly suggest to use a font that has the characters you need.

egreg
  • 1,121,712