[metapost] Feature request: Addition to functionality of `glyph' primitive
luigi scarso
luigi.scarso at gmail.com
Tue Jan 11 19:49:39 CET 2022
On Tue, Jan 11, 2022 at 7:45 PM Laurence Finston <Laurence.Finston at gmx.de>
wrote:
> Hello,
>
> A problem that I've been having with the `glyph' primitive is that it
> doesn't return the bounding box of the glyph and therefore also no
> information about the position of the glyph within the bounding box. This
> information must be stored somewhere and I've been reading up on the topic,
> but haven't gotten to this point yet.
>
> It would be nice if `glyph' would return this information, e.g., in the
> form of two stroked items in the returned `picture'; one for
> the width X height rectangle and one for width X depth one.
>
> Would it be possible to implement this?
>
> In addition, I downloaded the sources from the SVN repository and tried to
> locate the code for `glyph'. However, there are so many occurences of the
> string "glyph" that I wasn't able to. Could someone point me to the right
> place?
>
mp.w:
27727 case mp_glyph_infont:
27728 if ((mp_type (p) != mp_string_type &&
27729 mp_type (p) != mp_known) || (mp->cur_exp.type !=
mp_string_type))
27730 mp_bad_binary (mp, p, mp_glyph_infont);
27731 else
27732 mp_set_up_glyph_infont (mp, p);
27733 break;
--
luigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/metapost/attachments/20220111/2af8148e/attachment.html>
More information about the metapost
mailing list.