diff options
author | marha <marha@users.sourceforge.net> | 2012-03-12 10:48:52 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-03-12 10:48:52 +0100 |
commit | 485b633824020c557eb60258e1d36975c8c44770 (patch) | |
tree | f48baf73d5a7ae814aae825e7b1405189eab9f0a /freetype/src/type1/t1objs.c | |
parent | c84235ee0d9940e6a779ec306e615603b58a79f2 (diff) | |
parent | 41bd254198b8b879a562a85f7dc868c3c0f7fbc1 (diff) | |
download | vcxsrv-485b633824020c557eb60258e1d36975c8c44770.tar.gz vcxsrv-485b633824020c557eb60258e1d36975c8c44770.tar.bz2 vcxsrv-485b633824020c557eb60258e1d36975c8c44770.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
freetype/src/base/ftrfork.c
freetype/src/cff/cffpic.c
freetype/src/pfr/pfrobjs.c
freetype/src/winfonts/winfnt.c
Diffstat (limited to 'freetype/src/type1/t1objs.c')
-rw-r--r-- | freetype/src/type1/t1objs.c | 52 |
1 files changed, 35 insertions, 17 deletions
diff --git a/freetype/src/type1/t1objs.c b/freetype/src/type1/t1objs.c index 328e326fe..d63df38f1 100644 --- a/freetype/src/type1/t1objs.c +++ b/freetype/src/type1/t1objs.c @@ -4,7 +4,7 @@ /* */ /* Type 1 objects manager (body). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */ +/* Copyright 1996-2009, 2011 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -72,8 +72,11 @@ FT_LOCAL_DEF( void ) - T1_Size_Done( T1_Size size ) + T1_Size_Done( FT_Size t1size ) /* T1_Size */ { + T1_Size size = (T1_Size)t1size; + + if ( size->root.internal ) { PSH_Globals_Funcs funcs; @@ -89,8 +92,9 @@ FT_LOCAL_DEF( FT_Error ) - T1_Size_Init( T1_Size size ) + T1_Size_Init( FT_Size t1size ) /* T1_Size */ { + T1_Size size = (T1_Size)t1size; FT_Error error = T1_Err_Ok; PSH_Globals_Funcs funcs = T1_Size_Get_Globals_Funcs( size ); @@ -112,9 +116,10 @@ FT_LOCAL_DEF( FT_Error ) - T1_Size_Request( T1_Size size, + T1_Size_Request( FT_Size t1size, /* T1_Size */ FT_Size_Request req ) { + T1_Size size = (T1_Size)t1size; PSH_Globals_Funcs funcs = T1_Size_Get_Globals_Funcs( size ); @@ -137,20 +142,20 @@ /*************************************************************************/ FT_LOCAL_DEF( void ) - T1_GlyphSlot_Done( T1_GlyphSlot slot ) + T1_GlyphSlot_Done( FT_GlyphSlot slot ) { - slot->root.internal->glyph_hints = 0; + slot->internal->glyph_hints = 0; } FT_LOCAL_DEF( FT_Error ) - T1_GlyphSlot_Init( T1_GlyphSlot slot ) + T1_GlyphSlot_Init( FT_GlyphSlot slot ) { T1_Face face; PSHinter_Service pshinter; - face = (T1_Face)slot->root.face; + face = (T1_Face)slot->face; pshinter = (PSHinter_Service)face->pshinter; if ( pshinter ) @@ -158,15 +163,18 @@ FT_Module module; - module = FT_Get_Module( slot->root.face->driver->root.library, "pshinter" ); - if (module) + module = FT_Get_Module( slot->face->driver->root.library, + "pshinter" ); + if ( module ) { T1_Hints_Funcs funcs; + funcs = pshinter->get_t1_funcs( module ); - slot->root.internal->glyph_hints = (void*)funcs; + slot->internal->glyph_hints = (void*)funcs; } } + return 0; } @@ -190,8 +198,9 @@ /* face :: A typeless pointer to the face object to destroy. */ /* */ FT_LOCAL_DEF( void ) - T1_Face_Done( T1_Face face ) + T1_Face_Done( FT_Face t1face ) /* T1_Face */ { + T1_Face face = (T1_Face)t1face; FT_Memory memory; T1_Font type1; @@ -289,11 +298,12 @@ /* */ FT_LOCAL_DEF( FT_Error ) T1_Face_Init( FT_Stream stream, - T1_Face face, + FT_Face t1face, /* T1_Face */ FT_Int face_index, FT_Int num_params, FT_Parameter* params ) { + T1_Face face = (T1_Face)t1face; FT_Error error; FT_Service_PsCMaps psnames; PSAux_Service psaux; @@ -313,10 +323,18 @@ face->psaux = FT_Get_Module_Interface( FT_FACE_LIBRARY( face ), "psaux" ); psaux = (PSAux_Service)face->psaux; + if ( !psaux ) + { + FT_ERROR(( "T1_Face_Init: cannot access `psaux' module\n" )); + error = T1_Err_Missing_Module; + goto Exit; + } face->pshinter = FT_Get_Module_Interface( FT_FACE_LIBRARY( face ), "pshinter" ); + FT_TRACE2(( "Type 1 driver\n" )); + /* open the tokenizer; this will also check the font format */ error = T1_Open_Face( face ); if ( error ) @@ -447,7 +465,7 @@ root->bbox.xMax = ( type1->font_bbox.xMax + 0xFFFF ) >> 16; root->bbox.yMax = ( type1->font_bbox.yMax + 0xFFFF ) >> 16; - /* Set units_per_EM if we didn't set it in parse_font_matrix. */ + /* Set units_per_EM if we didn't set it in t1_parse_font_matrix. */ if ( !root->units_per_EM ) root->units_per_EM = 1000; @@ -484,7 +502,7 @@ FT_Face root = &face->root; - if ( psnames && psaux ) + if ( psnames ) { FT_CharMapRec charmap; T1_CMap_Classes cmap_classes = psaux->t1_cmap_classes; @@ -568,7 +586,7 @@ /* FreeType error code. 0 means success. */ /* */ FT_LOCAL_DEF( FT_Error ) - T1_Driver_Init( T1_Driver driver ) + T1_Driver_Init( FT_Module driver ) { FT_UNUSED( driver ); @@ -588,7 +606,7 @@ /* driver :: A handle to the target Type 1 driver. */ /* */ FT_LOCAL_DEF( void ) - T1_Driver_Done( T1_Driver driver ) + T1_Driver_Done( FT_Module driver ) { FT_UNUSED( driver ); } |