5

This is the code I am using to try and get nicely combined Tengwar, but it's coming out with all the combining diacritics on circles next to the characters, instead of on top of them.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{fontspec}


\setmainfont{CharisSIL-R.ttf}
\newfontfamily{\telcontar}[Renderer=Graphite]{tengtelc.ttf}

\title{Langercast Podcast Notes}
\author{Wilco Jacobs \& Sam Blumire}

\begin{document}
\section{Episode 2 - }

{\telcontar      ⁘ } 

\end{document}

I'm expecting it to show up looking like this:

Correctly Formatted Tengwar

But it looks like this

Poorly Formatted Tengwar

I based what I am doing on what was said here: https://tex.stackexchange.com/a/169156/73255

But I can't seem to identify the problem, as I have done the same as them. I am using XeLaTeX

  • It seems that the supposed combining characters don't combine at all. Probably bad definitions in the font. – egreg Feb 28 '15 at 16:20
  • @egreg however, the other user demonstrated them to work, therefore the font definitions must b new correct – Sam Blumire Feb 28 '15 at 16:35
  • Well, I don't really believe in that answer: the usage of inputenc is grossly wrong, for instance. And Rendering=Graphite doesn't seem to work. – egreg Feb 28 '15 at 16:37
  • 1
    There seems to be a bug in fontspec: if I install the font on my system and say \font\telcontar="Tengwar Telcontar/GR", the output is correct. – egreg Feb 28 '15 at 16:49
  • @egreg unfortunately. Is a collaborative project on sharelatex so we need to be able to link to a ttf file not rely on system fonts – Sam Blumire Feb 28 '15 at 17:12
4

There seems to be a bug in fontspec version 2.4a, when defining the Renderer key.

The following works; code is like in fontspec-xetex.sty and 3 has been changed into 4, as Graphite is choice number 4.

\documentclass{article}
\usepackage{fontspec}

\ExplSyntaxOn
\keys_define:nn {fontspec-renderer}
 {
  Renderer .choice_code:n =
   {
    \int_compare:nTF {\l_keys_choice_int <= 4}% <------ was 3
     {
       \tl_set:Nv \l_fontspec_renderer_tl
        { g_fontspec_renderer_tag_ \l_keys_choice_tl }
     }
     {
      \__fontspec_warning:nx {only-luatex-feature} {Renderer=Full/Basic}
     }
   }
  ,
  Renderer .generate_choices:n = {AAT,ICU,OpenType,Graphite,Full,Basic}
 }
\ExplSyntaxOff

\newfontfamily{\telcontar}[Renderer=Graphite]{Tengwar Telcontar}


\title{Langercast Podcast Notes}
\author{Wilco Jacobs \& Sam Blumire}

\begin{document}
\section{Episode 2 - }

{\telcontar      ⁘}

\end{document}

Using \newfontfamily{\telcontar}[Renderer=Graphite]{tengtelc.ttf} is also possible.

enter image description here

Note that inputenc should not be loaded with XeLaTeX.

| improve this answer | |

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.