Commit Graph

424 Commits

Author SHA1 Message Date
Werner Lemberg e2d73df77d Documentation improvements. 2013-06-09 08:48:01 +02:00
Werner Lemberg 2429dc3d7c Add CFF_CONFIG_OPTION_OLD_ENGINE configuration option.
This controls whether the old FreeType CFF engine gets compiled into
FreeType.  It is now disabled by default.

* devel/ftoption.h, include/freetype/config/ftoption.h
(CFF_CONFIG_OPTION_OLD_ENGINE): New macro.

* src/cff/cffdrivr.c (cff_property_set), src/cff/cffgload.c
(CFF_Operator, cff_argument_counts, cff_builder_add_point,
cff_operator_seac, cff_decoder_parse_charstrings, cff_slot_load),
src/cff/cffgload.h, src/cff/cffobjs.c (cff_driver_init): Use
CFF_CONFIG_OPTION_OLD_ENGINE to guard the affected code.

* docs/CHANGES: Updated.
2013-06-03 12:41:58 +02:00
Behdad Esfahbod 760d342d37 Add support for color embedded bitmaps (eg. color emoji).
A new load flag, FT_LOAD_COLOR, makes FreeType load color
embedded-bitmaps, following this draft specification

  https://color-emoji.googlecode.com/git/specification/v1.html

which defines two new SFNT tables, `CBDT' and `CBLC' (named and
modeled after `EBDT' and `EBLC', respectively).  The color bitmaps
are stored in the new FT_PIXEL_MODE_BGRA format to represent BGRA
pre-multiplied sRGB images.  If PNG support is available, PNG color
images as defined in the same proposed specification are supported
also.

Note that color bitmaps are converted to grayscale if client didn't
ask for color.

* builds/unix/configure.raw: Search for libpng.
Add `--without-png' option.

* devel/ftoption.h, include/freetype/config/ftoption.h
(FT_CONFIG_OPTION_USE_PNG): New macro.

* include/freetype/freetype.h (FT_LOAD_COLOR): New load flag.

* include/freetype/ftimage.h (FT_Pixel_Mode): Add
`FT_PIXEL_MODE_BGRA'.

* include/freetype/tttags.h (TTAG_CBDT, TTAG_CBLC): New tags.

* src/base/ftbitmap.c (FT_Bitmap_Embolden): Updated.
(ft_gray_for_premultiplied_srgb_bgra): New function.
(FT_Bitmap_Convert): Handle FT_PIXEL_MODE_BGRA.

* src/sfnt/pngshim.c, src/sfnt/pngshim.h: New files.

* src/sfnt/sfnt.c: Include `pngshim.c'.

* src/sfnt/ttsbit.c: Include FT_BITMAP_H and `pngshim.h'
(tt_face_load_eblc): Load `CBLC'.
(tt_sbit_decoder_init): Load `CBDT'.
(tt_sbit_decoder_alloc_bitmap): Pass load flags to select between
color and grayscale bitmaps.
Set `num_grays'.  This is used by `ftview' to choose the blending
algorithm.
(tt_sbit_decoder_load_byte_aligned,
tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_compound,
tt_sbit_decoder_load_image): Pass load flag.
s/write/pwrite/.
Don't call `tt_sbit_decoder_alloc_bitmap'.
Updated.
(tt_sbit_decoder_load_png) [FT_CONFIG_OPTION_USE_PNG]: New function.
(tt_sbit_decoder_load_bitmap): Pass load flag.
Handle new glyph formats 17, 18, and 19.
Call `tt_sbit_decoder_alloc_bitmap'.
Flatten color bitmaps if necessary.
(tt_face_load_sbit_image): Updated.

* src/sfnt/rules.mk (SFNT_DRV_SRC): Add `pngshim.c'.

