forked from minhngoc25a/freetype2
* include/freetype/freetype.h (FT_Size_RequestRec): Change the type of
`width' and `height' to `FT_Long'. (enum FT_Size_Request_Type), src/base/ftobjs.c (FT_Request_Metrics): New request type `FT_SIZE_REQUEST_TYPE_SCALES' to specify the scales directly.
This commit is contained in:
parent
a3873d2702
commit
a8e7a01965
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,11 @@
|
||||||
|
2006-02-24 Chia-I Wu <b90201047@ntu.edu.tw>
|
||||||
|
|
||||||
|
* include/freetype/freetype.h (FT_Size_RequestRec): Change the type of
|
||||||
|
`width' and `height' to `FT_Long'.
|
||||||
|
(enum FT_Size_Request_Type), src/base/ftobjs.c (FT_Request_Metrics):
|
||||||
|
New request type `FT_SIZE_REQUEST_TYPE_SCALES' to specify the scales
|
||||||
|
directly.
|
||||||
|
|
||||||
2006-02-23 David Turner <david@freetype.org>
|
2006-02-23 David Turner <david@freetype.org>
|
||||||
|
|
||||||
Two patches from Debian libfreetype6 for 2.1.10.
|
Two patches from Debian libfreetype6 for 2.1.10.
|
||||||
|
@ -6,9 +14,8 @@
|
||||||
glyphs.
|
glyphs.
|
||||||
Fix a problem with large encodings.
|
Fix a problem with large encodings.
|
||||||
|
|
||||||
* src/cache/ftccmap.c: trying to hack binary compatibility for
|
* src/cache/ftccmap.c: trying to hack binary compatibility for
|
||||||
gnustep-back (GNUstep backend module) which still crashes under
|
gnustep-back (GNUstep backend module) which still crashes under Sarge.
|
||||||
Sarge.
|
|
||||||
|
|
||||||
2006-02-23 Chia-I Wu <b90201047@ntu.edu.tw>
|
2006-02-23 Chia-I Wu <b90201047@ntu.edu.tw>
|
||||||
|
|
||||||
|
|
|
@ -2023,6 +2023,9 @@ FT_BEGIN_HEADER
|
||||||
/* useful if you want to specify the font size for, say, a window */
|
/* useful if you want to specify the font size for, say, a window */
|
||||||
/* of a given dimension and 80x24 cells. */
|
/* of a given dimension and 80x24 cells. */
|
||||||
/* */
|
/* */
|
||||||
|
/* FT_SIZE_REQUEST_TYPE_SCALES :: */
|
||||||
|
/* Specify the scales directly. */
|
||||||
|
/* */
|
||||||
/* <Note> */
|
/* <Note> */
|
||||||
/* The above descriptions only apply to scalable formats. For bitmap */
|
/* The above descriptions only apply to scalable formats. For bitmap */
|
||||||
/* formats, the behavior is up to the driver. */
|
/* formats, the behavior is up to the driver. */
|
||||||
|
@ -2036,6 +2039,7 @@ FT_BEGIN_HEADER
|
||||||
FT_SIZE_REQUEST_TYPE_REAL_DIM,
|
FT_SIZE_REQUEST_TYPE_REAL_DIM,
|
||||||
FT_SIZE_REQUEST_TYPE_BBOX,
|
FT_SIZE_REQUEST_TYPE_BBOX,
|
||||||
FT_SIZE_REQUEST_TYPE_CELL,
|
FT_SIZE_REQUEST_TYPE_CELL,
|
||||||
|
FT_SIZE_REQUEST_TYPE_SCALES,
|
||||||
|
|
||||||
FT_SIZE_REQUEST_TYPE_MAX
|
FT_SIZE_REQUEST_TYPE_MAX
|
||||||
|
|
||||||
|
@ -2072,8 +2076,8 @@ FT_BEGIN_HEADER
|
||||||
typedef struct FT_Size_RequestRec_
|
typedef struct FT_Size_RequestRec_
|
||||||
{
|
{
|
||||||
FT_Size_Request_Type type;
|
FT_Size_Request_Type type;
|
||||||
FT_F26Dot6 width;
|
FT_Long width;
|
||||||
FT_F26Dot6 height;
|
FT_Long height;
|
||||||
FT_UInt horiResolution;
|
FT_UInt horiResolution;
|
||||||
FT_UInt vertResolution;
|
FT_UInt vertResolution;
|
||||||
|
|
||||||
|
|
|
@ -2148,6 +2148,16 @@
|
||||||
h = face->bbox.yMax - face->bbox.yMin;
|
h = face->bbox.yMax - face->bbox.yMin;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case FT_SIZE_REQUEST_TYPE_SCALES:
|
||||||
|
metrics->x_scale = (FT_Fixed)req->width;
|
||||||
|
metrics->y_scale = (FT_Fixed)req->height;
|
||||||
|
if ( !metrics->x_scale )
|
||||||
|
metrics->x_scale = metrics->y_scale;
|
||||||
|
else if ( !metrics->y_scale )
|
||||||
|
metrics->y_scale = metrics->x_scale;
|
||||||
|
goto Calculate_Ppem;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
/* this never happens */
|
/* this never happens */
|
||||||
return;
|
return;
|
||||||
|
@ -2193,6 +2203,7 @@
|
||||||
scaled_w = FT_MulDiv( scaled_h, w, h );
|
scaled_w = FT_MulDiv( scaled_h, w, h );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Calculate_Ppem:
|
||||||
/* calculate the ppems */
|
/* calculate the ppems */
|
||||||
if ( req->type != FT_SIZE_REQUEST_TYPE_NOMINAL )
|
if ( req->type != FT_SIZE_REQUEST_TYPE_NOMINAL )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue