David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 1 | /***************************************************************************/ |
| 2 | /* */ |
| 3 | /* ttsbit.h */ |
| 4 | /* */ |
| 5 | /* TrueType and OpenType embedded bitmap support (specification). */ |
| 6 | /* */ |
Werner Lemberg | 920d41e | 2000-06-05 14:32:32 +0000 | [diff] [blame^] | 7 | /* Copyright 1996-2000 by */ |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
| 9 | /* */ |
Werner Lemberg | 920d41e | 2000-06-05 14:32:32 +0000 | [diff] [blame^] | 10 | /* This file is part of the FreeType project, and may only be used, */ |
| 11 | /* modified, and distributed under the terms of the FreeType project */ |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ |
| 13 | /* this file you indicate that you have read the license and */ |
| 14 | /* understand and accept it fully. */ |
| 15 | /* */ |
| 16 | /***************************************************************************/ |
| 17 | |
| 18 | |
| 19 | #ifndef TTSBIT_H |
| 20 | #define TTSBIT_H |
| 21 | |
| 22 | #include <ttload.h> |
| 23 | |
| 24 | |
| 25 | /*************************************************************************/ |
| 26 | /* */ |
| 27 | /* <Function> */ |
| 28 | /* TT_Load_SBit_Strikes */ |
| 29 | /* */ |
| 30 | /* <Description> */ |
| 31 | /* Loads the table of embedded bitmap sizes for this face. */ |
| 32 | /* */ |
| 33 | /* <Input> */ |
| 34 | /* face :: The target face object. */ |
| 35 | /* stream :: The input stream. */ |
| 36 | /* */ |
| 37 | /* <Return> */ |
| 38 | /* TrueType error code. 0 means success. */ |
| 39 | /* */ |
| 40 | LOCAL_DEF |
| 41 | TT_Error TT_Load_SBit_Strikes( TT_Face face, |
| 42 | FT_Stream stream ); |
| 43 | |
| 44 | |
| 45 | /*************************************************************************/ |
| 46 | /* */ |
| 47 | /* <Function> */ |
| 48 | /* TT_Free_SBit_Strikes */ |
| 49 | /* */ |
| 50 | /* <Description> */ |
| 51 | /* Releases the embedded bitmap tables. */ |
| 52 | /* */ |
| 53 | /* <Input> */ |
| 54 | /* face :: The target face object. */ |
| 55 | /* */ |
| 56 | LOCAL_DEF |
| 57 | void TT_Free_SBit_Strikes( TT_Face face ); |
| 58 | |
| 59 | |
| 60 | /*************************************************************************/ |
| 61 | /* */ |
| 62 | /* <Function> */ |
| 63 | /* TT_Load_SBit_Image */ |
| 64 | /* */ |
| 65 | /* <Description> */ |
| 66 | /* Loads a given glyph sbit image from the font resource. This also */ |
| 67 | /* returns its metrics. */ |
| 68 | /* */ |
| 69 | /* <Input> */ |
| 70 | /* face :: The target face object. */ |
| 71 | /* */ |
| 72 | /* x_ppem :: The horizontal resolution in points per EM. */ |
| 73 | /* */ |
| 74 | /* y_ppem :: The vertical resolution in points per EM. */ |
| 75 | /* */ |
| 76 | /* glyph_index :: The current glyph index. */ |
| 77 | /* */ |
| 78 | /* stream :: The input stream. */ |
| 79 | /* */ |
| 80 | /* <Output> */ |
| 81 | /* map :: The target pixmap. */ |
| 82 | /* metrics :: A big sbit metrics structure for the glyph image. */ |
| 83 | /* */ |
| 84 | /* <Return> */ |
| 85 | /* TrueType error code. 0 means success. Returns an error if no */ |
| 86 | /* glyph sbit exists for the index. */ |
| 87 | /* */ |
| 88 | /* <Note> */ |
| 89 | /* The `map.buffer' field is always freed before the glyph is loaded. */ |
| 90 | /* */ |
| 91 | LOCAL_DEF |
| 92 | TT_Error TT_Load_SBit_Image( TT_Face face, |
| 93 | TT_Int x_ppem, |
| 94 | TT_Int y_ppem, |
| 95 | TT_UInt glyph_index, |
David Turner | 109fcf6 | 2000-05-17 23:35:37 +0000 | [diff] [blame] | 96 | TT_UInt load_flags, |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 97 | FT_Stream stream, |
| 98 | FT_Bitmap* map, |
| 99 | TT_SBit_Metrics* metrics ); |
| 100 | |
| 101 | |
| 102 | #endif /* TTSBIT_H */ |
| 103 | |
| 104 | |
| 105 | /* END */ |