5

I have a title, that's written in font family with no condensed face. But I still want to bring letters closer to each other due to typographical reason.

I find couple of ways to change letterspacing:

  1. Use a soulutf8 package:

    \sodef\cond{}{.01em}{.01em}{.01em}
    
  2. Use fontenc and redefine font parameters:

    \newfontfamily\headingfontcond[LetterSpace=.01]{MyFont-Bold}
    

Both of this ways works if letter space is greater than one. But if I try to make text narrower, but not wider, it just doesn't change anything.

BTW, I unable to use microtype package because I render text with XeLaTeX.

3
  • 1
    Did you try a negative value instead of a .01? But I doubt this is good typographic practice – condensed fonts are crafted especially for this, and they have a design that is very different from normal fonts in order to accommodate the shrinking. If it is for a title, why not use a font that has a condensed version? It is fine to use 2-3 different fonts in a document.
    – ienissei
    May 16, 2014 at 18:59
  • 1
    Condensing using a negative letter spacing is a very bad idea as the example in David's answer shows.
    – egreg
    May 16, 2014 at 19:28
  • @egreg as I posted my answer I was in fear of a backlash from you :-) May 16, 2014 at 19:44

3 Answers 3

8

LetterSpace works also with negative values:

\documentclass{article}
\usepackage{fontspec}

\setmainfont[Ligatures=TeX]{Alegreya}
\newfontface{\titlingfont}[LetterSpace=-10]{Alegreya Bold}

\begin{document}
{\Large\titlingfont A HIDEOUS TITLE}

\Large\bfseries A HIDEOUS TITLE
\end{document}

enter image description here

You can also use \scalebox from graphicx:

\documentclass{article}
\usepackage{fontspec}
\usepackage{graphicx}

\setmainfont[Ligatures=TeX]{Alegreya}
\newfontface{\titlingfont}[LetterSpace=-10]{Alegreya Bold}

\begin{document}
{\Large\titlingfont A HIDEOUS TITLE\par}

\scalebox{0.85}[1]{\Large\bfseries A HIDEOUS TITLE}
\end{document}

enter image description here

1
  • Oh, that's so obvious, why I just even don't twig to use negative numbers? ) Thanks!
    – kvaleev
    May 17, 2014 at 12:02
5

The letter spacing is very bad typographical practice. I recommend to use slightly linear deformation in the wide.

The LaTeX was not specified as necessary in this question, so I use the plainTeX solution. Of course, XeTeX is used as you wish.

\input opmac

\def\titlefont{\typosize[20/25]\bf}

\def\narrowerto #1\hbox#2{\hbox{\pdfsave
   \pdfscale{#1}{1}\rlap{#2}\pdfrestore}}

\hbox{\titlefont This is text}
\bigskip
\narrowerto 0.95 \hbox{\titlefont This is text}

\end

You can try to run xetex document.

But if you exactly need to use this bad typographical practice then you can try the following code:

\input opmac

\def\letterspaced #1 #2{\def\tmpb{#2}%
   \replacestrings{ }{\ }\replacestrings{}{\kern#1}\tmpb}

\def\titlefont{\typosize[20/25]\bf}

{\titlefont \letterspaced -1pt {This is text}}

\end

You can try to run xetex document.

3
  • Just a short note that if opmac builds upon plain.tex, then \narrower is already defined.
    – morbusg
    May 16, 2014 at 19:41
  • @morbusg: you are right. The original Knuth's \narrower is blocked by the code above. If you need it then use another name.
    – wipet
    May 16, 2014 at 19:47
  • 1
    The OP is using soul and fontspec, so Plain XeTeX is out of the question. But the attempt is good anyway.
    – egreg
    May 16, 2014 at 20:09
4

If it is just a one-off title, and you are sure you want to do this, just position it all manually (which you should do anyway if you are hand lettering a title)

enter image description here

\documentclass{article}

\begin{document}

\huge
       This

       T\hspace{-.09em}h\hspace{-.05em}i\hspace{-.06em}s

\end{document}
4
  • Why don’t you use \kern? I thought it was made for such cases …
    – Tobi
    May 16, 2014 at 19:09
  • @Tobi 'cause I reprimanded someone on a question the other day for using TeX primitives in a latex document:-) (presumably there is no automatic line breaking in this title so it makes no difference, so why not use the latex syntax?) May 16, 2014 at 19:17
  • So assuming the OP didn't reprimand anybody for using TeX primitives in a LaTeX document recently, the reason doesn't not apply to them? ;)
    – cfr
    May 16, 2014 at 19:31
  • “so why not use the latex syntax?” hm … for me \kern feels right to kern letters ;-)
    – Tobi
    May 16, 2014 at 20:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .