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

db4
John Benediktsson 2012-09-17 14:07:23 -07:00
parent 8e3c79b841
commit eb1a4db801
1 changed files with 2 additions and 9 deletions

View File

@ -52,18 +52,11 @@ 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
label-metrics ascent>> round ;
font>> font-metrics ascent>> round ;
M: label cap-height
label-metrics cap-height>> round ;
font>> font-metrics cap-height>> round ;
M: label draw-gadget*
>label<