當前位置: 首頁>>代碼示例>>C++>>正文


C++ FT_Done_Size函數代碼示例

本文整理匯總了C++中FT_Done_Size函數的典型用法代碼示例。如果您正苦於以下問題:C++ FT_Done_Size函數的具體用法?C++ FT_Done_Size怎麽用?C++ FT_Done_Size使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了FT_Done_Size函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: ftc_size_node_flush

  ftc_size_node_flush( FTC_SizeNode   node,
                       FTC_SizeQuery  query )
  {
    FT_Size   size = node->size;
    FT_Error  error;


    if ( size->face == query->face )
    {
      FT_Activate_Size( size );
      error = FT_Set_Pixel_Sizes( query->face, query->width, query->height );
      if ( error )
      {
        FT_Done_Size( size );
        node->size = NULL;
      }
    }
    else
    {
      FT_Done_Size( size );
      node->size = NULL;

      error = ftc_size_node_init( node, query );
    }
    return error;
  }
開發者ID:8l,項目名稱:inferno,代碼行數:26,代碼來源:ftcmanag.c

示例2: ftc_face_node_init

  ftc_face_node_init( FTC_MruNode  ftcnode,
                      FT_Pointer   ftcface_id,
                      FT_Pointer   ftcmanager )
  {
    FTC_FaceNode  node    = (FTC_FaceNode)ftcnode;
    FTC_FaceID    face_id = (FTC_FaceID)ftcface_id;
    FTC_Manager   manager = (FTC_Manager)ftcmanager;
    FT_Error      error;


    node->face_id = face_id;

    error = manager->request_face( face_id,
                                   manager->library,
                                   manager->request_data,
                                   &node->face );
    if ( !error )
    {
      /* destroy initial size object; it will be re-created later */
      if ( node->face->size )
        FT_Done_Size( node->face->size );
    }

    return error;
  }
開發者ID:AbdelghaniDr,項目名稱:mirror,代碼行數:25,代碼來源:ftcmanag.c

示例3: ftc_scaler_lookup_size

  static FT_Error
  ftc_scaler_lookup_size( FTC_Manager  manager,
                          FTC_Scaler   scaler,
                          FT_Size     *asize )
  {
    FT_Face   face;
    FT_Size   size = NULL;
    FT_Error  error;


    error = FTC_Manager_LookupFace( manager, scaler->face_id, &face );
    if ( error )
      goto Exit;

    error = FT_New_Size( face, &size );
    if ( error )
      goto Exit;

    FT_Activate_Size( size );

    if ( scaler->pixel )
      error = FT_Set_Pixel_Sizes( face, scaler->width, scaler->height );
    else
      error = FT_Set_Char_Size( face, scaler->width, scaler->height,
                                scaler->x_res, scaler->y_res );
    if ( error )
    {
      FT_Done_Size( size );
      size = NULL;
    }

  Exit:
    *asize = size;
    return error;
  }
開發者ID:AbdelghaniDr,項目名稱:mirror,代碼行數:35,代碼來源:ftcmanag.c

示例4: ftc_size_node_done

 ftc_size_node_done( FTC_SizeNode  node )
 {
   if ( node->size )
   {
     FT_Done_Size( node->size );
     node->size = NULL;
   }
 }
開發者ID:8l,項目名稱:inferno,代碼行數:8,代碼來源:ftcmanag.c

示例5: FT_Done_Size

Font::~Font() {
	
	if(m_size) {
		FT_Done_Size(m_size);
	}
	
	delete m_textures;
	
}
開發者ID:nikos-maximus,項目名稱:ArxLibertatis,代碼行數:9,代碼來源:Font.cpp

示例6: ftc_size_node_done

  ftc_size_node_done( FTC_MruNode  ftcnode,
                      FT_Pointer   data )
  {
    FTC_SizeNode  node = (FTC_SizeNode)ftcnode;
    FT_Size       size = node->size;
    FT_UNUSED( data );


    if ( size )
      FT_Done_Size( size );
  }
開發者ID:AbdelghaniDr,項目名稱:mirror,代碼行數:11,代碼來源:ftcmanag.c

示例7: FT_Done_Size

/*
 * Class:     sage_FreetypeFont
 * Method:    closeFontFace0
 * Signature: (J)Z
 */
JNIEXPORT jboolean JNICALL Java_sage_FreetypeFont_closeFontFace0
  (JNIEnv *env, jobject jo, jlong fontPtr)
{
	FTDataStruct* fontData = (FTDataStruct*)(intptr_t) fontPtr;
	// NOTE: WE CAN ONLY CLOSE THE SIZE SINCE OTHERS MIGHT STILL BE USING THE FACE!!!!
	// THIS LEAKS MEMORY IF YOU THINK IT'LL CLOSE THE FONT FACE!!!!!
	// THIS LEAKS MEMORY IF YOU THINK IT'LL CLOSE THE FONT FACE!!!!!
	//FT_Face face = (FT_Face) facePtr;
	jboolean rv = FT_Done_Size(fontData->sizePtr) == 0;//FT_Done_Face(face) == 0;
	free(fontData);
	return rv;
}
開發者ID:BOTCrusher,項目名稱:sagetv,代碼行數:17,代碼來源:sage_FreetypeFont.c

示例8: glDeleteTextures

xd::font::~font()
{
	// free all textures
	for (auto i = m_glyph_map.begin(); i != m_glyph_map.end(); ++i) {
		glDeleteTextures(1, &i->second->texture_id);
	}
	// free font sizes
	for (auto i = m_face->sizes.begin(); i != m_face->sizes.end(); ++i) {
		FT_Done_Size(i->second);
	}
	// free the font handle
	FT_Done_Face(m_face->handle);
}
開發者ID:Greyze,項目名稱:xd,代碼行數:13,代碼來源:font.cpp

示例9: T42_Size_Done

  T42_Size_Done( T42_Size  size )
  {
    FT_Face      face    = size->root.face;
    T42_Face     t42face = (T42_Face)face;
    FT_ListNode  node;


    node = FT_List_Find( &t42face->ttf_face->sizes_list, size->ttsize );
    if ( node )
    {
      FT_Done_Size( size->ttsize );
      size->ttsize = NULL;
    }
  }
開發者ID:0uyangsheng,項目名稱:xbmc,代碼行數:14,代碼來源:t42objs.c

示例10: FT_Done_Size

SkScalerContext_FreeType::~SkScalerContext_FreeType() {
    if (fFTSize != NULL) {
        FT_Done_Size(fFTSize);
    }

    SkAutoMutexAcquire  ac(gFTMutex);

    if (fFace != NULL) {
        unref_ft_face(fFace);
    }
    if (--gFTCount == 0) {
//        SkDEBUGF(("FT_Done_FreeType\n"));
        FT_Done_FreeType(gFTLibrary);
        SkDEBUGCODE(gFTLibrary = NULL;)
    }
開發者ID:avary,項目名稱:skia,代碼行數:15,代碼來源:SkFontHost_FreeType.cpp

示例11: ftc_size_node_reset

  ftc_size_node_reset( FTC_MruNode  ftcnode,
                       FT_Pointer   ftcscaler,
                       FT_Pointer   ftcmanager )
  {
    FTC_SizeNode  node    = (FTC_SizeNode)ftcnode;
    FTC_Scaler    scaler  = (FTC_Scaler)ftcscaler;
    FTC_Manager   manager = (FTC_Manager)ftcmanager;


    FT_Done_Size( node->size );

    node->scaler = scaler[0];

    return ftc_scaler_lookup_size( manager, scaler, &node->size );
  }
開發者ID:AbdelghaniDr,項目名稱:mirror,代碼行數:15,代碼來源:ftcmanag.c

示例12: T42_Size_Done

  T42_Size_Done( FT_Size  t42size )             /* T42_Size */
  {
    T42_Size     size    = (T42_Size)t42size;
    FT_Face      face    = t42size->face;
    T42_Face     t42face = (T42_Face)face;
    FT_ListNode  node;


    node = FT_List_Find( &t42face->ttf_face->sizes_list, size->ttsize );
    if ( node )
    {
      FT_Done_Size( size->ttsize );
      size->ttsize = NULL;
    }
  }
開發者ID:03050903,項目名稱:libgdx,代碼行數:15,代碼來源:t42objs.hpp

示例13: ftc_size_node_init

  ftc_size_node_init( FTC_SizeNode   node,
                      FTC_SizeQuery  query )
  {
    FT_Face   face = query->face;
    FT_Size   size;
    FT_Error  error;


    node->size = NULL;
    error = FT_New_Size( face, &size );
    if ( !error )
    {
      FT_Activate_Size( size );
      error = FT_Set_Pixel_Sizes( query->face,
                                  query->width,
                                  query->height );
      if ( error )
        FT_Done_Size( size );
      else
        node->size = size;
    }
    return error;
  }
開發者ID:8l,項目名稱:inferno,代碼行數:23,代碼來源:ftcmanag.c

示例14: T42_Face_Init


//.........這裏部分代碼省略.........
          family++;
          full++;
        }

        root->style_name = ( *full == ' ' ? full + 1
                                          : (char *)"Regular" );
      }
      else
        root->style_name = (char *)"Regular";
    }
    else
    {
      /* do we have a `/FontName'? */
      if ( face->type1.font_name )
      {
        root->family_name = face->type1.font_name;
        root->style_name  = (char *)"Regular";
      }
    }

    /* no embedded bitmap support */
    root->num_fixed_sizes = 0;
    root->available_sizes = 0;

    /* Load the TTF font embedded in the T42 font */
    error = FT_New_Memory_Face( FT_FACE_LIBRARY( face ),
                                face->ttf_data,
                                face->ttf_size,
                                0,
                                &face->ttf_face );
    if ( error )
      goto Exit;

    FT_Done_Size( face->ttf_face->size );

    /* Ignore info in FontInfo dictionary and use the info from the  */
    /* loaded TTF font.  The PostScript interpreter also ignores it. */
    root->bbox         = face->ttf_face->bbox;
    root->units_per_EM = face->ttf_face->units_per_EM;

    root->ascender  = face->ttf_face->ascender;
    root->descender = face->ttf_face->descender;
    root->height    = face->ttf_face->height;

    root->max_advance_width  = face->ttf_face->max_advance_width;
    root->max_advance_height = face->ttf_face->max_advance_height;

    root->underline_position  = face->type1.font_info.underline_position;
    root->underline_thickness = face->type1.font_info.underline_thickness;

    root->internal->max_points   = 0;
    root->internal->max_contours = 0;

    /* compute style flags */
    root->style_flags = 0;
    if ( face->type1.font_info.italic_angle )
      root->style_flags |= FT_STYLE_FLAG_ITALIC;

    if ( face->ttf_face->style_flags & FT_STYLE_FLAG_BOLD )
      root->style_flags |= FT_STYLE_FLAG_BOLD;

    if ( face->ttf_face->face_flags & FT_FACE_FLAG_VERTICAL )
      root->face_flags |= FT_FACE_FLAG_VERTICAL;

