summaryrefslogtreecommitdiff
path: root/src/smooth/ftsmooth.c
Commit message (Collapse)AuthorAgeFilesLines
* Add new `slight' auto-hinting mode.Werner Lemberg2017-04-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add face property for LCD filter weights.Nikolaus Waxweiler2017-02-161-14/+63
| | | | | | | | | | | | | | | | | | | | | | | | | * 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'.
* Update copyright year.Werner Lemberg2017-01-041-1/+1
|
* Minor formatting.Werner Lemberg2016-12-251-2/+2
|
* More FT_ZERO usage.Werner Lemberg2016-09-281-1/+1
| | | | | | | | | | | | | | | | | | * 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/.
* s/0/NULL/ for function pointers; comments, formatting.Werner Lemberg2016-09-171-33/+34
|
* Update copyright year.Werner Lemberg2016-01-131-1/+1
|
* [smooth] Signedness fixes.Werner Lemberg2015-02-231-3/+3
| | | | * src/smooth/ftgrays.c, src/smooth/ftsmooth.c: Apply.
* Run `src/tools/update-copyright'.Werner Lemberg2015-01-171-1/+1
|
* * src/smooth/ftsmooth.c (ft_smooth_render_generic): Removesuzuki toshiya2014-11-281-2/+1
| | | | unrequired negative value check for `width' and `height'.
* Prevent too negative values (< FT_INT_MIN) in bitmap metrics,suzuki toshiya2014-11-271-2/+4
| | | | | | | | | | 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.
* [smooth] Improve code readability.Alexei Podtelezhnikov2014-10-311-39/+37
| | | | * src/smooth/ftsmooth.c (ft_smooth_render_generic): Rearrange code.
* [smooth] Reduce outline translations during rendering.Alexei Podtelezhnikov2014-10-311-19/+20
| | | | | | * src/smooth/ftsmooth.c (ft_smooth_render_generic): Translate origin virtually by modifying cbox, actually translate outline if cumulative shift is not zero.
* [smooth] Fix Savannah bug #35604 (cont'd).Alexei Podtelezhnikov2014-10-301-29/+6
| | | | | * src/smooth/ftsmooth.c (ft_smooth_render_generic): Remove checks and casts that became unnecessary after the variable type upgrades.
* [smooth] Improve code readability.Alexei Podtelezhnikov2014-10-291-11/+11
| | | | * src/smooth/ftsmooth.c (ft_smooth_render_generic): Rearrange code.
* Fix compiler warnings.Werner Lemberg2013-06-051-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* */*: Use FT_Err_Ok only.Werner Lemberg2013-03-141-2/+2
| | | | This is a purely mechanical conversion.
* */*: Use `FT_THROW'.Werner Lemberg2013-03-141-8/+8
| | | | | | | | | | 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.
* [smooth] Avoid memory like in case of failure.Werner Lemberg2012-07-111-13/+44
| | | | | | * src/smooth/ftsmooth.c (ft_smooth_render_generic): Use flags to indicate what to clean up after finishing the function, with and without errors.
* [smooth] Fix Savannah bug #35604.Werner Lemberg2012-02-261-6/+6
| | | | | | * 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.
* Remove trailing spaces.suzuki toshiya2012-01-171-1/+1
|
* Whitespace.Werner Lemberg2011-11-301-6/+6
|
* Fix gcc 4.6 compiler warnings.Werner Lemberg2011-05-301-2/+7
| | | | | | | | | * 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.
* Try to fix Savannah bug #30717 (and probably #30719 too).Werner Lemberg2010-08-101-3/+21
| | | | | * src/smooth/ftsmooth.c (ft_smooth_render_generic): Add another overflow test for `width' and `height'.
* Fix Savannah bug #30263.Werner Lemberg2010-06-301-2/+2
| | | | | | | | | * 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.
* smooth: Exclude 16-bit system in invalid pitch/height check.suzuki toshiya2009-08-011-0/+4
|
* Improve bitmap size or pixel variables for 16-bit systems.suzuki toshiya2009-08-011-2/+9
|
* smooth: Check glyph size by width/height, instead of pitch/height.suzuki toshiya2009-07-091-1/+3
|
* Position Independent Code (PIC) support in smooth renderer.Oran Agra2009-04-051-22/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Fix `make multi' run.Werner Lemberg2009-03-201-0/+1
| | | | * src/smooth/ftsmooth.h: Include FT_INTERNAL_DEBUG_H.
* Protect against too large glyphs.Werner Lemberg2009-03-201-1/+8
| | | | | | | 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.
* Fix stdlib dependencies.Werner Lemberg2009-01-121-4/+4
| | | | | | | | | | 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/.
* formattingWerner Lemberg2006-11-141-6/+8
|
* * include/freetype/ftlcdfil.h, include/internal/ftobjs.h,David Turner2006-11-101-25/+20
| | | | | | | | | | | | 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.
* formatting, improving documentationWerner Lemberg2006-09-291-2/+4
|
* * include/freetype/freetype.h: bumping FT_FREETYPE_PATCH to 2David Turner2006-09-271-35/+60
| | | | | | | | | | | | | | | | | 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>
* formattingWerner Lemberg2006-09-261-9/+25
|
* CHANGES BETWEEN 2.2.1 and 2.2.2David Turner2006-09-261-1/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ======================================================================
* * include/freetype/ftimage.h (FT_Raster_RenderFunc),Werner Lemberg2005-05-111-24/+24
| | | | | | | | | | | | | | | | | | | | | 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>.
* * include/freetype/freetype.h: Document FT_LOAD_TARGET_XXX properly.Werner Lemberg2004-02-191-1/+4
| | | | | | | | * 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.
* * include/freetype/fttypes.hDavid Turner2003-12-241-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 !
* * include/freetype/freetype.h (FT_Open_Flags): Replaced withWerner Lemberg2003-06-181-3/+3
| | | | | | | | | | | | | | | | | | | | #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.
* * include/freetype/ftglyph.h (ft_glyph_bbox_unscaled,Werner Lemberg2003-06-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* * include/freetype/internal/ftdriver.h,Werner Lemberg2003-06-051-3/+3
| | | | | | | | | | | | | | 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.
* * src/include/freetype/internal/tttypes.h (num_sbit_strikes,Werner Lemberg2002-09-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* * src/sfnt/ttpost.c (load_post_names, tt_face_free_ps_names,Werner Lemberg2002-09-271-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* * src/smooth/ftsmooth.c, src/base/ftobjs.c,David Turner2002-09-081-6/+18
| | | | | | | | | | | | | | | | 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)
* * src/cid/cidobjs.c (CID_Size_Init): Renamed to...Werner Lemberg2002-09-051-4/+3
| | | | | | | | | | | | | (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.
* * massive re-formatting changes to many, many source files. I don'tDavid Turner2002-08-271-14/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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_.
* s/ft_memset/FT_MEM_SET/.Werner Lemberg2002-07-281-1/+1
| | | | s/FT_MEM_SET/FT_MEM_ZERO/ where appropriate.