Commit Graph

1578 Commits

Author SHA1 Message Date
Werner Lemberg 75ad4b8365 * src/base/ftglyph.c (FT_Glyph_To_Bitmap): Activate code for
handling `origin'.
2003-05-28 06:10:57 +00:00
Werner Lemberg 4919dc7cf8 * src/pshinter/pshalgo3.c (psh3_glyph_compute_extrema): Skip
contours with only a single point to avoid segfault.

* src/autohint/ahtypes.h (AH_OPTION_NO_STRONG_INTERPOLATION):
Removed since unused.
2003-05-28 05:52:05 +00:00
Werner Lemberg f79a7ae0b0 * src/gzip/ftgzip.c (ft_gzip_fil_io): Revert change from yesterday;
it has already been fixed differently.

* src/truetype/ttinterp.c (DO_SFVTL): Add missing braces around
if-clause.
2003-05-21 21:47:25 +00:00
Werner Lemberg 282637f6a5 * include/freetype/config/ftstdlib.h (ft_strcat): New wrapper macro
for strcat.

* src/base/ftmac.c (create_lwfn_name): s/isupper/ft_isupper/.
(parse_font): s/memcpy/ft_memcpy/.
(is_dfont) [TARGET_API_MAC_CARBON]: s/memcmp/ft_memcmp/.
* src/base/ftobjs.c (load_mac_face) [FT_MACINTOSH]:
s/strlen/ft_strlen/.
s/strcat/ft_strcat/.
s/strcpy/ft_strcpy/.
* src/gzip/zutil.h: s/memset/ft_memset/.
s/memcmp/ft_memcmp/.

* src/bdf/bdfdrivr.c (BDF_Face_Init), src/pcf/pcfdriver.c
(PCF_Face_Init): Test for charset registry case-insensitively.

* t1load.c (parse_blend_axis_types): Fix compiler warning.

* descrip.mms: Removed.  Now created by...

* vms_make.com: New file.
2003-05-21 07:39:42 +00:00
Werner Lemberg 77c34b8264 * t1load.c (parse_blend_axis_types): Fix compiler warning.
* src/gzip/ftgzip.c (ft_gzip_file_io): Avoid zero value of `delta'
to prevent infinite loop.

* docs/VERSION.DLL: Provide better autoconf snippet to check
FreeType version.

* src/base/ftobjs.c (open_face): Free `internal' not
`face->internal' in case of error to avoid possible segfault.

* src/pshinter/pshalgo3.c (ps3_hints_apply): Check whether we
actually have an outline.
2003-05-20 22:06:38 +00:00
Werner Lemberg 6bd1c6d293 * src/pshinter/pshalgo3.c (ps3_hints_apply): Try to optimize
y_scale so that the top of non-capital letters is aligned on a pixel
boundary whenever possible.

* src/autohint/ahhint.c (ah_hint_edges): Make sure that lowercase
m's maintain their symmetry.
2003-05-20 05:01:49 +00:00
Werner Lemberg 98ceccab51 * src/autohint/ahhint.c (ah_hinter_load_glyph): Oops! David's
patch from yesterday has been resolved already in a different
way.  Reverted.
2003-05-20 04:32:54 +00:00
Werner Lemberg 11367bcce7 * src/autohint/ahhint.c (ah_hinter_load_glyph): Don't scale
y_scale locally but face->size->metrics.y_scale.
2003-05-19 21:42:08 +00:00
Werner Lemberg c98501b042 Add comment to #ifdef section in #ifndef. 2003-05-19 20:34:42 +00:00
Werner Lemberg f379f43403 * src/sfnt/ttcmap0.c (tt_cmap4_char_next): Select proper start
value for `hi' to avoid infinite loop.
2003-05-19 12:45:28 +00:00
Werner Lemberg 51daa4feb1 * src/raster/ftraster.c (Insert_Y_Turn): Fix overflow test.
* include/freetype/config/ftoption.h [FT_CONFIG_OPTION_MAC_FONTS]:
New macro.
* src/base/ftobjs.c: Use it to control mac font support on non-mac
platforms.

Implement partial support of Mac fonts on non-Mac platforms.

* src/base/ftobjs.c (memory_stream_close, new_memory_stream,
open_face_from_buffer, Mac_Read_POST_Resource,
Mac_Read_sfnt_Resource, IsMacResource, IsMacBinary, load_mac_face)
[!FT_MACINTOSH]: New functions.
(FT_Open_Face) [!FT_MACINTOSH]: Use load_mac_face.

* src/base/ftobjs.c (FT_Load_Glyph): Scale linear advance width only
if FT_FACE_FLAG_SCALABLE is set (otherwise we have a division by
zero since FNT and friends don't define `face->units_per_EM').
2003-05-18 22:40:11 +00:00
Werner Lemberg 4f107450e2 * src/base/fttrigon.c (FT_Vector_Rotate): Avoid rounding errors
for small values.

