src/psaux/afmparse.c


Log

Author Commit Date CI Message
Werner Lemberg 9159128a 2019-05-29T07:45:54 Silence gcc 7's fall-through warnings in `switch' blocks. Instead of an intentionally missing `break' statement there must be a comment line containing `fall through' (and nothing else) right before the next `case' statement. See https://stackoverflow.com/questions/45129741/gcc-7-wimplicit-fallthrough-warnings-and-portable-way-to-clear-them
Werner Lemberg 75859970 2019-02-23T10:07:09 Update all copyright notices.
Werner Lemberg f686ad46 2019-01-22T20:31:44 Update copyright years.
Werner Lemberg 9ac9060d 2018-06-03T09:01:17 [GSoC] src/*.*: Convert block comments to `light' style. This monster commit was created by applying Nikhil's scripts `docconverter.py' and `markify.py' to all C header and source files, followed up by minor manual clean-up. No change in functionality, of course. I used commit f7419907bc6044b9b7057f9789866426c804ba82 from https://github.com/nikramakrishnan/freetype-docs.git.
Werner Lemberg 0a0c2256 2018-01-02T09:33:57 Update copyright year.
Werner Lemberg 9931175d 2017-03-18T07:06:49 Improve `make multi'. * src/autofit/aflatin2.c: Guard file with FT_OPTION_AUTOFIT2. * src/base/ftmac.c: Guard more parts of the file with FT_MACINTOSH. * src/psaux/afmparse.c: Guard file with T1_CONFIG_OPTION_NO_AFM. * src/sfnt/pngshim.c: Guard file with TT_CONFIG_OPTION_EMBEDDED_BITMAPS also. * src/sfnt/ttbdf.c: Avoid empty source file. * src/sfnt/ttpost.c: Guard file with TT_CONFIG_OPTION_POSTSCRIPT_NAMES. * src/sfnt/ttsbit.c: Guard file with TT_CONFIG_OPTION_EMBEDDED_BITMAPS. * src/truetype/ttgxvar.c, src/truetype/ttinterp.c: Avoid empty source file. * src/truetype/ttsubpix.c: Guard file with TT_USE_BYTECODE_INTERPRETER also. * src/type1/t1afm.c: Guard file with T1_CONFIG_OPTION_NO_AFM. * src/autofit/autofit.c, src/base/ftbase.c, src/cache/ftcache.c, src/cff/cff.c, src/cid/type1cid.c, src/gxvalid/gxvalid.c, src/pcf/pcf.c, src/pfr/pfr.c, src/psaux/psaux.c, src/pshinter/pshinter.c, src/psnames/psnames.c, src/raster/raster.c, src/sfnt/sfnt.c, src/smooth/smooth.c, src/truetype/truetype.c, src/type1/type1.c, src/type42/type42.c: Remove conditionals; sort entries.
Werner Lemberg 563ae780 2017-01-04T20:16:34 Update copyright year.
Werner Lemberg 9adeab64 2016-01-13T11:54:10 Update copyright year.
Alexei Podtelezhnikov eabc8d72 2015-04-12T23:16:48 [psaux,psnames,type1,type42] NULL.
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 04c22370 2015-02-25T11:20:20 [psaux] Signedness fixes. * include/internal/psaux.h, src/psaux/afmparse.c, src/psaux/afmparse.h, src/psaux/psconv.c, src/psaux/psobjs.c, src/psaux/t1cmap.c, src/psaux/t1decode.c: Apply.
Werner Lemberg 272e3cd0 2015-02-18T11:38:46 [psaux, type1] Fix minor AFM issues. * include/internal/t1types.h (AFM_KernPairRec): Make indices unsigned. Update users. (AFM_FontInfoRec): Make element counters unsigned. Update users. * src/psaux/afmparse.h (AFM_ValueRec): Add union member for unsigned int. * src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs): Reject negative values for number of kerning elements. * src/type1/t1afm.c, src/tools/test_afm.c: Updated.
Werner Lemberg f57fc59e 2015-01-17T20:41:43 Run `src/tools/update-copyright'.
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 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 ceed93e3 2012-03-03T07:03:08 [psaux] Fix handling of track kerning. * src/psaux/afmparse.c (afm_parse_track_kern): Don't inverse sign for `min_kern'. It is indeed quite common that track kerning *increases* spacing for very small sizes.
Werner Lemberg c52f44d4 2011-11-30T10:46:53 Whitespace.
Werner Lemberg c8f5b98b 2010-07-12T21:13:22 Remove C++ warnings. */*: Initialize pointers where necessary to make g++ happy.
suzuki toshiya 259568cf 2009-08-01T00:32:13 psaux: Handle the string length by FT_Offset variables.
suzuki toshiya d3ed6d1b 2009-08-01T00:30:24 psaux: Prevent invalid arguments to afm_parser_read_vals().
suzuki toshiya d1ee3785 2009-08-01T00:30:16 type1: Use size_t variable to pass the string length.
Werner Lemberg 86e041b5 2009-03-21T08:51:44 Remove redundant header inclusions. This covers many Ghostscript Coverity issues. * src/*: Do it.
Werner Lemberg a4cb0d95 2008-08-23T19:54:06 * src/type/t1afm.c (compare_kern_pairs), src/pxaux/afmparse.c (afm_compare_kern_pairs): Fix comparison. This fixes Savannah bug #24119.
Werner Lemberg 607dec79 2007-05-15T06:49:37 * src/autofit/afcjk.c (af_cjk_hints_compute_edges): Remove unused variable. * src/autofit/afloader.c (af_loader_load_g): Ditto. * src/base/ftobjs.c (ft_validator_error): Use `ft_jmp_buf'. (open_face_from_buffer): Initialize `stream'. (FT_Request_Metrics): Remove unused variable. Remove redundant `break' statements. (FT_Get_Track_Kerning): Remove unused variable. * src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs, afm_parse_kern_data): Remove redundant `break' statements. (afm_parser_parse): Ditto. Don't use uninitialized variables. * src/psnames/psmodule.c (VARIANT_BIT): Define as unsigned long. Use `|' operator instead of `^' to set it. Update all users. * src/sfnt/ttcmap.c (tt_face_build_cmaps): Use `ft_jmp_buf'. * src/sfnt/ttkern.c (tt_face_load_kern): Remove unused variable. * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Remove redundant comparison. (TT_Process_Simple_Glyph): Use FT_UInt for `n_points' and `i'. (TT_Load_Glyph): Remove unused variable.
David Turner 6c71c6b9 2006-02-25T12:49:40 * include/freetype/config/ftoption.h, src/autofit/afcjk.c, src/base/ftobjs.c, src/base/ftutil.c, src/cff/cffobjs.c, src/psaux/afmparse.c, src/sfnt/ttbdf.c, src/tools/apinames.c, src/truetype/ttdriver.c: solved compiler warnings as well as C++ compilation problems
Wu, Chia-I (吳佳一) 98d802b8 2006-01-31T07:01:24 * include/freetype/internal/t1types.h (AFM_FontInfo), src/psaux/afmparse.c, src/tools/test_afm.c: Read `FontBBox', `Ascender', and `Descender' from an AFM. * src/type1/t1afm.c (T1_Read_Metrics): Use the metrics from the AFM. * include/freetype/freetype.h (FT_FaceRec): Mention that fields may be changed after file attachment.
Werner Lemberg be3c9814 2006-01-27T14:16:16 Formatting, copyright years.
David Turner 6a681fa8 2006-01-27T12:11:22 * src/autofit/afwarp.c: simple #ifdef to prevent compilation when the warp hinter isn't active (it shouldn't, still experimental) * Jamfile, include/freetype/config/ftmodule.h: removed "gxvalid" and "otvalid" from the list of modules that are linked statically to a given FreeType library. Functionality has been moved to the "ftvalid" CVS module. note also that current Make-based build system still compiles the modules though... * include/freetype/config/ftoption.h: added FT_STRICT_ALIASING, which controls the definitions of the memory management functions to avoid warnings with recent versions of GCC. this macro is only here to be disabled, in case we detect problems with the new scheme. NOTE: disable macro to use the memory debugger. this will be fixed later !!
Werner Lemberg 47bf95dd 2006-01-17T16:55:32 Use pscmap service in CFF module. * src/cff/cffcmap.c (cff_cmap_uni_pair_compare): Removed. (cff_sid_to_glyph_name): New function. (cff_cmap_unicode_init, cff_cmap_unicode_done, cff_cmap_unicode_char_index, cff_cmap_unicode_char next): Use pscmap service. (cff_cmap_unicode_class_rec): Updated. * src/cff/cffcmap.h (CFF_CMapUnicode, CFF_CMap_UniPair): Removed. * src/psnames/psmodule.c (ps_unicodes_char_next): Fix `unicode' return value. * src/psaux/afmparse.c (afm_parser_read_vals): Use double casting to avoid type-punning compiler warnings.
Werner Lemberg ce94c7a9 2006-01-16T22:35:33 Formatting, copyright years.
Wu, Chia-I (吳佳一) 108fdbbb 2006-01-16T15:35:56 * src/psaux/afmparse.c, src/psaux/afmparse.h: New files which implement an AFM parser. It is used to parse an AFM file. * src/psaux/psconv.c, src/psaux/psconv.h: New files to provide conversion functions (e.g, PS real number => FT_Fixed) for the PS_Parser and AFM_Parser. Some of the functions are taken, with some modifications, from the psobjs.c * src/psaux/psobjs.c: Use functions from psconv.c. * include/freetype/internal/psaux.h, src/psaux/psauxmod.c:: Add `AFM_Parser' to the `psaux' service. * src/psaux/psaux.c, src/psaux/rules.mk: Include those new files. * src/tools/test_afm.c: A test program for AFM parser. * include/freetype/internal/services/svkern.h, include/freetype/internal/ftserv.h: New service `Kerning'. It is currently only used to get the track kerning information. * src/type1/t1driver.c, src/type1/t1objs.c, src/type1/t1afm.c, src/type1/t1afm.h: Update to use the AFM parser. Provide the `Kerning' service. * include/freetype/freetype.h, src/base/ftobjs.c: New API `FT_Get_Track_Kerning'.