dlangui/ftfonts.html

117 lines
4.9 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<link href='https://fonts.googleapis.com/css?family=Chivo:900' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen" />
<link rel="stylesheet" type="text/css" href="stylesheets/pygment_trac.css" media="screen" />
<link rel="stylesheet" type="text/css" href="stylesheets/print.css" media="print" />
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<title>DlangUI - cross platform GUI library for D programming language - dlangui.graphics.ftfonts</title>
</head>
<body>
<div id="container">
<div class="inner">
<header>
<h1>DlangUI</h1>
<h2>Cross Platform GUI for D programming language</h2>
</header>
<section id="downloads" class="clearfix">
<a href="index.html" id="home" class="button"><span>Home</span></a>
<a href="api.html" id="home" class="button"><span>API Docs</span></a>
<a href="screenshots.html" id="home" class="button"><span>Screenshots</span></a>
<a href="https://github.com/buggins/dlangui/zipball/master" id="download-zip" class="button"><span>Download .zip</span></a>
<!--a href="https://github.com/buggins/dlangui/tarball/master" id="download-tar-gz" class="button"><span>Download .tar.gz</span></a-->
<a href="https://github.com/buggins/dlangui" id="view-on-github" class="button"><span>View on GitHub</span></a>
</section>
<hr>
<section id="main_content">
<h1>dlangui.graphics.ftfonts</h1>
<!-- Generated by Ddoc from src\dlangui\graphics\ftfonts.d -->
This file contains FontManager implementation based on FreeType library.
<br><br>
<b>License:</b><br>
Boost License 1.0
<br><br>
<b>Authors:</b><br>
Vadim Lopatin, coolreader.org@gmail.com<br><br>
<dl><dt><big><a name="FreeTypeFont"></a>class <u>FreeTypeFont</u>: <u>dlangui.graphics.fonts.Font</u>;
</big></dt>
<dd>Font implementation based on Win32 API system fonts.<br><br>
<dl><dt><big><a name="FreeTypeFont.this"></a>this(FontFileItem <i>item</i>, int <i>size</i>);
</big></dt>
<dd>need to call create() after construction to initialize font<br><br>
</dd>
<dt><big><a name="FreeTypeFont.clear"></a>void <u>clear</u>();
</big></dt>
<dd>cleanup resources<br><br>
</dd>
<dt><big><a name="FreeTypeFont.findGlyph"></a>bool <u>findGlyph</u>(dchar <i>code</i>, dchar <i>def_char</i>, ref FT_UInt <i>index</i>, ref FreeTypeFontFile <i>file</i>);
</big></dt>
<dd>find glyph <i>index</i> for character<br><br>
</dd>
<dt><big><a name="FreeTypeFont.create"></a>bool <u>create</u>();
</big></dt>
<dd>load font files<br><br>
</dd>
<dt><big><a name="FreeTypeFont.checkpoint"></a>void <u>checkpoint</u>();
</big></dt>
<dd>clear usage flags for all entries<br><br>
</dd>
<dt><big><a name="FreeTypeFont.cleanup"></a>void <u>cleanup</u>();
</big></dt>
<dd>removes entries not used after last call of checkpoint() or <u>cleanup</u>()<br><br>
</dd>
</dl>
</dd>
<dt><big><a name="FreeTypeFontManager"></a>class <u>FreeTypeFontManager</u>: <u>dlangui.graphics.fonts.FontManager</u>;
</big></dt>
<dd>FreeType based font manager.<br><br>
<dl><dt><big><a name="FreeTypeFontManager.getFont"></a>ref FontRef <u>getFont</u>(int <i>size</i>, int <i>weight</i>, bool <i>italic</i>, FontFamily <i>family</i>, string <i>face</i>);
</big></dt>
<dd>get font instance with specified parameters<br><br>
</dd>
<dt><big><a name="FreeTypeFontManager.checkpoint"></a>void <u>checkpoint</u>();
</big></dt>
<dd>clear usage flags for all entries<br><br>
</dd>
<dt><big><a name="FreeTypeFontManager.cleanup"></a>void <u>cleanup</u>();
</big></dt>
<dd>removes entries not used after last call of checkpoint() or <u>cleanup</u>()<br><br>
</dd>
<dt><big><a name="FreeTypeFontManager.registerFont"></a>bool <u>registerFont</u>(string <i>filename</i>, FontFamily <i>family</i> = FontFamily.SansSerif, string <i>face</i> = null, bool <i>italic</i> = false, int <i>weight</i> = 0);
</big></dt>
<dd>register freetype font by <i>filename</i> - optinally font properties can be passed if known (e.g. from libfontconfig).<br><br>
</dd>
</dl>
</dd>
</dl>
</section>
<footer>
Dlangui is maintained by <a href="https://github.com/buggins">buggins</a><br>
This page was generated by <a href="http://pages.github.com">GitHub Pages</a>. Tactile theme by <a href="https://twitter.com/jasonlong">Jason Long</a>.
</footer>
</div>
</div>
</body>
</html>