| 1 |
\documentclass{article} |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
\def\FontWithCMap#1#2#3{% |
| 7 |
\font#1=#2\relax |
| 8 |
\immediate\pdfobj stream file {#3}% |
| 9 |
\pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% |
| 10 |
} |
| 11 |
\def\AddCMapToFont#1#2{% |
| 12 |
\immediate\pdfobj stream file {#2}% |
| 13 |
\pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% |
| 14 |
} |
| 15 |
|
| 16 |
|
| 17 |
\begin{document} |
| 18 |
|
| 19 |
|
| 20 |
\FontWithCMap\test{cmr12}{ot1.cmap} |
| 21 |
\test abcdef ghijkl mnopqr stuvwx yz fi fl ffi ffl |
| 22 |
|
| 23 |
|
| 24 |
\begin{math} |
| 25 |
a |
| 26 |
\AddCMapToFont{\textfont2}{oms.cmap} |
| 27 |
\mathcal{A} - \mathcal{B} + \mathcal{C} * \mathcal{D} \cdot |
| 28 |
\mathcal{E} \bullet \mathcal{F} \spadesuit |
| 29 |
\end{math} |
| 30 |
|
| 31 |
|
| 32 |
\end{document} |