~ubuntu-branches/ubuntu/utopic/castle-game-engine/utopic

« back to all changes in this revision

Viewing changes to doc/pasdoc/html/CastleWinFontConvert.html

  • Committer: Package Import Robot
  • Author(s): Paul Gevers
  • Date: 2013-09-08 21:18:46 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20130908211846-zzo3xbeb11fn1vil
Tags: 4.1.1-1
* New upstream release
  - Drop all patches, applied upstream
  - Add fp-units-net to Build-depends
* Add myself to uploaders
* Reorganize d/rules

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
<html>
3
3
<head>
4
4
<title>Castle Game Engine: CastleWinFontConvert</title>
5
 
<meta name="generator" content="PasDoc 0.12.1">
 
5
<meta name="generator" content="PasDoc 0.13.0">
6
6
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
7
7
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
8
8
</head>
23
23
<a name="PasDoc-FuncsProcs"></a><h3 class="summary">Functions and Procedures</h3>
24
24
<table class="summary wide_list">
25
25
<tr class="list">
26
 
<td class="itemcode"><code>function <b><a  href="CastleWinFontConvert.html#Font2BitmapChar_HDc">Font2BitmapChar_HDc</a></b>(dc: HDc; c: char): <a  href="CastleBitmapFonts.html#PBitmapChar">PBitmapChar</a>;</code></td>
27
 
</tr>
28
 
<tr class="list2">
29
 
<td class="itemcode"><code>function <b><a  href="CastleWinFontConvert.html#Font2OutlineChar_HDc">Font2OutlineChar_HDc</a></b>(dc: HDc; c: char): <a  href="CastleOutlineFonts.html#POutlineChar">POutlineChar</a>;</code></td>
30
 
</tr>
31
 
<tr class="list">
32
 
<td class="itemcode"><code>function <b><a  href="CastleWinFontConvert.html#Font2BitmapFont_HDc">Font2BitmapFont_HDc</a></b>(dc: HDc): <a  href="CastleBitmapFonts.TBitmapFont.html">TBitmapFont</a>;</code></td>
33
 
</tr>
34
 
<tr class="list2">
35
 
<td class="itemcode"><code>function <b><a  href="CastleWinFontConvert.html#Font2OutlineFont_HDc">Font2OutlineFont_HDc</a></b>(dc: HDc): <a  href="CastleOutlineFonts.TOutlineFont.html">TOutlineFont</a>;</code></td>
36
 
</tr>
37
 
<tr class="list">
38
 
<td class="itemcode"><code>function <b><a  href="CastleWinFontConvert.html#Font2BitmapChar">Font2BitmapChar</a></b>(WinFont: HFont; c: char): <a  href="CastleBitmapFonts.html#PBitmapChar">PBitmapChar</a>;</code></td>
39
 
</tr>
40
 
<tr class="list2">
41
 
<td class="itemcode"><code>function <b><a  href="CastleWinFontConvert.html#Font2OutlineChar">Font2OutlineChar</a></b>(WinFont: HFont; c: char): <a  href="CastleOutlineFonts.html#POutlineChar">POutlineChar</a>;</code></td>
42
 
</tr>
43
 
<tr class="list">
44
26
<td class="itemcode"><code>function <b><a  href="CastleWinFontConvert.html#Font2BitmapFont">Font2BitmapFont</a></b>(WinFont: HFont): <a  href="CastleBitmapFonts.TBitmapFont.html">TBitmapFont</a>;</code></td>
45
27
</tr>
46
28
<tr class="list2">
57
39
<h3 class="detail">Functions and Procedures</h3>
58
40
<table class="detail wide_list">
59
41
<tr class="list">
60
 
<td class="itemcode"><a name="Font2BitmapChar_HDc"></a><code>function <b>Font2BitmapChar_HDc</b>(dc: HDc; c: char): <a  href="CastleBitmapFonts.html#PBitmapChar">PBitmapChar</a>;</code></td>
61
 
</tr>
62
 
<tr><td colspan="1">
63
 
<p>
64
 
Both functions grab character c from Windows font currently selected on device context dc. Remeber to free resulting pointer by FreeMem.
65
 
 
66
 
<p>&quot;Underline&quot; and &quot;strikeout&quot; : I observed that it does not matter whether font is underline or strikeout (e.g. what values for fdwUnderline/StrikeOut you gave when calling CreateFont). Fonts converted by this function are always NOT underlined and not strikeout. On the other hand, &quot;bold&quot; (actually &quot;weight&quot;) and &quot;italic&quot; matter, i.e. fonts created by this functions reflect the weight and italic state of the font. This is true both for <a class="normal" href="CastleWinFontConvert.html#Font2BitmapChar">Font2BitmapChar</a> and <a class="normal" href="CastleWinFontConvert.html#Font2OutlineChar">Font2OutlineChar</a>. This is an effect of how Windows.GetGlyphOutline works. However I didn't find any place documenting these details about GetGlyphOutline. This is not a result of the fact that TTF fonts are usually distributed with separate bold, italic, and bold+italic versions, because I checked this with fonts that are distributed without bold, italic, bold+italic versions (i.e. bold, italic, bold+italic versions must be automatically synthesized by Windows) and for such fonts it works the same : bold, italic, b+i versions can be constructed by Font2XxxChar versions below, and underline and strikeout properties of Windows font are ignored.
67
 
 
68
 
