Disable font leading in line-support for now

db4
Slava Pestov 2009-02-14 00:44:32 -06:00
parent faf0c94c6f
commit 6988baf0a1
1 changed files with 3 additions and 7 deletions

View File

@ -16,13 +16,9 @@ GENERIC: line-height ( gadget -- n )
M: gadget line-height font>> font-metrics height>> ;
: y>line ( y gadget -- n )
[ line-leading ] [ line-height ] bi
[ [ - ] keep ] dip + /i ;
: y>line ( y gadget -- n ) line-height /i ;
: line>y ( n gadget -- y )
[ line-height ] [ line-leading ] bi
[ + * ] keep - ;
: line>y ( n gadget -- y ) line-height * ;
: validate-line ( m gadget -- n )
control-value [ drop f ] [ length 1- min 0 max ] if-empty ;
@ -49,7 +45,7 @@ GENERIC: draw-line ( line index gadget -- )
[ first-visible-line ]
[ last-visible-line ]
[ control-value ]
[ [ line-leading ] [ line-height ] bi + ]
[ line-height ]
[ ]
} cleave '[
0 over _ * 2array