11

I want to know: how does \textit commands work? Does it use a different font (italic shaped font)? Or is it just a pure LaTeX command that changes text shape to italic?

My main problem: How to make a backward it-shaped text?

CarLaTeX
  • 62,716
  • 1
    It uses a different font. As to left-handed writing, see https://tex.stackexchange.com/questions/245751/left-handed-writing. If you replace \ECFSkeetch with \itshape in my answer to that question, you will see backslanted italic. However, the proper way to do it is to design a left-slanted italic font, rather than left-slanting a right-slanted font design. – Steven B. Segletes May 17 '17 at 14:38
  • Thanks @StevenB.Segletes. Are you sure? But I think LATEX is a powerful tool and it maybe possible. –  May 17 '17 at 14:55
  • 1
    Yes, \itshape calls a different font. However, there is a function \slshape that slants the roman font text. The rightward slant is built in to the command, but I think some clever code can redefine the slant value. See this answer for how to employ FakeSlant when using XeLaTeX: https://tex.stackexchange.com/questions/128562/how-to-use-fakeslant-as-slanted-but-not-italic-font-with-fontspec – Steven B. Segletes May 17 '17 at 14:59
  • 2
    @StevenB.Segletes: no, wait, \slshape invokes a different font too. For example, cmsl for the Computer Modern meta-family. – GuM May 17 '17 at 15:02
  • 1
    @GustavoMezzetti Darn. Busted! – Steven B. Segletes May 17 '17 at 15:03
  • 1
    This question has an answer than might help explain the font situation: https://tex.stackexchange.com/questions/162622/what-is-the-difference-between-normal-text-and-roman-upright – Steven B. Segletes May 17 '17 at 15:07
  • The answer to this question, https://tex.stackexchange.com/questions/95327/displaying-medieval-scriptures-and-neumes-in-tex, shows how slant can be introduced before a font gets into LaTeX, during the period of creation of the ttf2tfm process and the afm2tfm process. Also, slant can be introduced via the .map file. – Steven B. Segletes May 17 '17 at 15:12
  • This is by no means an answer (indeed, it’s a comment :-) , but just to give a hint,you could use a virtual font that just replicates the characters of some upright font, and then include in your source file a \pdfmapline that instructs the PDF viewer to slant that font as you wish. – GuM May 17 '17 at 15:21
  • 1
    Does this help? https://tex.stackexchange.com/questions/210870/slanted-text-to-the-left – JPi May 17 '17 at 15:38

1 Answers1

20

Nothing I'd do, but, with XeLaTeX or LuaLaTeX,…

\documentclass{article}
\usepackage{fontspec}

\newfontface{\backitshape}{lmroman10-italic}[
  Extension=.otf,
  FakeSlant=-0.4,
]
\DeclareTextFontCommand{\textbackit}{\backitshape}

\begin{document}

Some text \textit{in italic} and \textbackit{backwards tilted italic}

\end{document}

enter image description here

Your title question is easy to answer: \textit chooses a different font.

egreg
  • 1,121,712
  • 4
    +1 Nice answer. Extreme ugly but nevertheless smart. ;-) – Schweinebacke May 17 '17 at 17:03
  • 3
    @Schweinebacke Somehow I find it not just ugly, but really disturbing on some deep aesthetic level. There are lots of ugly fonts out there, but this one is something else :). And of course +1 for answering the question... even at the price of unleashing that upon the world. – Pont May 17 '17 at 20:30
  • That it can be done does not mean that it should be done. I don't know which is the appropriate term, hideous or atrocious. Virtuous TeXing, however ;) – Raoul Kessels May 17 '17 at 21:52