Re: Question about \pdfincludechars

Heiko Oberdiek <heiko.oberdiek-gM/[email protected]>
Newsgroups gmane.comp.tex.pdftex
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.