From 03072ef67af0623758a660e2cd3fb5e153133efa Mon Sep 17 00:00:00 2001 From: David Thompson Date: Wed, 24 May 2023 08:09:03 -0400 Subject: Update chickadee manual. --- manuals/chickadee/Fonts.html | 56 ++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 26 deletions(-) (limited to 'manuals/chickadee/Fonts.html') diff --git a/manuals/chickadee/Fonts.html b/manuals/chickadee/Fonts.html index a442f91..9383789 100644 --- a/manuals/chickadee/Fonts.html +++ b/manuals/chickadee/Fonts.html @@ -1,6 +1,6 @@ - - + --> + - + Fonts (The Chickadee Game Toolkit) - - - - - - - - - - - + + + + + + + + + + + - + @@ -84,13 +84,13 @@ ul.no-bullet {list-style: none}

Next: , Previous: , Up: Graphics   [Contents][Index]

-
+

5.3.4 Fonts

Printing text to the screen is quite easy:

-
-
(draw-text "Hello, world" (vec2 100.0 100.0))
+
+
(draw-text "Hello, world" (vec2 100.0 100.0))
 

Chickadee supports OpenType/TrueType fonts (via the FreeType library), @@ -100,16 +100,20 @@ rendering operations where a font is not specified, as is the case in the above example.

The following procedures can be found in the (chickadee graphics -font) module: +text) module:

-
Procedure: load-font file-name point-size [#:char-set]
+
Procedure: load-font file-name point-size [#:char-set] [#:smooth? #t]

Load the scalable (OpenType, TrueType, etc.) font in the file file-name and display it at the given point-size. By default, all the characters in the ASCII character set are loaded. This can be changed by passing a different character set (see Character Sets in GNU Guile Reference Manual) using the char-set keyword argument. +

+

If smooth? is #t (the default), text rendered with this +font will have a smoother appearance when text is rotated or scaled, +otherwise non-smooth scaling will be used.

@@ -157,8 +161,8 @@ and return a new font object. position using font. If font is not specified, a built-in font is used.

-
-
(draw-text "Hello, world!" (vec2 128.0 128.0))
+
+
(draw-text "Hello, world!" (vec2 128.0 128.0))
 

To render a substring of text, use the start and end @@ -168,7 +172,7 @@ arguments. the other arguments.

-
+

Next: , Previous: , Up: Graphics   [Contents][Index]

-- cgit v1.2.3