src/base/ftsynth.c


Log

Author Commit Date CI Message
Alexei Podtelezhnikov 22a7f5b8 2017-09-07T22:36:02 Branding fixes.
Alexei Podtelezhnikov 983fb0df 2017-01-24T23:56:59 Typos.
Werner Lemberg 563ae780 2017-01-04T20:16:34 Update copyright year.
Werner Lemberg 9adeab64 2016-01-13T11:54:10 Update copyright year.
Werner Lemberg f57fc59e 2015-01-17T20:41:43 Run `src/tools/update-copyright'.
Werner Lemberg f34f1925 2014-11-26T21:59:21 * src/*: Add checks for parameters of API functions where missing. `API functions' are functions tagged with `FT_EXPORT_DEF'. Besides trivial fixes, the following changes are included, too. * src/base/ftbdf.c (FT_Get_BDF_Charset_ID, FT_Get_BDF_Property): Set error code if no service is available. * src/base/ftinit.c (FT_Done_FreeType): Change return value for invalid `library' parameter to `Invalid_Library_Handle'. * src/base/ftobjs.c (FT_New_Size): Change return value for invalid `asize' parameter to `Invalid_Argument'. * src/base/ftoutln.c (FT_Outline_Copy): Change return value for invalid `source' and `target' parameters to `Invalid_Outline'. (FT_Outline_Done_Internal): Change return value for invalid `outline' parameter to `Invalid_Outline'.
Werner Lemberg b24e8ba2 2014-11-25T08:30:49 [Savannah bug #43682] Add/remove `void' casts to some functions. We use a cast to indicate that we intentionally ignore a function's return value. However, this doesn't apply to API functions where errors can only happen for trivially invalid input. * src/base/ftstroke.c (FT_Glyph_Stroke, FT_Glyph_StrokeBorder), src/base/ftsynth.c (FT_GlyphSlot_Embolden), src/cff/cffgload.c (cff_slot_load), src/pfr/pfrdrivr.c (pfr_get_kerning), src/type1/t1load.c (parse_encoding), src/type42/t42parse.c (t42_parse_encoding): Do it.
Behdad Esfahbod 31e726d9 2013-09-20T07:20:53 Fix vertical size of emboldened glyphs. Cf. https://bugzilla.gnome.org/show_bug.cgi?id=686709 * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Adjust `horiBearingY' also.
Werner Lemberg 04affa27 2012-08-17T09:28:28 * src/base/ftsynth.c (FT_GlyphSlot_Oblique): Fix shear angle. The old value was far too large (more than 20°). The new one corresponds to 12°, quite common in typography.
Alexei Podtelezhnikov cea9d7a6 2012-06-15T06:33:46 * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Improve spacing. * docs/CHANGES: Updated.
Werner Lemberg 5220ef58 2010-09-13T07:32:22 Fix minor issues reported by <muktha.narayan@wipro.com>. * src/autofit/aflatin.c (af_latin_compute_stem_width): Remove redundant conditional check. * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Ditto. * src/cff/cffload.c (cff_encoding_load): Remove conditional check which always evaluates to `true'. * src/pshinter/pshalgo.c (ps_glyph_interpolate_strong_points): Ditto. * src/truetype/ttinterp.c (Ins_IUP): Ditto. * src/cid/cidgload.c (cid_slot_load_glyph): Don't check for NULL if value is already dereferenced. * src/winfonts/winfnt.c (FNT_Load_Glyph): Fix check of `face'.
Werner Lemberg fc58155a 2010-01-05T20:00:35 Apply reports from clang static analyzer. * src/lzw/ftlzw.c (ft_lzw_file_init), src/base/ftstroke.c (FT_Stroker_ParseOutline), src/base/ftsynth.c (FT_GlyphSlot_Embolden): Remove dead code. * src/base/ftpatent.c (_tt_check_patents_in_table): Initialize `offset_i'.
suzuki toshiya e866cf3f 2009-08-01T00:32:06 Improve bitmap size or pixel variables for 16-bit systems.
Werner Lemberg cfc514ea 2008-12-17T11:03:26 * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Don't use internal macros so that copying the source code into an application works out of the box.
Werner Lemberg c8c4cc83 2008-12-17T10:50:31 * include/freetype/ftsynth.h, src/basae/ftsynth.c: Move FT_GlyphSlot_Own_Bitmap to... * include/freetype/ftbitmap.h, src/base/ftbitmap.c: These files. * docs/CHANGES: Document it.
Werner Lemberg d60ae949 2006-11-07T09:47:04 Formatting.
Werner Lemberg 5e43089b 2006-11-07T09:35:03 * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Handle vertical layout also.
Werner Lemberg d7e6b767 2006-02-25T06:24:28 Formatting, copyright years, minor cleanups.
Wu, Chia-I (吳佳一) 03264613 2006-02-24T11:18:40 * include/freetype/ftbitmap.h (FT_Bitmap_Embolden): Update documentation. * include/freetype/ftsynth.h (FT_GlyphSlot_Own_Bitmap), src/base/ftsynth.c (FT_GlyphSlot_Own_Bitmap): New function to make sure a glyph slot owns its bitmap. It is also marked experimental and due to change. (FT_GlyphSlot_Embolden): Undo the last change. It turns out rendering the outline confuses some applications.
Werner Lemberg d4303da0 2006-02-23T21:01:34 formatting, copyright years.
Wu, Chia-I (吳佳一) 890f807a 2006-02-22T20:47:39 * include/freetype/ftoutln.h (enum FT_Orientation): New value `FT_ORIENTATION_NONE'. * src/base/ftoutln.c (FT_OUTLINE_GET_CONTOUR, ft_contour_has, ft_contour_enclosed, ft_outline_get_orientation): Another version of `FT_Outline_Get_Orientation'. This version differs from the public one in that each part (contour not enclosed in another contour) of the outline is checked for orientation. (FT_Outline_Embolden): Use `ft_outline_get_orientation'. * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Render the outline and use bitmap's embolden routine when the outline one failed.
Werner Lemberg 7b33dca4 2005-06-23T20:31:48 Formatting.
Wu, Chia-I (吳佳一) 8cfb220e 2005-06-20T09:04:50 * include/freetype/internal/ftobjs.h, src/base/ftobjs.c: New function ft_glyphslot_grid_fit_metrics. * src/truetype/ttgload.c (compute_glyph_metrics): Use ft_glyphslot_grid_fit_metrics. * src/cff/cffgload.c (cff_slot_load), src/cid/cidgload.c (cid_slot_load_glyph), src/type1/t1gload.c (T1_Load_Glyph): Use ft_glyphslot_grid_fit_metrics. FT_Outline_Get_CBox is called twice. * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Modify metrics to more reasonable values when emboldening outline glyphs. The theoretic ones are unrealistic.
Werner Lemberg 49f4d34e 2005-06-16T19:07:08 * src/base/ftoutln.c (FT_Outline_Embolden): Strength should be halved. * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Change the default strength. Don't increase slot->advance.y. * include/freetype/freetype.h (FREETYPE_MINOR): Set to 2. (FREETYPE_PATCH): Set to 0. * builds/unix/configure.ac (version_info): Set to 9:9:3. Currently, we are still binary compatible. * builds/win32/visualc/index.html, builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype.vcproj: s/219/2110/, s/2.1.9/2.1.10/. * builds/freetype.mk (refdoc), README, Jamfile (RefDoc): s/2.1.9/2.1.10/. * docs/CHANGES, docs/VERSION.DLL: Updated. * ChangeLog: Split off older entries into... * ChangeLog.20, ChangeLog.21: These new files. The next release will be 2.2.0, so don't worry about source code backwards compatibility. * include/freetype/ftimage.h (FT_Outline_MoveToFunc, FT_Outline_LineToFunc, FT_Outline_ConicToFunc, FT_Outline_CubicToFunc, FT_SpanFunc, FT_Raster_RenderFunc), include/freetype/ftrender.h (FT_Glyph_TransformFunc, FT_Renderer_RenderFunc, FT_Renderer_TransformFunc): Decorate parameters with `const' where appropriate. * src/sfnt/ttsbit.c (tt_face_load_sbit_image): Compute vertBearingY to make glyphs centered vertically. * src/truetype/ttgload.c (compute_glyph_metrics): Compute vertBearingY to make glyphs centered vertically. Fix some bugs in vertical metrics: . loader->pp3.y and loader->pp4.y are in 26.6 format, not in font units. . As we use the glyph's cbox to calculate the top bearing now there iss no need to adjust `top'. * src/otvalid/otvcommn.h (OTV_OPTIONAL_TABLE): Use FT_UShort to be in sync with OTV_OPTIONAL_OFFSET. Reported by YAMATO Masatake. * docs/release: Update.
Werner Lemberg 71d76281 2005-05-30T07:54:20 * src/base/ftbitmap.c (FT_Bitmap_Embolden): Fix emboldening bitmap of mode FT_PIXEL_MODE_GRAY. Also add support for mode FT_PIXEL_MODE_LCD and FT_PIXEL_MODE_LCD_V. (ft_bitmap_assure_buffer): FT_PIXEL_MODE_LCD and FT_PIXEL_MODE_LCD_V should have ppb (pixel per byte) 1. Zero the padding when there's no need to allocate memory. * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Handle slot->advance too. More suited emboldening strength.
Werner Lemberg 3a36ef7e 2005-05-27T04:18:20 * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Initialize `error'.
Werner Lemberg 6d8c1821 2005-05-26T21:02:25 * docs/GPL.txt: Update postal address of FSF. * include/freetype/ftbitmap.h (FT_Bitmap_Embolden): Improve documentation. * src/base/ftsynth.c (FT_BOLD_THRESHOLD): Removed. (FT_GlyphSlot_Embolden): Check whether slot is bitmap owner. Always modify the metrics.
Werner Lemberg afb2ba57 2005-05-25T05:51:01 * docs/CHANGES: Updated. * include/freetype/ftbitmap.h (FT_Bitmap_Embolden): New declaration. * include/freetype/ftoutln.h (FT_Outline_Embolden): New declaration. * src/base/ftbitmap.c (ft_bitmap_assure_buffer): New auxiliary function. (FT_Bitmap_Embolden): New function. * src/base/ftoutln.c (FT_Outline_Embolden): New function. * src/base/ftsynth.c: Don't include FT_INTERNAL_CALC_H and FT_TRIGONOMETRY_H but FT_BITMAP_H. (FT_GlyphSlot_Embolden): Use FT_Outline_Embolden or FT_Bitmap_Embolden.
David Turner 01152db1 2005-05-21T10:42:32 * src/base/ftsynth.c (FT_GlyphSlot_Embolden): fixing a bug that produced unpleasant artefacts when trying to embolden very sharp corners.
Werner Lemberg ece8b20e 2004-12-13T23:16:59 Documentation updates, whitespace.
Werner Lemberg 1ec3963d 2004-11-24T07:08:21 * src/base/ftoutln.c (FT_OrientationExtremumRec, ft_orientation_extremum_compute): Removed. (FT_Outline_Get_Orientation): Rewritten, simplified. * src/autohint/ahglyph.c: Include FT_OUTLINE_H. (ah_test_extremum, ah_get_orientation): Removed. (ah_outline_load): Use FT_Outline_Get_Orientation. * src/base/ftsynth.c (ft_test_extrama, ft_get_orientation): Removed. (FT_GlyphSlot_Embolden): Use FT_Outline_Get_Orientation.
Werner Lemberg 328abf30 2003-12-24T13:37:58 * src/cff/cffgload.c (cff_lookup_glyph_by_stdcharcode): Handle CID-keyed fonts. Remove MS-DOS line endings. Minor formatting issues.
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 0bdf608f 2003-05-28T22:42:41 * src/pshinter/pshalgo1.[ch], src/pshinter/pshalgo2.[ch]: Removed. * src/pshinter/pshalgo.h: Removed. * src/pshinter/pshalgo3.[ch]: Renamed to... * src/pshinter/pshalgo.[ch]: New files. s/PSH3/PSH/. s/psh3/psh/. s/ps3/ps/. * src/pshinter/pshrec.c, src/pshinter/pshinter.c: Updated. * src/pshinter/rules.mk, src/pshinter/Jamfile: Updated * src/pshinter/pshglob.[ch] (psh_dimension_snap_width): Commented out. * tests/gview.c: Remove code for pshalgo1 and pshalgo2. Updated.
Werner Lemberg c8c6bf5c 2003-04-23T05:38:13 Cleanups; adding some copyrights; formatting.
David Turner 3249c625 2002-10-31T08:30:19 * include/freetype/internal/internal.h, include/freetype/ftpfr.h, src/base/ftpfr.c, src/base/Jamfile, src/descrip.mms, src/rules.mk, src/pfr/pfrdrivr.c, src/pfr/pfrobjs.c, src/pfr/pfsobjs.h: added PFR-specific public API. Fixed the kerning retrievel routine (it returned invalid values when the outline and metrics resolution differ) * src/base/ftsynth.c: fixed the synthetic emboldener. at last. * src/base/ftobjs.c: small internal fix to better support bitmap-based font formats
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_.
David Turner 5c0d3a4d 2002-08-22T20:35:36 * src/base/ftobject.c, src/base/ftsynth.c, src/base/ftstroker.c, src/bdf/bdfdrivr.c: removed compiler warnings
Werner Lemberg 7f74a52a 2002-07-26T09:09:10 Fixing ChangeLog entries. Some formatting. * src/truetype/ttgload.c (load_truetype_glyph) [FT_CONFIG_OPTION_INCREMENTAL]: s/memset/ft_memset/. * src/autohint/ahhint.c (ah_hint_edges_3): Fix compiler warning. * src/cff/cffload.c (cff_encoding_load): Remove `memory' variable. * src/cff/cffcmap.c (cff_cmap_encoding_init): Remove `psnames' variable. * src/truetype/ttgload.c (load_truetype_glyph): Remove statement without effect. * src/truetype/ttdriver (Get_Char_Index, Get_Next_Char): Removed.
David Turner 58ad559a 2002-07-01T21:33:48 * include/freetype/ftsynth.h, src/base/ftsynth.c: rewriting the automatic style synthesis functions, now renamed to FT_GlyphSlot_Oblique and FT_GlyphSlot_Embolden
Werner Lemberg a4bf7d66 2001-07-12T22:41:08 2001-07-13 Werner Lemberg <wl@gnu.org> * src/base/ftsynth.c: Include ftcalc.h unconditionally.
Werner Lemberg 415235df 2001-06-28T17:49:10 finishing function header formatting updating copyrights
Werner Lemberg f814d0fa 2001-06-27T16:18:10 First round in converting type foo ( ... ) to type foo ( ... ) Other minor formatting issues.
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
Werner Lemberg dc72aff4 2000-11-04T08:33:38 Finishing David's latest changes (there were some errors in it).
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 e4b32a5d 2000-10-31T20:42:18 Removing trailing whitespace.
Werner Lemberg 0bf381f7 2000-10-15T21:59:58 Make ftsynth.c work again. Renamed FT_*_Outline to FT_Outline_*
Werner Lemberg 8728f294 2000-08-23T17:32:42 Formatting, small fixes. Adding copyright notices etc.
David Turner d8b4514d 2000-08-22T22:53:03 added preliminary emboldening code.. still _very_ experimental