📄 ftdriver.h
字号:
/***************************************************************************//* *//* ftdriver.h *//* *//* FreeType driver interface (specification). *//* *//* Copyright 1996-2000 by *//* 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. *//* *//***************************************************************************/#ifndef FTDRIVER_H#define FTDRIVER_H#include <freetype.h> /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /**** ****/ /**** ****/ /**** D R I V E R S ****/ /**** ****/ /**** ****/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /* */ /* <FuncType> */ /* FTDriver_initDriver */ /* */ /* <Description> */ /* A driver method used to create a new driver object for a given */ /* format. */ /* */ /* <InOut> */ /* driver :: A handle to the `new' driver object. The fields */ /* `library', `system', and `lock' are already set when the */ /* base layer calls this method. */ /* */ /* <Return> */ /* FreeType error code. 0 means success. */ /* */ typedef FT_Error (*FTDriver_initDriver)( FT_Driver driver ); /*************************************************************************/ /* */ /* <FuncType> */ /* FTDriver_doneDriver */ /* */ /* <Description> */ /* A driver method used to finalize a given driver object. Note that */ /* all faces and resources for this driver have been released before */ /* this call, and that this function should NOT destroy the driver */ /* object. */ /* */ /* <InOut> */ /* driver :: A handle to target driver object. */ /* */ /* <Return> */ /* FreeType error code. 0 means success. */ /* */ typedef FT_Error (*FTDriver_doneDriver)( FT_Driver driver ); typedef void (*FTDriver_Interface)( void ); /*************************************************************************/ /* */ /* <FuncType> */ /* FTDriver_getInterface */ /* */ /* <Description> */ /* Each driver can provide one or more extensions to the base */ /* FreeType API. These can be used to access format specific */ /* features (e.g., all TrueType/OpenType resources share a common */ /* file structure and common tables which can be accessed through the */ /* `sfnt' interface), or more simply generic ones (e.g., the */ /* `postscript names' interface which can be used to retrieve the */ /* PostScript name of a given glyph index). */ /* */ /* <InOut> */ /* driver :: A handle to a driver object. */ /* */ /* <Input> */ /* interface :: A string designing the interface. Examples are */ /* `sfnt', `post_names', `charmaps', etc. */ /* */ /* <Return> */ /* A typeless pointer to the extension's interface (normally a table */ /* of function pointers). Returns NULL if the requested extension */ /* isn't available (i.e., wasn't compiled in the driver at build */ /* time). */ /* */ typedef FTDriver_Interface (*FTDriver_getInterface) ( FT_Driver driver, const FT_String* interface ); /*************************************************************************/ /* */ /* <Type> */ /* FT_FormatInterface */ /* */ /* <Description> */ /* A driver interface field whose value is a driver-specific */ /* interface method table. This table contains entry points to */ /* various functions that are strictly related to the driver's */ /* format. */ /* */ typedef void* FT_FormatInterface; /*************************************************************************/ /* */ /* <FuncType> */ /* FT_Attach_Reader */ /* */ /* <Description> */ /* This function is associated to the `attach_file' driver-specific */ /* interface. It is used to read additional data for a given face */ /* from another input stream/file. For example, it is used to */ /* attach a Type 1 AFM file to a given Type 1 face. */ /* */ typedef FT_Error (*FT_Attach_Reader)( FT_Face face, FT_Stream stream ); /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /**** ****/ /**** ****/ /**** F A C E S ****/ /**** ****/ /**** ****/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /* */ /* <FuncType> */ /* FTDriver_initFace */ /* */ /* <Description> */ /* A driver method used to initialize a new face object. The object */ /* must be created by the caller. */ /* */ /* <InOut> */ /* stream :: The input stream. */ /* */ /* <Input> */ /* typeface_index :: The face index in the font resource. Used to */ /* access individual faces in collections. */ /* */ /* <Output> */ /* face :: A handle to the new target face. */ /* */ /* <Return> */ /* FreeType error code. 0 means success. */ /* */ /* <Note> */ /* The `typeface_index' parameter field will be set to -1 if the */ /* engine only wants to test the format of the resource. This means */ /* that font drivers should simply check the font format, then return */ /* immediately with an error code of 0 (meaning success). The field */ /* `num_faces' should be set. */ /* */ /* FTDriver_doneFace() will be called subsequently, whatever the */ /* result was. */ /* */ typedef FT_Error (*FTDriver_initFace)( FT_Stream stream, FT_Long typeface_index, FT_Face face ); /*************************************************************************/ /* */ /* <FuncType> */ /* FTDriver_doneFace */ /* */ /* <Description> */ /* A driver method used to finalize a given face object. This */ /* function does NOT destroy the object, that is the responsibility */ /* of the caller. */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -