[lucida] incompatible sizes of arrows (uparrow and downarrow)

Mikael Sundqvist mickep at gmail.com
Wed Aug 17 14:37:24 CEST 2022


On Wed, Aug 17, 2022 at 12:21 PM Bruno Voisin <bvoisin at icloud.com> wrote:
>
> > On 16 Aug 2022, at 22:23, Mikael Sundqvist <mickep at gmail.com> wrote:
> >
> > I am using Lucida OT. The sizes of \uparrow (U+2191) and \downarrow
> > (U+2193), used as delimiters, are not the same. [...] Note that the \downarrow
> > is longer than the \uparrow.
>
> Hi Mickael (and Karl),
>
> For the original Type 1 fonts, applying t1disasm to lbms.pfb gives
>
> /arrowup {
>         145 530 hsbw
>         0 21 hstem
>         703 20 hstem
>         96 48 vstem
>         120 723 rmoveto
>         -120 -209 rlineto
>         96 48 rlineto
>         -562 vlineto
>         48 hlineto
>         562 vlineto
>         96 -48 rlineto
>         closepath
>         endchar
>         } ND
>
> /arrowdown {
>         145 530 hsbw
>         0 21 hstem
>         703 20 hstem
>         96 48 vstem
>         240 209 rmoveto
>         -96 -49 rlineto
>         563 vlineto
>         -48 hlineto
>         -563 vlineto
>         -96 49 rlineto
>         120 -209 rlineto
>         closepath
>         endchar
>         } ND
>
> The implied path drawing is consistent with FontForge's display of the glyphs and seems to say the up and down arrows have the same vertical size of 723 PostScript points (209 - 48 + 562 for arrowup, 209 - 49 + 563 for arrowdown).
>
> For the OpenType fonts, applying ttx to LucidaBrightMathOT.otf gives
>
> <CharString name="arrowup">
>   -110 302 783 rmoveto
>   -30 callsubr
>   endchar
> </CharString>
>
> where I think -30 callsubr calls subroutine 77 (= 107 - 30) that is
>
> <CharString index="77">
>   -169 -293 142 71 0 -561 54 0 0 561 142 -71 rlineto
>   return
> </CharString>
>
> and similarly
>
> <CharString name="arrowdown">
>   -110 302 hmoveto
>   -28 callsubr
>   endchar
> </CharString>
>
> <CharString index="79">
>   169 293 -142 -71 0 561 -54 0 0 -561 -142 71 rlineto
>   return
> </CharString>
>
> The path drawing associated with the subroutines seem to say the up and down arrows have the same vertical size of 783 points (293 - 71 + 561). Again this is consistent with FontForge's display of the glyphs.
>
> How did you obtain the unpacked font data? Was this using a specific ConTeXt tool?
>
> Bruno Voisin

Hi Bruno (sorry if you get this twice),


Thanks for your input. The unpacked font data is automatically
generated as a .tma file in the texmf-cache directory once a font is
used. I think that is for speeding things up. (Actually there is a
companion optimized tmd file, also present in texmf-cache. To make the
examples in the previous mail I did edit the tma file, removed the tmd
file, and recompiled the example file. This is a trick that I learned
from Hans Hagen.)

Regarding the measures you give. Yes, the base glyphs do have the same
measures. It is when we use the parts to make vertical extensibles
that we seem to get different numbers (the "advance", "start" and
"end" in the vparts). I never used the lucida t1 math, so I don't know
if it has these extensible arrows. I'm sorry if I was not clear
enough.

/Mikael


More information about the lucida mailing list.