<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://inside.digipen.edu/index.php?action=history&amp;feed=atom&amp;title=GSDP%3AGAM100%2FCProcessing%2FCP_Font</id>
	<title>GSDP:GAM100/CProcessing/CP Font - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://inside.digipen.edu/index.php?action=history&amp;feed=atom&amp;title=GSDP%3AGAM100%2FCProcessing%2FCP_Font"/>
	<link rel="alternate" type="text/html" href="https://inside.digipen.edu/index.php?title=GSDP:GAM100/CProcessing/CP_Font&amp;action=history"/>
	<updated>2026-04-05T22:01:19Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.2</generator>
	<entry>
		<id>https://inside.digipen.edu/index.php?title=GSDP:GAM100/CProcessing/CP_Font&amp;diff=60545&amp;oldid=prev</id>
		<title>&gt;J.thiel: New page: =CP_Font= ==Description== '''CP_Font''' is a type that can be used to store loaded fonts and swap them out as needed. Calling the function [[GSDP:GAM100/CProcessing/CP_Font_Load()|CP_Font_...</title>
		<link rel="alternate" type="text/html" href="https://inside.digipen.edu/index.php?title=GSDP:GAM100/CProcessing/CP_Font&amp;diff=60545&amp;oldid=prev"/>
		<updated>2020-06-26T20:31:45Z</updated>

		<summary type="html">&lt;p&gt;New page: =CP_Font= ==Description== &amp;#039;&amp;#039;&amp;#039;CP_Font&amp;#039;&amp;#039;&amp;#039; is a type that can be used to store loaded fonts and swap them out as needed. Calling the function [[GSDP:GAM100/CProcessing/CP_Font_Load()|CP_Font_...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=CP_Font=&lt;br /&gt;
==Description==&lt;br /&gt;
'''CP_Font''' is a type that can be used to store loaded fonts and swap them out as needed. Calling the function [[GSDP:GAM100/CProcessing/CP_Font_Load()|CP_Font_Load()]] will load a font and [[GSDP:GAM100/CProcessing/CP_Font_Set()|CP_Font_Set()]] will set it as the current font. [[GSDP:GAM100/CProcessing/CP_Font_GetDefault()|CP_Font_GetDefault()]] can be used in place of a '''CP_Font''' to re-select the default font.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang='c'&amp;gt;&lt;br /&gt;
void update() &lt;br /&gt;
{&lt;br /&gt;
  // Set the background color to blue&lt;br /&gt;
  CP_Settings_Background(CP_Color_Create(60, 120, 255, 255));&lt;br /&gt;
&lt;br /&gt;
  // Load a font from the assets folder&lt;br /&gt;
  CP_Font font1 = CP_Font_Load(&amp;quot;./Assets/Exo2-Regular.ttf&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // Select it as the current font, setting the size to 36&lt;br /&gt;
  CP_Font_Set(font1, 36.0f);&lt;br /&gt;
&lt;br /&gt;
  // Write &amp;quot;Hello, World!&amp;quot; at the mouse position&lt;br /&gt;
  CP_Text_DrawText(&amp;quot;Hello, World!&amp;quot;, CP_Input_GetMouseX(), CP_Input_GetMouseY());&lt;br /&gt;
&lt;br /&gt;
  // Select the default font, size 36&lt;br /&gt;
  CP_Font_Set(CP_Font_GetDefault(), 36.0f);&lt;br /&gt;
&lt;br /&gt;
  // Write &amp;quot;Hello, World!&amp;quot; at the point (25, 25)&lt;br /&gt;
  CP_Text_DrawText(&amp;quot;Hello, World!&amp;quot;, 25.0f, 25.0f);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Related====&lt;br /&gt;
&lt;br /&gt;
* [[GSDP:GAM100/CProcessing                         |Main Page               ]]&lt;br /&gt;
* [[GSDP:GAM100/CProcessing/CP_Settings_Background()|CP_Settings_Background()]]&lt;br /&gt;
* [[GSDP:GAM100/CProcessing/CP_Font_GetDefault()    |CP_Font_GetDefault()    ]]&lt;br /&gt;
* [[GSDP:GAM100/CProcessing/CP_Font_Load()          |CP_Font_Load()          ]]&lt;br /&gt;
* [[GSDP:GAM100/CProcessing/CP_Text_DrawText()      |CP_Text_DrawText()      ]]&lt;br /&gt;
* [[GSDP:GAM100/CProcessing/CP_Text_DrawTextBox()   |CP_Text_DrawTextBox()   ]]&lt;br /&gt;
* [[GSDP:GAM100/CProcessing/CP_Font_Set()           |CP_Font_Set()           ]]&lt;br /&gt;
* [[GSDP:GAM100/CProcessing/CP_Text_SetSize()       |CP_Text_SetSize()       ]]&lt;/div&gt;</summary>
		<author><name>&gt;J.thiel</name></author>
	</entry>
</feed>