* docs/CHANGES: Updated.
2013-05-29 11:36:18 +02:00
Werner Lemberg f6aa089f12 */* [FT_CONFIG_OPTION_OLD_INTERNALS]: Remove macro and guarded code. 2013-05-10 07:58:47 +02:00
Werner Lemberg 2688a6c65e * docs/CHANGES: Updated. 2013-05-08 10:00:49 +02:00
Werner Lemberg b3c3f86e58 Minor. 2013-05-03 08:51:17 +02:00
Werner Lemberg 2048f02e15 Minor. 2013-04-29 23:04:57 +02:00
Werner Lemberg 689d68e5b3 docs/CHANGES: Add ftdemo changes. 2013-04-27 08:09:35 +02:00
Werner Lemberg 234b987ef6 * docs/CHANGES: Updated. 2013-04-26 14:10:12 +02:00
Werner Lemberg 6f1e345d35 Fix Savannah patch #7971.
* configure: Handle MAKE environment variable also.
2013-03-21 09:00:27 +01:00
Werner Lemberg e4ecce3bfe Disable FT_CONFIG_OPTION_OLD_INTERNALS.
After the next release we are going to remove the code completely.

* devel/ftoption.h, include/freetype/config/ftoption.h
(FT_CONFIG_OPTION_OLD_INTERNALS): Comment out.
* docs/CHANGES: Document it.
2013-01-11 09:02:22 +01:00
Alexei Podtelezhnikov b4ac30b0ed [base] Reduce trigonometric algorithms.
After we get within 45 degrees by means of true 90-degree rotations,
we can remove initial 45-degree CORDIC iteration and start from
atan(1/2) pseudorotation, reducing expansion factor thereby.

* src/base/fttrigon.c (FT_TRIG_SCALE, FT_TRIG_COSCALE): Update macros.
(ft_trig_pseudo_rotate, ft_trig_pseudo_polarize): Update.

* src/tools/cordic.py: Bring up to date with trigonometric core.

* docs/CHANGES: Old typo.
2013-01-02 22:21:37 -05:00
Werner Lemberg c6a66b49e6 * Version 2.4.11 released.
==========================

Tag sources with `VER-2-4-11'.

* docs/CHANGES, docs/release: Updated.

* docs/VERSION.DLL: Update documentation and bump version number to
2.4.11.

* README, Jamfile (RefDoc),
builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
builds/win32/visualc/freetype.dsp,
builds/win32/visualc/freetype.vcproj,
builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
builds/win32/visualce/freetype.vcproj,
builds/win32/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.4.10/2.4.11/, s/2410/2411/.

* include/freetype/freetype.h (FREETYPE_PATCH): Set to 10.

* builds/unix/configure.raw (version_info): Set to 16:0:10.

* builds/toplevel.mk (dist): Don't include `.mailmap'.
2012-12-20 08:31:56 +01:00
Alexei Podtelezhnikov cea9d7a682 * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Improve spacing.
* docs/CHANGES: Updated.
2012-06-15 06:33:46 +02:00
Werner Lemberg 2d67e9b555 * docs/CHANGES: Updated. 2012-06-14 08:46:04 +02:00
Werner Lemberg aa6895c176 * docs/CHANGES: Updated. 2012-05-28 22:55:54 +02:00
Werner Lemberg 50ed33e537 * Version 2.4.9 released.
=========================

Tag sources with `VER-2-4-9'.

* docs/CHANGES: Updated.

* docs/VERSION.DLL: Update documentation and bump version number to
2.4.9.

* README, Jamfile (RefDoc),
builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
builds/win32/visualc/freetype.dsp,
builds/win32/visualc/freetype.vcproj,
builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
builds/win32/visualce/freetype.vcproj,
builds/win32/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.4.8/2.4.9/, s/248/249/.

* include/freetype/freetype.h (FREETYPE_PATCH): Set to 9.

* builds/unix/configure.raw (version_info): Set to 14:1:8.
2012-03-08 21:02:06 +01:00
Werner Lemberg bd63334ee7 * docs/CHANGES: Updated. 2012-02-26 08:46:05 +01:00
Werner Lemberg 9d7f0957fb * Version 2.4.8 released.
=========================

Tag sources with `VER-2-4-8'.

* docs/CHANGES: Updated.

* docs/VERSION.DLL: Update documentation and bump version number to
2.4.8.

* README, Jamfile (RefDoc),
builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
builds/win32/visualc/freetype.dsp,
builds/win32/visualc/freetype.vcproj,
builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
builds/win32/visualce/freetype.vcproj,
builds/win32/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.4.7/2.4.8/, s/247/248/.

* include/freetype/freetype.h (FREETYPE_PATCH): Set to 8.

* builds/unix/configure.raw (version_info): Set to 14:0:8.
2011-11-14 20:37:12 +01:00
Werner Lemberg 016eba976f * Version 2.4.7 released.
=========================

Tag sources with `VER-2-4-7'.

* docs/CHANGES: Updated.

* docs/VERSION.DLL: Update documentation and bump version number to
2.4.7.

* README, Jamfile (RefDoc),
builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
builds/win32/visualc/freetype.dsp,
builds/win32/visualc/freetype.vcproj,
builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
builds/win32/visualce/freetype.vcproj,
builds/win32/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.4.6/2.4.7/, s/246/247/.

* include/freetype/freetype.h (FREETYPE_PATCH): Set to 6.

* builds/unix/configure.raw (version_info): Set to 13:2:7.
2011-10-18 13:34:32 +02:00
Werner Lemberg 29a7965fd1 * Version 2.4.6 released.
=========================

Tag sources with `VER-2-4-6'.

* docs/CHANGES: Updated.

* docs/VERSION.DLL: Update documentation and bump version number to
2.4.6.

* README, Jamfile (RefDoc),
builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
builds/win32/visualc/freetype.dsp,
builds/win32/visualc/freetype.vcproj,
builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
builds/win32/visualce/freetype.vcproj,
builds/win32/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.4.5/2.4.6/, s/245/246/.

* include/freetype/freetype.h (FREETYPE_PATCH): Set to 6.

* builds/unix/configure.raw (version_info): Set to 13:1:7.
2011-07-29 06:23:27 +02:00
Werner Lemberg f4b63326f1 Fix previous commit.
We want to unset FT_FACE_FLAG_SCALABLE only if there are bitmap
strikes in the font.

* src/truetype/ttobjs.c (tt_face_init): Implement it.

* docs/CHANGES: Updated.
2011-07-03 11:24:46 +02:00
Werner Lemberg 9ae6c7c54d * docs/CHANGES: Updated. 2011-07-02 12:15:10 +02:00
Werner Lemberg 54f187ab1a Document last commit. 2011-06-29 10:01:42 +02:00
Werner Lemberg da9dbf89c8 * Version 2.4.5 released.
=========================

Tag sources with `VER-2-4-5'.

* docs/CHANGES: Updated.

* docs/VERSION.DLL: Update documentation and bump version number to
2.4.5

* README, Jamfile (RefDoc),
builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
builds/win32/visualc/freetype.dsp,
builds/win32/visualc/freetype.vcproj,
builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
builds/win32/visualce/freetype.vcproj,
builds/win32/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.4.4/2.4.5/, s/244/245/.

* include/freetype/freetype.h (FREETYPE_PATCH): Set to 5.

* builds/unix/configure.raw (version_info): Set to 13:0:7.
2011-06-25 07:16:22 +02:00
Werner Lemberg 3ae2c70dc6 Minor documentation fixes. 2011-06-24 13:18:41 +02:00
Werner Lemberg 27b20e9a1e Formatting, minor doc improvements. 2011-05-09 09:48:49 +02:00
suzuki toshiya 084abf0469 [autofit] Add bluezones for CJK Ideographs.
To remove extremas of vertical strokes of CJK Ideographs at
low resolution and make the top and bottom horizontal stems
aligned, bluezones for CJK Ideographs are calculated from
sample glyphs.  At present, vertical bluezones (bluezones
to align vertical stems) are disabled by default.  For detail, see
http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00070.html
http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00092.html
http://lists.gnu.org/archive/html/freetype-devel/2011-05/msg00001.html

* include/freetype/internal/fttrace.h: New trace component `afcjk'.
* src/autofit/afcjk.h (AF_CJK{Blue,Axis,Metric}Rec): Add CJK version
for AF_Latin{Blue,Axis,Metric}Rec.
(af_cjk_metrics_check_digits): Ditto, shared with Indic module.
(af_cjk_metrics_init_widths): Ditto.
(af_cjk_metrics_init): Take AF_CJKMetric instead of AF_LatinMetric.
(af_cjk_metrics_scale): Ditto (declaration).
(af_cjk_hints_init): Ditto (declaration).
(af_cjk_hints_apply): Ditto (declaration).
* src/autofit/afcjk.c (af_cjk_metrics_scale): Ditto (body).
(af_cjk_hints_init): Ditto (body).
(af_cjk_hints_apply): Ditto (body).
(af_cjk_metrics_init_widths): Duplicate af_latin_metrics_init_widths.
(af_cjk_metrics_check_digits): Duplicate af_latin_metrics_check_digits.
(af_cjk_metrics_init): Call CJK bluezone initializer.
(af_cjk_metrics_scale_dim): Add code to scale bluezones.
(af_cjk_hints_compute_blue_edges): New function, CJK version of
af_latin_hints_compute_blue_edges.
(af_cjk_metrics_init_blues): New function, CJK version of
af_latin_metrics_init_blues.
(af_cjk_hints_edges): Add code to align the edge stems to blue zones.

* src/autofit/afindic.c (af_indic_metrics_init): Take AF_CJKMetric
instead of AF_LatinMetric, and initialize as af_cjk_metrics_init.
However bluezones are not initialized.
(af_indic_metrics_scale): Take AF_CJKMetric instead of AF_LatinMetric.
(af_indic_hints_init): Ditto.
(af_indic_hints_apply): Ditto.

* docs/CHANGES: Note about CJK bluezone support.
2011-05-08 19:22:32 +09:00
Behdad Esfahbod 8c82ec5b17 Always ignore global advance.
This makes FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH redundant,
deprecated, and ignored.  The new behavior is what every major user
of FreeType has been requesting.  Global advance is broken in many
CJK fonts.  Just ignoring it by default makes most sense.

* src/truetype/ttdriver.c (tt_get_advances),
src/truetype/ttgload.c (TT_Get_HMetrics, TT_Get_VMetrics,
tt_get_metrics, compute_glyph_metrics, TT_Load_Glyph),
src/truetype/ttgload.h: Implement it.

* docs/CHANGES: Updated.
2011-04-21 08:21:37 +02:00
Werner Lemberg cecd912747 Make FT_Sfnt_Table_Info return the number of SFNT tables.
* src/sfnt/sfdriver.c (sfnt_table_info): Implement it.
* include/freetype/tttables.h: Update documentation.
* docs/CHANGES: Updated.
2011-03-09 06:18:28 +01:00
Werner Lemberg 9c111b0179 * docs/CHANGES: Updated. 2011-03-07 06:07:53 +01:00
Werner Lemberg fe42a65317 Improve bzip2 support.
* include/freetype/ftmoderr.h: Add bzip2.

* docs/INSTALL.ANY, docs/CHANGES: Updated.

* src/pcf/README: Updated.
* include/freetype/internal/pcftypes.h: Obsolete, removed.
2010-12-31 17:47:09 +01:00
Werner Lemberg cd3224411e Update CHANGES. 2010-11-28 15:31:23 +01:00
suzuki toshiya 51d488104f New entry in CHANGES 2010-11-23 04:28:11 +09:00
Werner Lemberg a5a32c15c5 * Version 2.4.3 released.
=========================

Tag sources with `VER-2-4-3'.

* docs/CHANGES: Updated.

* docs/VERSION.DLL: Update documentation and bump version number to
2.4.3

* README, Jamfile (RefDoc),
builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
builds/win32/visualc/freetype.dsp,
builds/win32/visualc/freetype.vcproj,
builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
builds/win32/visualce/freetype.vcproj,
builds/win32/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.4.2/2.4.3/, s/242/243/.

* include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.

* builds/unix/configure.raw (version_info): Set to 12:1:6.
2010-10-03 20:36:03 +02:00
Werner Lemberg 6a8691eb6a * Version 2.4.2 released.
=========================

Tag sources with `VER-2-4-2'.

* docs/CHANGES: Updated.

* docs/VERSION.DLL: Update documentation and bump version number to
2.4.2

* README, Jamfile (RefDoc),
builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
builds/win32/visualc/freetype.dsp,
builds/win32/visualc/freetype.vcproj,
builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
builds/win32/visualce/freetype.vcproj,
builds/win32/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.4.1/2.4.2/, s/241/242/.

* include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.

* builds/unix/configure.raw (version_info): Set to 12:0:6.
2010-08-06 22:00:38 +02:00
suzuki toshiya 018f5c2781 Update docs/CHANGES to note that CFF stack overflow bug is fixed. 2010-08-06 14:12:54 +09:00
Werner Lemberg fe3433c736 Add reference counters and to FT_Library and FT_Face objects.
* include/freetype/freetype.h (FT_Reference_Face): New function.
* include/freetype/ftmodapi.h (FT_Rererence_Library): New function.

* include/freetype/internal/ftobjs.h (FT_Face_InternalRec,
FT_LibraryRec): New field `refcount'.

* src/base/ftobjs.c (FT_Open_Face, FT_New_Library): Handle
`refcount'.
(FT_Reference_Face, FT_Reference_Library): Implement new functions.
(FT_Done_Face, FT_Done_Library): Handle `refcount'.

* docs/CHANGES: Updated.
2010-07-18 18:41:47 +02:00
Werner Lemberg b69c6ac011 * Version 2.4.1 released.
=========================

Tag sources with `VER-2-4-1'.

* docs/CHANGES: Updated.

* docs/VERSION.DLL: Update documentation and bump version number to
2.4.1.

* README, Jamfile (RefDoc),
builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
builds/win32/visualc/freetype.dsp,
builds/win32/visualc/freetype.vcproj,
builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
builds/win32/visualce/freetype.vcproj,
builds/win32/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.4.0/2.4.1/, s/240/241/.

* include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.

* builds/unix/configure.raw (version_info): Set to 11:1:5.
2010-07-18 06:20:09 +02:00
Werner Lemberg 15ffc3546d * Version 2.4.0 released.
=========================

Tag sources with `VER-2-4-0'.

* docs/CHANGES: Updated.

* docs/VERSION.DLL: Update documentation and bump version number to
2.4.0.

* README, Jamfile (RefDoc),
builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
builds/win32/visualc/freetype.dsp,
builds/win32/visualc/freetype.vcproj,
builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
builds/win32/visualce/freetype.vcproj,
builds/win32/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.3.12/2.4.0/, s/2312/240/.

* include/freetype/freetype.h (FREETYPE_MINOR): Set to 4.
(FREETYPE_PATCH): Set to 0.

* builds/unix/configure.raw (version_info): Set to 11:0:5.
2010-07-12 22:07:16 +02:00
Werner Lemberg 6bbbbc1523 TrueType hinting is no longer patented.
* include/freetype/config/ftoption.h, devel/ftoption.h
(TT_CONFIG_OPTION_BYTECODE_INTERPRETER): Define.
(TT_CONFIG_OPTION_UNPATENTED_HINTING): Undefine.

* docs/CHANGES, docs/INSTALL, include/freetype/freetype.h: Updated.
* docs/TRUETYPE, docs/PATENTS: Removed.
2010-07-04 07:37:56 +02:00
Werner Lemberg 460d23f168 Add new function `FT_Library_SetLcdFilterWeights'.
This is based on code written by Lifter
<http://unixforum.org/index.php?showuser=11691>.  It fixes
FreeDesktop bug #27386.

* src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights): New
function.

* include/freetype/ftlcdfil.h: Updated.

* docs/CHANGES: Updated.
2010-04-05 08:46:26 +02:00
Werner Lemberg b36d4192a3 * Version 2.3.12 released.
==========================

Tag sources with `VER-2-3-12'.

* docs/CHANGES: Updated.

* docs/VERSION.DLL: Update documentation and bump version number to
2.3.12.

* README, Jamfile (RefDoc),
builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
builds/win32/visualc/freetype.dsp,
builds/win32/visualc/freetype.vcproj,
builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
builds/win32/visualce/freetype.vcproj,
builds/win32/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.3.11/2.3.12/, s/2311/2312/.

* include/freetype/freetype.h (FREETYPE_PATCH): Set to 12.

* builds/unix/configure.raw (version_info): Set to 10:0:4.
2010-02-13 07:57:56 +01:00
Werner Lemberg 3c4e6baadb * docs/CHANGES, docs/release: Updated. 2009-10-10 20:15:49 +02:00
Werner Lemberg bcdde60e5d Whitespace. 2009-10-06 11:14:19 +02:00
Werner Lemberg e2184505b1 * docs/CHANGES: Updated. 2009-09-23 09:28:48 +02:00
Werner Lemberg d77cd8ce7e Fix rendering of horizontally compressed CFFs.
Bug reported by Ivan Nincic <inincic@pdftron.com>.

* src/cff/cffgload.c (cff_slot_load): Thinko: Check `xx' element of
`font_matrix' also.

* docs/CHANGES: Updated.
2009-08-27 00:10:56 +02:00
Werner Lemberg 2cd790d7e2 Document recent library changes.
* docs/CHANGES: Do it.
2009-07-19 11:18:00 +02:00
Werner Lemberg 140a694373 docs/CHANGES: Updated. 2009-06-18 16:07:11 +02:00
Werner Lemberg 7daf801f8f Document recent changes to ftview.
* docs/CHANGES: Do it.
2009-04-30 20:00:22 +02:00
Werner Lemberg 8b84c9d19f autohinter: Don't change digit widths if all widths are the same.
This fixes FreeDesktop bug #21197.

* src/autofit/afglobal.c (AF_DIGIT): New macro.
(af_face_globals_compute_script_coverage): Mark ASCII digits in
`glyph_scripts' array.
(af_face_globals_get_metrics): Updated.
(af_face_globals_is_digit): New function.
* src/autofit/afglobal.h: Updated.
(AF_ScriptMetricsRec): Add `digits_have_same_width' flag.

* src/autofit/aflatin.c: Include FT_ADVANCES_H.
(af_latin_metrics_check_digits): New function.
(af_latin_metrics_init): Use it.
* src/autofit/aflatin.h: Updated.
* src/autofit/afcjk.c (af_cjk_metrics_init): Updated.

* src/autofit/aflatin2.c: Similar changes as with aflatin.c.

* src/autofit/afloader.c (af_loader_load_g): Test digit width.

* docs/CHANGES: Document it.
2009-04-27 19:40:35 +02:00
Werner Lemberg ca98f8cc2b Add support for cmap type 13.
* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_CMAP_FORMAT_13): New macro.

* src/sfnt/ttcmap.c (TT_CMap13Rec, tt_cmap13_init,
tt_cmap13_validate, tt_cmap13_char_index, tt_cmap13_char_next,
tt_cmap13_get_info, tt_cmap13_char_map_def_binary,
tt_cmap14_class_rec): New functions and structures for cmap 13
support.
(tt_cmap_classes): Register tt_cmap13_class_rec.

* docs/CHANGES: Mention cmap 13 support.
2009-04-04 07:42:38 +02:00
Werner Lemberg 07e818170f Extend CID service functions to handle CID-keyed CFFs as CID fonts.
* include/freetype/ftcid.h (FT_Get_CID_Is_Internally_CID_keyed,
FT_Get_CID_From_Glyph_Index): New functions.

* include/freetype/internal/services/svcid.h
(FT_CID_GetIsInternallyCIDKeyedFunc,
FT_CID_GetCIDFromGlyphIndexFunc): New function typedefs.
(CID Service): Use them.

* src/base/ftcid.c: Include FT_CID_H.
(FT_Get_CID_Is_Internally_CID_keyed, FT_Get_CID_From_Glyph_Index):
New functions.

* src/cff/cffdrivr.c (cff_get_is_cid, cff_get_cid_from_glyph_index):
New functions.
(cff_service_cid_info): Add them.
* src/cff/cffload.c (cff_font_load): Don't free `font->charset.sids'
-- it is needed for access as a CID-keyed font.  It gets deleted
later on.

* src/cid/cidriver.c (cid_get_is_cid, cid_get_cid_from_glyph_index):
New functions.
(cid_service_cid_info): Add them.

* docs/CHANGES: Updated.
2009-03-11 21:29:54 +00:00
Werner Lemberg 1e54a65fa8 Minor update. 2009-03-11 07:10:26 +00:00
Werner Lemberg 21dab9112b More preparations for 2.3.9 release.
* docs/CHANGES: Updated.

* Jamfile, README: s/2.3.8/2.3.9/, s/238/239/.
2009-03-09 18:06:28 +00:00
Werner Lemberg 42f5c714c0 Formatting. 2009-03-03 23:34:49 +00:00
David Turner ab7e52b1c7 Fix SFNT kerning table parser against malformed tables.
Closes Savannah BUG #25750

	* src/sfnt/ttkern.c (tt_face_get_kerning): fix a bug
	where a malformed table would be succesfully loaded but
	later crash the engine during parsing.
2009-03-03 22:37:13 +00:00
Werner Lemberg 15b60bb513 Formatting, copyright years. 2009-03-03 21:35:32 +00:00
David Turner cda6f49332 Update documentation and bump version number to 2.3.9
* include/freetype/freetype.h: bump patch version to 9
	* docs/CHANGES: document the ABI break in 2.3.8
	* docs/VERSION.DLL: update version numbers table for 2.3.9
	* builds/unix/configure.ac: update AC_INIT and version_info
	numbers.
2009-03-03 20:49:32 +00:00
Werner Lemberg 14de111f72 Fix Savannah bug #25669.
* src/base/ftadvanc.h (FT_Get_Advances): Fix serious typo.

* src/base/ftobjs.c (FT_Select_Metrics, FT_Request_Metrics): Fix
scaling factor for non-scalable fonts.

* src/cff/cffdrivr.c (cff_get_advances): Use correct advance width
value to prevent incorrect scaling.

* docs/CHANGES: Document it.
2009-02-24 21:34:51 +00:00
Werner Lemberg 5e83ce4d29 Formatting. 2009-01-22 05:53:35 +00:00
Suzuki, Toshiya (鈴木俊哉) 5a00909a77 * Fix a bug in POSIX resource-fork accessor since 2008-10-04 2009-01-22 03:50:37 +00:00
Werner Lemberg 59e2c8dd25 Fix documentation of FT_Outline_GetInsideBorder.
* include/freetype/ftstroke.h (FT_Outline_GetInsideBorder): Fix
documentation.  Problem reported by Truc Truong <tructv@necsv.com>.

* docs/CHANGES: Updated.
2009-01-18 06:42:59 +00:00
Werner Lemberg a79de11b22 * docs/CHANGES: Document new key `a' in ftdiff. 2009-01-07 08:27:37 +00:00
Werner Lemberg 1ad384d881 Set `face_index' field in FT_Face for all font formats.
* cff/cffobjs.c (cff_face_init), winfonts/winfnt.c (FNT_Face_Init),
sfnt/sfobjs.c (sfnt_init_face): Do it.

* docs/CHANGES: Document it.
2008-12-25 23:52:00 +00:00
Werner Lemberg 05bf6877a4 * docs/CHANGES: Updated.
Provide API for accessing embedding and subsetting restriction
information.

* include/freetype.h (FT_FSTYPE_INSTALLABLE_EMBEDDING,
FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING,
FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING, FT_FSTYPE_EDITABLE_EMBEDDING,
FT_FSTYPE_NO_SUBSETTING, FT_FSTYPE_BITMAP_EMBEDDING_ONLY): New
macros.
(FT_Get_FSType_Flags): New function declaration.

* src/base/ftobjs.c (FT_Get_FSType_Flags): New function.

* src/cid/cidtoken.h, src/type1/t1tokens.h, src/type42/t42parse.c
(t42_keywords): Handle `FSType'.

* include/freetype/t1tables.h (PS_FontInfoRec): Add `fs_type' field.
2008-12-18 06:32:10 +00:00
Werner Lemberg c8c4cc837c * 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.
2008-12-17 10:50:31 +00:00
Werner Lemberg b972a2a294 Generalize the concept of `tricky' fonts by introducing
FT_FACE_FLAG_TRICKY to indicate that the font format's hinting
engine is necessary for correct rendering.

At the same time, slightly modify the behaviour of tricky fonts:
FT_LOAD_NO_HINTING is now ignored.  To really force raw loading
of tricky fonts (without hinting), both FT_LOAD_NO_HINTING and
FT_LOAD_NO_AUTOHINT must be used.

Finally, tricky TrueType fonts always use the bytecode interpreter
even if the patented code is used.

* include/freetype/freetype.h (FT_FACE_FLAG_TRICKY, FT_IS_TRICKY):
New macros.

* src/truetype/ttdriver.c (Load_Glyph): Handle new load flags
semantics as described above.

* src/truetype/ttobjs.c (tt_check_trickyness): New function, using
code of ...
(tt_face_init): This function, now simplified and updated to new
semantics.

* src/base/ftobjs.c (FT_Load_Glyph): Don't use autohinter for tricky
fonts.

* docs/CHANGES: Document it.
2008-12-11 08:55:48 +00:00
Werner Lemberg c321b9b063 * devel/ftoption.h, include/freetype/config/ftoption.h
[TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Undefine
TT_CONFIG_OPTION_UNPATENTED_HINTING.  This fixes the return value of
`FT_Get_TrueType_Engine_Type' (and makes it work as documented).
Reported in bug #441638 of bugzilla.novell.com.

* docs/CHANGES: Document it.

Other minor documentation improvements.
2008-11-05 14:34:29 +00:00
Werner Lemberg 174b8de328 * src/sfnt/sfobjs.c (sfnt_load_face): Fix computation of
`underline_position'.


* docs/CHANGES: Updated.


Formatting, minor editing.
2008-10-12 11:47:29 +00:00
Werner Lemberg 70f4cff19d * 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.
2008-09-20 16:12:05 +00:00
Werner Lemberg 22e970a23e Formatting, minor code fixes. 2008-09-20 12:20:21 +00:00
Suzuki, Toshiya (鈴木俊哉) 9ae5eaf862 * src/base/ftobjs.c: Add initial support for sfnt-wrapped CID-keyed fonts 2008-09-19 06:48:35 +00:00
Werner Lemberg 3d2f06f399 Handle CID-keyed fonts wrapped in a SFNT (with cmaps) correctly.
* src/cff/cffload.c (cff_font_load): Pass `pure_cff'.
Invert sids table only if `pure_cff' is set.
* src/cff/cffload.h: Udpated.

* src/cff/cffobjs.c (cff_face_init): Updated.
2008-07-16 06:13:34 +00:00
Werner Lemberg be54a68c9d * Version 2.3.7 released.
=========================


Tag sources with `VER-2-3-7'.

* docs/CHANGES, docs/VERSION.DLL: Update documentation and bump
version number to 2.3.7.

* README, Jamfile (RefDoc), builds/win32/visualc/index.html,
builds/win32/visualc/freetype.dsp,
builds/win32/visualc/freetype.vcproj,
builds/win32/visualce/index.html,
builds/win32/visualce/freetype.dsp,
builds/win32/visualce/freetype.vcproj: s/2.3.6/2.3.7/, s/236/237/.

* include/freetype/freetype.h (FREETYPE_PATCH): Set to 7.

* builds/unix/configure.raw (version_info): Set to 9:18:3.

* docs/release: Updated.
2008-06-29 07:43:41 +00:00
Werner Lemberg 959cb8eb19 minor improvements 2008-06-25 20:58:33 +00:00
Werner Lemberg 745a4f42a5 * src/truetype/ttgload.c (TT_Load_Glyph): Protect bytecode stuff
with IS_HINTED.

* docs/CHANGES: Updated.
2008-06-22 22:41:24 +00:00
Werner Lemberg 5b631d894c * src/cff/cffobjs.c (cff_face_init): Compute final
`dict->units_per_em' value before assigning it to
`cffface->units_per_EM'.  Otherwise, CFFs without subfonts are be
scaled incorrectly if the font matrix is non-standard.  This fixes
Savannah bug #23630.

* docs/CHANGES: Updated.
2008-06-19 16:23:43 +00:00
Werner Lemberg d57a5e9fff * src/type/t1objs.c (T1_Face_Init): Fix change from 2008-03-21.
Reported by Peter Weilbacher <mozilla@weilbacher.org>.

* docs/CHANGES: Updated.
2008-06-18 06:16:39 +00:00
Werner Lemberg ad83e05b37 * src/base/ftcalc.c (FT_MulFix) <asm>: Protect registers correctly
from clobbering.  Patch from Savannah bug report #23556.

* docs/CHANGES: Document it.
2008-06-15 11:06:12 +00:00
Werner Lemberg 6174e17cf7 * Version 2.3.6 released.
=========================


Tag sources with `VER-2-3-6'.

* docs/CHANGES, docs/VERSION.DLL: Update documentation and bump
version number to 2.3.6.

* README, Jamfile (RefDoc), builds/win32/visualc/index.html,
builds/win32/visualc/freetype.dsp,
builds/win32/visualc/freetype.vcproj,
builds/win32/visualce/index.html,
builds/win32/visualce/freetype.dsp,
builds/win32/visualce/freetype.vcproj: s/2.3.5/2.3.6/, s/235/236/.

* include/freetype/freetype.h (FREETYPE_PATCH): Set to 6.

* builds/unix/configure.raw (version_info): Set to 9:17:3.


* include/freetype/internal/psaux.h (T1_BuilderRec): Remove `scale_x'
and `scale_y'.
* src/cff/cffgload.h (CFF_Builder): Remove `scale_x' and `scale_y'.


* src/cff/cffparse.c: Include FT_INTERNAL_DEBUG_H.
* src/cff/cffobjs.h: Include FT_INTERNAL_POSTSCRIPT_HINTS_H.
2008-06-10 05:58:25 +00:00
Werner Lemberg 7cb9ec0f1c * src/type1/t1parse.h (T1_ParserRec): Make `base_len' and
`private_len' unsigned.

* src/type1/t1parse.c (read_pfb_tag): Make `asize' unsigned and read
it as such.
(T1_New_Parser, T1_Get_Private_Dict): Make `size' unsigned.


* src/base/ftstream.c (FT_Stream_Skip): Reject negative values.


* src/type1/t1load.c (parse_blend_design_positions): Check `n_axis'
for sane value.
Fix typo.


* src/psaux/psobjs.c (ps_table_add): Check `idx' correctly.


* src/truetype/ttinterp (Ins_SHC): Use BOUNDS() to check
`last_point'.


* src/sfnt/ttload.c (tt_face_load_max_profile): Limit
`maxTwilightPoints'.
2008-06-09 20:49:29 +00:00
Werner Lemberg 16dc51feae * src/base/ftdebug.c (FT_Message, FT_Panic): Send output to stderr.
This fixes Savannah bug #23280.

* docs/CHANGES: Updated.

Some formatting.
2008-05-18 17:36:15 +00:00
Werner Lemberg a2f17cc150 * docs/CHANGES: Updated.
Improve support for WGL4 encoded fonts.

* src/psnames/psmodule.c (WGL_EXTRA_LIST_SIZE): New macro.
(ft_wgl_extra_unicodes, ft_wgl_extra_glyph_names,
ft_wgl_extra_glyph_name_offsets): New arrays.
(ps_check_wgl_name, ps_check_wgl_unicode): New functions.
(ps_unicodes_init): Use them to add additional Unicode mappings.
2008-05-17 10:01:45 +00:00
Werner Lemberg e6e6eade04 Finish fix of scaling bug of CID-keyed CFF subfonts.
* include/freetype/internal/ftcalc.h, src/base/ftcalc.c
(FT_Matrix_Multiply_Scaled, FT_Vector_Transform_Scaled): New
functions.

* src/cff/cffobjs.h (CFF_Internal): New struct.  It is used to
provide global hinting data for both the top-font and all subfonts
(with proper scaling).

* src/cff/cffobjs.c (cff_make_private_dict): New function, using
code from `cff_size_init'.
(cff_size_init, cff_size_done, cff_size_select, cff_size_request):
Use CFF_Internal and handle subfonts.
(cff_face_init): Handle top-dict and subfont matrices correctly;
apply some heuristic in case of unlikely matrix concatenation
results.  This has been discussed with people from Adobe (thanks
goes mainly to David Lemon) who confirm that the CFF specs are fuzzy
and not correct.

* src/cff/cffgload.h (cff_decoder_prepare): Add `size' argument.

* src/cff/cffgload.c (cff_builder_init): Updated.
(cff_decoder_prepare): Handle hints globals for subfonts.
Update all callers.
(cff_slot_load): Handling scaling of subfonts properly.

* src/cff/cffparse.c (cff_parse_fixed_dynamic): New function.
(cff_parse_font_matrix): Use it.

* src/cff/cfftypes.h (CFF_FontDictRec): Make `units_per_em'
FT_ULong.

* docs/CHANGES: Document it.
2008-05-14 23:05:38 +00:00
Werner Lemberg fb57228b94 * src/winfonts/winfnt.c (fnt_face_get_dll_font, FNT_Face_Init):
Handle case `face_index < 0'.
* docs/CHANGES: Document it.
2008-05-13 12:10:04 +00:00
Werner Lemberg 210d61894b Fix support for subsetted CID-keyed CFFs.
* include/freetype/freetype.h (FT_FACE_FLAG_CID_KEYED,
FT_IS_CID_KEYED): New macros.

* src/cff/cffobjs.c (cff_face_init): Set number of glyphs to the
maximum CID value in CID-keyed CFFs.
Handle FT_FACE_FLAG_CID_KEYED flag.

* docs/CHANGES: Document it.


Fix CFF font matrix calculation and improve precision.

* src/cff/cffparse.c (cff_parse_real): Increase precision if integer
part is zero.
(cff_parse_font_matrix): Simplify computation of `units_per_em';
this prevents overflow also.


Support FT_Get_CID_Registry_Ordering_Supplement for PS CID fonts.

* src/cid/cidriver.c: Include FT_SERVICE_CID_H.
(cid_get_ros): New function.
(cid_service_cid_info): New service structure.
(cid_services): Register it.
2008-04-01 05:55:48 +00:00
Werner Lemberg 8575117c50 * src/type1/t1objs.c (T1_Face_Init): Use `/Weight'. Patch from
Savannah bug #22675.
2008-03-21 07:16:00 +00:00
Werner Lemberg 5057e36c15 * docs/CHANGES: Updated. 2008-02-29 07:23:02 +00:00
Werner Lemberg 9a966b7d1b Add support for cmap type 14.
* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_CMAP_FORMAT_14): New macro.

* include/freetype/internal/ftobjs.h (FT_CMap_CharVarIndexFunc,
FT_CMap_CharVarIsDefaultFunc, FT_CMap_VariantListFunc,
FT_CMap_CharVariantListFunc, FT_CMap_VariantCharListFunc): New
support function prototypes.
(FT_CMap_ClassRec): Add them.
Update all users.

* include/freetype/ttnameid.h (TT_APPLE_ID_VARIANT_SELECTOR): New
macro.

* include/freetype/freetype.h (FT_Get_Char_Variant_Index,
FT_Get_Char_Variant_IsDefault, FT_Get_Variant_Selectors,
FT_Get_Variants_Of_Char, FT_Get_Chars_Of_Variant): New API
functions.

* src/base/ftobjs.c (find_variant_selector_charmap): New auxiliary
function.
(FT_Set_Charmap): Disallow cmaps of type 14.
(FT_Get_Char_Variant_Index, FT_Get_Char_Variant_IsDefault,
FT_Get_Variant_Selectors, FT_Get_Variants_Of_Char,
FT_Get_Chars_Of_Variant): New API functions.

* src/sfnt/ttcmap.c (TT_PEEK_UINT24, TT_NEXT_UINT24): New macros.

(TT_CMap14Rec, tt_cmap14_init, tt_cmap14_validate,
tt_cmap14_char_index, tt_cmap14_char_next, tt_cmap14_get_info,
tt_cmap14_char_map_def_binary, tt_cmap14_char_map_nondef_binary,
tt_cmap14_find_variant, tt_cmap14_char_var_index,
tt_cmap14_char_var_isdefault, tt_cmap14_variants,
tt_cmap14_char_variants, tt_cmap14_def_char_count,
tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars,
tt_cmap14_variant_chars, tt_cmap14_class_rec): New functions and
structures for cmap 14 support.
(tt_cmap_classes): Register tt_cmap14_class_rec.
(tt_face_build_cmaps): One more error message.

* docs/CHANGES: Mention cmap 14 support.
2007-10-15 17:21:32 +00:00
Werner Lemberg d76fe5a1af * src/otvalid/otvbase.c, src/otvalid/otvcommn.c,
src/otvalid/otvgdef.c, src/otvalid/otvgpos.c, src/otvalid/otvgsub.c,
src/otvalid/otvjstf.c: s/FT_INVALID_DATA/FT_INVALID_FORMAT/ where
appropriate.  Reported by George.

* include/freetype/internal/fttrace.h: Define `trace_otvmath'.

* src/otvalid/rules.mk (OTV_DRV_SRC): Add otvmath.c.

* docs/CHANGES: Updated.


Add `MATH' validating support to otvalid module.

* include/freetype/tttags.h (TTAG_MATH): New macro.
* include/freetype/ftotval.h (FT_VALIDATE_MATH): New macro.
(FT_VALIDATE_OT): Updated.

* src/otvalid/otmath.c: New file.

* src/otvalid/otvalid.c: Include otvmath.c.
* src/otvalid/otvmod.c (otv_validate): Handle `MATH' table.
2007-08-08 06:38:06 +00:00
Werner Lemberg ef915c36f4 * docs/CHANGES: Updated.
Add new service for getting the ROS from a CID font.

* include/freetype/config/ftheader.h (FT_CID_H): New macro.
* include/freetype/ftcid.h: New file.

* include/freetype/internal/ftserv.h (FT_SERVIVE_CID_H): New macro.
* include/freetype/internal/services/svcid.h: New file.

* src/base/ftcid.c: New file.

* src/cff/cffdrivr.c: Include FT_SERVICE_CID_H.
(cff_get_ros): New function.
(cff_service_cid_info): New service structure.
(cff_services): Register it.

* src/cff/cffload.c (cff_font_done): Free registry and ordering.

* src/cff/cfftypes.h (CFF_FontRec): Add `registry' and `ordering'.

* modules.cfg (BASE_EXTENSIONS): Add ftcid.c.
2007-07-16 20:46:05 +00:00
Werner Lemberg aa52eab74a Updated. 2007-07-02 15:14:50 +00:00
Werner Lemberg e9f4799940 Document ftpatchk. 2007-06-16 09:32:31 +00:00
Werner Lemberg ab1604bd6b * src/winfonts/winfnt.h: Add necessary structures for PE resource
parsing.
(WinPE32_HeaderRec): New structure.
(WinPE32_SectionRec): New structure.
(WinPE_RsrcDirRec): New structure.
(WinPE_RsrcDirEntryRec): New structure.
(WinPE_RsrcDataEntryRec): New structure.
(FNT_FontRec): Remove unused `size_shift' field.

* src/winfonts/winfnt.c (fnt_face_get_dll_font): Add support for
loading bitmap .fon files in PE format.
2007-06-16 07:59:39 +00:00
Werner Lemberg f6c120f826 * docs/CHANGES: Document FT_Face_CheckTrueTypePatents).
Formatting, reformulations.
2007-06-11 04:55:58 +00:00
Werner Lemberg 99e0c18ea1 Formatting, reformulations. 2007-05-29 07:00:23 +00:00
David Turner 0291a5c696 updating CHANGES 2007-05-28 15:49:08 +00:00
Werner Lemberg 1c8980ef4a * docs/CHANGES: Updated.
Formatting.
2007-05-25 07:11:12 +00:00
Werner Lemberg 799441101a typo 2007-05-19 14:10:06 +00:00
Werner Lemberg c1d2257e46 Updated. 2007-05-19 07:24:55 +00:00
Werner Lemberg df49e697c1 * builds/win32/visualce/*: Add Visual C++ project files for Pocket
PC targets.

* docs/CHANGES: Document them.
2007-05-04 06:30:05 +00:00
Werner Lemberg 14bf82e129 * Version 2.3.4 released.
=========================


Tag sources with `VER-2-3-4'.

* docs/CHANGES, docs/VERSION.DLL: Update documentation and bump
version number to 2.3.4.

* README, Jamfile (RefDoc), builds/win32/visualc/index.html,
builds/win32/visualc/freetype.dsp,
builds/win32/visualc/freetype.vcproj: s/2.3.3/2.3.4/, s/233/234/.

* include/freetype/freetype.h (FREETYPE_PATCH): Set to 4.

* builds/unix/configure.raw (version_info): Set to 9:15:3.
2007-04-10 04:09:49 +00:00
Werner Lemberg 9f83e05502 * Version 2.3.3 released.
=========================


Tag sources with `VER-2-3-3'.

* docs/CHANGES: Mention CVE-2007-1351.
2007-04-05 02:28:23 +00:00
Werner Lemberg 644b1ad49e * builds/win32/visualc/index.html,
builds/win32/visualc/freetype.dsp,
builds/win32/visualc/freetype.vcproc, README: s/2.3.2/2.3.3/,
s/232/233/.

* docs/CHANGES: Mention ftdiff.
2007-03-28 21:17:11 +00:00
David Turner 23553d6d2b * docs/CHANGES, docs/VERSION, include/freetype/freetype.h,
builds/unix/configure.raw, README, Jamfile: update documentation and bump version
	number to 2.3.3
2007-03-26 13:37:17 +00:00
Werner Lemberg 25d592a71c * Version 2.3.2 released.
=========================


Tag sources with `VER-2-3-2'.

* builds/win32/visualc/index.html,
builds/win32/visualc/freetype.dsp,
builds/win32/visualc/freetype.vcproc, README: s/2.3.1/2.3.2/,
s/231/232/.
2007-03-09 07:59:35 +00:00
David Turner 121cad54ae updating version numbers and documentation 2007-03-08 16:43:50 +00:00
Werner Lemberg 4b2e83d5b5 A new set of spelling fixes from Alexei.
Add some copyright messages.
2007-02-01 07:58:02 +00:00
Werner Lemberg 53935939df * Version 2.3.1 released.
=========================


Tag sources with `VER-2-3-1-FINAL'.

* builds/win32/visualc/freetype.dsp,
builds/win32/visualc/freetype.vcproj: s/230/231/.
* builds/win32/visualc/index.html: s/221/231/.

* vms_make.com: Add `ftgasp'.
2007-01-31 08:53:02 +00:00
David Turner 3eaef6c170 updating version numbers to 2.3.1 2007-01-30 10:40:23 +00:00
Werner Lemberg 3b3f2baae4 * docs/release: Updated -- Savannah uses a new uploading scheme.
formatting
2007-01-25 22:14:40 +00:00
Werner Lemberg d785566330 formatting, rearranging 2007-01-25 13:53:56 +00:00
David Turner a42567bf66 - same CFF loader fix (stricter checking though than Werner's version)
- document light auto-hinter improvements
2007-01-25 12:23:37 +00:00
Werner Lemberg b1be9e8b57 * src/cff/cffload.c (cff_index_get_pointers): Handle last entry
correctly.  This fixes Savannah bug #18867.

* docs/CHANGES: Document it.

Other formatting.
2007-01-25 11:50:00 +00:00
Werner Lemberg 555258fffe * docs/CHANGES: Document SHZ fix.
* src/truetype/ttinterp.c (Ins_SHZ): SHZ doesn't move phantom
points.
2007-01-21 09:46:37 +00:00
Werner Lemberg b4142d5126 Whitespace and spelling fixes from Alexei.
Formatting, copyright years.
2007-01-17 12:45:26 +00:00
Werner Lemberg 8c4120d0a3 Fix various compiler warnings.
* src/truetype/ttdriver.c (tt_size_select), src/cff/cffobjs.h,
src/cff/cffobjs.c (cff_size_request), src/type42/t42objs.h:
s/index/strike_index/.
* src/base/ftobjs.c (FT_Match_Size): s/index/size_index/.

* src/gxvalid/gxvmorx5.c
(gxv_morx_subtable_type5_InsertList_validate): s/index/table_index/.

* src/truetype/ttinterp.c (Compute_Point_Displacement),
src/pcf/pcfread.c (pcf_seek_to_table_type): Avoid possibly
uninitialized variables.
2007-01-15 06:42:40 +00:00
Werner Lemberg 6164a9d13b * docs/CHANGES, docs/INSTALL.MAC: Improvements. 2007-01-13 23:01:36 +00:00
Werner Lemberg b0398be6b8 clarifications 2007-01-13 08:52:27 +00:00
Werner Lemberg 17432b5e37 * src/type1/t1load.c (is_space): Removed.
(parse_encoding, parse_charstrings): Use IS_PS_DELIM.
(parse_charstrings): Use IS_PS_TOKEN.


* autogen.sh: Avoid bash specific syntax.
2007-01-12 09:28:44 +00:00
David Turner 490503acf5 small doc update 2007-01-11 15:29:41 +00:00
Werner Lemberg cc7f12a429 formatting, copyright years and messages, doc polishing 2007-01-09 10:37:36 +00:00
David Turner 4f7496eea2 updating docs/CHANGES 2007-01-09 09:21:16 +00:00
Werner Lemberg 110246c641 formatting 2006-09-26 21:55:44 +00:00
David Turner e3d6e94853 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

======================================================================
2006-09-26 16:58:21 +00:00
Werner Lemberg 94168f0b41 Improve layout of `CHANGES' file. 2006-05-11 07:07:09 +00:00
Werner Lemberg 1639c79482 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
* builds/unix/configure.ac (version_info): Set to 9:10:3.

* builds/win32/visualc/index.html,
builds/win32/visualc/freetype.dsp,
builds/win32/visualc/freetype.vcproj, builds/freetype.mk (refdoc),
Jamfile (RefDoc), README: s/220/221/, s/2.2.0/2.2.1/.
Minor updates.

* docs/CHANGES, docs/VERSION.DLL, docs/PROBLEMS, README.CVS:
Updated.

* builds/unix/install-sh: Updated from `texinfo' CVS module at
savannah.gnu.org.

* devel/ftoption.h: Synchronize with
include/freetype/config/ftoption.h.
2006-05-06 16:44:58 +00:00
Werner Lemberg 4091786c81 Formatting. 2006-04-01 18:49:07 +00:00
David Turner cf60371a1b updating documentation 2006-04-01 16:22:06 +00:00
Werner Lemberg 4db32ecbc5 * docs/CHANGES: Updated.
* src/tools/docmaker/tohtml.py (html_header_2): Add horizontal
padding between table elements.


Formatting, copyright years.
2006-03-24 11:54:53 +00:00
Werner Lemberg 8439fe8575 * builds/freetype.mk (refdoc), docs/CHANGES, Jamfile (RefDoc),
README: s/2.1.10/2.2/.
2006-03-21 21:04:33 +00:00
David Turner dad2a2de01 * src/cache/ftccache.h, src/cache/ftcglyph.h, src/cache/ftcimage.h,
src/cache/ftcsbits.h, src/cache/ftcmanag.h, src/cache/ftccmap.h,
    src/cache/ftcmru.h: copying the cache's internal header files which
    were located in 'include/freetype/cache' to the 'src/cache' directory
    instead.

    Note that these files are not used by FreeType clients, all cache
    public APIs have been already moved to include/freetype/ftcache.h,
    and the FT_CACHE_INTERNAL_XXXX_H macros all resolve to it.

    the move is to allow us to modify the internals without intereference
    from rogue clients. Note that there are no known client that accesses
    the cache internals at the moment.
2006-03-20 11:48:13 +00:00
Werner Lemberg e88d24c133 formatting 2006-02-28 21:49:54 +00:00
David Turner e9a47198e6 * tagging VER-2-2-0-RC4
* docs/CHANGES: documentation updates
2006-02-28 09:26:58 +00:00
Werner Lemberg f99d846c8a * docs/release: Minor additions and clarifications.
* docs/CHANGES: Updated to reflect many fixes for backwards
compatibility.  Still incomplete.
2006-02-26 17:50:59 +00:00
Werner Lemberg d39fda2b55 Formatting, copyright years. 2006-02-12 21:49:21 +00:00
Wu, Chia-I (吳佳一) f9a69132a7 * include/freetype/config/ftoption.h (AF_CONFIG_OPTION_CJK): #define
to enable autofit CJK script support. (#define'd by default)

* src/autofit/aflatin.h (AF_LATIN_CONSTANT): New macro.

* src/autofit/aflatin.c (af_latin_metrics_init_widths): Make sure that
`edge_distance_threshold' is always set.
(af_latin_hints_link_segments): Potential divide by 0 bug.
Use latin constant in the scoring formula.

* src/autofit/afcjk.c: Minor updates due to the above three changes.

* docs/TODO, docs/CHANGES: Updated.
2006-02-11 12:12:02 +00:00
Werner Lemberg 59939244ad Implement new, simplified module selection. With GNU make it is now
sufficient to modify a single file, `modules.cfg', to control the
inclusion of modules and base extension files.

This change also fixes the creation of ftmodule.h; it now depends on
`modules.cfg' and thus is rebuilt only if necessary.

Finally, a version of `ftoption.h' in OBJ_DIR is preferred over the
default location.

* modules.cfg: New file.

* builds/freetype.mk: Don't include `modules.mk'.
Include all `rules.mk' files as specified in `modules.cfg'.
(FTOPTION_FLAG, FTOPTION_H): New variables.
(FT_CFLAGS): Add macro definition for FT_CONFIG_MODULES_H.
Add FTOPTION_FLAG.
($(FT_INIT_OBJ)): Don't use FT_MODULE_LIST.
(CONFIG_H): Add FTMODULE_H and FTOPTION_H.
(INCLUDES): Add DEVEL_DIR.
(INCLUDE_FLAGS, FTSYS_SRC, FTSYS_OBJ, FTDEBUG_SRC, FTDEBUG_OBJ,
OBJ_M, OBJ_S): Use `:=', not `='.
(remove_ftmodule_h): New phony target to delete `ftmodule.h'.
(distclean): Add remove_ftmodule_h.

* builds/modules.mk: (MODULE_LIST): Removed.
(make_module_list, clean_module_list): Replace targets
with...
(FTMODULE_H_INIT, FTMODULE_H_CREATE, FTMODULE_H_DONE): New
variables.  Reason for the change is that it is not possible to have
a phony prerequisite which is run only if the target file must be
rebuilt (phony prerequisites act like subroutines and are *always*
executed).  We only want to rebuild `ftmodule.h' if `module.cfg' is
changed.
Update all callers.
($FTMODULE_H)): Rule to create `ftmodule.h', depending on
`modules.cfg'.

* builds/toplevel.mk: Rewrite and simplify module handling.
(MODULES_CFG, FTMODULE_H): New variables.
Include MODULES_CFG.
(MODULES): New variable to include all `module.mk' and `rules.mk'
files.  We no longer use make's `wildcard' function for this.

* Makefile (USE_MODULES): Remove.  Update all users.
(OBJ_DIR): Define it here.

* src/*/module.mk: Change

    make_module_list: foo
    foo: ...

to

    FTMODULE_H_COMMANDS += FOO
    define FOO
    ...
    endef

in all files.  `FTMODULE_H_COMMANDS' is used in `FTMODULE_H_CREATE'.

* src/base/rules.mk (BASE_EXT_SRC): Use BASE_EXTENSIONS.

* builds/unix/detect.mk (setup): Always execute `configure' script.
(have_mk): Rename to...
(have_Makefile): This.
Don't use `strip' function.

* builds/unix/unix.mk: Include `install.mk' only if BUILD_PROJECT is
defined.
(have_mk): Don't use `strip' function.
Test for unix-def.mk in OBJ_DIR, not BUILD_DIR (and invert the test
accordingly).

* builds/unix/install.mk (install, uninstall): Handle `ftmodule.h'.

* builds/os2/os2-dev.mk, builds/unix/unix-dev.mk,
builds/win32/w32-bccd.mk, builds/win32/w32-dev.mk: Don't define
BUILD_DIR but DEVEL_DIR for development header files.

* builds/ansi/ansi-def.mk (TOP_DIR, OBJ_DIR),
builds/beos/beos-def.mk (TOP_DIR, OBJ_DIR), builds/unix/unix-def.in
(TOP_DIR, OBJ_DIR): Removed.  Defined elsewhere.

* builds/dos/dos-def.mk (OBJ_DIR), builds/os2/os2-def.mk (OBJ_DIR),
builds/win32/win32-def.mk (OBJ_DIR): Removed.  Defined elsewhere.

* builds/unix/unixddef.mk: Don't define BUILD_DIR but DEVEL_DIR for
development header files.
Don't define PLATFORM.

* configure: Copy `modules.cfg' to builddir if builddir != srcdir.
Update snippet taken from autoconf's m4sh.m4 to current CVS version.
Be more verbose.

* include/freetype/config/ftmodule.h: Add comments -- this file is
no longer used if FreeType is built with GNU make.

* docs/CHANGES, docs/CUSTOMIZE, docs/INSTALL, docs/INSTALL.ANY,
docs/INSTALL.GNU, docs/INSTALL.UNX: Document new build mechanism.
Other minor updates.

* modules.txt: Removed.  Contents included in `modules.cfg'.


* include/freetype/internal/ftmemory.h (FT_QAlloc_Debug,
FT_Free_Debug) [FT_STRICT_ALIASING]: Fix typos.

* src/base/ftdbgmem.c (FT_Alloc_Debug, FT_Realloc_Debug,
FT_QAlloc_Debug, FT_QRealloc_Debug, FT_Free_Debug)
[FT_STRICT_ALIASING]: Implement.
2006-01-31 20:17:42 +00:00
Wu, Chia-I (吳佳一) ea1e8d3a53 * include/freetype/internal/ftobjs.h, src/base/ftobjs.c,
src/bdf/bdfdrivr.c, src/cff/cffgload.c, src/cid/cidgload.c,
src/pcf/pcfdrivr.c, src/type1/t1gload.c, src/winfonts/winfnt.c:
s/ft_fake_vertical_metrics/ft_synthesize_vertical_metrics/.

* docs/CHANGES: Mention that vertical metrics are synthesized for
fonts not having this info.
2006-01-15 15:01:45 +00:00
Wu, Chia-I (吳佳一) e33dc2ebee * docs/CHANGES: Mention the size selection change.
* src/bdf/bdfdrivr.c (BDF_Size_Request, BDF_Size_Select),
src/pcf/pcfdrivr.c (PCF_Size_Request, PCF_Size_Select),
src/winfonts/winfnt.c (FNT_Size_Request, FNT_Size_Select): Do size
matching for request of type NOMINAL and REAL_DIM.

* src/winfonts/winfnt.c (FNT_Face_Init): Print trace message when
`pixel_height' is used for nominal height.

