4

I've successfully installed the FreeMonoTengwar font and the keyboard layout, and it works perfectly on simple programs such as Notepad:

enter image description here

but for some reason when I follow the steps given in this answer Texstudio does not write anything. I checked everything: I always use UTF-8, I changed the font to Free Mono Tengwar, my preamble is the same as the one cited, but when I try to write with the new layout no character appears in the .tex. When I copy-and-paste, though, characters are correctly pasted and the whole thing compiles fine:

enter image description here enter image description here

My MWE is:

\documentclass{article}

\usepackage[utf8]{inputenc} \usepackage{fontspec} \newfontfamily{\telcontar}[Renderer=Graphite]{Tengwar Telcontar}

\begin{document}

{\telcontar }

\end{document}

What can be happening? Any help is appreciated, thanks in advance!

David Carlisle
  • 757,742
  • @DavidCarlisle I've added the MWE. I don't thing I can add more, since my problem is literally that I can't input tengwar characters XD – Ignacio Correa Sep 10 '21 at 23:03
  • ah sorry it's late here I misunderstood. You already have the font installed correctly for xetex it's a matter of making it show in the editor. Of course you can always cut and paste from notepad if nothing else works, sorry I can't help with texstudio I don't have it. I will revert the edit I made to your code block. there are plenty of texstudio users on this site, someone may answer later – David Carlisle Sep 10 '21 at 23:25

2 Answers2

1

The problem is in your editor, not XeLaTeX (or LuaLaTeX, which should also work with Renderer=).

You might be able to select your Elvish monospace font as your editor font in the menu. The default almost certainly does not support Elvish, which is why you don’t see it.

An alternative would be to define ASCII macros for Elvish, such as:

\newcommand\tinco{{\telcontar\char"E000}}
\newcommand\parma{{\telcontar\char"E001}}

and so on. You would then need to spell out any Elvish words as \tinco\yanta\parma and the like. The vowels and other diacritics, as Unicode combining characters, would need to be written after the base characters, due to technical limitations.

It would also be possible to write a mapping function that transforms a Latin transliteration into this font’s mapping of Elvish script. This might use expl3 regex substitutions, Lua hooks, or a SIL font mapping.

Davislor
  • 44,045
  • I would assume that the problem is not that the font the editor uses doesn’t provide the characters, but somehow the input is just not supported. Notice that the OP was able to paste elvish characters into the editor from elsewhere and they were actually shown in the editor. – Jasper Habicht Jul 09 '22 at 10:19
  • 1
    @JasperHabicht I suggested the macros so that, even if the input method didn’t work, the OP could still type them and proofread in any editor. A font mapping would also work. – Davislor Jul 09 '22 at 15:05
0

When using xelatex there is no need for usepackage[utf8]{inputenc} line.

\documentclass{article}

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

\begin{document}

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

\end{document}

Tengar

Try to change the encoding correctly to unicode. See the image below: https://tex.stackexchange.com/a/125033/175371

Oni
  • 705