2

I already asked how to embed fonts from Dejavu Sans Extralight in Lates documents. This is the link to my original question : DejaVu Sans Light with XeLaTeX?

None the less, the character U+2C7A (an O with a ring INside) is being displayed a blank square. I picked the letter via Kcharselect, so it exists. It is in the plane Latin -Extended C

Do I have a conflict with \usepackage[T1]{fontenc} , that is do I need a different encoding?

minimum working example, as suggested :

\documentclass[english]{article}

\usepackage{centernot}
\usepackage{fontspec}
\usepackage{natbib}
\usepackage{graphicx}
\usepackage{xunicode}
\usepackage{xltxtra}
\usepackage{mathrsfs}
\usepackage{mathtools}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{newtxtext}
\usepackage{newtxmath}

\newfontfamily\urw{URW Gothic L}
\DeclareTextFontCommand{\murw}{\urw}
\newfontfamily\dej{DejaVu Sans ExtraLight}
\DeclareTextFontCommand{\mdej}{\dej}

\include{./symbols}


\usepackage{babel}
\begin{document}

math example :$\Dorbit$
normal : \dorbit

\end{document}

in symbols.tex

\newcommand{\Dorbit}{\mdej{ⱺ}}
  • 1
    I think you shouldn't load fontenc with XeLaTeX. I get the glyph, if I add it to the MWE in my answer to your previous question. – egreg Aug 6 '13 at 19:54
  • that did not help, should i also remove inputenc? – Sean Aug 6 '13 at 19:58
  • Please, add a MWE. – egreg Aug 6 '13 at 20:18
3

You should use neither fontenc nor inputenc with XeLaTeX or LuaLaTeX. Here is a working example:

\documentclass{article}
\usepackage[english]{babel}

\usepackage{natbib}
\usepackage{graphicx}
\usepackage{mathrsfs}
\usepackage{mathtools} % also loads amsmath
\usepackage{amssymb}
\usepackage{newtxmath}
\usepackage{centernot}

\usepackage[no-math]{fontspec}

\newfontfamily\dej{DejaVu Sans ExtraLight}
\DeclareTextFontCommand{\mdej}{\dej}

\setmainfont[Ligatures=TeX]{TeX Gyre Termes} % use it instead of newtxtext

\newcommand{\Dorbit}{\mdej{ⱺ}}

\begin{document}

math example: $\Dorbit$

\end{document}

enter image description here

Note that \input should be used for loading a macro file, rather than \include. Don't load xunicode nor xltxtra (the last one can be loaded if you really need its extra features, which is quite improbable).

  • i found out, that this gylph does not exist in dejavu sans extralight actually. so i am confused why my fontviewer was showing it, and how you actually got it. See here: fonts2u.com/dejavu-sans-extralight.font it does not have the latin extended C plane – Sean Aug 7 '13 at 12:31
  • @Sean You should get the fonts straight from the source, dejavu-fonts.github.io because not all sites redistributing them have the latest version. This is generally true with fonts, not just with DejaVu. – Thérèse Nov 2 '17 at 18:50
  • @Sean It seems that Kcharselect shows characters even if they are not in the selected font. I was bitten by this recently. The relevant bug is: bugs.kde.org/show_bug.cgi?id=97420. – Kenneth Hanson Apr 16 '18 at 4:39

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.