* src/autohint/ahtypes.h (AH_PointRec): Remove unused `in_angle'
and `out_angle' fields.
2003-05-17 12:07:45 +00:00
Werner Lemberg c70818a862 * src/base/ftmac.c (FT_New_Face_From_SFNT): Handle CFF files also.
* include/freetype/freetype.h: Fix typo in comment
(FT_HAS_FIXED_SIZES).
2003-05-15 06:44:09 +00:00
Werner Lemberg 6eb116ef8a * builds/unix/aclocal.m4: Comment out definition of
`allow_undefined_flag' for Darwin 1.3.
* builds/unix/configure.ac: Add option --with-old-mac-fonts.
* builds/unix/ltmain.sh: Fix version numbering for Darwin 1.3.
* builds/unix/configure: Regenerated.

* include/freetype/config/ftconfig.h: Fix conditions for defining
`FT_MACINTOSH'.
* src/base/ftbase.c: Include `ftmac.c' conditionally.
* src/base/ftmac.c: Handle __GNUC__.
2003-05-11 07:12:26 +00:00
Werner Lemberg 1f8f46758e * src/cid/cidload.c (is_alpha): Removed.
(cid_parse_dict): Use `cid_parser_skip_alpha' instead of `is_alpha'.

* src/autohint/ahoptim.c, src/autohint/ahoptim.h: Obsolete, removed.
2003-05-07 10:39:45 +00:00
Werner Lemberg bf40e92dea * src/autohint/ahglyph.c (ah_setup_uv): Exchange `for' loop and
`switch' statement to make it run faster.
(ah_outline_compute_segments): Reset `segment->score' and
`segment->link'.
(ah_outline_link_segments): Provide alternative code which does
the same but runs much faster.
Handle major direction also.
(ah_outline_compute_edges): Scale `edge_distance_threshold' down
after rounding instead of scaling comparison value in loop.

* src/autohint/ahhint.c (ah_hinter_align_stong_points): Provide
alternative code which runs faster.
Handle `before->scale == 0'.

