[pdftex] Question about \pdfincludechars

Heiko Oberdiek heiko.oberdiek at googlemail.com
Sat Aug 20 14:21:40 CEST 2016


Hello,

On 2016-08-20 10:27, Gregory Heytings wrote:
>
> I'm trying to design a macro to include a complete font in a PDF.  I
> tried the following macro:
>
> \def\includefont#1{
> \count10=0
> \font\f=#1
> \loop
>   \ifnum\count10<256
>   \pdfincludechars\f{\char\count10}
>   \advance\count10by1
> \repeat
> }
>
> However, instead of including all characters as I would have expected,
> it includes '\', 'c', 'h', 'a', 'r', ...

\pdfincludechars should include the characters directly as string 
instead of commands, that would produce them for typesetting.

Example:

\def\includefont#1{%
   \begingroup
     \count10=0
     \font\f=#1
     \loop
     \ifnum\count10<256
       \lccode`\!=\count10
       \lowercase{%
         \pdfincludechars\f{!}%
       }%
       \advance\count10by1
     \repeat
   \endgroup
}

Yours sincerely
   Heiko Oberdiek



More information about the pdftex mailing list