ui.baseline-alignment: better stack effects.

master
John Benediktsson 2020-05-16 10:05:11 -07:00
parent 824e239915
commit 33e72abff9
1 changed files with 4 additions and 4 deletions

View File

@ -47,16 +47,16 @@ TUPLE: gadget-metrics height ascent descent cap-height ;
: ?supremum ( seq -- n/f )
sift [ f ] [ supremum ] if-empty ;
: max-ascent ( seq -- n )
: max-ascent ( seq -- n/f )
[ ascent>> ] map ?supremum ;
: max-cap-height ( seq -- n )
: max-cap-height ( seq -- n/f )
[ cap-height>> ] map ?supremum ;
: max-descent ( seq -- n )
: max-descent ( seq -- n/f )
[ descent>> ] map ?supremum ;
: max-graphics-height ( seq -- y )
: max-graphics-height ( seq -- n )
[ ascent>> ] reject [ height>> ] map ?supremum 0 or ;
:: combine-metrics ( graphics-height ascent descent cap-height -- ascent' descent' )