[metapost] extract names of glyphs in font?
Steve White
stevan.white at googlemail.com
Sun Mar 1 11:26:17 CET 2009
Hi, Daniel,
On Sun, Mar 1, 2009 at 1:41 AM, Daniel Luecking <luecking at uark.edu> wrote:
>
> ----- Original Message -----
> From: Steve White <stevan.white at googlemail.com>
>>
>> I'm extracting glyphs from a font (Yannis Haralambous' Sinhala) using
>> commands such as
>> mpost '&./mfplain \mag=83.82; mode:=localfont; filenametemplate
>> "%j-%4c.eps"; input sinha12.mf'
>> This works pretty well, but I want more:
>> I can see the names of the glyphs in the .mf files: the code for the
>> glyph named "aa" starts with
>> xbeginchar(oct"020",12.8FX#,18.9FY#,6.3FY#); "aa";
> ...
>> Is there any way in MetaPost to represent that string in the EPS file?
>> (It could be either within the file or in the file name.)
>
> In metaFONT, a bare string expression is a "title" and would appear on the
> terminal if tracingtitles>0. It would also be in the tfm file if proofing > 0.
> I don't know exactly what is done with titles in metaPOST, as they are only
> briefly mentioned under tracingtitles. I'm guessing MP does nothing with
> them except display them on screen when tracingtitles > 0.
>
I tried inserting
tracingtitles:=1;
into my mpost command (is this what you meant?). It had no effect I
could see, on the command output, or on the output files.
Whoops. The document mpman.pdf lists 'tracingtitles' in Table 12
under "Defined as no-ops in the mfplain package".
> Your only hope would seem to be to search for them and incorporate them
> into a command that does what you want, such as write a special to the
> output file.
>
OK, I was hoping for a neater solution, but now I see the possibility
for an ad-hoc script to read the .mf files for lines like
xbeginchar(oct"143",15FX#,18.9FY#,0); "ghu";
and thus associate the octal character number with the name string.
Thanks!
(Any other bright ideas?)
More information about the metapost
mailing list