Werner Lemberg pushed to branch master at FreeType / FreeType Website
Commits:
-
bd7a7bee
by Werner Lemberg at 2022-11-08T07:43:15+01:00
2 changed files:
Changes:
... | ... | @@ -369,8 +369,8 @@ if ( error ) { ... }</pre> |
369 | 369 | certain metrics, such as <code>x_ppem</code>
|
370 | 370 | and <code>y_ppem</code>, which are both expressed in
|
371 | 371 | pixels, and the ascender, text height, and maximum
|
372 | - horizontal advance, which are each expressed in 1/64th of
|
|
373 | - a pixel (however, those values are rounded to integers,
|
|
372 | + horizontal advance, which are each expressed in 1/64 of a
|
|
373 | + pixel (however, those values are rounded to integers,
|
|
374 | 374 | i.e., multiples of 64).</p>
|
375 | 375 | |
376 | 376 | <p>When the <code>FT_New_Face</code> function is called (or
|
... | ... | @@ -394,19 +394,19 @@ if ( error ) { ... }</pre> |
394 | 394 | |
395 | 395 | <pre>
|
396 | 396 | error = FT_Set_Char_Size(
|
397 | - face, <span class="comment">/* handle to face object */</span>
|
|
398 | - 0, <span class="comment">/* char_width in 1/64th of points */</span>
|
|
399 | - 16*64, <span class="comment">/* char_height in 1/64th of points */</span>
|
|
400 | - 300, <span class="comment">/* horizontal device resolution */</span>
|
|
401 | - 300 ); <span class="comment">/* vertical device resolution */</span></pre>
|
|
397 | + face, <span class="comment">/* handle to face object */</span>
|
|
398 | + 0, <span class="comment">/* char_width in 1/64 of points */</span>
|
|
399 | + 16*64, <span class="comment">/* char_height in 1/64 of points */</span>
|
|
400 | + 300, <span class="comment">/* horizontal device resolution */</span>
|
|
401 | + 300 ); <span class="comment">/* vertical device resolution */</span></pre>
|
|
402 | 402 | |
403 | 403 | <p>Some notes.</p>
|
404 | 404 | |
405 | 405 | <ul>
|
406 | - <li>The character widths and heights are specified in
|
|
407 | - 1/64th of points. A point is a <em>physical</em>
|
|
408 | - distance, equaling 1/72th of an inch. Normally, it is
|
|
409 | - not equivalent to a pixel.</li>
|
|
406 | + <li>The character widths and heights are specified in 1/64
|
|
407 | + of points. A point is a <em>physical</em> distance,
|
|
408 | + equaling 1/72 of an inch. Normally, it is not
|
|
409 | + equivalent to a pixel.</li>
|
|
410 | 410 | |
411 | 411 | <li>Value of 0 for the character width means
|
412 | 412 | ‘same as character height’, value of 0
|
... | ... | @@ -723,7 +723,7 @@ error = FT_Set_Transform( |
723 | 723 | |
724 | 724 | <p>The vector pointer can also be set to NULL (in which case
|
725 | 725 | a delta of (0,0) is used). The vector coordinates are
|
726 | - expressed in 1/64th of a pixel (also known as 26.6
|
|
726 | + expressed in 1/64 of a pixel (also known as 26.6
|
|
727 | 727 | fixed-point numbers).</p>
|
728 | 728 | |
729 | 729 | <p class="warning">The transformation is applied to every
|
... | ... | @@ -818,8 +818,8 @@ for ( n = 0; n < num_chars; n++ ) |
818 | 818 | <code>slot->advance</code>, which correspond to the
|
819 | 819 | glyph's <em>advance width</em> (also known as
|
820 | 820 | its <em>escapement</em>). The advance vector is
|
821 | - expressed in 1/64th of pixels, and is truncated to
|
|
822 | - integer pixels on each iteration.</li>
|
|
821 | + expressed in 1/64 of pixels, and is truncated to integer
|
|
822 | + pixels on each iteration.</li>
|
|
823 | 823 | |
824 | 824 | <li>The function <code>my_draw_bitmap</code> is not part
|
825 | 825 | of FreeType but must be provided by the application to
|
... | ... | @@ -959,8 +959,8 @@ for ( n = 0; n < num_chars; n++ ) |
959 | 959 | <ul>
|
960 | 960 | <li>We now use a vector of type <code>FT_Vector</code> to
|
961 | 961 | store the pen position, with coordinates expressed as
|
962 | - 1/64th of pixels, hence a multiplication. The position
|
|
963 | - is expressed in cartesian space.</li>
|
|
962 | + 1/64 of pixels, hence a multiplication. The position is
|
|
963 | + expressed in cartesian space.</li>
|
|
964 | 964 | |
965 | 965 | <li>Glyph images are always loaded, transformed, and
|
966 | 966 | described in the cartesian coordinate system within
|
... | ... | @@ -1003,7 +1003,7 @@ for ( n = 0; n < num_chars; n++ ) |
1003 | 1003 | <!-- ************************************************** -->
|
1004 | 1004 | |
1005 | 1005 | <div class="updated">
|
1006 | - <p>Last update: 24-Sep-2022</p>
|
|
1006 | + <p>Last update: 24-Oct-2022</p>
|
|
1007 | 1007 | </div>
|
1008 | 1008 | </div>
|
1009 | 1009 | </div>
|
... | ... | @@ -161,7 +161,7 @@ |
161 | 161 | |
162 | 162 | <p>The metrics found
|
163 | 163 | in <code>face->glyph->metrics</code> are normally
|
164 | - expressed in 26.6 pixel format (i.e., 1/64th of pixels),
|
|
164 | + expressed in 26.6 pixel format (i.e., 1/64 of pixels),
|
|
165 | 165 | unless you use the <code>FT_LOAD_NO_SCALE</code> flag when
|
166 | 166 | calling <code>FT_Load_Glyph</code>
|
167 | 167 | or <code>FT_Load_Char</code>. In this case, the metrics
|
... | ... | @@ -193,9 +193,8 @@ |
193 | 193 | font driver that actually loads the glyph
|
194 | 194 | image. <code>linearHoriAdvance</code> is a 16.16
|
195 | 195 | fixed-point number that gives the value of the original
|
196 | - glyph advance width in 1/65536th of pixels. It can be
|
|
197 | - use to perform pseudo device-independent text
|
|
198 | - layouts.</dd>
|
|
196 | + glyph advance width in 1/65536 of pixels. It can be use
|
|
197 | + to perform pseudo device-independent text layouts.</dd>
|
|
199 | 198 | |
200 | 199 | <dt>linearVertAdvance</dt>
|
201 | 200 | <dd>This is the similar to <code>linearHoriAdvance</code>
|
... | ... | @@ -1444,12 +1443,12 @@ for ( n = 0; n < num_glyphs; n++ ) |
1444 | 1443 | |
1445 | 1444 | <dt>x_scale</dt>
|
1446 | 1445 | <dd>This is a 16.16 fixed-point scale to directly scale
|
1447 | - horizontal distances from design space to 1/64th of
|
|
1448 | - device pixels.</dd>
|
|
1446 | + horizontal distances from design space to 1/64 of device
|
|
1447 | + pixels.</dd>
|
|
1449 | 1448 | |
1450 | 1449 | <dt>y_scale</dt>
|
1451 | 1450 | <dd>This is a 16.16 fixed-point scale to directly scale
|
1452 | - vertical distances from design space to 1/64th of device
|
|
1451 | + vertical distances from design space to 1/64 of device
|
|
1453 | 1452 | pixels.</dd>
|
1454 | 1453 | </dl>
|
1455 | 1454 | |
... | ... | @@ -1459,7 +1458,7 @@ for ( n = 0; n < num_glyphs; n++ ) |
1459 | 1458 | function.</p>
|
1460 | 1459 | |
1461 | 1460 | <pre>
|
1462 | -<span class="comment">/* convert design distances to 1/64th of pixels */</span>
|
|
1461 | +<span class="comment">/* convert design distances to 1/64 of pixels */</span>
|
|
1463 | 1462 | pixels_x = FT_MulFix( design_x, face->size->metrics.x_scale );
|
1464 | 1463 | pixels_y = FT_MulFix( design_y, face->size->metrics.y_scale );</pre>
|
1465 | 1464 | |
... | ... | @@ -1517,7 +1516,7 @@ pixels_y = design_y * y_scale;</pre> |
1517 | 1516 | <!-- ************************************************** -->
|
1518 | 1517 | |
1519 | 1518 | <div class="updated">
|
1520 | - <p>Last update: 08-Oct-2022</p>
|
|
1519 | + <p>Last update: 24-Oct-2022</p>
|
|
1521 | 1520 | </div>
|
1522 | 1521 | </div>
|
1523 | 1522 | </div>
|