Hash :
8f43c714
Author :
Date :
2000-02-02T12:16:19
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
/***************************************************************************/
/* */
/* ttgload.h */
/* */
/* TrueType Glyph Loader (specification). */
/* */
/* Copyright 1996-1999 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 TTGLOAD_H
#define TTGLOAD_H
#include <ttobjs.h>
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
#include <ttinterp.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
typedef struct TT_Loader_
{
TT_Face face;
TT_Size size;
TT_GlyphSlot glyph;
TT_ULong load_flags;
FT_Stream stream;
TT_Int byte_len;
TT_Int left_points;
TT_Int left_contours;
TT_BBox bbox;
TT_Int left_bearing;
TT_Int advance;
TT_Bool preserve_pps;
TT_Vector pp1;
TT_Vector pp2;
TT_ULong glyf_offset;
/* the zone where we load our glyphs */
TT_GlyphZone base;
TT_GlyphZone zone;
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
TT_ExecContext exec;
TT_Byte* instructions;
#endif
} TT_Loader;
/*************************************************************************/
/* */
/* <Function> */
/* TT_Get_Metrics */
/* */
/* <Description> */
/* Returns the horizontal or vertical metrics in font units for a */
/* given glyph. The metrics are the left side bearing (resp. top */
/* side bearing) and advance width (resp. advance height). */
/* */
/* <Input> */
/* header :: A pointer to either the horizontal or vertical metrics */
/* structure. */
/* */
/* index :: The glyph index. */
/* */
/* <Output> */
/* bearing :: The bearing, either left side or top side. */
/* */
/* advance :: The advance width resp. advance height. */
/* */
/* <Note> */
/* This function will much probably move to another component in the */
/* near future, but I haven't decided which yet. */
/* */
LOCAL_DEF
void TT_Get_Metrics( TT_HoriHeader* header,
TT_UInt index,
TT_Short* bearing,
TT_UShort* advance );
/*************************************************************************/
/* */
/* <Function> */
/* TT_Load_Glyph */
/* */
/* <Description> */
/* A function used to load a single glyph within a given glyph slot, */
/* for a given size. */
/* */
/* <Input> */
/* glyph :: A handle to a target slot object where the glyph */
/* will be loaded. */
/* */
/* size :: A handle to the source face size at which the glyph */
/* must be scaled/loaded. */
/* */
/* glyph_index :: The index of the glyph in the font file. */
/* */
/* load_flags :: A flag indicating what to load for this glyph. The */
/* FT_LOAD_XXX constants can be used to control the */
/* glyph loading process (e.g., whether the outline */
/* should be scaled, whether to load bitmaps or not, */
/* whether to hint the outline, etc). */
/* <Output> */
/* result :: A set of bit flags indicating the type of data that */
/* was loaded in the glyph slot (outline or bitmap, */
/* etc). */
/* */
/* You can set this field to 0 if you don't want this */
/* information. */
/* */
/* <Return> */
/* FreeType error code. 0 means success. */
/* */
LOCAL_DEF
TT_Error TT_Load_Glyph( TT_Size size,
TT_GlyphSlot glyph,
TT_UShort glyph_index,
TT_UInt load_flags );
#ifdef __cplusplus
}
#endif
#endif /* TTGLOAD_H */
/* END */