\textbf{text} without increasing the length of the text
\documentclass{article}
\usepackage{graphicx}
\newsavebox\CBox
\def\textBF#1{\sbox\CBox{#1}\resizebox{\wd\CBox}{\ht\CBox}{\textbf{#1}}}
\parindent=0pt
\begin{document}
foobarbaz y\\
\textbf{foobarbaz} y\\
\textBF{foobarbaz} y
\end{document}
The example for beamer
\documentclass{beamer}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\newsavebox\CBox
\newcommand<>*\textBF[1]{\only#2{\sbox\CBox{#1}\resizebox{\wd\CBox}{\ht\CBox}{\textbf{#1}}}}
\parindent=0pt
\begin{document}
\begin{frame}{foo}
\only<1>{foobarbaz y1}
\textbf<2->{foobarbaz y2}
\textBF<3>{foobarbaz y3}
\end{frame}
\end{document}
Another (better) possibility is to use the letter spacing option from the package microtype
You can use \fontseries{b}\selectfont
to select a non-extended bold font, provided of course that the font family you're using contains such a font (as computer modern does). For comparison, note that \textbf
uses \fontseries{bx}
, where the x
stands for “extended”.
This answer is just for adding overlay support to Herber's command, who should credited for it.
\newcommand<>\textBF[1]{\only#2{\dotextBF}{#1}}
\newcommand\dotextBF[1]{\sbox0{#1}\resizebox{\wd0}{\ht0}{\textbf{#1}}}
...
\textBF<2->{xyz}
"xyz" will be bold from the second screen onwards.
I don't think it's a good way to emphasize things on screen; colors are better.