亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? ftmac.c

?? QT 開(kāi)發(fā)環(huán)境里面一個(gè)很重要的文件
?? C
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
/***************************************************************************//*                                                                         *//*  ftmac.c                                                                *//*                                                                         *//*    Mac FOND support.  Written by just@letterror.com.                    *//*  Heavily Fixed by mpsuzuki, George Williams and Sean McBride            *//*                                                                         *//*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by                   *//*  Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg.     *//*                                                                         *//*  This file is part of the FreeType project, and may only be used,       *//*  modified, and distributed under the terms of the FreeType project      *//*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     *//*  this file you indicate that you have read the license and              *//*  understand and accept it fully.                                        *//*                                                                         *//***************************************************************************/  /*    Notes    Mac suitcase files can (and often do!) contain multiple fonts.  To    support this I use the face_index argument of FT_(Open|New)_Face()    functions, and pretend the suitcase file is a collection.    Warning: fbit and NFNT bitmap resources are not supported yet.  In old    sfnt fonts, bitmap glyph data for each size is stored in each `NFNT'    resources instead of the `bdat' table in the sfnt resource.  Therefore,    face->num_fixed_sizes is set to 0, because bitmap data in `NFNT'    resource is unavailable at present.    The Mac FOND support works roughly like this:    - Check whether the offered stream points to a Mac suitcase file.  This      is done by checking the file type: it has to be 'FFIL' or 'tfil'.  The      stream that gets passed to our init_face() routine is a stdio stream,      which isn't usable for us, since the FOND resources live in the      resource fork.  So we just grab the stream->pathname field.    - Read the FOND resource into memory, then check whether there is a      TrueType font and/or(!) a Type 1 font available.    - If there is a Type 1 font available (as a separate `LWFN' file), read      its data into memory, massage it slightly so it becomes PFB data, wrap      it into a memory stream, load the Type 1 driver and delegate the rest      of the work to it by calling FT_Open_Face().  (XXX TODO: after this      has been done, the kerning data from the FOND resource should be      appended to the face: On the Mac there are usually no AFM files      available.  However, this is tricky since we need to map Mac char      codes to ps glyph names to glyph ID's...)    - If there is a TrueType font (an `sfnt' resource), read it into memory,      wrap it into a memory stream, load the TrueType driver and delegate      the rest of the work to it, by calling FT_Open_Face().  */#include <ft2build.h>#include FT_FREETYPE_H#include FT_INTERNAL_STREAM_H#if defined( __GNUC__ ) || defined( __IBMC__ )  /* This is for Mac OS X.  Without redefinition, OS_INLINE */  /* expands to `static inline' which doesn't survive the   */  /* -ansi compilation flag of GCC.                         */#define OS_INLINE   static __inline__#include <Carbon/Carbon.h>#else#include <Resources.h>#include <Fonts.h>#include <Errors.h>#include <Files.h>#include <TextUtils.h>#endif#if defined( __MWERKS__ ) && !TARGET_RT_MAC_MACHO#include <FSp_fopen.h>#endif#include FT_MAC_H  /* FSSpec functions are deprecated since Mac OS X 10.4 */#ifndef HAVE_FSSPEC#if TARGET_API_MAC_OS8 || TARGET_API_MAC_CARBON#define HAVE_FSSPEC  1#else#define HAVE_FSSPEC  0#endif#endif  /* most FSRef functions were introduced since Mac OS 9 */#ifndef HAVE_FSREF#if TARGET_API_MAC_OSX#define HAVE_FSREF  1#else#define HAVE_FSREF  0#endif#endif#ifndef HFS_MAXPATHLEN#define HFS_MAXPATHLEN  1024#endif  /* QuickDraw is deprecated since Mac OS X 10.4 */#ifndef HAVE_QUICKDRAW_CARBON#if TARGET_API_MAC_OS8 || TARGET_API_MAC_CARBON#define HAVE_QUICKDRAW_CARBON  1#else#define HAVE_QUICKDRAW_CARBON  0#endif#endif  /* AppleTypeService is available since Mac OS X */#ifndef HAVE_ATS#if TARGET_API_MAC_OSX#define HAVE_ATS  1#else#define HAVE_ATS  0#endif#endif  /* Set PREFER_LWFN to 1 if LWFN (Type 1) is preferred over     TrueType in case *both* are available (this is not common,     but it *is* possible). */#ifndef PREFER_LWFN#define PREFER_LWFN  1#endif#if !HAVE_QUICKDRAW_CARBON  /* QuickDraw is deprecated since Mac OS X 10.4 */  FT_EXPORT_DEF( FT_Error )  FT_GetFile_From_Mac_Name( const char*  fontName,                            FSSpec*      pathSpec,                            FT_Long*     face_index )  {    return FT_Err_Unimplemented_Feature;  }#else  FT_EXPORT_DEF( FT_Error )  FT_GetFile_From_Mac_Name( const char*  fontName,                            FSSpec*      pathSpec,                            FT_Long*     face_index )  {    OptionBits            options = kFMUseGlobalScopeOption;    FMFontFamilyIterator  famIter;    OSStatus              status = FMCreateFontFamilyIterator( NULL, NULL,                                                               options,                                                               &famIter );    FMFont                the_font = 0;    FMFontFamily          family   = 0;    *face_index = 0;    while ( status == 0 && !the_font )    {      status = FMGetNextFontFamily( &famIter, &family );      if ( status == 0 )      {        int                           stat2;        FMFontFamilyInstanceIterator  instIter;        Str255                        famNameStr;        char                          famName[256];        /* get the family name */        FMGetFontFamilyName( family, famNameStr );        CopyPascalStringToC( famNameStr, famName );        /* iterate through the styles */        FMCreateFontFamilyInstanceIterator( family, &instIter );        *face_index = 0;        stat2       = 0;        while ( stat2 == 0 && !the_font )        {          FMFontStyle  style;          FMFontSize   size;          FMFont       font;          stat2 = FMGetNextFontFamilyInstance( &instIter, &font,                                               &style, &size );          if ( stat2 == 0 && size == 0 )          {            char  fullName[256];            /* build up a complete face name */            ft_strcpy( fullName, famName );            if ( style & bold )              ft_strcat( fullName, " Bold" );            if ( style & italic )              ft_strcat( fullName, " Italic" );            /* compare with the name we are looking for */            if ( ft_strcmp( fullName, fontName ) == 0 )            {              /* found it! */              the_font = font;            }            else              ++(*face_index);          }        }        FMDisposeFontFamilyInstanceIterator( &instIter );      }    }    FMDisposeFontFamilyIterator( &famIter );    if ( the_font )    {      FMGetFontContainer( the_font, pathSpec );      return FT_Err_Ok;    }    else      return FT_Err_Unknown_File_Format;  }#endif /* HAVE_QUICKDRAW_CARBON */#if !HAVE_ATS  FT_EXPORT_DEF( FT_Error )  FT_GetFile_From_Mac_ATS_Name( const char*  fontName,                                FSSpec*      pathSpec,                                FT_Long*     face_index )  {    return FT_Err_Unimplemented_Feature;  }#else  FT_EXPORT_DEF( FT_Error )  FT_GetFile_From_Mac_ATS_Name( const char*  fontName,                                FSSpec*      pathSpec,                                FT_Long*     face_index )  {    CFStringRef  cf_fontName;    ATSFontRef   ats_font_id;    *face_index = 0;    cf_fontName = CFStringCreateWithCString( NULL, fontName,                                             kCFStringEncodingMacRoman );    ats_font_id = ATSFontFindFromName( cf_fontName,                                       kATSOptionFlagsUnRestrictedScope );    if ( ats_font_id == 0 || ats_font_id == 0xFFFFFFFFUL )      return FT_Err_Unknown_File_Format;    if ( 0 != ATSFontGetFileSpecification( ats_font_id, pathSpec ) )      return FT_Err_Unknown_File_Format;    /* face_index calculation by searching preceding fontIDs */    /* with same FSRef                                       */    {      int     i;      FSSpec  f;      for ( i = 1; i < ats_font_id; i++ )      {        if ( 0 != ATSFontGetFileSpecification( ats_font_id - i,                                               &f               ) ||             f.vRefNum != pathSpec->vRefNum                       ||             f.parID   != pathSpec->parID                         ||             f.name[0] != pathSpec->name[0]                       ||             0 != ft_strncmp( (char *)f.name + 1,                              (char *)pathSpec->name + 1,                              f.name[0]                           ) )          break;      }      *face_index = ( i - 1 );    }    return FT_Err_Ok;  }#endif /* HAVE_ATS */#if defined( __MWERKS__ ) && !TARGET_RT_MAC_MACHO#define STREAM_FILE( stream )  ( (FT_FILE*)stream->descriptor.pointer )  FT_CALLBACK_DEF( void )  ft_FSp_stream_close( FT_Stream  stream )  {    ft_fclose( STREAM_FILE( stream ) );    stream->descriptor.pointer = NULL;    stream->size               = 0;    stream->base               = 0;  }  FT_CALLBACK_DEF( unsigned long )  ft_FSp_stream_io( FT_Stream       stream,                    unsigned long   offset,                    unsigned char*  buffer,                    unsigned long   count )  {    FT_FILE*  file;    file = STREAM_FILE( stream );    ft_fseek( file, offset, SEEK_SET );    return (unsigned long)ft_fread( buffer, 1, count, file );  }#endif  /* __MWERKS__ && !TARGET_RT_MAC_MACHO */#if HAVE_FSSPEC && !HAVE_FSREF  static OSErr  FT_FSPathMakeSpec( const UInt8*  pathname,                     FSSpec*       spec_p,                     Boolean       isDirectory )  {    const char  *p, *q;    short       vRefNum;    long        dirID;    Str255      nodeName;    OSErr       err;    p = q = (const char *)pathname;    dirID   = 0;    vRefNum = 0;    while ( 1 )    {      q = p + FT_MIN( 255, ft_strlen( p ) );      if ( q == p )        return 0;      if ( 255 < ft_strlen( (char *)pathname ) )      {        while ( p < q && *q != ':' )          q--;      }      if ( p < q )        *(char *)nodeName = q - p;      else if ( ft_strlen( p ) < 256 )        *(char *)nodeName = ft_strlen( p );      else        return errFSNameTooLong;      ft_strncpy( (char *)nodeName + 1, (char *)p, *(char *)nodeName );      err = FSMakeFSSpec( vRefNum, dirID, nodeName, spec_p );      if ( err || '\0' == *q )        return err;      vRefNum = spec_p->vRefNum;      dirID   = spec_p->parID;      p = q;    }  }  static OSErr  FT_FSpMakePath( const FSSpec*  spec_p,                  UInt8*         path,                  UInt32         maxPathSize )  {    OSErr   err;    FSSpec  spec = *spec_p;    short   vRefNum;    long    dirID;    Str255  parDir_name;    FT_MEM_SET( path, 0, maxPathSize );    while ( 1 )    {      int             child_namelen = ft_strlen( (char *)path );      unsigned char   node_namelen  = spec.name[0];      unsigned char*  node_name     = spec.name + 1;      if ( node_namelen + child_namelen > maxPathSize )        return errFSNameTooLong;      FT_MEM_MOVE( path + node_namelen + 1, path, child_namelen );      FT_MEM_COPY( path, node_name, node_namelen );      if ( child_namelen > 0 )        path[node_namelen] = ':';      vRefNum        = spec.vRefNum;      dirID          = spec.parID;      parDir_name[0] = '\0';      err = FSMakeFSSpec( vRefNum, dirID, parDir_name, &spec );      if ( noErr != err || dirID == spec.parID )        break;    }    return noErr;  }#endif /* HAVE_FSSPEC && !HAVE_FSREF */  static OSErr  FT_FSPathMakeRes( const UInt8*  pathname,                    short*        res )  {#if HAVE_FSREF    OSErr  err;    FSRef  ref;    if ( noErr != FSPathMakeRef( pathname, &ref, FALSE ) )      return FT_Err_Cannot_Open_Resource;    /* at present, no support for dfont format */    err = FSOpenResourceFile( &ref, 0, NULL, fsRdPerm, res );    if ( noErr == err )      return err;    /* fallback to original resource-fork font */    *res = FSOpenResFile( &ref, fsRdPerm );    err  = ResError();#else    OSErr   err;    FSSpec  spec;    if ( noErr != FT_FSPathMakeSpec( pathname, &spec, FALSE ) )      return FT_Err_Cannot_Open_Resource;    /* at present, no support for dfont format without FSRef */    /* (see above), try original resource-fork font          */    *res = FSpOpenResFile( &spec, fsRdPerm );    err  = ResError();#endif /* HAVE_FSREF */    return err;  }  /* Return the file type for given pathname */  static OSType  get_file_type_from_path( const UInt8*  pathname )  {#if HAVE_FSREF    FSRef          ref;    FSCatalogInfo  info;    if ( noErr != FSPathMakeRef( pathname, &ref, FALSE ) )      return ( OSType ) 0;    if ( noErr != FSGetCatalogInfo( &ref, kFSCatInfoFinderInfo, &info,                                    NULL, NULL, NULL ) )

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品1024久久| 亚洲视频 欧洲视频| 亚洲bt欧美bt精品| 欧美亚洲另类激情小说| ㊣最新国产の精品bt伙计久久| 蜜桃一区二区三区在线观看| 在线不卡a资源高清| 亚洲尤物视频在线| 色狠狠一区二区| 亚洲午夜国产一区99re久久| 99re在线视频这里只有精品| 国产午夜亚洲精品不卡| 成人国产精品免费网站| 亚洲国产精品99久久久久久久久| 亚洲精品国产品国语在线app| 91成人国产精品| 亚洲一区自拍偷拍| 51久久夜色精品国产麻豆| 图片区日韩欧美亚洲| 欧美日韩一区二区三区四区| 男女视频一区二区| 精品久久人人做人人爽| 韩国一区二区在线观看| 中文字幕一区二区三| 99在线精品观看| 亚洲天堂网中文字| 欧美日韩视频在线一区二区| 日韩电影在线免费| 7777精品伊人久久久大香线蕉超级流畅 | 欧美日本在线播放| 日韩电影在线免费| 久久久影院官网| 91久久奴性调教| 亚洲午夜久久久久中文字幕久| 精品视频在线看| 国产精品综合久久| 国产精品免费看片| 在线一区二区三区做爰视频网站| 图片区小说区区亚洲影院| 日韩美女天天操| 国产精品综合二区| 亚洲成人av福利| 日韩欧美一区二区在线视频| 不卡一区二区在线| 亚洲成人av中文| 日韩一级大片在线| 91在线观看地址| 免费观看久久久4p| 综合网在线视频| 日韩视频中午一区| caoporen国产精品视频| 日本怡春院一区二区| 久久精品男人天堂av| 北条麻妃国产九九精品视频| 亚洲成av人影院在线观看网| 久久综合成人精品亚洲另类欧美| 欧美色男人天堂| 国产精品一区二区视频| 亚洲小少妇裸体bbw| 日本韩国视频一区二区| 韩国v欧美v亚洲v日本v| 亚洲午夜一二三区视频| 国产精品久久久久久久久果冻传媒 | 亚洲国产你懂的| 国产午夜亚洲精品理论片色戒| 欧美在线你懂得| 粉嫩av一区二区三区在线播放| 婷婷夜色潮精品综合在线| 亚洲欧美偷拍另类a∨色屁股| 日韩精品一区二| 粉嫩av一区二区三区粉嫩| 日本vs亚洲vs韩国一区三区| 亚洲精品自拍动漫在线| 国产精品久久久久久亚洲毛片| 91麻豆精品国产91久久久久久久久| 99久久精品国产麻豆演员表| 国产成人精品1024| 精品综合免费视频观看| 1000精品久久久久久久久| 国产欧美日韩一区二区三区在线观看 | 亚洲日本电影在线| 亚洲欧洲精品成人久久奇米网| 日韩免费在线观看| 精品视频色一区| 欧美另类变人与禽xxxxx| 91久久国产最好的精华液| 波多野结衣欧美| 不卡大黄网站免费看| 国产精品亚洲成人| 国产精一区二区三区| 六月丁香综合在线视频| 亚洲一区欧美一区| 亚洲一区二区在线观看视频| 亚洲国产欧美在线| 亚洲精品欧美二区三区中文字幕| 国产精品久久久一本精品| 2020国产精品自拍| 国产日韩欧美高清| 久久精品欧美日韩精品| 国产精品久久久99| 久久久精品黄色| 日韩欧美成人激情| 久久久久久亚洲综合| www久久久久| 国产精品成人免费在线| 国产精品成人在线观看| 日本一区二区三区久久久久久久久不| 2020国产成人综合网| 国产欧美精品在线观看| 亚洲视频在线观看一区| 国产精品嫩草影院com| 综合分类小说区另类春色亚洲小说欧美| 欧美videossexotv100| 2021中文字幕一区亚洲| 中文字幕欧美国产| 一二三四区精品视频| 天天av天天翘天天综合网| 免费成人美女在线观看| 国产精品18久久久久久久久 | 久久久久久亚洲综合影院红桃| 欧美v国产在线一区二区三区| 久久久不卡影院| 中文字幕亚洲欧美在线不卡| 亚洲欧美另类在线| 亚洲精品午夜久久久| 首页国产欧美日韩丝袜| 国产精品系列在线播放| 色狠狠色噜噜噜综合网| 北岛玲一区二区三区四区 | 国产精品亚洲午夜一区二区三区 | 91在线免费看| 欧美色大人视频| 精品久久久久久最新网址| 国产精品久久久久久久久免费樱桃| 亚洲视频你懂的| 亚洲图片有声小说| 国产精品99久久久久久宅男| 91亚洲精华国产精华精华液| 欧美狂野另类xxxxoooo| 久久丝袜美腿综合| 亚洲综合在线观看视频| 韩国av一区二区三区四区| 色国产精品一区在线观看| 国产日产欧产精品推荐色 | 亚洲欧洲综合另类在线| 日韩av一区二区三区四区| 国产成人在线看| 正在播放一区二区| 国产精品久久影院| 青青草一区二区三区| 在线观看日产精品| 日本一区二区三区高清不卡| 麻豆精品久久久| av一本久道久久综合久久鬼色| 欧美日本乱大交xxxxx| 亚洲人成在线观看一区二区| 久久精品噜噜噜成人av农村| 国产欧美日本一区视频| 在线亚洲一区观看| 伊人色综合久久天天| 337p粉嫩大胆噜噜噜噜噜91av| 国产精品每日更新| 美女视频黄免费的久久 | 久久久99免费| 日本最新不卡在线| 色综合天天综合网国产成人综合天 | 日韩**一区毛片| 欧美日韩黄视频| 亚洲欧美偷拍三级| 91视频在线观看| 中文字幕亚洲综合久久菠萝蜜| 精品一二三四区| 26uuuu精品一区二区| 日韩国产欧美在线观看| 极品少妇一区二区| 精品免费视频.| 久久99精品久久只有精品| 欧美一级免费大片| 亚洲福利一区二区| 高清久久久久久| 欧美一区二区高清| 中文子幕无线码一区tr| 久久久一区二区三区捆绑**| 7777精品伊人久久久大香线蕉| 免费在线观看不卡| 26uuu亚洲| 成人美女视频在线观看18| 久久久久久久久免费| 欧美性生活久久| 久久超碰97中文字幕| 一区2区3区在线看| 欧美国产一区在线| 国产精品国产自产拍高清av | 久久精品国产精品亚洲精品| 欧美丰满嫩嫩电影| 亚洲高清免费在线| 欧美日韩精品系列| 免费欧美在线视频| 日韩欧美一级二级三级久久久| 国产成人午夜视频|