diff options
Diffstat (limited to 'manuals/chickadee/Fonts.html')
-rw-r--r-- | manuals/chickadee/Fonts.html | 56 |
1 files changed, 30 insertions, 26 deletions
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 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> -<!-- Copyright (C) 2017-2021 David Thompson davet@gnu.org +<!-- Copyright (C) 2017-2023 David Thompson dthompson2@worcester.edu Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 @@ -17,25 +17,25 @@ Foundation Web site at http://www.gnu.org/licenses/fdl.html. The document was typeset with http://www.texinfo.org/ (GNU Texinfo). - --> -<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ --> + --> +<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ --> <head> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Fonts (The Chickadee Game Toolkit)</title> -<meta name="description" content="Fonts (The Chickadee Game Toolkit)"> -<meta name="keywords" content="Fonts (The Chickadee Game Toolkit)"> -<meta name="resource-type" content="document"> -<meta name="distribution" content="global"> -<meta name="Generator" content="makeinfo"> -<link href="index.html" rel="start" title="Top"> -<link href="Index.html" rel="index" title="Index"> -<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> -<link href="Graphics.html" rel="up" title="Graphics"> -<link href="Vector-Paths.html" rel="next" title="Vector Paths"> -<link href="Sprites.html" rel="prev" title="Sprites"> +<meta name="description" content="Fonts (The Chickadee Game Toolkit)" /> +<meta name="keywords" content="Fonts (The Chickadee Game Toolkit)" /> +<meta name="resource-type" content="document" /> +<meta name="distribution" content="global" /> +<meta name="Generator" content="makeinfo" /> +<link href="index.html" rel="start" title="Top" /> +<link href="Index.html" rel="index" title="Index" /> +<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents" /> +<link href="Graphics.html" rel="up" title="Graphics" /> +<link href="Vector-Paths.html" rel="next" title="Vector Paths" /> +<link href="Sprites.html" rel="prev" title="Sprites" /> <style type="text/css"> -<!-- +<!-- a.summary-letter {text-decoration: none} blockquote.indentedblock {margin-right: 0em} div.display {margin-left: 3.2em} @@ -72,9 +72,9 @@ ul.no-bullet {list-style: none} } } ---> +--> </style> -<link rel="stylesheet" type="text/css" href="https://dthompson.us/css/dthompson.css"> +<link rel="stylesheet" type="text/css" href="https://dthompson.us/css/dthompson.css" /> </head> @@ -84,13 +84,13 @@ ul.no-bullet {list-style: none} <p> Next: <a href="Vector-Paths.html" accesskey="n" rel="next">Vector Paths</a>, Previous: <a href="Sprites.html" accesskey="p" rel="prev">Sprites</a>, Up: <a href="Graphics.html" accesskey="u" rel="up">Graphics</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html" title="Index" rel="index">Index</a>]</p> </div> -<hr> +<hr /> <span id="Fonts-1"></span><h4 class="subsection">5.3.4 Fonts</h4> <p>Printing text to the screen is quite easy: </p> -<div class="example"> -<pre class="example">(draw-text "Hello, world" (vec2 100.0 100.0)) +<div class="lisp"> +<pre class="lisp"><span class="syntax-open">(</span><span class="syntax-symbol">draw-text</span> <span class="syntax-string">"Hello, world"</span> <span class="syntax-open">(</span><span class="syntax-symbol">vec2</span> <span class="syntax-symbol">100.0</span> <span class="syntax-symbol">100.0</span><span class="syntax-close">)</span><span class="syntax-close">)</span> </pre></div> <p>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. </p> <p>The following procedures can be found in the <code>(chickadee graphics -font)</code> module: +text)</code> module: </p> <dl> -<dt id="index-load_002dfont">Procedure: <strong>load-font</strong> <em>file-name point-size [#:char-set]</em></dt> +<dt id="index-load_002dfont">Procedure: <strong>load-font</strong> <em>file-name point-size [#:char-set] [#:smooth? #t]</em></dt> <dd><p>Load the scalable (OpenType, TrueType, etc.) font in the file <var>file-name</var> and display it at the given <var>point-size</var>. By default, all the characters in the ASCII character set are loaded. This can be changed by passing a different character set (see <a href="https://www.gnu.org/software/guile/manual/html_node/Character-Sets.html#Character-Sets">Character Sets</a> in <cite>GNU Guile Reference Manual</cite>) using the <var>char-set</var> keyword argument. +</p> +<p>If <var>smooth?</var> is <code>#t</code> (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. </p></dd></dl> <dl> @@ -157,8 +161,8 @@ and return a new font object. <var>position</var> using <var>font</var>. If <var>font</var> is not specified, a built-in font is used. </p> -<div class="example"> -<pre class="example">(draw-text "Hello, world!" (vec2 128.0 128.0)) +<div class="lisp"> +<pre class="lisp"><span class="syntax-open">(</span><span class="syntax-symbol">draw-text</span> <span class="syntax-string">"Hello, world!"</span> <span class="syntax-open">(</span><span class="syntax-symbol">vec2</span> <span class="syntax-symbol">128.0</span> <span class="syntax-symbol">128.0</span><span class="syntax-close">)</span><span class="syntax-close">)</span> </pre></div> <p>To render a substring of <var>text</var>, use the <var>start</var> and <var>end</var> @@ -168,7 +172,7 @@ arguments. the other arguments. </p></dd></dl> -<hr> +<hr /> <div class="header"> <p> Next: <a href="Vector-Paths.html" accesskey="n" rel="next">Vector Paths</a>, Previous: <a href="Sprites.html" accesskey="p" rel="prev">Sprites</a>, Up: <a href="Graphics.html" accesskey="u" rel="up">Graphics</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html" title="Index" rel="index">Index</a>]</p> |