summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2020-09-30 23:25:46 -0400
committerDavid Thompson <dthompson2@worcester.edu>2020-10-03 22:02:26 -0400
commit1560e460223f89ea61537e13b499d70792d3f3b1 (patch)
tree17265cdbcb8f8d0083f9b47591d1df5da8f733a3 /doc
parent6d7ccaff8777345dfc7387c36c575548f1e44658 (diff)
Add OTF/TTF font support via freetype.
Diffstat (limited to 'doc')
-rw-r--r--doc/api.texi21
1 files changed, 15 insertions, 6 deletions
diff --git a/doc/api.texi b/doc/api.texi
index 446460e..84bcaed 100644
--- a/doc/api.texi
+++ b/doc/api.texi
@@ -2274,16 +2274,25 @@ Printing text to the screen is quite easy:
(draw-text "Hello, world" (vec2 100.0 100.0))
@end example
-Chickadee loads and renders bitmap fonts in the
-@url{http://www.angelcode.com/products/bmfont/doc/file_format.html,
-Angel Code format}. A default font named ``Good Neighbors'' is
-built-in to Chickadee and is used for all text rendering operations
-where a font is not specified, as is the case in the above example.
+Chickadee supports OpenType/TrueType fonts (via the FreeType library),
+bitmap fonts in Angel Code bmfont format, and simple sprite sheet
+bitmap fonts. A default font named Inconsolata is used for all text
+rendering operations where a font is not specified, as is the case in
+the above example.
The following procedures can be found in the @code{(chickadee render
font)} module:
-@deffn {Procedure} load-font file
+@deffn {Procedure} load-font file-name point-size [#:char-set]
+Load the scalable (OpenType, TrueType, etc.) font in the file
+@var{file-name} and display it at the given @var{point-size}. By
+default, all the characters in the ASCII character set are loaded.
+This can be changed by passing a different character set
+(@pxref{Character Sets,,, guile, GNU Guile Reference Manual}) using
+the @var{char-set} keyword argument.
+@end deffn
+
+@deffn {Procedure} load-bitmap-font file
Load the Angel Code font (in either XML or FNT format) in @var{file}
and return a new font object.
@end deffn