From b80992b27aa2dafe5cfeaf200c377e0ceac424f3 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Tue, 18 Sep 2012 09:19:29 -0700 Subject: [PATCH] Revert "ui.gadgets.labels: use font-metrics directly." This reverts commit d9fdd71d64c6aaeb26c7443cef123691176c40d1. --- basis/ui/gadgets/labels/labels.factor | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/basis/ui/gadgets/labels/labels.factor b/basis/ui/gadgets/labels/labels.factor index 0b4c060633..1d01cd4d68 100644 --- a/basis/ui/gadgets/labels/labels.factor +++ b/basis/ui/gadgets/labels/labels.factor @@ -52,11 +52,18 @@ M: label string<< ( string label -- ) M: label pref-dim* >label< text-dim ; +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<