Revert "ui.gadgets.labels: use font-metrics directly."

This reverts commit d9fdd71d64.
John Benediktsson 2012-09-18 09:19:29 -07:00
parent 09fd18b542
commit cb2e128e62
1 changed files with 9 additions and 2 deletions

View File

@ -52,11 +52,18 @@ M: label string<< ( string label -- )
M: label pref-dim*
>label< text-dim ;
<PRIVATE
: label-metrics ( label -- metrics )
>label< dup string? [ first ] unless line-metrics ;
PRIVATE>
M: label baseline
font>> font-metrics ascent>> round ;
label-metrics ascent>> round ;
M: label cap-height
font>> font-metrics cap-height>> round ;
label-metrics cap-height>> round ;
M: label draw-gadget*
>label<