* src/base/ftobjs.c (FT_Set_Char_Size): Simplify code.
* include/freetype/freetype.h (FT_Set_Char_Size): Update documentation.
This commit is contained in:
parent
1b5267dad1
commit
106eaf1dbb
|
@ -1,3 +1,9 @@
|
||||||
|
2007-05-03 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
|
* src/base/ftobjs.c (FT_Set_Char_Size): Simplify code.
|
||||||
|
* include/freetype/freetype.h (FT_Set_Char_Size): Update
|
||||||
|
documentation.
|
||||||
|
|
||||||
2007-04-28 Victor Stinner <victor.stinner@inl.fr>
|
2007-04-28 Victor Stinner <victor.stinner@inl.fr>
|
||||||
|
|
||||||
* src/sfnt/sfobjs.c (sfnt_load_face): Check error code after loading
|
* src/sfnt/sfobjs.c (sfnt_load_face): Check error code after loading
|
||||||
|
|
|
@ -2111,9 +2111,16 @@ FT_BEGIN_HEADER
|
||||||
/* FreeType error code. 0 means success. */
|
/* FreeType error code. 0 means success. */
|
||||||
/* */
|
/* */
|
||||||
/* <Note> */
|
/* <Note> */
|
||||||
/* If either the horizontal or vertical resolution is zero, it is set */
|
/* If either the character width or height is zero, it is set equal */
|
||||||
/* to a default value of 72dpi. */
|
/* to the other value. */
|
||||||
/* */
|
/* */
|
||||||
|
/* If either the horizontal or vertical resolution is zero, it is set */
|
||||||
|
/* equal to the other value. */
|
||||||
|
/* */
|
||||||
|
/* A character width or height smaller than 1pt is set to 1pt; if */
|
||||||
|
/* both resolution values are zero, they are set to 72dpi. */
|
||||||
|
/* */
|
||||||
|
|
||||||
FT_EXPORT( FT_Error )
|
FT_EXPORT( FT_Error )
|
||||||
FT_Set_Char_Size( FT_Face face,
|
FT_Set_Char_Size( FT_Face face,
|
||||||
FT_F26Dot6 char_width,
|
FT_F26Dot6 char_width,
|
||||||
|
|
|
@ -2435,11 +2435,14 @@
|
||||||
if ( char_height < 1 * 64 )
|
if ( char_height < 1 * 64 )
|
||||||
char_height = 1 * 64;
|
char_height = 1 * 64;
|
||||||
|
|
||||||
|
if ( !horz_resolution )
|
||||||
|
horz_resolution = vert_resolution = 72;
|
||||||
|
|
||||||
req.type = FT_SIZE_REQUEST_TYPE_NOMINAL;
|
req.type = FT_SIZE_REQUEST_TYPE_NOMINAL;
|
||||||
req.width = char_width;
|
req.width = char_width;
|
||||||
req.height = char_height;
|
req.height = char_height;
|
||||||
req.horiResolution = ( horz_resolution ) ? horz_resolution : 72;
|
req.horiResolution = horz_resolution;
|
||||||
req.vertResolution = ( vert_resolution ) ? vert_resolution : 72;
|
req.vertResolution = vert_resolution;
|
||||||
|
|
||||||
return FT_Request_Size( face, &req );
|
return FT_Request_Size( face, &req );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue