... |
... |
@@ -69,14 +69,14 @@ |
69
|
69
|
<p>Note that only a few font formats provide vertical
|
70
|
70
|
metrics. You can test whether a given face object
|
71
|
71
|
contains them by using the
|
72
|
|
- macro <a href="">"../reference/ft2-base_interface.html#ft_has_vertical"><code>FT_HAS_VERTICAL</code></a>,
|
|
72
|
+ macro <a href="">"../reference/ft2-font_testing_macros.html#ft_has_vertical"><code>FT_HAS_VERTICAL</code></a>,
|
73
|
73
|
which returns true if appropriate.</p>
|
74
|
74
|
|
75
|
75
|
<p>Individual glyph metrics can be accessed by first loading
|
76
|
76
|
the glyph in a face's glyph slot, then accessing them
|
77
|
77
|
through the <code>face->glyph->metrics</code>
|
78
|
78
|
structure, whose type
|
79
|
|
- is <a href="">"../reference/ft2-base_interface.html#ft_glyph_metrics"><code>FT_Glyph_Metrics</code></a>.
|
|
79
|
+ is <a href="">"../reference/ft2-glyph_retrieval.html#ft_glyph_metrics"><code>FT_Glyph_Metrics</code></a>.
|
80
|
80
|
We will discuss this in more detail below; for now, we
|
81
|
81
|
only note that it contains the following fields.</p>
|
82
|
82
|
|
... |
... |
@@ -89,7 +89,7 @@ |
89
|
89
|
<dd>This is the height of the glyph image's bounding box.
|
90
|
90
|
It is independent of the layout direction. Be careful
|
91
|
91
|
not to confuse it with the ‘height’ field in
|
92
|
|
- the <a href="">"../reference/ft2-base_interface.html#ft_size_metrics">
|
|
92
|
+ the <a href="">"../reference/ft2-sizing_and_scaling.html#ft_size_metrics">
|
93
|
93
|
<code>FT_Size_Metrics</code></a> structure.</dd>
|
94
|
94
|
|
95
|
95
|
<dt>horiBearingX</dt>
|
... |
... |
@@ -209,7 +209,7 @@ |
209
|
209
|
<p>The glyph image that is loaded in a glyph slot can be
|
210
|
210
|
converted into a bitmap, either by
|
211
|
211
|
using <code>FT_LOAD_RENDER</code> when loading it, or by
|
212
|
|
- calling <a href="">"../reference/ft2-base_interface.html#ft_render_glyph"><code>FT_Render_Glyph</code></a>.
|
|
212
|
+ calling <a href="">"../reference/ft2-glyph_retrieval.html#ft_render_glyph"><code>FT_Render_Glyph</code></a>.
|
213
|
213
|
Each time you load a new glyph image, the previous one is
|
214
|
214
|
erased from the glyph slot.</p>
|
215
|
215
|
|
... |
... |
@@ -574,7 +574,7 @@ error = FT_Glyph_To_Bitmap( |
574
|
574
|
of the global metrics described above, to be directly
|
575
|
575
|
accessed through
|
576
|
576
|
the <code>face->size->metrics</code> structure (of
|
577
|
|
- type <a href="">"../reference/ft2-base_interface.html#ft_size_metrics">
|
|
577
|
+ type <a href="">"../reference/ft2-sizing_and_scaling.html#ft_size_metrics">
|
578
|
578
|
<code>FT_Size_Metrics</code></a>). <em>No grid-fitting
|
579
|
579
|
is performed for those values</em>. They are also
|
580
|
580
|
completely independent of any hinting process. In other
|
... |
... |
@@ -601,7 +601,7 @@ error = FT_Glyph_To_Bitmap( |
601
|
601
|
|
602
|
602
|
<p>Be careful not to confuse it with the
|
603
|
603
|
‘height’ field in
|
604
|
|
- the <a href="">"../reference/ft2-base_interface.html#ft_glyph_metrics"><code>FT_Glyph_Metrics</code></a>
|
|
604
|
+ the <a href="">"../reference/ft2-glyph_retrieval.html#ft_glyph_metrics"><code>FT_Glyph_Metrics</code></a>
|
605
|
605
|
structure.</p>
|
606
|
606
|
</dd>
|
607
|
607
|
|
... |
... |
@@ -652,8 +652,8 @@ error = FT_Glyph_To_Bitmap( |
652
|
652
|
|
653
|
653
|
<p>FreeType 2 allows you to deal with this, by
|
654
|
654
|
providing
|
655
|
|
- the <a href="">"../reference/ft2-base_interface.html#ft_attach_file"><code>FT_Attach_File</code></a>
|
656
|
|
- and <a href="">"../reference/ft2-base_interface.html#ft_attach_stream"><code>FT_Attach_Stream</code></A>
|
|
655
|
+ the <a href="">"../reference/ft2-face_creation.html#ft_attach_file"><code>FT_Attach_File</code></a>
|
|
656
|
+ and <a href="">"../reference/ft2-face_creation.html#ft_attach_stream"><code>FT_Attach_Stream</code></A>
|
657
|
657
|
APIs. Both functions are used to load additional metrics
|
658
|
658
|
into a face object by reading them from an additional
|
659
|
659
|
format-specific file. Here an example, opening a
|
... |
... |
@@ -682,7 +682,7 @@ if ( error ) |
682
|
682
|
|
683
|
683
|
<p>FreeType 2 allows you to retrieve the kerning
|
684
|
684
|
information between two glyphs through
|
685
|
|
- the <a href="">"../reference/ft2-base_interface.html#ft_get_kerning"><code>FT_Get_Kerning</code></a>
|
|
685
|
+ the <a href="">"../reference/ft2-glyph_retrieval.html#ft_get_kerning"><code>FT_Get_Kerning</code></a>
|
686
|
686
|
function.</p>
|
687
|
687
|
|
688
|
688
|
<pre>
|
... |
... |
@@ -1403,7 +1403,7 @@ for ( n = 0; n < num_glyphs; n++ ) |
1403
|
1403
|
if appropriate.</p>
|
1404
|
1404
|
|
1405
|
1405
|
<p>When you call the
|
1406
|
|
- function <a href="">"../reference/ft2-base_interface.html#ft_set_pixel_sizes"><code>FT_Set_Pixel_Sizes</code></a>,
|
|
1406
|
+ function <a href="">"../reference/ft2-sizing_and_scaling.html#ft_set_pixel_sizes"><code>FT_Set_Pixel_Sizes</code></a>,
|
1407
|
1407
|
you are specifying integer values
|
1408
|
1408
|
of <code>pixel_size_x</code> and
|
1409
|
1409
|
<code>pixel_size_y</code> FreeType shall use. The library
|
... |
... |
@@ -1412,7 +1412,7 @@ for ( n = 0; n < num_glyphs; n++ ) |
1412
|
1412
|
<code>y_scale</code>.</p>
|
1413
|
1413
|
|
1414
|
1414
|
<p>When you call the
|
1415
|
|
- function <a href="">"../reference/ft2-base_interface.html#ft_set_char_size"><code>FT_Set_Char_Size</code></a>,
|
|
1415
|
+ function <a href="">"../reference/ft2-sizing_and_scaling.html#ft_set_char_size"><code>FT_Set_Char_Size</code></a>,
|
1416
|
1416
|
you are specifying the character size in
|
1417
|
1417
|
physical <em>points</em>, which is used, along with the
|
1418
|
1418
|
device's resolutions, to compute the character pixel size
|