summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/freetype/src/type42
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/type42
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/type42')
-rw-r--r--src/3rdparty/freetype/src/type42/t42drivr.h4
-rw-r--r--src/3rdparty/freetype/src/type42/t42objs.c15
-rw-r--r--src/3rdparty/freetype/src/type42/t42parse.c33
3 files changed, 30 insertions, 22 deletions
diff --git a/src/3rdparty/freetype/src/type42/t42drivr.h b/src/3rdparty/freetype/src/type42/t42drivr.h
index 98b7410b67..4717e4613f 100644
--- a/src/3rdparty/freetype/src/type42/t42drivr.h
+++ b/src/3rdparty/freetype/src/type42/t42drivr.h
@@ -25,6 +25,10 @@
FT_BEGIN_HEADER
+#ifdef FT_CONFIG_OPTION_PIC
+#error "this module does not support PIC yet"
+#endif
+
FT_EXPORT_VAR( const FT_Driver_ClassRec ) t42_driver_class;
diff --git a/src/3rdparty/freetype/src/type42/t42objs.c b/src/3rdparty/freetype/src/type42/t42objs.c
index 16e9809ce1..9081ffc6d2 100644
--- a/src/3rdparty/freetype/src/type42/t42objs.c
+++ b/src/3rdparty/freetype/src/type42/t42objs.c
@@ -4,7 +4,8 @@
/* */
/* Type 42 objects manager (body). */
/* */
-/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008 by Roberto Alameda. */
+/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 */
+/* by Roberto Alameda. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */
@@ -19,7 +20,6 @@
#include "t42parse.h"
#include "t42error.h"
#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
#include FT_LIST_H
@@ -70,7 +70,7 @@
if ( !loader.charstrings.init )
{
- FT_ERROR(( "T42_Open_Face: no charstrings array in face!\n" ));
+ FT_ERROR(( "T42_Open_Face: no charstrings array in face\n" ));
error = T42_Err_Invalid_File_Format;
}
@@ -100,8 +100,8 @@
/* The index is then stored in type1.encoding.char_index, and */
/* the name in type1.encoding.char_name */
- min_char = +32000;
- max_char = -32000;
+ min_char = 0;
+ max_char = 0;
charcode = 0;
for ( ; charcode < loader.encoding_table.max_elems; charcode++ )
@@ -127,13 +127,14 @@
{
if ( charcode < min_char )
min_char = charcode;
- if ( charcode > max_char )
- max_char = charcode;
+ if ( charcode >= max_char )
+ max_char = charcode + 1;
}
break;
}
}
}
+
type1->encoding.code_first = min_char;
type1->encoding.code_last = max_char;
type1->encoding.num_chars = loader.num_chars;
diff --git a/src/3rdparty/freetype/src/type42/t42parse.c b/src/3rdparty/freetype/src/type42/t42parse.c
index b9e408c452..13bda64c83 100644
--- a/src/3rdparty/freetype/src/type42/t42parse.c
+++ b/src/3rdparty/freetype/src/type42/t42parse.c
@@ -20,7 +20,6 @@
#include "t42error.h"
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_STREAM_H
-#include FT_LIST_H
#include FT_INTERNAL_POSTSCRIPT_AUX_H
@@ -304,7 +303,7 @@
cur = parser->root.cursor;
if ( cur >= limit )
{
- FT_ERROR(( "t42_parse_encoding: out of bounds!\n" ));
+ FT_ERROR(( "t42_parse_encoding: out of bounds\n" ));
parser->root.error = T42_Err_Invalid_File_Format;
return;
}
@@ -472,7 +471,7 @@
else
{
- FT_ERROR(( "t42_parse_encoding: invalid token!\n" ));
+ FT_ERROR(( "t42_parse_encoding: invalid token\n" ));
parser->root.error = T42_Err_Invalid_File_Format;
}
}
@@ -525,7 +524,7 @@
if ( parser->root.cursor >= limit || *parser->root.cursor++ != '[' )
{
- FT_ERROR(( "t42_parse_sfnts: can't find begin of sfnts vector!\n" ));
+ FT_ERROR(( "t42_parse_sfnts: can't find begin of sfnts vector\n" ));
error = T42_Err_Invalid_File_Format;
goto Fail;
}
@@ -570,7 +569,7 @@
if ( allocated )
{
FT_ERROR(( "t42_parse_sfnts: "
- "can't handle mixed binary and hex strings!\n" ));
+ "can't handle mixed binary and hex strings\n" ));
error = T42_Err_Invalid_File_Format;
goto Fail;
}
@@ -586,7 +585,7 @@
parser->root.cursor += string_size + 1;
if ( parser->root.cursor >= limit )
{
- FT_ERROR(( "t42_parse_sfnts: too many binary data!\n" ));
+ FT_ERROR(( "t42_parse_sfnts: too many binary data\n" ));
error = T42_Err_Invalid_File_Format;
goto Fail;
}
@@ -594,7 +593,7 @@
if ( !string_buf )
{
- FT_ERROR(( "t42_parse_sfnts: invalid data in sfnts array!\n" ));
+ FT_ERROR(( "t42_parse_sfnts: invalid data in sfnts array\n" ));
error = T42_Err_Invalid_File_Format;
goto Fail;
}
@@ -605,7 +604,7 @@
if ( !string_size )
{
- FT_ERROR(( "t42_parse_sfnts: invalid string!\n" ));
+ FT_ERROR(( "t42_parse_sfnts: invalid string\n" ));
error = T42_Err_Invalid_File_Format;
goto Fail;
}
@@ -670,7 +669,7 @@
/* all other tables are just copied */
if ( count >= ttf_size )
{
- FT_ERROR(( "t42_parse_sfnts: too many binary data!\n" ));
+ FT_ERROR(( "t42_parse_sfnts: too many binary data\n" ));
error = T42_Err_Invalid_File_Format;
goto Fail;
}
@@ -717,7 +716,7 @@
if ( parser->root.cursor >= limit )
{
- FT_ERROR(( "t42_parse_charstrings: out of bounds!\n" ));
+ FT_ERROR(( "t42_parse_charstrings: out of bounds\n" ));
error = T42_Err_Invalid_File_Format;
goto Fail;
}
@@ -759,14 +758,14 @@
}
else
{
- FT_ERROR(( "t42_parse_charstrings: invalid token!\n" ));
+ FT_ERROR(( "t42_parse_charstrings: invalid token\n" ));
error = T42_Err_Invalid_File_Format;
goto Fail;
}
if ( parser->root.cursor >= limit )
{
- FT_ERROR(( "t42_parse_charstrings: out of bounds!\n" ));
+ FT_ERROR(( "t42_parse_charstrings: out of bounds\n" ));
error = T42_Err_Invalid_File_Format;
goto Fail;
}
@@ -826,7 +825,7 @@
if ( cur + 1 >= limit )
{
- FT_ERROR(( "t42_parse_charstrings: out of bounds!\n" ));
+ FT_ERROR(( "t42_parse_charstrings: out of bounds\n" ));
error = T42_Err_Invalid_File_Format;
goto Fail;
}
@@ -857,7 +856,7 @@
(void)T1_ToInt( parser );
if ( parser->root.cursor >= limit )
{
- FT_ERROR(( "t42_parse_charstrings: out of bounds!\n" ));
+ FT_ERROR(( "t42_parse_charstrings: out of bounds\n" ));
error = T42_Err_Invalid_File_Format;
goto Fail;
}
@@ -880,7 +879,7 @@
if ( !notdef_found )
{
- FT_ERROR(( "t42_parse_charstrings: no /.notdef glyph!\n" ));
+ FT_ERROR(( "t42_parse_charstrings: no /.notdef glyph\n" ));
error = T42_Err_Invalid_File_Format;
goto Fail;
}
@@ -984,6 +983,10 @@
dummy_object = &face->type1.font_info;
break;
+ case T1_FIELD_LOCATION_FONT_EXTRA:
+ dummy_object = &face->type1.font_extra;
+ break;
+
case T1_FIELD_LOCATION_BBOX:
dummy_object = &face->type1.font_bbox;
break;