From fe89f847503573378180ddbe5e6badec18093c37 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Thu, 13 Dec 2018 17:52:15 -0500 Subject: render: font: Include a default font for convenience. * data/fonts/good-neighbors.fnt: New file. * data/fonts/good-neighbors.png: New file. * data/CREDITS: New file. * examples/fonts/AUTHORS: Delete. * examples/fonts/good_neighbors_starling.png: Delete. * examples/fonts/good_neighbors_starling.xml: Delete. * Makefile.am (dist_pkgdata_DATA, fontsdir, dist_fonts_DATA): New variables. (EXTRA_DIST): Remove examples/fonts files. * chickadee/render/font.scm (draw-text): Make font an optional keyword argument. * doc/api.texi (Fonts): Document it. * examples/grid.scm: Update to use new draw-text API. * examples/nine-patch.scm: Ditto. * examples/text.scm: Ditto. squash! render: font: Include a default font for convenience. --- doc/api.texi | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/api.texi b/doc/api.texi index ace2e7f..df68889 100644 --- a/doc/api.texi +++ b/doc/api.texi @@ -1578,12 +1578,13 @@ Return @code{#t} if @var{font} is a bold font. Return @code{#t} if @var{font} is an italicized font. @end deffn -@deffn {Procedure} draw-text @var{font} @var{text} @var{position} - [#:origin] [#:scale] [#:rotation] [#:blend-mode] +@deffn {Procedure} draw-text @var{text} @var{position} + [#:font] [#:origin] [#:scale] [#:rotation] [#:blend-mode] [#:start 0] [#:end @code{(string-length text)}] Draw the string @var{text} with the first character starting at -@var{position} using @var{font}. +@var{position} using @var{font}. If @var{font} is not specified, a +built-in font is used. @example (draw-text font "Hello, world!" (vec2 128.0 128.0)) -- cgit v1.2.3