📄 freetype.h
字号:
/* relevant for vertical layouts, and should */ /* be set to the `height' for fonts that do */ /* not provide vertical metrics. Only */ /* relevant for scalable formats. */ /* */ /* underline_position :: The position, in font units, of the */ /* underline line for this face. It's the */ /* center of the underlining stem. Only */ /* relevant for scalable formats. */ /* */ /* underline_thickness :: The thickness, in font units, of the */ /* underline for this face. Only relevant for */ /* scalable formats. */ /* */ /* max_points :: The maximum number of points used to store */ /* the vectorial outline of any glyph in this */ /* face. If this value cannot be known in */ /* advance, or if the face isn't scalable, */ /* this should be set to 0. Only relevant for */ /* scalable formats. */ /* */ /* max_contours :: The maximum number of contours used to */ /* store the vectorial outline of any glyph in */ /* this face. If this value cannot be known */ /* in advance, or if the face isn't scalable, */ /* this should be set to 0. Only relevant for */ /* scalable formats. */ /* */ typedef struct FT_FaceRec_ { FT_Driver driver; FT_Memory memory; FT_Stream stream; FT_Long num_faces; FT_Long face_index; /* a generic pointer for client use */ FT_Generic generic; /* the face's current glyph slot(s) */ FT_GlyphSlot glyph; /* the face's current size, may be nil */ FT_Size size; /* the face's current charmap */ FT_CharMap charmap; /* the face's table of available charmaps */ FT_Int num_charmaps; FT_CharMap* charmaps; /* the face's current sizes list */ FT_ListRec sizes_list; /* a pointer to the face's extensions block, if supported */ void* extensions; FT_Long face_flags; FT_Long style_flags; FT_Long num_glyphs; FT_String* family_name; FT_String* style_name; FT_Int num_fixed_sizes; FT_Bitmap_Size* available_sizes; /* the following are only relevant for scalable outlines */ FT_BBox bbox; FT_UShort units_per_EM; FT_Short ascender; FT_Short descender; FT_Short height; FT_Short max_advance_width; FT_Short max_advance_height; FT_Short underline_position; FT_Short underline_thickness; FT_UShort max_points; FT_Short max_contours; } FT_FaceRec; /*************************************************************************/ /* */ /* <Constant> */ /* FT_FACE_FLAG_SCALABLE */ /* */ /* <Description> */ /* A bit-field constant, used to indicate that a given face provides */ /* vectorial outlines (i.e., TrueType or Type1). This doesn't */ /* prevent embedding of bitmap strikes though, i.e., a given face can */ /* have both this bit set, and a `num_fixed_sizes' property > 0. */ /* */#define FT_FACE_FLAG_SCALABLE 1 /*************************************************************************/ /* */ /* <Constant> */ /* FT_FACE_FLAG_FIXED_WIDTH */ /* */ /* <Description> */ /* A bit-field constant, used to indicate that a given face contains */ /* fixed-width characters (like Courier, MonoType, etc). */ /* */#define FT_FACE_FLAG_FIXED_WIDTH 4 /*************************************************************************/ /* */ /* <Constant> */ /* FT_FACE_FLAG_FIXED_WIDTH */ /* */ /* <Description> */ /* A bit-field constant, used to indicate that a given face contains */ /* `fixed sizes', i.e., bitmap strikes for some given pixel sizes. */ /* See the `num_fixed_sizes' and `available_sizes' face properties */ /* for more information. */ /* */#define FT_FACE_FLAG_FIXED_SIZES 2 /*************************************************************************/ /* */ /* <Constant> */ /* FT_FACE_FLAG_SFNT */ /* */ /* <Description> */ /* A bit-field constant, used to indicate that a given face uses the */ /* `sfnt' storage fomat. For now, this means TrueType or OpenType. */ /* */#define FT_FACE_FLAG_SFNT 8 /*************************************************************************/ /* */ /* <Constant> */ /* FT_FACE_FLAG_HORIZONTAL */ /* */ /* <Description> */ /* A bit-field constant, used to indicate that a given face contains */ /* horizontal glyph metrics. This should be set for all common */ /* formats, but who knows... */ /* */#define FT_FACE_FLAG_HORIZONTAL 0x10 /*************************************************************************/ /* */ /* <Constant> */ /* FT_FACE_FLAG_VERTICAL */ /* */ /* <Description> */ /* A bit-field constant, used to indicate that a given face contains */ /* vertical glyph metrics. If not set, the glyph loader will */ /* synthetize vertical metrics itself to help display vertical text */ /* correctly. */ /* */#define FT_FACE_FLAG_VERTICAL 0x20 /*************************************************************************/ /* */ /* <Constant> */ /* FT_FACE_FLAG_KERNING */ /* */ /* <Description> */ /* A bit-field constant, used to indicate that a given face contains */ /* kerning information. When set, this information can be retrieved */ /* through the function FT_Get_Kerning(). Note that when unset, this */ /* function will always return the kerning vector (0,0). */ /* */#define FT_FACE_FLAG_KERNING 0x40 /*************************************************************************/ /* */ /* <Constant> */ /* FT_FACE_FLAG_FAST_GLYPHS */ /* */ /* <Description> */ /* A bit-field constant, used to indicate that the glyphs in a given */ /* font can be retrieved very quickly, and that a glyph cache is thus */ /* not necessary for any of its child size objects. */ /* */ /* This flag should really be set for fixed-size formats like FNT, */ /* where each glyph bitmap is available directly in binary form */ /* without any kind of compression. */ /* */#define FT_FACE_FLAG_FAST_GLYPHS 0x80#define FT_HAS_HORIZONTAL(face) (face->face_flags & FT_FACE_FLAG_HORIZONTAL)#define FT_HAS_VERTICAL(face) (face->face_flags & FT_FACE_FLAG_VERTICAL)#define FT_HAS_KERNING(face) (face->face_flags & FT_FACE_FLAG_KERNING)#define FT_IS_SCALABLE(face) (face->face_flags & FT_FACE_FLAG_SCALABLE)#define FT_IS_SFNT(face) (face->face_flags & FT_FACE_FLAG_SFNT)#define FT_IS_FIXED_WIDTH(face) (face->face_flags & FT_FACE_FLAG_FIXED_WIDTH)#define FT_HAS_FIXED_SIZES(face) (face->face_flags & FT_FACE_FLAG_FIXED_SIZES)#define FT_HAS_FAST_GLYPHS(face) (face->face_flags & FT_FACE_FLAG_FAST_GLYPHS) /*************************************************************************/ /* */ /* <Constant>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -