1

I am working with a designer that requires the height of the font type we are using to be stretched by a factor of 1.2. I have succeeded doing so using the adjustbox package, as described in the post Stretching text vertically

I have however two questions with this approach:

  1. I would like to set this globally, to all text in the document. I was wondering what would be the way to make this behaviour propagate in such manner?

  2. When using the adjustbox approach the text overflows the margins of the document. Is there any way to prevent it from doing so and respect the margins?

Here I add an example of what I mean:

\documentclass{article}
\usepackage{adjustbox}
\usepackage{blindtext}

\begin{document}
% "stretch" the font by a factor of 1.2
\adjustbox{scale={1}{1.2}}{\blindtext}

\end{document}
  • 1
    What do you want to stretch? The height of the glyphs? Maybe you should use another font then. If you simply want to increase the font size there are packages/options for this. – TeXnician Aug 22 '18 at 13:33
  • Please provide more details about what you call "the adjustbox approach". E.g., with which options and settings is \adjustbox called? – Mico Aug 22 '18 at 14:30
  • @TeXnician: Yes, I mean the height of the glyphs. I don't seek for font size as a whole, I need to stretch just the height. – Darien Brito Aug 22 '18 at 14:56
  • 2
    Are you sure that they want to stretch the glyph height instead of the baseline skip? – Sigur Aug 22 '18 at 15:24
  • 1
    Wouldn't it be easier to ask the type designer to stretch all glyphs -- vertical axis only -- by 20%? Is something preventing the designer from doing just that? – Mico Aug 22 '18 at 15:32
1

As the package author of adjustbox let me tell you that it is not intended to vertically stretch whole paragraphs of text, even if it handles that task well. Scaling text is frowned upon in general. Anyway, keep it mind that adjustbox works on boxes, i.e. horizontal material, and therefore its content does not get line breaks! If you want these then you need to wrap them into a \parbox or minipage first. For this adjustbox gives you the minipage key!

See below an example on how to avoid the spilling into the margin. Adding it to every paragraph in a whole document is not possible.

I would recommend to look for another solution, e.g. stretch the font, change to a different font or maybe change the designer...

\documentclass{article}
\usepackage{adjustbox}
\usepackage{blindtext}

\begin{document}

\blindtext

\bigskip

% "stretch" the font by a factor of 1.2
\noindent\adjustbox{minipage=\linewidth,scale={1}{1.2}}{\blindtext}

\bigskip

% or better use the environment version:
\begin{adjustbox}{minipage=\linewidth,scale={1}{1.2}}
\blindtext
\end{adjustbox}

\end{document}

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.