* src/autohint/ahtypes.h (AH_SegmentRec): Move some fields down.
(AH_EdgeRec): Move some fields in structure.
New field `scale'.

* src/sfnt/ttcmap0.c (tt_cmap4_char_next): Use binary search.
2003-05-07 10:21:13 +00:00
Werner Lemberg 110fc56bea * src/autohint/ahoptim.c (LOG): Renamed to...
(AH_OPTIM_LOG): This.
(AH_Dump_Springs): Fix log message format.

* src/autohint/ahhint.c (ah_hint_edges_3): Renamed to...
(ah_hint_edges): This.
2003-05-03 20:13:48 +00:00
Werner Lemberg c6f1c10222 Minor improvements. 2003-05-03 04:47:02 +00:00
Werner Lemberg 0fdb9cc5e2 * src/bdf/bdfdrivr.c (BDF_Set_Pixel_Size): Initialize `max_advance'. 2003-05-02 18:52:17 +00:00
Werner Lemberg a547a532a1 * src/autohint/ahglyph.c (ah_test_extrema): Renamed to...
(ah_test_extremum): This.
2003-05-02 15:16:13 +00:00
Werner Lemberg a3f4da8e99 Minor cleanups. 2003-04-29 13:23:47 +00:00
Werner Lemberg 3a317c69d6 * builds/unix/configure.ac: Generate `freetype.pc' from
`freetype.in'.
* builds/unix/configure: Regenerated.
* builds/unix/install.mk (install, uninstall): Handle `freetype.pc'.

* builds/unix/freetype2.in: New file.  Contains building information
for the `pkg-config' package.
2003-04-28 09:43:32 +00:00
Werner Lemberg 2cba64d30d * src/base/ftobjs.c (FT_Load_Glyph): Fix boundary check for
`glyph_index'.
2003-04-28 08:51:07 +00:00
Graham Asher 9f36499fa7 Added comment for checkin of unpatented hinting system. 2003-04-25 11:43:07 +00:00
Graham Asher 3ea859f6e9 Added the unpatented hinting system, which is compiled only if
TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING is defined
in ftoption.h
2003-04-25 11:40:46 +00:00
Graham Asher 0798f0c3ec If unpatented hinting is compiled the TrueType face object acquires a
new element, "FT_Bool unpatented_hinting".
2003-04-25 11:36:44 +00:00
Graham Asher 33671d74a2 Added configuration macros (not defined, but in comments) for the
unpatented hinting system.
2003-04-25 11:34:18 +00:00
Graham Asher e32c22371d Added macro FT_UNPATENTED_H to use when including new header
ttunpat.h.
2003-04-25 11:32:39 +00:00
Graham Asher 697885b58c Added header file ttunpat.h defining
FT_PARAM_TAG_UNPATENTED_HINTING.
2003-04-25 11:30:07 +00:00
Werner Lemberg 428c2e4f62 * src/bdf/bdflib.c (hash_bucket, hash_lookup): Use `const' for first
argument.
(bdf_get_font_property): Use `const' for third argument.
Updated all callers.
* src/bdf/bdfdrivr.c (BDF_Face_Init): Set pixel width and height
similar to the PCF driver.
* src/bdf/bdf.h (_hashnode): Use `const' for `key'.
Updated.

* src/gzip/ftgzip.c: C++ doesn't like that the array `inflate_mask'
is declared twice.  It is perhaps better to modify the zlip source
files directly instead of this hack.
(zcalloc, zfree, ft_gzip_stream_close, ft_gzip_stream_io): Add casts
to make build with g++ successful.
2003-04-25 05:35:04 +00:00
David Turner 2dd1e657ba * src/pcf/pcfread.c (pcf_load_font): fixed the computation of
face->num_glyphs, this required increase the value by 1 to respect
        the convention that gindex 0 always corresponds to the "missing
        glyph".
2003-04-24 21:12:18 +00:00
Werner Lemberg 3704aa4525 * builds/unix/unix-cc.in (CFLAGS): Add @CPPFLAGS@. 2003-04-24 06:07:20 +00:00
Werner Lemberg 60f52ce6d6 * builds/unix/freetype-config.in (cflags): Emit FreeType 2's include
files first.  Otherwise there are conflicts with FreeType 1
installed simultaneously.
2003-04-24 05:45:59 +00:00
Werner Lemberg 319c00d7d6 Fixing bugs reported by Nelson Beebe.
* src/base/ftstroker.c (FT_Stroker_ParseOutline): Remove unused
variable `in_path'.

* src/base/ftobjs (ft_glyphslot_set_bitmap): Change type of
second argument to `FT_Byte*'.
* include/freetype/internal/ftobjs.h: Updated.

