<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://fenixwiki.booleansoup.com/skins/common/feed.css?63"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://fenixwiki.booleansoup.com/index.php?action=history&amp;feed=atom&amp;title=Load_ttfaa</id>
		<title>Load ttfaa - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://fenixwiki.booleansoup.com/index.php?action=history&amp;feed=atom&amp;title=Load_ttfaa"/>
		<link rel="alternate" type="text/html" href="http://fenixwiki.booleansoup.com/index.php?title=Load_ttfaa&amp;action=history"/>
		<updated>2026-05-01T08:07:20Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.10.1</generator>

	<entry>
		<id>http://fenixwiki.booleansoup.com/index.php?title=Load_ttfaa&amp;diff=4415&amp;oldid=prev</id>
		<title>Sandman at 00:54, 1 March 2008</title>
		<link rel="alternate" type="text/html" href="http://fenixwiki.booleansoup.com/index.php?title=Load_ttfaa&amp;diff=4415&amp;oldid=prev"/>
				<updated>2008-03-01T00:54:33Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;

			&lt;table border='0' width='98%' cellpadding='0' cellspacing='4' style=&quot;background-color: white;&quot;&gt;
			&lt;tr&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;Revision as of 00:54, 1 March 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 11:&lt;/strong&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 11:&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;Loads a [[TTF]] file as a [[font]] into memory.&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;Loads a [[TTF]] file as a [[font]] into memory.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;Also called '''TTF_LoadAA'''() (if TTF.fh is included).&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;== Parameters ==&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;== Parameters ==&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Sandman</name></author>	</entry>

	<entry>
		<id>http://fenixwiki.booleansoup.com/index.php?title=Load_ttfaa&amp;diff=4404&amp;oldid=prev</id>
		<title>Sandman: New page: Category:functions Category:ttfdll Category:dll  '''Up to TTF.DLL Functions''' ----   ==Definition== '''INT''' load_ttfaa ( &lt;'''STRING''' filename&gt; ...</title>
		<link rel="alternate" type="text/html" href="http://fenixwiki.booleansoup.com/index.php?title=Load_ttfaa&amp;diff=4404&amp;oldid=prev"/>
				<updated>2008-02-29T12:57:05Z</updated>
		
		<summary type="html">&lt;p&gt;New page: &lt;a href=&quot;/index.php/Category:Functions&quot; title=&quot;Category:Functions&quot;&gt;Category:functions&lt;/a&gt; &lt;a href=&quot;/index.php/Category:Ttfdll&quot; title=&quot;Category:Ttfdll&quot;&gt;Category:ttfdll&lt;/a&gt; &lt;a href=&quot;/index.php/Category:Dll&quot; title=&quot;Category:Dll&quot;&gt;Category:dll&lt;/a&gt;  &lt;a href=&quot;/index.php/Functioncategory:Ttfdll&quot; title=&quot;Functioncategory:Ttfdll&quot;&gt;'''Up to TTF.DLL Functions'''&lt;/a&gt; ----   ==Definition== '''INT''' load_ttfaa ( &amp;lt;'''STRING''' filename&amp;gt; ...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:functions]]&lt;br /&gt;
[[Category:ttfdll]]&lt;br /&gt;
[[Category:dll]]&lt;br /&gt;
&lt;br /&gt;
[[Functioncategory:Ttfdll|'''Up to TTF.DLL Functions''']]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Definition==&lt;br /&gt;
'''INT''' load_ttfaa ( &amp;lt;'''STRING''' filename&amp;gt; , &amp;lt;'''INT''' height&amp;gt; , &amp;lt;'''INT''' colordepth&amp;gt; , &amp;lt;'''INT''' backgroundcolor&amp;gt; , &amp;lt;'''INT''' textcolor&amp;gt; )&lt;br /&gt;
&lt;br /&gt;
Loads a [[TTF]] file as a [[font]] into memory.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
{|&lt;br /&gt;
| '''STRING''' filename || - The filename of the [[TTF]] file that you wish to load (including extension and possible path).&lt;br /&gt;
|-&lt;br /&gt;
| '''INT''' height || - The height in pixels of the to be created font, a size indication.&lt;br /&gt;
|-&lt;br /&gt;
| '''INT''' colordepth || - The [[colordepth]] of the to be created font (1,8 or 16).&lt;br /&gt;
|-&lt;br /&gt;
| '''INT''' backgroundcolor || - The background color of the to be created font.&lt;br /&gt;
|-&lt;br /&gt;
| '''INT''' textcolor || - The text color of the to be created font.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
'''INT''' : [[FontID]]&lt;br /&gt;
{|&lt;br /&gt;
| -1 || - Error: file does not exist; insufficient memory; failed to init freetype.dll; error while loading file; error creating new font.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || - Invalid filename.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;0 || - The FontID.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
{|&lt;br /&gt;
| Insufficient memory || - There is insufficient memory available. This error doesn't occur often.&lt;br /&gt;
|-&lt;br /&gt;
| Failed to init freetype.dll || - There was an error initializing freetype.dll&lt;br /&gt;
|-&lt;br /&gt;
| Error loading file || - There occurred an error while trying to load the file.&lt;br /&gt;
|-&lt;br /&gt;
| Error creating new font || - There occurred an error while trying to create a new font.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
This function gets a [http://en.wikipedia.org/wiki/Truetype TrueType] font and creates a new [[font]] with generated [[glyph]]s based on the recovered font in the standard characters set (ISO-8859-1).&lt;br /&gt;
These glyphs are generated with two colours, being the specified colours.&lt;br /&gt;
&lt;br /&gt;
It's possible to save the loaded font as [[FNT]] with [[save_fnt]](). This way the font can be reused on platforms not supporting [[TTF.DLL]]. Note that a FNT file only has information about the font for one size, while a TTF file has information for any size.&lt;br /&gt;
&lt;br /&gt;
The specified size is only an indication; some characters may be a little higher in fact.&lt;br /&gt;
&lt;br /&gt;
The parameters ''backgroundcolor'' and ''textcolor'' only matter for 8 and 16 bit colordepths. If you specify a colordepth of 1, then the returned font will be black (background) and white (textcolour). The advantage of this, is that you can use change the colour any time, even after loading, with [[set_text_color]]().&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
include &amp;quot;TTF.fh&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Process Main()&lt;br /&gt;
Private&lt;br /&gt;
    int fontID;&lt;br /&gt;
Begin&lt;br /&gt;
&lt;br /&gt;
    fontID = load_ttfaa(&amp;quot;myttf.ttf&amp;quot;,20,1,0,0); // 1bit colordepth&lt;br /&gt;
    set_text_color(rgb(255,0,255)); // set_text_color() after load_ttfaa()&lt;br /&gt;
    write(fontID,160,100,4,&amp;quot;Look at my TTF font!&amp;quot;);&lt;br /&gt;
   &lt;br /&gt;
    Repeat&lt;br /&gt;
        frame;&lt;br /&gt;
    Until(key(_ESC))&lt;br /&gt;
&lt;br /&gt;
    unload_fnt(fontID);&lt;br /&gt;
&lt;br /&gt;
End&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Used in example: [[load_ttfaa]](), [[set_text_color]](), [[rgb]](), [[write]](), [[key]](), [[unload_fnt]]()&lt;br /&gt;
&lt;br /&gt;
{{Ttffuncbox}}&lt;/div&gt;</summary>
		<author><name>Sandman</name></author>	</entry>

	</feed>