[NTG-context] Obtaining the current font

Marco Patzer homerow at lavabit.com
Fri May 10 01:03:08 CEST 2013

On 2013–05–10 Mojca Miklavec wrote:

> > What are \font`0 and font`g? AFAIK the backtick converts the
> > character to the character code, which means it yields \font48 and
> > \font103. The goal is to get the current font, right?
> I believe it gives you width/height/depth of character 48/103 in
> current font. But I'm not sure how exactly all this works.
> > Why is the current font width and height addressed with `0 and the
> > depth with `g?
> Simply because the glyph for "0" usually doesn't stick below the
> baseline and would normally have the depth zero.

I didn't get that it addresses a particular glyph.

> Using the number "0" for width and height on the other hand
> becomes important as it represents the exact width (and height)
> when using numbers with "tabular" (not proportional) width.
> > And when do `0 and `g result in different values? In my tests
> > they were always the same.
> Almost always. Do you have a minimal example that shows otherwise?

I only tested the width or different fonts in different sizes, but
not the depth. Now the `g actually makes sense.

Thanks for the clarification, Mojca.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20130510/4eee9b62/attachment.pgp>

More information about the ntg-context mailing list