Appearance of \tiny or \scriptsize Fontsize in LaTeX (horizontal stretch)
You should look up what "optical sizing" of fonts entails. (Computer Modern
is an example of a font family with optically sized letters at various font sizes.) Letters that are sized optically for \tiny
are not ordinary letters reduced linearly by 50%, and they are not simply horizontally stretched either. Instead, they are individually re-drawn, with proportionately thicker strokes, and they are spaced more loosely, all so that they remain legible even though they're only half as tall as \normalsize
letters. Conversely, optically-sized \huge
letters are deliberately drawn with thinner strokes, and they are spaced more tightly, all so that they don't look too "heavy" even though the height of \huge
letters is more than twice that of \normalsize
.
The following table shows various words typeset at their "native" 10pt size on the left and linearly enlarged or reduced from having been typeset at \tiny
, \scriptsize
, \footnotesize
, etc through \huge
sizes. Note that the letters in the resized words look progressively thinner and are spaced more tightly as you move down the right-hand column of the table.
\documentclass{article}
\usepackage{graphicx,lmodern}
\begin{document}
\begin{tabular}{rl}
basic 10pt & scaled \\
\hline
five & \scalebox{2}{\tiny five}\\
seven & \scalebox{1.429}{\scriptsize seven}\\
eight & \scalebox{1.25}{\footnotesize eight}\\
twelve & \scalebox{0.833}{\large twelve}\\
fourteen& \scalebox{0.694}{\Large fourteen}\\
twenty & \scalebox{0.482}{\huge twenty}\\
\end{tabular}
\end{document}
Addendum: Another way to think about what optical scaling does is to superimpose words natively set at \normalsize
with the same words, linearly scaled from their optically sized \tiny
, \scriptsize
, etc through \huge
versions. In the following screenshot, the native-\normalsize
letters are rendered in black and the rescaled optically sized words are rendered in red. Observe that optical sizing entails (a) changing the widths of the strokes used for various glyphs as well as (b) changing the kerning between letters in word. It's far more sophisticated than performing a horizontal stretch.
\documentclass{article}
\usepackage{lmodern,graphicx,xcolor}
\begin{document}
\obeylines
five\kern-15.6pt\textcolor{red}{\scalebox{2}{\tiny five}}
seven\kern-23.45pt\textcolor{red}{\scalebox{1.429}{\scriptsize seven}}
eight\kern-21.4pt\textcolor{red}{\scalebox{1.25}{\footnotesize eight}}
twelve\kern-27.18pt\textcolor{red}{\scalebox{0.833}{\large twelve}}
fourteen\kern-35.8pt\textcolor{red}{\scalebox{0.694}{\Large fourteen}}
twenty\kern-29.05pt\textcolor{red}{\scalebox{0.482}{\huge twenty}}
\end{document}
As has been explained in comments and other answers, it is not latex that is scaling the fonts, it is just choosing the fonts designed for that size.
If you do not like the font choice you can change it here I specify that the 10pt font is to be used scaled for all sizes (I just did roman and math italic, you may need to do more) In general such scaling is considered to make a poorer less legible result than using optically scaled fonts at their design size, but all these things are a subjective choice.
\documentclass[12pt,a4paper,ngerman]{scrbook}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amsfonts,amssymb,amsxtra}
\usepackage[ngerman]{babel}
\usepackage{graphicx}
\newcommand{\tinyb}[1]{\scalebox{0.5}{{\normalsize #1}}}
%\newcommand{\scriptsizeb}[1]{\scalebox{0.66667}{{\normalsize #1}}}
\DeclareFontFamily{T1}{lmr}{}
\DeclareFontShape{T1}{lmr}{m}{n}%
{<-> ec-lmr10
}{}
\DeclareFontFamily{OML}{lmm}{\skewchar\font127 }
\DeclareFontShape{OML}{lmm}{m}{it}%
{<-> lmmi10
}{}
\begin{document}
\begin{itemize}
\item {\tiny Tiny tiny Tiny TINY tiny (original \textbackslash tiny)} \hspace{.2cm} {\tinyb{Tiny tiny Tiny TINY tiny (custom \textbackslash tinyb)}}
\item {\tinyb{Tiny tiny Tiny TINY tiny (custom \textbackslash tinyb)}}
\item {\normalsize Tiny tiny Tiny TINY tiny (original \textbackslash normalsize)}
\item {\tiny{$U_{\infty}=f\cdot a\cdot \frac{\alpha}{\beta}$ (original \textbackslash tiny)}} \hspace{.2cm} {\tinyb{$U_{\infty}=f\cdot a\cdot \frac{\alpha}{\beta}$ (custom \textbackslash tinyb)}}
\item {\tinyb{$U_{\infty}=f\cdot a\cdot \frac{\alpha}{\beta}$ (custom \textbackslash tinyb)}}
%\item {\scriptsizeScriptsize SCRIPTSIZE (original \textbackslash scriptsize)} \hspace{.2cm} {\scriptsizeb{Scriptsize SCRIPTSIZE (custom \textbackslash scriptsizeb)}}
%\item {\scriptsizeb{Scriptsize SCRIPTSIZE (custom \textbackslash scriptsizeb)}}
\end{itemize}
\end{document}
Perhaps something like this, with the use of \DeclareFontShape
, to tell LaTeX to always use the the 10pt font to construct everything else.
EDITED to employ the otherwise unused "bold-scshape" as the placeholder for the fixed-width version of the font (which is invoked in the tinyb
environment).
RE-EDITED to make math font of fixed shape in tinyb
environment. Originally, it substituted the fixed shape operators in non-tinyb
math, as well. THis was remedied by declaring a new math version to be invoked in the tinyb
environment only.
Shown for LMODERN (a scalable T1 encoded font)
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{lmodern}
%%% TEXT FONT FIX
\rmfamily
\DeclareFontShape{T1}{lmr}{bx}{sc}{<-> cmr10}{}% USE BOLD SCSHAPE NOT OTHERWISE DEFINED
%%% MATH FONT FIX
\DeclareFontFamily{OML}{zlmm}{}
\DeclareFontShape{OML}{zlmm}{m}{it}{<-> lmmi10}{}
\DeclareFontShape{OML}{zlmm}{b}{it}{<->ssub * zlmm/m/it}{}
\DeclareFontShape{OML}{zlmm}{bx}{it}{<->ssub * zlmm/m/it}{}
\DeclareMathVersion{Tinyb}
\SetSymbolFont{operators}{Tinyb}{T1}{lmr}{bx}{sc}
\SetSymbolFont{letters}{Tinyb}{OML}{zlmm}{m}{it}
%%%
\newenvironment{tinyb}{\bgroup\tiny\bfseries\scshape\mathversion{Tinyb}}{\egroup} % edit: now with \tiny included
\begin{document}
\newcommand\mytext[1]{\normalsize This is a test #1\par
\small \scalebox{1.11}{This is a test} This is a test \par
\footnotesize \scalebox{1.25}{This is a test} This is a test \par
\scriptsize \scalebox{1.425}{This is a test} This is a test \par
\tiny \scalebox{2}{This is a test} This is a test\par\normalsize
}
\newcommand\mymath{\normalsize$y = mx + b - 3f^2 + \sin (\omega x - \tau)$\par
\tiny$y = mx + b - 3f^2 + \sin (\omega x - \tau)$\par\normalsize}
\mytext{of the normal}
\begin{tinyb}
\mytext{of the fixed scale}
\end{tinyb}
\mymath
\begin{tinyb}
\mymath
\end{tinyb}
\end{document}
The OP seems very much to not want to use a tinyb
environment, but rather a \tinyb
macro. Here is a possibility that suffers one shortcoming...and that is any font size changing command will place the font in \mdseries\upshape
mode, as well.
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{lmodern}
%%% TEXT FONT FIX
\rmfamily
\DeclareFontShape{T1}{lmr}{bx}{sc}{<-> cmr10}{}% USE BOLD SCSHAPE NOT OTHERWISE DEFINED
%%% MATH FONT FIX
\DeclareFontFamily{OML}{zlmm}{}
\DeclareFontShape{OML}{zlmm}{m}{it}{<-> lmmi10}{}
\DeclareFontShape{OML}{zlmm}{b}{it}{<->ssub * zlmm/m/it}{}
\DeclareFontShape{OML}{zlmm}{bx}{it}{<->ssub * zlmm/m/it}{}
\DeclareMathVersion{Tinyb}
\SetSymbolFont{operators}{Tinyb}{T1}{lmr}{bx}{sc}
\SetSymbolFont{letters}{Tinyb}{OML}{zlmm}{m}{it}
%%%
\def\invokemode{\bfseries\scshape\mathversion{Tinyb}}
\def\restoremode{\mdseries\upshape\mathversion{normal}}
\newcommand\adapt[1]{%
\expandafter\let\csname sv#1\expandafter\endcsname\csname#1\endcsname%
\expandafter\def\csname#1\endcsname{\restoremode\csname sv#1\endcsname}
\expandafter\def\csname#1b\endcsname{\invokemode\csname sv#1\endcsname}
}
\adapt{tiny}\adapt{scriptsize}\adapt{footnotesize}\adapt{small}\adapt{normalsize}
\adapt{large}\adapt{Large}\adapt{LARGE}\adapt{huge}\adapt{Huge}
\begin{document}
\tiny Hello World \par
\tinyb Hello World \par
\tiny Hello World \par
\tiny $a^{2} + b^{2} = c^{2}$ \par
\tinyb $a^{2} + b^{2} = c^{2}$ \par
\tiny $a^{2} + b^{2} = c^{2}$
\end{document}