/findfont-enc { % => FontName Encoding exch findfont % => FontSize dup length dict begin { 1 index /FID ne { def } { pop pop } ifelse } forall /Encoding 1 index def currentdict end /Font-Enc exch definefont % => exch pop } def /font-ascender { % => <> dup /FontBBox get 3 get 0 2 index /FontMatrix get transform pop % => <> Ascender %1 index font-descender sub % => <> Ascender' exch pop } def /font-descender { % => <> dup /FontBBox get 1 get 0 2 index /FontMatrix get transform pop exch pop neg } def /font-underline-pos { % => <> dup /FontInfo get % => <> <> % some fonts (especially when you're using Adobe Distiller) do not contain /UnderlinePosition. dup /UnderlinePosition known { /UnderlinePosition get } { pop 2 px } ifelse % => <> UP 0 exch % => <> O UP 3 2 roll /FontMatrix get % => <> O UP transform % => 0 UPos exch pop } def /font-overline-pos { % => <> dup /FontBBox get 3 get % => <> Top 0.8 mul 0 exch 2 index /FontMatrix get transform exch pop exch pop } def /font-line-through-pos { % => <> dup /FontBBox get 3 get % => <> Top 0.25 mul 0 exch 2 index /FontMatrix get transform exch pop exch pop } def