summaryrefslogtreecommitdiff
path: root/2d/wrappers
diff options
context:
space:
mode:
authorDavid Thompson <dthompson@member.fsf.org>2013-08-26 22:09:45 -0400
committerDavid Thompson <dthompson@member.fsf.org>2013-08-26 22:09:45 -0400
commit95d31ad231800026e7b0a44ddda42c584dad5671 (patch)
treed76e718c37f3ee40fc1737d1fb58eef7717ff847 /2d/wrappers
parentcaec8d997059507b9a3eef497ad0508a2c6073d9 (diff)
Make the origin the top-left corner of the window again.
Diffstat (limited to '2d/wrappers')
-rw-r--r--2d/wrappers/ftgl.scm16
1 files changed, 15 insertions, 1 deletions
diff --git a/2d/wrappers/ftgl.scm b/2d/wrappers/ftgl.scm
index 1d18fad..537655c 100644
--- a/2d/wrappers/ftgl.scm
+++ b/2d/wrappers/ftgl.scm
@@ -73,6 +73,12 @@
(define-foreign %ftgl-render-font
void "ftglRenderFont" (list '* '* unsigned-int))
+(define-foreign %ftgl-get-font-descender
+ float "ftglGetFontDescender" '(*))
+
+(define-foreign %ftgl-get-font-ascender
+ float "ftglGetFontAscender" '(*))
+
(define (ftgl-create-texture-font filename)
(wrap-ftgl-font
(%ftgl-create-texture-font (string->pointer filename))))
@@ -85,9 +91,17 @@
(string->pointer text)
render-mode))
+(define (ftgl-get-font-descender font)
+ (%ftgl-get-font-descender (unwrap-ftgl-font font)))
+
+(define (ftgl-get-font-ascender font)
+ (%ftgl-get-font-ascender (unwrap-ftgl-font font)))
+
(export ftgl-create-texture-font
ftgl-set-font-face-size
- ftgl-render-font)
+ ftgl-render-font
+ ftgl-get-font-descender
+ ftgl-get-font-ascender)
;;;
;;; SimpleLayout