您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ FT_UNUSED函数代码示例

51自学网 2021-06-01 20:44:55
  C++
这篇教程C++ FT_UNUSED函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中FT_UNUSED函数的典型用法代码示例。如果您正苦于以下问题:C++ FT_UNUSED函数的具体用法?C++ FT_UNUSED怎么用?C++ FT_UNUSED使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了FT_UNUSED函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: _tt_check_patents_in_range

  static FT_Bool  _tt_check_patents_in_range( FT_Stream  stream,                              FT_ULong   size )  {    FT_Bool   result = FALSE;    FT_Error  error;    FT_Bytes  p, end;    if ( FT_FRAME_ENTER( size ) )      return 0;    p   = stream->cursor;    end = p + size;    while ( p < end )    {      switch (p[0])      {      case 0x06:  /* SPvTL // */      case 0x07:  /* SPvTL +  */      case 0x08:  /* SFvTL // */      case 0x09:  /* SFvTL +  */      case 0x0A:  /* SPvFS    */      case 0x0B:  /* SFvFS    */        result = TRUE;        goto Exit;      case 0x40:        if ( p + 1 >= end )          goto Exit;        p += p[1] + 2;        break;      case 0x41:        if ( p + 1 >= end )          goto Exit;        p += p[1] * 2 + 2;        break;      case 0x71:  /* DELTAP2 */      case 0x72:  /* DELTAP3 */      case 0x73:  /* DELTAC0 */      case 0x74:  /* DELTAC1 */      case 0x75:  /* DELTAC2 */        result = TRUE;        goto Exit;      case 0xB0:      case 0xB1:      case 0xB2:      case 0xB3:      case 0xB4:      case 0xB5:      case 0xB6:      case 0xB7:        p += ( p[0] - 0xB0 ) + 2;        break;      case 0xB8:      case 0xB9:      case 0xBA:      case 0xBB:      case 0xBC:      case 0xBD:      case 0xBE:      case 0xBF:        p += ( p[0] - 0xB8 ) * 2 + 3;        break;      default:        p += 1;        break;      }    }  Exit:    FT_UNUSED( error );    FT_FRAME_EXIT();    return result;  }
开发者ID:sheldonrobinson,项目名称:VcXsrv,代码行数:83,


