src/smooth/ftsmooth.c


Log

Author Commit Date CI Message
Werner Lemberg 39ce3ac4 2017-09-16T19:08:17 * Version 2.8.1 released. ========================= Tag sources with `VER-2-8-1'. * docs/VERSION.TXT: Add entry for version 2.8.1. * docs/CHANGES: Updated. * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, builds/windows/vc2005/index.html, builds/windows/vc2008/freetype.vcproj, builds/windows/vc2008/index.html, builds/windows/vc2010/freetype.vcxproj, builds/windows/vc2010/index.html, builds/windows/visualc/freetype.dsp, builds/windows/visualc/freetype.vcproj, builds/windows/visualc/index.html, builds/windows/visualce/freetype.dsp, builds/windows/visualce/freetype.vcproj, builds/windows/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.8/2.8.1/, s/28/281/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1. * builds/unix/configure.raw (version_info): Set to 21:0:15. * CMakeLists.txt (VERSION_PATCH): Set to 1.
Alexei Podtelezhnikov 410f3799 2017-03-09T00:08:38 [smooth] Harmony LCD rendering. This is a new technology for LCD-optimized rendering. It capitalizes on the fact that each color channel grid is shifted by a third of a pixel. Therefore it is logical to render 3 separate monochrome bitmaps shifting the outline by 1/3 pixel, and then combine them. Importantly, the resulting output does not require additional LCD filtering. * src/smooth/ftsmooth.c (ft_smooth_render_generic) [!FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Implement new LCD-optimized rendering. * include/freetype/ftlcdfil.h, include/freetype/freetype.h, include/freetype/config/ftoption.h, devel/ftoption.h: Updated documentation.
Alexei Podtelezhnikov 5710ef98 2017-08-08T22:00:35 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Clean up.
Alexei Podtelezhnikov 7b727833 2017-06-17T23:28:14 [base, smooth] LCD filtering cleanups. * src/base/ftlcdlil.c (ft_lcd_filter_fir, _ft_lcd_filter_legacy): Clean up, start filtering from the bottom-left origin. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Updated.
Alexei Podtelezhnikov ab2599ea 2017-05-20T00:35:21 [smooth] Implement minimal dynamic padding for LCD filtering. Extra bitmap padding for LCD filtering depends on the filter. The default 5-tap filter needs 2 extra subpixels. The light 3-tap filter needs only 1 extra subpixel. This space could be already available due to rounding. In order to optimize the padding, we now expand CBox for the given filter weights before rounding. This change breakes current Skia (and Firefox). * include/freetype/internal/ftobjs.h (FT_LibraryRec) [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Remove `lcd_extra' field. * src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights, FT_Library_SetLcdFilter): Remove `lcd_extra' initializations. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Implement dymanic LCD padding.
Werner Lemberg e99b26aa 2017-05-14T21:57:27 Remove remnants of raster pool. * include/freetype/internal/ftobjs.h (FT_LibraryRec): Remove `raster_pool' and `raster_pool_size' fields. * src/base/ftobjs.c (FT_New_Library), src/raster/ftrend1.c (ft_raster1_init), src/smooth/ftsmooth.c (ft_smooth_init): Updated.
Werner Lemberg ba40054c 2017-05-02T12:32:19 [autofit] Remove `slight' auto-hint mode again. A poll on freetype-devel favoured changes directly applied to `light'. * include/freetype/freetype.h (FT_LOAD_TARGET_SLIGHT, FT_RENDER_MODE_SLIGHT): Removed. * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c (af_latin_hints_init), src/autofit/aflatin2.c (af_latin2_hints_init): Revert change from 2017-04-22. * src/autofit/afloader.c (af_loader_load_glyph) Remove references to FT_RENDER_MODE_SLIGHT. [AF_CONFIG_OPTION_TT_SIZE_METRICS]: Enable TrueType-like metrics unconditionally. * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Revert change from 2017-04-22. * src/base/ftobjs.c (FT_Load_Glyph): Revert change from 2017-04-22. * src/pshinter/pshalgo.c (ps_hints_apply): Revert change from 2017-04-22. * src/smooth/ftsmooth.c (ft_smooth_render): Revert change from 2017-04-22. * docs/CHANGES: Updated.
Werner Lemberg 5aa6716a 2017-04-22T13:27:21 Add new `slight' auto-hinting mode. This mode uses fractional advance widths and doesn't scale glyphs horizontally, only applying vertical scaling and hinting. At the same time, the behaviour of the `light' auto-hinter gets restored for backwards compatibility: Both vertical and horizontal scaling is again based on rounded metrics values (this was changed in a commit from 2017-03-30 as a side effect). To be more precise, the behaviour is restored for TrueType fonts only; for other font formats like Type 1, this is a new feature of the `light' hinting mode. * include/freetype/freetype.h (FT_LOAD_TARGET_SLIGHT): New macro. (FT_RENDER_MODE_SLIGHT): New render mode. * include/freetype/internal/ftobjs.h (FT_Size_InternalRec): Add `autohint_mode' and `autohint_metrics' fields. * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c (af_latin_hints_init), src/autofit/aflatin2 (af_latin2_hints_init): Updated. * src/autofit/afloader.c (af_loader_embolden_glyph_in_slot): Use `autohint_metrics'. (af_loader_load_glyph): s/internal/slot_internal/. Initialize `autohint_metrics' and `autohint_mode' depending on current auto-hint mode. Use `autohint_metrics'. Updated. * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Updated. * src/base/ftobjs.c (FT_Load_Glyph): Updated. (FT_New_Size): Allocate `internal' object. * src/pshinter/pshalgo.c (ps_hints_apply): Updated. * src/smooth/ftsmooth.c (ft_smooth_render): Updated.
Nikolaus Waxweiler 2e951988 2017-02-16T20:45:45 Add face property for LCD filter weights. * include/freetype/ftlcdfil.h (FT_PARAM_TAG_LCD_FILTER_WEIGHTS, FT_LCD_FILTER_FIVE_TAPS): New macros. (FT_LcdFiveTapFilter): New typedef. * include/freetype/ftobjs.h (FT_Face_InternalRec) [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Add `lcd_weights' field. (FT_Bitmap_LcdFilterFunc): Change third argument to weights array. (ft_lcd_filter_fir): New prototype. (FT_LibraryRec): Updated. * src/base/ftlcdfil.c (_ft_lcd_filter_fir): Renamed to... (ft_lcd_filter_dir): ... this base function. Updated. (_ft_lcd_filter_legacy): Updated. (FT_Library_SetLcdFilterWeights, FT_Library_SetLcdFilter): Updated. * src/base/ftobjs.c (ft_open_face_internal): Updated. (FT_Face_Properties): Handle FT_PARAM_TAG_LCD_FILTER_WEIGHTS. * src/smooth/ftsmooth.c (ft_smooth_render_generic) [FT_CONFIG_OPTION_SUBPIXEL_RENDERING: Handle LCD weights from `FT_Face_Internal'.
Werner Lemberg 563ae780 2017-01-04T20:16:34 Update copyright year.
Werner Lemberg 37c72f66 2016-12-25T22:55:25 Minor formatting.
Werner Lemberg 45cad2e5 2016-09-28T19:10:52 More FT_ZERO usage. * src/gxvalid/gxvcommn.c (gxv_ClassTable_validate): s/ft_memset/FT_MEM_ZERO/. * src/psaux/t1decode.c (t1_decoder_parse_charstrings): s/ft_memset/FT_ARRAY_ZERO/. * src/raster/ftraster.c (FT_ZERO): Define. (ft_black_new): Use it. * src/raster/ftrend1.c (ft_raster1_get_cbox): s/FT_MEM_ZERO/FT_ZERO/. * src/smooth/ftgrays.c (FT_ZERO): Define. (gray_raster_new): Use it. * src/smooth/ftsmooth.c (ft_smooth_get_cbox): s/FT_MEM_ZERO/FT_ZERO/.
Werner Lemberg c95b7652 2016-09-17T17:12:50 s/0/NULL/ for function pointers; comments, formatting.
Werner Lemberg 9adeab64 2016-01-13T11:54:10 Update copyright year.
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'.
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.
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.
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 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 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 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.
suzuki toshiya 1749d8bc 2012-01-17T02:00:24 Remove trailing spaces.
Werner Lemberg c52f44d4 2011-11-30T10:46:53 Whitespace.
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.
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 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.
suzuki toshiya 057bc4c0 2009-08-01T00:35:40 smooth: Exclude 16-bit system in invalid pitch/height check.
suzuki toshiya e866cf3f 2009-08-01T00:32:06 Improve bitmap size or pixel variables for 16-bit systems.
suzuki toshiya da594627 2009-07-09T17:21:32 smooth: Check glyph size by width/height, instead of pitch/height.
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 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 0d0d78da 2006-11-14T10:37:10 formatting
David Turner 8765c71b 2006-11-10T16:49:42 * include/freetype/ftlcdfil.h, include/internal/ftobjs.h, src/base/ftlcdfilt.c, src/smooth/ftsmooth.c: API change for the LCD filter, the FT_LcdFilter value is a enum describing which filter to apply, new values FT_LCD_FILTER_LIGHT and FT_LCD_FILTER_LEGACY (the latter implements the LibXft original algorithm which produces incredible color fringes for everything except very-well hinted text) * src/autofit/aflatin.c: various tiny improvements that drastically improve the handling of serif fonts and of LCD/LCD_V hinting modes.
Werner Lemberg 2c002e13 2006-09-29T21:31:53 formatting, improving documentation
David Turner 8a317cf7 2006-09-27T07:52:48 * include/freetype/freetype.h: bumping FT_FREETYPE_PATCH to 2 for an upcoming 2.2.2 release * include/freetype/ftlcdfil.h, src/freetype/ftlcdfil.c: added a new API to support color filtering of subpixel glyph bitmaps. In default build, the function FT_Library_SetLcdFilter returns FT_Err_Unimplemented_Feature; you need to #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in ftoption.h to compile the real implementation * src/smooth/ftsmooth.c: adding support for sub-pixel color filtering; simplifying a few function calls * include/freetype/config/ftheader.h: adding FT_LCD_FILTER_H macro that points to <freetype/ftlcdfil.h>
Werner Lemberg 110246c6 2006-09-26T21:55:44 formatting
David Turner e3d6e948 2006-09-26T16:58:21 CHANGES BETWEEN 2.2.1 and 2.2.2 I. IMPORTANT BUG FIXES - Various integer overflows have been fixed. - PFB fonts with MacOS resource fork weren't handled correctly on non-MacOS platforms. - The PCF font loarder has been seriously hardened against malformed font files. II. IMPORTANT CHANGES - the unpatented hinter is now part of the default build of the library, and we added code to automatically support "tricky" fonts that need it. what this means is that FreeType should "just work" with certain Asian fonts, like MingLiu, which cannot properly load without a bytecode interpreter, but fortunately do not use any of the patented bytecode opcodes. Note that the API didn't change, so you can still force unpatented hinting with a special parameter to FT_Open_Face as well. if you're an embedded systems developer, you might want to *disable* the feature to save code space by undefining TT_CONFIG_OPTION_UNPATENTED_HINTING in ftoption.h. - LCD-optimized rendering is now disabled in all default builds of the library, mainly due to patent reasons. For more information see: http://lists.gnu.org/archive/html/freetype/2006-09/msg00064.html a new configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING has been introduced in ftoption.h; manually define it in this file if you want to re-enable the feature. the change only affects the implementation, not the FreeType API. This means that clients don't need to be modified, because the library still generates LCD decimated bitmaps, but with the added constraint that R=G=B on each triplet. - Some computation bugs in the TrueType bytecode interpreter were found, which allow us to get rid of very subtle and rare differences we had with the Windows renderer. III. MISCELLANEOUS - TrueType glyph loading is now about 25% faster. - the anti-aliased rasterizer has been optimized and is now 15% to 25% percent faster than the previous one, depending on content - the Type 1 loader has been improved; as an example, it now skips over top-level dictionaries properly ======================================================================
Werner Lemberg fa420250 2005-05-11T20:04:35 * include/freetype/ftimage.h (FT_Raster_RenderFunc), include/freetype/ftrender.h (FT_Glyph_TransformFunc, FT_Renderer_Render_Func, FT_Renderer_TransformFunc), src/base/ftglyph.c (ft_outline_glyph_transform), src/raster/ftrend1.c (ft_raster1_transform, ft_raster1_render), src/smooth/ftgrays.c (FT_Outline_Decompose, gray_raster_render), src/smooth/ftsmooth.c (ft_smooth_transform, ft_smooth_render_generic, ft_smooth_render, ft_smooth_render_lcd, ft_smooth_render_lcd_v): Decorate parameters with `const' where appropriate. * src/raster/ftraster.c (RASTER_RENDER_POOL): Removed. Obsolete. (ft_black_render): Decorate parameters with `const' where appropriate. * src/sfnt/ttcmap.c (tt_cmap4_set_range): Fix typo (FT_PEEK_SHORT -> FT_PEEK_USHORT) which caused crashes. Reported by Ismail Donmez <ismail@kde.org.tr>.
Werner Lemberg c846eac1 2004-02-19T21:39:58 * include/freetype/freetype.h: Document FT_LOAD_TARGET_XXX properly. * src/base/ftglyph.c (ft_bitmap_glyph_class, ft_outline_glyph_class): Tag with FT_CALLBACK_TABLE_DEF. * src/smooth/ftsmooth.c (ft_smooth_render): Handle FT_RENDER_MODE_LIGHT.
David Turner 87c0d30f 2003-12-24T01:10:46 * include/freetype/fttypes.h src/autofit/afangles.c src/autofit/aflatin.c src/autohint/ahglyph.c src/autohint/ahhint.c src/base/ftcalc.c src/base/ftgloadr.c src/base/ftglyph.c src/base/ftobjs.c src/base/ftsynth.c src/base/fttrigon.c src/cff/cffgload.c src/cid/cidgload.c src/cid/cidload.c src/pfr/pfrgload.c src/pfr/pfrload.c src/pfr/pfrsbit.c src/psaux/psobjs.c src/pshinter/pshalgo.c src/pshinter/pshglob.c src/pshinter/pshrec.c src/raster/ftrend1.c src/sfnt/ttcmap0.c src/smooth/ftsmooth.c src/truetype/ttdriver.c src/truetype/ttgload.c src/truetype/ttinterp.c src/truetype/ttobjs.c src/type1/t1gload.c src/winfonts/winfnt.c: use of the FT_PAD_XXX and FT_PIX_XXX macros to avoid compiler warnings with very pedantic compilers. Hints: (x) & -64 will warn if (x) is not signed.. use (x) & ~63 instead !
Werner Lemberg 7a024104 2003-06-18T06:59:57 * include/freetype/freetype.h (FT_Open_Flags): Replaced with #defines for the constants. (FT_Open_Args): Change type of `flags' to FT_UInt. (FT_GlyphSlot): Move `flags' to FT_Slot_Internal. * include/freetype/ftimage.h (FT_Outline_Flags, FT_Raster_Flag): Replaced with #defines for the constants. * include/freetype/internal/ftobjs.h (FT_Slot_Internal): New field `flags' (from FT_GlyphSlot). Updated all affected source files. (FT_GLYPH_OWN_BITMAP): New macro (from ftgloadr.h). * include/freetype/internal/ftgloadr.h (FT_GLYPH_OWN_BITMAP): Moved to ftobjs.h. * src/base/ftglyph.c (FT_Glyph_To_Bitmap): Use dummy FT_GlyphSlot_Internal object.
Werner Lemberg 052904e3 2003-06-17T10:42:27 * include/freetype/ftglyph.h (ft_glyph_bbox_unscaled, ft_glyph_bbox_subpixels, ft_glyph_bbox_gridfit, ft_glyph_bbox_truncate, ft_glyph_bbox_pixels): Replaced with FT_GLYPH_BBOX_UNSCALED, FT_GLYPH_BBOX_SUBPIXELS, FT_GLYPH_BBIX_GRIDFIT, FT_GLYPH_BBOX_TRUNCATE, FT_GLYPH_BBOX_PIXELS. The lowercase variants are now (deprecated aliases) to the uppercase versions. Updated all other files. * include/freetype/ftmodule.h (ft_module_font_driver, ft_module_renderer, ft_module_hinter, ft_module_styler, ft_module_driver_scalable, ft_module_driver_no_outlines, ft_module_driver_has_hinter): Replaced with FT_MODULE_FONT_DRIVER, FT_MODULE_RENDERER, FT_MODULE_HINTER, FT_MODULE_STYLER, FT_MODULE_DRIVER_SCALABLE, FT_MODULE_DRIVER_NO_OUTLINES, FT_MODULE_DRIVER_HAS_HINTER. The lowercase variants are now (deprecated aliases) to the uppercase versions. Updated all other files. * src/base/ftglyph.c (FT_Glyph_Get_CBox): Handle bbox_mode better as enumeration. * src/pcf/pcfdrivr.c (pcf_driver_class), src/winfonts/winfnt.c (winfnt_driver_class), src/bdf/bdfdrivr.c (bdf_driver_class): Add the FT_MODULE_DRIVER_NO_OUTLINES flag.
Werner Lemberg 73861976 2003-06-05T04:31:05 * include/freetype/internal/ftdriver.h, include/freetype/internal/ftobjs.h, include/freetype/internal/psaux.h, src/cid/cidgload.c, src/psaux/psobjs.c, src/psaux/t1decode.c, src/psaux/psobjs.h, src/pshinter/pshrec.c, src/pshinter/pshalgo.c, src/psnames/psmodule.c, src/raster/ftraster.c, src/sfnt/sfobjs.c, src/smooth/ftgrays.c, src/smooth/ftsmooth.c, src/truetype/ttobjs.c, src/truetype/ttdriver.c, src/truetype/ttgload.c, src/type1/t1afm.c, src/type1/t1gload.c, src/type1/t1gload.h, src/type1/t1load.c, src/type1/t1objs.c, src/type42/t42parse.c, src/type42/t42parse.h: Many casts and slight argument type changes to make it work with a 16bit compiler.
Werner Lemberg c219a5e8 2002-09-28T16:40:57 * src/include/freetype/internal/tttypes.h (num_sbit_strikes, num_sbit_scales): Use `FT_ULong'. * src/sfnt/sfobjs.c (sfnt_load_face): Updated accordingly. * src/sfnt/ttsbit.c (tt_face_set_sbit_strike): Ditto. (find_sbit_image): Remove cast. * src/raster/ftrend1.c (ft_raster1_render): Fix cast. * src/sfnt/ttload.c (tt_face_load_names): Use cast. * src/sfnt/ttcmap.c (code_to_next2): Use long constant. (code_to_index4): Use cast. (code_to_index8_12): Fix cast. * src/sfnt/ttcmap0.c (tt_cmap4_char_next, tt_cmap8_char_index, tt_cmap12_char_index): Use cast for `result'. (tt_face_build_cmaps): Use cast. * src/sfnt/sfobjs.c (tt_name_entry_ascii_from_ucs4): Use cast for `code'. (sfnt_load_face): Use FT_Int32 for `flags'. * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line, gray_compute_cbox, gray_convert_glyph, gray_raster_reset): Add casts to `TCoord' and `int'. More 16bit fixes. s/FT_Pos/TPos/. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Add casts.
Werner Lemberg 68e9f927 2002-09-27T11:09:23 * src/sfnt/ttpost.c (load_post_names, tt_face_free_ps_names, tt_face_get_ps_name): Replace switch statement with if clauses to make it more portable. * src/cff/cffobjs.c (cff_face_init): Ditto. * include/freetype/ftmodule.h (FT_Module_Class): Use `FT_Long' for `module_size'. * include/freetype/ftrender.h (FT_Glyph_Class_): Use `FT_Long' for `glyph_size'. * src/base/ftobjs.c (FT_Render_Glyph): Change second parameter to `FT_Render_Mode'. (FT_Render_Glyph_Internal): Change third parameter to `FT_Render_Mode'. * src/base/ftglyph.c (FT_Glyph_To_Bitmap): Change second parameter to `FT_Render_Mode'. * src/raster/ftrend1.c (ft_raster1_render): Change third parameter to `FT_Render_Mode'. * src/smooth/ftsmooth.c (ft_smooth_render, ft_smooth_render_lcd, ft_smooth_render_lcd_v): Ditto. (ft_smooth_render_generic): Change third and fifth parameter to `FT_Render_Mode'. * include/freetype/freetype.h, include/freetype/internal/ftobjs.h, include/freetype/ftglyph.h: Updated. * src/cff/cffdrivr.c (Load_Glyph), src/pcf/pcfdriver.c (PCF_Glyph_Load), src/pfr/pfrobjs.c (pfr_slot_load), src/winfonts/winfnt.c (FNT_Load_Glyph), src/t42/t42objs.c (T42_GlyphSlot_Load), src/bdf/bdfdrivr.c (BDF_Glyph_Load): Change fourth parameter to `FT_Int32'. * src/pfr/pfrobjs.c (pfr_face_init): Add two missing parameters and declare them as unused. * src/cid/cidparse.h (CID_Parser): Use FT_Long for `postscript_len'. * src/psnames/psnames.h (PS_Unicode_Value_Func): Change return value to FT_UInt32. * src/psnames/psmodule.c (ps_unicode_value, ps_build_unicode_table): Updated accordingly. * src/cff/cffdrivr.c (Get_Kerning): Use FT_Long for `middle'. (cff_get_glyph_name): Use cast for result of ft_strlen. * src/cff/cffparse.c (cff_parse_real): User cast for assigning `exp'. * src/cff/cffload.c (cff_index_get_pointers): Use FT_ULong for some local variables. (cff_charset_load, cff_encoding_load): Use casts to FT_UInt for some switch statements. (cff_font_load): Use cast in call to CFF_Load_FD_Select. * src/cff/cffobjs.c (cff_size_init): Use more casts. (cff_face_init): Use FT_Int32 for `flags'. * src/cff/cffgload.c (cff_operator_seac): Use cast for assigning `adx' and `ady'. (cff_decoder_parse_charstrings): Use FT_ULong for third parameter. Use more casts. * src/cff/cffcmap.c (cff_cmap_unicode_init): Use cast for `count'. * src/cid/cidload.c (cid_read_subrs): Use FT_ULong for `len'. * src/cid/cidgload.c (cid_load_glyph): Add missing cast for `cid_get_offset'. * src/psaux/t1decode.c (t1_decoder_parse_charstrings) <18>: Use cast for `num_points'. (t1_decoder_init): Use cast for assigning `decoder->num_glyphs'. * src/base/ftdebug.c (ft_debug_init): Use FT_Int. * include/freetype/internal/ftdriver.h (FT_Slot_LoadFunc): Use `FT_Int32' for fourth parameter. * src/base/ftobjs.c (open_face): Use cast for calling clazz->init_face. * src/raster/ftraster.c (Set_High_Precision): Use `1' instead of `1L'. (Finalize_Profile_Table, Line_Up, ft_black_init): Use casts. * src/raster/ftrend1.c (ft_raster1_render): Ditto. * src/sfnt/sfnt_dir_check: Compare `magic' with unsigned long constant. * builds/amiga/include/freetype/config/ftmodule.h: Updated.
David Turner 00d9f40c 2002-09-08T21:29:11 * src/smooth/ftsmooth.c, src/base/ftobjs.c, include/freetype/config/ftmodule.h: updated to correctly support sub-pixel rendering * include/freetype/cache/ftcimage.h, include/freetype/cache/ftcsbits.h, src/cache/ftcimage.c, src/cache/ftcsbit.c: updated to support sub-pixel rendering correctly. Definition of FTC_ImageTypeRec that replaces the obsolete FTC_ImageDesc, and has slightly different fields. The image type is now determined directly by "load_flags" values. * src/autohint/ahtypes.h, src/autohint/ahhint.c, src/pshinter/pshalgo3.c, src/pshinter/pshalgo3.h: various enhancements to the automatic and Postscript hinters !! and sub-pixel hinting now works correctly (see demo programs)
Werner Lemberg 6b5c669b 2002-09-05T15:10:54 * src/cid/cidobjs.c (CID_Size_Init): Renamed to... (cid_size_init): This. * src/psaux/psobjs.c (T1_Builder_Add_Point1): Renamed to... (t1_builder_add_point1): This. Updated all affected code. * src/pshinter/pshalgo3.c (psh3_hint_align): Fix compiler warnings. * src/type1/t1gload.c (T1_Compute_Max_Advance): Ditto. Formatting, minor doc fixes.
David Turner b08fe2dc 2002-08-27T20:20:29 * massive re-formatting changes to many, many source files. I don't want to list them all here. The operations performed were all logical transformations of the sources: - trying to convert all enums and constants to CAPITALIZED_STYLE, with #define definitions like #define my_old_constants MY_NEW_CONSTANT - big, big update of the documentation comments * include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c, include/freetype/ftimage.h: adding support for LCD-optimized rendering though the new constants/enums: FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V this is still work in progress, don't expect everything to work correctly though most of the features have been implemented. * adding new FT_LOAD_XXX flags, used to specify both hinting and rendering targets: FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering FT_LOAD_TARGET_MONO :: monochrome bitmaps FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering note that FT_LOAD_TARGET_NORMAL is 0, which means that the default behaviour of the font engine is _unchanged_.
Werner Lemberg b3d5e9cf 2002-07-28T05:05:24 s/ft_memset/FT_MEM_SET/. s/FT_MEM_SET/FT_MEM_ZERO/ where appropriate.
Werner Lemberg 91db04cb 2002-04-01T14:25:28 * src/truetype/ttgload.c: 16bit fixes. (TT_Load_Simple_Glyph): Improve debug messages. (load_truetype_glyph): Remove dead code. * src/truetype/ttinterp.c: 16bit fixes. * src/truetype/ttobjs.c: Ditto. * include/freetype/ftsnames.h, include/freetype/internal/sfnt.h, src/cff/cffload.h, src/psaux/psobjs.h, src/truetype/ttinterp.[ch], src/sfnt/ttpost.h: s/index/idx/. formatting, copyright updates.
David Turner e459d742 2002-03-22T13:52:37 * include/freetype/internal/ftmemory.h, and a lot of other files !!: changed the names of memory macros. Examples: MEM_Set => FT_MEM_SET MEM_Copy => FT_MEM_COPY MEM_Move => FT_MEM_MOVE ALLOC => FT_ALLOC FREE => FT_FREE REALLOC = >FT_REALLOC FT_NEW was introduced to allocate a new object from a _typed_ pointer.. note that ALLOC_ARRAY and REALLOC_ARRAY have been replaced by FT_NEW_ARRAY and FT_RENEW_ARRAY which take _typed_ pointer arguments. This results in _lots_ of sources being changed, but makes the code more generic and less error-prone..
David Turner 4a233510 2002-02-24T02:39:08 renaming "ft_glyph_own_bitmap" into "FT_GLYPH_OWN_BITMAP"
David Turner c8ad30a7 2001-12-05T17:24:34 * src/base/ftglyph.c (FT_Glyph_To_Bitmap): re-ordered code for debugging purposes.. * src/smooth/ftsmooth.c (ft_smooth_render): fixed a nasty hidden bug where outline shifting wasn't correctly undone after bitmap rasterization. this created problems with certain glyphs (like '"' of certain fonts..) and the cache system..
Werner Lemberg 415235df 2001-06-28T17:49:10 finishing function header formatting updating copyrights
Werner Lemberg 52005c30 2001-06-27T23:25:46 formatting
Werner Lemberg 1f7f0e87 2001-06-06T17:30:41 Complete redesign of error codes. Please check ftmoderr.h for more details. * include/freetype/internal/cfferrs.h, include/freetype/internal/tterrors.h, include/freetype/internal/t1errors.h: Removed. Replaced with files local to the module. All extra error codes have been moved to `fterrors.h'. * src/sfnt/ttpost.h: Move error codes to `fterrors.h'. * src/autohint/aherrors.h, src/cache/ftcerror.h, src/cff/cfferrs.h, src/cid/ciderrs.h, src/pcf/pcferror.h, src/psaux/psauxerr.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/winfonts/fnterrs.h: New files defining the error names for the module it belongs to. * include/freetype/ftmoderr.h: New file, defining the module error offsets. Its structure is similar to `fterrors.h'. * include/freetype/fterrors.h (FT_NOERRORDEF): New macro. (FT_ERRORDEF): Redefined to use module error offsets. All internal error codes are now public; unused error codes have been removed, some are new. * include/freetype/config/ftheader.h (FT_MODULE_ERRORS_H): New macro. * include/freetype/config/ftoption.h (FT_CONFIG_OPTION_USE_MODULE_ERRORS): New macro. All other source files have been updated to use the new error codes; some already existing (internal) error codes local to a module have been renamed to give them the same name as in the base module. All make files have been updated to include the local error files. * src/cid/cidtokens.h: Replaced with... * src/cid/cidtoken.h: This file for 8+3 consistency. * src/raster/ftraster.c: Use macros for header file names.
David Turner 8d3a401f 2001-03-20T11:14:24 * builds/*/*-def.mk: changed the objects directory from "obj" to "objs" * include/freetype/config/ftheader.h: removed obsolete macros like FT_SOURCE_FILE, etc.. and added cache-specific macro definitions that were previously defined in <freetype/ftcache.h>. Added comments to be included in a new API Reference section. * src/*/*: removed the use of FT_SOURCE_FILE, etc.. now, each component needs to added its own directory to the include path at compile time. Modified all "rules.mk" and "descrip.mms" accordingly..
David Turner 170c0d4c 2000-12-13T19:55:11 * include/freetype/config/ft2build.h, include/freetype/internal/internal.h: fixed header inclusion macros to use direct definitions. This is the only way to do these things in a portable way :-( The rest of the code should follow shortly though everything compiles now.. * builds/compiler/intelc.mk, builds/compiler/watcom.mk, builds/win32/detect.mk: added support for the Intel C/C++ compiler, as well as _preliminary_ (read: doesn't work !!) support for Watcom. Also added a new setup target. Type "make setup list" for a list of supported command-line compilers on Win32..
Werner Lemberg d5c1b27d 2000-12-12T22:28:12 * include/freetype/config/ft2build.h (FT2_ROOT, FT2_CONFIG_ROOT): Removed. ANSI C doesn't (explicitly) allow macro expansion in arguments using `##'. (FT2_PUBLIC_FILE, FT2_CONFIG_FILE, FT2_INTERNAL_FILE): Use directory names directly. Make them configurable. Use `##' to strip leading and trailing spaces from arguments. * builds/unix/ft2unix.h: Adapted. * src/base/ftsystem.c (ft_alloc, ft_realloc, ft_free, ft_io_stream, ft_close_stream): Use FT_CALLBACK_DEF. * builds/unix/ftsystem.c: Use new header scheme. (FT_Done_Memory): Use free() from FT_Memory structure. * src/base/ftinit.c, src/base/ftmac.c: Header scheme fixes. * include/freetype/config/ft2build.h (FT2_CONFIG_ROOT, FT2_PUBLIC_FILE, FT2_CONFIG_FILE, FT2_INTERNAL_FILE, FT_SOURCE_FILE): Use `##' operator to be really ANSI C compliant.
Werner Lemberg cc069beb 2000-12-08T16:17:16 cleanups
David Turner 19ed8afe 2000-12-08T02:42:29 - updated all source files to adhere to the new inclusion scheme - the CFF loader now loads the encodings and charset tables though doesn't use them for now
David Turner 76a5f623 2000-11-04T01:55:49 major reformatting of the sources: FT_EXPORT_DEF => FT_EXPORT FT_EXPORT_FUNC => FT_EXPORT_DEF BASE_DEF => FT_BASE BASE_FUNC => FT_BASE_DEF LOCAL_DEF => FT_LOCAL LOCAL_FUNC => FT_LOCAL_DEF LOCAL_FUNC_X => FT_CALLBACK_DEF LOCAL_DEF_X => FT_CALLBACK_TABLE FT_CPLUSPLUS => FT_CALLBACK_TABLE_DEF
Werner Lemberg 29a90e26 2000-08-03T00:03:08 Updating unix/ftconfig.in to recent config/ftconfig.h changes. More C++ fixes: Introducing LOCAL_FUNC_X for local functions used in function pointers (there are no local anonymous functions in C++) and FT_CPLUSPLUS (instead of FT_EXPORT_VAR) to define linkage of structures which contain function pointers.
Werner Lemberg 3a89c2a4 2000-08-01T17:05:20 Removing FT_MAKE_OPTION_SINGLE_LIBRARY_OBJECT. It has never worked. Instead, define BASE_DEF() and BASE_FUNC() similarly to FT_EXPORT_DEF() and FT_EXPORT_FUNC(), respectively, allowing the programmer to define proper types and/or export lists for multiple DLLs if necessary (e.g. ftbase.dll -- standalone, fttype1.dll -- needs ftbase.dll, etc.). The library is finally compiling and linking natively with a C++ compiler!
Werner Lemberg b48a6094 2000-07-09T19:15:30 Formatting. Moving some internal structures and constants from freetype.h to ftobjs.h. Finally removing FT_LOAD_ANTI_ALIAS. Cleaning up all error codes. Only the used ones have survived :-) Removed unused FT_MAX_GLYPH_FORMATS constant. T2 error codes are now in the range 0x500-0x5FF (instead of `TrueDoc'). Some minor improvements of error return values. Finally fixing error code values in ftraster and ftgrays to be compliant with all other FT error codes.
Werner Lemberg 7fa51b55 2000-07-08T19:51:42 Formatting. Adding some trivial error checking. Adding/Fixing tracing levels.
David Turner a90663f5 2000-07-08T00:41:13 vast clean-up of the sources in order to allow flat directory compilation (by defining the FT_FLAT_COMPILE macro at compile time..) moved "freetype2/BUILD" to "freetype2/docs/BUILD"
Werner Lemberg fbeb41d9 2000-07-02T00:27:53 Formatting. Adding copyright notices. Removing an unnecessary file (smooth.h).
David Turner f9ca2bb5 2000-06-30T23:12:55 managed to re-design entirely the API in <freetype/ftglyph.h> It is now really the "glyph factory" that Stefan was probably dreaming about.. fixed some recent formatting errors from Werner ;-) cleaned up the demonstration programs from most of the rust that they had, though I'm sure someone is going to re-format them really soon !! "ftstring" now uses the new ftglyph.h API, and is now faster and smaller.. yep..
David Turner 5ae831c1 2000-06-30T01:31:22 changes used to implement the auto-hinting support
David Turner 5ae1bad3 2000-06-27T23:18:39 added new renderer module