nim-sdl2/docs/sdl2/sdl2_ttf.html
Joey Yakimowich-Payne 13bb7848ad Add docs
2020-04-26 15:20:37 -06:00

922 lines
86 KiB
HTML

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- This file is generated by Nim. -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Favicon -->
<link rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAUAAAAF////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAIAAABbAAAAlQAAAKIAAACbAAAAmwAAAKIAAACVAAAAWwAAAAL///8A////AP///wD///8A////AAAAABQAAADAAAAAYwAAAA3///8A////AP///wD///8AAAAADQAAAGMAAADAAAAAFP///wD///8A////AP///wAAAACdAAAAOv///wD///8A////AP///wD///8A////AP///wD///8AAAAAOgAAAJ3///8A////AP///wAAAAAnAAAAcP///wAAAAAoAAAASv///wD///8A////AP///wAAAABKAAAAKP///wAAAABwAAAAJ////wD///8AAAAAgQAAABwAAACIAAAAkAAAAJMAAACtAAAAFQAAABUAAACtAAAAkwAAAJAAAACIAAAAHAAAAIH///8A////AAAAAKQAAACrAAAAaP///wD///8AAAAARQAAANIAAADSAAAARf///wD///8AAAAAaAAAAKsAAACk////AAAAADMAAACcAAAAnQAAABj///8A////AP///wAAAAAYAAAAGP///wD///8A////AAAAABgAAACdAAAAnAAAADMAAAB1AAAAwwAAAP8AAADpAAAAsQAAAE4AAAAb////AP///wAAAAAbAAAATgAAALEAAADpAAAA/wAAAMMAAAB1AAAAtwAAAOkAAAD/AAAA/wAAAP8AAADvAAAA3gAAAN4AAADeAAAA3gAAAO8AAAD/AAAA/wAAAP8AAADpAAAAtwAAAGUAAAA/AAAA3wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAADfAAAAPwAAAGX///8A////AAAAAEgAAADtAAAAvwAAAL0AAADGAAAA7wAAAO8AAADGAAAAvQAAAL8AAADtAAAASP///wD///8A////AP///wD///8AAAAAO////wD///8A////AAAAAIcAAACH////AP///wD///8AAAAAO////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A//8AAP//AAD4HwAA7/cAAN/7AAD//wAAoYUAAJ55AACf+QAAh+EAAAAAAADAAwAA4AcAAP5/AAD//wAA//8AAA=="/>
<link rel="icon" type="image/png" sizes="32x32" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4QQQEwksSS9ZWwAAAk1JREFUWMPtll2ITVEUx39nn/O7Y5qR8f05wtCUUr6ZIS++8pEnkZInPImneaCQ5METNdOkeFBKUhMPRIkHKfEuUZSUlGlKPN2TrgfncpvmnntnmlEyq1Z7t89/rf9a6+y99oZxGZf/XeIq61EdtgKXgdXA0xrYAvBjOIF1AI9zvjcC74BSpndrJPkBWDScTF8Aa4E3wDlgHbASaANmVqlcCnwHvgDvgVfAJ+AikAAvgfVZwLnSVZHZaOuKoQi3ZOMi4NkYkpe1p4J7A8BpYAD49hfIy/oqG0+hLomiKP2L5L+1ubn5115S+3OAn4EnwBlgMzCjyt6ZAnQCJ4A7wOs88iRJHvw50HoujuPBoCKwHWiosy8MdfZnAdcHk8dxXFJ3VQbQlCTJvRBCGdRbD4M6uc5glpY3eAihpN5S5w12diSEcCCEcKUO4ljdr15T76ur1FDDLIQQ3qv71EdDOe3Kxj3leRXyk+pxdWnFWod6Wt2bY3de3aSuUHcPBVimHs7mK9WrmeOF6lR1o9qnzskh2ar2qm1qizpfXaPeVGdlmGN5pb09qMxz1Xb1kLqgzn1RyH7JUXW52lr5e/Kqi9qpto7V1atuUzfnARrV7jEib1T76gG2qxdGmXyiekkt1GswPTtek0aBfJp6YySGBfWg2tPQ0FAYgf1stUfdmdcjarbYJEniKIq6gY/Aw+zWHAC+p2labGpqiorFYgGYCEzN7oQdQClN07O1/EfDyGgC0ALMBdYAi4FyK+4H3gLPsxfR1zRNi+NP7nH5J+QntnXe5B5mpfQAAAAASUVORK5CYII=">
<!-- Google fonts -->
<link href='https://fonts.googleapis.com/css?family=Lato:400,600,900' rel='stylesheet' type='text/css'/>
<link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600' rel='stylesheet' type='text/css'/>
<!-- CSS -->
<title>sdl2/sdl2_ttf</title>
<link rel="stylesheet" type="text/css" href="../nimdoc.out.css">
<script type="text/javascript" src="dochack.js"></script>
<script type="text/javascript">
function main() {
var pragmaDots = document.getElementsByClassName("pragmadots");
for (var i = 0; i < pragmaDots.length; i++) {
pragmaDots[i].onclick = function(event) {
// Hide tease
event.target.parentNode.style.display = "none";
// Show actual
event.target.parentNode.nextElementSibling.style.display = "inline";
}
}
const toggleSwitch = document.querySelector('.theme-switch input[type="checkbox"]');
function switchTheme(e) {
if (e.target.checked) {
document.documentElement.setAttribute('data-theme', 'dark');
localStorage.setItem('theme', 'dark');
} else {
document.documentElement.setAttribute('data-theme', 'light');
localStorage.setItem('theme', 'light');
}
}
toggleSwitch.addEventListener('change', switchTheme, false);
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
document.documentElement.setAttribute('data-theme', "dark");
toggleSwitch.checked = true;
} else if (window.matchMedia && window.matchMedia('(prefers-color-scheme: light)').matches) {
document.documentElement.setAttribute('data-theme', "light");
toggleSwitch.checked = false;
} else {
const currentTheme = localStorage.getItem('theme') ? localStorage.getItem('theme') : null;
if (currentTheme) {
document.documentElement.setAttribute('data-theme', currentTheme);
if (currentTheme === 'dark') {
toggleSwitch.checked = true;
}
}
}
}
</script>
</head>
<body onload="main()">
<div class="document" id="documentId">
<div class="container">
<h1 class="title">sdl2/sdl2_ttf</h1>
<div class="row">
<div class="three columns">
<div class="theme-switch-wrapper">
<label class="theme-switch" for="checkbox">
<input type="checkbox" id="checkbox" />
<div class="slider round"></div>
</label>
&nbsp;&nbsp;&nbsp; <em>Dark Mode</em>
</div>
<div id="global-links">
<ul class="simple">
</ul>
</div>
<div id="searchInputDiv">
Search: <input type="text" id="searchInput"
onkeyup="search()" />
</div>
<div>
Group by:
<select onchange="groupBy(this.value)">
<option value="section">Section</option>
<option value="type">Type</option>
</select>
</div>
<ul class="simple simple-toc" id="toc-list">
<li>
<a class="reference reference-toplevel" href="#6" id="56">Imports</a>
<ul class="simple simple-toc-section">
</ul>
</li>
<li>
<a class="reference reference-toplevel" href="#7" id="57">Types</a>
<ul class="simple simple-toc-section">
<li><a class="reference" href="#Font"
title="Font {.incompleteStruct.} = object"><wbr />Font<span class="attachedType"></span></a></li>
</ul>
</li>
<li>
<a class="reference reference-toplevel" href="#10" id="60">Consts</a>
<ul class="simple simple-toc-section">
<li><a class="reference" href="#SDLttfStd"
title="SDLttfStd = false"><wbr />SDLttf<wbr />Std<span class="attachedType"></span></a></li>
<li><a class="reference" href="#SDLttfGit"
title="SDLttfGit = false"><wbr />SDLttf<wbr />Git<span class="attachedType"></span></a></li>
<li><a class="reference" href="#SDLttfDL"
title="SDLttfDL = true"><wbr />SDLttf<wbr />DL<span class="attachedType"></span></a></li>
<li><a class="reference" href="#SDLttfStatic"
title="SDLttfStatic = true"><wbr />SDLttf<wbr />Static<span class="attachedType"></span></a></li>
<li><a class="reference" href="#SDLttfSetVer"
title="SDLttfSetVer = &quot;&quot;"><wbr />SDLttf<wbr />Set<wbr />Ver<span class="attachedType"></span></a></li>
<li><a class="reference" href="#SDLttfLPath"
title="SDLttfLPath = &quot;/Users/joey/Projects/nim-sdl2/src/build/sdl2_ttf/buildcache/libSDL2_ttf.a&quot;"><wbr />SDLttf<wbr />LPath<span class="attachedType"></span></a></li>
<li><a class="reference" href="#SDLttfPath"
title="SDLttfPath = &quot;/Users/joey/Projects/nim-sdl2/src/build/sdl2_ttf/SDL_ttf.h&quot;"><wbr />SDLttf<wbr />Path<span class="attachedType"></span></a></li>
<li><a class="reference" href="#SetError"
title="SetError = &quot;&quot;"><wbr />Set<wbr />Error<span class="attachedType"></span></a></li>
<li><a class="reference" href="#GetError"
title="GetError = &quot;&quot;"><wbr />Get<wbr />Error<span class="attachedType"></span></a></li>
<li><a class="reference" href="#MAJOR_VERSION"
title="MAJOR_VERSION = 2"><wbr />MAJOR_<wbr />VERSION<span class="attachedType"></span></a></li>
<li><a class="reference" href="#MINOR_VERSION"
title="MINOR_VERSION = 0"><wbr />MINOR_<wbr />VERSION<span class="attachedType"></span></a></li>
<li><a class="reference" href="#PATCHLEVEL"
title="PATCHLEVEL = 15"><wbr />PATCHLEVEL<span class="attachedType"></span></a></li>
<li><a class="reference" href="#UNICODE_BOM_NATIVE"
title="UNICODE_BOM_NATIVE = 0x0000FEFF"><wbr />UNICODE_<wbr />BOM_<wbr />NATIVE<span class="attachedType"></span></a></li>
<li><a class="reference" href="#UNICODE_BOM_SWAPPED"
title="UNICODE_BOM_SWAPPED = 0x0000FFFE"><wbr />UNICODE_<wbr />BOM_<wbr />SWAPPED<span class="attachedType"></span></a></li>
<li><a class="reference" href="#STYLE_NORMAL"
title="STYLE_NORMAL = 0x00000000"><wbr />STYLE_<wbr />NORMAL<span class="attachedType"></span></a></li>
<li><a class="reference" href="#STYLE_BOLD"
title="STYLE_BOLD = 0x00000001"><wbr />STYLE_<wbr />BOLD<span class="attachedType"></span></a></li>
<li><a class="reference" href="#STYLE_ITALIC"
title="STYLE_ITALIC = 0x00000002"><wbr />STYLE_<wbr />ITALIC<span class="attachedType"></span></a></li>
<li><a class="reference" href="#STYLE_UNDERLINE"
title="STYLE_UNDERLINE = 0x00000004"><wbr />STYLE_<wbr />UNDERLINE<span class="attachedType"></span></a></li>
<li><a class="reference" href="#STYLE_STRIKETHROUGH"
title="STYLE_STRIKETHROUGH = 0x00000008"><wbr />STYLE_<wbr />STRIKETHROUGH<span class="attachedType"></span></a></li>
<li><a class="reference" href="#HINTING_NORMAL"
title="HINTING_NORMAL = 0"><wbr />HINTING_<wbr />NORMAL<span class="attachedType"></span></a></li>
<li><a class="reference" href="#HINTING_LIGHT"
title="HINTING_LIGHT = 1"><wbr />HINTING_<wbr />LIGHT<span class="attachedType"></span></a></li>
<li><a class="reference" href="#HINTING_MONO"
title="HINTING_MONO = 2"><wbr />HINTING_<wbr />MONO<span class="attachedType"></span></a></li>
<li><a class="reference" href="#HINTING_NONE"
title="HINTING_NONE = 3"><wbr />HINTING_<wbr />NONE<span class="attachedType"></span></a></li>
</ul>
</li>
<li>
<a class="reference reference-toplevel" href="#12" id="62">Procs</a>
<ul class="simple simple-toc-section">
<li><a class="reference" href="#linked_Version"
title="linked_Version(): ptr Version"><wbr />linked_<wbr />Version<span class="attachedType"></span></a></li>
<li><a class="reference" href="#byteSwappedUNICODE%2Ccint"
title="byteSwappedUNICODE(swapped: cint)"><wbr />byte<wbr />Swapped<wbr />UNICODE<span class="attachedType"></span></a></li>
<li><a class="reference" href="#init"
title="init(): cint"><wbr />init<span class="attachedType"></span></a></li>
<li><a class="reference" href="#openFont%2Ccstring%2Ccint"
title="openFont(file: cstring; ptsize: cint): ptr Font"><wbr />open<wbr />Font<span class="attachedType"></span></a></li>
<li><a class="reference" href="#openFontIndex%2Ccstring%2Ccint%2Cclong"
title="openFontIndex(file: cstring; ptsize: cint; index: clong): ptr Font"><wbr />open<wbr />Font<wbr />Index<span class="attachedType"></span></a></li>
<li><a class="reference" href="#openFontRW%2Cptr.RWops%2Ccint%2Ccint"
title="openFontRW(src: ptr RWops; freesrc: cint; ptsize: cint): ptr Font"><wbr />open<wbr />Font<wbr />RW<span class="attachedType"></span></a></li>
<li><a class="reference" href="#openFontIndexRW%2Cptr.RWops%2Ccint%2Ccint%2Cclong"
title="openFontIndexRW(src: ptr RWops; freesrc: cint; ptsize: cint; index: clong): ptr Font"><wbr />open<wbr />Font<wbr />Index<wbr />RW<span class="attachedType"></span></a></li>
<li><a class="reference" href="#getFontStyle%2Cptr.Font"
title="getFontStyle(font: ptr Font): cint"><wbr />get<wbr />Font<wbr />Style<span class="attachedType"></span></a></li>
<li><a class="reference" href="#setFontStyle%2Cptr.Font%2Ccint"
title="setFontStyle(font: ptr Font; style: cint)"><wbr />set<wbr />Font<wbr />Style<span class="attachedType"></span></a></li>
<li><a class="reference" href="#getFontOutline%2Cptr.Font"
title="getFontOutline(font: ptr Font): cint"><wbr />get<wbr />Font<wbr />Outline<span class="attachedType"></span></a></li>
<li><a class="reference" href="#setFontOutline%2Cptr.Font%2Ccint"
title="setFontOutline(font: ptr Font; outline: cint)"><wbr />set<wbr />Font<wbr />Outline<span class="attachedType"></span></a></li>
<li><a class="reference" href="#getFontHinting%2Cptr.Font"
title="getFontHinting(font: ptr Font): cint"><wbr />get<wbr />Font<wbr />Hinting<span class="attachedType"></span></a></li>
<li><a class="reference" href="#setFontHinting%2Cptr.Font%2Ccint"
title="setFontHinting(font: ptr Font; hinting: cint)"><wbr />set<wbr />Font<wbr />Hinting<span class="attachedType"></span></a></li>
<li><a class="reference" href="#fontHeight%2Cptr.Font"
title="fontHeight(font: ptr Font): cint"><wbr />font<wbr />Height<span class="attachedType"></span></a></li>
<li><a class="reference" href="#fontAscent%2Cptr.Font"
title="fontAscent(font: ptr Font): cint"><wbr />font<wbr />Ascent<span class="attachedType"></span></a></li>
<li><a class="reference" href="#fontDescent%2Cptr.Font"
title="fontDescent(font: ptr Font): cint"><wbr />font<wbr />Descent<span class="attachedType"></span></a></li>
<li><a class="reference" href="#fontLineSkip%2Cptr.Font"
title="fontLineSkip(font: ptr Font): cint"><wbr />font<wbr />Line<wbr />Skip<span class="attachedType"></span></a></li>
<li><a class="reference" href="#getFontKerning%2Cptr.Font"
title="getFontKerning(font: ptr Font): cint"><wbr />get<wbr />Font<wbr />Kerning<span class="attachedType"></span></a></li>
<li><a class="reference" href="#setFontKerning%2Cptr.Font%2Ccint"
title="setFontKerning(font: ptr Font; allowed: cint)"><wbr />set<wbr />Font<wbr />Kerning<span class="attachedType"></span></a></li>
<li><a class="reference" href="#fontFaces%2Cptr.Font"
title="fontFaces(font: ptr Font): clong"><wbr />font<wbr />Faces<span class="attachedType"></span></a></li>
<li><a class="reference" href="#fontFaceIsFixedWidth%2Cptr.Font"
title="fontFaceIsFixedWidth(font: ptr Font): cint"><wbr />font<wbr />Face<wbr />Is<wbr />Fixed<wbr />Width<span class="attachedType"></span></a></li>
<li><a class="reference" href="#fontFaceFamilyName%2Cptr.Font"
title="fontFaceFamilyName(font: ptr Font): cstring"><wbr />font<wbr />Face<wbr />Family<wbr />Name<span class="attachedType"></span></a></li>
<li><a class="reference" href="#fontFaceStyleName%2Cptr.Font"
title="fontFaceStyleName(font: ptr Font): cstring"><wbr />font<wbr />Face<wbr />Style<wbr />Name<span class="attachedType"></span></a></li>
<li><a class="reference" href="#glyphIsProvided%2Cptr.Font%2CUint16"
title="glyphIsProvided(font: ptr Font; ch: Uint16): cint"><wbr />glyph<wbr />Is<wbr />Provided<span class="attachedType"></span></a></li>
<li><a class="reference" href="#glyphMetrics%2Cptr.Font%2CUint16%2Cptr.cint%2Cptr.cint%2Cptr.cint%2Cptr.cint%2Cptr.cint"
title="glyphMetrics(font: ptr Font; ch: Uint16; minx: ptr cint; maxx: ptr cint; miny: ptr cint;
maxy: ptr cint; advance: ptr cint): cint"><wbr />glyph<wbr />Metrics<span class="attachedType"></span></a></li>
<li><a class="reference" href="#sizeText%2Cptr.Font%2Ccstring%2Cptr.cint%2Cptr.cint"
title="sizeText(font: ptr Font; text: cstring; w: ptr cint; h: ptr cint): cint"><wbr />size<wbr />Text<span class="attachedType"></span></a></li>
<li><a class="reference" href="#sizeUTF8%2Cptr.Font%2Ccstring%2Cptr.cint%2Cptr.cint"
title="sizeUTF8(font: ptr Font; text: cstring; w: ptr cint; h: ptr cint): cint"><wbr />size<wbr />UTF8<span class="attachedType"></span></a></li>
<li><a class="reference" href="#sizeUNICODE%2Cptr.Font%2Cptr.Uint16%2Cptr.cint%2Cptr.cint"
title="sizeUNICODE(font: ptr Font; text: ptr Uint16; w: ptr cint; h: ptr cint): cint"><wbr />size<wbr />UNICODE<span class="attachedType"></span></a></li>
<li><a class="reference" href="#renderText_Solid%2Cptr.Font%2Ccstring%2CColor"
title="renderText_Solid(font: ptr Font; text: cstring; fg: Color): ptr Surface"><wbr />render<wbr />Text_<wbr />Solid<span class="attachedType"></span></a></li>
<li><a class="reference" href="#renderUTF8_Solid%2Cptr.Font%2Ccstring%2CColor"
title="renderUTF8_Solid(font: ptr Font; text: cstring; fg: Color): ptr Surface"><wbr />render<wbr />UTF8_<wbr />Solid<span class="attachedType"></span></a></li>
<li><a class="reference" href="#renderUNICODE_Solid%2Cptr.Font%2Cptr.Uint16%2CColor"
title="renderUNICODE_Solid(font: ptr Font; text: ptr Uint16; fg: Color): ptr Surface"><wbr />render<wbr />UNICODE_<wbr />Solid<span class="attachedType"></span></a></li>
<li><a class="reference" href="#renderGlyph_Solid%2Cptr.Font%2CUint16%2CColor"
title="renderGlyph_Solid(font: ptr Font; ch: Uint16; fg: Color): ptr Surface"><wbr />render<wbr />Glyph_<wbr />Solid<span class="attachedType"></span></a></li>
<li><a class="reference" href="#renderText_Shaded%2Cptr.Font%2Ccstring%2CColor%2CColor"
title="renderText_Shaded(font: ptr Font; text: cstring; fg: Color; bg: Color): ptr Surface"><wbr />render<wbr />Text_<wbr />Shaded<span class="attachedType"></span></a></li>
<li><a class="reference" href="#renderUTF8_Shaded%2Cptr.Font%2Ccstring%2CColor%2CColor"
title="renderUTF8_Shaded(font: ptr Font; text: cstring; fg: Color; bg: Color): ptr Surface"><wbr />render<wbr />UTF8_<wbr />Shaded<span class="attachedType"></span></a></li>
<li><a class="reference" href="#renderUNICODE_Shaded%2Cptr.Font%2Cptr.Uint16%2CColor%2CColor"
title="renderUNICODE_Shaded(font: ptr Font; text: ptr Uint16; fg: Color; bg: Color): ptr Surface"><wbr />render<wbr />UNICODE_<wbr />Shaded<span class="attachedType"></span></a></li>
<li><a class="reference" href="#renderGlyph_Shaded%2Cptr.Font%2CUint16%2CColor%2CColor"
title="renderGlyph_Shaded(font: ptr Font; ch: Uint16; fg: Color; bg: Color): ptr Surface"><wbr />render<wbr />Glyph_<wbr />Shaded<span class="attachedType"></span></a></li>
<li><a class="reference" href="#renderText_Blended%2Cptr.Font%2Ccstring%2CColor"
title="renderText_Blended(font: ptr Font; text: cstring; fg: Color): ptr Surface"><wbr />render<wbr />Text_<wbr />Blended<span class="attachedType"></span></a></li>
<li><a class="reference" href="#renderUTF8_Blended%2Cptr.Font%2Ccstring%2CColor"
title="renderUTF8_Blended(font: ptr Font; text: cstring; fg: Color): ptr Surface"><wbr />render<wbr />UTF8_<wbr />Blended<span class="attachedType"></span></a></li>
<li><a class="reference" href="#renderUNICODE_Blended%2Cptr.Font%2Cptr.Uint16%2CColor"
title="renderUNICODE_Blended(font: ptr Font; text: ptr Uint16; fg: Color): ptr Surface"><wbr />render<wbr />UNICODE_<wbr />Blended<span class="attachedType"></span></a></li>
<li><a class="reference" href="#renderText_Blended_Wrapped%2Cptr.Font%2Ccstring%2CColor%2CUint32"
title="renderText_Blended_Wrapped(font: ptr Font; text: cstring; fg: Color; wrapLength: Uint32): ptr Surface"><wbr />render<wbr />Text_<wbr />Blended_<wbr />Wrapped<span class="attachedType"></span></a></li>
<li><a class="reference" href="#renderUTF8_Blended_Wrapped%2Cptr.Font%2Ccstring%2CColor%2CUint32"
title="renderUTF8_Blended_Wrapped(font: ptr Font; text: cstring; fg: Color; wrapLength: Uint32): ptr Surface"><wbr />render<wbr />UTF8_<wbr />Blended_<wbr />Wrapped<span class="attachedType"></span></a></li>
<li><a class="reference" href="#renderUNICODE_Blended_Wrapped%2Cptr.Font%2Cptr.Uint16%2CColor%2CUint32"
title="renderUNICODE_Blended_Wrapped(font: ptr Font; text: ptr Uint16; fg: Color;
wrapLength: Uint32): ptr Surface"><wbr />render<wbr />UNICODE_<wbr />Blended_<wbr />Wrapped<span class="attachedType"></span></a></li>
<li><a class="reference" href="#renderGlyph_Blended%2Cptr.Font%2CUint16%2CColor"
title="renderGlyph_Blended(font: ptr Font; ch: Uint16; fg: Color): ptr Surface"><wbr />render<wbr />Glyph_<wbr />Blended<span class="attachedType"></span></a></li>
<li><a class="reference" href="#closeFont%2Cptr.Font"
title="closeFont(font: ptr Font)"><wbr />close<wbr />Font<span class="attachedType"></span></a></li>
<li><a class="reference" href="#quit"
title="quit()"><wbr />quit<span class="attachedType"></span></a></li>
<li><a class="reference" href="#wasInit"
title="wasInit(): cint"><wbr />was<wbr />Init<span class="attachedType"></span></a></li>
<li><a class="reference" href="#getFontKerningSize%2Cptr.Font%2Ccint%2Ccint"
title="getFontKerningSize(font: ptr Font; prevIndex: cint; index: cint): cint"><wbr />get<wbr />Font<wbr />Kerning<wbr />Size<span class="attachedType"></span></a></li>
<li><a class="reference" href="#getFontKerningSizeGlyphs%2Cptr.Font%2CUint16%2CUint16"
title="getFontKerningSizeGlyphs(font: ptr Font; previousCh: Uint16; ch: Uint16): cint"><wbr />get<wbr />Font<wbr />Kerning<wbr />Size<wbr />Glyphs<span class="attachedType"></span></a></li>
</ul>
</li>
</ul>
</div>
<div class="nine columns" id="content">
<div id="tocRoot"></div>
<p class="module-desc"></p>
<div class="section" id="6">
<h1><a class="toc-backref" href="#6">Imports</a></h1>
<dl class="item">
<a class="reference external" href="sdl2.html">sdl2</a>
</dl></div>
<div class="section" id="7">
<h1><a class="toc-backref" href="#7">Types</a></h1>
<dl class="item">
<a id="Font"></a>
<dt><pre><a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">incompleteStruct</span></span><span class="Other">.}</span></span> <span class="Other">=</span> <span class="Keyword">object</span></pre></dt>
<dd>
</dd>
</dl></div>
<div class="section" id="10">
<h1><a class="toc-backref" href="#10">Consts</a></h1>
<dl class="item">
<a id="SDLttfStd"></a>
<dt><pre><a href="sdl2_ttf.html#SDLttfStd"><span class="Identifier">SDLttfStd</span></a> <span class="Other">=</span> <span class="DecNumber">false</span></pre></dt>
<dd>
</dd>
<a id="SDLttfGit"></a>
<dt><pre><a href="sdl2_ttf.html#SDLttfGit"><span class="Identifier">SDLttfGit</span></a> <span class="Other">=</span> <span class="DecNumber">false</span></pre></dt>
<dd>
</dd>
<a id="SDLttfDL"></a>
<dt><pre><a href="sdl2_ttf.html#SDLttfDL"><span class="Identifier">SDLttfDL</span></a> <span class="Other">=</span> <span class="DecNumber">true</span></pre></dt>
<dd>
</dd>
<a id="SDLttfStatic"></a>
<dt><pre><a href="sdl2_ttf.html#SDLttfStatic"><span class="Identifier">SDLttfStatic</span></a> <span class="Other">=</span> <span class="DecNumber">true</span></pre></dt>
<dd>
</dd>
<a id="SDLttfSetVer"></a>
<dt><pre><a href="sdl2_ttf.html#SDLttfSetVer"><span class="Identifier">SDLttfSetVer</span></a> <span class="Other">=</span> <span class="StringLit">&quot;&quot;</span></pre></dt>
<dd>
</dd>
<a id="SDLttfLPath"></a>
<dt><pre><a href="sdl2_ttf.html#SDLttfLPath"><span class="Identifier">SDLttfLPath</span></a> <span class="Other">=</span> <span class="StringLit">&quot;/Users/joey/Projects/nim-sdl2/src/build/sdl2_ttf/buildcache/libSDL2_ttf.a&quot;</span></pre></dt>
<dd>
</dd>
<a id="SDLttfPath"></a>
<dt><pre><a href="sdl2_ttf.html#SDLttfPath"><span class="Identifier">SDLttfPath</span></a> <span class="Other">=</span> <span class="StringLit">&quot;/Users/joey/Projects/nim-sdl2/src/build/sdl2_ttf/SDL_ttf.h&quot;</span></pre></dt>
<dd>
</dd>
<a id="SetError"></a>
<dt><pre><a href="sdl2_ttf.html#SetError"><span class="Identifier">SetError</span></a> <span class="Other">=</span> <span class="StringLit">&quot;&quot;</span></pre></dt>
<dd>
</dd>
<a id="GetError"></a>
<dt><pre><a href="sdl2_ttf.html#GetError"><span class="Identifier">GetError</span></a> <span class="Other">=</span> <span class="StringLit">&quot;&quot;</span></pre></dt>
<dd>
</dd>
<a id="MAJOR_VERSION"></a>
<dt><pre><a href="sdl2_ttf.html#MAJOR_VERSION"><span class="Identifier">MAJOR_VERSION</span></a> <span class="Other">=</span> <span class="DecNumber">2</span></pre></dt>
<dd>
</dd>
<a id="MINOR_VERSION"></a>
<dt><pre><a href="sdl2_ttf.html#MINOR_VERSION"><span class="Identifier">MINOR_VERSION</span></a> <span class="Other">=</span> <span class="DecNumber">0</span></pre></dt>
<dd>
</dd>
<a id="PATCHLEVEL"></a>
<dt><pre><a href="sdl2_ttf.html#PATCHLEVEL"><span class="Identifier">PATCHLEVEL</span></a> <span class="Other">=</span> <span class="DecNumber">15</span></pre></dt>
<dd>
</dd>
<a id="UNICODE_BOM_NATIVE"></a>
<dt><pre><a href="sdl2_ttf.html#UNICODE_BOM_NATIVE"><span class="Identifier">UNICODE_BOM_NATIVE</span></a> <span class="Other">=</span> <span class="DecNumber">0x0000FEFF</span></pre></dt>
<dd>
</dd>
<a id="UNICODE_BOM_SWAPPED"></a>
<dt><pre><a href="sdl2_ttf.html#UNICODE_BOM_SWAPPED"><span class="Identifier">UNICODE_BOM_SWAPPED</span></a> <span class="Other">=</span> <span class="DecNumber">0x0000FFFE</span></pre></dt>
<dd>
</dd>
<a id="STYLE_NORMAL"></a>
<dt><pre><a href="sdl2_ttf.html#STYLE_NORMAL"><span class="Identifier">STYLE_NORMAL</span></a> <span class="Other">=</span> <span class="DecNumber">0x00000000</span></pre></dt>
<dd>
</dd>
<a id="STYLE_BOLD"></a>
<dt><pre><a href="sdl2_ttf.html#STYLE_BOLD"><span class="Identifier">STYLE_BOLD</span></a> <span class="Other">=</span> <span class="DecNumber">0x00000001</span></pre></dt>
<dd>
</dd>
<a id="STYLE_ITALIC"></a>
<dt><pre><a href="sdl2_ttf.html#STYLE_ITALIC"><span class="Identifier">STYLE_ITALIC</span></a> <span class="Other">=</span> <span class="DecNumber">0x00000002</span></pre></dt>
<dd>
</dd>
<a id="STYLE_UNDERLINE"></a>
<dt><pre><a href="sdl2_ttf.html#STYLE_UNDERLINE"><span class="Identifier">STYLE_UNDERLINE</span></a> <span class="Other">=</span> <span class="DecNumber">0x00000004</span></pre></dt>
<dd>
</dd>
<a id="STYLE_STRIKETHROUGH"></a>
<dt><pre><a href="sdl2_ttf.html#STYLE_STRIKETHROUGH"><span class="Identifier">STYLE_STRIKETHROUGH</span></a> <span class="Other">=</span> <span class="DecNumber">0x00000008</span></pre></dt>
<dd>
</dd>
<a id="HINTING_NORMAL"></a>
<dt><pre><a href="sdl2_ttf.html#HINTING_NORMAL"><span class="Identifier">HINTING_NORMAL</span></a> <span class="Other">=</span> <span class="DecNumber">0</span></pre></dt>
<dd>
</dd>
<a id="HINTING_LIGHT"></a>
<dt><pre><a href="sdl2_ttf.html#HINTING_LIGHT"><span class="Identifier">HINTING_LIGHT</span></a> <span class="Other">=</span> <span class="DecNumber">1</span></pre></dt>
<dd>
</dd>
<a id="HINTING_MONO"></a>
<dt><pre><a href="sdl2_ttf.html#HINTING_MONO"><span class="Identifier">HINTING_MONO</span></a> <span class="Other">=</span> <span class="DecNumber">2</span></pre></dt>
<dd>
</dd>
<a id="HINTING_NONE"></a>
<dt><pre><a href="sdl2_ttf.html#HINTING_NONE"><span class="Identifier">HINTING_NONE</span></a> <span class="Other">=</span> <span class="DecNumber">3</span></pre></dt>
<dd>
</dd>
</dl></div>
<div class="section" id="12">
<h1><a class="toc-backref" href="#12">Procs</a></h1>
<dl class="item">
<a id="linked_Version"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#linked_Version"><span class="Identifier">linked_Version</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2.html#Version"><span class="Identifier">Version</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_Linked_Version&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
<pre>Make sure this is defined (only available in newer SDL versions)
This function gets the version of the dynamically linked SDL_ttf library.
it should NOT be used to fill a version structure, instead you should
use the SDL_TTF_VERSION() macro.</pre>
</dd>
<a id="byteSwappedUNICODE,cint"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#byteSwappedUNICODE%2Ccint"><span class="Identifier">byteSwappedUNICODE</span></a><span class="Other">(</span><span class="Identifier">swapped</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_ByteSwappedUNICODE&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
<pre>This function tells the library whether UNICODE text is generally
byteswapped. A UNICODE BOM character in a string will override
this setting for the remainder of that string.</pre>
</dd>
<a id="init"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#init"><span class="Identifier">init</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_Init&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
<pre>Initialize the TTF engine - returns 0 if successful, -1 on error</pre>
</dd>
<a id="openFont,cstring,cint"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#openFont%2Ccstring%2Ccint"><span class="Identifier">openFont</span></a><span class="Other">(</span><span class="Identifier">file</span><span class="Other">:</span> <span class="Identifier">cstring</span><span class="Other">;</span> <span class="Identifier">ptsize</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_OpenFont&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
<pre>Open a font file and create a font of the specified point size.
Some .fon fonts will have several sizes embedded in the file, so the
point size becomes the index of choosing which size. If the value
is too high, the last indexed size will be the default.</pre>
</dd>
<a id="openFontIndex,cstring,cint,clong"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#openFontIndex%2Ccstring%2Ccint%2Cclong"><span class="Identifier">openFontIndex</span></a><span class="Other">(</span><span class="Identifier">file</span><span class="Other">:</span> <span class="Identifier">cstring</span><span class="Other">;</span> <span class="Identifier">ptsize</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">index</span><span class="Other">:</span> <span class="Identifier">clong</span><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_OpenFontIndex&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
</dd>
<a id="openFontRW,ptr.RWops,cint,cint"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#openFontRW%2Cptr.RWops%2Ccint%2Ccint"><span class="Identifier">openFontRW</span></a><span class="Other">(</span><span class="Identifier">src</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2.html#RWops"><span class="Identifier">RWops</span></a><span class="Other">;</span> <span class="Identifier">freesrc</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">ptsize</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_OpenFontRW&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
</dd>
<a id="openFontIndexRW,ptr.RWops,cint,cint,clong"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#openFontIndexRW%2Cptr.RWops%2Ccint%2Ccint%2Cclong"><span class="Identifier">openFontIndexRW</span></a><span class="Other">(</span><span class="Identifier">src</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2.html#RWops"><span class="Identifier">RWops</span></a><span class="Other">;</span> <span class="Identifier">freesrc</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">ptsize</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">index</span><span class="Other">:</span> <span class="Identifier">clong</span><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_OpenFontIndexRW&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
</dd>
<a id="getFontStyle,ptr.Font"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#getFontStyle%2Cptr.Font"><span class="Identifier">getFontStyle</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_GetFontStyle&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
</dd>
<a id="setFontStyle,ptr.Font,cint"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#setFontStyle%2Cptr.Font%2Ccint"><span class="Identifier">setFontStyle</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">;</span> <span class="Identifier">style</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_SetFontStyle&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
</dd>
<a id="getFontOutline,ptr.Font"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#getFontOutline%2Cptr.Font"><span class="Identifier">getFontOutline</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_GetFontOutline&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
</dd>
<a id="setFontOutline,ptr.Font,cint"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#setFontOutline%2Cptr.Font%2Ccint"><span class="Identifier">setFontOutline</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">;</span> <span class="Identifier">outline</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_SetFontOutline&quot;</span><span class="Other">,</span>
<span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
</dd>
<a id="getFontHinting,ptr.Font"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#getFontHinting%2Cptr.Font"><span class="Identifier">getFontHinting</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_GetFontHinting&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
</dd>
<a id="setFontHinting,ptr.Font,cint"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#setFontHinting%2Cptr.Font%2Ccint"><span class="Identifier">setFontHinting</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">;</span> <span class="Identifier">hinting</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_SetFontHinting&quot;</span><span class="Other">,</span>
<span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
</dd>
<a id="fontHeight,ptr.Font"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#fontHeight%2Cptr.Font"><span class="Identifier">fontHeight</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_FontHeight&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
<pre>Get the total height of the font - usually equal to point size</pre>
</dd>
<a id="fontAscent,ptr.Font"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#fontAscent%2Cptr.Font"><span class="Identifier">fontAscent</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_FontAscent&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
<pre>Get the offset from the baseline to the top of the font
This is a positive value, relative to the baseline.</pre>
</dd>
<a id="fontDescent,ptr.Font"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#fontDescent%2Cptr.Font"><span class="Identifier">fontDescent</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_FontDescent&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
<pre>Get the offset from the baseline to the bottom of the font
This is a negative value, relative to the baseline.</pre>
</dd>
<a id="fontLineSkip,ptr.Font"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#fontLineSkip%2Cptr.Font"><span class="Identifier">fontLineSkip</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_FontLineSkip&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
<pre>Get the recommended spacing between lines of text for this font</pre>
</dd>
<a id="getFontKerning,ptr.Font"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#getFontKerning%2Cptr.Font"><span class="Identifier">getFontKerning</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_GetFontKerning&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
<pre>Get/Set whether or not kerning is allowed for this font</pre>
</dd>
<a id="setFontKerning,ptr.Font,cint"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#setFontKerning%2Cptr.Font%2Ccint"><span class="Identifier">setFontKerning</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">;</span> <span class="Identifier">allowed</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_SetFontKerning&quot;</span><span class="Other">,</span>
<span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
</dd>
<a id="fontFaces,ptr.Font"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#fontFaces%2Cptr.Font"><span class="Identifier">fontFaces</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">clong</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_FontFaces&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
<pre>Get the number of faces of the font</pre>
</dd>
<a id="fontFaceIsFixedWidth,ptr.Font"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#fontFaceIsFixedWidth%2Cptr.Font"><span class="Identifier">fontFaceIsFixedWidth</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_FontFaceIsFixedWidth&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
<pre>Get the font face attributes, if any</pre>
</dd>
<a id="fontFaceFamilyName,ptr.Font"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#fontFaceFamilyName%2Cptr.Font"><span class="Identifier">fontFaceFamilyName</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cstring</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_FontFaceFamilyName&quot;</span><span class="Other">,</span>
<span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
</dd>
<a id="fontFaceStyleName,ptr.Font"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#fontFaceStyleName%2Cptr.Font"><span class="Identifier">fontFaceStyleName</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cstring</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_FontFaceStyleName&quot;</span><span class="Other">,</span>
<span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
</dd>
<a id="glyphIsProvided,ptr.Font,Uint16"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#glyphIsProvided%2Cptr.Font%2CUint16"><span class="Identifier">glyphIsProvided</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">;</span> <span class="Identifier">ch</span><span class="Other">:</span> <a href="sdl2.html#Uint16"><span class="Identifier">Uint16</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_GlyphIsProvided&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
<pre>Check wether a glyph is provided by the font or not</pre>
</dd>
<a id="glyphMetrics,ptr.Font,Uint16,ptr.cint,ptr.cint,ptr.cint,ptr.cint,ptr.cint"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#glyphMetrics%2Cptr.Font%2CUint16%2Cptr.cint%2Cptr.cint%2Cptr.cint%2Cptr.cint%2Cptr.cint"><span class="Identifier">glyphMetrics</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">;</span> <span class="Identifier">ch</span><span class="Other">:</span> <a href="sdl2.html#Uint16"><span class="Identifier">Uint16</span></a><span class="Other">;</span> <span class="Identifier">minx</span><span class="Other">:</span> <span class="Keyword">ptr</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">maxx</span><span class="Other">:</span> <span class="Keyword">ptr</span> <span class="Identifier">cint</span><span class="Other">;</span>
<span class="Identifier">miny</span><span class="Other">:</span> <span class="Keyword">ptr</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">maxy</span><span class="Other">:</span> <span class="Keyword">ptr</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">advance</span><span class="Other">:</span> <span class="Keyword">ptr</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_GlyphMetrics&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
<pre>Get the metrics (dimensions) of a glyph
To understand what these metrics mean, here is a useful link:
http:freetype.sourceforge.net/freetype2/docs/tutorial/step2.html</pre>
</dd>
<a id="sizeText,ptr.Font,cstring,ptr.cint,ptr.cint"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#sizeText%2Cptr.Font%2Ccstring%2Cptr.cint%2Cptr.cint"><span class="Identifier">sizeText</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">;</span> <span class="Identifier">text</span><span class="Other">:</span> <span class="Identifier">cstring</span><span class="Other">;</span> <span class="Identifier">w</span><span class="Other">:</span> <span class="Keyword">ptr</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">h</span><span class="Other">:</span> <span class="Keyword">ptr</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_SizeText&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
<pre>Get the dimensions of a rendered string of text</pre>
</dd>
<a id="sizeUTF8,ptr.Font,cstring,ptr.cint,ptr.cint"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#sizeUTF8%2Cptr.Font%2Ccstring%2Cptr.cint%2Cptr.cint"><span class="Identifier">sizeUTF8</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">;</span> <span class="Identifier">text</span><span class="Other">:</span> <span class="Identifier">cstring</span><span class="Other">;</span> <span class="Identifier">w</span><span class="Other">:</span> <span class="Keyword">ptr</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">h</span><span class="Other">:</span> <span class="Keyword">ptr</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_SizeUTF8&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
</dd>
<a id="sizeUNICODE,ptr.Font,ptr.Uint16,ptr.cint,ptr.cint"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#sizeUNICODE%2Cptr.Font%2Cptr.Uint16%2Cptr.cint%2Cptr.cint"><span class="Identifier">sizeUNICODE</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">;</span> <span class="Identifier">text</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2.html#Uint16"><span class="Identifier">Uint16</span></a><span class="Other">;</span> <span class="Identifier">w</span><span class="Other">:</span> <span class="Keyword">ptr</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">h</span><span class="Other">:</span> <span class="Keyword">ptr</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_SizeUNICODE&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
</dd>
<a id="renderText_Solid,ptr.Font,cstring,Color"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#renderText_Solid%2Cptr.Font%2Ccstring%2CColor"><span class="Identifier">renderText_Solid</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">;</span> <span class="Identifier">text</span><span class="Other">:</span> <span class="Identifier">cstring</span><span class="Other">;</span> <span class="Identifier">fg</span><span class="Other">:</span> <a href="sdl2.html#Color"><span class="Identifier">Color</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2.html#Surface"><span class="Identifier">Surface</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_RenderText_Solid&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
<pre>Create an 8-bit palettized surface and render the given text at
fast quality with the given font and color. The 0 pixel is the
colorkey, giving a transparent background, and the 1 pixel is set
to the text color.
This function returns the new surface, or NULL if there was an error.</pre>
</dd>
<a id="renderUTF8_Solid,ptr.Font,cstring,Color"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#renderUTF8_Solid%2Cptr.Font%2Ccstring%2CColor"><span class="Identifier">renderUTF8_Solid</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">;</span> <span class="Identifier">text</span><span class="Other">:</span> <span class="Identifier">cstring</span><span class="Other">;</span> <span class="Identifier">fg</span><span class="Other">:</span> <a href="sdl2.html#Color"><span class="Identifier">Color</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2.html#Surface"><span class="Identifier">Surface</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_RenderUTF8_Solid&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
</dd>
<a id="renderUNICODE_Solid,ptr.Font,ptr.Uint16,Color"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#renderUNICODE_Solid%2Cptr.Font%2Cptr.Uint16%2CColor"><span class="Identifier">renderUNICODE_Solid</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">;</span> <span class="Identifier">text</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2.html#Uint16"><span class="Identifier">Uint16</span></a><span class="Other">;</span> <span class="Identifier">fg</span><span class="Other">:</span> <a href="sdl2.html#Color"><span class="Identifier">Color</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2.html#Surface"><span class="Identifier">Surface</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_RenderUNICODE_Solid&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
</dd>
<a id="renderGlyph_Solid,ptr.Font,Uint16,Color"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#renderGlyph_Solid%2Cptr.Font%2CUint16%2CColor"><span class="Identifier">renderGlyph_Solid</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">;</span> <span class="Identifier">ch</span><span class="Other">:</span> <a href="sdl2.html#Uint16"><span class="Identifier">Uint16</span></a><span class="Other">;</span> <span class="Identifier">fg</span><span class="Other">:</span> <a href="sdl2.html#Color"><span class="Identifier">Color</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2.html#Surface"><span class="Identifier">Surface</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_RenderGlyph_Solid&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
<pre>Create an 8-bit palettized surface and render the given glyph at
fast quality with the given font and color. The 0 pixel is the
colorkey, giving a transparent background, and the 1 pixel is set
to the text color. The glyph is rendered without any padding or
centering in the X direction, and aligned normally in the Y direction.
This function returns the new surface, or NULL if there was an error.</pre>
</dd>
<a id="renderText_Shaded,ptr.Font,cstring,Color,Color"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#renderText_Shaded%2Cptr.Font%2Ccstring%2CColor%2CColor"><span class="Identifier">renderText_Shaded</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">;</span> <span class="Identifier">text</span><span class="Other">:</span> <span class="Identifier">cstring</span><span class="Other">;</span> <span class="Identifier">fg</span><span class="Other">:</span> <a href="sdl2.html#Color"><span class="Identifier">Color</span></a><span class="Other">;</span> <span class="Identifier">bg</span><span class="Other">:</span> <a href="sdl2.html#Color"><span class="Identifier">Color</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2.html#Surface"><span class="Identifier">Surface</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_RenderText_Shaded&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
<pre>Create an 8-bit palettized surface and render the given text at
high quality with the given font and colors. The 0 pixel is background,
while other pixels have varying degrees of the foreground color.
This function returns the new surface, or NULL if there was an error.</pre>
</dd>
<a id="renderUTF8_Shaded,ptr.Font,cstring,Color,Color"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#renderUTF8_Shaded%2Cptr.Font%2Ccstring%2CColor%2CColor"><span class="Identifier">renderUTF8_Shaded</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">;</span> <span class="Identifier">text</span><span class="Other">:</span> <span class="Identifier">cstring</span><span class="Other">;</span> <span class="Identifier">fg</span><span class="Other">:</span> <a href="sdl2.html#Color"><span class="Identifier">Color</span></a><span class="Other">;</span> <span class="Identifier">bg</span><span class="Other">:</span> <a href="sdl2.html#Color"><span class="Identifier">Color</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2.html#Surface"><span class="Identifier">Surface</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_RenderUTF8_Shaded&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
</dd>
<a id="renderUNICODE_Shaded,ptr.Font,ptr.Uint16,Color,Color"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#renderUNICODE_Shaded%2Cptr.Font%2Cptr.Uint16%2CColor%2CColor"><span class="Identifier">renderUNICODE_Shaded</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">;</span> <span class="Identifier">text</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2.html#Uint16"><span class="Identifier">Uint16</span></a><span class="Other">;</span> <span class="Identifier">fg</span><span class="Other">:</span> <a href="sdl2.html#Color"><span class="Identifier">Color</span></a><span class="Other">;</span> <span class="Identifier">bg</span><span class="Other">:</span> <a href="sdl2.html#Color"><span class="Identifier">Color</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2.html#Surface"><span class="Identifier">Surface</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_RenderUNICODE_Shaded&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
</dd>
<a id="renderGlyph_Shaded,ptr.Font,Uint16,Color,Color"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#renderGlyph_Shaded%2Cptr.Font%2CUint16%2CColor%2CColor"><span class="Identifier">renderGlyph_Shaded</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">;</span> <span class="Identifier">ch</span><span class="Other">:</span> <a href="sdl2.html#Uint16"><span class="Identifier">Uint16</span></a><span class="Other">;</span> <span class="Identifier">fg</span><span class="Other">:</span> <a href="sdl2.html#Color"><span class="Identifier">Color</span></a><span class="Other">;</span> <span class="Identifier">bg</span><span class="Other">:</span> <a href="sdl2.html#Color"><span class="Identifier">Color</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2.html#Surface"><span class="Identifier">Surface</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_RenderGlyph_Shaded&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
<pre>Create an 8-bit palettized surface and render the given glyph at
high quality with the given font and colors. The 0 pixel is background,
while other pixels have varying degrees of the foreground color.
The glyph is rendered without any padding or centering in the X
direction, and aligned normally in the Y direction.
This function returns the new surface, or NULL if there was an error.</pre>
</dd>
<a id="renderText_Blended,ptr.Font,cstring,Color"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#renderText_Blended%2Cptr.Font%2Ccstring%2CColor"><span class="Identifier">renderText_Blended</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">;</span> <span class="Identifier">text</span><span class="Other">:</span> <span class="Identifier">cstring</span><span class="Other">;</span> <span class="Identifier">fg</span><span class="Other">:</span> <a href="sdl2.html#Color"><span class="Identifier">Color</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2.html#Surface"><span class="Identifier">Surface</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_RenderText_Blended&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
<pre>Create a 32-bit ARGB surface and render the given text at high quality,
using alpha blending to dither the font with the given color.
This function returns the new surface, or NULL if there was an error.</pre>
</dd>
<a id="renderUTF8_Blended,ptr.Font,cstring,Color"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#renderUTF8_Blended%2Cptr.Font%2Ccstring%2CColor"><span class="Identifier">renderUTF8_Blended</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">;</span> <span class="Identifier">text</span><span class="Other">:</span> <span class="Identifier">cstring</span><span class="Other">;</span> <span class="Identifier">fg</span><span class="Other">:</span> <a href="sdl2.html#Color"><span class="Identifier">Color</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2.html#Surface"><span class="Identifier">Surface</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_RenderUTF8_Blended&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
</dd>
<a id="renderUNICODE_Blended,ptr.Font,ptr.Uint16,Color"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#renderUNICODE_Blended%2Cptr.Font%2Cptr.Uint16%2CColor"><span class="Identifier">renderUNICODE_Blended</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">;</span> <span class="Identifier">text</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2.html#Uint16"><span class="Identifier">Uint16</span></a><span class="Other">;</span> <span class="Identifier">fg</span><span class="Other">:</span> <a href="sdl2.html#Color"><span class="Identifier">Color</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2.html#Surface"><span class="Identifier">Surface</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_RenderUNICODE_Blended&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
</dd>
<a id="renderText_Blended_Wrapped,ptr.Font,cstring,Color,Uint32"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#renderText_Blended_Wrapped%2Cptr.Font%2Ccstring%2CColor%2CUint32"><span class="Identifier">renderText_Blended_Wrapped</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">;</span> <span class="Identifier">text</span><span class="Other">:</span> <span class="Identifier">cstring</span><span class="Other">;</span> <span class="Identifier">fg</span><span class="Other">:</span> <a href="sdl2.html#Color"><span class="Identifier">Color</span></a><span class="Other">;</span>
<span class="Identifier">wrapLength</span><span class="Other">:</span> <a href="sdl2.html#Uint32"><span class="Identifier">Uint32</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2.html#Surface"><span class="Identifier">Surface</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_RenderText_Blended_Wrapped&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
<pre>Create a 32-bit ARGB surface and render the given text at high quality,
using alpha blending to dither the font with the given color.
Text is wrapped to multiple lines on line endings and on word boundaries
if it extends beyond wrapLength in pixels.
This function returns the new surface, or NULL if there was an error.</pre>
</dd>
<a id="renderUTF8_Blended_Wrapped,ptr.Font,cstring,Color,Uint32"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#renderUTF8_Blended_Wrapped%2Cptr.Font%2Ccstring%2CColor%2CUint32"><span class="Identifier">renderUTF8_Blended_Wrapped</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">;</span> <span class="Identifier">text</span><span class="Other">:</span> <span class="Identifier">cstring</span><span class="Other">;</span> <span class="Identifier">fg</span><span class="Other">:</span> <a href="sdl2.html#Color"><span class="Identifier">Color</span></a><span class="Other">;</span>
<span class="Identifier">wrapLength</span><span class="Other">:</span> <a href="sdl2.html#Uint32"><span class="Identifier">Uint32</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2.html#Surface"><span class="Identifier">Surface</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_RenderUTF8_Blended_Wrapped&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
</dd>
<a id="renderUNICODE_Blended_Wrapped,ptr.Font,ptr.Uint16,Color,Uint32"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#renderUNICODE_Blended_Wrapped%2Cptr.Font%2Cptr.Uint16%2CColor%2CUint32"><span class="Identifier">renderUNICODE_Blended_Wrapped</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">;</span> <span class="Identifier">text</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2.html#Uint16"><span class="Identifier">Uint16</span></a><span class="Other">;</span> <span class="Identifier">fg</span><span class="Other">:</span> <a href="sdl2.html#Color"><span class="Identifier">Color</span></a><span class="Other">;</span>
<span class="Identifier">wrapLength</span><span class="Other">:</span> <a href="sdl2.html#Uint32"><span class="Identifier">Uint32</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2.html#Surface"><span class="Identifier">Surface</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_RenderUNICODE_Blended_Wrapped&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
</dd>
<a id="renderGlyph_Blended,ptr.Font,Uint16,Color"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#renderGlyph_Blended%2Cptr.Font%2CUint16%2CColor"><span class="Identifier">renderGlyph_Blended</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">;</span> <span class="Identifier">ch</span><span class="Other">:</span> <a href="sdl2.html#Uint16"><span class="Identifier">Uint16</span></a><span class="Other">;</span> <span class="Identifier">fg</span><span class="Other">:</span> <a href="sdl2.html#Color"><span class="Identifier">Color</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2.html#Surface"><span class="Identifier">Surface</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_RenderGlyph_Blended&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
<pre>Create a 32-bit ARGB surface and render the given glyph at high quality,
using alpha blending to dither the font with the given color.
The glyph is rendered without any padding or centering in the X
direction, and aligned normally in the Y direction.
This function returns the new surface, or NULL if there was an error.</pre>
</dd>
<a id="closeFont,ptr.Font"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#closeFont%2Cptr.Font"><span class="Identifier">closeFont</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_CloseFont&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
<pre>Close an opened font file</pre>
</dd>
<a id="quit"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#quit"><span class="Identifier">quit</span></a><span class="Other">(</span><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_Quit&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
<pre>De-initialize the TTF engine</pre>
</dd>
<a id="wasInit"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#wasInit"><span class="Identifier">wasInit</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_WasInit&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
<pre>Check if the TTF engine is initialized</pre>
</dd>
<a id="getFontKerningSize,ptr.Font,cint,cint"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#getFontKerningSize%2Cptr.Font%2Ccint%2Ccint"><span class="Identifier">getFontKerningSize</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">;</span> <span class="Identifier">prevIndex</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">index</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_GetFontKerningSize&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
<pre>Get the kerning size of two glyphs indices
DEPRECATED: this function requires FreeType font indexes, not glyphs,
by accident, which we don't expose through this API, so it could give
wildly incorrect results, especially with non-ASCII values.
Going forward, please use TTF_GetFontKerningSizeGlyphs() instead, which
does what you probably expected this function to do.</pre>
</dd>
<a id="getFontKerningSizeGlyphs,ptr.Font,Uint16,Uint16"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#getFontKerningSizeGlyphs%2Cptr.Font%2CUint16%2CUint16"><span class="Identifier">getFontKerningSizeGlyphs</span></a><span class="Other">(</span><span class="Identifier">font</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_ttf.html#Font"><span class="Identifier">Font</span></a><span class="Other">;</span> <span class="Identifier">previousCh</span><span class="Other">:</span> <a href="sdl2.html#Uint16"><span class="Identifier">Uint16</span></a><span class="Other">;</span> <span class="Identifier">ch</span><span class="Other">:</span> <a href="sdl2.html#Uint16"><span class="Identifier">Uint16</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;TTF_GetFontKerningSizeGlyphs&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
<pre>Get the kerning size of two glyphs</pre>
</dd>
</dl></div>
</div>
</div>
<div class="row">
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br/>
<small style="color: var(--hint);">Made with Nim. Generated: 2020-04-26 21:10:29 UTC</small>
</div>
</div>
</div>
</div>
</body>
</html>