summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/freetype/src/psaux/psobjs.c
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2013-03-26 08:57:05 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-01 12:03:55 +0200
commit6845a4fb0147117e8517d66f18792ca7acdbe06e (patch)
tree68e35417b79989a7af8a4ea8c0d282b84dbe0a6e /src/3rdparty/freetype/src/psaux/psobjs.c
parent0fcadcca3d0842354de07ffaa8c622e607aab22c (diff)
Update bundled FreeType sources to 2.3.12
Most important changes: * SFNT cmap 13 table format support; * fixed glitches when rasterizing stretched TTF (xsize!=ysize); * various fixes in Type1, CFF, and PCF drivers Change-Id: Ib9e2210ffbd0daa2fdbf518ea87f4be502de6b48 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/3rdparty/freetype/src/psaux/psobjs.c')
-rw-r--r--src/3rdparty/freetype/src/psaux/psobjs.c39
1 files changed, 18 insertions, 21 deletions
diff --git a/src/3rdparty/freetype/src/psaux/psobjs.c b/src/3rdparty/freetype/src/psaux/psobjs.c
index 52e30a4136..fe8398ae38 100644
--- a/src/3rdparty/freetype/src/psaux/psobjs.c
+++ b/src/3rdparty/freetype/src/psaux/psobjs.c
@@ -19,6 +19,7 @@
#include <ft2build.h>
#include FT_INTERNAL_POSTSCRIPT_AUX_H
#include FT_INTERNAL_DEBUG_H
+#include FT_INTERNAL_CALC_H
#include "psobjs.h"
#include "psconv.h"
@@ -564,8 +565,8 @@
cur++;
if ( cur >= limit || *cur != '>' ) /* >> */
{
- FT_ERROR(( "ps_parser_skip_PS_token: "
- "unexpected closing delimiter `>'\n" ));
+ FT_ERROR(( "ps_parser_skip_PS_token:"
+ " unexpected closing delimiter `>'\n" ));
error = PSaux_Err_Invalid_File_Format;
goto Exit;
}
@@ -590,9 +591,10 @@
Exit:
if ( cur == parser->cursor )
{
- FT_ERROR(( "ps_parser_skip_PS_token: "
- "current token is `%c', which is self-delimiting "
- "but invalid at this point\n",
+ FT_ERROR(( "ps_parser_skip_PS_token:"
+ " current token is `%c' which is self-delimiting\n"
+ " "
+ " but invalid at this point\n",
*cur ));
error = PSaux_Err_Invalid_File_Format;
@@ -1153,8 +1155,10 @@
}
else
{
- FT_ERROR(( "ps_parser_load_field: expected a name or string "
- "but found token of type %d instead\n",
+ FT_ERROR(( "ps_parser_load_field:"
+ " expected a name or string\n"
+ " "
+ " but found token of type %d instead\n",
token.type ));
error = PSaux_Err_Invalid_File_Format;
goto Exit;
@@ -1191,8 +1195,8 @@
if ( result < 0 )
{
- FT_ERROR(( "ps_parser_load_field: "
- "expected four integers in bounding box\n" ));
+ FT_ERROR(( "ps_parser_load_field:"
+ " expected four integers in bounding box\n" ));
error = PSaux_Err_Invalid_File_Format;
goto Exit;
}
@@ -1309,7 +1313,7 @@
FT_LOCAL_DEF( FT_Error )
ps_parser_to_bytes( PS_Parser parser,
FT_Byte* bytes,
- FT_Long max_bytes,
+ FT_Offset max_bytes,
FT_Long* pnum_bytes,
FT_Bool delimiters )
{
@@ -1551,16 +1555,9 @@
FT_Byte* control = (FT_Byte*)outline->tags + outline->n_points;
- if ( builder->shift )
- {
- x >>= 16;
- y >>= 16;
- }
- point->x = x;
- point->y = y;
+ point->x = FIXED_TO_INT( x );
+ point->y = FIXED_TO_INT( y );
*control = (FT_Byte)( flag ? FT_CURVE_TAG_ON : FT_CURVE_TAG_CUBIC );
-
- builder->last = *point;
}
outline->n_points++;
}
@@ -1668,8 +1665,8 @@
if ( outline->n_contours > 0 )
{
- /* Don't add contours only consisting of one point, i.e., */
- /* check whether begin point and last point are the same. */
+ /* Don't add contours only consisting of one point, i.e., */
+ /* check whether the first and the last point is the same. */
if ( first == outline->n_points - 1 )
{
outline->n_contours--;