Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType
Commits:
-
90b14882
by Alexei Podtelezhnikov at 2021-09-22T20:20:04-04:00
-
3b573e45
by Alexei Podtelezhnikov at 2021-09-22T22:22:13-04:00
4 changed files:
Changes:
... | ... | @@ -2186,6 +2186,10 @@ FT_BEGIN_HEADER |
2186 | 2186 |
* FreeType error code. 0~means success.
|
2187 | 2187 |
*
|
2188 | 2188 |
* @note:
|
2189 |
+ * The `pathname` string should be reconizable as such by a standard
|
|
2190 |
+ * `fopen()` call on your system. If that is not sufficient to address
|
|
2191 |
+ * all file name possiblities, you can use @FT_Open_Face.
|
|
2192 |
+ *
|
|
2189 | 2193 |
* Use @FT_Done_Face to destroy the created @FT_Face object (along with
|
2190 | 2194 |
* its slot and sizes).
|
2191 | 2195 |
*/
|
... | ... | @@ -487,7 +487,7 @@ THE SOFTWARE. |
487 | 487 |
else
|
488 | 488 |
{
|
489 | 489 |
/* this is a heuristical value */
|
490 |
- bsize->width = (FT_Short)FT_MulDiv( bsize->height, 2, 3 );
|
|
490 |
+ bsize->width = ( bsize->height * 2 + 1 ) / 3;
|
|
491 | 491 |
}
|
492 | 492 |
|
493 | 493 |
prop = bdf_get_font_property( font, "POINT_SIZE" );
|
... | ... | @@ -1615,7 +1615,7 @@ |
1615 | 1615 |
goto Exit;
|
1616 | 1616 |
}
|
1617 | 1617 |
|
1618 |
- /* Expect the DWIDTH (scalable width) field next. */
|
|
1618 |
+ /* Expect the DWIDTH (device width) field next. */
|
|
1619 | 1619 |
if ( _bdf_strncmp( line, "DWIDTH", 6 ) == 0 )
|
1620 | 1620 |
{
|
1621 | 1621 |
error = _bdf_list_split( &p->list, " +", line, linelen );
|
... | ... | @@ -1612,7 +1612,7 @@ THE SOFTWARE. |
1612 | 1612 |
else
|
1613 | 1613 |
{
|
1614 | 1614 |
/* this is a heuristical value */
|
1615 |
- bsize->width = (FT_Short)FT_MulDiv( bsize->height, 2, 3 );
|
|
1615 |
+ bsize->width = ( bsize->height * 2 + 1 ) / 3;
|
|
1616 | 1616 |
}
|
1617 | 1617 |
|
1618 | 1618 |
prop = pcf_find_property( face, "POINT_SIZE" );
|