summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/freetype/src/pfr/pfrobjs.c
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2022-07-18 12:57:14 +0200
committerKai Köhne <kai.koehne@qt.io>2022-07-22 14:25:26 +0200
commite79d7f12e6ca15c499a553e4a701a2887e4b184c (patch)
tree93138f4b91f0e56621836f6a46291cd219bfd641 /src/3rdparty/freetype/src/pfr/pfrobjs.c
parent425a6415e7593c99c779b406ea5b30fd5975767c (diff)
Update freetype to 2.12.1
ftdebug.c files are new, adapted the import script to copy the source file for Windows as well. Replaced the CMakeLists.txt content that was imported from the .pro file with the respective variables and logic from the freetype CMakeLists.txt file, which should make it easier to maintain this next time. Pick-to: 6.4 6.3 6.2 5.15 5.12 Fixes: QTBUG-105032 Change-Id: I1e846167b268df4b1b0a50dcec602def1a0bdcb4 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'src/3rdparty/freetype/src/pfr/pfrobjs.c')
-rw-r--r--src/3rdparty/freetype/src/pfr/pfrobjs.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/3rdparty/freetype/src/pfr/pfrobjs.c b/src/3rdparty/freetype/src/pfr/pfrobjs.c
index 918e7fd496..5a6e3979d5 100644
--- a/src/3rdparty/freetype/src/pfr/pfrobjs.c
+++ b/src/3rdparty/freetype/src/pfr/pfrobjs.c
@@ -4,7 +4,7 @@
*
* FreeType PFR object methods (body).
*
- * Copyright (C) 2002-2020 by
+ * Copyright (C) 2002-2022 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -83,7 +83,11 @@
/* load the header and check it */
error = pfr_header_load( &face->header, stream );
if ( error )
+ {
+ FT_TRACE2(( " not a PFR font\n" ));
+ error = FT_THROW( Unknown_File_Format );
goto Exit;
+ }
if ( !pfr_header_check( &face->header ) )
{
@@ -203,7 +207,7 @@
pfrface->height = (FT_Short)( ( pfrface->units_per_EM * 12 ) / 10 );
if ( pfrface->height < pfrface->ascender - pfrface->descender )
- pfrface->height = (FT_Short)(pfrface->ascender - pfrface->descender);
+ pfrface->height = (FT_Short)( pfrface->ascender - pfrface->descender );
if ( phy_font->num_strikes > 0 )
{
@@ -213,7 +217,7 @@
FT_Memory memory = pfrface->stream->memory;
- if ( FT_NEW_ARRAY( pfrface->available_sizes, count ) )
+ if ( FT_QNEW_ARRAY( pfrface->available_sizes, count ) )
goto Exit;
size = pfrface->available_sizes;