# Upright quote in DejaVu Serif

I have this code:

\documentclass{article}
\usepackage{fontspec}
\begin{document}
\setmainfont{DejaVu Serif}
\end{document}


(run with LuaLaTeX, texlive2105) which gives this result:

But I'd like to have upright quotes. The font contains the upright quotes (glyph id 5), so it should be technically possible.

• You mean ‘typewriter quotes’? – Bernard Jun 26 '16 at 12:24
• @Bernard yes, the ones that look like an equal sign rotated 90 degrees. – topskip Jun 26 '16 at 12:30
• @topskip \rotatebox{90}{=} ;-) – Henri Menke Jun 26 '16 at 12:31
• @topskip I image this to be quite hard, because in recent LuaTeX/luaotfload the syntax for font adjustments changed heavily and the usage of feature files has been abolished. If you find out how to replace single glyphs, I'd be happy if you write an answer in this thread of mine. – Henri Menke Jun 26 '16 at 12:34
• Copy Heading". See if that works – user 170039 Jun 26 '16 at 15:04

You want to disable the automatic Ligatures=TeX feature:

\documentclass{article}
\usepackage{fontspec}

\defaultfontfeatures[\rmfamily]{}
\setmainfont{DejaVu Serif}

\begin{document}

\end{document}


• This also disables -- and --- (and perhaps others I'm not aware of). – Henri Menke Jun 26 '16 at 12:44
• @HenriMenke Yes, of course. If one wants only some TeX standard ligatures, a new map file is needed. – egreg Jun 26 '16 at 12:47
• I knew about the TeX ligatures, but I did not know that they were activated by default and how to disable them. This ansers my question (including the -- and --- ligatures). Thanks! – topskip Jun 26 '16 at 13:15

With the new luaotfload syntax for the definition of extra font features (from v2.7 on, I guess). Basically, we condone ligaturing the " to ”, but then have a font feature which substitutes ” back to ". It might also be possible to hook into the ligaturing callback to prevent this particular ligature.

Disclaimer: I have no idea what I'm doing.

\documentclass{article}
\usepackage{fontspec}
\directlua{
name = "altquot",
{
type = "substitution",
data = {
["”"] = "\string\"",
}
}
}
}
\begin{document}
\setmainfont[RawFeature=+altquot]{DejaVu Serif}
\end{document}


• This also disables \enquote{fobar} (package csquotes). – topskip Jun 26 '16 at 20:13
• @topskip Well, it simply substitutes all occurences of ” to ", no matter where they come from. It is not a question of input, but a question of output. The substitution is applied on typesetting, i.e., everything that typesets as ” will be converted to ". – Henri Menke Jul 4 '16 at 7:22

@topskip: Start using ConTeXt again! Other TeX ligatures (-- and ---) are enabled by default, quotes are not!

\setupbodyfont[dejavu]
\starttext