src/smooth


Log

Author Commit Date CI Message
Werner Lemberg 9adeab64 2016-01-13T11:54:10 Update copyright year.
Werner Lemberg 9d0b76d7 2016-01-12T22:27:29 Don't use macro names that start with `_[A-Z]' [2/3]. Such macro names are reserved for both C and C++. * include/freetype/ftimage.h, src/raster/ftraster.c, src/smooth/ftgrays.c, src/smooth/ftgrays.h: s/_STANDALONE_/STANDALONE_/.
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_'.
Alexei Podtelezhnikov 6eb6158d 2015-10-06T22:39:54 [smooth] Faster alternative line renderer. This implementation renders the entire line segment at once without subdividing it into scanlines. The main speed improvement comes from reducing the number of divisions to just two per line segment, which is a bare minimum to calculate cell coverage in a smooth rasterizer. Notably, the progression from cell to cell does not itself require any divisions at all. The speed improvement is more noticeable at larger sizes. * src/smooth/ftgrays.c (gray_render_line): New implementation.
Alexei Podtelezhnikov e2dae8fe 2015-10-01T22:03:34 [smooth] Clean up worker. * src/smooth/ftgrays.c (gray_TWorker): Remove never used fields.
Alexei Podtelezhnikov 8bbcfb2c 2015-09-30T23:08:53 [smooth] Clean up worker. * src/smooth/ftgrays.c (gray_TWorker): Remove lightly used `last_ey'. (gray_start_cell, gray_render_line): Update.
Alexei Podtelezhnikov d8a44ff9 2015-09-26T22:33:55 Remove unused macro.
Alexei Podtelezhnikov b002f688 2015-09-07T13:47:36 * src/smooth/ftgrays.c (gray_render_line): Simplify clipping.
Alexei Podtelezhnikov 5a6dc872 2015-09-04T23:14:46 [raster,smooth] Microoptimizations. * src/raster/ftraster.c (Insert_Y_Turn, Finalize_Profile_Table, Beziier_Up, ): Use do-while loops. * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line, gray_convert_glyph): Ditto.
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 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.
Werner Lemberg 4d1f7af1 2015-02-23T07:04:36 [smooth, raster] Re-enable standalone compilation. * src/raster/ftraster.c (FT_RENDER_POOL_SIZE, FT_MAX) [_STANDALONE_]: Define macros. * src/smooth/ftgrays.c (FT_RENDER_POOL_SIZE, FT_MAX, FT_ABS, FT_HYPOT) [_STANDALONE_]: Define macros.
Werner Lemberg cb13e710 2015-02-23T06:41:52 [smooth] Signedness fixes. * src/smooth/ftgrays.c, src/smooth/ftsmooth.c: Apply.
Werner Lemberg f57fc59e 2015-01-17T20:41:43 Run `src/tools/update-copyright'.
Behdad Esfahbod b2ba6866 2015-01-14T18:43:13 [smooth] Fix uninitialized memory access. Looks like `ras.span_y' could always be used without initialization. This was never detected by valgrind before because the library-wide `raster_pool' was used for the worker object and `raster_pool' was originally zero'ed. But subsequent reuses of it were using `span_y' uninitialized. With the recent change to not use `render_pool' and allocate worker and buffer on the stack, valgrind now detects this uninitialized access. * src/smooth/ftgrays.c (gray_raster_render): Initialize `ras.span_y'.
Behdad Esfahbod 747ae2c8 2015-01-14T17:54:26 [smooth] Allocate render pool for smooth rasterizer on the stack. Instead of using the `render_pool' member of `FT_Library' that is provided down to the rasterizer, completely ignore that and allocate needed objects on the stack instead. With this patch, rasterizing glyphs from different faces from different threads doesn't crash in the smooth rasterizer. Bugs: https://bugzilla.redhat.com/show_bug.cgi?id=678397 https://bugzilla.redhat.com/show_bug.cgi?id=1004315 https://bugzilla.redhat.com/show_bug.cgi?id=1165471 https://bugs.freedesktop.org/show_bug.cgi?id=69034 * src/smooth/ftgrays.c (gray_TRaster): Remove `buffer', `buffer_size', `band_size', and `worker' members. (gray_raster_render): Create `buffer', `buffer_size', and `band_size' locally. (gray_raster_reset): Updated.
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 553c9672 2014-12-07T19:29:52 Work around a bug in Borland's C++ compiler. See http://qc.embarcadero.com/wc/qcmain.aspx?d=118998 for Borland's bug tracker entry. Reported by Yuliana Zigangirova <zigangirova@inbox.ru>, http://lists.gnu.org/archive/html/freetype-devel/2014-04/msg00001.html. * include/internal/ftvalid.h (FT_ValidatorRec), src/smooth/ftgrays.c (gray_TWorker_): Move `ft_jmp_buf' field to be the first element.
suzuki toshiya 2676e07a 2014-11-28T00:58:25 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Remove unrequired negative value check for `width' and `height'.
suzuki toshiya 1b057040 2014-11-27T17:53:20 Prevent too negative values (< FT_INT_MIN) in bitmap metrics, suggested by Alexei. * src/pfr/pfrsbit.c (pfr_slot_load_bitmap): Prevent too negative values in `xpos' and `ypos + ysize'. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Prevent too negative values in `x_left' and `y_top'. Either negative values in `width' and `height' are checked.
Werner Lemberg 04c2aa18 2014-11-25T10:22:12 */*: s/Invalid_Argument/Invalid_Outline/ where appropriate.
Werner Lemberg 3e86711e 2014-11-25T09:01:07 [Savannah bug #43682] Adjust some renderer callbacks. * src/raster/ftraster.c (ft_black_set_mode): Change return type to `int' to stay in sync with `FT_Renderer_SetModeFunc' prototype. * src/smooth/ftgrays.c (gray_raster_set_mode): New dummy function for orthogonality. (ft_grays_raster): Use it.
Alexei Podtelezhnikov 525d4876 2014-10-31T22:12:37 [smooth] Improve code readability. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Rearrange code.
Alexei Podtelezhnikov e1efe0a2 2014-10-31T00:07:14 [smooth] Reduce outline translations during rendering. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Translate origin virtually by modifying cbox, actually translate outline if cumulative shift is not zero.
Alexei Podtelezhnikov c7fd9356 2014-10-30T22:43:01 [smooth] Fix Savannah bug #35604 (cont'd). * src/smooth/ftsmooth.c (ft_smooth_render_generic): Remove checks and casts that became unnecessary after the variable type upgrades.
Alexei Podtelezhnikov 465ab995 2014-10-29T23:45:23 [smooth] Improve code readability. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Rearrange code.
Alexei Podtelezhnikov 74916997 2014-10-29T22:24:24 Unify hypotenuse approximations. * include/internal/ftcalc.h (FT_HYPOT): Move macro from here... * include/internal/ftobjs.h: ... to here, next to required `FT_ABS'. * src/smooth/ftgrays.c (gray_render_cubic): Use it here.
David Weber 7630787a 2014-04-13T15:41:13 [smooth] Fix stand-alone compilation. * src/smooth/ftgrays.c (FT_BEGIN_STMNT, FT_END_STMNT): Define.
Sean McBride 7be2a94a 2014-02-08T13:55:38 Fix clang static analyzer and compiler warnings. * src/autofit/afhints.c (af_glyph_hints_align_weak_points), src/autofit/afloader (af_loader_load_g) <FT_GLYPH_FORMAT_COMPOSITE>, src/base/ftcalc.c (FT_MSB), src/base/ftoutln.c (FT_Outline_Decompose), src/bdf/bdfdrivr.c (bdf_interpret_style), src/cff/cffparse.c (cff_parse_integer), src/cid/cidparse.c (cid_parser_new), src/pfr/pfrload.c (pfr_phy_font_load), src/raster/ftraster.c (Decompose_Curve), src/sfnt/sfdriver.c (sfnt_get_ps_name), src/sfnt/ttcmap.c (tt_cmap12_next, tt_cmap13_next), src/smooth/ftgrays.c (gray_hline): Remove dead code. * src/autofit/afmodule.c (af_property_get_face_globals, af_property_set, af_property_get), src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Make functions static. * src/base/ftobjs.c (ft_remove_renderer): Protect against library == NULL. (ft_property_do): Make function static. * src/base/ftrfork.c: Include `ftbase.h'. * src/sfnt/ttsbit.c (tt_face_load_sbix_image) [!FT_CONFIG_OPTION_USE_PNG], src/type1/t1gload.c (T1_Compute_Max_Advance): Avoid compiler warning. * src/truetype/ttinterp.c (TT_New_Context): Reduce scope of variable.
Werner Lemberg fae38207 2013-11-13T08:55:46 Simplify header file hierarchy. This large patch changes the header file directory layout from `include/freetype/...' to `include/...', effectively removing one level. Since the file `ft2build.h' is also located in `include' (and it stays there even after installation), all FreeType header files are now in a single directory. Applications that use (a) `freetype-config' or FreeType's `pkg-config' file to get the include directory for the compiler, and (b) the documented way for header inclusion like #include <ft2build.h> #include FT_FREETYPE_H ... don't need any change to the source code. * include/freetype/*: Move up to... * include/*: ... this directory. * builds/amiga/include/freetype/*: Move up to... * builds/amiga/include/*: ... this directory. */*: Essentially do `s@/freetype/@/@' where appropriate. * CMakeList.txt: Simplify. * builds/unix/freetype-config.in, builds/unix/freetype2.in: For `--cflags', return a single directory. * builds/unix/install.mk (install): No longer try to remove `cache' and `internal' subdirectories; instead, remove the `freetype' subdirectory.
Werner Lemberg 9a7951d9 2013-07-16T15:25:24 [smooth] Fix segfault caused by previous commit. * src/smooth/ftgrays.c (gray_set_cell): Always compute `ras.invalid'.
David Turner 89929ec6 2013-07-16T13:36:07 [smooth] Improve performance. Provide a work-around for an ARM-specific performance bug in GCC. This speeds up the rasterizer by more than 5%. Also slightly optimize `set_gray_cell' and `gray_record_cell' (which also improves performance on other platforms by a tiny bit (<1%). * src/smooth/ftgrays.c (FT_DIV_MOD): New macro. Use it where appropriate. (gray_record_cell, gray_set_cell, gray_move_to, gray_convert_glyph_inner): Streamline condition handling.
Werner Lemberg d7e3444b 2013-06-14T18:33:39 * src/smooth/ftgrays.c One final pragma to silence 64-bit MSVC.
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.
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 5ea06ce0 2013-03-17T08:14:46 Whitespace.
Werner Lemberg 706fc833 2013-03-17T08:09:17 Remove dead code. * src/raster/rastpic.c (ft_raster1_renderer_class_pic_init) src/smooth/ftspic.c (ft_smooth_renderer_class_pic_init): Do it.
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 4cd5fd46 2013-01-24T13:33:06 Remove trailing whitespace.
Werner Lemberg fdcbaf19 2012-10-21T10:40:12 [smooth] Improve tracing. * src/smooth/ftgrays.c (gray_sweep): Trace last sweep line of current band also.
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.
Alexei Podtelezhnikov 9ea55c7c 2012-08-12T11:14:46 Fix Savannah bug #37017. * src/smooth/ftgrays.c (gray_render_cubic): Use a different set of checks when detecting super curvy splines to be split.
Werner Lemberg e7454a47 2012-07-11T12:05:58 [smooth] Avoid memory like in case of failure. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Use flags to indicate what to clean up after finishing the function, with and without errors.
Werner Lemberg f1ec0842 2012-03-11T13:48:25 s/maximal/maximum/ everywhere, s/minimal/minimum/ where appropriate.
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.
Werner Lemberg fcbc82e6 2012-02-26T20:54:19 [smooth] Fix Savannah bug #35604. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Use `FT_Pos' instead of `FT_UInt' for some variables and update comparisons accordingly. A detailed analysis can be found in the bug report.
Vinnie Falco 95111433 2012-02-22T07:01:35 Prepare source code for amalgamation (4/6). * src/smooth/ftgrays.c, src/raster/ftraster.c: Undefine RAS_ARG, RAS_ARGS, RAS_VAR, and RAS_VARS before defining it. * src/smooth/ftgrays.c: s/TRaster/black_TRaster/, s/PRaster/black_PRaster/. * src/raster/ftraster.c: s/TRaster/gray_TRaster/, s/PRaster/gray_PRaster/.
Vinnie Falco d55f16df 2012-02-21T09:21:19 Prepare source code for amalgamation (3/6). * src/smooth/ftgrays.c: s/TWorker/black_TWorker/, s/PWorker/black_PWorker/. * src/raster/ftraster.c: s/TWorker/gray_TWorker/, s/PWorker/gray_PWorker/
Vinnie Falco 5ccebc4e 2012-02-21T08:54:55 Prepare source code for amalgamation (2/6). * src/smooth/ftgrays.c, src/raster/ftraster.c: Undefine FLOOR, CEILING, TRUNC, and SCALED before defining it.
Vinnie Falco 126405ad 2012-02-21T08:48:39 Prepare source code for amalgamation (1/6). See discussion starting at http://lists.gnu.org/archive/html/freetype-devel/2012-01/msg00037.html * src/smooth/ftgrays.c: s/TBand/gray_TBand/. * src/raster/ftraster.c: s/TBand/black_TBand/.
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 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 5cb35640 2011-12-10T23:16:04 Add some variable initializations. Reported by Richard COOK <rscook@unicode.org>. * src/type1/t1driver.c (t1_ps_get_font_value): Initialize `val'. * src/smooth/ftgrays.c (gray_render_conic): Initialize `levels' earlier.
Werner Lemberg c52f44d4 2011-11-30T10:46:53 Whitespace.
Werner Lemberg e9e93d1b 2011-09-17T09:21:25 [smooth] Slightly optimize conic and cubic flatterners. * src/smooth/ftgrays.c (gray_render_conic, gray_render_cubic): Move out some code from the main loop to speed it up.
Werner Lemberg 71cc1a83 2011-05-30T07:20:37 Fix gcc 4.6 compiler warnings. * src/autofit/afcjk.c (af_cjk_metrics_init_blues): Use casts and remove unused variables. * src/autofit/aflatin.c (af_latin_hints_compute_edges): Comment out `up_dir'. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Use `height_org' and `width_org' conditionalized.
Alexei Podtelezhnikov 8fb88414 2011-03-17T20:24:57 A better fix for Savannah bug #32671. * src/smooth/ftgrays.c (gray_render_conic): Clean up code and replace WHILE loop with a more natural DO-WHILE construct.
Werner Lemberg 6c045535 2011-03-07T05:40:42 Quick fix for Savannah bug #32671. This isn't the optimal solution yet, but it restores the previous rendering quality (more or less). * src/smooth/ftgrays.c (gray_render_conic): Do more splitting.
Werner Lemberg f3ce2370 2011-01-03T07:11:54 */rules.mk: Handle `*pic.c' files.
Алексей Подтележников 7c4ac3cb 2010-11-28T08:23:40 [ftsmooth]: Minor code simplification. * src/smooth/ftgrays (gray_render_cubic): Do only one comparison instead of two.
Alexei Podtelezhnikov 6aee6909 2010-11-02T16:01:03 [ftsmooth] Improve rendering. * src/smooth/ftsmooth.c (gray_render_conic): Since version 2.4.3, cubic deviations have been estimated _after_ UPSCALE, whereas conic ones have been evaluated _before_ UPSCALE, which produces inferior rendering results. Fix this. Partially undo change from 2010-10-15 by using ONE_PIXEL/4; this has been tested with demo images sent to the mailing list. See http://lists.gnu.org/archive/html/freetype-devel/2010-10/msg00055.html and later mails in this thread.
Werner Lemberg 34d61e86 2010-10-15T20:44:15 Fix thinko in spline flattening. FT_MAX_CURVE_DEVIATION is dependent on the value of ONE_PIXEL. * src/smooth/ftgrays.c (FT_MAX_CURVE_DEVIATION): Remove it and replace it everywhere with ONE_PIXEL/8.
Werner Lemberg 0e6fc091 2010-10-02T09:05:46 [smooth] Fix splitting of cubics for negative values. Reported by Róbert Márki <gsmiko@gmail.com>; see http://lists.gnu.org/archive/html/freetype/2010-09/msg00019.html. * src/smooth/ftgrays.c (gray_render_cubic): Fix thinko.
Graham Asher e0a9a933 2010-09-20T09:29:23 [smooth] Fix and improve spline flattening. This fixes the flattening of cubic, S-shaped curves and speeds up the handling of both the conic and cubic arcs. See the discussions on the freetype-devel mailing list in late August and September 2010 for details. * src/smooth/ftgrays.c (FT_MAX_CURVE_DEVIATION): New macro. (TWorker): Remove `conic_level' and `cubic_level' elements. (gray_render_conic): Simplify algorithm. (gray_render_cubic): New algorithm; details are given in the code comments. (gray_convert_glyph): Remove heuristics.
Werner Lemberg a205b3ca 2010-08-10T02:59:12 Try to fix Savannah bug #30717 (and probably #30719 too). * src/smooth/ftsmooth.c (ft_smooth_render_generic): Add another overflow test for `width' and `height'.
Werner Lemberg c8f5b98b 2010-07-12T21:13:22 Remove C++ warnings. */*: Initialize pointers where necessary to make g++ happy.
Werner Lemberg e0176397 2010-07-03T15:31:38 Make ftgrays.c compile stand-alone again. * src/smooth/ftgrays.c [_STANDALONE_]: Include `stddef.h'. (FT_INT_MAX, FT_PtrDist)[_STANDALONE_]: Define.
Werner Lemberg 6305b869 2010-06-30T18:24:33 Fix Savannah bug #30263. * src/smooth/ftgrays.c (gray_render_span): Use cast to `unsigned int' to avoid integer overflow. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Use smaller threshold values for `width' and `height'. This is not directly related to the bug fix but makes sense anyway.
Graham Asher e419f48b 2010-06-24T12:50:46 * src/smooth/ftgrays.c (gray_render_cubic): Fix algorithm. The previous version was too aggressive, as demonstrated in http://lists.gnu.org/archive/html/freetype-devel/2010-06/msg00020.html.
Werner Lemberg f765e440 2010-06-24T10:34:29 */*: Use module specific error names where appropriate.
Graham Asher 7fb3ef64 2010-06-10T08:10:57 ftgrays: Speed up rendering of small cubic splines. * src/smooth/ftgrays.c (gray_render_cubic): Implement new, simplified algorithm to find out whether the spline can be replaced with two straight lines. See this thread for more: http://lists.gnu.org/archive/html/freetype-devel/2010-06/msg00000.html
Werner Lemberg ad61f178 2010-06-09T15:18:57 Oops, revert unwanted previous commit for ftgrays.c.
Werner Lemberg 7d3d2cc4 2010-06-09T09:14:09 Fix Savannah bug #30082. * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_callothersubr>: Protect against stack underflow.
suzuki toshiya 057bc4c0 2009-08-01T00:35:40 smooth: Exclude 16-bit system in invalid pitch/height check.
suzuki toshiya 471980d9 2009-08-01T00:32:20 smooth: Improve the format in debug message.
suzuki toshiya e45e0522 2009-08-01T00:32:08 smooth: Fix some data types mismatching with their sources.
suzuki toshiya e866cf3f 2009-08-01T00:32:06 Improve bitmap size or pixel variables for 16-bit systems.
suzuki toshiya 93bb1594 2009-08-01T00:30:21 smooth: Fix a data type mismatching with its source.
suzuki toshiya ea5268d2 2009-08-01T00:30:20 smooth: Fix a data type mismatching with its source.
suzuki toshiya da594627 2009-07-09T17:21:32 smooth: Check glyph size by width/height, instead of pitch/height.
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 d1862d22 2009-06-19T09:09:34 More ftgray fixes for FT_STATIC_RASTER. Problems reported by suyu@cooee.cn. * src/smooth/ftgrays.c (gray_move_to, gray_raster_render): Use RAS_VAR.
Werner Lemberg b5a46059 2009-04-26T16:32:10 Make ftgrays compile with _STANDALONE_ and FT_STATIC_RASTER again. Problems reported by suyu@cooee.cn. * src/smooth/ftgrays.c (FT_DEFINE_OUTLINE_FUNCS, FT_DEFINE_RASTER_FUNCS) [_STANDALONE_]: Define. [!_STANDALONE_]: Include ftspic.h only here. (ras): Define/declare after definition of `TWorker'. Use `RAS_VAR_' where necessary.
Oran Agra c1e22f39 2009-04-05T18:14:04 Position Independent Code (PIC) support in smooth renderer. * src/smooth/ftsmooth.h declare ft_smooth_renderer_class, ft_smooth_lcd_renderer_class and ft_smooth_lcd_v_renderer_class using macros from ftrender.h, when FT_CONFIG_OPTION_PIC is defined create and destroy functions will be declared. * src/smooth/ftsmooth.c when FT_CONFIG_OPTION_PIC is defined the following structs: ft_smooth_renderer_class, ft_smooth_lcd_renderer_class and ft_smooth_lcd_v_renderer_class will have functions to init or create and destroy them instead of being allocated in the global scope. And macros will be used from ftspic.h in order to access ft_grays_raster from the pic_container (allocated in ftgrays.c). * src/smooth/ftgrays.h include FT_CONFIG_CONFIG_H * src/smooth/ftgrays.c when FT_CONFIG_OPTION_PIC is NOT defined func_interface was moved from gray_convert_glyph_inner function to the global scope. When FT_CONFIG_OPTION_PIC is defined func_interface and ft_grays_raster structs will have functions to init them instead of being allocated in the global scope. And func_interface will be allocated on the stack of gray_convert_glyph_inner. New Files: * src/smooth/ftspic.h declare struct to hold PIC globals for smooth renderer and macros to access them. * src/smooth/ftspic.c implement functions to allocate, destroy and initialize PIC globals for smooth renderer. * src/smooth/smooth.c add new file to build: ftspic.c. * src/smooth/jamfile add new files to FT2_MULTI build: ftspic.c.
Werner Lemberg 7171ff57 2009-03-20T21:08:29 Fix `make multi' run. * src/smooth/ftsmooth.h: Include FT_INTERNAL_DEBUG_H.
Werner Lemberg 79972af4 2009-03-20T08:21:37 Protect against too large glyphs. Problem reported by Tavis Ormandy <taviso@google.com>. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Don't allow `width' or `pitch' to be larger than 0xFFFF.
Werner Lemberg f47acf2b 2009-01-12T20:11:14 Avoid compiler warnings. * */*: s/do ; while ( 0 )/do { } while ( 0 )/. Reported by Sean McBride <sean@rogue-research.com>.
Werner Lemberg e85baf4f 2009-01-12T20:01:10 Fix stdlib dependencies. Problem reported by Mickey Gabel <mickey@monfort.co.il>. * include/freetype/config/ftstdlib.h (ft_exit): Removed. Unused. * src/autofit/afhints.c, src/base/ftlcdfil.c, src/smooth/ftsmooth.c: s/memcpy/ft_memcpy/. * src/psaux/t1decode.c: s/memset/ft_memset/, s/memcpy/ft_memcpy/.
Werner Lemberg 3c5ad951 2008-12-21T17:51:12 * src/pfr/pfrdrivr.c, src/winfonts/winfnt.c, src/cache/ftcmanag.c, src/smooth/ftgrays.c, src/base/ftobjc.s, src/sfobjs.c: s/_Err_Bad_Argument/_Err_Invalid_Argument/. The former is for errors in the bytecode interpreter only.
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 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 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 70f4cff1 2008-09-20T16:12:05 * src/smooth/ftgrays.c (gray_find_cell): Fix threshold. The values passed to this function are already `normalized'. Problem reported by Stephan T. Lavavej <stl@nuwen.net>. * docs/CHANGES: Document it.
Werner Lemberg 22e970a2 2008-09-20T12:20:21 Formatting, minor code fixes.
Werner Lemberg 6874d85b 2008-09-20T11:50:47 * src/base/ftoutln.c: Include FT_INTERNAL_DEBUG_H. (FT_Outline_Decompose): Decorate with tracing messages. * src/smooth/ftgrays.c [DEBUG_GRAYS]: Replace with FT_DEBUG_LEVEL_TRACE. [_STANDALONE_ && FT_DEBUG_LEVEL_TRACE]: Include stdio.h and stdarg.h. (FT_TRACE) [_STANDALONE_]: Remove. (FT_Message) [_STANDALONE_ && FT_DEBUG_LEVEL_TRACE]: New function. (FT_TRACE5, FT_TRACE7) [_STANDALONE_]: New macros. (FT_ERROR) [_STANDALONE_]: Updated. (gray_hline) [FT_DEBUG_LEVEL_TRACE]: Fix condition. Use FT_TRACE7. (gray_dump_cells): Make it `static void'. (graay_convert_glyph): Use FT_TRACE7. (FT_Outline_Decompose) [_STANDALONE_]: Synchronize with version in ftoutln.c. * src/base/ftadvanc.c (FT_Get_Advance, FT_Get_Advances): Use FT_ERROR_BASE. Other minor modifications.