ui.baseline-alignment: better stack effects.
parent
824e239915
commit
33e72abff9
|
@ -47,16 +47,16 @@ TUPLE: gadget-metrics height ascent descent cap-height ;
|
||||||
: ?supremum ( seq -- n/f )
|
: ?supremum ( seq -- n/f )
|
||||||
sift [ f ] [ supremum ] if-empty ;
|
sift [ f ] [ supremum ] if-empty ;
|
||||||
|
|
||||||
: max-ascent ( seq -- n )
|
: max-ascent ( seq -- n/f )
|
||||||
[ ascent>> ] map ?supremum ;
|
[ ascent>> ] map ?supremum ;
|
||||||
|
|
||||||
: max-cap-height ( seq -- n )
|
: max-cap-height ( seq -- n/f )
|
||||||
[ cap-height>> ] map ?supremum ;
|
[ cap-height>> ] map ?supremum ;
|
||||||
|
|
||||||
: max-descent ( seq -- n )
|
: max-descent ( seq -- n/f )
|
||||||
[ descent>> ] map ?supremum ;
|
[ descent>> ] map ?supremum ;
|
||||||
|
|
||||||
: max-graphics-height ( seq -- y )
|
: max-graphics-height ( seq -- n )
|
||||||
[ ascent>> ] reject [ height>> ] map ?supremum 0 or ;
|
[ ascent>> ] reject [ height>> ] map ?supremum 0 or ;
|
||||||
|
|
||||||
:: combine-metrics ( graphics-height ascent descent cap-height -- ascent' descent' )
|
:: combine-metrics ( graphics-height ascent descent cap-height -- ascent' descent' )
|
||||||
|
|
Loading…
Reference in New Issue