(: render-glyph-solid (ttf:font string sdl2:color -> sdl2:surface)) (define (render-glyph-solid font glyph fg) (set-finalizer! (render-glyph-solid* font glyph fg) free-surface!)) (: render-glyph-solid* (ttf:font string sdl2:color -> sdl2:surface)) (define (render-glyph-solid* font glyph fg) (let* ((glyph-int (%glyph->Uint16 glyph 'render-glyph-solid*)) (surf (TTF_RenderGlyph_Solid font glyph-int fg))) (if (%nonnull-surface? surf) surf (abort (sdl-failure "TTF_RenderGlyph_Solid" #f)))))