* src/base/ftobjs.c (FT_Request_Size): Call `FT_Match_Size' if the
face is bitmap only and driver doesn't provide `request_size'.  This
is added merely for completion as no driver satisfies the conditions.
2006-01-14 05:09:30 +00:00
Werner Lemberg 435046b54b Formatting, improving comments. 2006-01-11 10:57:42 +00:00
Suzuki, Toshiya (鈴木俊哉) f8d16cc540 * Fix 'deprecated' warnings in building for MacOS 2006-01-11 09:28:38 +00:00
Werner Lemberg 6cdab92b59 * docs/CHANGES: Updated.
* include/freetype/ftmodapi.h (FT_Module_Get_Flags): New
declaration.

* src/base/ftobjs.c (FT_Module_Get_Flags): New function.
2006-01-08 22:34:01 +00:00
Werner Lemberg 083ba0b7bc Formatting, documentation improvements. 2005-12-23 15:10:54 +00:00
David Turner e6bb95336a * Jamfile, docs/reference/README: fix it so that "jam refdoc" works
correctly to generate the API reference in 'docs/reference'

	* src/tools/docmaker/tohtml.py: update to output nicer fields lists
	in the API reference

	* src/base/ftobjs.c (FT_Load_Glyph): FT_LOAD_TARGET_LIGHT now
	forces auto-hinting

	* freetype/freetype.h: updating the documentation for
	FT_LOAD_TARGET_XXX and FT_Render_Mode values
