Werner Lemberg | 7fa51b5 | 2000-07-08 19:51:42 +0000 | [diff] [blame] | 1 | /***************************************************************************/ |
| 2 | /* */ |
Werner Lemberg | b5084e1 | 2000-10-28 17:10:06 +0000 | [diff] [blame] | 3 | /* t1load.h */ |
Werner Lemberg | 7fa51b5 | 2000-07-08 19:51:42 +0000 | [diff] [blame] | 4 | /* */ |
Werner Lemberg | b5084e1 | 2000-10-28 17:10:06 +0000 | [diff] [blame] | 5 | /* Type 1 font loader (specification). */ |
Werner Lemberg | 7fa51b5 | 2000-07-08 19:51:42 +0000 | [diff] [blame] | 6 | /* */ |
Werner Lemberg | 6e87ed9 | 2007-01-26 22:18:56 +0000 | [diff] [blame] | 7 | /* Copyright 1996-2001, 2002, 2004, 2006, 2007 by */ |
Werner Lemberg | 7fa51b5 | 2000-07-08 19:51:42 +0000 | [diff] [blame] | 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
| 9 | /* */ |
| 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 */ |
| 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 | |
David Turner | 2dfb5ac | 2000-01-27 14:02:04 +0000 | [diff] [blame] | 18 | |
Werner Lemberg | 90d9964 | 2000-12-09 00:45:38 +0000 | [diff] [blame] | 19 | #ifndef __T1LOAD_H__ |
| 20 | #define __T1LOAD_H__ |
David Turner | 2dfb5ac | 2000-01-27 14:02:04 +0000 | [diff] [blame] | 21 | |
Werner Lemberg | cc069be | 2000-12-08 16:17:16 +0000 | [diff] [blame] | 22 | |
David Turner | 19ed8af | 2000-12-08 02:42:29 +0000 | [diff] [blame] | 23 | #include <ft2build.h> |
| 24 | #include FT_INTERNAL_STREAM_H |
| 25 | #include FT_INTERNAL_POSTSCRIPT_AUX_H |
| 26 | #include FT_MULTIPLE_MASTERS_H |
David Turner | a90663f | 2000-07-08 00:41:13 +0000 | [diff] [blame] | 27 | |
David Turner | 8d3a401 | 2001-03-20 11:14:24 +0000 | [diff] [blame] | 28 | #include "t1parse.h" |
David Turner | a90663f | 2000-07-08 00:41:13 +0000 | [diff] [blame] | 29 | |
Werner Lemberg | cc069be | 2000-12-08 16:17:16 +0000 | [diff] [blame] | 30 | |
David Turner | 19ed8af | 2000-12-08 02:42:29 +0000 | [diff] [blame] | 31 | FT_BEGIN_HEADER |
David Turner | 2dfb5ac | 2000-01-27 14:02:04 +0000 | [diff] [blame] | 32 | |
Werner Lemberg | cc069be | 2000-12-08 16:17:16 +0000 | [diff] [blame] | 33 | |
Werner Lemberg | b5084e1 | 2000-10-28 17:10:06 +0000 | [diff] [blame] | 34 | typedef struct T1_Loader_ |
David Turner | 2dfb5ac | 2000-01-27 14:02:04 +0000 | [diff] [blame] | 35 | { |
Werner Lemberg | b5084e1 | 2000-10-28 17:10:06 +0000 | [diff] [blame] | 36 | T1_ParserRec parser; /* parser used to read the stream */ |
David Turner | 2dfb5ac | 2000-01-27 14:02:04 +0000 | [diff] [blame] | 37 | |
Werner Lemberg | b5084e1 | 2000-10-28 17:10:06 +0000 | [diff] [blame] | 38 | FT_Int num_chars; /* number of characters in encoding */ |
David Turner | 4e7eeee | 2002-02-28 16:10:29 +0000 | [diff] [blame] | 39 | PS_TableRec encoding_table; /* PS_Table used to store the */ |
Werner Lemberg | b5084e1 | 2000-10-28 17:10:06 +0000 | [diff] [blame] | 40 | /* encoding character names */ |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 41 | |
Werner Lemberg | b5084e1 | 2000-10-28 17:10:06 +0000 | [diff] [blame] | 42 | FT_Int num_glyphs; |
David Turner | 4e7eeee | 2002-02-28 16:10:29 +0000 | [diff] [blame] | 43 | PS_TableRec glyph_names; |
| 44 | PS_TableRec charstrings; |
| 45 | PS_TableRec swap_table; /* For moving .notdef glyph to index 0. */ |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 46 | |
Werner Lemberg | b5084e1 | 2000-10-28 17:10:06 +0000 | [diff] [blame] | 47 | FT_Int num_subrs; |
David Turner | 4e7eeee | 2002-02-28 16:10:29 +0000 | [diff] [blame] | 48 | PS_TableRec subrs; |
Werner Lemberg | b5084e1 | 2000-10-28 17:10:06 +0000 | [diff] [blame] | 49 | FT_Bool fontdata; |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 50 | |
Werner Lemberg | 1a380e0 | 2006-07-14 18:28:08 +0000 | [diff] [blame] | 51 | FT_UInt keywords_encountered; /* T1_LOADER_ENCOUNTERED_XXX */ |
| 52 | |
Werner Lemberg | bd889e5 | 2002-05-12 19:59:17 +0000 | [diff] [blame] | 53 | } T1_LoaderRec, *T1_Loader; |
David Turner | 2dfb5ac | 2000-01-27 14:02:04 +0000 | [diff] [blame] | 54 | |
Werner Lemberg | 7fa51b5 | 2000-07-08 19:51:42 +0000 | [diff] [blame] | 55 | |
Werner Lemberg | 1a380e0 | 2006-07-14 18:28:08 +0000 | [diff] [blame] | 56 | /* treatment of some keywords differs depending on whether */ |
Werner Lemberg | 6e87ed9 | 2007-01-26 22:18:56 +0000 | [diff] [blame] | 57 | /* they precede or follow certain other keywords */ |
Werner Lemberg | 1a380e0 | 2006-07-14 18:28:08 +0000 | [diff] [blame] | 58 | |
| 59 | #define T1_PRIVATE ( 1 << 0 ) |
| 60 | #define T1_FONTDIR_AFTER_PRIVATE ( 1 << 1 ) |
| 61 | |
| 62 | |
David Turner | bc82f1b | 2002-03-01 02:26:22 +0000 | [diff] [blame] | 63 | FT_LOCAL( FT_Error ) |
Werner Lemberg | 4a2305c | 2001-06-28 07:17:51 +0000 | [diff] [blame] | 64 | T1_Open_Face( T1_Face face ); |
David Turner | 2dfb5ac | 2000-01-27 14:02:04 +0000 | [diff] [blame] | 65 | |
Werner Lemberg | b5084e1 | 2000-10-28 17:10:06 +0000 | [diff] [blame] | 66 | #ifndef T1_CONFIG_OPTION_NO_MM_SUPPORT |
Werner Lemberg | 7fa51b5 | 2000-07-08 19:51:42 +0000 | [diff] [blame] | 67 | |
David Turner | bc82f1b | 2002-03-01 02:26:22 +0000 | [diff] [blame] | 68 | FT_LOCAL( FT_Error ) |
Werner Lemberg | 4a2305c | 2001-06-28 07:17:51 +0000 | [diff] [blame] | 69 | T1_Get_Multi_Master( T1_Face face, |
| 70 | FT_Multi_Master* master ); |
David Turner | 1118720 | 2000-05-26 17:13:23 +0000 | [diff] [blame] | 71 | |
Werner Lemberg | 44bb303 | 2004-04-25 20:15:11 +0000 | [diff] [blame] | 72 | FT_LOCAL_DEF( FT_Error ) |
| 73 | T1_Get_MM_Var( T1_Face face, |
| 74 | FT_MM_Var* *master ); |
| 75 | |
David Turner | bc82f1b | 2002-03-01 02:26:22 +0000 | [diff] [blame] | 76 | FT_LOCAL( FT_Error ) |
Werner Lemberg | 4a2305c | 2001-06-28 07:17:51 +0000 | [diff] [blame] | 77 | T1_Set_MM_Blend( T1_Face face, |
| 78 | FT_UInt num_coords, |
| 79 | FT_Fixed* coords ); |
Werner Lemberg | e35cac6 | 2000-06-11 03:46:57 +0000 | [diff] [blame] | 80 | |
David Turner | bc82f1b | 2002-03-01 02:26:22 +0000 | [diff] [blame] | 81 | FT_LOCAL( FT_Error ) |
Werner Lemberg | 4a2305c | 2001-06-28 07:17:51 +0000 | [diff] [blame] | 82 | T1_Set_MM_Design( T1_Face face, |
| 83 | FT_UInt num_coords, |
| 84 | FT_Long* coords ); |
Werner Lemberg | e35cac6 | 2000-06-11 03:46:57 +0000 | [diff] [blame] | 85 | |
Werner Lemberg | 44bb303 | 2004-04-25 20:15:11 +0000 | [diff] [blame] | 86 | FT_LOCAL_DEF( FT_Error ) |
| 87 | T1_Set_Var_Design( T1_Face face, |
| 88 | FT_UInt num_coords, |
| 89 | FT_Fixed* coords ); |
| 90 | |
David Turner | bc82f1b | 2002-03-01 02:26:22 +0000 | [diff] [blame] | 91 | FT_LOCAL( void ) |
Werner Lemberg | 4a2305c | 2001-06-28 07:17:51 +0000 | [diff] [blame] | 92 | T1_Done_Blend( T1_Face face ); |
Werner Lemberg | 7fa51b5 | 2000-07-08 19:51:42 +0000 | [diff] [blame] | 93 | |
Werner Lemberg | b5084e1 | 2000-10-28 17:10:06 +0000 | [diff] [blame] | 94 | #endif /* !T1_CONFIG_OPTION_NO_MM_SUPPORT */ |
Werner Lemberg | 7fa51b5 | 2000-07-08 19:51:42 +0000 | [diff] [blame] | 95 | |
David Turner | 2dfb5ac | 2000-01-27 14:02:04 +0000 | [diff] [blame] | 96 | |
David Turner | 19ed8af | 2000-12-08 02:42:29 +0000 | [diff] [blame] | 97 | FT_END_HEADER |
David Turner | 2dfb5ac | 2000-01-27 14:02:04 +0000 | [diff] [blame] | 98 | |
Werner Lemberg | 90d9964 | 2000-12-09 00:45:38 +0000 | [diff] [blame] | 99 | #endif /* __T1LOAD_H__ */ |
David Turner | 2dfb5ac | 2000-01-27 14:02:04 +0000 | [diff] [blame] | 100 | |
| 101 | |
| 102 | /* END */ |