<p></p>
69
 
</td></tr>
70
 
</table>
71
 
<table class="detail wide_list">
72
 
<tr class="list">
73
 
<td class="itemcode"><a name="Font2OutlineChar_HDc"></a><code>function <b>Font2OutlineChar_HDc</b>(dc: HDc; c: char): <a  href="CastleOutlineFonts.html#POutlineChar">POutlineChar</a>;</code></td>
74
 
</tr>
75
 
<tr><td colspan="1">
76
 
&nbsp;</td></tr>
77
 
</table>
78
 
<table class="detail wide_list">
79
 
<tr class="list">
80
 
<td class="itemcode"><a name="Font2BitmapFont_HDc"></a><code>function <b>Font2BitmapFont_HDc</b>(dc: HDc): <a  href="CastleBitmapFonts.TBitmapFont.html">TBitmapFont</a>;</code></td>
81
 
</tr>
82
 
<tr><td colspan="1">
83
 
<p>
84
 
Grab currently selected Windows font on device context dc. Remeber to free resulting font later by <a class="normal" href="CastleWinFontConvert.html#FreeAndNilFont">FreeAndNilFont</a>. </p>
85
 
</td></tr>
86
 
</table>
87
 
<table class="detail wide_list">
88
 
<tr class="list">
89
 
<td class="itemcode"><a name="Font2OutlineFont_HDc"></a><code>function <b>Font2OutlineFont_HDc</b>(dc: HDc): <a  href="CastleOutlineFonts.TOutlineFont.html">TOutlineFont</a>;</code></td>
90
 
</tr>
91
 
<tr><td colspan="1">
92
 
&nbsp;</td></tr>
93
 
</table>
94
 
<table class="detail wide_list">
95
 
<tr class="list">
96
 
<td class="itemcode"><a name="Font2BitmapChar"></a><code>function <b>Font2BitmapChar</b>(WinFont: HFont; c: char): <a  href="CastleBitmapFonts.html#PBitmapChar">PBitmapChar</a>;</code></td>
97
 
</tr>
98
 
<tr><td colspan="1">
99
 
<p>
100
 
Usually much more comfortable versions of Font2XxxFont_HDc and Font2XxxChar_HDc. They take HFont, not HDc. This way they avoid some strangeness of GetGlyphOutline function (that requires as an argument HDc with selected font, not HFont)
101
 
 
102
 
<p></p>
103
 
</td></tr>
104
 
</table>
105
 
<table class="detail wide_list">
106
 
<tr class="list">
107
 
<td class="itemcode"><a name="Font2OutlineChar"></a><code>function <b>Font2OutlineChar</b>(WinFont: HFont; c: char): <a  href="CastleOutlineFonts.html#POutlineChar">POutlineChar</a>;</code></td>
108
 
</tr>
109
 
<tr><td colspan="1">
110
 
&nbsp;</td></tr>
111
 
</table>
112
 
<table class="detail wide_list">
113
 
<tr class="list">
114
42
<td class="itemcode"><a name="Font2BitmapFont"></a><code>function <b>Font2BitmapFont</b>(WinFont: HFont): <a  href="CastleBitmapFonts.TBitmapFont.html">TBitmapFont</a>;</code></td>
115
43
</tr>
116
44
<tr><td colspan="1">
117
 
&nbsp;</td></tr>
 
45
<p>
 
46
Create our font from a Windows font handle. Remeber to free resulting font later by <a class="normal" href="CastleWinFontConvert.html#FreeAndNilFont">FreeAndNilFont</a>. </p>
 
47
</td></tr>
118
48
</table>
119
49
<table class="detail wide_list">
120
50
<tr class="list">
129
59
</tr>
130
60
<tr><td colspan="1">
131
61
<p>
132
 
Free and nil Font instance, freeing also all characters by FreeMem. Use this only on fonts with characters created by GetMem. </p>
 
62
Free and nil Font instance, freeing also all characters by FreeMem. Use this only on fonts with characters created by <a class="normal" href="CastleWinFontConvert.html#Font2BitmapFont">Font2BitmapFont</a> / <a class="normal" href="CastleWinFontConvert.html#Font2OutlineFont">Font2OutlineFont</a>. </p>
133
63
</td></tr>
134
64
</table>
135
65
<table class="detail wide_list">
139
69
<tr><td colspan="1">
140
70
&nbsp;</td></tr>
141
71
</table>
142
 
<hr noshade size="1"><span class="appinfo"><em>Generated by <a  href="http://pasdoc.sourceforge.net/">PasDoc 0.12.1</a> on 2013-02-04 20:26:53</em>
 
72
<hr noshade size="1"><span class="appinfo"><em>Generated by <a  href="http://pasdoc.sourceforge.net/">PasDoc 0.13.0</a> on 2013-08-17 21:27:15</em>
143
73
</span>
144
74
</td></tr></table></body></html>