diff options
author | Gerry Agbobada <gagbobada@gmail.com> | 2020-05-24 14:03:34 +0200 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2020-10-09 09:19:01 -0400 |
commit | df05f9d1494d3a62a5b301f6f2db3410f21be458 (patch) | |
tree | 845643fa8202c2bae567a19eb5c74c8ddef5c655 /sdl2/bindings | |
parent | 1054cbd906ced5cb38476b00700aa8c279f6e1c8 (diff) |
ttf: Add more bindings.
Bindings added:
* TTF_FontAscent
* TTF_FontDescent
* TTF_FontLineSkip
* TTF_SizeUTF8
* TTF_GlyphIsProvided
* TTF_GetFontStyle
* TTF_SetFontStyle
Diffstat (limited to 'sdl2/bindings')
-rw-r--r-- | sdl2/bindings/ttf.scm | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/sdl2/bindings/ttf.scm b/sdl2/bindings/ttf.scm index fb3b717..1accf6c 100644 --- a/sdl2/bindings/ttf.scm +++ b/sdl2/bindings/ttf.scm @@ -42,6 +42,13 @@ RETURN-TYPE and accept arguments of ARG-TYPES." (define-public name (sdl-ttf-func return-type func-name arg-types))) +;; Font style bitmask. +;; If no bit is set in the mask, that means the style is "normal" +(define-public SDL_TTF_STYLE_BOLD #x01) +(define-public SDL_TTF_STYLE_ITALIC #x02) +(define-public SDL_TTF_STYLE_UNDERLINE #x04) +(define-public SDL_TTF_STYLE_STRIKETHROUGH #x08) + (define-foreign ttf-init int "TTF_Init" '()) @@ -57,9 +64,30 @@ RETURN-TYPE and accept arguments of ARG-TYPES." (define-foreign ttf-font-height int "TTF_FontHeight" '(*)) +(define-foreign ttf-font-ascent + int "TTF_FontAscent" '(*)) + +(define-foreign ttf-font-descent + int "TTF_FontDescent" '(*)) + +(define-foreign ttf-font-line-skip + int "TTF_FontLineSkip" '(*)) + +(define-foreign ttf-size-utf8 + int "TTF_SizeUTF8" '(* * * *)) + +(define-foreign ttf-glyph-is-provided + int "TTF_GlyphIsProvided" (list '* uint16)) + (define-foreign ttf-glyph-metrics int "TTF_GlyphMetrics" (list '* uint16 '* '* '* '* '*)) +(define-foreign ttf-get-font-style + int "TTF_GetFontStyle" '(*)) + +(define-foreign ttf-set-font-style + void "TTF_SetFontStyle" (list '* int)) + (define-foreign ttf-render-text-solid '* "TTF_RenderText_Solid" (list '* '* sdl-color)) |