src/sfnt


Log

Author Commit Date CI Message
Werner Lemberg 64b395cc 2013-12-04T06:18:56 [sfnt] Fix handling of embedded bitmap strikes. This corrects the commit from 2013-11-21. Problem reported by Andrey Panov <panov@canopus.iacp.dvo.ru>. * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Fix logic to detect excessive bytes for bit-aligned bitmaps.
Werner Lemberg a44b784b 2013-12-02T09:52:38 Formatting.
Werner Lemberg 9326cafa 2013-11-23T23:59:25 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Typo.
Werner Lemberg 8af2a1cd 2013-11-21T13:13:12 [truetype] Typo. Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>. * src/sfnt/sfobjs.c (sfnt_load_face): Return correct `bsize->width' value if the font lacks an `OS/2' table.
Werner Lemberg 427b1768 2013-11-21T13:10:56 [truetype] Improve handling of buggy embedded bitmap strikes. We are now able to successfully load `AppleMyoungJo.ttf'. Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>. * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Don't trust glyph format.
Werner Lemberg bc25de66 2013-11-16T07:52:20 [sfnt] Fix `OS/2' table version 5 support. We now follow the `official' announcement from Microsoft (on the OpenType mailing list, which unfortunately hasn't a public archive). * include/freetype/tttables.h (TT_OS2): s/usLowerPointSize/usLowerOpticalPointSize/, s/usUpperPointSize/usUpperOpticalPointSize/. * src/sfnt/ttload.c (tt_face_load_os2): Update, and set correct default values.
Werner Lemberg ee510510 2013-10-27T07:25:35 [sfnt] Implement support for `OS/2' table version 5. See http://typedrawers.com/discussion/470/new-microsoft-size-specific-design-selection-mechanism for the announcement. * include/freetype/tttables.h (TT_OS2): Add fields `usLowerPointSize' and `usUpperPointSize'. Since FreeType returns this structure only as a pointer through `FT_Get_Sfnt_Table', there shouldn't be any ABI problems. * src/sfnt/ttload.c (tt_face_load_os2): Implement it. * docs/CHANGES: Updated.
Darrell Bellert 01af71d4 2013-10-02T22:04:07 * src/sfnt/ttload.c (tt_face_load_pclt): Fix `pclt_fields'.
Werner Lemberg 85a7fdf3 2013-08-29T21:03:05 [sfnt] Fix frame access while reading WOFF table directory. * src/sfnt/sfobjs.c (woff_open_font): Using single memory frame while reading the directory entries for the whole loop.
Werner Lemberg d689d1cf 2013-08-29T17:53:40 Implement support for WOFF containers. We simply synthesize a SFNT from the WOFF, create a memory stream for the new data, and load the SFNT as usual. Does NOT add any API to access WOFF metadata or private blocks. * include/freetype/internal/tttypes.h (WOFF_HeaderRec, WOFF_TableRec): New structures. * include/freetype/tttags.h (TTAG_wOFF): New macro. * src/base/ftobjs.c (FT_Open_Face): Set `stream' after calling `open_face'. * src/sfnt/sfobjs.c [FT_CONFIG_OPTION_SYSTEM_ZLIB]: Include `FT_GZIP_H'. (WRITE_BYTE, WRITE_USHORT, WRITE_ULONG): New temporary macros for writing to a stream. (sfnt_stream_close, compare_offsets, woff_open_font): New functions. (sfnt_open_font): Handle `TTAG_wOFF'. (sfnt_init_face): Set `stream' after calling `sfnt_open_font'. * src/truetype/ttobjs.c (tt_face_init): Set `stream' after calling `sfnt->init_face'. * src/base/ftobjs.c (open_face): Use a pointer to FT_Stream as an argument so that a changed stream survives. Update callers.
Behdad Esfahbod c799dd67 2013-08-27T21:46:03 * src/sfnt/ttload.c (tt_face_load_font_dir): Fix sign typos.
Werner Lemberg 74a9b670 2013-08-02T14:53:32 [sfnt] Fix compilation with g++. * src/sfnt/pngshim.c (error_callback, read_data_from_FT_stream): Use cast. (Load_SBit_Png): Pacify compiler.
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.
Behdad Esfahbod 21c32b08 2013-07-25T21:53:18 Add FT_FACE_FLAG_COLOR and FT_HAS_COLOR. Also disambiguate Google's color bitmap tables. * include/freetype/freetype.h (FT_FACE_FLAG_COLOR, FT_HAS_COLOR): New macros. * include/freetype/internal/tttypes.h (TT_SbitTableType): Add TT_SBIT_TABLE_TYPE_CBLC. * src/sfnt/sfobjs.c (sfnt_load_face): Handle FT_FACE_FLAG_COLOR. * src/sfnt/ttsbit.c (tt_face_load_sbit, tt_face_load_strike_metrics, tt_face_load_sbit_image): Handle TT_SBIT_TABLE_TYPE_CBLC.
suzuki toshiya b4725cb7 2013-07-24T14:25:39 [sfnt] Fix for `make multi' target. * src/sfnt/pngshim.c (Load_SBit_Png): Use FT_LOCAL_DEF().
Behdad Esfahbod ff269528 2013-07-20T08:02:39 [sfnt] Fix `sbix' table version handling. * src/sfnt/ttsbit.c (tt_face_load_sbit) [TT_SBIT_TABLE_TYPE_SBIX]: USHORT version numbers are to be considered as `minor'.
Behdad Esfahbod 778a7e6a 2013-07-19T14:28:28 [sfnt] `sbix' fix-ups. * src/sfnt/sfobjs.c (sfnt_load_face): Apple's `sbix' color bitmaps are rendered scaled and then the `glyf' outline rendered on top. We don't support that yet, so just ignore the `glyf' outline and advertise it as a bitmap-only font. * src/sfnt/ttsbit.c (tt_face_load_strike_metrics) [TT_SBIT_TABLE_TYPE_SBIX]: Return metrics in 26.6 units. (tt_face_load_sbix_image): Typo.
Werner Lemberg 01705395 2013-07-18T13:13:12 [sfnt] Add support for Apple's `sbix' color bitmap table. * include/freetype/internal/tttypes.h (TT_SBit_MetricsRec): Widen fields to FT_Short and FT_UShort, respectively. (TT_SBitTableType): New enumeration. (TT_FaceRec): Add `sbit_table_type' field. * include/freetype/tttags.h (TTAG_sbix): New macro. * src/sfnt/pngshim.c (Load_SBit_Png): Pass a more generic FT_GlyphSlot argument instead FT_Bitmap. Add flag to control map and metrics handling. Update all users. * src/sfnt/ttsbit.c: Include `ttmtx.h'. (tt_face_load_eblc): Renamed to... (tt_face_load_sbit): This. Handlic `sbix' bitmaps. (tt_face_free_eblc): Renamed to... (tt_face_load_sbit): This. Updated. (tt_face_load_strike_metrics): Handle `sbix' bitmaps. (tt_face_load_sbix_image): New function. (tt_sbit_decoder_alloc_bitmap, tt_sbit_decoder_load_image, tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_compound, tt_sbit_decoder_load_png, tt_sbit_decoder_load_image, tt_sbit_decoder_load_bitmap): Don't pass and handle load flags. (tt_sbit_decoder_load_bitmap) [!FT_CONFIG_OPTION_USE_PNG]: Better handle formats 17-19. Move color to grayscale conversion to... (tt_face_load_sbit_image): Here. Handle `sbix' bitmaps. * src/sfnt/pngshim.h: Updated. * src/sfnt/ttsbit.h: Updated. * src/sfnt/sfdriver.c: Updated.
Werner Lemberg 274207eb 2013-07-18T12:38:57 [sfnt] Ignore invalid magic number in `head' or `bhed'. Other font engines seem to ignore it also. Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>. * src/sfnt/ttload.c (check_table_dir): Don't abort but warn only if we have an invalid magic number.
Werner Lemberg aa0ac323 2013-07-02T10:36:26 [sfnt] Fix documentation of `tt_face_get_metrics'. Problem reported in Savannah bug #39383.
Werner Lemberg a25ecfdd 2013-06-10T12:57:16 [sfnt] Improve embedded bitmap tracing. * src/base/ftobjs.c (FT_Request_Size): Move trace message regarding bitmap strike match to... (FT_Match_Size): This function. * src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics, tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_compound, tt_sbit_decoder_load_png, tt_sbit_decoder_load_image): Decorate with tracing messages.
Werner Lemberg 45392b77 2013-06-05T13:43:20 Fix compiler warnings. * include/freetype/internal/ftmemory.h: Decorate memory allocation macros with `FT_Long' where appropriate. Remove duplicate of FT_MEM_QRENEW_ARRAY definition. * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Use cast. * src/base/ftobjs.c: Add warning disabling pragma for MSVC while including `md5.c'. * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdESC>: Add cast. * src/sfnt/ttsbit.c (tt_sbit_decoder_load_compound): Fix casts. (tt_sbit_decoder_load_bitmap): Beautification. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Initialize variables (earlier). * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Pacify compiler. * src/truetype/ttgxvar.c (TT_Get_MM_Var): Use unsigned constants where appropriate. * src/type1/t1load.c (T1_Get_MM_Var): Ditto.
Behdad Esfahbod 760d342d 2013-05-29T11:36:18 Add support for color embedded bitmaps (eg. color emoji). A new load flag, FT_LOAD_COLOR, makes FreeType load color embedded-bitmaps, following this draft specification https://color-emoji.googlecode.com/git/specification/v1.html which defines two new SFNT tables, `CBDT' and `CBLC' (named and modeled after `EBDT' and `EBLC', respectively). The color bitmaps are stored in the new FT_PIXEL_MODE_BGRA format to represent BGRA pre-multiplied sRGB images. If PNG support is available, PNG color images as defined in the same proposed specification are supported also. Note that color bitmaps are converted to grayscale if client didn't ask for color. * builds/unix/configure.raw: Search for libpng. Add `--without-png' option. * devel/ftoption.h, include/freetype/config/ftoption.h (FT_CONFIG_OPTION_USE_PNG): New macro. * include/freetype/freetype.h (FT_LOAD_COLOR): New load flag. * include/freetype/ftimage.h (FT_Pixel_Mode): Add `FT_PIXEL_MODE_BGRA'. * include/freetype/tttags.h (TTAG_CBDT, TTAG_CBLC): New tags. * src/base/ftbitmap.c (FT_Bitmap_Embolden): Updated. (ft_gray_for_premultiplied_srgb_bgra): New function. (FT_Bitmap_Convert): Handle FT_PIXEL_MODE_BGRA. * src/sfnt/pngshim.c, src/sfnt/pngshim.h: New files. * src/sfnt/sfnt.c: Include `pngshim.c'. * src/sfnt/ttsbit.c: Include FT_BITMAP_H and `pngshim.h' (tt_face_load_eblc): Load `CBLC'. (tt_sbit_decoder_init): Load `CBDT'. (tt_sbit_decoder_alloc_bitmap): Pass load flags to select between color and grayscale bitmaps. Set `num_grays'. This is used by `ftview' to choose the blending algorithm. (tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_compound, tt_sbit_decoder_load_image): Pass load flag. s/write/pwrite/. Don't call `tt_sbit_decoder_alloc_bitmap'. Updated. (tt_sbit_decoder_load_png) [FT_CONFIG_OPTION_USE_PNG]: New function. (tt_sbit_decoder_load_bitmap): Pass load flag. Handle new glyph formats 17, 18, and 19. Call `tt_sbit_decoder_alloc_bitmap'. Flatten color bitmaps if necessary. (tt_face_load_sbit_image): Updated. * src/sfnt/rules.mk (SFNT_DRV_SRC): Add `pngshim.c'. * docs/CHANGES: Updated.
Werner Lemberg ea2b4756 2013-05-10T08:04:33 [sfnt] Clean up bitmap code. * src/sfnt/ttsbit.c: Deleted. * src/sfnt/ttsbit0.c: Renamed to `ttsbit.c'. * rules.mk (SFNT_DRV_H): Updated.
Werner Lemberg f6aa089f 2013-05-10T07:58:47 */* [FT_CONFIG_OPTION_OLD_INTERNALS]: Remove macro and guarded code.
Werner Lemberg 5ea06ce0 2013-03-17T08:14:46 Whitespace.
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 dbc6e3f1 2013-03-12T11:42:20 Remove `FT_KEEP_ERR_PREFIX'. The idea is to always have FT_ERR_PREFIX available internally. * include/freetype/fterrors.h: Use FT2_BUILD_LIBRARY to guard undefinition of FT_ERR_PREFIX * src/gxvalid/gxverror.h, src/otvalid/otverror.h, src/sfnt/sferrors.h: Updated.
Xi Wang ba931be2 2013-01-25T00:57:09 [sfnt] Fix broken pointer overflow checks. Many compilers such as gcc and clang optimize away pointer overflow checks `p + n < p', because pointer overflow is undefined behavior. Use a safe form `n > p_limit - p' instead. Also avoid possible integer overflow issues, for example, using `num_glyphs > ( p_limit - p ) / 2' rather than `num_glyphs * 2' given a large `num_glyphs'. * src/sfnt/ttsbit0.c (tt_sbit_decoder_load_image): Implement it.
Werner Lemberg 71900980 2013-01-16T20:08:35 Minor.
Werner Lemberg cd3f871e 2013-01-16T19:56:08 [sfnt] Fix optimized sbit loader. It was not taking bit_depth into consideration when blitting! * src/sfnt/ttsbit0.c (tt_sbit_decoder_load_byte_aligned, * tt_sbit_decoder_load_bit_aligned): Handle bit depth.
Werner Lemberg 309b8b31 2012-12-16T19:08:36 [sfnt] Fix Savannah bug #37936. * src/sfnt/ttload.c (tt_face_load_gasp): Avoid memory leak.
Andreas Pehnack 1e168834 2012-10-20T11:42:22 [sfnt] Load pure CFF fonts wrapped in SFNT container. Such fonts only have a `cmap' and a `CFF' table. * src/sfnt/ttload.c (tt_face_load_font_dir): Don't call `check_table_dir' if font signature is `OTTO'.
Werner Lemberg 328aa3b2 2012-08-27T11:23:41 [FT_CONFIG_OPTION_PIC] Fix g++ 4.6.2 compiler warnings. * include/freetype/internal/ftdriver.h (FT_DEFINE_DRIVER), include/freetype/internal/ftobjs.h (FT_DEFINE_RENDERER, FT_DEFINE_MODULE), include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC1, FT_DEFINE_SERVICEDESCREC2, FT_DEFINE_SERVICEDESCREC3, FT_DEFINE_SERVICEDESCREC4, FT_DEFINE_SERVICEDESCREC5, FT_DEFINE_SERVICEDESCREC6), src/autofit/afpic.c (autofit_module_class_pic_init), src/base/basepic.c (ft_base_pic_init), src/base/ftinit.c (ft_create_default_module_classes), src/cff/cffparse.c (FT_Create_Class_cff_field_handlers), src/cff/cffpic.c (cff_driver_class_pic_init), src/pshinter/pshpic.c (pshinter_module_class_pic_init), src/psnames/pspic.c (psnames_module_class_pic_init), src/raster/rastpic.c (ft_raster1_renderer_class_pic_init), src/sfnt/sfntpic.c (sfnt_module_class_pic_init), src/sfnt/ttcmap.c (FT_Create_Class_tt_cmap_classes), src/smooth/ftspic.c (ft_smooth_renderer_class_pic_init), src/truetype/ttpic.c (tt_driver_class_pic_init): Initialize allocation variable.
Werner Lemberg 0c633e3f 2012-08-27T07:43:28 [sfnt, truetype] More renamings for orthogonality. * src/sfnt/sfdriver.c, src/sfnt/sfntpic.h, src/sfnt/ttcmap.c, src/truetype/ttdriver.c, src/truetype/ttpic.h: s/FT_SFNT_/SFNT_/, s/FT_TT_/TT_/, s/GET_CMAP_INFO_GET/CMAP_INFO_GET/.
Werner Lemberg d77b1ea0 2012-08-27T05:48:23 [sfnt] Formatting.
Werner Lemberg 6edaef3b 2012-08-24T13:41:24 [sfnt] More formatting.
Werner Lemberg 665c65bf 2012-08-24T13:10:08 [sfnt] Formatting.
Werner Lemberg 26472b4f 2012-07-09T09:55:50 Fix compilation with MSVC 5.0. Problem reported by Peter Breitenlohner and Akira Kakuto. * include/freetype/config/ftstdlib.h (ft_setjmp): Updated. * src/sfnt/ttcmap.c (tt_face_build_cmaps): Remove cast.
Werner Lemberg ad05bac6 2012-03-14T18:34:36 [sfnt] Make arrays static like all others. * src/sfnt/ttload.c (tt_face_load_maxp, tt_face_load_os2), src/sfnt/ttmtx.c (tt_face_load_hhea): Add `static' keyword to frame fields.
Huw Davies 3650f801 2012-03-14T18:29:57 [sfnt] A refinement of the previous commit. * src/sfnt/sfobjs.c (tt_name_entry_ascii_from_utf16, tt_name_entry_ascii_from_other): Stop at null byte.
Huw Davies bf06b62a 2012-03-14T14:44:46 [sfnt] Add `name' table compatibility to MS Windows. * src/sfnt/sfobjs.c (tt_name_entry_ascii_from_utf16, tt_name_entry_ascii_from_other): Don't replace `\0' with question marks when converting strings.
Werner Lemberg cbe90292 2012-03-13T08:52:31 Comment typo.
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.
suzuki toshiya 1749d8bc 2012-01-17T02:00:24 Remove trailing spaces.
suzuki toshiya c24f77ac 2012-01-16T21:13:05 Formatting PIC related sources. * src/autofit/afpic.c: Harmonize to FT2 coding conventions. * src/base/basepic.c: Ditto. * src/base/ftpic.c: Ditto. * src/cff/cffpic.c: Ditto. * src/pshinter/pshpic.c: Ditto. * src/psnames/pspic.c: Ditto. * src/raster/rastpic.c: Ditto. * src/sfnt/sfntpic.c: Ditto. * src/smooth/ftspic.c: Ditto. * src/truetype/ttpic.c: Ditto.
suzuki toshiya 3c966818 2012-01-15T23:35:31 Fix redundant declaration warning in PIC mode. Originally FT_DEFINE_{DRIVER,MODULE,RENDERER}() macros were designed to declare xxx_pic_{free,init} by themselves. Because these macros are used at the end of the module interface (e.g. ttdriver.c) and the wrapper source to build a module as a single object (e.g. truetype.c) includes the PIC file (e.g. ttpic.c) before the module interface, these macros are expanded AFTER xxx_pic_{free,init} body when the modules are built as single object. The declaration after the implementation causes the redundant declaration warnings, so the declarations are moved to module PIC headers (e.g. ttpic.h). Separating to other header files are needed for multi build. * include/freetype/internal/ftdriver.h (FT_DEFINE_DRIVER): Remove class_##_pic_free and class_##_pic_init declarations. * include/freetype/internal/ftobjs.h (FT_DEFINE_RENDERER, FT_DEFINE_MODULE): Ditto. * src/base/basepic.h: Insert a comment and fix coding style. * src/autofit/afpic.h: Declare autofit_module_class_pic_{free, init}. * src/cff/cffpic.h: Declare cff_driver_class_pic_{free,init}. * src/pshinter/pshpic.h: Declare pshinter_module_class_pic_{free, init}. * src/psnames/pspic.h: Declare psnames_module_class_pic_{free, init}. * src/raster/rastpic.h: Declare ft_raster{1,5}_renderer_class_pic_{free,init} * src/sfnt/sfntpic.h: Declare sfnt_module_class_pic_{free,init}. * src/smooth/ftspic.h: Declare ft_smooth_{,lcd_,lcdv_}renderer_class_pic_{free,init}. * src/truetype/ttpic.h: Declare tt_driver_class_pic_{free,init}.
suzuki toshiya 226f3619 2012-01-14T06:40:03 Fix PIC build broken by d9145241fe378104ba4c12a42534549faacc92e6. Under PIC configuration, FT_{CFF,PSCMAPS,SFNT,TT}_SERVICES_GET take no arguments but derefer the variable named `library' internally. * src/cff/cffdrivr.c (cff_get_interface): Declare `library' and set it if non-NULL driver is passed. * src/truetype/ttdriver.c (tt_get_interface): Ditto. * src/sfnt/sfdriver.c (sfnt_get_interface): Declare `library' under PIC configuration, and set it if non-NULL module is given. * src/psnames/psmodule.c (psnames_get_interface): Ditto.
suzuki toshiya 4b733517 2012-01-14T06:32:50 Make PIC files to include module error headers, to use the error codes with per-module prefix. * src/autofit/afpic.c: Include `aferrors.h'. * src/cff/cffpic.c: Include `cfferrs.h'. * src/pshinter/pshpic.c: Include `pshnterr.h'. * src/raster/rastpic.c: Include `rasterrs.h'. * src/sfnt/sfntpic.c: Include `sferrors.h'. * src/smooth/ftspic.c: Include `ftsmerrs.h'. * src/truetype/ttpic.c: Include `tterrors.h'.
Werner Lemberg c52f44d4 2011-11-30T10:46:53 Whitespace.
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'.
Werner Lemberg f095744d 2011-07-07T14:10:39 [sfnt] Try harder to find non-zero values for ascender and descender. * src/sfnt/sfobjs.c (sfnt_load_face): Consult `OS/2' table in case the `hhea' table's values are zero.
Werner Lemberg b5119996 2011-07-03T09:46:32 Whitespace.
suzuki toshiya e62c876b 2011-06-15T02:48:33 Fix g++4.6 compiler warnings in module drivers. The background is same with previous commit. * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Init `points'. (TT_Vary_Get_Glyph_Deltas): Init `delta_xy'. (TT_Get_MM_Var): Init `mmvar'. * src/type1/t1load.c (T1_Get_MM_Var): Ditto. * src/cff/cffdrivr.c (cff_ps_get_font_info): Init `font_info'. * src/cff/cffload.c (cff_index_get_pointers): Init `t'. (cff_font_load): Init `sub'. * src/cff/cffobjs.c (cff_size_init): Init `internal'. (cff_face_init): Init `cff'. * src/pfr/pfrload.c (pfr_extra_item_load_stem_snaps): Init `snaps'. * src/pcf/pcfread.c (pcf_get_properties): Init `properties'. (pcf_get_bitmaps): Init `offsets'. (pcf_get_encodings): Init `tmpEncoding'. * src/sfnt/ttload.c (tt_face_load_gasp): Init `gaspranges'. * src/sfnt/ttsbit.c (Load_SBit_Image): Init `components'. * src/cache/ftcmru.c (FTC_MruList_New): Init `node'. * src/gzip/ftgzip.c (FT_Stream_OpenGzip): Init `zip' and `zip_buff'. * src/lzw/ftlzw.c (FT_Stream_OpenLZW): Init `zip'. * src/bzip2/ftbzip2.c (FT_Stream_OpenBzip2): Init `zip'.
Werner Lemberg af7b8b1a 2011-03-20T07:51:57 * src/sfnt/sfobjs.c (sfnt_open_font): Check number of TTC subfonts.
Werner Lemberg cecd9127 2011-03-09T06:18:28 Make FT_Sfnt_Table_Info return the number of SFNT tables. * src/sfnt/sfdriver.c (sfnt_table_info): Implement it. * include/freetype/tttables.h: Update documentation. * docs/CHANGES: Updated.
Werner Lemberg 0682251e 2011-01-30T16:38:09 * src/sfnt/ttmtx.c (tt_face_load_hmtx): Fix tracing message.
Werner Lemberg f3ce2370 2011-01-03T07:11:54 */rules.mk: Handle `*pic.c' files.
Werner Lemberg fa764cf8 2010-11-18T13:08:52 [sfnt] Ignore all errors while loading `OS/2' table. Suggested by Johnson Y. Yan <yinsen_yan@foxitsoftware.com>. * src/sfnt/sfobjs.c (sfnt_load_face): Do it.
Werner Lemberg 05012ad9 2010-11-17T11:47:53 [sfnt] While tracing, output table checksums also. * src/sfnt/ttload.c (tt_face_load_font_dir): Do it.
Chris Liddell bc4ed48e 2010-10-08T18:40:18 Fix Savannah bug #31275. * src/sfnt/ttpost.c: Include FT_INTERNAL_DEBUG_H.
Werner Lemberg 3987b15e 2010-10-02T11:46:19 Fix Savannah bug #31088 (sort of). * src/sfnt/ttload.c (tt_face_load_maxp): Always allocate at least 64 function entries.
suzuki toshiya d2b8b8db 2010-09-20T19:06:23 [sfnt] Make error message filling NULL names less verbose. * src/sfnt/ttpost.c (load_format_20): Showing 1 summary message when we fill `post' names by NULL, instead of per-entry message.
Werner Lemberg d38ba0c9 2010-09-19T20:51:19 Minor fixes. * src/cff/cffload.c (cff_charset_compute_cids): `charset->sids[i]' is `FT_UShort'. (cff_index_access_element): Don't use additions in comparison. * src/sfnt/ttpost.c (load_format_20): Make `post_limit' of type `FT_Long'. Don't use additions in comparison. Improve tracing messages. (load_format_25, load_post_names): Make `post_limit' of type `FT_Long'.
suzuki toshiya 900e7e0c 2010-09-20T01:03:36 [sfnt] Prevent overrunning in `post' table parser. * src/sfnt/ttpost.c (load_post_names): Get the length of `post' table and pass the limit of `post' table to load_format_20() and load_format_25(). (load_format_20): Stop the parsing when we reached at the limit of `post' table. If more glyph names are required, they are filled by NULL names. See Savannah bug #31040.
Werner Lemberg c8f5b98b 2010-07-12T21:13:22 Remove C++ warnings. */*: Initialize pointers where necessary to make g++ happy.
suzuki toshiya 1e2a446d 2010-07-09T12:25:59 Capitalize ISO.
suzuki toshiya 0ae32718 2010-07-04T20:14:18 Restrict the number of the charmaps in a rogue-compatible mode. Fix for Savannah bug #30059. * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Replace `16' the minimum character code passed by a legacy rogue client by... * include/freetype/config/ftoption.h (FT_MAX_CHARMAP_CACHEABLE): This. It is undefined when FT_CONFIG_OPTION_OLD_INTERNALS is undefined (thus the rogue client compatibility is not required). * src/cff/cffobjs.c (cff_face_init): Abort the automatic selection or synthesis of Unicode cmap subtable when the charmap index exceeds FT_MAX_CHARMAP_CACHEABLE. * src/sfnt/ttcmap.c (tt_face_build_cmaps): Issue error message when the charmap index exceeds FT_MAX_CHARMAP_CACHEABLE. * src/base/ftobjs.c (find_unicode_charmap): When Unicode charmap is found after FT_MAX_CHARMAP_CACHEABLE, ignore it and search earlier one. (find_variant_selector_charmap): When UVS charmap is found after FT_MAX_CHARMAP_CACHEABLE, ignore it and search earlier one. (FT_Select_Charmap): When a charmap matching with requested encoding but after FT_MAX_CHARMAP_CACHEABLE, ignore and search earlier one. (FT_Set_Charmap): When a charmap matching with requested charmap but after FT_MAX_CHARMAP_CACHEABLE, ignore and search earlier one. (FT_Get_Charmap_Index): When a requested charmap is found after FT_MAX_CHARMAP_CACHEABLE, return the inverted charmap index.
Werner Lemberg 0ae6cf21 2010-06-30T10:26:48 Minor optimizations by avoiding divisions. * src/sfnt/ttkern.c (tt_face_load_kern, tt_face_get_kerning): Replace divisions with multiplication in comparisons.
Werner Lemberg 7d911736 2010-06-26T09:29:51 Fix Savannah bug #30262. * src/sfnt/ttload.c (tt_face_load_maxp): Limit `maxComponentDepth' arbitrarily to 100 to avoid stack exhaustion.
Werner Lemberg f765e440 2010-06-24T10:34:29 */*: Use module specific error names where appropriate.
Werner Lemberg 8b1c34da 2010-06-24T08:48:10 Fix Savannah bug #30236. * src/sfnt/ttcmap.c (tt_face_build_cmaps): Improve check for pointer to `cmap_table'.
Werner Lemberg 370aea80 2010-06-08T08:37:11 Formatting.
suzuki toshiya d9145241 2010-02-05T02:58:24 Prevent NULL pointer dereference passed to FT_Module_Requester.
suzuki toshiya c9669a8a 2010-01-30T02:24:25 [sfnt] Fix memory leaks in previous patch.
suzuki toshiya 75852eda 2010-01-29T23:18:34 New parameters for FT_Open_Face() to ignore preferred family names.
Lars Abrahamsson 8cf9b74c 2009-12-31T18:26:14 Make compilation with FT_CONFIG_OPTION_PIC work again. * src/base/ftglyph.c (FT_Glyph_To_Bitmap) [FT_CONFIG_OPTION_PIC]: Declare `library' for FT_BITMAP_GLYPH_CLASS_GET. * src/base/ftinit.c (ft_destroy_default_module_classes, ft_create_default_module_classes): Use proper casts (needed for C++ compilation). * src/sfnt/ttcmap.c (tt_cmap13_class_rec): Use FT_DEFINE_TT_CMAP.
Werner Lemberg 01975084 2009-11-16T23:10:53 Fix compiler warnings. Reported by Kevin Blenkinsopp <arqon@promode.org>. * src/sfnt/ttload.c (check_table_dir): Use proper data type.
Werner Lemberg ca87cd0b 2009-10-06T11:09:29 Fix `make multi'. * src/cache/ftccache.c, src/cache/ftcsbits.c (FT_COMPONENT): Define. * src/sfnt/sfdriver.c: Include FT_INTERNAL_DEBUG_H.
suzuki toshiya 2b6a3f0b 2009-08-01T00:37:59 sfnt: Cast a charcode to 32-bit in cmap format 14 parser.
suzuki toshiya 9b1aab8d 2009-08-01T00:37:58 sfnt: Cast a charcode to 32-bit in cmap format 12 parser.
suzuki toshiya b76c3f71 2009-08-01T00:37:57 sfnt: Fix a data type mismatching with its source.
suzuki toshiya 2a2beb47 2009-08-01T00:37:57 sfnt: Extend a few local variables to load 32-bit values.
suzuki toshiya 61adbe98 2009-08-01T00:32:24 sfnt: Ignore invalid GIDs in glyph name lookup.
suzuki toshiya cad4f915 2009-08-01T00:32:23 sfnt: Insert explicit cast for LP64 system.
suzuki toshiya 01059050 2009-08-01T00:32:20 sfnt: Fix a data type mismatching with its source.
suzuki toshiya c9c64388 2009-08-01T00:32:14 sfnt: Cast a character code to FT_UInt32 for LP64 system.
suzuki toshiya 3f0182af 2009-08-01T00:32:13 sfnt: Cast a character code to FT_UInt32 for LP64 system.
suzuki toshiya 9c1aac00 2009-08-01T00:32:13 sfnt: Extend TT_BDF->strings_size to FT_ULong for huge BDF.
suzuki toshiya 3f0f2e46 2009-08-01T00:32:09 XXX_cmap_encoding_char_next() return FT_UInt32 values.
suzuki toshiya 763b3949 2009-08-01T00:30:14 sfnt: Count the size of the memory object by ptrdiff_t.
suzuki toshiya ad289d13 2009-06-29T03:09:17 ftpatent: Fix a bug by wrong usage of service->table_info().
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.
Oran Agra fb429ec4 2009-04-05T18:08:32 Position Independent Code (PIC) support in sfnt driver. * include/freetype/internal/services/svbdf.h add macros to init instances of FT_Service_BDFRec. * include/freetype/internal/services/svgldict.h add macros to init instances of FT_Service_GlyphDictRec. * include/freetype/internal/services/svpostnm.h add macros to init instances of FT_Service_PsFontNameRec. * include/freetype/internal/services/svsfnt.h add macros to init instances of FT_Service_SFNT_TableRec. * include/freetype/internal/services/svttcmap.h add macros to init instances of FT_Service_TTCMapsRec. * include/freetype/internal/sfnt.h add macros to init instances of SFNT_Interface. * src/sfnt/sfdriver.h declare sfnt_module_class using macros from ftmodapi.h, when FT_CONFIG_OPTION_PIC is defined create and destroy functions will be declared. * src/sfnt/sfdriver.c when FT_CONFIG_OPTION_PIC is defined the following structs: sfnt_service_sfnt_table, sfnt_service_glyph_dict, sfnt_service_ps_name tt_service_get_cmap_info, sfnt_service_bdf, sfnt_interface, sfnt_module_class, and sfnt_services array will have functions to init or create and destroy them instead of being allocated in the global scope. And macros will be used from sfntpic.h in order to access them from the pic_container. * src/sfnt/ttcmap.h add macros to init instances of TT_CMap_ClassRec. * src/sfnt/ttcmap.c when FT_CONFIG_OPTION_PIC is defined the following structs: tt_cmap0_class_rec, tt_cmap2_class_rec, tt_cmap4_class_rec tt_cmap6_class_rec, tt_cmap8_class_rec, tt_cmap10_class_rec, tt_cmap12_class_rec, tt_cmap14_class_rec and tt_cmap_classes array will have functions to init or create and destroy them instead of being allocated in the global scope. And macros will be used from sfntpic.h in order to access them from the pic_container. The content of tt_cmap_classes is now described in the new file 'ttcmapc.h'. New Files: * src/sfnt/sfntpic.h declare struct to hold PIC globals for sfnt driver and macros to access them. * src/sfnt/sfntpic.c implement functions to allocate, destroy and initialize PIC globals for sfnt driver. * src/sfnt/ttcmapc.h describing the content of tt_cmap_classes allocated in ttcmap.c * src/sfnt/sfnt.c add new file to build: sfntpic.c. * src/sfnt/jamfile add new files to FT2_MULTI build: sfntpic.c.
Werner Lemberg ca98f8cc 2009-04-04T07:42:38 Add support for cmap type 13. * devel/ftoption.h, include/freetype/config/ftoption.h (TT_CONFIG_CMAP_FORMAT_13): New macro. * src/sfnt/ttcmap.c (TT_CMap13Rec, tt_cmap13_init, tt_cmap13_validate, tt_cmap13_char_index, tt_cmap13_char_next, tt_cmap13_get_info, tt_cmap13_char_map_def_binary, tt_cmap14_class_rec): New functions and structures for cmap 13 support. (tt_cmap_classes): Register tt_cmap13_class_rec. * docs/CHANGES: Mention cmap 13 support.
Werner Lemberg 86e041b5 2009-03-21T08:51:44 Remove redundant header inclusions. This covers many Ghostscript Coverity issues. * src/*: Do it.
Werner Lemberg a18788b1 2009-03-20T08:03:58 Fix validation for various cmap table formats. * src/sfnt/ttcmap.c (tt_cmap8_validate, tt_cmap10_validate, tt_cmap12_validate): Check `length' correctly. (tt_cmap_14_validate): Check `length' and `numMappings' correctly.