* src/bdf/bdflib.c (_bdf_readstream): Remove unused variable `res'.
(_bdf_parse_glyphs): Remove unused variable `next'.
Mark `call_data' as unused.

* src/cache/ftlru.c (FT_LruList_Lookup): Remove unused variable
`plast'.

* src/pcf/pcfread.c (pcf_seek_to_table_type): Slight recoding to
actually use `error'.
(pcf_load_font): Remove unused variable `avgw'.

* src/pfr/pfrobjs.c (pfr_face_get_kerning): Change return type
to `void'.
Mark `error' as unused.
* src/pfr/pfrobjs.h: Updated.
* src/pfr/pfrdrivr.c (pfr_get_kerning): Updated.

* src/sfnt/ttload.c (sfnt_dir_check): Remove unused variable
`format_tag'.

* src/sfnt/ttcmap0.c (tt_cmap6_validate, tt_cmap10_validate): Remove
unused variable `start'.
(tt_cmap10_char_next): Remove unused variable `result'

* src/sfnt/sfobjs.c (tt_face_get_name): Mark `error' as unused.

* src/sfnt/sfdriver.c (get_sfnt_postscript_name): Mark `error' as
unused.

* src/type1/t1objs.c (T1_Face_Init): Remove unused variable
`pshinter'.

* src/type1/t1gload.c (T1_Load_Glyph): Use `glyph_data_loaded'
only for FT_CONFIG_OPTION_INCREMENTAL.
2003-04-23 19:48:24 +00:00
Werner Lemberg 13c4a4f171 * src/sfnt/ttcmap0.c (tt_cmap4_validate): Provide a weak variant
of the glyph ID bounding check if FT_VALIDATE_TIGHT is not active.
Without this change, many CJK fonts from Dynalab are rejected.
2003-04-23 18:21:48 +00:00
Werner Lemberg 8b61525b9a * src/base/ftbdf.c (FT_Get_BDF_Property): Check for valid
`get_interface'.
2003-04-23 18:14:51 +00:00
Werner Lemberg fcc5c9115f * src/base/ftmac.c (parse_fond): Fix handling of style names. 2003-04-23 18:10:19 +00:00
Werner Lemberg b442ca1713 Cleanups. 2003-04-23 15:50:27 +00:00
Werner Lemberg 5e6b9edc89 Cleanups. 2003-04-23 15:34:52 +00:00
Werner Lemberg bb3105e256 Cleanups. 2003-04-23 15:17:43 +00:00
Werner Lemberg 9ed254f6b9 Cleanups. 2003-04-23 14:32:58 +00:00
Werner Lemberg 2e57343f90 * src/pfr/pfrload.c (pfr_extra_item_load_font_id): Use FT_PtrDist
instead of FT_Uint for `len'.

Cleanups.
2003-04-23 14:14:06 +00:00
Werner Lemberg 004615e3d0 Cleanups. 2003-04-23 13:17:40 +00:00
Werner Lemberg 917a593780 * src/gzip/ftgzip.c (zcalloc) [!FT_CONFIG_OPTION_SYSTEM_ZLIB]:
Convert K&R format to modern C usage.
(FT_Stream_OpenGzip): Use long constant.

Cleanups.
2003-04-23 07:13:54 +00:00
Werner Lemberg 2acb963baf Cleanups. 2003-04-23 06:47:12 +00:00
Werner Lemberg 9a8898810d * src/cache/ftccache.c (ftc_cache_lookup): Remove shadow declaration
of `manager'.
2003-04-23 06:36:46 +00:00
Werner Lemberg 2d117ea531 Cleanups. 2003-04-23 06:32:41 +00:00
Werner Lemberg 7dc281c88d Cleanups. 2003-04-23 06:07:27 +00:00
Werner Lemberg c8c6bf5c63 Cleanups; adding some copyrights; formatting. 2003-04-23 05:38:13 +00:00
Werner Lemberg 3ae7cc997a Cleanups. 2003-04-22 07:49:24 +00:00