Upright quote in DejaVu Serif

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{
fonts.handlers.otf.addfeature {
    name = "altquot",
    {
        type = "substitution",
        data = {
            ["”"] = "\string\"",
        }
    }
}
}
\begin{document}
\setmainfont[RawFeature=+altquot]{DejaVu Serif}
"Heading" -- ---
\end{document}

enter image description here


You want to disable the automatic Ligatures=TeX feature:

\documentclass{article}
\usepackage{fontspec}

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

\begin{document}

"Heading"

\end{document}

enter image description here


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

\setupbodyfont[dejavu]
\starttext
"Heading"
\stoptext

enter image description here