Remove file-length
parent
979a81a25d
commit
c3391ac0ae
|
@ -220,7 +220,7 @@ M: pathname <=> [ pathname-string ] compare ;
|
||||||
>r <file-reader> r> with-stream ; inline
|
>r <file-reader> r> with-stream ; inline
|
||||||
|
|
||||||
: file-contents ( path encoding -- str )
|
: file-contents ( path encoding -- str )
|
||||||
dupd [ file-length read ] with-file-reader ;
|
dupd [ file-info file-info-size read ] with-file-reader ;
|
||||||
|
|
||||||
: with-file-writer ( path encoding quot -- )
|
: with-file-writer ( path encoding quot -- )
|
||||||
>r <file-writer> r> with-stream ; inline
|
>r <file-writer> r> with-stream ; inline
|
||||||
|
|
|
@ -4,6 +4,7 @@ USING: alien alien.accessors alien.c-types arrays io kernel libc
|
||||||
math math.vectors namespaces opengl opengl.gl prettyprint assocs
|
math math.vectors namespaces opengl opengl.gl prettyprint assocs
|
||||||
sequences io.files io.styles continuations freetype
|
sequences io.files io.styles continuations freetype
|
||||||
ui.gadgets.worlds ui.render ui.backend byte-arrays ;
|
ui.gadgets.worlds ui.render ui.backend byte-arrays ;
|
||||||
|
|
||||||
IN: ui.freetype
|
IN: ui.freetype
|
||||||
|
|
||||||
TUPLE: freetype-renderer ;
|
TUPLE: freetype-renderer ;
|
||||||
|
@ -74,7 +75,7 @@ M: freetype-renderer free-fonts ( world -- )
|
||||||
: open-face ( font style -- face )
|
: open-face ( font style -- face )
|
||||||
ttf-name ttf-path
|
ttf-name ttf-path
|
||||||
dup malloc-file-contents
|
dup malloc-file-contents
|
||||||
swap file-length
|
swap file-info file-info-size
|
||||||
(open-face) ;
|
(open-face) ;
|
||||||
|
|
||||||
SYMBOL: dpi
|
SYMBOL: dpi
|
||||||
|
|
Loading…
Reference in New Issue