示例2: pfr_face_init

  pfr_face_init( FT_Stream      stream,                 FT_Face        pfrface,                 FT_Int         face_index,                 FT_Int         num_params,                 FT_Parameter*  params )  {    PFR_Face  face = (PFR_Face)pfrface;    FT_Error  error;    FT_UNUSED( num_params );    FT_UNUSED( params );    /* load the header and check it */    error = pfr_header_load( &face->header, stream );    if ( error )      goto Exit;    if ( !pfr_header_check( &face->header ) )    {      FT_TRACE4(( "pfr_face_init: not a valid PFR font/n" ));      error = PFR_Err_Unknown_File_Format;      goto Exit;    }    /* check face index */    {      FT_UInt  num_faces;      error = pfr_log_font_count( stream,                                  face->header.log_dir_offset,                                  &num_faces );      if ( error )        goto Exit;      pfrface->num_faces = num_faces;    }    if ( face_index < 0 )      goto Exit;    if ( face_index >= pfrface->num_faces )    {      FT_ERROR(( "pfr_face_init: invalid face index/n" ));      error = PFR_Err_Invalid_Argument;      goto Exit;    }    /* load the face */    error = pfr_log_font_load(               &face->log_font, stream, face_index,               face->header.log_dir_offset,               FT_BOOL( face->header.phy_font_max_size_high != 0 ) );    if ( error )      goto Exit;    /* now load the physical font descriptor */    error = pfr_phy_font_load( &face->phy_font, stream,                               face->log_font.phys_offset,                               face->log_font.phys_size );    if ( error )      goto Exit;    /* now, set-up all root face fields */    {      PFR_PhyFont  phy_font = &face->phy_font;      pfrface->face_index = face_index;      pfrface->num_glyphs = phy_font->num_chars;      pfrface->face_flags = FT_FACE_FLAG_SCALABLE;      if ( (phy_font->flags & PFR_PHY_PROPORTIONAL) == 0 )        pfrface->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;      if ( phy_font->flags & PFR_PHY_VERTICAL )        pfrface->face_flags |= FT_FACE_FLAG_VERTICAL;      else        pfrface->face_flags |= FT_FACE_FLAG_HORIZONTAL;      if ( phy_font->num_strikes > 0 )        pfrface->face_flags |= FT_FACE_FLAG_FIXED_SIZES;      if ( phy_font->num_kern_pairs > 0 )        pfrface->face_flags |= FT_FACE_FLAG_KERNING;      /* If no family name was found in the "undocumented" auxiliary       * data, use the font ID instead.  This sucks but is better than       * nothing.       */      pfrface->family_name = phy_font->family_name;      if ( pfrface->family_name == NULL )        pfrface->family_name = phy_font->font_id;      /* note that the style name can be NULL in certain PFR fonts,       * probably meaning "Regular"       */      pfrface->style_name = phy_font->style_name;//.........这里部分代码省略.........
开发者ID:Bracket-,项目名称:psp-ports,代码行数:101,


示例3: T1_Driver_Done

 T1_Driver_Done( T1_Driver  driver ) {   FT_UNUSED( driver ); }
开发者ID:gbarrand,项目名称:ArcheryTune,代码行数:4,


示例4: FNT_Face_Init

static FT_ErrorFNT_Face_Init( FT_Stream      stream,               FNT_Face       face,               FT_Int         face_index,               FT_Int         num_params,               FT_Parameter*  params ){    FT_Error   error;    FT_Memory  memory = FT_FACE_MEMORY( face );    FT_UNUSED( num_params );    FT_UNUSED( params );    /* try to load font from a DLL */    error = fnt_face_get_dll_font( face, face_index );    if ( error )    {        /* this didn't work; try to load a single FNT font */        FNT_Font  font;        if ( FT_NEW( face->font ) )            goto Exit;        face->root.num_faces = 1;        font           = face->font;        font->offset   = 0;        font->fnt_size = stream->size;        error = fnt_font_load( font, stream );        if ( error )            goto Fail;    }    /* we now need to fill the root FT_Face fields */    /* with relevant information                   */    {        FT_Face   root = FT_FACE( face );        FNT_Font  font = face->font;        root->face_flags = FT_FACE_FLAG_FIXED_SIZES |                           FT_FACE_FLAG_HORIZONTAL;        if ( font->header.avg_width == font->header.max_width )            root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;        if ( font->header.italic )            root->style_flags |= FT_STYLE_FLAG_ITALIC;        if ( font->header.weight >= 800 )            root->style_flags |= FT_STYLE_FLAG_BOLD;        /* set up the `fixed_sizes' array */        if ( FT_NEW_ARRAY( root->available_sizes, 1 ) )            goto Fail;        root->num_fixed_sizes = 1;        {            FT_Bitmap_Size*  bsize = root->available_sizes;            bsize->width  = font->header.avg_width;            bsize->height =                font->header.pixel_height + font->header.external_leading;            bsize->size   = font->header.nominal_point_size << 6;            bsize->x_ppem =                (FT_Pos)( ( font->header.horizontal_resolution * bsize->size + 36 )                          / 72 );            bsize->y_ppem =                (FT_Pos)( ( font->header.vertical_resolution* bsize->size + 36 )                          / 72 );        }        {            FT_CharMapRec  charmap;            charmap.encoding    = FT_ENCODING_UNICODE;            charmap.platform_id = 3;            charmap.encoding_id = 1;            charmap.face        = root;            error = FT_CMap_New( fnt_cmap_class,                                 NULL,                                 &charmap,                                 NULL );            if ( error )                goto Fail;            /* Select default charmap */            if ( root->num_charmaps )                root->charmap = root->charmaps[0];        }        /* setup remaining flags *///.........这里部分代码省略.........
开发者ID:1tgr,项目名称:mobius,代码行数:101,


示例5: cff_driver_done

 cff_driver_done( FT_Module  module ) {   FT_UNUSED( module ); }
开发者ID:howardgao-mt,项目名称:myd3dlib,代码行数:4,


示例6: T1_Face_Init

  T1_Face_Init( FT_Stream      stream,                T1_Face        face,                FT_Int         face_index,                FT_Int         num_params,                FT_Parameter*  params )  {    FT_Error            error;    FT_Service_PsCMaps  psnames;    PSAux_Service       psaux;    T1_Font             type1 = &face->type1;    PS_FontInfo         info = &type1->font_info;    FT_UNUSED( num_params );    FT_UNUSED( params );    FT_UNUSED( face_index );    FT_UNUSED( stream );    face->root.num_faces = 1;    FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_CMAPS );    face->psnames = psnames;    face->psaux = FT_Get_Module_Interface( FT_FACE_LIBRARY( face ),                                           "psaux" );    psaux = (PSAux_Service)face->psaux;    face->pshinter = FT_Get_Module_Interface( FT_FACE_LIBRARY( face ),                                              "pshinter" );    /* open the tokenizer; this will also check the font format */    error = T1_Open_Face( face );    if ( error )      goto Exit;    /* if we just wanted to check the format, leave successfully now */    if ( face_index < 0 )      goto Exit;    /* check the face index */    if ( face_index != 0 )    {      FT_ERROR(( "T1_Face_Init: invalid face index/n" ));      error = T1_Err_Invalid_Argument;      goto Exit;    }    /* now load the font program into the face object */    /* initialize the face object fields */    /* set up root face fields */    {      FT_Face  root = (FT_Face)&face->root;      root->num_glyphs = type1->num_glyphs;      root->face_index = face_index;      root->face_flags  = FT_FACE_FLAG_SCALABLE;      root->face_flags |= FT_FACE_FLAG_HORIZONTAL;      root->face_flags |= FT_FACE_FLAG_GLYPH_NAMES;      if ( info->is_fixed_pitch )        root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;      if ( face->blend )        root->face_flags |= FT_FACE_FLAG_MULTIPLE_MASTERS;      /* XXX: TODO -- add kerning with .afm support */      /* get style name -- be careful, some broken fonts only */      /* have a `/FontName' dictionary entry!                 */      root->family_name = info->family_name;      /* assume "Regular" style if we don't know better */      root->style_name = (char *)"Regular";      if ( root->family_name )      {        char*  full   = info->full_name;        char*  family = root->family_name;        if ( full )        {          while ( *full )          {            if ( *full == *family )            {              family++;              full++;            }            else            {              if ( *full == ' ' || *full == '-' )                full++;              else if ( *family == ' ' || *family == '-' )                family++;              else              {                if ( !*family )//.........这里部分代码省略.........
开发者ID:gbarrand,项目名称:ArcheryTune,代码行数:101,


示例7: PCF_Face_Init

  PCF_Face_Init( FT_Stream      stream,                 FT_Face        pcfface,        /* PCF_Face */                 FT_Int         face_index,                 FT_Int         num_params,                 FT_Parameter*  params )  {    PCF_Face  face  = (PCF_Face)pcfface;    FT_Error  error = PCF_Err_Ok;    FT_UNUSED( num_params );    FT_UNUSED( params );    FT_UNUSED( face_index );    error = pcf_load_font( stream, face );    if ( error )    {      FT_Error  error2;      PCF_Face_Done( pcfface );      /* this didn't work, try gzip support! */      error2 = FT_Stream_OpenGzip( &face->gzip_stream, stream );      if ( FT_ERROR_BASE( error2 ) == FT_Err_Unimplemented_Feature )        goto Fail;      error = error2;      if ( error )#ifdef FT_CONFIG_OPTION_USE_LZW      {        FT_Error  error3;        /* this didn't work, try LZW support! */        error3 = FT_Stream_OpenLZW( &face->gzip_stream, stream );        if ( FT_ERROR_BASE( error3 ) == FT_Err_Unimplemented_Feature )          goto Fail;        error = error3;        if ( error )          goto Fail;        face->gzip_source = stream;        pcfface->stream   = &face->gzip_stream;        stream = pcfface->stream;        error = pcf_load_font( stream, face );        if ( error )          goto Fail;      }#else        goto Fail;#endif      else      {        face->gzip_source = stream;        pcfface->stream   = &face->gzip_stream;        stream = pcfface->stream;        error = pcf_load_font( stream, face );        if ( error )          goto Fail;      }    }
开发者ID:guozanhua,项目名称:OgreKit,代码行数:67,


示例8: psh_blues_set_zones_0

  static void  psh_blues_set_zones_0( PSH_Blues       target,                         FT_Bool         is_others,                         FT_UInt         read_count,                         FT_Short*       read,                         PSH_Blue_Table  top_table,                         PSH_Blue_Table  bot_table )  {    FT_UInt  count_top = top_table->count;    FT_UInt  count_bot = bot_table->count;    FT_Bool  first     = 1;    FT_UNUSED( target );    for ( ; read_count > 0; read_count -= 2 )    {      FT_Int         reference, delta;      FT_UInt        count;      PSH_Blue_Zone  zones, zone;      FT_Bool        top;      /* read blue zone entry, and select target top/bottom zone */      top = 0;      if ( first || is_others )      {        reference = read[1];        delta     = read[0] - reference;        zones = bot_table->zones;        count = count_bot;        first = 0;      }      else      {        reference = read[0];        delta     = read[1] - reference;        zones = top_table->zones;        count = count_top;        top   = 1;      }      /* insert into sorted table */      zone = zones;      for ( ; count > 0; count--, zone++ )      {        if ( reference < zone->org_ref )          break;        if ( reference == zone->org_ref )        {          FT_Int  delta0 = zone->org_delta;          /* we have two zones on the same reference position -- */          /* only keep the largest one                           */          if ( delta < 0 )          {            if ( delta < delta0 )              zone->org_delta = delta;          }          else          {            if ( delta > delta0 )              zone->org_delta = delta;          }          goto Skip;        }      }      for ( ; count > 0; count-- )        zone[count] = zone[count-1];      zone->org_ref   = reference;      zone->org_delta = delta;      if ( top )        count_top++;      else        count_bot++;    Skip:      read += 2;    }    top_table->count = count_top;    bot_table->count = count_bot;  }
开发者ID:allanw1,项目名称:Arianrhod,代码行数:90,


示例9: pcf_get_bitmaps

  static FT_Error  pcf_get_bitmaps( FT_Stream  stream,                   PCF_Face   face )  {    FT_Error   error  = PCF_Err_Ok;    FT_Memory  memory = FT_FACE(face)->memory;    FT_Long*   offsets;    FT_Long    bitmapSizes[GLYPHPADOPTIONS];    FT_ULong   format, size;    int        nbitmaps, i, sizebitmaps = 0;    char*      bitmaps;    error = pcf_seek_to_table_type( stream,                                    face->toc.tables,                                    face->toc.count,                                    PCF_BITMAPS,                                    &format,                                    &size );    if ( error )      return error;    error = FT_Stream_EnterFrame( stream, 8 );    if ( error )      return error;    format = FT_GET_ULONG_LE();    if ( PCF_BYTE_ORDER( format ) == MSBFirst )      nbitmaps  = FT_GET_ULONG();    else      nbitmaps  = FT_GET_ULONG_LE();    FT_Stream_ExitFrame( stream );    if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) )      return PCF_Err_Invalid_File_Format;    if ( nbitmaps != face->nmetrics )      return PCF_Err_Invalid_File_Format;    if ( FT_NEW_ARRAY( offsets, nbitmaps ) )      return error;    FT_TRACE4(( "pcf_get_bitmaps:/n" ));    for ( i = 0; i < nbitmaps; i++ )    {      if ( PCF_BYTE_ORDER( format ) == MSBFirst )        (void)FT_READ_LONG( offsets[i] );      else        (void)FT_READ_LONG_LE( offsets[i] );      FT_TRACE4(( "  bitmap %d: offset %ld (0x%lX)/n",                  i, offsets[i], offsets[i] ));    }    if ( error )      goto Bail;    for ( i = 0; i < GLYPHPADOPTIONS; i++ )    {      if ( PCF_BYTE_ORDER( format ) == MSBFirst )        (void)FT_READ_LONG( bitmapSizes[i] );      else        (void)FT_READ_LONG_LE( bitmapSizes[i] );      if ( error )        goto Bail;      sizebitmaps = bitmapSizes[PCF_GLYPH_PAD_INDEX( format )];      FT_TRACE4(( "  padding %d implies a size of %ld/n", i, bitmapSizes[i] ));    }    FT_TRACE4(( "  %d bitmaps, padding index %ld/n",                nbitmaps,                PCF_GLYPH_PAD_INDEX( format ) ));    FT_TRACE4(( "  bitmap size = %d/n", sizebitmaps ));    FT_UNUSED( sizebitmaps );       /* only used for debugging */    for ( i = 0; i < nbitmaps; i++ )      face->metrics[i].bits = stream->pos + offsets[i];    face->bitmapsFormat = format;    FT_FREE ( offsets );    return error;  Bail:    FT_FREE ( offsets );    FT_FREE ( bitmaps );    return error;  }
开发者ID:unidevop,项目名称:sjtu-project-pipe,代码行数:92,


示例10: FT_Face_CheckTrueTypePatents

  FT_Face_CheckTrueTypePatents( FT_Face  face )  {    FT_UNUSED( face );    return FALSE;  }
开发者ID:GWRon,项目名称:pub.mod-NG,代码行数:6,


示例11: T1_Driver_Done

 T1_Driver_Done( FT_Module  driver ) {   FT_UNUSED( driver ); }
开发者ID:1vanK,项目名称:Urho3D,代码行数:4,


示例12: T1_Driver_Init

  T1_Driver_Init( FT_Module  driver )  {    FT_UNUSED( driver );    return FT_Err_Ok;  }
开发者ID:1vanK,项目名称:Urho3D,代码行数:6,


示例13: T1_Face_Init

  T1_Face_Init( FT_Stream      stream,                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;    T1_Font             type1 = &face->type1;    PS_FontInfo         info = &type1->font_info;    FT_UNUSED( num_params );    FT_UNUSED( params );    FT_UNUSED( stream );    face->root.num_faces = 1;    FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_CMAPS );    face->psnames = psnames;    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 = FT_THROW( 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 )      goto Exit;    /* if we just wanted to check the format, leave successfully now */    if ( face_index < 0 )      goto Exit;    /* check the face index */    if ( ( face_index & 0xFFFF ) > 0 )    {      FT_ERROR(( "T1_Face_Init: invalid face index/n" ));      error = FT_THROW( Invalid_Argument );      goto Exit;    }    /* now load the font program into the face object */    /* initialize the face object fields */    /* set up root face fields */    {      FT_Face  root = (FT_Face)&face->root;      root->num_glyphs = type1->num_glyphs;      root->face_index = 0;      root->face_flags |= FT_FACE_FLAG_SCALABLE    |                          FT_FACE_FLAG_HORIZONTAL  |                          FT_FACE_FLAG_GLYPH_NAMES |                          FT_FACE_FLAG_HINTER;      if ( info->is_fixed_pitch )        root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;      if ( face->blend )        root->face_flags |= FT_FACE_FLAG_MULTIPLE_MASTERS;      /* The following code to extract the family and the style is very   */      /* simplistic and might get some things wrong.  For a full-featured */      /* algorithm you might have a look at the whitepaper given at       */      /*                                                                  */      /*   http://blogs.msdn.com/text/archive/2007/04/23/wpf-font-selection-model.aspx */      /* get style name -- be careful, some broken fonts only */      /* have a `/FontName' dictionary entry!                 */      root->family_name = info->family_name;      root->style_name  = NULL;      if ( root->family_name )      {        char*  full   = info->full_name;        char*  family = root->family_name;        if ( full )        {          FT_Bool  the_same = TRUE;//.........这里部分代码省略.........
开发者ID:1vanK,项目名称:Urho3D,代码行数:101,


示例14: cid_driver_done

 cid_driver_done( FT_Module  driver ) {   FT_UNUSED( driver ); }
开发者ID:allanw1,项目名称:Arianrhod,代码行数:4,


示例15: CFF_Driver_Init

  CFF_Driver_Init( CFF_Driver  driver )  {    FT_UNUSED( driver );    return CFF_Err_Ok;  }
开发者ID:SOLARIC,项目名称:world-opponent-network,代码行数:6,


示例16: cff_driver_init

  cff_driver_init( FT_Module  module )  {    FT_UNUSED( module );    return CFF_Err_Ok;  }
开发者ID:howardgao-mt,项目名称:myd3dlib,代码行数:6,


示例17: CFF_Driver_Done

 CFF_Driver_Done( CFF_Driver  driver ) {   FT_UNUSED( driver ); }
开发者ID:SOLARIC,项目名称:world-opponent-network,代码行数:4,


示例18: sfnt_load_face

  sfnt_load_face( FT_Stream      stream,                  TT_Face        face,                  FT_Int         face_index,                  FT_Int         num_params,                  FT_Parameter*  params )  {    FT_Error      error;#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES    FT_Error      psnames_error;#endif    FT_Bool       has_outline;    FT_Bool       is_apple_sbit;    FT_Bool       ignore_preferred_family    = FALSE;    FT_Bool       ignore_preferred_subfamily = FALSE;    SFNT_Service  sfnt = (SFNT_Service)face->sfnt;    FT_UNUSED( face_index );    /* Check parameters */    {      FT_Int  i;      for ( i = 0; i < num_params; i++ )      {        if ( params[i].tag == FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY )          ignore_preferred_family = TRUE;        else if ( params[i].tag == FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY )          ignore_preferred_subfamily = TRUE;      }    }    /* Load tables */    /* We now support two SFNT-based bitmapped font formats.  They */    /* are recognized easily as they do not include a `glyf'       */    /* table.                                                      */    /*                                                             */    /* The first format comes from Apple, and uses a table named   */    /* `bhed' instead of `head' to store the font header (using    */    /* the same format).  It also doesn't include horizontal and   */    /* vertical metrics tables (i.e. `hhea' and `vhea' tables are  */    /* missing).                                                   */    /*                                                             */    /* The other format comes from Microsoft, and is used with     */    /* WinCE/PocketPC.  It looks like a standard TTF, except that  */    /* it doesn't contain outlines.                                */    /*                                                             */    FT_TRACE2(( "sfnt_load_face: %08p/n/n", face ));    /* do we have outlines in there? */#ifdef FT_CONFIG_OPTION_INCREMENTAL    has_outline = FT_BOOL( face->root.internal->incremental_interface != 0 ||                           tt_face_lookup_table( face, TTAG_glyf )    != 0 ||                           tt_face_lookup_table( face, TTAG_CFF )     != 0 );#else    has_outline = FT_BOOL( tt_face_lookup_table( face, TTAG_glyf ) != 0 ||                           tt_face_lookup_table( face, TTAG_CFF )  != 0 );#endif    is_apple_sbit = 0;    /* if this font doesn't contain outlines, we try to load */    /* a `bhed' table                                        */    if ( !has_outline && sfnt->load_bhed )    {      LOAD_( bhed );      is_apple_sbit = FT_BOOL( !error );    }    /* load the font header (`head' table) if this isn't an Apple */    /* sbit font file                                             */    if ( !is_apple_sbit )    {      LOAD_( head );      if ( error )        goto Exit;    }    if ( face->header.Units_Per_EM == 0 )    {      error = FT_THROW( Invalid_Table );      goto Exit;    }    /* the following tables are often not present in embedded TrueType */    /* fonts within PDF documents, so don't check for them.            */    LOAD_( maxp );    LOAD_( cmap );    /* the following tables are optional in PCL fonts -- */    /* don't check for errors                            */    LOAD_( name );    LOAD_( post );//.........这里部分代码省略.........
开发者ID:kobolabs,项目名称:qt-everywhere-4.8.0,代码行数:101,


示例19: cff_driver_done

 cff_driver_done( FT_Module  module )        /* CFF_Driver */ {   FT_UNUSED( module ); }
开发者ID:structuresound,项目名称:freetype,代码行数:4,


示例20: T1_Driver_Init

  T1_Driver_Init( T1_Driver  driver )  {    FT_UNUSED( driver );    return T1_Err_Ok;  }
开发者ID:gbarrand,项目名称:ArcheryTune,代码行数:6,


示例21: tt_face_get_kerning

tt_face_get_kerning( TT_Face  face,                     FT_UInt  left_glyph,                     FT_UInt  right_glyph ){    FT_Int    result = 0;    FT_UInt   count, mask = 1;    FT_Byte*  p       = face->kern_table;    FT_Byte*  p_limit = p + face->kern_table_size;    p   += 4;    mask = 0x0001;    for ( count = face->num_kern_tables;            count > 0 && p + 6 <= p_limit;            count--, mask <<= 1 )    {        FT_Byte* base     = p;        FT_Byte* next     = base;        FT_UInt  version  = FT_NEXT_USHORT( p );        FT_UInt  length   = FT_NEXT_USHORT( p );        FT_UInt  coverage = FT_NEXT_USHORT( p );        FT_UInt  num_pairs;        FT_Int   value    = 0;        FT_UNUSED( version );        next = base + length;        if ( next > p_limit )  /* handle broken table */            next = p_limit;        if ( ( face->kern_avail_bits & mask ) == 0 )            goto NextTable;        if ( p + 8 > next )            goto NextTable;        num_pairs = FT_NEXT_USHORT( p );        p        += 6;        if ( ( next - p ) / 6 < ( int )num_pairs )  /* handle broken count  */            num_pairs = ( FT_UInt )( ( next - p ) / 6 );        switch ( coverage >> 8 )        {        case 0:        {            FT_ULong  key0 = TT_KERN_INDEX( left_glyph, right_glyph );            if ( face->kern_order_bits & mask )   /* binary search */            {                FT_UInt   min = 0;                FT_UInt   max = num_pairs;                while ( min < max )                {                    FT_UInt   mid = ( min + max ) >> 1;                    FT_Byte*  q   = p + 6 * mid;                    FT_ULong  key;                    key = FT_NEXT_ULONG( q );                    if ( key == key0 )                    {                        value = FT_PEEK_SHORT( q );                        goto Found;                    }                    if ( key < key0 )                        min = mid + 1;                    else                        max = mid;                }            }            else /* linear search */            {                FT_UInt  count2;                for ( count2 = num_pairs; count2 > 0; count2-- )                {                    FT_ULong  key = FT_NEXT_ULONG( p );                    if ( key == key0 )                    {                        value = FT_PEEK_SHORT( p );                        goto Found;                    }                    p += 2;                }            }        }        break;        /*//.........这里部分代码省略.........
开发者ID:andreparker,项目名称:spiralengine,代码行数:101,


示例22: tt_driver_done

 tt_driver_done( FT_Module  ttdriver )     /* TT_Driver */ {   FT_UNUSED( ttdriver ); }
开发者ID:CCExtractor,项目名称:ccextractor,代码行数:4,


示例23: sfnt_get_ps_name

  static const char*  sfnt_get_ps_name( TT_Face  face )  {    FT_Int       n, found_win, found_apple;    const char*  result = NULL;    /* shouldn't happen, but just in case to avoid memory leaks */    if ( face->postscript_name )      return face->postscript_name;    /* scan the name table to see whether we have a Postscript name here, */    /* either in Macintosh or Windows platform encodings                  */    found_win   = -1;    found_apple = -1;    for ( n = 0; n < face->num_names; n++ )    {      TT_NameEntryRec*  name = face->name_table.names + n;      if ( name->nameID == 6 && name->stringLength > 0 )      {        if ( name->platformID == 3     &&             name->encodingID == 1     &&             name->languageID == 0x409 )          found_win = n;        if ( name->platformID == 1 &&             name->encodingID == 0 &&             name->languageID == 0 )          found_apple = n;      }    }    if ( found_win != -1 )    {      FT_Memory         memory = face->root.memory;      TT_NameEntryRec*  name   = face->name_table.names + found_win;      FT_UInt           len    = name->stringLength / 2;      FT_Error          error  = FT_Err_Ok;      FT_UNUSED( error );      if ( !FT_ALLOC( result, name->stringLength + 1 ) )      {        FT_Stream   stream = face->name_table.stream;        FT_String*  r      = (FT_String*)result;        FT_Char*    p;        if ( FT_STREAM_SEEK( name->stringOffset ) ||             FT_FRAME_ENTER( name->stringLength ) )        {          FT_FREE( result );          name->stringLength = 0;          name->stringOffset = 0;          FT_FREE( name->string );          goto Exit;        }        p = (FT_Char*)stream->cursor;        for ( ; len > 0; len--, p += 2 )        {          if ( p[0] == 0 && p[1] >= 32 )            *r++ = p[1];        }        *r = '/0';        FT_FRAME_EXIT();      }      goto Exit;    }    if ( found_apple != -1 )    {      FT_Memory         memory = face->root.memory;      TT_NameEntryRec*  name   = face->name_table.names + found_apple;      FT_UInt           len    = name->stringLength;      FT_Error          error  = FT_Err_Ok;      FT_UNUSED( error );      if ( !FT_ALLOC( result, len + 1 ) )      {        FT_Stream  stream = face->name_table.stream;        if ( FT_STREAM_SEEK( name->stringOffset ) ||             FT_STREAM_READ( result, len )        )        {          name->stringOffset = 0;          name->stringLength = 0;          FT_FREE( name->string );          FT_FREE( result );          goto Exit;//.........这里部分代码省略.........
开发者ID:structuresound,项目名称:freetype,代码行数:101,


示例24: FNT_Load_Glyph

static FT_ErrorFNT_Load_Glyph( FT_GlyphSlot  slot,                FT_Size       size,                FT_UInt       glyph_index,                FT_Int32      load_flags ){    FNT_Face    face   = (FNT_Face)FT_SIZE_FACE( size );    FNT_Font    font   = face->font;    FT_Error    error  = FNT_Err_Ok;    FT_Byte*    p;    FT_Int      len;    FT_Bitmap*  bitmap = &slot->bitmap;    FT_ULong    offset;    FT_Bool     new_format;    FT_UNUSED( load_flags );    if ( !face || !font )    {        error = FNT_Err_Invalid_Argument;        goto Exit;    }    if ( glyph_index > 0 )        glyph_index--;                           /* revert to real index */    else        glyph_index = font->header.default_char; /* the .notdef glyph */    new_format = FT_BOOL( font->header.version == 0x300 );    len        = new_format ? 6 : 4;    /* jump to glyph entry */    p = font->fnt_frame + ( new_format ? 146 : 118 ) + len * glyph_index;    bitmap->width = FT_NEXT_SHORT_LE( p );    if ( new_format )        offset = FT_NEXT_ULONG_LE( p );    else        offset = FT_NEXT_USHORT_LE( p );    /* jump to glyph data */    p = font->fnt_frame + /* font->header.bits_offset */ + offset;    /* allocate and build bitmap */    {        FT_Memory  memory = FT_FACE_MEMORY( slot->face );        FT_Int     pitch  = ( bitmap->width + 7 ) >> 3;        FT_Byte*   column;        FT_Byte*   write;        bitmap->pitch      = pitch;        bitmap->rows       = font->header.pixel_height;        bitmap->pixel_mode = FT_PIXEL_MODE_MONO;        /* note: since glyphs are stored in columns and not in rows we */        /*       can't use ft_glyphslot_set_bitmap                     */        if ( FT_ALLOC( bitmap->buffer, pitch * bitmap->rows ) )            goto Exit;        column = (FT_Byte*)bitmap->buffer;        for ( ; pitch > 0; pitch--, column++ )        {            FT_Byte*  limit = p + bitmap->rows;            for ( write = column; p < limit; p++, write += bitmap->pitch )                *write = *p;        }    }    slot->internal->flags = FT_GLYPH_OWN_BITMAP;    slot->bitmap_left     = 0;    slot->bitmap_top      = font->header.ascent;    slot->format          = FT_GLYPH_FORMAT_BITMAP;    /* now set up metrics */    slot->metrics.horiAdvance  = bitmap->width << 6;    slot->metrics.horiBearingX = 0;    slot->metrics.horiBearingY = slot->bitmap_top << 6;    slot->linearHoriAdvance    = (FT_Fixed)bitmap->width << 16;    slot->format               = FT_GLYPH_FORMAT_BITMAP;Exit:    return error;}
开发者ID:1tgr,项目名称:mobius,代码行数:90,


示例25: cid_face_init

  cid_face_init( FT_Stream      stream,                 FT_Face        cidface,        /* CID_Face */                 FT_Int         face_index,                 FT_Int         num_params,                 FT_Parameter*  params )  {    CID_Face          face = (CID_Face)cidface;    FT_Error          error;    PSAux_Service     psaux;    PSHinter_Service  pshinter;    FT_UNUSED( num_params );    FT_UNUSED( params );    FT_UNUSED( stream );    cidface->num_faces = 1;    psaux = (PSAux_Service)face->psaux;    if ( !psaux )    {      psaux = (PSAux_Service)FT_Get_Module_Interface(                FT_FACE_LIBRARY( face ), "psaux" );      face->psaux = psaux;    }    pshinter = (PSHinter_Service)face->pshinter;    if ( !pshinter )    {      pshinter = (PSHinter_Service)FT_Get_Module_Interface(                   FT_FACE_LIBRARY( face ), "pshinter" );      face->pshinter = pshinter;    }    /* open the tokenizer; this will also check the font format */    if ( FT_STREAM_SEEK( 0 ) )      goto Exit;    error = cid_face_open( face, face_index );    if ( error )      goto Exit;    /* if we just wanted to check the format, leave successfully now */    if ( face_index < 0 )      goto Exit;    /* check the face index */    if ( face_index != 0 )    {      FT_ERROR(( "cid_face_init: invalid face index/n" ));      error = CID_Err_Invalid_Argument;      goto Exit;    }    /* now load the font program into the face object */    /* initialize the face object fields */    /* set up root face fields */    {      CID_FaceInfo  cid  = &face->cid;      PS_FontInfo   info = &cid->font_info;      cidface->num_glyphs   = cid->cid_count;      cidface->num_charmaps = 0;      cidface->face_index = face_index;      cidface->face_flags = FT_FACE_FLAG_SCALABLE;      cidface->face_flags |= FT_FACE_FLAG_HORIZONTAL;      if ( info->is_fixed_pitch )        cidface->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;      /* XXX: TODO: add kerning with .afm support */      /* get style name -- be careful, some broken fonts only */      /* have a /FontName dictionary entry!                   */      cidface->family_name = info->family_name;      /* assume "Regular" style if we don't know better */      cidface->style_name = (char *)"Regular";      if ( cidface->family_name )      {        char*  full   = info->full_name;        char*  family = cidface->family_name;        if ( full )        {          while ( *full )          {            if ( *full == *family )            {              family++;              full++;            }            else//.........这里部分代码省略.........
开发者ID:allanw1,项目名称:Arianrhod,代码行数:101,


示例26: cid_driver_init

  cid_driver_init( FT_Module  driver )  {    FT_UNUSED( driver );    return CID_Err_Ok;  }
开发者ID:allanw1,项目名称:Arianrhod,代码行数:6,


示例27: t1_decoder_parse_charstrings

//.........这里部分代码省略.........          /* close hints recording session */          if ( hinter )          {            if (hinter->close( hinter->hints, builder->current->n_points ))              goto Syntax_Error;            /* apply hints to the loaded glyph outline now */            hinter->apply( hinter->hints,                           builder->current,                           (PSH_Globals) builder->hints_globals,                           decoder->hint_mode );          }          /* add current outline to the glyph slot */          FT_GlyphLoader_Add( builder->loader );          /* return now! */          FT_TRACE4(( "/n/n" ));          return PSaux_Err_Ok;        case op_hsbw:          FT_TRACE4(( " hsbw" ));          builder->parse_state = T1_Parse_Have_Width;          builder->left_bearing.x += top[0];          builder->advance.x       = top[1];          builder->advance.y       = 0;          orig_x = builder->last.x = x = builder->pos_x + top[0];          orig_y = builder->last.y = y = builder->pos_y;          FT_UNUSED( orig_y );          /* the `metrics_only' indicates that we only want to compute */          /* the glyph's metrics (lsb + advance width), not load the   */          /* rest of it; so exit immediately                           */          if ( builder->metrics_only )            return PSaux_Err_Ok;          break;        case op_seac:          /* return immediately after the processing */          return t1operator_seac( decoder, top[0], top[1], top[2],                                           (FT_Int)top[3], (FT_Int)top[4] );        case op_sbw:          FT_TRACE4(( " sbw" ));          builder->parse_state = T1_Parse_Have_Width;          builder->left_bearing.x += top[0];          builder->left_bearing.y += top[1];          builder->advance.x       = top[2];          builder->advance.y       = top[3];          builder->last.x = x = builder->pos_x + top[0];          builder->last.y = y = builder->pos_y + top[1];          /* the `metrics_only' indicates that we only want to compute */          /* the glyph's metrics (lsb + advance width), not load the   */          /* rest of it; so exit immediately                           */          if ( builder->metrics_only )            return PSaux_Err_Ok;
开发者ID:unidevop,项目名称:sjtu-project-pipe,代码行数:67,


示例28: T42_Driver_Done

 T42_Driver_Done( FT_Module  module ) {   FT_UNUSED( module ); }
开发者ID:1nt3g3r,项目名称:libgdx,代码行数:4,



注:本文中的FT_UNUSED函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ FT_ZERO函数代码示例
C++ FT_TRACE4函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。