src/type42


Log

Author Commit Date CI Message
Werner Lemberg d28eac24 2016-05-30T00:23:59 [type42] Support `CharStrings' entry format as created by LilyPond. * src/type42/t42parse.c (t42_parse_charstrings): Handle entries having the format (foo) cvn 12345 def
Nikolaus Waxweiler 1d8d0b4e 2016-01-28T14:11:14 Remove unpatented hinter (3/3). * include/freetype/config/ftoption.h (TT_CONFIG_OPTION_UNPATENTED_HINTING): Remove. * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Remove `ignore_unpatented_hinter' field. Update users. (FT_DEBUG_HOOK_UNPATENTED_HINTING): Remove. Update users. * include/freetype/internal/tttypes.h (TT_FaceRec): Remove `unpatented_hinting' field. Update users. * src/base/ftpatent.c (_tt_check_patents_in_range, _tt_check_patents_in_table, _tt_face_check_patents): Remove. (FT_Face_CheckTrueTypePatents, FT_Face_SetUnpatentedHinting): Replace code with dummies. * src/truetype/ttobjs.c (tt_face_init): Remove now defunct code. * src/truetype/ttobjs.h (TT_GraphicsState): Remove `both_x_axis' field.
Werner Lemberg 9adeab64 2016-01-13T11:54:10 Update copyright year.
Werner Lemberg 37412ff9 2016-01-12T21:37:13 Don't use macro names that contain `__' [1/2]. Such macro names are reserved for both C and C++. */*: Replace macros of the form `__XXX_H__' with `XXX_H_'.
Werner Lemberg 4188deac 2015-10-30T08:07:56 Comments.
Werner Lemberg e93d326c 2015-10-22T10:17:20 [sfnt, type42] Fix clang compiler warnings. * src/sfnt/sfobjs.c (sfnt_init_face): Initialize `offset'. * src/type42/t42parse.c (t42_parse_sfnts): Use proper cast.
Werner Lemberg 87fefc59 2015-10-21T20:29:12 [type42] Fix heap buffer overflow (#46269). * src/type42/t42parse.c (t42_parse_sfnts): Fix off-by-one error in bounds checking.
Werner Lemberg 649ca556 2015-10-21T07:01:45 [type42] Better check invalid `sfnts' array data (#46255). * src/type42/t42parse.c (t42_parse_sfnts): Table lengths must be checked individually against available data size.
Werner Lemberg 5179c89f 2015-10-19T08:49:25 Comments.
Werner Lemberg 06c2d332 2015-10-08T21:31:57 [type42] Protect against invalid number of glyphs (#46159). * src/type42/t42parse.c (t42_parse_charstrings): Check number of `CharStrings' dictionary entries against size of data stream.
Werner Lemberg f28c95c4 2015-09-17T19:30:26 [type42] Fix memory leak (#45989). * src/type42/t42parse.c (t42_parse_charstrings): Allow only a single `CharStrings' array.
Werner Lemberg 19cb1127 2015-09-15T08:52:36 [type1, type42] Fix memory leaks (#45966). * src/type1/t1load.c (parse_blend_axis_types): Handle multiple axis names. (parse_blend_design_map): Allow only a single design map. (parse_encoding): Handle multiple encoding vectors. * src/type42/t42parse.c (t42_parse_encoding): Handle multiple encoding vectors.
Werner Lemberg 581c7e2a 2015-09-15T06:49:06 [type1, type42] Check encoding array size (#45961). * src/type1/t1load.c (parse_encoding), src/type42/t42parse.c (t42_parse_encoding): Do it.
Werner Lemberg 23423bc6 2015-09-11T08:28:27 [type42] Fix endless loop (#45920). * src/type42/t42parse.c (t42_parse_encoding): Synchronize with type1's `parse_encoding'.
Werner Lemberg 14d6b5d7 2015-08-13T15:22:17 [truetype] Introduce named instance access to GX fonts. For functions querying a face, bits 16-30 of the face index can hold the named instance index if we have a GX font. The indices start with value 1; value 0 indicates font access without GX variation data. * include/freetype/freetype.h (FT_FaceRec): Update documentation. * include/freetype/internal/sfnt.h: Ditto. * src/sfnt/sfobjs.c (sfnt_init_face) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Get number of named instances and do argument checks. (sfnt_load_face): Updated. * src/truetype/ttobjs.c (tt_face_init) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Use named instance, overwriting the style name. * src/base/ftobjs.c (open_face_from_buffer, open_face_PS_from_sfnt_stream): Updated. * src/bdf/bdfdrivr.c (BDF_Face_Init): Updated. * src/cff/cffload.c (cff_font_load): Updated. * src/cff/cffobjs.c (cff_face_init): Make function exit early for pure CFF fonts if `font_index < 0'. Updated. * src/cid/cidobjs.c (cid_face_init): Updated. * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated. * src/pfr/pfrobjs.c (pfr_face_init): Updated. * src/type1/t1objs.c (T1_Face_Init): Updated. * src/type42/t42objs.c (T42_Face_Init): Updated. * src/winfonts/winfnt.c (fnt_face_get_dll_font, FNT_Face_Init): Updated. * docs/CHANGES: Updated.
Alexei Podtelezhnikov a37da21a 2015-08-10T23:05:02 [type1,cid,type42] Minor improvements. * src/type1/t1load.c (t1_parse_font_matrix): Scale units per EM only when necessary. Refresh comments. * src/cid/cidload.c (cid_parse_font_matrix): Ditto. * src/type42/t42parse.c (t42_parse_font_matrix): Refresh comments.
Werner Lemberg bd75a517 2015-08-08T08:39:45 [type42] Fix glyph access. This is a severe bug: We've missed one level of indirection, as described in the Type 42 specification. As a result, ftview sometimes showed incorrect glyphs for given glyph names, and even displayed `error 0x0006' (invalid argument!) in case the number of glyph indices differed between the Type 42 font and the embedded TTF. Apparently, noone ever noticed it; this shows how much Type 42 fonts are in use... * src/type42/t42objs.c (T42_GlyphSlot_Load): Map Type 42 glyph index to embedded TTF's glyph index.
Werner Lemberg e5f44693 2015-08-08T07:45:03 [type42] Minor clean-up. * src/type42/t42parse.c (t42_parse_font_matrix): Remove unused variable.
Alexei Podtelezhnikov fd70512e 2015-08-06T21:49:08 [type42] Parse FontMatrix according to specifications. * src/type42/t42parse.c (t42_parse_font_matrix): Type 42 FontMatrix does not need scaling by 1000. Units_per_EM are taken from the embedded TrueType.
Werner Lemberg 31d97df9 2015-06-21T19:12:12 Make Jam support work again. This is just very basic stuff and just a little bit tested on GNU/Linux only. I won't delve into this since I'm not a Jam user. * Jamfile: Call `HDRMACRO' for `ftserv.h' also. (DEFINES): Replace with... (CCFLAGS): ... this. * src/Jamfile: Don't call `HDRMACRO' for `internal.h'; this is already handled in the top-level Jamfile. * src/autofit/Jamfile (DEFINES): Replace with... (CCFLAGS): ... this. (_sources): Add missing files. * src/cache/Jamfile: Don't call `HDRMACRO' for `ftcache.h'; it no longer contains macro header definitions. * src/base/Jamfile, src/cff/Jamfile, src/sfnt/Jamfile, src/truetype/Jamfile (_sources): Add missing files.
Alexei Podtelezhnikov eabc8d72 2015-04-12T23:16:48 [psaux,psnames,type1,type42] NULL.
Werner Lemberg a451638e 2015-03-11T08:09:13 Rename `svxf86nm.h' to `svfntfmt.h'; update related symbols. * include/internal/ftserv.h (FT_SERVICE_XFREE86_NAME_H): Renamed to... (FT_SERVICE_FONT_FORMAT_H): This. * include/internal/services/svfntfmt.h (FT_XF86_FORMAT_*): Renamed to ... (FT_FONT_FORMAT_*): This. src/base/ftfntfmt.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c, src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c, src/truetype/ttdriver.c, src/type1/t1driver.c, src/type42/t42drivr.c, src/winfonts/winfnt.c: Updated.
Werner Lemberg 851e8151 2015-03-01T19:27:09 Various compiler warning fixes for `make multi'. * src/autofit/afcjk.c (af_cjk_hints_compute_blue_edges), src/autofit/aflatin.c (af_latin_hint_compute_blue_edges, af_latin_hint_edges), src/autofit/aflatin2.c (af_latin2_hints_compute_blue_edges, af_latin2_hint_edges): Declare as `static'. * src/cache/ftccmap.c (FTC_CMAP_QUERY_HASH, FTC_CMAP_NODE_HASH): Removed. Unused. * src/cache/ftcimage.c: Include FT_INTERNAL_OBJECTS_H. * src/cache/ftcmanag.c (FTC_LRU_GET_MANAGER): Removed. Unused. * src/cff/cf2intrp.c: Include `cf2intrp.h'. * src/cff/cffdrivr.c (PAIR_TAG): Removed. Unused. * src/gzip/ftgzip.c (NO_DUMMY_DECL): Removed. Unused. * src/psaux/afmparse.c (afm_parser_read_int): Declare as `static'. * src/pshinter/pshalgo.c (STRONGER, PSH_ZONE_MIN, PSH_ZONE_MAX): Removed. Unused. * src/raster/ftraster.c (Render_Glyph): Declare as `static'. * src/sfnt/ttpost.c (load_format_20): Fix signedness warning. * src/truetype/ttdriver.c (PAIR_TAG): Removed. Unused. * src/truetype/ttsubpix.c (is_member_of_family_class, is_member_of_style_class): Declare as `static'. * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Declare as `static'. * src/type1/t1load.c (mm_axis_unmap, mm_weights_unmap): Declare as `static'. (T1_FIELD_COUNT): Removed. Unused. * src/type1/t1parse.h (T1_Done_Table): Removed. Unused. * src/type42/t42parse.c (T1_Done_Table): Removed. Unused.
Werner Lemberg 7b6b417c 2015-02-21T10:39:34 [type42] Signedness fixes. * src/type42/t42parse.c, src/type42/t42parse.h, src/type42/t42types.h: Apply.
Werner Lemberg 6bd7d28f 2015-02-18T09:22:06 Don't use `FT_PtrDist' for lengths. Use FT_UInt instead. * include/internal/psaux.h (PS_Table_FuncsRec, PS_TableRec, T1_DecoderRec): Do it. * include/internal/t1types.h (T1_FontRec): Ditto. * src/cid/cidload.c (cid_parse_dict): Updated. * src/pfr/pfrload.c (pfr_extra_item_load_font_id): Ditto. * src/psaux/psobjs.c (ps_table_add), src/psaux/psobjs.h: Ditto. * src/type1/t1load.c (parse_blend_axis_types, parse_encoding, parse_chharstrings, parse_dict): Ditto. * src/type42/t42parse.c (t42_parse_encoding, t42_parse_charstrings, t42_parse_dict): Ditto.
Werner Lemberg f57fc59e 2015-01-17T20:41:43 Run `src/tools/update-copyright'.
Werner Lemberg f796cf6c 2015-01-17T20:11:10 Normalize copyright notice format.
Behdad Esfahbod 3f9b3d88 2015-01-14T15:48:12 * src/type42/t42objs.h (T42_DriverRec): Remove unused member.
Werner Lemberg 36d03c9f 2015-01-12T11:26:30 Fix Savannah bug #43976. Assure that FreeType's internal include directories are found before `CPPFLAGS' (which might be set by the user in the environment), and `CPPFLAGS' before `CFLAGS'. * builds/freetype.mk (FT_CFLAGS): Don't add `INCLUDE_FLAGS'. (FT_COMPILE): Make this a special variable for compiling only the files handled in `freetype.mk'. (.c.$O): Removed, unused. * src/*/rules.mk (*_COMPILE): Fix order of include directories.
Werner Lemberg 812ed341 2014-12-11T14:07:29 * src/type42/t42parse.c (t42_parse_sfnts): Reject invalid TTF size.
Werner Lemberg b9438113 2014-12-11T13:33:14 * src/type42/t42parse.c (t42_parse_sfnts): Check `string_size'. Problem reported by Dennis Felsing <dennis@felsin9.de>.
Werner Lemberg b24e8ba2 2014-11-25T08:30:49 [Savannah bug #43682] Add/remove `void' casts to some functions. We use a cast to indicate that we intentionally ignore a function's return value. However, this doesn't apply to API functions where errors can only happen for trivially invalid input. * src/base/ftstroke.c (FT_Glyph_Stroke, FT_Glyph_StrokeBorder), src/base/ftsynth.c (FT_GlyphSlot_Embolden), src/cff/cffgload.c (cff_slot_load), src/pfr/pfrdrivr.c (pfr_get_kerning), src/type1/t1load.c (parse_encoding), src/type42/t42parse.c (t42_parse_encoding): Do it.
Werner Lemberg 73be9f9a 2014-11-24T07:30:05 [type1, type42] Another fix for Savannah bug #43655. * src/type1/t1load.c (parse_charstrings), src/type42/t42parse.c (t42_parse_charstrings): Add another boundary testing.
Werner Lemberg 42fcd669 2014-11-22T12:44:33 [type42] Allow only embedded TrueType fonts. This is a follow-up to Savannah bug #43659. * src/type42/t42objs.c (T42_Face_Init): Exclusively use the `truetype' font driver for loading the font contained in the `sfnts' array.
Werner Lemberg 3788187e 2014-11-22T10:46:47 [type42] Fix Savannah bug #43659. * src/type42/t42objs.c (T42_Open_Face): Initialize `face->ttf_size'. * src/type42/t42parse.c (t42_parse_sfnts): Always set `face->ttf_size' directly. This ensures a correct stream size in the call to `FT_Open_Face', which follows after parsing, even for buggy input data. Fix error messages.
Werner Lemberg dd89710f 2014-11-21T22:19:28 [type1, type42] Fix Savannah bug #43655. * src/type1/t1load.c (parse_charstrings), src/type42/t42parse.c (t42_parse_charstrings): Fix boundary testing.
Werner Lemberg 8b281f83 2014-01-23T08:14:53 Fix Savannah bug #41309. * src/type1/t1load.c (t1_parse_font_matrix): Properly handle result of `T1_ToFixedArray'. * src/cid/cidload.c (cid_parse_font_matrix): Synchronize with `t1_parse_font_matrix'. * src/type42/t42parse.c (t42_parse_font_matrix): Synchronize with `t1_parse_font_matrix'. (t42_parse_encoding): Synchronize with `t1_parse_encoding'. * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_BBOX>, <T1_FIELD_TYPE_MMOX>: Properly handle result of `ps_tofixedarray'.
Werner Lemberg 5f577462 2013-12-25T08:50:50 Fix Savannah bug #40997. * src/bdf/bdfdrivr.c (BDF_Face_Init): Only use OR operator to adjust face flags since FT_FACE_FLAG_EXTERNAL_STREAM might already be set. * src/cff/cffobjs.c (cff_face_init): Ditto. * src/cid/cidobjs.c (cid_face_init): Ditto. * src/pcf/pcfread.c (pcf_load_font): Ditto. * src/pfr/pfrobjs.c (pfr_face_init): Ditto. * src/type1/t1objs.c (T1_Face_Init): Ditto. * src/type42/t42objs.c (T42_Face_Init): Ditto. * src/winfonts/winfnt.c (FNT_Face_Init): Ditto.
suzuki toshiya ac0f4454 2013-09-25T10:57:17 [bdf, pcf] Refuse non-zero face_index. Suggested by Akira Tagoh, see http://lists.gnu.org/archive/html/freetype/2013-09/msg00030.html * src/bdf/bdfdrivr.c (BDF_Face_Init): Return Invalid_Argument error when the font could be opened but non-zero face_index is given. * src/pcf/pcfdrivr.c (PCF_Face_Init): Ditto. * src/type42/t42objs.c (T42_Face_Init): Remove unrequired FT_UNUSED macro for face_index because it is validated in later.
Werner Lemberg ffee64af 2013-08-26T12:55:48 Better tracing of loaded glyphs. Previously, the loading of a glyph was traced at level 4, if at all. With this change, all font loading routines emit a tracing message at level 1, making it easier to select tracing output (for example using F2_DEBUG="any:1 afhints:7 aflatin:7"). * src/bdf/bdfdrivr.c (BDF_Glyph_Load): Add tracing message. * src/cff/cffdrivr.c (cff_glyph_load): Ditto. * src/cff/cffgload.c (cff_decoder_prepare): Improve tracing messages. * src/cid/cidgload.c (cid_load_glyph): Use level 1 for tracing message. * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Ditto. * src/pfr/pfrobjs.c (pfr_slot_load): Add tracing message. * src/truetype/ttgload.c (TT_Load_Glyph): Ditto. * src/type1/t1gload.c (T1_Load_Glyph): Ditto. * src/type42/t42objs.c (T42_GlyphSlot_Load): Ditto. * src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto.
Werner Lemberg e8ed2d62 2013-08-01T12:20:20 Another round of cppcheck nitpicks. The call was (from the top-level of the FreeType tree): cppcheck --force \ --enable=all \ -I /usr/include \ -I /usr/local/include \ -I /usr/lib/gcc/i586-suse-linux/4.7/include \ -I include \ -I include/freetype \ -I include/freetype/config \ -I include/freetype/internal \ -DFT2_BUILD_LIBRARY \ . &> cppcheck.log using cppcheck git commit f7e93f99. Note that cppcheck still can't handle `#include FOO' (with `FOO' a macro). */* Improve variable scopes. */* Remove redundant initializations which get overwritten. * src/gxvalid/*: Comment out redundant code or guard it with FT_DEBUG_LEVEL_TRACE.
Werner Lemberg dc624ca4 2013-06-04T10:30:48 Apply fixes for cppcheck nitpicks. http://cppcheck.sourceforge.net/ Note that the current version heavily chokes on FreeType, delivering even wrong results. I will report those issues to the cppcheck team so that a newer version gives improved results hopefully. */* Improve variable scopes. */* Remove redundant initializations which get overwritten. * src/base/ftmac.c ,builds/mac/ftmac.c (count_faces_scalable): Remove unused variable. * src/base/ftdbgmem.c (ft_mem_table_destroy): `table' can't be zero. * src/gxvalid/gxvkern.c (gxv_kern_subtable_fmt1_entry_validate): Remove functionless code. * src/tools/ftrandom.c (main): Fix memory leak.
Werner Lemberg f6aa089f 2013-05-10T07:58:47 */* [FT_CONFIG_OPTION_OLD_INTERNALS]: Remove macro and guarded code.
Werner Lemberg 89f50647 2013-03-14T17:50:49 */*: Use FT_ERR_EQ, FT_ERR_NEQ, and FT_ERR where appropriate. FT_Err_XXX and friends are no longer directly used in the source code.
Werner Lemberg e3c93015 2013-03-14T11:21:17 */*: Use FT_Err_Ok only. This is a purely mechanical conversion.
Werner Lemberg 059bc335 2013-03-14T10:27:35 */*: Use `FT_THROW'. This is essentially a mechanical conversion, adding inclusion of `FT_INTERNAL_DEBUG_H' where necessary, and providing the macros for stand-alone compiling modes of the rasterizer modules. To convert the remaining occurrences of FT_Err_XXX and friends it is necessary to rewrite the code. Note, however, that it doesn't harm if some cases are not handled since FT_THROW is a no-op.
Werner Lemberg d6bc524b 2013-03-11T09:50:53 Always use module related error codes. * src/cff/cffobjs.c (cff_face_init), src/type1/t1objs.c (T1_Face_Init), src/type42/t42objs.c (T42_Face_Init): Use `FT_ERROR_BASE'. * src/type1/t1load.c (parse_encoding): Use T1_Err_Unknown_File_Format.
Alexei Podtelezhnikov 79180ad0 2012-11-27T21:36:20 [cid, type1, type42] Clean up units_per_EM calculations. * src/cid/cidload.c (cid_parse_font_matrix): Updated. * src/type1/t1load.c (t1_parse_font_matrix): Updated. * src/type42/t42parse.c (t42_parse_font_matrix): Updated.
Vinnie Falco 26dfeb6d 2012-03-08T06:04:03 Prepare source code for amalgamation. * src\autofit\aferrors.h, src\bdf\bdferror.h, src\bzip2\ftbzip2.c, src\cache\ftcerror.h, src\cff\cfferrs.h, src\cid\ciderrs.h, src\gxvalid\gxverror.h, src\gzip\ftgzip.c, src\lzw\ftlzw.c, src\otvalid\otverror.h, src\pcf\pcferror.h, src\pfr\pfrerror.h, src\psaux\psauxerr.h, src\pshinter\pshnterr.h, src\psnames\psnamerr.h, src\raster\rasterrs.h, src\sfnt\sferrors.h, src\smooth\ftsmerrs.h, src\truetype\tterrors.h, src\type1\t1errors.h, src\type42\t42error.h, src\winfonts\fnterrs.h: Add #undef FT_ERR_PREFIX before #define FT_ERR_PREFIX.
Alexei Podtelezhnikov c18c1882 2012-02-28T07:52:04 [type42] Minor code optimization (again). * src/type42/t42parse.c (t42_parse_sfnts): Simplify previous change.
Werner Lemberg c42848e6 2012-02-26T19:44:04 [type42] Minor code optimization. * src/type42/t42parse.c (t42_parse_sfnts): Use bitmask instead of modulo operator.
Werner Lemberg 82365c0d 2012-02-25T13:22:40 [type42] Fix Savannah bug #35602. * src/type42/t42parse.c (t42_parse_sfnts): Check `string_size' more thoroughly.
suzuki toshiya 1749d8bc 2012-01-17T02:00:24 Remove trailing spaces.
Werner Lemberg 5a7a593c 2011-11-30T13:38:51 [type42] Remove casts. * src/type42/t42driver.c (t42_driver_class): Remove all casts and update affected functions. * src/type42/t42objs.c, src/type42/t42objs.h: Updated for t42driver changes.
Werner Lemberg 70cf8c5e 2011-11-26T20:09:39 Improve tracing. * src/bdf/bdfdrivr.c (BDF_Face_Done), src/pcf/pcfdrivr.c (PCF_Face_Done): Remove tracing message. * src/bdf/bdfdrivr.c (BDF_Face_Init), src/cff/cffobjs.c (cff_face_init), src/cid/cidobjs.c (cid_face_init), src/pfr/pfrobjs.c (pfr_face_init), src/sfnt/sfobjs.c (sfnt_init_face), src/truetype/ttobjs.c (tt_face_init), src/type1/t1objs.c (T1_Face_Init), src/type42/t42objs.c (T42_Face_Init), src/winfonts/winfnt.c (FNT_Face_Init): Add `greeting' message. * src/sfnt/sfobjs.c (sfnt_open_font), src/type42/t42objs.c (T42_Open_Face): Improve tracing.
Werner Lemberg 930e9bf8 2011-11-26T13:38:26 Add new error code FT_Err_Missing_Module. Previously, FreeType misleadingly returned FT_Err_Unknown_File_Format if a module was missing (or a test was missing completely). * include/freetype/fterrdef.h (FT_Err_Missing_Module): Define. * src/cff/cffobjs.c (cff_face_init), src/cid/cidobjs.c (cid_face_init), src/sfnt/sfobjs.c (sfnt_init_face), src/truetype/ttobjs.c (tt_face_init), src/type1/t1objs.c (T1_Face_Init), src/type42/t42objs.c (T42_Face_Init, T42_Driver_Init): Updated. * src/type1/t1afm.c (T1_Read_Metrics), src/type/t1objs.c (T1_Face_Init), src/type42/t42objs.c (T42_Face_Init): Remove now redundant test for `psaux'.
Chris Liddell 8b90cf0b 2011-11-13T16:30:59 Add FT_Get_PS_Font_Value() API. This allows a Type 1 font face to be interrogated to retrieve most of the dictionary keys (keys not relevant to FreeType's Type 1 interpreter are not available). * include/freetype/internal/services/svpsinfo.h (PS_GetFontValueFunc): New typedef. (PSInfo): Add `ps_get_font_value'. (FT_DEFINE_SERVICE_PSINFOREC): Updated. * include/freetype/internal/t1types.h (T1_EncodingType): Moved to... * include/freetype/t1tables.h: Here. (PS_Dict_Keys): New enumeration. (FT_Get_PS_Font_Value): New declaration. * src/base/fttype1.c (FT_Get_PS_Font_Value): New function. * src/type1/t1driver.c (t1_ps_get_font_value): This new function does the real job. (t1_service_ps_info): Add it. * src/cff/cffdrivr.c (cff_service_ps_info), src/cid/cidriver.c (cid_service_ps_info), src/type42/t42drivr.c (t42_service_ps_info): Updated.
Werner Lemberg c06da1ad 2010-08-05T23:15:26 Fix Savannah bug #30656. * src/type42/t42parse.c (t42_parse_sfnts): Protect against negative string_size. Fix comparison.
suzuki toshiya d594202e 2010-07-11T00:31:17 Fix another case reported in Savannah bug #30373. Permit a face for Type1, Type42 and CFF without charmap, patch by Tor Andersson. * src/type1/t1objs.c (T1_Face_Init): Reset the error if it is FT_Err_No_Unicode_Glyph_Name. * src/type42/t42objs.c (T42_Face_Init): Ditto. * src/cff/cffobjs.c (cff_face_init): Ditto.
suzuki toshiya 84fa62e0 2010-07-09T23:43:14 Fix a mistake in t42objs.c in previous commit.
suzuki toshiya 840f208d 2010-07-09T12:26:33 Use defined macros to set {platform,encoding}_id. * src/bdf/bdfdrivr.c: Include ttnameid.h and use macros to set charmap.{platfom,encoding}_id. * src/pcf/pcfdrivr.c: Ditto. * src/winfonts/winfnt.c: Ditto. * src/type1/t1objs.c: Ditto. * src/type42/t42objs.c: Ditto. * src/cff/cffobjs.c: Ditto. * src/pfr/pfrobjs.c: Ditto.
suzuki toshiya b8ca6de3 2010-07-09T11:36:00 Fix Savannah bug #30373. Too serious check of errors by `FT_CMap_New' since 2010-07-04 is fixed. Reported by Tor Andersson. * include/freetype/fterrdef.h (PSnames_Err_No_Unicode_Glyph_Name): New error code to indicate the Unicode charmap synthesis failed because no Unicode glyph name is found. * src/psnames/psmodule.c (ps_unicodes_init): Return PSnames_Err_No_Unicode_Glyph_Name when no Unicode glyph name is found in the font. * src/cff/cffcmap.c (cff_cmap_unicode_init): Return CFF_Err_No_Unicode_Glyph_Name when no SID is available. * src/type1/t1objs.c (T1_Face_Init): Proceed if `FT_CMap_New' is failed by the lack of Unicode glyph name. * src/type42/t42objs.c (T42_Face_Init): Ditto. * src/cff/cffobjs.c (cff_face_init): Ditto.
suzuki toshiya a874c7ec 2010-07-04T12:08:41 Check error value by `FT_CMap_New'. * src/cff/cffobjs.c (cff_face_init): Check error value by `FT_CMap_New'. * src/pfr/pfrobjs.c (pfr_face_init): Ditto. * src/type1/t1jobjs.c (T1_Face_Init): Ditto. * src/type42/t42jobjs.c (T42_Face_Init): Ditto.
Werner Lemberg 370aea80 2010-06-08T08:37:11 Formatting.
John Tytgat 03e8b2f7 2009-09-01T08:10:24 Fix custom cmap for empty Type 1 font (Savannah bug #27294). * include/freetype/internal/t1types.h (T1_EncodingRecRec_): Update comment to reflect revised code_last meaning. * src/type1/t1load.c (T1_Open_Face), src/type42/t42objs.c (T42_Open_Face): Assign max_char as highest character code + 1 and use this for T1_EncodingRecRec_::code_last. * src/psaux/t1cmap.c (t1_cmap_custom_init): Follow revised T1_EncodingRecRec_::code_last meaning.
Werner Lemberg 858abbed 2009-06-26T06:15:41 For warning messages, replace FT_ERROR with FT_TRACE0. FT_ERROR is now used only if a function produces a non-zero `error' value. Formatting, improving and harmonizing debug strings.
Werner Lemberg b72af52b 2009-05-19T07:33:15 Fix Savannah bug #26600. * src/type42/t42parse.c (t42_load_keyword): Handle T1_FIELD_LOCATION_FONT_EXTRA.
Oran Agra 1dcd0f23 2009-04-05T18:25:14 Add #error to modules and files that do not support PIC yet. When FT_CONFIG_OPTION_PIC is defined the following files will create #error: * src/bdf/bdfdrivr.h * src/cache/ftcmanag.c * src/cid/cidriver.h * src/gxvalid/gxvmod.h * src/gzip/ftgzip.c * src/lzw/ftlzw.c * src/otvalid/otvmod.h * src/pcf/pcfdrivr.h * src/pfr/pfrdrivr.h * src/psaux/psauxmod.h * src/type1/t1driver.h * src/type42/t42drivr.h * src/winfonts/winfnt.h
Werner Lemberg 86e041b5 2009-03-21T08:51:44 Remove redundant header inclusions. This covers many Ghostscript Coverity issues. * src/*: Do it.
Werner Lemberg 15b60bb5 2009-03-03T21:35:32 Formatting, copyright years.
David Turner 01ca4da2 2009-03-03T13:28:59 Remove ABI-breaking field in public PS_InfoFontRec definition. Instead, we define a new internal PS_FontExtraRec structure to hold the additionnal field, then place it in various internal positions of the corresponding FT_Face derived objects.
Werner Lemberg 1ad384d8 2008-12-25T23:52:00 Set `face_index' field in FT_Face for all font formats. * cff/cffobjs.c (cff_face_init), winfonts/winfnt.c (FNT_Face_Init), sfnt/sfobjs.c (sfnt_init_face): Do it. * docs/CHANGES: Document it.
Werner Lemberg ce33a312 2008-12-21T10:29:30 FT_USE_MODULE declares things as: extern const FT_Module_Class (or similar for C++). However, the actual types of the variables being declared are often different, e.g., FT_Driver_ClassRec or FT_Renderer_Class. (Some are, indeed, FT_Module_Class.) This works with most C compilers (since those structs begin with an FT_Module_Class struct), but technically it's undefined behavior. To quote the ISO/IEC 9899:TC2 final committee draft, section 6.2.7 paragraph 2: All declarations that refer to the same object or function shall have compatible type; otherwise, the behavior is undefined. (And they are not compatible types.) Most C compilers don't reject (or even detect!) code which has this issue, but the GCC LTO development branch compiler does. (It outputs the types of the objects while generating .o files, along with a bunch of other information, then compares them when doing the final link-time code generation pass.) Patch from Savannah bug #25133. * src/base/ftinit.c (FT_USE_MODULE): Include variable type. * builds/amiga/include/freetype/config/ftmodule.h, include/freetype/config/ftmodule.h, */module.mk: Updated to declare pass correct types to FT_USE_MODULE.
Werner Lemberg 05bf6877 2008-12-18T06:32:10 * docs/CHANGES: Updated. Provide API for accessing embedding and subsetting restriction information. * include/freetype.h (FT_FSTYPE_INSTALLABLE_EMBEDDING, FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING, FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING, FT_FSTYPE_EDITABLE_EMBEDDING, FT_FSTYPE_NO_SUBSETTING, FT_FSTYPE_BITMAP_EMBEDDING_ONLY): New macros. (FT_Get_FSType_Flags): New function declaration. * src/base/ftobjs.c (FT_Get_FSType_Flags): New function. * src/cid/cidtoken.h, src/type1/t1tokens.h, src/type42/t42parse.c (t42_keywords): Handle `FSType'. * include/freetype/t1tables.h (PS_FontInfoRec): Add `fs_type' field.
Werner Lemberg 1a5d561d 2008-11-29T22:50:24 * src/autofit/afcjk.c, src/base/ftoutln.c, src/base/ftrfork.c, src/bdf/bdfdrivr.c, src/gxvalid/gxvmorx.c, src/otvalid/otvmath.c, src/pcf/pcfdrivr.c, src/psnames/pstables.h, src/smooth/ftgrays.c, src/tools/glnames.py, src/truetype/ttinterp.c, src/type1/t1load.c, src/type42/t42objs.c, src/winfonts/winfnt.c: Fix compiler warnings (Atari PureC).
Werner Lemberg 89a1a518 2008-10-02T06:48:10 * builds/freetype.mk (BASE_H): Rename to... (INTERNAL_H): This. (FREETYPE_H): Updated. * src/base/rules.mk: (BASE_OBJ_S, OBJ_DIR/%.$O): Add BASE_H. * src/bdf/rules.mk (BDF_DRV_H): Add bdferror.h. * src/cache/rules.mk (CACHE_DRV_H): Add ftccache.h and ftcsbits.h. * src/pcf/rules.mk (PCF_DRV_H): Add pcfread.h. * src/raster/rules.mk (RASTER_DRV_H): Add ftmisc.h. * src/type42/rules.mk (T42_DRV_H): Add t42types.h.
Werner Lemberg d03d856d 2008-10-01T22:39:05 * src/truetype/ttobjs.c (tt_face_done), src/cff/cffobjs.c (cff_face_done), src/pfr/pfrobjs.c (pfr_face_done), src/pcf/pcfdrivr.c (PCF_Face_Done), src/cid/cidobjs.c (cid_face_done), src/bdf/bdfdrivr. (BDF_Face_Done), src/sfnt/sfobjs.c (sfnt_face_done): Protect against face == 0. Reported by Graham Asher.
Werner Lemberg 6bc16e92 2008-10-01T21:16:44 s/synthetize/synthesize/
Werner Lemberg bd0f71aa 2008-09-22T08:55:44 Fix Savannah bug #24307. * include/freetype/internal/t1types.h (CID_FaceRec), src/type42/t42types.h (T42_FaceRec): Comment out `afm_data'. * src/smooth/ftgrays.c (gray_raster_render): Don't dereference `target_map' if FT_RASTER_FLAG_DIRECT is set. Problem reported by Stephan T. Lavavej <stl@nuwen.net>.
Werner Lemberg 2b0b4221 2008-05-28T22:17:28 Cosmetic code changes.
Werner Lemberg bb2510da 2007-06-18T17:07:49 * src/type42/t42parse.c (t42_parse_encoding): Handle one more error.
Werner Lemberg f9fa1c8b 2007-06-18T17:00:05 * src/psaux/psobjs.c (ps_parser_skip_PS_token): Remove incorrect assertion. (ps_parser_to_bytes): Fix error message. * src/type42/t42objs.c (T42_Open_Face): Handle one more error return. * src/type42/t42parse.c (t42_parse_sfnts): s/alloc/allocated/. Don't allow mixed binary and hex strings. Handle zero string_size == 0 and string_buf == 0.
Werner Lemberg 442bfb89 2007-02-12T21:44:10 Formatting, copyright years, s/memcpy/ft_memcpy/.
David Turner c0f9c4aa 2007-02-12T14:55:03 introduce ft_mem_dup, ft_mem_strdup and ft_mem_strcpyn, and the corresponding macros to use them (e.g. FT_STRDUP, FT_DUP and FT_STRCPYN) modify the code to use them instead of raw mallocs/strcpy
Werner Lemberg 8c4120d0 2007-01-15T06:42:40 Fix various compiler warnings. * src/truetype/ttdriver.c (tt_size_select), src/cff/cffobjs.h, src/cff/cffobjs.c (cff_size_request), src/type42/t42objs.h: s/index/strike_index/. * src/base/ftobjs.c (FT_Match_Size): s/index/size_index/. * src/gxvalid/gxvmorx5.c (gxv_morx_subtable_type5_InsertList_validate): s/index/table_index/. * src/truetype/ttinterp.c (Compute_Point_Displacement), src/pcf/pcfread.c (pcf_seek_to_table_type): Avoid possibly uninitialized variables.
Werner Lemberg 2d8629b3 2006-09-03T06:18:45 * devel/ftoption.h: Synchronize with include/freetype/config/ftoption.h. * src/smooth/ftgrays.c (gray_record_cell): Remove shadowing variable declaration. (gray_convert_glyph): Fix compiler warnings. Formatting, copyright years.
David Turner 6aa260ce 2006-08-25T22:45:13 support for "automatic unpatented hinting" added we still need to determine the list of "trick" CJK fonts that are going to toggle the bytecode interpreter instead of the auto-hinter
Jens Claudius 9950adcc 2006-08-13T12:14:36 * freetype2/include/freetype/internal/psaux.h: (enum T1_TokenType_): add T1_TOKEN_TYPE_KEY. (struct T1_FieldRec_) add `dict'. Add macros T1_FIELD_DICT_FONTDICT and T1_FIELD_DICT_PRIVATE. Change T1_NEW_XXX and T1_FIELD_XXX macros to take the dictionary where the PS keywords is expected as an additional argument. * freetype2/src/cid/cidload.c: (T1_FieldRec): Adjust invocations of T1_FIELD_XXX. * freetype2/src/cid/cidtoken.h: Adjust invocations of T1_FIELD_XXX. * freetype2/src/psaux/psobjs.c: Add macro FT_COMPONENT for tracing. (ps_parser_to_token): Report a PostScript key as T1_TOKEN_TYPE_KEY instead as T1_TOKEN_TYPE_ANY. (ps_parser_load_field): Make sure a token that should be a string or name is a string or name indeed. Avoid memory leak if a keyword has been already encountered and its value is overwritten. * freetype2/src/type1/t1load.c: (T1_FieldRec): Adjust invocations of T1_FIELD_XXX. (parse_dict): Ignore keywords that occur in the wrong dictionary (e.g., in Private instead of FontDict). * freetype2/src/type1/t1tokens.h: Adjust invocations of T1_FIELD_XXX.
Werner Lemberg c6afa122 2006-05-02T22:22:16 * include/freetype/internal/ftmemory.h: s/new/newsz/ (for C++). (FT_ALLOC): Remove redundant redefinition. * builds/compiler/gcc-dev.mk (CFLAGS) [g++]: Don't use `-Wstrict-prototypes'. * src/base/ftstream.c (FT_Stream_EnterFrame): Add cast. Formatting, copyright years.
David Turner 9ca78256 2006-05-02T09:00:29 * include/freetype/internal/ftmemory.h, src/base/ftbitmap.c, src/base/ftmac.c, src/base/ftrfork.c, src/lzw/ftzopen.c, src/raster/ftrend1.c, src/sfnt/ttpost.c, src/truetype/ttgxvar.c, src/type42/t42parse.c, src/winfonts/winfnt.c: hardening the code against out-of-bounds conditions when allocating arrays. This is for the cases where FT_NEW_ARRAY and FT_RENEW_ARRAY are not used already. Introducing the new FT_ALLOC_MULT and FT_REALLOC_MULT macros.
David Turner cda2d957 2006-02-16T22:45:31 * builds/amiga/src/base/ftsystem.c, devel/ftoption.h include/freetype/ftcache.h, include/freetype/ftoutln.h, include/freetype/cache/ftccache.h, include/freetype/cache/ftccmap.h, include/freetype/config/ftoption.h, include/freetype/internal/ftcalc.h, include/freetype/internal/ftdriver.h, include/freetype/internal/ftmemory.h, include/freetype/internal/ftobjs.h, include/freetype/internal/ftrfork.h, include/freetype/internal/psaux.h, include/freetype/internal/sfnt.h, include/freetype/internal/t1types.h, include/freetype/internal/tttypes.h, src/base/ftcalc.c, src/base/ftdbgmem.c, src/base/ftobjs.c, src/base/ftsystem.c, src/base/ftutil.c, src/bdf/bdfdrivr.c, src/cache/ftccache.c, src/cache/ftccback.h, src/cache/ftccmap.c, src/cache/ftcmanag.c, src/cff/cffdrivr.c, src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c, src/psaux/psauxmod.c, src/sfnt/sfdriver.c, src/truetype/ttdriver.c, src/type1/t1driver.c, src/type1/t1objs.c, src/type42/t42drivr.c, src/winfonts/winfnt.c: massive changes to the internals to respect the internal object layouts and exported functions of FreeType 2.1.7. Note that the cache sub-system cannot be fully retrofitted, unfortunately.
Wu, Chia-I (吳佳一) 0d565fdc 2006-02-15T07:44:31 * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Remove unused `max_points' and `max_contours'. * src/cid/cidobjs.c (cid_face_init), src/type1/t1objs.c (T1_Face_Init), src/type42/t42objs.c (T42_Face_Init): Update. * include/freetype/internal/tttypes.h (TT_FaceRec): Remove unused `max_components'. * src/truetype/ttinterp.h (TT_ExecContextRec): Remove unused `loadSize' and `loadStack'. * src/truetype/ttinterp.c (TT_Done_Context, TT_Load_Context), src/sfnt/ttload.c (tt_face_load_maxp): Update. * src/cff/cffobjs.h (cff_size_select), src/sfnt/sfdriver.c (sfnt_interface), src/truetype/ttdriver.c (tt_size_request): Fix compiler errors/warnings when TT_CONFIG_OPTION_EMBEDDED_BITMAPS is not defined. * src/sfnt/ttmtx.c (tt_face_load_hmtx, tt_face_get_metrics): Fix possible segment faults for the non-FT_OPTIMIZE_MEMORY'ed versions. (finally!) For most OpenType tables, `tt_face_load_xxxx' simply loads the table and `face->root' is set later in `sfnt_load_face'. Here, we try to make this work for _all_ tables. * src/sfnt/ttsbit.c, src/sfnt/ttsbit0.c, src/sfnt/ttload.c, src/sfnt/ttmtx.c: all `tt_face_load_xxxx' should load the table and then exit. Error handling or setting face->root is done later in `sfnt_load_face'. Pretty trace messages. * src/sfnt/sfobjs.c (sfnt_load_face): Work harder. Mac bitmap-only fonts are not scalable. Check that `face->header.Units_Per_EM' is not zero. (LOAD_, LOADM_): Pretty trace messages. * src/sfnt/ttsbit0.c (tt_face_load_strike_metrics): Read metrics from `eblc'. * src/sfnt/ttcmap.c (tt_face_build_cmaps), src/sfnt/ttpost.c (load_format_20, load_format_25, tt_face_get_ps_name): Use face->max_profile.numGlyphs, instead of face->root.num_glyphs.
Werner Lemberg 59939244 2006-01-31T20:17:42 Implement new, simplified module selection. With GNU make it is now sufficient to modify a single file, `modules.cfg', to control the inclusion of modules and base extension files. This change also fixes the creation of ftmodule.h; it now depends on `modules.cfg' and thus is rebuilt only if necessary. Finally, a version of `ftoption.h' in OBJ_DIR is preferred over the default location. * modules.cfg: New file. * builds/freetype.mk: Don't include `modules.mk'. Include all `rules.mk' files as specified in `modules.cfg'. (FTOPTION_FLAG, FTOPTION_H): New variables. (FT_CFLAGS): Add macro definition for FT_CONFIG_MODULES_H. Add FTOPTION_FLAG. ($(FT_INIT_OBJ)): Don't use FT_MODULE_LIST. (CONFIG_H): Add FTMODULE_H and FTOPTION_H. (INCLUDES): Add DEVEL_DIR. (INCLUDE_FLAGS, FTSYS_SRC, FTSYS_OBJ, FTDEBUG_SRC, FTDEBUG_OBJ, OBJ_M, OBJ_S): Use `:=', not `='. (remove_ftmodule_h): New phony target to delete `ftmodule.h'. (distclean): Add remove_ftmodule_h. * builds/modules.mk: (MODULE_LIST): Removed. (make_module_list, clean_module_list): Replace targets with... (FTMODULE_H_INIT, FTMODULE_H_CREATE, FTMODULE_H_DONE): New variables. Reason for the change is that it is not possible to have a phony prerequisite which is run only if the target file must be rebuilt (phony prerequisites act like subroutines and are *always* executed). We only want to rebuild `ftmodule.h' if `module.cfg' is changed. Update all callers. ($FTMODULE_H)): Rule to create `ftmodule.h', depending on `modules.cfg'. * builds/toplevel.mk: Rewrite and simplify module handling. (MODULES_CFG, FTMODULE_H): New variables. Include MODULES_CFG. (MODULES): New variable to include all `module.mk' and `rules.mk' files. We no longer use make's `wildcard' function for this. * Makefile (USE_MODULES): Remove. Update all users. (OBJ_DIR): Define it here. * src/*/module.mk: Change make_module_list: foo foo: ... to FTMODULE_H_COMMANDS += FOO define FOO ... endef in all files. `FTMODULE_H_COMMANDS' is used in `FTMODULE_H_CREATE'. * src/base/rules.mk (BASE_EXT_SRC): Use BASE_EXTENSIONS. * builds/unix/detect.mk (setup): Always execute `configure' script. (have_mk): Rename to... (have_Makefile): This. Don't use `strip' function. * builds/unix/unix.mk: Include `install.mk' only if BUILD_PROJECT is defined. (have_mk): Don't use `strip' function. Test for unix-def.mk in OBJ_DIR, not BUILD_DIR (and invert the test accordingly). * builds/unix/install.mk (install, uninstall): Handle `ftmodule.h'. * builds/os2/os2-dev.mk, builds/unix/unix-dev.mk, builds/win32/w32-bccd.mk, builds/win32/w32-dev.mk: Don't define BUILD_DIR but DEVEL_DIR for development header files. * builds/ansi/ansi-def.mk (TOP_DIR, OBJ_DIR), builds/beos/beos-def.mk (TOP_DIR, OBJ_DIR), builds/unix/unix-def.in (TOP_DIR, OBJ_DIR): Removed. Defined elsewhere. * builds/dos/dos-def.mk (OBJ_DIR), builds/os2/os2-def.mk (OBJ_DIR), builds/win32/win32-def.mk (OBJ_DIR): Removed. Defined elsewhere. * builds/unix/unixddef.mk: Don't define BUILD_DIR but DEVEL_DIR for development header files. Don't define PLATFORM. * configure: Copy `modules.cfg' to builddir if builddir != srcdir. Update snippet taken from autoconf's m4sh.m4 to current CVS version. Be more verbose. * include/freetype/config/ftmodule.h: Add comments -- this file is no longer used if FreeType is built with GNU make. * docs/CHANGES, docs/CUSTOMIZE, docs/INSTALL, docs/INSTALL.ANY, docs/INSTALL.GNU, docs/INSTALL.UNX: Document new build mechanism. Other minor updates. * modules.txt: Removed. Contents included in `modules.cfg'. * include/freetype/internal/ftmemory.h (FT_QAlloc_Debug, FT_Free_Debug) [FT_STRICT_ALIASING]: Fix typos. * src/base/ftdbgmem.c (FT_Alloc_Debug, FT_Realloc_Debug, FT_QAlloc_Debug, FT_QRealloc_Debug, FT_Free_Debug) [FT_STRICT_ALIASING]: Implement.
Werner Lemberg 7596fd3a 2006-01-28T16:29:29 * src/*/module.mk (.PHONY): Add.
Werner Lemberg f6a25503 2006-01-28T10:38:15 * devel/ftoption.h: Synchronize with include/freetype/config/ftoption.h. * src/autofit/module.mk (add_autofit_module), src/bdf/module.mk (add_bdf_module), src/type42/module.mk (add_type42_driver): Fix whitespace. * src/smooth/module.mk (add_smooth_renderer): Add lcd and lcdv renderer classes.
Wu, Chia-I (吳佳一) bcc438b1 2006-01-23T14:12:40 * include/freetype/freetype.h (FT_Select_Size): Rename the second argument from `idx' to `strike_index'. (FT_Size_Request_Type): Add FT_SIZE_REQUEST_TYPE_MAX to the end of this enum. * include/freetype/internal/ftobjs.h (FT_REQUEST_WIDTH, FT_REQUEST_HEIGHT): New macros to get the width and height of a request, in fractional pixels. * include/freetype/internal/ftobjs.h (FT_Select_Metrics, FT_Request_Metrics), src/base/ftobjs.c (FT_Select_Metrics, FT_Request_Metrics): New base functions to set the font metrics. They were part of FT_Select_Size/FT_Request_Size and are made independent functions so that metrics are not set again and again. * src/base/ftobjs.c (FT_Select_Size, FT_Request_Size): Metrics are set only when driver's size_select/size_request is NULL. That is, drivers should set the metrics themselves. (FT_Match_Size): Round before matching. This was what we did and it does cause some problems without rounding. * src/cff/cffobjs.c (cff_size_select), src/truetype/ttdriver.c (tt_size_select): Set the font metrics. s/index/strike_index/. The scaled metrics are always preferred over strikes' metrics, even when some strike is selected. This is done because the strikes' metrics are not reliable, e.g., the sign of the descender is wrong for some fonts. * src/cff/cffobjs.c (cff_size_request), src/truetype/ttdriver.c (tt_size_request): Set the font metrics. Call cff_size_select/tt_size_select when some strike is matched. * src/bdf/bdfdrivr.c, src/cff/cffobjs.c, src/cid/cidobjs.c, src/pcf/pcfdrivr.c, src/truetype/ttdriver.c, src/type1/t1objs.c, src/type1/t1objs.h, src/type42/t42objs.c, src/winfonts/winfnt.c: Set the font metrics. s/index/strike_index/. * src/tools/test_afm.c, src/psaux/psconv.c: Older versions of these files were committed. Just a catch-up. (PS_Conv_ToFixed): Remove the `goto'. (PS_Conv_ASCIIHexDecode, PS_Conv_EexecDecode): Speed up a little. * src/sfnt/ttsbit.c (tt_face_load_sbit_strikes, tt_face_load_strike_metrics), src/sfnt/ttsbit0.c (tt_face_load_sbit_strikes, tt_face_load_strike_metrics): The advertised metrics in `available_sizes' are different from those actually used.
Werner Lemberg f1c2b91e 2006-01-13T14:53:28 Formatting, copyright year updates. Decorate long constants with `L' and `UL' where appropriate.
Wu, Chia-I (吳佳一) fa7d6ab2 2006-01-13T12:21:31 * include/freetype/internal/sfnt.h (SFNT_Interface): New method `load_strike_metrics' used to load the strike's metrics. * src/sfnt/sfdriver.c, src/sfnt/ttsbit.c, src/sfnt/ttsbit.h, src/sfnt/ttsbit0.c: New function `tt_face_load_strike_metrics'. * src/pfr/pfrobjs.c (pfr_face_init): Set FT_Bitmap_Size correctly. * src/winfonts/winfnt.c (FNT_Face_Init): Use `nominal_point_size' for nominal size unless it is obviously incorrect. * include/freetype/freetype.h (FT_Bitmap_Size): Update the comments on FNT driver. Introduce new size selection interface. * include/freetype/internal/ftdriver.h (struct FT_Driver_ClassRec_): Replace `set_char_sizes' and `set_pixel_sizes' by `request_size' and `select_size'. * include/freetype/freetype.h (FT_Select_Size, FT_Size_Request_Type, FT_Size_Request, FT_Request_Size, FT_Select_Size), src/base/ftobjs.c (FT_Select_Size, FT_Request_Size): API additions to export the new size selection interface. * src/base/ftobjs.c (FT_Set_Char_Size, FT_Set_Pixel_Sizes): Use `FT_Request_Size'. * include/freetype/internal/ftobjs.h (FT_Match_Size), src/base/ftobjs.c (FT_Match_Size): New function to match a size request against `available_sizes'. Drivers supporting bitmap strikes can use this function to implement `request_size'. * src/bdf/bdfdrivr.c, src/cid/cidobjs.c, src/cid/cidobjs.h, src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/type1/t1driver.c, src/type1/t1objs.c, src/type1/t1objs.h, src/type42/t42drivr.c, src/type42/t42objs.c, src/type42/t42objs.h, src/winfonts/winfnt.c: Update to new size selection interface. * src/cff/cffdrivr.c, src/cff/cffgload.c, src/cff/cffobjs.c, src/cff/cffobjs.h, src/truetype/ttdriver.c, src/truetype/ttgload.c, src/truetype/ttobjs.c, src/truetype/ttobjs.h: Update to new size selection interface. Make `strike_index' FT_ULong and always defined. Use `load_strike_metrics' provided by SFNT interface.
Werner Lemberg 8ab0979d 2006-01-12T08:12:27 Prepare use of pscmap service within CFF module. * include/freetype/internal/services/svpscmap.h: Include FT_INTERNAL_OBJECTS_H. (PS_Unicode_Index_Func): Removed. Unused. (PS_Macintosh_Name_Func): Renamed to... (PS_Macintosh_NameFunc): This. Update all callers. (PS_Adobe_Std_Strings_Func): Renamed to... (PS_Adobe_Std_StringsFunc): This. Update all callers. (PS_UnicodesRec): This is the former `PS_Unicodes' structure. Add `cmap' member. Update all callers. (PS_Unicodes): This is now a typedef'd pointer to PS_UnicodesRec. Update all callers. (PS_Glyph_NameFunc): New typedef. (PS_Unicodes_InitFunc): Change arguments to expect a function and generic data pointer which returns a glyph name from a given index. * src/psnames/psmodule.c (ps_unicodes_init, ps_unicodes_char_index, ps_unicodes_char_next, pscmaps_interface): Updated. * include/freetype/internal/t1types.h (T1_FaceRec): Updated. * src/psaux/t1cmap.h (T1_CmapStdRec): Updated. (T1_CmapUnicode, T1_CmapUnicodeRec): Removed. * src/psaux/t1cmap.c (t1_get_glyph_name): New callback function. (t1_cmap_unicode_init, t1_cmap_unicode_done, t1_cmap_unicode_char_index, t1_cmap_unicode_char_next, t1_cmap_unicode_class_rec): Updated. * src/type42/t42types.h (T42_FaceRec): Updated.
Werner Lemberg 2a0903a5 2005-12-03T08:13:43 * src/type42/t42objs.x (T42_Face_Init): Replace call to FT_New_Memory_Face with call to FT_Open_Face to pass `params'.