2005-12-23 13:32:06 +00:00
Suzuki, Toshiya (鈴木俊哉) 53be6e9b1b ftmac.c counts supported faces only 2005-12-23 12:22:46 +00:00
Werner Lemberg b79b513380 Formatting, improving comments. 2005-12-20 12:01:58 +00:00
Wu, Chia-I (吳佳一) dcb8b7103f * include/freetype/internal/ftobjs.h (ft_glyphslot_grid_fit_metrics),
src/base/ftobjs.c (ft_glyphslot_grid_fit_metrics): Removed.

* src/base/ftobjs.c (ft_recompute_scaled_metrics): Do not round.

* src/cff/cffgload.c (cff_slot_load), src/cid/cidgload.c
(cid_slot_load_glyph), src/truetype/ttgload.c (compute_glyph_metrics),
src/type1/t1gload.c (T1_Load_Glyph): Do not round glyph metrics.

* doc/CHANGES: Mention the changes.
2005-12-16 14:27:14 +00:00
Werner Lemberg b5d88e8e0c * docs/CHANGES: Document latest charmap code changes. 2005-11-30 08:55:51 +00:00
Werner Lemberg b797fdb513 * docs/CHANGES: Document ftdump's `-v' option. 2005-11-30 08:48:32 +00:00
Werner Lemberg 6c99045972 * src/sfnt/ttload.c (tt_face_load_metrics): Ignore excess number
of metrics instead of aborting.  Patch suggested by Derek Noonburg.

* src/cff/cffgload.c (cff_slot_load), src/cid/cidgload.c
(cid_slot_load_glyph), src/type1/t1gload.c (T1_Load_Glyph): Scale
the glyph properly if no hinter is available.

* docs/CHANGES: Mention scaling bug.
2005-11-18 21:10:59 +00:00
Werner Lemberg cfc0cf2e78 Add vertical metrics support to OpenType CFF outlines. Based on a
patch from Mike Moening <MikeM@RetekSolutions.com>

* src/cff/cffgload.c (cff_face_get_vertical_metrics): New function.
(cff_slot_load): Use cff_face_get_vertical_metrics.

* docs/CHANGES: Updated.
2005-11-17 08:12:00 +00:00
Werner Lemberg 7734a1f720 Add FT_FACE_FLAG_HINTER to indicate that a specific font driver has
a hinting engine of its own.

* include/freetype/freetype.h (FT_FACE_FLAG_HINTER): New macro.

