diff options
Diffstat (limited to 'src/3rdparty/freetype/src/pfr')
-rw-r--r-- | src/3rdparty/freetype/src/pfr/Jamfile | 10 | ||||
-rw-r--r-- | src/3rdparty/freetype/src/pfr/module.mk | 2 | ||||
-rw-r--r-- | src/3rdparty/freetype/src/pfr/pfr.c | 2 | ||||
-rw-r--r-- | src/3rdparty/freetype/src/pfr/pfrcmap.c | 2 | ||||
-rw-r--r-- | src/3rdparty/freetype/src/pfr/pfrcmap.h | 2 | ||||
-rw-r--r-- | src/3rdparty/freetype/src/pfr/pfrdrivr.c | 20 | ||||
-rw-r--r-- | src/3rdparty/freetype/src/pfr/pfrdrivr.h | 2 | ||||
-rw-r--r-- | src/3rdparty/freetype/src/pfr/pfrerror.h | 2 | ||||
-rw-r--r-- | src/3rdparty/freetype/src/pfr/pfrgload.c | 12 | ||||
-rw-r--r-- | src/3rdparty/freetype/src/pfr/pfrgload.h | 2 | ||||
-rw-r--r-- | src/3rdparty/freetype/src/pfr/pfrload.c | 19 | ||||
-rw-r--r-- | src/3rdparty/freetype/src/pfr/pfrload.h | 4 | ||||
-rw-r--r-- | src/3rdparty/freetype/src/pfr/pfrobjs.c | 32 | ||||
-rw-r--r-- | src/3rdparty/freetype/src/pfr/pfrobjs.h | 2 | ||||
-rw-r--r-- | src/3rdparty/freetype/src/pfr/pfrsbit.c | 71 | ||||
-rw-r--r-- | src/3rdparty/freetype/src/pfr/pfrsbit.h | 2 | ||||
-rw-r--r-- | src/3rdparty/freetype/src/pfr/pfrtypes.h | 6 | ||||
-rw-r--r-- | src/3rdparty/freetype/src/pfr/rules.mk | 7 |
18 files changed, 109 insertions, 90 deletions
diff --git a/src/3rdparty/freetype/src/pfr/Jamfile b/src/3rdparty/freetype/src/pfr/Jamfile index 9e2f2b8d05..c5b35be870 100644 --- a/src/3rdparty/freetype/src/pfr/Jamfile +++ b/src/3rdparty/freetype/src/pfr/Jamfile @@ -1,6 +1,6 @@ # FreeType 2 src/pfr Jamfile # -# Copyright 2002 by +# Copyright 2002-2015 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -16,7 +16,13 @@ SubDir FT2_TOP $(FT2_SRC_DIR) pfr ; if $(FT2_MULTI) { - _sources = pfrdrivr pfrgload pfrload pfrobjs pfrcmap pfrsbit ; + _sources = pfrcmap + pfrdrivr + pfrgload + pfrload + pfrobjs + pfrsbit + ; } else { diff --git a/src/3rdparty/freetype/src/pfr/module.mk b/src/3rdparty/freetype/src/pfr/module.mk index 8d1d28a9d2..3f5a47e888 100644 --- a/src/3rdparty/freetype/src/pfr/module.mk +++ b/src/3rdparty/freetype/src/pfr/module.mk @@ -3,7 +3,7 @@ # -# Copyright 2002, 2006 by +# Copyright 2002-2015 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/3rdparty/freetype/src/pfr/pfr.c b/src/3rdparty/freetype/src/pfr/pfr.c index eb2c4edb7e..96e67300a5 100644 --- a/src/3rdparty/freetype/src/pfr/pfr.c +++ b/src/3rdparty/freetype/src/pfr/pfr.c @@ -4,7 +4,7 @@ /* */ /* FreeType PFR driver component. */ /* */ -/* Copyright 2002 by */ +/* Copyright 2002-2015 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/src/3rdparty/freetype/src/pfr/pfrcmap.c b/src/3rdparty/freetype/src/pfr/pfrcmap.c index 90ba0105ea..88ff55a806 100644 --- a/src/3rdparty/freetype/src/pfr/pfrcmap.c +++ b/src/3rdparty/freetype/src/pfr/pfrcmap.c @@ -4,7 +4,7 @@ /* */ /* FreeType PFR cmap handling (body). */ /* */ -/* Copyright 2002, 2007, 2009, 2013 by */ +/* Copyright 2002-2015 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/src/3rdparty/freetype/src/pfr/pfrcmap.h b/src/3rdparty/freetype/src/pfr/pfrcmap.h index a626953054..87e1e5b942 100644 --- a/src/3rdparty/freetype/src/pfr/pfrcmap.h +++ b/src/3rdparty/freetype/src/pfr/pfrcmap.h @@ -4,7 +4,7 @@ /* */ /* FreeType PFR cmap handling (specification). */ /* */ -/* Copyright 2002 by */ +/* Copyright 2002-2015 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/src/3rdparty/freetype/src/pfr/pfrdrivr.c b/src/3rdparty/freetype/src/pfr/pfrdrivr.c index db66281acd..875374889c 100644 --- a/src/3rdparty/freetype/src/pfr/pfrdrivr.c +++ b/src/3rdparty/freetype/src/pfr/pfrdrivr.c @@ -4,7 +4,7 @@ /* */ /* FreeType PFR driver interface (body). */ /* */ -/* Copyright 2002-2004, 2006, 2008, 2010, 2011, 2013, 2014 by */ +/* Copyright 2002-2015 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -20,7 +20,7 @@ #include FT_INTERNAL_DEBUG_H #include FT_INTERNAL_STREAM_H #include FT_SERVICE_PFR_H -#include FT_SERVICE_XFREE86_NAME_H +#include FT_SERVICE_FONT_FORMAT_H #include "pfrdrivr.h" #include "pfrobjs.h" @@ -43,12 +43,14 @@ if ( phys->outline_resolution != phys->metrics_resolution ) { if ( avector->x != 0 ) - avector->x = FT_MulDiv( avector->x, phys->outline_resolution, - phys->metrics_resolution ); + avector->x = FT_MulDiv( avector->x, + (FT_Long)phys->outline_resolution, + (FT_Long)phys->metrics_resolution ); if ( avector->y != 0 ) - avector->y = FT_MulDiv( avector->x, phys->outline_resolution, - phys->metrics_resolution ); + avector->y = FT_MulDiv( avector->y, + (FT_Long)phys->outline_resolution, + (FT_Long)phys->metrics_resolution ); } return FT_Err_Ok; @@ -118,10 +120,10 @@ if ( size ) { x_scale = FT_DivFix( size->metrics.x_ppem << 6, - phys->metrics_resolution ); + (FT_Long)phys->metrics_resolution ); y_scale = FT_DivFix( size->metrics.y_ppem << 6, - phys->metrics_resolution ); + (FT_Long)phys->metrics_resolution ); } if ( ametrics_x_scale ) @@ -151,7 +153,7 @@ static const FT_ServiceDescRec pfr_services[] = { { FT_SERVICE_ID_PFR_METRICS, &pfr_metrics_service_rec }, - { FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_PFR }, + { FT_SERVICE_ID_FONT_FORMAT, FT_FONT_FORMAT_PFR }, { NULL, NULL } }; diff --git a/src/3rdparty/freetype/src/pfr/pfrdrivr.h b/src/3rdparty/freetype/src/pfr/pfrdrivr.h index 75f86c5cdd..b5be4709c8 100644 --- a/src/3rdparty/freetype/src/pfr/pfrdrivr.h +++ b/src/3rdparty/freetype/src/pfr/pfrdrivr.h @@ -4,7 +4,7 @@ /* */ /* High-level Type PFR driver interface (specification). */ /* */ -/* Copyright 2002 by */ +/* Copyright 2002-2015 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/src/3rdparty/freetype/src/pfr/pfrerror.h b/src/3rdparty/freetype/src/pfr/pfrerror.h index 94dc8c5e1c..978e7b2d34 100644 --- a/src/3rdparty/freetype/src/pfr/pfrerror.h +++ b/src/3rdparty/freetype/src/pfr/pfrerror.h @@ -4,7 +4,7 @@ /* */ /* PFR error codes (specification only). */ /* */ -/* Copyright 2002, 2012 by */ +/* Copyright 2002-2015 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/src/3rdparty/freetype/src/pfr/pfrgload.c b/src/3rdparty/freetype/src/pfr/pfrgload.c index 2ce093779c..88df06a03d 100644 --- a/src/3rdparty/freetype/src/pfr/pfrgload.c +++ b/src/3rdparty/freetype/src/pfr/pfrgload.c @@ -4,7 +4,7 @@ /* */ /* FreeType PFR glyph loader (body). */ /* */ -/* Copyright 2002, 2003, 2005, 2007, 2010, 2013 by */ +/* Copyright 2002-2015 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -143,7 +143,7 @@ error = FT_GLYPHLOADER_CHECK_POINTS( loader, 1, 0 ); if ( !error ) { - FT_UInt n = outline->n_points; + FT_Int n = outline->n_points; outline->points[n] = *to; @@ -632,14 +632,14 @@ if ( format & PFR_SUBGLYPH_XSCALE ) { PFR_CHECK( 2 ); - subglyph->x_scale = PFR_NEXT_SHORT( p ) << 4; + subglyph->x_scale = PFR_NEXT_SHORT( p ) * 16; } subglyph->y_scale = 0x10000L; if ( format & PFR_SUBGLYPH_YSCALE ) { PFR_CHECK( 2 ); - subglyph->y_scale = PFR_NEXT_SHORT( p ) << 4; + subglyph->y_scale = PFR_NEXT_SHORT( p ) * 16; } /* read offset */ @@ -693,7 +693,7 @@ if ( format & PFR_SUBGLYPH_3BYTE_OFFSET ) { PFR_CHECK( 3 ); - subglyph->gps_offset = PFR_NEXT_LONG( p ); + subglyph->gps_offset = PFR_NEXT_ULONG( p ); } else { @@ -736,7 +736,7 @@ if ( size > 0 && *p & PFR_GLYPH_IS_COMPOUND ) { - FT_Int n, old_count, count; + FT_UInt n, old_count, count; FT_GlyphLoader loader = glyph->loader; FT_Outline* base = &loader->base.outline; diff --git a/src/3rdparty/freetype/src/pfr/pfrgload.h b/src/3rdparty/freetype/src/pfr/pfrgload.h index 7cc7a8702a..c7c8da15a1 100644 --- a/src/3rdparty/freetype/src/pfr/pfrgload.h +++ b/src/3rdparty/freetype/src/pfr/pfrgload.h @@ -4,7 +4,7 @@ /* */ /* FreeType PFR glyph loader (specification). */ /* */ -/* Copyright 2002 by */ +/* Copyright 2002-2015 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/src/3rdparty/freetype/src/pfr/pfrload.c b/src/3rdparty/freetype/src/pfr/pfrload.c index f68d016392..ec7311df56 100644 --- a/src/3rdparty/freetype/src/pfr/pfrload.c +++ b/src/3rdparty/freetype/src/pfr/pfrload.c @@ -4,7 +4,7 @@ /* */ /* FreeType PFR loader (body). */ /* */ -/* Copyright 2002-2005, 2007, 2009, 2010, 2013, 2014 by */ +/* Copyright 2002-2015 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -199,7 +199,7 @@ FT_LOCAL_DEF( FT_Error ) pfr_log_font_count( FT_Stream stream, FT_UInt32 section_offset, - FT_UInt *acount ) + FT_Long *acount ) { FT_Error error; FT_UInt count; @@ -212,7 +212,7 @@ result = count; Exit: - *acount = result; + *acount = (FT_Long)result; return error; } @@ -449,9 +449,9 @@ FT_Byte* limit, PFR_PhyFont phy_font ) { - FT_Error error = FT_Err_Ok; - FT_Memory memory = phy_font->memory; - FT_PtrDist len = limit - p; + FT_Error error = FT_Err_Ok; + FT_Memory memory = phy_font->memory; + FT_UInt len = (FT_UInt)( limit - p ); if ( phy_font->font_id != NULL ) @@ -535,7 +535,8 @@ item->pair_count = PFR_NEXT_BYTE( p ); item->base_adj = PFR_NEXT_SHORT( p ); item->flags = PFR_NEXT_BYTE( p ); - item->offset = phy_font->offset + ( p - phy_font->cursor ); + item->offset = phy_font->offset + + (FT_Offset)( p - phy_font->cursor ); #ifndef PFR_CONFIG_NO_CHECKS item->pair_size = 3; @@ -864,7 +865,7 @@ phy_font->num_chars = count = PFR_NEXT_USHORT( p ); - phy_font->chars_offset = offset + ( p - stream->cursor ); + phy_font->chars_offset = offset + (FT_Offset)( p - stream->cursor ); if ( FT_NEW_ARRAY( phy_font->chars, count ) ) goto Fail; @@ -898,7 +899,7 @@ cur->advance = ( flags & PFR_PHY_PROPORTIONAL ) ? PFR_NEXT_SHORT( p ) - : (FT_Int) phy_font->standard_advance; + : phy_font->standard_advance; #if 0 cur->ascii = ( flags & PFR_PHY_ASCII_CODE ) diff --git a/src/3rdparty/freetype/src/pfr/pfrload.h b/src/3rdparty/freetype/src/pfr/pfrload.h index ed010715d1..0a512346b6 100644 --- a/src/3rdparty/freetype/src/pfr/pfrload.h +++ b/src/3rdparty/freetype/src/pfr/pfrload.h @@ -4,7 +4,7 @@ /* */ /* FreeType PFR loader (specification). */ /* */ -/* Copyright 2002 by */ +/* Copyright 2002-2015 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -85,7 +85,7 @@ FT_BEGIN_HEADER FT_LOCAL( FT_Error ) pfr_log_font_count( FT_Stream stream, FT_UInt32 log_section_offset, - FT_UInt *acount ); + FT_Long *acount ); /* load a pfr logical font entry */ FT_LOCAL( FT_Error ) diff --git a/src/3rdparty/freetype/src/pfr/pfrobjs.c b/src/3rdparty/freetype/src/pfr/pfrobjs.c index 0c89242c74..b854b00ba8 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 2002-2008, 2010-2011, 2013, 2014 by */ +/* Copyright 2002-2015 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -94,7 +94,7 @@ /* check face index */ { - FT_UInt num_faces; + FT_Long num_faces; error = pfr_log_font_count( stream, @@ -109,7 +109,7 @@ if ( face_index < 0 ) goto Exit; - if ( face_index >= pfrface->num_faces ) + if ( ( face_index & 0xFFFF ) >= pfrface->num_faces ) { FT_ERROR(( "pfr_face_init: invalid face index\n" )); error = FT_THROW( Invalid_Argument ); @@ -118,7 +118,7 @@ /* load the face */ error = pfr_log_font_load( - &face->log_font, stream, face_index, + &face->log_font, stream, (FT_UInt)( face_index & 0xFFFF ), face->header.log_dir_offset, FT_BOOL( face->header.phy_font_max_size_high != 0 ) ); if ( error ) @@ -136,8 +136,8 @@ PFR_PhyFont phy_font = &face->phy_font; - pfrface->face_index = face_index; - pfrface->num_glyphs = phy_font->num_chars + 1; + pfrface->face_index = face_index & 0xFFFF; + pfrface->num_glyphs = (FT_Long)phy_font->num_chars + 1; pfrface->face_flags |= FT_FACE_FLAG_SCALABLE; @@ -192,7 +192,7 @@ pfrface->style_name = phy_font->style_name; pfrface->num_fixed_sizes = 0; - pfrface->available_sizes = 0; + pfrface->available_sizes = NULL; pfrface->bbox = phy_font->bbox; pfrface->units_per_EM = (FT_UShort)phy_font->outline_resolution; @@ -218,13 +218,13 @@ strike = phy_font->strikes; for ( n = 0; n < count; n++, size++, strike++ ) { - size->height = (FT_UShort)strike->y_ppm; - size->width = (FT_UShort)strike->x_ppm; - size->size = strike->y_ppm << 6; - size->x_ppem = strike->x_ppm << 6; - size->y_ppem = strike->y_ppm << 6; + size->height = (FT_Short)strike->y_ppm; + size->width = (FT_Short)strike->x_ppm; + size->size = (FT_Pos)( strike->y_ppm << 6 ); + size->x_ppem = (FT_Pos)( strike->x_ppm << 6 ); + size->y_ppem = (FT_Pos)( strike->y_ppm << 6 ); } - pfrface->num_fixed_sizes = count; + pfrface->num_fixed_sizes = (FT_Int)count; } /* now compute maximum advance width */ @@ -366,7 +366,7 @@ FT_BBox cbox; FT_Glyph_Metrics* metrics = &pfrslot->metrics; FT_Pos advance; - FT_Int em_metrics, em_outline; + FT_UInt em_metrics, em_outline; FT_Bool scaling; @@ -390,7 +390,9 @@ em_outline = face->phy_font.outline_resolution; if ( em_metrics != em_outline ) - advance = FT_MulDiv( advance, em_outline, em_metrics ); + advance = FT_MulDiv( advance, + (FT_Long)em_outline, + (FT_Long)em_metrics ); if ( face->phy_font.flags & PFR_PHY_VERTICAL ) metrics->vertAdvance = advance; diff --git a/src/3rdparty/freetype/src/pfr/pfrobjs.h b/src/3rdparty/freetype/src/pfr/pfrobjs.h index f6aa8b44cc..e990b45a0a 100644 --- a/src/3rdparty/freetype/src/pfr/pfrobjs.h +++ b/src/3rdparty/freetype/src/pfr/pfrobjs.h @@ -4,7 +4,7 @@ /* */ /* FreeType PFR object methods (specification). */ /* */ -/* Copyright 2002, 2003, 2004 by */ +/* Copyright 2002-2015 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/src/3rdparty/freetype/src/pfr/pfrsbit.c b/src/3rdparty/freetype/src/pfr/pfrsbit.c index 979bf78a26..bb5df5c9f9 100644 --- a/src/3rdparty/freetype/src/pfr/pfrsbit.c +++ b/src/3rdparty/freetype/src/pfr/pfrsbit.c @@ -4,7 +4,7 @@ /* */ /* FreeType PFR bitmap loader (body). */ /* */ -/* Copyright 2002, 2003, 2006, 2009, 2010, 2013 by */ +/* Copyright 2002-2015 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -39,9 +39,9 @@ { FT_Byte* line; /* current line start */ FT_Int pitch; /* line size in bytes */ - FT_Int width; /* width in pixels/bits */ - FT_Int rows; /* number of remaining rows to scan */ - FT_Int total; /* total number of bits to draw */ + FT_UInt width; /* width in pixels/bits */ + FT_UInt rows; /* number of remaining rows to scan */ + FT_UInt total; /* total number of bits to draw */ } PFR_BitWriterRec, *PFR_BitWriter; @@ -59,7 +59,7 @@ if ( !decreasing ) { - writer->line += writer->pitch * ( target->rows - 1 ); + writer->line += writer->pitch * (FT_Int)( target->rows - 1 ); writer->pitch = -writer->pitch; } } @@ -70,15 +70,15 @@ FT_Byte* p, FT_Byte* limit ) { - FT_Int n, reload; - FT_Int left = writer->width; + FT_UInt n, reload; + FT_UInt left = writer->width; FT_Byte* cur = writer->line; FT_UInt mask = 0x80; FT_UInt val = 0; FT_UInt c = 0; - n = (FT_Int)( limit - p ) * 8; + n = (FT_UInt)( limit - p ) * 8; if ( n > writer->total ) n = writer->total; @@ -110,7 +110,7 @@ cur[0] = (FT_Byte)c; mask = 0x80; c = 0; - cur ++; + cur++; } } @@ -124,8 +124,9 @@ FT_Byte* p, FT_Byte* limit ) { - FT_Int n, phase, count, counts[2], reload; - FT_Int left = writer->width; + FT_Int phase, count, counts[2]; + FT_UInt n, reload; + FT_UInt left = writer->width; FT_Byte* cur = writer->line; FT_UInt mask = 0x80; FT_UInt c = 0; @@ -175,7 +176,7 @@ if ( --left <= 0 ) { - cur[0] = (FT_Byte) c; + cur[0] = (FT_Byte)c; left = writer->width; mask = 0x80; @@ -188,7 +189,7 @@ cur[0] = (FT_Byte)c; mask = 0x80; c = 0; - cur ++; + cur++; } reload = ( --count <= 0 ); @@ -204,8 +205,9 @@ FT_Byte* p, FT_Byte* limit ) { - FT_Int n, phase, count, reload; - FT_Int left = writer->width; + FT_Int phase, count; + FT_UInt n, reload; + FT_UInt left = writer->width; FT_Byte* cur = writer->line; FT_UInt mask = 0x80; FT_UInt c = 0; @@ -239,7 +241,7 @@ if ( --left <= 0 ) { - cur[0] = (FT_Byte) c; + cur[0] = (FT_Byte)c; c = 0; mask = 0x80; left = writer->width; @@ -252,7 +254,7 @@ cur[0] = (FT_Byte)c; c = 0; mask = 0x80; - cur ++; + cur++; } reload = ( --count <= 0 ); @@ -355,7 +357,8 @@ { FT_Error error = FT_Err_Ok; FT_Byte flags; - FT_Char b; + FT_Char c; + FT_Byte b; FT_Byte* p = *pdata; FT_Long xpos, ypos, advance; FT_UInt xsize, ysize; @@ -374,9 +377,9 @@ { case 0: PFR_CHECK( 1 ); - b = PFR_NEXT_INT8( p ); - xpos = b >> 4; - ypos = ( (FT_Char)( b << 4 ) ) >> 4; + c = PFR_NEXT_INT8( p ); + xpos = c >> 4; + ypos = ( (FT_Char)( c << 4 ) ) >> 4; break; case 1: @@ -609,8 +612,8 @@ advance = character->advance; if ( phys->metrics_resolution != phys->outline_resolution ) advance = FT_MulDiv( advance, - phys->outline_resolution, - phys->metrics_resolution ); + (FT_Long)phys->outline_resolution, + (FT_Long)phys->metrics_resolution ); glyph->root.linearHoriAdvance = advance; @@ -618,7 +621,7 @@ /* overridden in the bitmap header of certain glyphs. */ advance = FT_MulDiv( (FT_Fixed)size->root.metrics.x_ppem << 8, character->advance, - phys->metrics_resolution ); + (FT_Long)phys->metrics_resolution ); if ( FT_STREAM_SEEK( face->header.gps_section_offset + gps_offset ) || FT_FRAME_ENTER( gps_size ) ) @@ -632,12 +635,14 @@ &advance, &format ); /* - * XXX: on 16bit system, we return an error for huge bitmap - * which causes a size truncation, because truncated - * size properties makes bitmap glyph broken. + * XXX: on 16bit systems we return an error for huge bitmaps + * that cause size truncation, because truncated + * size properties make bitmap glyphs broken. */ - if ( xpos > FT_INT_MAX || xpos < FT_INT_MIN || - ysize > FT_INT_MAX || ypos + ysize > FT_INT_MAX || + if ( xpos > FT_INT_MAX || + xpos < FT_INT_MIN || + ysize > FT_INT_MAX || + ypos > FT_INT_MAX - (FT_Long)ysize || ypos + (FT_Long)ysize < FT_INT_MIN ) { FT_TRACE1(( "pfr_slot_load_bitmap:" )); @@ -653,8 +658,8 @@ /* Set up glyph bitmap and metrics */ /* XXX: needs casts to fit FT_Bitmap.{width|rows|pitch} */ - glyph->root.bitmap.width = (FT_Int)xsize; - glyph->root.bitmap.rows = (FT_Int)ysize; + glyph->root.bitmap.width = xsize; + glyph->root.bitmap.rows = ysize; glyph->root.bitmap.pitch = (FT_Int)( xsize + 7 ) >> 3; glyph->root.bitmap.pixel_mode = FT_PIXEL_MODE_MONO; @@ -670,11 +675,11 @@ /* XXX: needs casts fit FT_GlyphSlotRec.bitmap_{left|top} */ glyph->root.bitmap_left = (FT_Int)xpos; - glyph->root.bitmap_top = (FT_Int)(ypos + ysize); + glyph->root.bitmap_top = (FT_Int)( ypos + (FT_Long)ysize ); /* Allocate and read bitmap data */ { - FT_ULong len = glyph->root.bitmap.pitch * ysize; + FT_ULong len = (FT_ULong)glyph->root.bitmap.pitch * ysize; error = ft_glyphslot_alloc_bitmap( &glyph->root, len ); diff --git a/src/3rdparty/freetype/src/pfr/pfrsbit.h b/src/3rdparty/freetype/src/pfr/pfrsbit.h index 015e9e6dad..0db2cd5ebd 100644 --- a/src/3rdparty/freetype/src/pfr/pfrsbit.h +++ b/src/3rdparty/freetype/src/pfr/pfrsbit.h @@ -4,7 +4,7 @@ /* */ /* FreeType PFR bitmap loader (specification). */ /* */ -/* Copyright 2002 by */ +/* Copyright 2002-2015 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/src/3rdparty/freetype/src/pfr/pfrtypes.h b/src/3rdparty/freetype/src/pfr/pfrtypes.h index 918310814c..5ffb1b14ee 100644 --- a/src/3rdparty/freetype/src/pfr/pfrtypes.h +++ b/src/3rdparty/freetype/src/pfr/pfrtypes.h @@ -4,7 +4,7 @@ /* */ /* FreeType PFR data structures (specification only). */ /* */ -/* Copyright 2002, 2003, 2005, 2007 by */ +/* Copyright 2002-2015 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -229,7 +229,7 @@ FT_BEGIN_HEADER FT_UInt metrics_resolution; FT_BBox bbox; FT_UInt flags; - FT_UInt standard_advance; + FT_Int standard_advance; FT_Int ascent; /* optional, bbox.yMax if not present */ FT_Int descent; /* optional, bbox.yMin if not present */ @@ -260,7 +260,7 @@ FT_BEGIN_HEADER PFR_KernItem* kern_items_tail; /* not part of the spec, but used during load */ - FT_Long bct_offset; + FT_ULong bct_offset; FT_Byte* cursor; } PFR_PhyFontRec, *PFR_PhyFont; diff --git a/src/3rdparty/freetype/src/pfr/rules.mk b/src/3rdparty/freetype/src/pfr/rules.mk index 60b96c7415..e665460103 100644 --- a/src/3rdparty/freetype/src/pfr/rules.mk +++ b/src/3rdparty/freetype/src/pfr/rules.mk @@ -3,7 +3,7 @@ # -# Copyright 2002, 2003 by +# Copyright 2002-2015 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -20,7 +20,10 @@ PFR_DIR := $(SRC_DIR)/pfr # compilation flags for the driver # -PFR_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(PFR_DIR)) +PFR_COMPILE := $(CC) $(ANSIFLAGS) \ + $I$(subst /,$(COMPILER_SEP),$(PFR_DIR)) \ + $(INCLUDE_FLAGS) \ + $(FT_CFLAGS) # pfr driver sources (i.e., C files) |