summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2018-12-13 17:52:15 -0500
committerDavid Thompson <dthompson2@worcester.edu>2018-12-13 20:53:29 -0500
commitfe89f847503573378180ddbe5e6badec18093c37 (patch)
tree33ef04eefee4b6c9da2dc3cb72629e9963dd7dad /doc
parentda895821c9aa1f8ec63e2eb7e8d317040d9989d7 (diff)
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.
Diffstat (limited to 'doc')
-rw-r--r--doc/api.texi7
1 files changed, 4 insertions, 3 deletions
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))