<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<script type="text/javascript" language="JavaScript">
function reDo() {
if (innerWidth != origWidth || innerHeight != origHeight)
location.reload();
}
if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {
origWidth = innerWidth;
origHeight = innerHeight;
onresize = reDo;
}
onerror = null;
</script>
<style type="text/css">
< !-- div.WebHelpPopupMenu {
position: absolute;
left: 0px;
top: 0px;
z-index: 4;
visibility: hidden;
}
p.WebHelpNavBar {
text-align: right;
}
-->
</style>
<script type="text/javascript">
gRootRelPath = "../../../..";
gCommonRootRelPath = "../../../..";
gTopicId = "9.2.5.6";
<script type="text/javascript" src="../../../../template/scripts/rh.min.js"></script>
<script type="text/javascript" src="../../../../template/scripts/common.min.js"></script>
<script type="text/javascript" src="../../../../template/scripts/topic.min.js"></script>
<script type="text/javascript" src="../../../../template/scripts/topicwidgets.min.js"></script>
<script type="text/javascript" src="../../../../whxdata/projectsettings.js"></script>
<link rel="stylesheet" type="text/css" href="../../../../template/styles/topic.min.css"/>
<link rel="stylesheet" type="text/css" href="../../../../template/Charcoal_Grey/topicheader.css"/>
<meta name="topic-status" content="Draft"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Text</title>
<meta name="generator" content="Adobe RoboHelp 2019"/>
<link rel="stylesheet" href="../../../../assets/css/default.css" type="text/css"/>
<meta name="rh-authors" content="Mark Alexander"/>
<meta name="topic-comment" content="Reference section for the Text functions and variables"/>
<meta name="rh-index-keywords" content=""/>
<meta name="search-keywords" content="Text"/>
</head>
<body>
<div class="topic-header rh-hide" id="rh-topic-header" onclick="rh._.goToFullLayout()">
<div class="logo">
</div>
<div class="nav">
<div class="title" title="Text">
<span>Text</span>
</div>
<div class="gotohome" title="Click here to see this page in full context">
<span>Click here to see this page in full context</span>
</div>
</div>
</div>
<div class="topic-header-shadow rh-hide" id="rh-topic-header-shadow"></div>
<h1>Text</h1>
<p>There are a number of functions available to you for drawing text in various forms. It should be noted that some of these functions change the text colours and sizes in a dynamic way when being drawn, but when working with HTML5 or devices, these functions
can slow down your game or look poor and so it may be better to have various sized font resources rather than use scaled drawing, or have large font resources and then draw them scaled <i>down</i> rather than <i>up</i>.
Also, if you need to colour large blocks of text it is better to use the <a href="../Colour_And_Alpha/draw_set_colour.htm"><tt>draw_set_colour()</tt></a> and <a href="../Colour_And_Alpha/draw_set_alpha.htm"><tt>draw_set_alpha()</tt></a> functions
first along with the simple <tt>draw_text</tt> function, rather than those extended functions that have a colour component.</p>
<p>The following functions are for setting the font to be used when drawing, as well as the positioning of the text when drawn:</p>
<p> </p>
<ul class="colour">
<li><a href="draw_set_font.htm">draw_set_font</a></li>
<li><a href="draw_set_halign.htm">draw_set_halign</a></li>
<li><a href="draw_set_valign.htm">draw_set_valign</a></li>
<li><a href="draw_get_font.htm">draw_get_font</a></li>
<li><a href="draw_get_halign.htm">draw_get_halign</a></li>
<li><a href="draw_get_valign.htm">draw_get_valign</a></li>
</ul>
<p> </p>
<p>These functions can be used to draw text to the screen, either simply or with transforms and colour:</p>
<p> </p>
<ul class="colour">
<li><a href="draw_text.htm">draw_text</a></li>
<li><a href="draw_text_ext.htm">draw_text_ext</a></li>
<li><a href="draw_text_colour.htm">draw_text_colour</a></li>
<li><a href="draw_text_transformed.htm">draw_text_transformed</a></li>
<li><a href="draw_text_ext_colour.htm">draw_text_ext_colour</a></li>
<li><a href="draw_text_ext_transformed.htm">draw_text_ext_transformed</a></li>
<li><a href="draw_text_transformed_colour.htm">draw_text_transformed_colour</a></li>
<li><a href="draw_text_ext_transformed_colour.htm">draw_text_ext_transformed_colour</a></li>
</ul>
<p> </p>
<p>The following function also exists that is specific to drawing highscores created using the built in highscore system:</p>
<p> </p>
<ul class="colour">
<li><a href="draw_highscore.htm">draw_highscore</a></li>
</ul>
<p> </p>
<p> </p>
<p> </p>
<div class="footer">
<div class="buttons">
<div class="clear">
<div style="float:left">Back: <a href="../Drawing.htm">Drawing</a></div>
<div style="float:right">Next: <a href="../Primitives/Primitives_And_Vertex_Formats.htm"><span>Primitives And Vertex Formats</span></a></div>
</div>
</div>
<h5>© Copyright YoYo Games Ltd. 2020 All Rights Reserved</h5>
</div>
</body></html>