src/base


Log

Author Commit Date CI Message
Werner Lemberg d57f2271 2015-09-26T08:44:26 * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Add cast.
Werner Lemberg d7f456ee 2015-09-26T08:37:14 Formatting, minor comment corrections.
Werner Lemberg c409eb18 2015-09-24T12:39:38 [base, sfnt] Better checks for invalid cmaps (1/2). * src/base/ftobjs.c (FT_Get_Char_Index): Don't return out-of-bounds glyph indices. (FT_Get_First_Char): Updated. * src/sfnt/ttcmap.c (tt_cmap6_char_next): Don't return character codes greater than 0xFFFF. (tt_cmap8_char_index): Avoid integer overflow in computation of glyph index. (tt_cmap8_char_next): Avoid integer overflows in computation of both next character code and glyph index. (tt_cmap10_char_index): Fix unsigned integer logic. (tt_cmap10_char_next): Avoid integer overflow in computation of next character code. (tt_cmap12_next): Avoid integer overflows in computation of both next character code and glyph index. (tt_cmap12_char_map_binary): Ditto. (tt_cmap12_char_next): Simplify. (tt_cmap13_char_map_binary): Avoid integer overflow in computation of next character code. (tt_cmap13_char_next): Simplify.
suzuki toshiya e982f5b7 2015-09-21T23:07:22 [base] Check too long POST and sfnt resource (#45919). * src/base/ftbase.h (FT_MAC_RFORK_MAX_LEN): Maximum length of the resource fork for Mac OS. The resource fork larger than 16 MB can be written but could not be handled correctly, at least in Carbon routine. See https://support.microsoft.com/en-us/kb/130437 * src/base/ftobjs.c (Mac_Read_POST_Resource): No need `0x' for `%p' formatter. * src/base/ftbase.c (Mac_Read_POST_Resource): Check the fragment and total size of the concatenated POST resource before buffer allocation. (Mac_Read_sfnt_Resource): Check the declared size of sfnt resource before buffer allocation. * src/base/ftmac.c (read_lwfn, FT_New_Face_From_SFNT): Check the total resource size before buffer allocation.
Werner Lemberg bd0438a4 2015-09-16T18:05:43 Minor fixes for some clang warnings. * src/base/ftoutln.c (FT_Outline_EmboldenXY): Cast, possible missing initialization. * src/truetype/ttgload.c (TT_Process_Composite_Component): Cast.
Alexei Podtelezhnikov 3ea0d2c6 2015-09-13T23:19:34 * src/base/ftcalc.c (FT_MulFix) [FT_LONG64]: Improve.
Werner Lemberg 19b82cfb 2015-09-11T20:25:32 [base] Avoid crash while tracing `load_mac_face'. Reported in Savannah bug #45919. * src/base/ftobjs.c (load_mac_face): Honour FT_OPEN_MEMORY while tracing.
Alexei Podtelezhnikov 09948e42 2015-09-09T21:30:15 * src/base/ftcalc.c (FT_RoundFix): Improve.
Wojciech Mamrak 822acb02 2015-09-09T07:59:10 * src/base/ftcalc.c (FT_CeilFix, FT_FloorFix): Normalize. This commit makes the functions behave as expected, this is, rounding towards plus or minus infinity.
Alexei Podtelezhnikov 6ec0434e 2015-08-30T22:50:48 Minor refactoring.
Werner Lemberg 78b01403 2015-08-25T07:23:01 [base] Improve kerning tracing and documentation. * src/base/ftobjs.c (FT_Get_Kerning): Emit tracing message if scaled-down kerning values differ.
Werner Lemberg 340e59da 2015-08-18T05:56:51 Minor formatting.
Alexei Podtelezhnikov a0172d10 2015-08-17T22:58:59 [base] Improve emboldener (#45596). * src/base/ftoutln.c (FT_Outline_EmboldenXY): Correct displacement of zero-lenght segments.
Alexei Podtelezhnikov 815c3246 2015-08-17T21:48:46 Minor.
Alexei Podtelezhnikov 00d89950 2015-08-16T22:57:34 [base] Reoptimize aritmetic. * src/base/ftcalc.c (FT_MulDiv, FT_MulFix) [!FT_LONG64]: Remove special cases that slow down the general use.
pazer f0ed30e6 2015-08-15T06:53:09 Fix C++ compilation (#45762). * src/base/ftstroke.c (ft_outline_glyph_class): Use FT_CALLBACK_TABLE.
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.
Werner Lemberg eb22ef26 2015-08-04T06:50:04 Another left-shift bug (#45681). * src/base/ftobjs.c (IsMacBinary): Only accept positive values for `dlen'.
Alexei Podtelezhnikov 7e6c321a 2015-08-03T23:26:13 [base] Fix `ft_corner_orientation'. Remove casting from `FT_Long' to `FT_Int' that might change the sign of the return value and make it faster too. * src/base/ftcalc.c (ft_corner_orientation): On 32-bit systems, stay with 32-bit arithmetic when safe. Use plain math on 64-bit systems. * src/pshinter/pshalgo.c: Remove old unused code.
Werner Lemberg ca6a5cf4 2015-08-03T08:51:18 Fix typo in clang bug from 2015-07-31 (#45678). * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Fix inequality.
Werner Lemberg 6343ba22 2015-08-01T07:53:48 Fix some bugs found by clang's `-fsanitize=undefined' (#45661). * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Only accept positive values from header. Check overflow. * src/base/ftoutln.c (SCALED): Correctly handle left-shift of negative values. * src/bdf/bdf.h (_bdf_glyph_modified, _bdf_set_glyph_modified, _bdf_clear_glyph_modified): Use unsigned long constant. * src/bdf/bdfdrivr.c (BDF_Size_Select, BDF_Glyph_Load): Don't left-shift values that can be negative. * src/pcf/pcfdrivr.c (PCF_Size_Select, PCF_Glyph_Load): Don't left-shift values that can be negative. * src/raster/ftraster.c (SCALED): Correctly handle left-shift of negative values. * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Don't left-shift values that can be negative. * src/truetype/ttgload.c (TT_Load_Composite_Glyph, compute_glyph_metrics, load_sbit_image): Don't left-shift values that can be negative.
Alexei Podtelezhnikov 2b07a5ae 2015-07-28T23:14:30 * src/base/ftcalc.c (FT_Vector_NormLen): Clarify.
Werner Lemberg a50a0458 2015-07-28T07:37:19 Minor.
Alexei Podtelezhnikov e8b186ee 2015-07-27T23:22:34 * src/base/ftcalc.c (FT_Vector_NormLen): Explicate type conversions.
Werner Lemberg f9be567f 2015-07-09T15:10:31 Better support of user-supplied C++ namespaces. See http://lists.nongnu.org/archive/html/freetype-devel/2015-07/msg00008.html for a rationale. * src/autofit/afpic.h, src/base/basepic.h, src/cff/cffpic.h, src/pshinter/pshpic.h, src/psnames/pspic.h, src/raster/rastpic.h, src/sfnt/sfntpic.h, src/smooth/ftspic.h, src/truetype/ttpic.h (FT_BEGIN_HEADER, FT_END_HEADER): Move macro calls to not enclose header files that contain FT_{BEGIN,END}_HEADER macros by themselves. * src/autofit/aftypes.h [FT_DEBUG_AUTOFIT]: Include FT_CONFIG_STANDARD_LIBRARY_H earlier. * src/truetype/ttpic.h: Include FT_INTERNL_PIC_H.
Werner Lemberg eb1bba9b 2015-06-30T09:46:39 Fix some clang compiler warnings. * src/base/ftoutln.c (FT_Outline_EmboldenXY), src/cff/cf2intrp.c (cf2_interpT2CharString), src/truetype/ttgload.c (load_truetype_glyph), src/truetype/ttgxvar.c (tt_handle_deltas), src/truetype/ttinterp.c (Ins_INSTCTRL): Fix signedness issues.
Alexei Podtelezhnikov 9ef02bd4 2015-06-29T22:39:10 [base] Speed up emboldening. * src/base/ftoutln.c (FT_Outline_EmboldenXY): Use `FT_Vector_NormLen'.
Alexei Podtelezhnikov 884e4e67 2015-06-29T22:32:05 [base] Implement fast vector normalization. The function uses Newton's iterations instead of dividing vector components by its length, which needs a square root. This is, literally, a bit less accurate but a lot faster. * src/base/ftcalc.c (FT_Vector_NormLen): New function.
Werner Lemberg 392cf22f 2015-06-25T13:04:57 Another adjustment to header locations. This change is a result of a discussion thread on freetype-devel http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html Re-introduce the `freetype2' subdirectory for all FreeType header files after installation, and rename the `freetype2' subdirectory in the git repository to `freetype'. * include/freetype2: Renamed to... * include/freetype: This. * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS, PRIVATE_HEADERS): Updated. Update creation of `ftconfig.h'. Install generated `ftconfig.h'. * Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated. * builds/amiga/include/config/ftconfig.h, builds/freetype.mk (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work), builds/unix/freetype2.in: Updated. * builds/unix/freetype-config.in: Updated. * builds/unix/configure.raw: Don't check for `rmdir'. * builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable according to the autoconf info manual. * builds/unix/install.mk (install, uninstall, distclean_project_unix): Update and simplify. * builds/wince/*, builds/windows/*: Updated. * devel/ft2build.h, include/ft2build.h: Updated. * include/freetype2/config/ftheader.h, include/freetype2/internal/ftserv.h, include/freetype2/internal/internal.h: Update all header file macros. * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated. * docs/*: Updated.
Werner Lemberg 8502c98b 2015-06-22T06:35:23 Fix Savannah bug #45097. We no longer `pollute' the namespace of possible header file names; instead we move `ft2build.h' up by one level so that it gets installed in the default include directory (e.g., /usr/local/include). After this commit, only `ft2build.h' stays in the compiler's include path. No visible changes for the user who follows the standard FreeType header inclusion rules. * include/*: Move to ... * include/freetype2/*: This directory, except `ft2build.h'. * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS, PRIVATE_HEADERS), Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated. * builds/amiga/include/config/ftconfig.h, builds/freetype.mk (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work), builds/unix/install.mk (install, uninstall), builds/unix/freetype2.in: Updated. * builds/unix/freetype-config.in: Updated. Emit -I directory only if it is not `/usr/include'. * builds/wince/*, builds/windows/*: Updated. * devel/ft2build.h, include/ft2build.h: Updated. * include/freetype2/config/ftheader.h, include/freetype2/internal/ftserv.h, include/freetype2/internal/internal.h: Update all header file macros. * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated. * docs/*: Updated.
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 b6c511d9 2015-04-24T00:10:40 * src/base/ftoutln.c: Minor.
Alexei Podtelezhnikov 9de55e03 2015-04-10T23:45:11 [base] NULL.
Alexei Podtelezhnikov dac5644c 2015-03-21T23:30:16 [base] Optimize `FT_Angle_Diff'. Under normal circumstances we are usually close to the desired range of angle values, so that the remainder is not really necessary. * src/base/fttrigon.c (FT_Angle_Diff): Use loops instead of remainder. * src/autofit/aftypes.h (AF_ANGLE_DIFF): Ditto in the unused macro.
Alexei Podtelezhnikov 2d7284e9 2015-03-20T21:34:19 * src/base/fttrigon.c (FT_Vector_Rotate): Minor refactoring.
Alexei Podtelezhnikov 6a171726 2015-03-17T22:43:08 Fix Savannah bug #44412 (part 2). * src/base/fttrigon.c (FT_Sin, FT_Cos, FT_Tan): Call `FT_Vector_Unit'.
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 dd7028c4 2015-03-11T07:45:05 Rename `FT_XFREE86_H' to `FT_FONT_FORMATS_H'. * include/config/ftheader.h: Implement it. * src/base/ftfntfmt.c, docs/CHANGES: Updated.
Werner Lemberg f4d1c11f 2015-03-11T07:32:58 Rename `FT_Get_X11_Font_Format' to `FT_Get_Font_Format'. * include/ftfntfmt.h, src/base/ftfntfmt.c: Implement it. * docs/CHANGES: Updated.
Werner Lemberg 0633995b 2015-03-11T06:30:23 Rename `ftxf86.[ch]' to `ftfntfmt.[ch]'. CMakeLists.txt, builds/amiga/makefile, builds/amiga/makefile.os4, builds/amiga/smakefile, builds/mac/FreeType.m68k_cfm.make.txt, builds/mac/FreeType.m68k_far.make.txt, builds/mac/FreeType.ppc_carbon.make.txt, builds/mac/FreeType.ppc_classic.make.txt, builds/symbian/bld.inf, builds/symbian/freetype.mmp, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2008-ce/freetype.vcproj, builds/windows/vc2005/freetype.vcproj, builds/windows/vc2008/freetype.vcproj, builds/windows/vc2010/freetype.vcxproj, builds/windows/vc2010/freetype.vcxproj.filters, builds/windows/visualc/freetype.dsp, builds/windows/visualc/freetype.vcproj, builds/windows/visualce/freetype.dsp, builds/windows/visualce/freetype.vcproj, docs/INSTALL.ANY, include/config/ftheader.h, include/ftfntfmt.h, modules.cfg, src/base/ftfntfmt.c, vms_make.com: Updated.
Alexei Podtelezhnikov 6b832c87 2015-03-10T23:25:49 Fix Savannah bug #44412 (part 1). * src/base/ftstroke.c (ft_stroker_inside): Handle near U-turns.
Werner Lemberg eee7d8ba 2015-03-10T11:15:15 [base] Rename `FT_Bitmap_New' to `FT_Bitmap_Init'. * include/ftbitmap.h, src/base/ftbitmap.c: Implement it. Update all callers. * docs/CHANGES: Updated.
Alexei Podtelezhnikov dd7498d2 2015-03-05T22:51:36 * src/base/ftstroke.c: Simplify.
Werner Lemberg d3240c56 2015-02-17T20:30:36 [base] Fix Savannah bug #44284. * src/base/ftcalc.c (FT_MulFix): Typos.
Werner Lemberg 76abc75c 2015-02-16T22:00:27 [base] Finish compiler warning fixes for signedness issues. * src/base/ftglyph.c, src/base/ftlcdfil.c, src/base/ftstroke.c: Apply.
Werner Lemberg 2e814fc0 2015-02-16T20:05:08 More minor signedness warning fixes. * src/base/ftbbox.c, src/base/ftbitmap.c, src/base/fttrigon.c, src/base/ftutil.c: Apply.
Werner Lemberg 82235d04 2015-02-16T19:35:16 Next round of minor compiler warning fixes. * include/internal/ftrfork.h (FT_RFork_Ref): Change `offset' member type to `FT_Long'. (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Add `static' keyword. * include/internal/ftstream.h (FT_Stream_Pos): Return `FT_ULong'. * src/base/ftoutln.c, src/base/ftrfork.c, src/base/ftstream.c: Signedess fixes.
Werner Lemberg 3cfa4d12 2015-02-16T17:59:06 Various minor signedness fixes. * include/ftadvanc.h, include/internal/ftobjs.h, src/base/ftgloadr.c, src/base/ftobjs.c: Apply.
Werner Lemberg 1f377f0d 2015-02-16T08:37:09 * src/base/ftsystem.c: Use casts in standard C function wrappers. (ft_alloc, ft_realloc, ft_ansi_stream_io, FT_Stream_Open): Do it.
Werner Lemberg 48186b81 2015-02-16T06:37:36 [base] Clean up signedness issues in `ftdbgmem.c'. Also fix other minor issues. * src/base/ftdbgmem.c (FT_MemTableRec): Replace all FT_ULong types with FT_Long for consistency. (ft_mem_primes): Change type to `FT_Int'. (ft_mem_closest_prime, ft_mem_table_set): Updated. (ft_mem_debug_panic, ft_mem_debug_alloc, ft_mem_debug_free, ft_mem_debug_realloc): Use `static' keyword and fix signedness warnings where necessary. (ft_mem_table_resize, ft_mem_table_new, ft_mem_table_destroy, ft_mem_table_get_nodep, ft_mem_debug_init, FT_DumpMemory): Fix types and add or remove casts to avoid signedness warnings.
Werner Lemberg 6d7d636b 2015-02-15T12:30:42 [base] Clean up signedness in arithmetic functions. This makes the code more readable and reduces compiler warnings. * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round, FT_MulFix, FT_DivFix): Convert input parameters to unsigned, do the computation, then convert the result back to signed. (ft_corner_orientation): Fix casts.
Werner Lemberg 79a5ac60 2015-01-18T07:30:04 * src/base/ftobjs.c (FT_New_Library): Fix compiler warning.
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 603292d7 2015-01-14T18:35:56 [base] Don't initialize unused `driver->glyph_loader'. * src/base/ftobjs.c (Destroy_Driver): Don't call `FT_GlyphLoader_Done'. (FT_Add_Module): Don't call `FT_GlyphLoader_New'.
Behdad Esfahbod 51634253 2015-01-14T18:30:59 [base] Don't allocate `library->raster_pool' anymore. It's unused after the following commits: [raster] Allocate render pool for mono rasterizer on the stack. [raster] Remove 5-level gray AA mode from monochrome rasterizer. The value of FT_RENDER_POOL_SIZE still serves the purpose it used to serve, which is, to adjust the pool size. But the pool is now allocated on the stack on demand. * src/base/ftobjs.c (FT_New_Library, FT_Done_Library): Implement.
Behdad Esfahbod 6dfdaf4d 2015-01-14T18:21:13 [base] Do not reorder library->renderers upon use. Instead of keeping `library->renderers' in a MRU order, just leave it as-is. The MRU machinery wasn't thread-safe. With this patch, rasterizing glyphs from different faces from different threads doesn't fail choosing rasterizer (FT_Err_Cannot_Render_Glyph). Easiest to see that crash was to add a `printf' (or otherwise let thread yield in FT_Throw with debugging enabled). * src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c (FT_Outline_Render): Don't call `FT_Set_Renderer'.
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.
Alexei Podtelezhnikov 70241553 2014-12-24T12:11:46 [base] Formatting and nanooptimizations. * src/base/ftcalc.c, * src/base/fttrigon.c: Revise sign restoration.
Werner Lemberg c9ca6ffc 2014-12-11T13:39:39 * src/base/ftobjs.c (FT_Get_Glyph_Name): Fix off-by-one check. Problem reported by Dennis Felsing <dennis@felsin9.de>.
Werner Lemberg 0098d550 2014-12-07T11:03:57 Uppercase all hex digits for orthogonality.
Werner Lemberg 9870d6da 2014-12-07T09:40:47 */*: Decorate hex constants with `U' and `L' where appropriate.
Werner Lemberg ed6a9df0 2014-12-06T23:28:58 Whitespace.
Werner Lemberg 16188ebf 2014-12-03T10:18:34 FT_Sfnt_Tag: s/ft_sfnt_xxx/FT_SFNT_XXX/ for orthogonality. All public FreeType enumeration and flag values are uppercase... * include/tttables.h (FT_Sfnt_Tag): Implement it. For backwards compatilibity, retain the old values as macros. * src/base/ftfstype.c (FT_Get_FSType_Flags), src/sfnt/sfdriver.c (get_sfnt_table): Updated.
Werner Lemberg 3d167cbe 2014-11-27T05:19:41 * src/base/ftobjs.c (FT_Get_Glyph_Name): Fix compiler warning. Introdruced in previous change. Reported by Alexei.
Werner Lemberg f34f1925 2014-11-26T21:59:21 * src/*: Add checks for parameters of API functions where missing. `API functions' are functions tagged with `FT_EXPORT_DEF'. Besides trivial fixes, the following changes are included, too. * src/base/ftbdf.c (FT_Get_BDF_Charset_ID, FT_Get_BDF_Property): Set error code if no service is available. * src/base/ftinit.c (FT_Done_FreeType): Change return value for invalid `library' parameter to `Invalid_Library_Handle'. * src/base/ftobjs.c (FT_New_Size): Change return value for invalid `asize' parameter to `Invalid_Argument'. * src/base/ftoutln.c (FT_Outline_Copy): Change return value for invalid `source' and `target' parameters to `Invalid_Outline'. (FT_Outline_Done_Internal): Change return value for invalid `outline' parameter to `Invalid_Outline'.
suzuki toshiya cd4a5a26 2014-11-27T00:20:48 * src/base/ftobj.c (Mac_Read_POST_Resource): Additional overflow check in the summation of POST fragment lengths, suggested by Mateusz Jurczyk <mjurczyk@google.com>.
suzuki toshiya 1720e81e 2014-11-26T16:39:00 * src/base/ftobjs.c (Mac_Read_POST_Resource): Insert comments and fold too long tracing messages.
suzuki toshiya 18a8f0d9 2014-11-26T16:11:38 Fix Savannah bug #43540. * src/base/ftmac.c (parse_fond): Prevent a buffer overrun caused by a font including too many (> 63) strings to store names[] table.
suzuki toshiya 45331679 2014-11-26T16:02:17 * src/base/ftobjs.c (Mac_Read_POST_Resource): Use unsigned long variables to read the lengths in POST fragments. Suggested by Mateusz Jurczyk <mjurczyk@google.com>.
suzuki toshiya 35252ae9 2014-11-26T15:52:23 Fix Savannah bug #43539. * src/base/ftobjs.c (Mac_Read_POST_Resource): Fix integer overflow by a broken POST table in resource-fork.
suzuki toshiya 240c94a1 2014-11-26T15:43:29 Fix Savannah bug #43538. * src/base/ftobjs.c (Mac_Read_POST_Resource): Fix integer overflow by a broken POST table in resource-fork.
suzuki toshiya 5aff8530 2014-11-26T14:36:12 * src/base/ftobjs.c (Mac_Read_POST_Resource): Avoid memory leak by a broken POST table in resource-fork. Return after freeing the buffered POST table when it is found to be broken.
Werner Lemberg 02b8e7e8 2014-11-25T11:31:51 */*: s/Invalid_Argument/Invalid_Size_Handle/ where appropriate.
Werner Lemberg 0d4aa23e 2014-11-25T11:26:14 */*: s/Invalid_Argument/Invalid_Stream_Handle/ where appropriate.
Werner Lemberg f4f9e688 2014-11-25T11:11:55 */*: s/Invalid_Argument/Invalid_Library_Handle/ where appropriate.
Werner Lemberg 04c2aa18 2014-11-25T10:22:12 */*: s/Invalid_Argument/Invalid_Outline/ where appropriate.
Werner Lemberg 04edbbda 2014-11-25T10:21:13 */*: s/Invalid_Argument/Invalid_Face_Handle/ where appropriate.
Werner Lemberg 6689a009 2014-11-25T08:53:09 [Savannah bug #43682] Properly handle missing return errors. The functions in this patch *do* return non-trivial errors that must be taken care of. * src/autofit/afloader.c (af_loader_load_g), src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c (FT_Outline_Render), src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_endchar>, src/psaux/psobjs.c (ps_parser_load_field_table), src/psaux/t1decode (t1_decoder_parse_charstrings) <op_endchar>, src/truetype/ttgload.c (load_truetype_glyph <subglyph loop>, tt_loader_init, TT_Load_Glyph), src/truetype/ttgxvar.c (TT_Set_MM_Blend), src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Do it.
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 6889f7b7 2014-11-24T17:16:08 Remove all code related to FT_MAX_CHARMAP_CACHEABLE. This is no longer used. * src/base/ftobjs.c, src/cache/ftccmap.c, src/cff/cffobjs.c, src/sfnt/ttcmap.c: Do it.
Werner Lemberg 23c093fc 2014-11-21T08:41:39 Minor.
Werner Lemberg 9154dab8 2014-11-21T08:03:51 [ftlcdfil] Obey flow direction. * src/base/ftlcdfil.c (_ft_lcd_filter_fir, _ft_lcd_filter_legacy): Handle `up' flow.
Werner Lemberg 644d6fab 2014-11-21T07:28:50 * src/base/ftbitmap.c (FT_Bitmap_Convert): Improve. This commit completes argument checks and adds support for different flow directions.
Werner Lemberg 6de76174 2014-11-21T06:05:49 * src/base/ftbitmap.c (FT_Bitmap_Copy): Improve. This commit adds argument checks and support for different flow directions.
Werner Lemberg 1e6e1b83 2014-11-20T21:07:56 * src/base/ftbitmap.c (FT_Bitmap_New): Check argument.
Werner Lemberg b3500af7 2014-11-19T21:28:21 Change some fields in `FT_Bitmap' to unsigned type. This doesn't break ABI. * include/ftimage.h (FT_Bitmap): Make `rows', `width', `num_grays', `pixel_mode', and `palette_mode' unsigned types. * src/base/ftbitmap.c: Updated. (FT_Bitmap_Copy): Fix casts. * src/cache/ftcsbits.c, src/raster/ftraster.c, src/sfnt/pngshim.c: Updated.
Werner Lemberg df485774 2014-11-19T21:21:23 Make `FT_Bitmap_Convert' correctly handle negative `pitch' values. * src/base/ftbitmap.c (FT_Bitmap_Convert): Always use positive value for the pitch while copying data. Correctly set pitch sign in target bitmap.
Werner Lemberg d6061212 2014-11-19T21:13:23 Minor code improvement in `FT_Bitmap_Embolden'. * src/base/ftbitmap.c (FT_Bitmap_Embolden) <FT_PIXEL_MODE_GRAY[24]>: Fix thinko.
Werner Lemberg 8d05486e 2014-11-19T21:07:59 Minor documentation improvements and whitespace.
Alexei Podtelezhnikov 237c0abf 2014-11-19T22:10:29 Trailing space.
Alexei Podtelezhnikov f841ad3e 2014-11-19T21:19:06 * src/base/fttrigon.c: Use dedicated `FT_Angle' for arctan table.
Alexei Podtelezhnikov 2e73a1b4 2014-11-09T23:22:43 [base] CORDIC improvements. The scaling between the hypotenuse and its CORDIC approximation is based on regression analysis. The smaller padding for `theta' is justifed by its maximum error of less than 6. * src/base/fttrigon.c (ft_trig_downscale): Borrow code from ./ftcalc.c (ft_multo64), change linear intercept. (ft_trig_pseudo_polarize): Decrease `theta' padding.
Werner Lemberg 0e73d218 2014-11-09T01:27:38 * src/base/ftstroke.c (ft_stroker_inside): Fix border intersections. One more place to check whether `radius' is zero. Problem reported by Marco Wertz <marco.wertz@gmx.de>.
Werner Lemberg d8632a84 2014-10-25T06:28:18 Improve comments, remove dead code.
Alexei Podtelezhnikov aba0f498 2014-10-24T23:50:57 Improve flat corner definition. * include/internal/ftcalc.h (FT_HYPOT): Macro to approximate Euclidean distance with the alpha max plus beta min algorithm. * src/base/ftcalc.c (ft_corner_is_flat): Use it instead of Taxicab metric.
Alexei Podtelezhnikov 673a28ef 2014-10-11T14:40:51 [base] Small bbox correction. * src/base/ftbbox.c (FT_Outline_Get_BBox): Start from nonsense bbox instead of initial point that could be `off' in conic outlines.
Alexei Podtelezhnikov 40dac113 2014-10-09T00:58:14 [base] Fix Savannah bug #43356. * src/base/ftbbox.c (BBox_Move_To, BBox_Conic_To): Update bbox in case of implicit `to'. (BBox_Line_To): New emitter that does not update bbox.
Alexei Podtelezhnikov 2ffcf17e 2014-10-08T22:01:08 [base] Introduce and use new macro `FT_UPDATE_BBOX' * src/base/ftbbox.c (FT_UPDATE_BBOX): New macro. (FT_Outline_Get_BBox): Use it here.
Alexei Podtelezhnikov 7abdb8cc 2014-10-02T23:13:33 [base] Significant optimization of `ft_div64by32' We shift as many bits as we can into the high register, perform 32-bit division with modulo there, then work through the remaining bits with long division. This optimization is especially noticeable for smaller dividends that barely use the high register. * src/base/ftcalc.c (ft_div64by32): Updated.