* src/cff/cffobjs.c (cff_face_init), src/cid/cidobjs.c
(cid_face_init), src/truetype/ttobjs.c (tt_face_init)
[TT_CONFIG_OPTION_BYTECODE_INTERPRETER], src/type1/t1objs.c
(T1_Face_Init), src/type42/t42objs.c (T42_Face_Init)
[TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Update face flags.

* docs/CHANGES: Document it.
2005-10-05 15:18:29 +00:00
Werner Lemberg b3feb80e02 * docs/CHANGES: Mention SING Glyphlet support.
Other minor doc fixes and CRLF issues.
2005-09-23 07:40:28 +00:00
Werner Lemberg 7e25c688de * src/sfnt/sfobjs.c (sfnt_load_face): Reactivate code to set
FT_FACE_FLAG_KERNING which has been commented out erroneously.

* docs/CHANGES: Document it.
2005-09-09 18:00:06 +00:00
Werner Lemberg 169a6d8a04 * docs/CHANGES: Mention gxvalid module.
Formatting and other minor changes.
2005-08-25 06:00:55 +00:00
Werner Lemberg 2752bd1a46 * src/truetype/ttgload.c (TT_Load_Glyph): Only translate outline
to (0,0) if bit 1 of the `head' table isn't set.  This improves
rendering of buggy fonts.
2005-08-22 07:11:31 +00:00
Werner Lemberg 7b33dca43c Formatting. 2005-06-23 20:31:48 +00:00
Wu, Chia-I (吳佳一) 87f9bfc4ea Add an entry about rewritten of `ftview' and `ftstring' 2005-06-22 03:56:14 +00:00
Werner Lemberg 49f4d34ed3 * 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.
2005-06-16 19:07:08 +00:00
Werner Lemberg 56c368c47e * Add copyright notices to all files which don't have one.
* docs/license.txt: Renamed to...
* docs/LICENSE.TXT: This.
* docs/FTL.txt: Renamed to...
* docs/FTL.TXT: This.
* docs/GPL.txt: Renamed to...
* docs/GPL.TXT: This.

* docs/PATENTS: Slightly reworded.  Suggested by Sylvain Beucler
<beuc@gnu.org>.
2005-06-04 23:00:25 +00:00
Werner Lemberg 82b71922f9 Mention that the otvalid module might be moved to another library. 2005-06-02 07:12:05 +00:00
Werner Lemberg afb2ba5756 * 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.
2005-05-25 05:51:01 +00:00
Werner Lemberg b9ee7370f6 * docs/CHANGES: Updated.
* src/base/ftbitmap.c: Don't include FT_FREETYPE_H and FT_IMAGE_H
but FT_BITMAP_H.
(FT_Bitmap_Copy): New function (from ftglyph.c).

* include/freetype/ftbitmap.h (FT_Bitmap_Copy): New public
definition.

* src/base/ftglyph.c: Include FT_BITMAP_H.
(ft_bitmap_copy): Move to ftbitmap.c.
(ft_bitmap_glyph_init): Remove `memory' variable.
Create new bitmap object if FT_GLYPH_OWN_BITMAP isn't set.
(ft_bitmap_glyph_copy): Use FT_Bitmap_Copy.
(ft_bitmap_glyph_done): Use FT_Bitmap_Done.
(ft_outline_glyph_init): Use FT_Outline_Copy.

* src/base/ftoutln.c (FT_Outline_Copy): Handle source == target.
(FT_Outline_Done_Internal): Check for valid `memory' pointer.
(FT_Outline_Translate, FT_Outline_Reverse, FT_Outline_Render,
FT_Outline_Transform): Check for valid `outline' pointer.

* src/base/ftobjs.c (FT_New_GlyphSlot): Prepend glyph slot to
face->glyph, otherwise a new second glyph slot cannot be created.
(FT_Done_GlyphSlot): Fix memory leak.
(FT_Open_Face): Updated -- face->glyph is already managed by
FT_New_GlyphSlot.

* src/type42/t42objs.c (T42_GlyphSlot_Done): Updated.
2005-05-20 21:52:19 +00:00
Werner Lemberg e623bfa8e2 typo 2005-05-19 13:51:26 +00:00
Werner Lemberg f9fccbee8b * src/raster/ftmisc.h: New file. Only needed if ftraster.c is
compiled as stand-alone.

* src/raster/ftraster.c: Add comment how to compile as stand-alone.
s/FT_CONFIG_OPTION_STATIC_RASTER/FT_STATIC_RASTER/.
s/TT_STATIC_RASTER/FT_STATIC_RASTER/.
[_STANDALONE_]: Include ftimage.h and ftmisc.h.
(FT_TRACE1, FT_TRACE6, ft_memset, FT_MEM_ZERO): Define
conditionally.
(Render_Glyph, Render_Gray_Glyph): Return Raster_Err_None (or
Raster_Err_Unsupported).
(ft_black_new) [_STANDALONE_]: Fix type of `the_raster'.
(ft_black_init, ft_black_reset, ft_black_set_mode, ft_black_render):
Use `ras', not `raster'.
(ft_black_done): Use FT_UNUSED_RASTER.
(Horizontal_Sweep_Init, Horizontal_Sweep_Step,
Horizontal_Gray_Sweep_Span): Use FT_UNUSED_RASTER.


* docs/CHANGES: Updated.
2005-05-19 07:20:24 +00:00
Werner Lemberg a76108ba0b * docs/CHANGES, include/freetype/freetype.h: Improve documentation
of FT_Set_Pixel_Sizes and FT_Set_Char_Size.
2005-04-03 20:11:42 +00:00
Werner Lemberg a37745bad4 * docs/CHANGES, docs/INSTALL.ANY: Updated.
* include/freetype/ftmoderr.h: Replace `Autohint' with `Autofit'.
Add `OTvalid'.

* src/autofit/aferrors.h: New file.

* src/autofit/afglobal.c, src/autofit/afhints.c,
src/autofit/aflatin.c, src/autofit/afloader.c: s/FT_Err_/AF_Err_/.
Include aferrors.h.

* src/autofit/rules.mk (AUTOF_DRV_H): Include aferrors.h.

* src/otvalid/otverror.h: s/FT_Mod_Err_OTV/FT_Mod_Err_OTvalid/.
2005-03-23 16:45:24 +00:00
Werner Lemberg ebf5585dd0 Formatting. 2005-03-16 01:49:54 +00:00
David Turner 58609c40c8 * docs/CHANGES: updating
* src/type1/t1parse.c (T1_New_Parser), src/type42/t42parse.c
    (t42_parser_init): modifying functions to check the font header before
    allocating anything on the heap.

    * internal/freetype/ftmemory.h: introducing the new macros FT_ARRAY_MAX
    and FT_ARRAY_CHECK

    * src/pcf/pcfread.c, src/pcf/pcfutil.c: minor fixes and simplifications.
    try to protect the PCF driver from doing stupid things with broken fonts.
2005-03-15 23:31:48 +00:00
Werner Lemberg c9114b9926 * builds/unix/freetype-config.in: Add new flag `--ftversion' to
return the FreeType version.  Suggested by George Williams
<gww@silcom.com>.


* docs/CHANGES: Updated.


* src/otvalid/otvmod.c (otv_validate): Deallocate arrays in case
of error.  Reported by YAMANO-UCHI Hidetoshi <mer@din.or.jp>.


* src/psaux/t1decode.c (t1_decoder_parse_charstrings)
<op_closepath>: Accept `T1_Parse_Have_Moveto' state also which can
happen in empty glyphs.  Reported by Ian Brown
<ian.brown@printsoft.de>.
2005-02-10 08:18:27 +00:00
Werner Lemberg f2438e1da9 * src/base/ftbitmap.c, include/freetype/ftbitmap.h: New files for
handling various bitmap formats.

* include/freetype/config/ftheader.h (FT_BITMAP_H): New macro.

* src/base/rules.mk (BASE_EXT_SRC): Add ftbitmap.c.

* src/bdf/bdfdrivr.c (BDF_Glyph_Load): Don't convert bitmaps to 8bpp
but return them as-is.

* docs/CHANGES: Mention new bitmap API.
* include/freetype/ftchapter.s: Updated.
2004-12-14 16:01:29 +00:00
Werner Lemberg 4d1550e4e3 Improve CHANGES entry. 2004-11-19 14:12:48 +00:00
Werner Lemberg b9ff415dfb Fix a serious bug in the TT hinter.
* src/truetype/ttgload.c (TT_Process_Simple_Glyph): Don't shift
points vertically before hinting.

* docs/CHANGES: Updated.

* src/cache/ftcglyph.c (FTC_GNode_UnselectFamily,
FTC_GCache_Lookup): A new try to fix comparison with zero.
2004-11-19 10:35:52 +00:00
Werner Lemberg 33febc0fb2 * docs/CHANGES: Updated.
Fix handling of NPUSHW if skipped in data stream.

* src/truetype/ttinterp.c (opcode_length): Set value for NPUSHW
to -2.
(SkipCode, TT_RunIns): Use opcode_length value for computation of
bytes to be skipped.
2004-10-09 07:07:43 +00:00
Werner Lemberg ee95b6f0d4 Adding OpenType validation module. The code is based on the
(unfinished) `otlayout' module but has been heavily modified to make
it much more compact.

* src/otvalid/*: New module.

* include/freetype/ftotval.h, src/base/ftotval.c,
include/freetype/internal/services/svotval.h: New files.

* include/freetype/config/ftmodule.h: Add otv_module_class.
* include/freetype/config/ftheader.h (FT_OPENTYPE_VALIDATE_H): New
macro.
* include/freetype/internal/ftserv.h
(FT_SERVICE_OPENTYPE_VALIDATE_H): New macro.
* include/freetype/internal/fttrace.h (otvmodule, otvcommon,
otvbase, otvgdef, otvgpos, otvgsub, otvjstf): New trace components.

* include/freetype/ftchapters.h: Updated.

* src/base/Jamfile (Library), src/base/descrip.mms (OBJS),
src/base/rules.mk (BASE_EXT_SRC): Updated.

* docs/CHANGES: Updated.
2004-09-10 14:39:00 +00:00
Werner Lemberg 17439423f8 * src/base/ftstream.c (FT_Stream_Close): Don't reset stream->close
to NULL.  This allows custom close functions to delete the FT_STREAM
object.


Add API to get information about SFNT tables.

* include/freetype/internal/services/svsfnt.h
(FT_SFNT_Table_Info_Func): New typedef.
(SFNT_Table): Add it.

* src/base/ftobjs (FT_Sfnt_Table_Info): New function.

* include/freetype/tttables.h: Updated.

* src/sfnt/sfdriver.c (sfnt_table_info): New function.
(sfnt_service_sfnt_table): Add it.

* docs/CHANGES: Updated.


* include/freetype/freetype.h (FREETYPE_PATCH): Set to 10.

* builds/unix/configure.ac (version_info): Set to 9:8:3.
* builds/unix/configure: Updated.

* 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.8/2.1.9/.

* docs/CHANGES, docs/VERSION.DLL: Updated.


* src/base/ftrfork.c (FT_Raccess_Guess)
[!FT_CONFIG_OPTION_GUESSING_EMBEDDED_FORK]: Remove compiler
warnings.
2004-08-11 05:25:37 +00:00
Werner Lemberg d232f59383 * docs/CHANGES: Updated.
FreeType now can read kerning values from PFM files.

* src/type1/t1afm.c (T1_Done_AFM): Renamed to...
(T1_Done_Metrics): This.
Update all callers.
(T1_Read_AFM): Make it static.
Don't enter and leave a frame.
(LITTLE_ENDIAN_USHORT, LITTLE_ENDIAN_UINT): New macros.
(T1_Read_PFM): New function.
(T1_Read_Metrics): New higher-level function to be used instead of
T1Read_AFM.
Update all callers.
2004-08-02 05:38:33 +00:00
Werner Lemberg 43f0e26c8e * docs/CHANGES: Updated.
* src/base/ftstroke.c (FT_Stroker_ParseOutline): Fix compiler
warning.
2004-07-17 16:45:21 +00:00
Werner Lemberg 8ef4183690 * src/bdf/bdfdrivr.h (BDF_FaceRec): New element `default_glyph'.
* src/bdf/bdflib.c (_bdf_add_property, _bdf_parse_start),
src/bdf/bdf.h (bdf_font_t): s/default_glyph/default_char/.

* src/bdf/bdfdrivr.c (BDF_Face_Init): Fix number of glyphs.
Set `default_glyph'.
(BDF_Glyph_Load): Use `default_glyph' for undefined glyph.

* docs/CHANGES: Updated.
2004-06-22 12:28:17 +00:00
Werner Lemberg 11785f56e5 * docs/CHANGES: Updated. 2004-06-21 23:32:31 +00:00
Werner Lemberg fefd874292 * docs/CHANGES: Updated.
Minor clean-ups.
2004-06-12 13:21:20 +00:00
Werner Lemberg 7d62f526fe * docs/CHANGES: Updated.
Improve inter-letter spacing for autohinted glyphs.

* include/freetype/freetype.h (FT_Glyph_Metrics): Add elements
`lsb_delta' and `rsb_delta'.

* src/autohint/ahhint.c (ah_hinter_load): Set `lsb_delta' and
`rsb_delta' in slot->metrics.
2004-06-04 22:30:10 +00:00
Werner Lemberg eab92f1c48 * docs/formats.txt: New file.
* docs/CHANGES: Updated.
2004-04-29 05:59:49 +00:00
Werner Lemberg cdb6e70a36 * src/truetype/ttgxvar.c (ft_var_apply_tuple): Fix typo.
* src/truetype/Jamfile, docs/CHANGES: Updated.
2004-04-26 08:09:30 +00:00
Werner Lemberg e95365b291 * include/freetype/ftcache.h (FT_Get_CharMap_Index): Rename
declaration and move to...
* include/freetype/freetype.h (FT_Get_Charmap_Index): Here.
(FREETYPE_PATCH): Set to 9.

* src/base/ftobjs.c (FT_Get_Charmap_Index): New function.

* builds/unix/configure.ac (version_info): Set to 9:7:3.
* builds/unix/configure: Updated.

* builds/win32/visualc/index.html,
builds/win32/visualc/freetype.dsp,
builds/win32/visualc/freetype.vcproj: s/218/219/.

* builds/freetype.mk (refdoc), README, Jamfile (RefDoc):
s/2.1.8/2.1.9/.

* docs/CHANGES, docs/VERSION.DLL: Updated.
2004-04-24 14:43:37 +00:00
Werner Lemberg c78df1ef6e * src/psaux/psobjs.c (T1Radix): Renamed to...
(ps_radix): This.
Update current cursor position.

* docs/CHANGES: Updated.
2004-04-21 07:36:38 +00:00
Werner Lemberg ba80d61c7a * builds/unix/ftconfig.in, builds/vms/ftconfig.h: Define
FT_CHAR_BIT.

* src/base/ftobjs.c (FT_Load_Glyph): Don't apply autohinting if
glyph is vertically distorted or mirrored.

* src/cff/cffgload.c (cff_slot_load): Handle zero `size' properly
for embedded bitmaps.

* docs/CHANGES: Updated.
2004-04-16 09:56:30 +00:00
Werner Lemberg 2630e54d2a * src/sfnt/ttload.c (tt_face_load_sfnt_header): Reject face_index
values > 0 if loading non-TTC fonts.

* src/base/ftmac.c (open_face_from_buffer): Set positive face_index
to zero before calling FT_Open_Face.

* docs/CHANGES: Updated.
2004-03-20 14:26:38 +00:00
Werner Lemberg dfa46199d2 * Jamfile, vms_make.com, builds/win32/visualc/freetype.dsp,
builds/win32/visualc/freetype/vcproj, include/freetype/ftmoderr.h:
Add LZW module.

* Jamfile.in: Removed.

* docs/CHANGES: Updated.

* include/freetype/internal/ftobjs.h: s/MIN/FT_MIN/, s/MAX/FT_MAX/,
s/ABS/FT_ABS/.  Updated all callers.

* src/type1/t1load.c (parse_dict), src/pcf/pcfdrivr.c
(PCF_Face_Init): Use FT_ERROR_BASE.



Add support for PCF fonts compressed with LZW (extension .pcf.Z,
created with `compress').

* include/freetype/config/ftoption.h, devel/ftoption.h
(FT_CONFIG_OPTION_USE_LZW): New macro.

* include/freetype/ftlzw.h: New file.
* include/freetype/config/ftheader.h (FT_LZW_H): New macro for
ftlzw.h.

* src/lzw/*: New files.

* src/pcf/pcfdrivr.c: Include FT_LZW_H.
(PCF_Face_Init): Try LZW also.

* src/gzip/ftgzip.c: s/0/Gzip_Err_Ok/ where appropriate.
Beautify.
2004-03-05 09:26:24 +00:00
Werner Lemberg bfb712fb36 Add embedded bitmap support to CFF driver.
* src/cff/cffobjs.h (CFF_SizeRec): New structure.

* src/cff/cffgload.c (cff_builder_init): Updated.
(cff_slot_load): Updated.
[TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: Load sbit.

* src/cff/cffobjs.c (sbit_size_reset)
[TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: New function.
(cff_size_get_globals_funcs, cff_size_done, cff_size_init): Updated.
(cff_size_reset): Updated.
[TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: Call sbit_size_reset.

* src/cff/cffdrivr.c (Load_Glyph): Updated.
(cff_driver_class): Use CFF_SizeRec.

* docs/CHANGES: Updated.
2004-03-03 08:21:12 +00:00
Werner Lemberg e2455bad12 * docs/CHANGES: Updated.
Improve MacOS fond support.  Provide a new API
`FT_New_Face_From_FSSpec' similar to `FT_New_Face'.

* src/base/ftmac.c [__MWERKS__]: Include FSp_fpopen.h.
STREAM_FILE [__MWERKS__]: New macro.
(ft_FSp_stream_close, ft_FSp_stream_io) [__MWERKS__]: New functions.
(file_spec_from_path) [__MWERKS__]: Updated #if statement.
(get_file_type, make_lwfn_spec): Use `const' for argument.
(is_dfont) [TARGET_API_MAC_CARBON]: Removed.
(count_face_sfnt, count_faces): New functions.
(parse_fond): Do some range checking.
(read_lwfn): Change type of second argument.
No longer call FSpOpenResFile.
(OpenFileAsResource): New function.
(FT_New_Face_From_LWFN): Use `const' for second argument.
Use OpenFileAsResource.
(FT_New_Face_From_Suitcase): Change type of second argument.
No longer call FSpOpenResFile.
Loop over all resource indices.
(FT_New_Face_From_dfont) [TARGET_API_MAC_CARBON]: Removed.
(FT_GetFile_From_Mac_Name): Use `const' for first argument.
(ResourceForkSize): Removed.
(FT_New_Face): Updated to use new functions.
(FT_New_Face_From_FSSpec): New function.

* include/freetype/ftmac.h: Updated.
2004-02-26 21:56:27 +00:00
Werner Lemberg 675431bec1 * include/freetype/t1tables.h (PS_PrivateRec): Add
`expansion_factor'.

* src/pshinter/pshglob (psh_blues_scale_zones): Fix computation
of blues->no_overshoots -- `blues_scale' is stored with a
magnification of 1000, and `scale' returns fractional pixels.

* src/type1/t1load.c (T1_Open_Face): Initialize `blue_shift',
`blue_fuzz', `expansion_factor', and `blue_scale' according to the
Type 1 specification.

* src/type1/t1tokens.h: Handle `ExpansionFactor'.

* docs/CHANGES: Updated.
2004-02-25 21:17:49 +00:00
Werner Lemberg 460355a5ea * docs/CHANGES: Updated.
* include/freetype/internal/ftdebug.h: Include FT_FREETYPE_H.


Provide a simple API to control FreeType's tracing levels.

* include/freetype/internal/ftdebug.h (FT_Trace_Get_Count,
FT_Trace_Get_Name): New declarations.

* src/base/ftdebug.c (FT_Trace_Get_Count, FT_Trace_Get_Name): New
functions.
2004-02-24 07:52:45 +00:00
Werner Lemberg a5724ef813 * src/pshinter/pshrec.c (ps_mask_table_set_bits): Don't call
ps_mask_table_alloc but ps_mask_table_last.
(ps_hints_t2mask): Use correct position and number for vertical
and horizontal hinter mask bits.

* docs/CHANGES: Updated.
2004-02-21 16:47:20 +00:00
Werner Lemberg 53a1edd42b * builds/unix/configure.in: Call AC_SUBST for `enable_shared',
`hardcode_libdir_flag_spec', and `wl'.
* builds/unix/configure: Regenerated.

* builds/unix/freetype-config.in: Make --prefix and --exec-prefix
actually work.
Report a proper --rpath (or -R) value for --libs argument if a
shared library has been built.

* docs/CHANGES: Updated.
2004-02-08 22:45:48 +00:00
Werner Lemberg e0c5044fb8 * src/bdf/bdfdrivr.c (BDF_Face_Init, BDF_Set_Pixel_Size): Fix
computation of various vertical and horizontal metric values.

* src/pcfdrivr.c (PCF_Set_Pixel_Size), src/pcfread (pcf_load_font):
Ditto.
2004-02-08 16:30:37 +00:00
Werner Lemberg 9cef479d3b * builds/win32/visualc/index.html,
builds/win32/visualc/freetype.dsp,
builds/win32/visualc/freetype.dsw, docs/CHANGES: Updated.

* builds/win32/visualc/freetype.sln,
builds/win32/visualc/freetype.vcproj: New files for VS.NET 2003.
2004-02-08 09:07:08 +00:00
Werner Lemberg 5972e9abf8 * src/cff/cffgload.c (cff_operator_seac): Fix magnitude of
accent offset.
Update code similarly to the seac support for Type 1 fonts.
(cff_decoder_parse_charstrings) <cff_op_endchar>: Fix magnitude
of accent offset.
Don't hint glyphs twice if seac is emulated.
<cff_op_flex>: Assign correct point tags.
* docs/CHANGES: Updated.

* src/type1/t1parse.c (T1_Get_Private_Dict): Use FT_MEM_MOVE, not
FT_MEM_COPY, for copying the private dict.

* src/type1/t1load.c (parse_subrs): Assign number of subrs only
in first run.
(parse_charstrings): Parse /CharStrings in second run without
assigning values.
(parse_dict): Skip all /CharStrings arrays but the first.  We need
this for non-standard fonts like `Optima' which have different
outlines depending on the resolution.  Note that there is no
guarantee that we get fitting /Subrs and /CharStrings arrays; this
can only be done by a real PS interpreter.
2004-02-01 00:49:56 +00:00