10.07.2015 Views

The microtype package

The microtype package

The microtype package

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

THE TITLE LOGO: Macros 214\printbbss\printbb\showboxes8819 \fi8820 #2%8821 }Loop over all characters of the string.8822 \def\printbbss#1#2#3\relax{%8823 \ifx\relax#1\relax8824 \else8825 \ifx\relax#2\relax8826 \printbb{#1}{}%8827 \else8828 \printbb{#1}{#2}%8829 \fi8830 \expandafter\printbbss8831 \fi8832 #2#3\relax8833 }Record the kern between the current and the following character, then print the character. \kerning is a fontinstcommand.8834 \setcommand\printbb#1#2{%8835 \setbox0\hbox{\kerning{#1}{#2}\xdef\thekern{\number\result}}%8836 \showboxes{#1}%This could be another application.8837 % \quad8838 % w: \the\scaletoem{\width{#1}},8839 % bb: \the\scaletoem{\bbleft{#1}}/%8840 % \the\scaletoem{\bbright{#1}},8841 % \the\scaletoem{\number\numexpr\width{#1}-\bbright{#1}\relax}8842 % h: \height{#1}/\bbtop{#1}, \bbbottom{#1}/\depth{#1}\par8843 }Print the boxes for character 〈#1〉. This will not work if 〈#1〉 is not also the PostScript name of the glyph (e.g., ‘comma’=/ ‘,’).8844 \setcommand\showboxes#1{%8845 \leavevmode8846 \color{texcolor}%We have to record the width of the glyph.8847 \setbox0\hbox{{\color{textcolor}#1}}%8848 \global\tempdim=\wd0\relax8849 \kern-\fboxrulei1. <strong>The</strong> TEX box: Print a frame in color texcolor. This frame shows the glyph as TEX sees it.8850 \mtl@layer{TeX-boxes}{%8851 \hbox{%8852 \lower\dimexpr \dp0 + \fboxrulei\relax8853 \hbox{%8854 \vbox{%8855 \hrule height\fboxrulei8856 \hbox{%8857 \vrule width\fboxrulei height \dimexpr\ht0 + 2\fboxrulei\relax8858 \phantom{\unhcopy0}%8859 \vrule width\fboxrulei8860 }%8861 \hrule height\fboxrulei}}}%8862 }%2. <strong>The</strong> character: Now we step back and print the actual glyph. We hold it back until now, so that it will be printedon top of its box.8863 \kern-\wd08864 \mtl@layer{characters}{%8865 \hbox{\box0}%8866 }%Step back by the amount that the character’s bounding box differs from the TEX box on the left side.8867 \kern\dimexpr\scaletoem{\bbleft{#1}}-\tempdim-\fboxruleii\relax

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!