#ifdef FT_CONFIG_OPTION_USE_CMAPS
開發者ID:dikerex,項目名稱:theqvd,代碼行數:66,代碼來源:t42objs.c

示例15: T42_Face_Init


//.........這裏部分代碼省略.........
    {
      /* do we have a `/FontName'? */
      if ( type1->font_name )
        root->family_name = type1->font_name;
    }

    /* no embedded bitmap support */
    root->num_fixed_sizes = 0;
    root->available_sizes = 0;

    /* Load the TTF font embedded in the T42 font */
    {
      FT_Open_Args  args;


      args.flags       = FT_OPEN_MEMORY;
      args.memory_base = face->ttf_data;
      args.memory_size = face->ttf_size;

      if ( num_params )
      {
        args.flags     |= FT_OPEN_PARAMS;
        args.num_params = num_params;
        args.params     = params;
      }

      error = FT_Open_Face( FT_FACE_LIBRARY( face ),
                            &args, 0, &face->ttf_face );
    }

    if ( error )
      goto Exit;

    FT_Done_Size( face->ttf_face->size );

    /* Ignore info in FontInfo dictionary and use the info from the  */
    /* loaded TTF font.  The PostScript interpreter also ignores it. */
    root->bbox         = face->ttf_face->bbox;
    root->units_per_EM = face->ttf_face->units_per_EM;

    root->ascender  = face->ttf_face->ascender;
    root->descender = face->ttf_face->descender;
    root->height    = face->ttf_face->height;

    root->max_advance_width  = face->ttf_face->max_advance_width;
    root->max_advance_height = face->ttf_face->max_advance_height;

    root->underline_position  = (FT_Short)info->underline_position;
    root->underline_thickness = (FT_Short)info->underline_thickness;

    /* compute style flags */
    root->style_flags = 0;
    if ( info->italic_angle )
      root->style_flags |= FT_STYLE_FLAG_ITALIC;

    if ( face->ttf_face->style_flags & FT_STYLE_FLAG_BOLD )
      root->style_flags |= FT_STYLE_FLAG_BOLD;

    if ( face->ttf_face->face_flags & FT_FACE_FLAG_VERTICAL )
      root->face_flags |= FT_FACE_FLAG_VERTICAL;

    {
      if ( psnames && psaux )
      {
        FT_CharMapRec    charmap;
        T1_CMap_Classes  cmap_classes = psaux->t1_cmap_classes;
開發者ID:0uyangsheng,項目名稱:xbmc,代碼行數:67,代碼來源:t42objs.c


注:本文中的FT_Done_Size函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。