summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/freetype/src/type42/t42objs.c
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-08-14 11:13:36 +0200
committerLiang Qi <liang.qi@qt.io>2019-10-30 08:48:18 +0100
commit58f56950848bae9c90da3873090c7698e0128b12 (patch)
tree0b3127cd313aaf34d59355deed2e2acc5341eff3 /src/3rdparty/freetype/src/type42/t42objs.c
parentc51ca1d1b232ce1d6eaa9c6dd85de127e825d3af (diff)
Update bundled Freetype to 2.10.1
[ChangeLog][Freetype] Upgraded bundled Freetype version to 2.10.1. Fixes: QTBUG-77466 Change-Id: I1de8b8b03e0ffd0b17eeafff1017df7c638c9279 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/3rdparty/freetype/src/type42/t42objs.c')
-rw-r--r--src/3rdparty/freetype/src/type42/t42objs.c87
1 files changed, 44 insertions, 43 deletions
diff --git a/src/3rdparty/freetype/src/type42/t42objs.c b/src/3rdparty/freetype/src/type42/t42objs.c
index 66e5c40382..d31bace451 100644
--- a/src/3rdparty/freetype/src/type42/t42objs.c
+++ b/src/3rdparty/freetype/src/type42/t42objs.c
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* t42objs.c */
-/* */
-/* Type 42 objects manager (body). */
-/* */
-/* Copyright 2002-2018 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 */
-/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
-/* this file you indicate that you have read the license and */
-/* understand and accept it fully. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * t42objs.c
+ *
+ * Type 42 objects manager (body).
+ *
+ * Copyright (C) 2002-2019 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
+ * license, LICENSE.TXT. By continuing to use, modify, or distribute
+ * this file you indicate that you have read the license and
+ * understand and accept it fully.
+ *
+ */
#include "t42objs.h"
@@ -25,7 +25,7 @@
#undef FT_COMPONENT
-#define FT_COMPONENT trace_t42
+#define FT_COMPONENT t42
static FT_Error
@@ -98,8 +98,7 @@
/* we must now build type1.encoding when we have a custom array */
if ( type1->encoding_type == T1_ENCODING_TYPE_ARRAY )
{
- FT_Int charcode, idx, min_char, max_char;
- FT_Byte* glyph_name;
+ FT_Int charcode, idx, min_char, max_char;
/* OK, we do the following: for each element in the encoding */
@@ -114,27 +113,27 @@
charcode = 0;
for ( ; charcode < loader.encoding_table.max_elems; charcode++ )
{
- FT_Byte* char_name;
+ const FT_String* char_name =
+ (const FT_String*)loader.encoding_table.elements[charcode];
type1->encoding.char_index[charcode] = 0;
- type1->encoding.char_name [charcode] = (char *)".notdef";
+ type1->encoding.char_name [charcode] = ".notdef";
- char_name = loader.encoding_table.elements[charcode];
if ( char_name )
for ( idx = 0; idx < type1->num_glyphs; idx++ )
{
- glyph_name = (FT_Byte*)type1->glyph_names[idx];
- if ( ft_strcmp( (const char*)char_name,
- (const char*)glyph_name ) == 0 )
+ const FT_String* glyph_name = type1->glyph_names[idx];
+
+
+ if ( ft_strcmp( char_name, glyph_name ) == 0 )
{
type1->encoding.char_index[charcode] = (FT_UShort)idx;
- type1->encoding.char_name [charcode] = (char*)glyph_name;
+ type1->encoding.char_name [charcode] = glyph_name;
/* Change min/max encoded char only if glyph name is */
/* not /.notdef */
- if ( ft_strcmp( (const char*)".notdef",
- (const char*)glyph_name ) != 0 )
+ if ( ft_strcmp( ".notdef", glyph_name ) != 0 )
{
if ( charcode < min_char )
min_char = charcode;
@@ -354,7 +353,8 @@
error = FT_CMap_New( cmap_classes->unicode, NULL, &charmap, NULL );
if ( error &&
- FT_ERR_NEQ( error, No_Unicode_Glyph_Name ) )
+ FT_ERR_NEQ( error, No_Unicode_Glyph_Name ) &&
+ FT_ERR_NEQ( error, Unimplemented_Feature ) )
goto Exit;
error = FT_Err_Ok;
@@ -457,20 +457,21 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* T42_Driver_Init */
- /* */
- /* <Description> */
- /* Initializes a given Type 42 driver object. */
- /* */
- /* <Input> */
- /* driver :: A handle to the target driver object. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
+ /**************************************************************************
+ *
+ * @Function:
+ * T42_Driver_Init
+ *
+ * @Description:
+ * Initializes a given Type 42 driver object.
+ *
+ * @Input:
+ * driver ::
+ * A handle to the target driver object.
+ *
+ * @Return:
+ * FreeType error code. 0 means success.
+ */
FT_LOCAL_DEF( FT_Error )
T42_Driver_Init( FT_Module module ) /* T42_Driver */
{