<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>custom font &#8211; Max&#039; Blog</title>
	<atom:link href="https://www.maxstuerzl.com/tag/custom-font/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.maxstuerzl.com</link>
	<description>Me and Gamedevelopment</description>
	<lastBuildDate>Tue, 08 Mar 2022 18:13:47 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.2</generator>
	<item>
		<title>Creating a fontsystem</title>
		<link>https://www.maxstuerzl.com/creating-a-fontsystem/</link>
					<comments>https://www.maxstuerzl.com/creating-a-fontsystem/#respond</comments>
		
		<dc:creator><![CDATA[MaxPlay]]></dc:creator>
		<pubDate>Sun, 27 Dec 2015 22:51:28 +0000</pubDate>
				<category><![CDATA[Gamedev]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[custom font]]></category>
		<category><![CDATA[xna]]></category>
		<guid isPermaLink="false">http://maxstuerzl.com/?p=27</guid>

					<description><![CDATA[Because in a game it is somewhere required to use a line of text, most game engines are able to process fonts on the fly or on startup. XNA supports so called &#8220;spritefonts&#8221;, a system that uses xml-files as informationcontainer. These xml-files are saved as &#8220;*.spritefont&#8221;-file, but even inside they reveal their truth: The first &#8230; <p class="link-more"><a href="https://www.maxstuerzl.com/creating-a-fontsystem/" class="more-link">Continue reading<span class="screen-reader-text"> "Creating a fontsystem"</span></a></p>]]></description>
										<content:encoded><![CDATA[
<p>Because in a game it is somewhere required to use a line of text, most game engines are able to process fonts on the fly or on startup. XNA supports so called &#8220;spritefonts&#8221;, a system that uses xml-files as informationcontainer. These xml-files are saved as &#8220;*.spritefont&#8221;-file, but even inside they reveal their truth: The first line is an xml-validation.</p>



<p>But xml can&#8217;t be used to tell the graphics-processor what to draw, so XNA compiles the information into an xnb-file which is just a collection of bitmaps that are connected to Unicode-Characters. When these characters are called, the font provides the required infomation about them.</p>



<p>The problem is: This system can&#8217;t be used on the fly, but in compiletime. And thats the problem. I don&#8217;t use the regular contentpipeline. I load my stuff into the engine when I need it, spritefonts don&#8217;t support this behaviour.</p>



<p>I had to create my own font-system.</p>



<h3 class="wp-block-heading">The *.gef-system</h3>



<p>I created a system that saves characters into a binary-file followed by bitmaps representing them. I will write an article about the file-architecture sometime, but the current article will be about the creation of the font.</p>



<p>The encoders and the decoder are both extracted from the core-assembly of the game-engine. The reason is simple: I wanted an external tool for the creation of the fonts.</p>



<p>I know there are some simple rules about creating object-oriented assemblies and these tell me that one class has only one job and one purpose. Same goes for the assembly itself. I want to have it as a standalone linked-library. The engine uses the decoder, the tool the encoder, but instead of splitting these up, I create an independent assembly. And there is another thing that I want to mention about the independent assembly: I can update and build it without rebuilding a whole gameengine.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.maxstuerzl.com/creating-a-fontsystem/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
