Commit Graph

407 Commits

Author SHA1 Message Date
Werner Lemberg 7227114043 Fix B/W rasterization of subglyphs with different drop-out modes.
Normally, the SCANMODE instruction (if present) to set the drop-out
mode in a TrueType font is located in the `prep' table only and thus
valid for all glyphs.  However, there are fonts like `pala.ttf'
which additionally contain this instruction in the hinting code of
some glyphs (but not all).  As a result it can happen that a
composite glyph needs multiple drop-out modes for its subglyphs
since the rendering state gets reset for each subglyph.

FreeType collects the hinted outlines from all subglyphs, then it
sends the data to the rasterizer.  It also sends the drop-out mode
-- after hinting has been applied -- and here is the error: It sends
the drop-out mode of the last subglyph only; drop-out modes of all
other subglyphs are lost.

This patch fixes the problem; it adds a second, alternative
mechanism to pass the drop-out mode: For each contour, the
rasterizer now checks the first `tags' array element.  If bit 2 is
set, bits 5-7 contain the contour's drop-out mode, overriding the
global drop-out mode.

* include/freetype/ftimage.h (FT_CURVE_TAG_HAS_SCANMODE): New macro.

* src/truetype/ttgload.c (TT_Hint_Glyph): Store drop-out mode in
`tags[0]'.

* src/raster/ftraster.c (Flow_Up, Overshoot_Top, Overshoot_Bottom):
Use bits 3-5 instead of 0-2.
(New_Profile): Set the drop-out mode in the profile's `flags' field.
(Decompose_Curve): Check `tags[0]' and set `dropOutControl' if
necessary.
(Vertical_Sweep_Drop, Horizontal_Sweep_Drop,
Horizontal_Gray_Sweep_Drop, Draw_Sweep): Use the profile's drop-out
mode.
2009-06-18 15:42:52 +02:00
Werner Lemberg 780d7e05e7 Minor simplification. 2009-06-17 06:45:20 +02:00
Werner Lemberg 1474f439b5 Really fix Savannah bug #25010: An SFNT font with neither outlines
nor bitmaps can be considered as containing space `glyphs' only.

* src/truetype/ttpload.c (tt_face_load_loca): Handle the case where
a `glyf' table is missing.

* src/truetype/ttgload.c (load_truetype_glyph): Abort if we have no
`glyf' table but a non-zero `loca' entry.
(tt_loader_init): Handle missing `glyf' table.

* src/base/ftobjs.c (FT_Load_Glyph): Undo change 2008-12-05.

* src/sfnt/sfobjs.c (sfnt_load_face): A font with neither outlines
nor bitmaps is scalable.
2008-12-09 06:51:56 +00:00
Werner Lemberg 35ae574a51 Add casts for stupid compilers. Reported by Graham. 2008-10-02 10:40:52 +00:00
David Turner 28534d616b * include/freetype/ftadvanc.h, src/base/ftadvanc.c,
include/freetype/config/ftheader.h, include/freetype/freetype.h,
    src/base/Jamfile, src/base/rules.mk, src/cff/cffdrivr.c,
    src/cff/cffgload.c, src/cff/cffgload.h, src/truetype/ttdriver.c,
    src/truetype/ttgload.h, src/truetype/ttgload.c, src/type1/t1driver.c,
    src/type1/t1gload.h, src/type1/t1gload.c:
    Add a new header named FT_ADVANCES_H declaring some new APIs
    to extract the advances of one or more glyphs without necessarily
    loading their outlines. Also provide 'fast loaders' for the
    TrueType, Type1 and CFF font drivers (more to come later)

    * autogen.sh: add checks for minimum version of the 'autotools'
    stuff.
2008-09-01 21:35:21 +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 5df5dbb722 Enable access to the various dropout rules of the B&W rasterizer.
Pass dropout rules from the TT bytecode interpreter to the
rasterizer; temporarily this is enabled only if
`USE_SCAN_CONVERSION_RULES' is defined.

* include/freetype/ftimage.h (FT_OUTLINE_SMART_DROPOUTS,
FT_OUTLINE_EXCLUDE_STUBS): New flags for for FT_Outline.

* src/raster/ftraster.c (Vertical_Sweep_Drop, Horizontal_Sweep_Drop,
Horizontal_Gray_Sweep_Drop): Use same mode numbers as given in the
OpenType specification.
Fix mode 4 computation.
(Render_Glyph, Render_Gray_Glyph): Handle new outline flags.

* src/truetype/ttgload.c (TT_Load_Glyph)
[USE_SCAN_CONVERSION_RULES]: Convert scan conversion mode to
FT_OUTLINE_XXX flags.

* src/truetype/ttinterp.c (Ins_SCANCTRL): Enable ppem check.
2008-06-22 13:40:08 +00:00
Werner Lemberg 0c52faa9db add missing casting 2008-05-25 20:04:56 +00:00
Werner Lemberg 57a94c4863 whitespace 2008-05-25 16:49:29 +00:00
Werner Lemberg ffa496574a * src/truetype/ttgload.c (load_truetype_glyph): Move initialization
of the graphics state for subglyphs to...
(TT_Hint_Glyph): This function.
Hinting instructions for a composite glyph apparently refer to the
just hinted subglyphs, not the unhinted, unscaled outline.  This
seems to fix Savannah bugs #20973 and (at least partially) #23310.
2008-05-25 12:43:57 +00:00
Werner Lemberg 89d64fa6e3 * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Handle zero-contour
glyphs correctly.  Patch from Savannah bug #23277.
2008-05-17 20:06:13 +00:00
Werner Lemberg bf391cb858 * src/truetype/ttgload.c (load_truetype_glyph): Handle the case
where the number of contours in a simple glyph is zero (and which
does contain an entry in the `glyf' table).  This fixes Savannah bug
#21990.
2008-01-10 08:47:08 +00:00
Werner Lemberg bd7e1c3ce0 Pass options from one configure script to another as-is (not
expanded).  This is needed for options like
--includedir='${prefix}/include'.

* builds/unix/detect.mk, configure: Prevent argument expansion in
call to the (real) `configure' script.



* src/truetype/ttgload.c (load_truetype_glyph): Fix compilation if
TT_USE_BYTECODE_INTERPRETER isn't defined.



There exist CFFs which contain opcodes for the Type 1 operators
`hsbw' and `closepath' which are both invalid in Type 2 charstrings.
However, it doesn't harm to support them.

* src/cff/cffgload.c (CFF_Operator): Add `cff_op_hsbw' and
`cff_op_closepath.'
(cff_argument_counts): Ditto.

(cff_decoder_parse_charstrings): Handle Type 1 opcodes 9 (closepath)
and 13 (hsbw) which are invalid in Type 2 charstrings.
2007-12-06 17:17:30 +00:00
Werner Lemberg d21fe6e5d6 Really restore changes introduced in revision 1.178. 2007-07-10 23:10:39 +00:00
Werner Lemberg 0f6f367ec1 Better maxComponentDepth test. 2007-07-04 19:57:45 +00:00
Werner Lemberg 3033f4366b * src/truetype/ttgload.c (load_truetype_glyph): Always allow a
recursion depth of 1.  This was the maximum value in TrueType 1.0,
and some older fonts don't set this field correctly.

* src/gxvalid/gxvmort1.c
(gxv_mort_subtable_type1_substTable_validate): Fix tracing message.
2007-07-04 14:12:19 +00:00
David Turner 0ba8991292 fix a small bug in the TrueType loader that created distortion in the result
of bytecode-hinted text. Werner, feel free to package 2.3.5 now :-)
2007-07-01 09:34:04 +00:00
David Turner 8f626b04f3 fix stupid typo that prevented the truetype loader from working correctly 2007-06-22 22:22:38 +00:00
Werner Lemberg e12ed563d6 * src/tools/ftrandom.c (font_size): New global variable.
(TestFace): Use it.
(main): Handle new option `--size' to set `font_size'.
(Usage): Updated.

Formatting.
2007-06-17 05:31:23 +00:00
David Turner 815911ae2a * src/truetype/ttgload.c (TT_Load_Simple_Glyph): check the well-formedness
of the contours array when loading a glyph

	* src/truetype/ttinterp.c (Ins_IP): check argument ranges to reject
	bogus operations properly
2007-06-16 17:07:20 +00:00
Werner Lemberg f6c120f826 * docs/CHANGES: Document FT_Face_CheckTrueTypePatents).
Formatting, reformulations.
2007-06-11 04:55:58 +00:00
David Turner 7fa30ee879 remove compiler warning 2007-06-11 00:55:23 +00:00
David Turner 5f5e544611 slight speed-up of the TrueType glyph loader 2007-06-11 00:18:00 +00:00
Werner Lemberg 6e2f9d5db7 Improve tracing messages. 2007-06-05 06:58:48 +00:00
Werner Lemberg 1c8980ef4a * docs/CHANGES: Updated.
Formatting.
2007-05-25 07:11:12 +00:00
David Turner 7890686d80 fix crash when not using the bytecode interpreter with TrueType fonts 2007-05-22 14:08:09 +00:00
Werner Lemberg 6f99c88801 * src/truetype/ttgload.c (load_truetype_glyph): Save graphics state
before handling subglyphs so that it can be reinitialized each time.
This fixes Savannah bug #19859.
2007-05-19 07:01:49 +00:00
Werner Lemberg d069246805 Oops! Incorrect application of a patch... 2007-05-16 15:48:02 +00:00
Werner Lemberg 607dec79bb * src/autofit/afcjk.c (af_cjk_hints_compute_edges): Remove unused
variable.
* src/autofit/afloader.c (af_loader_load_g): Ditto.

* src/base/ftobjs.c (ft_validator_error): Use `ft_jmp_buf'.
(open_face_from_buffer): Initialize `stream'.
(FT_Request_Metrics): Remove unused variable.
Remove redundant `break' statements.
(FT_Get_Track_Kerning): Remove unused variable.

* src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs,
afm_parse_kern_data): Remove redundant
`break' statements.
(afm_parser_parse): Ditto.
Don't use uninitialized variables.

* src/psnames/psmodule.c (VARIANT_BIT): Define as unsigned long.
Use `|' operator instead of `^' to set it.
Update all users.

* src/sfnt/ttcmap.c (tt_face_build_cmaps): Use `ft_jmp_buf'.
* src/sfnt/ttkern.c (tt_face_load_kern): Remove unused variable.

* src/truetype/ttgload.c (TT_Load_Simple_Glyph): Remove redundant
comparison.
(TT_Process_Simple_Glyph): Use FT_UInt for `n_points' and `i'.
(TT_Load_Glyph): Remove unused variable.
2007-05-15 06:49:37 +00:00
Werner Lemberg cc712a248c * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Check for negative
number of points in contours.  Problem reported by Victor Stinner
<victor.stinner@haypocalc.com>.
(TT_Process_Simple_Glyph): Synchronize variable types.
2007-04-27 17:16:50 +00:00
Werner Lemberg f4a52a6c42 * src/truetype/ttgload.c (load_truetype_glyph): Save and restore
memory stream to avoid a crash with the incremental memory
interface (Savannah bug #19260).
2007-04-09 08:40:11 +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 6e87ed9f04 Spelling fixes from Alexei. 2007-01-26 22:18:56 +00:00
Werner Lemberg f629439905 formatting, copyright years 2007-01-06 07:47:45 +00:00
David Turner 384be23418 * src/truetype/ttobjs.h, src/truetype/ttobjs.c,
src/truetype/ttgload.c: do not allocate interpreter-specific
	tables in memory if we're not going to load glyphs with it
	anyway.
2007-01-05 15:32:01 +00:00
Werner Lemberg 6b87e6f0ff * src/gxvalid/gxvkern.c (gxv_kern_subtable_fmt0_pairs_validate):
Remove compiler warning.

Formatting.
2007-01-02 19:20:08 +00:00
David Turner 115b442b23 * src/autofit/aflatin.c, src/truetype/ttgload.c: removing compiler
warnings

	* builds/win32/visualc/freetype.vcproj: adding _CRT_SECURE_NO_DEPRECATE
	to avoid deprecation warnings with Visual C++ 8
2006-12-22 11:37:05 +00:00
Werner Lemberg 91959bf24c Fix Savannah bug #15553.
* src/truetype/ttgload.c (tt_loader_init): Re-execute the CVT
program after a change from mono to grayscaling (and vice versa).
Use correct constant for comparison to get `exec->grayscale'.
2006-11-22 10:36:55 +00:00
David Turner 6aa260ce61 support for "automatic unpatented hinting" added
we still need to determine the list of "trick" CJK fonts
that are going to toggle the bytecode interpreter instead
of the auto-hinter
2006-08-25 22:45:13 +00:00
Werner Lemberg 1234299620 formatting 2006-08-19 11:18:09 +00:00
David Turner 33f5f24957 * include/freetype/internal/ftgloadr.h,
include/freetype/internal/tttypes.h, src/base/ftgloadr.c,
    src/base/ftobjs.c, src/truetype/ttgload.c, src/truetype/ttinterp.c,
    src/truetype/ttobjs.c: improvements to native TrueType hinting,
    this is a first try, controlled by the FIX_BYTECODE macro in
    src/truetype/ttinterp.c
2006-08-16 16:50:55 +00:00
David Turner 9fbfc6af07 * src/cid/cidgload.c (cid_slot_load_glyph),
src/truetype/ttgload.c (tt_prepare_zone): removing compiler warnings
2006-08-16 09:11:31 +00:00
Werner Lemberg a2da05c2c5 Fix two hinting bugs as reported in
http://lists.nongnu.org/archive/html/freetype-devel/2006-06/msg00057.html.

* include/freetype/internal/tttypes.h (TT_GlyphZoneRec): Add
`first_point' member.

* src/truetype/ttgload.c (tt_prepare_zone): Initialize
`first_point'.
(TT_Process_Composite_Glyph): Always untouch points.

* src/truetype/ttinterp.c (Ins_SHC): Fix computation of
`first_point' and `last_point' in case of composite glyphs.
(Ins_IUP): Fix computation of `end_point'.
2006-06-25 06:27:27 +00:00
Werner Lemberg 545c4e566e * src/truetype/ttgload.c (TT_Load_Composite_Glyph)
[FT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Make it compilable again.


Formatting, documentation fixes.
2006-05-17 22:55:04 +00:00
David Turner 281679de85 * include/freetype/internal/tttypes.h, src/autofit/afangles.c,
src/autofit/afcjk.c, src/autofit/afhints.c, src/autofit/aflatin.c,
        src/autofit/aftypes.h, src/base/ftcalc.c, src/base/ftoutln.c,
        src/gzip/ftgzip.c, src/psaux/psconv.c, src/truetype/ttgload.c,
        src/type1/t1gload.c:

          this is a major patch used to drastically improve the performance
          of loading glyphs. This both speeds up loading the glypn vector
          themselves and the auto-fitter.

          note that we've started using inline assembler with GCC to
          implement FT_MulFix, given that this function is so damn
          important for the engine's performance.

          the resulting speed-up is about 25%.
2006-05-17 13:34:21 +00:00
Wu, Chia-I (吳佳一) 9a2b3b6d55 * src/sfnt/ttmtx.c (tt_face_load_hhea, tt_face_load_hmtx): Simply
return error if table is missing.
Check table length in non-FT_OPTIMIZE_MEMORY'ed `tt_face_load_hmtx'.

* src/sfnt/sfobjs.c (sfnt_load_face): Take care of missing metrics
tables.  The last change makes Mac bitmap-only font not load and this
fixes it.

* src/truetype/ttgload.c (load_truetype_glyph): Fix compilation error
when FT_CONFIG_OPTION_INCREMENTAL is defined.
2006-02-14 08:37:03 +00:00
Wu, Chia-I (吳佳一) f5aa47beb0 Clean up the SFNT_Interface. Table loading functions are now named
after the tables' tags;  `hdmx' is TrueType-specific and thus the code
is moved to the truetype module; `get_metrics' is moved here from the
truetype module so that the code can be shared with the cff module.

This pass involves no real changes.  That is, the code is moved
verbatim mostly.  The only exception is the return value of
`tt_face_get_metrics'.

* include/freetype/internal/sfnt.h, src/sfnt/rules.mk,
src/sfnt/sfdriver.c, src/sfnt/sfnt.c, src/sfnt/sfobjs.c,
src/sfnt/ttload.c, src/sfnt/ttload.h, src/sfnt/ttsbit.c,
src/sfnt/ttsbit.h, src/sfnt/ttsbit0.c: Clean up the SFNT_Interface.

* src/sfnt/ttmtx.c, src/sfnt/ttmtx.h: Metrics-related tables' loading
and parsing code is moved here.
Move `tt_face_get_metrics' here from the truetype module.  The return
value is changed from `void' to `FT_Error'.

* include/freetype/internal/fttrace.h: New trace: ttmtx.

* src/truetype/ttpload.c, src/truetype/ttpload.h: `hdmx' loading and
parsing code is moved here.
New function `tt_face_load_prep' splitted from `tt_face_load_fpgm'.
`tt_face_load_fpgm' returns `FT_Err_Ok' if `fpgm' doesn't exist.

* src/cff/cffgload.c, src/cff/cffobjs.c: Update.

* src/truetype/ttgload.c, src/truetype/ttobjs.c: Update.
2006-02-14 06:40:10 +00:00
Werner Lemberg 1723dcc261 Formatting, minor clean-ups. 2006-01-15 07:30:32 +00:00
Wu, Chia-I (吳佳一) 212aee0d6e * include/freetype/internal/ftobjs.h (ft_fake_vertical_metrics),
src/base/ftobjs.c (ft_fake_vertical_metrics): New function to fake the
vertical metrics.

* src/cff/cffgload.c, src/cid/cidgload.c, src/pcf/pcfdrivr.c,
src/type1/t1gload.c, src/winfonts/winfnt.c: Fake the vertical metrics.
The fake metrics is monotone.

* src/truetype/ttgload.c (compute_glyph_metrics): Some fixes and
formattings in vertical metrics faking.  There are still rooms for
improvements (and so do the CFF module).
2006-01-15 06:24:53 +00:00
Werner Lemberg f1c2b91e14 Formatting, copyright year updates.
Decorate long constants with `L' and `UL' where appropriate.
2006-01-13 14:53:28 +00:00
Wu, Chia-I (吳佳一) fa7d6ab217 * include/freetype/internal/sfnt.h (SFNT_Interface): New method
`load_strike_metrics' used to load the strike's metrics.

* src/sfnt/sfdriver.c, src/sfnt/ttsbit.c, src/sfnt/ttsbit.h,
src/sfnt/ttsbit0.c: New function `tt_face_load_strike_metrics'.

* src/pfr/pfrobjs.c (pfr_face_init): Set FT_Bitmap_Size correctly.

* src/winfonts/winfnt.c (FNT_Face_Init): Use `nominal_point_size' for
nominal size unless it is obviously incorrect.

* include/freetype/freetype.h (FT_Bitmap_Size): Update the comments on
FNT driver.


Introduce new size selection interface.

* include/freetype/internal/ftdriver.h (struct FT_Driver_ClassRec_):
Replace `set_char_sizes' and `set_pixel_sizes' by `request_size' and
`select_size'.

* include/freetype/freetype.h (FT_Select_Size, FT_Size_Request_Type,
FT_Size_Request, FT_Request_Size, FT_Select_Size), src/base/ftobjs.c
(FT_Select_Size, FT_Request_Size): API additions to export the new
size selection interface.

* src/base/ftobjs.c (FT_Set_Char_Size, FT_Set_Pixel_Sizes): Use
`FT_Request_Size'.

* include/freetype/internal/ftobjs.h (FT_Match_Size),
src/base/ftobjs.c (FT_Match_Size): New function to match a size
request against `available_sizes'.  Drivers supporting bitmap strikes
can use this function to implement `request_size'.

* src/bdf/bdfdrivr.c, src/cid/cidobjs.c, src/cid/cidobjs.h,
src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/type1/t1driver.c,
src/type1/t1objs.c, src/type1/t1objs.h, src/type42/t42drivr.c,
src/type42/t42objs.c, src/type42/t42objs.h, src/winfonts/winfnt.c:
Update to new size selection interface.

* src/cff/cffdrivr.c, src/cff/cffgload.c, src/cff/cffobjs.c,
src/cff/cffobjs.h, src/truetype/ttdriver.c, src/truetype/ttgload.c,
src/truetype/ttobjs.c, src/truetype/ttobjs.h: Update to new size
selection interface.
Make `strike_index' FT_ULong and always defined.
Use `load_strike_metrics' provided by SFNT interface.
2006-01-13 12:21:31 +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
David Turner 9fbd2ab884 - various performance enhancements
- fixing apinames.c, adding support for Watcom and Borland compilers
- adding generation of exported symbols list to the build system, including the Unix one !!

sorry Werner, I have no time to document this in ChangeLog at the moment
2005-10-28 16:14:14 +00:00
Werner Lemberg 560d5fed38 Minor cleanups.
Copyright issues.
2005-10-21 09:08:28 +00:00
Wu, Chia-I (吳佳一) 2293bb15c2 * src/truetype/ttgload.c (TT_Load_Glyph): Allow size->ttmetrics to be
invalid when FT_LOAD_NO_SCALE is set.
2005-10-19 08:07:38 +00:00
Werner Lemberg 7c25946f08 Formatting. 2005-09-28 07:34:45 +00:00
David Turner 18e44430ae * src/base/Jamfile: adding src/base/ftgxval.c
* src/gxvalid/gxvbsln.c, src/gxvalid/gxvcommn.c, src/gxvalid/gxvfeat.c,
        src/gxvalid/gxvjust.c, src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c,
        src/gxvalid/gxvmort.c, src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
        src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c, src/gxvalid/gxvmort5.c,
        src/gxvalid/gxvmorx.c, src/gxvalid/gxvmorx0.c, src/gxvalid/gxvmorx1.c,
        src/gxvalid/gxvmorx2.c, src/gxvalid/gxvmorx5.c, src/gxvalid/gxvopbd.c,
        src/gxvalid/gxvprop.c, src/sfnt/sfdriver.c, src/truetype/ttgload.c:
          removing _many_ compiler warnings when compiling with Visual C++
          at maximum level (/W4)
2005-09-23 13:22:10 +00:00
Werner Lemberg eff1ee3bd3 * src/truetype/ttgload.c (load_truetype_glyph): Fix typo. 2005-08-31 20:40:00 +00:00
Werner Lemberg 3bfb1c08c1 * src/truetype/ttgload.c [TT_MAX_COMPOSITE_RECURSE]: Removed.
(load_truetype_glyph): Limit recursion depth by `maxComponentDepth'.
2005-08-29 11:59:18 +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
Wu, Chia-I (吳佳一) 15c1f5d36f * src/truetype/ttdriver.c (Load_Glyph): Don't check the validity of
ttmetrics here.  TrueType fonts with only sbits always have
ttmetrics.valid set to false.

* src/truetype/ttgload.c (TT_Load_Glyph): Check that ttmetrics is
valid before loading outline glyph.

* src/cache/ftcimage.c (FTC_INode_New): Fix a memory leak.
2005-08-20 08:17:44 +00:00
Werner Lemberg ffa033b1bc * src/truetype/ttgload.c (load_truetype_glyph): Fix compiler
warnings.

Formatting.
2005-08-19 08:56:29 +00:00
Wu, Chia-I (吳佳一) 0142e6aff1 * src/truetype/ttinterp.c, src/truetype/ttinterp.h: Remove original
TT_Done_Context and rename TT_Destroy_Context to TT_Done_Context with
slight changes.

* src/truetype/ttobjs.h (tt_slot_init): New function.

* src/truetype/ttobjs.c (tt_driver_init): Initialize execution context
here.
(tt_slot_init): New function to create extra points for the internal
glyph loader. We then use it directly, instead of face's glyph loader,
when loading glyph.

* src/truetype/ttdriver.c: Use tt_slot_init for glyph slot
initialization.
(TT_Load_Glyph): Load flag dependencies are handled here.
Return error if size is NULL.

* src/truetype/ttgload.c: Heavy cleanup and refactor.
(TT_Hint_Glyph): New funcion to hint a zone, prepared by caller.
(TT_Process_Simple_Glyph): Use loader->pp's instead of recalculating.
Use TT_Hint_Glyph.
No need to save/restore loader->stream before/after
TT_Vary_Get_Glyph_Deltas now.
(TT_LOADER_SET_PP): New macro to calculate and set the four phantom points.
(TT_Process_Composite_Component, TT_Process_Composite_Glyph,
load_truetype_glyph): Refactor load_truetype_glyph into these three functions.
Never set exec->glyphSize to 0. (close #13107)
Forget glyph frame before calling TT_Process_Simple_Glyph.
(TT_Load_Glyph, load_sbit_image, tt_loader_init): Refactor TT_Load_Glyph into
these three functions.
Set various fields of `glyph' here, instead of in load_truetype_glyph
and compute_glyph_metrics.
2005-08-16 01:54:59 +00:00
Werner Lemberg 8e3fc5ea0c * src/otvalid/otvcommn.h: Remove dead code.
Formatting.
2005-08-03 21:17:53 +00:00
Werner Lemberg baed3dd044 Oops! Undo private change. 2005-07-13 06:58:13 +00:00
Werner Lemberg 07437dba17 * include/freetype/ftoutln.h (FT_Outline_Embolden): Fix prototype.
Reported by Xerxes.
2005-07-13 06:56:08 +00:00
David Turner c562162834 * src/sfnt/ftbitmap.c, src/truetype/ttgload.c, src/sfnt/ttcmap.c:
removing compiler warnings (Visual C++ /W4)

        * Jamfile, src/otvalid/{otvcommn.h,otvgdef.c,otvgpos.c,otvgsub.c,
        otvjstf.c}: modified the code to use a different pre-processor trick
        to implement the OTV_NEST1, OTV_NEST2 and OTV_NEST3 macros. The code
        now compiles neatly with Visual C++. The 'otvalid' module has been
        put in the Jamfile build again.
2005-06-30 11:46:46 +00:00
Wu, Chia-I (吳佳一) 8cfb220eb9 * 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.
2005-06-20 09:04:50 +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 8744edfefb * src/truetype/ttgload.c (tt_face_get_metrics) [FT_OPTIMIZE_MEMORY]:
Fix typo which sometimes causes wrong metrics for the last glyph.
2005-04-06 14:48:55 +00:00
Werner Lemberg 3ab770b165 Cosmetic fixes. 2005-03-08 20:24:56 +00:00
Werner Lemberg f13516c832 Various fixes for C and C++ compiling.
* src/autofit/*: Add copyright messages.
  Formatting.

* src/autofit/afhints.c (af_glyph_hints_done): Don't use
`AF_Dimension' but `int' for loop counter.

* src/autofit/aflatin.c (af_latin_metrics_init_widths): Don't use
`AF_Dimension' but `int' for loop counter.
Use proper enumeration value for `render_mode'.
(af_latin_metrics_scale_dim): Don't shadow variables.
(af_latin_hints_compute_segments): Use proper cast for `major_dir'
and `segment_dir'.
(af_latin_align_linked_edge, af_latin_hint_edges): Fix arguments of call to
`af_latin_compute_stem_width'.
(af_latin_hints_apply): Don't use `AF_Dimension' but `int' for loop
counter.

* src/base/ftdbgmem.c (ft_mem_table_get_source, FT_DumpMemory): Use
proper cast for memory allocation.

* src/cff/cffdrivr.c (cff_get_kerning): Use proper cast for
initialization of `sfnt'.

* src/sfnt/sfdriver.c: Include `ttkern.h'.

* src/sfnt/ttkern.c (tt_face_get_kerning): Don't shadow variables.

* src/truetype/ttgload.c: Include `ttpload.h'.

* src/truetype/ttpload.c (tt_face_load_loca) [FT_OPTIMIZE_MEMORY]:
Remove redundant variable.
2005-03-03 17:09:08 +00:00
Werner Lemberg e793092d0a Formatting.
* src/truetype/ttpload.c (tt_face_load_loca): Fix typo.

* src/sfnt/ttkern.c: Include `ttkern.h'.
(FT_COMPONENT): Updated.

* include/freetype/internal/fttrace.h: Add entry for `ttkern'.

* src/sfnt/ttsbit0.c: s/FT_Err_/SFNT_Err_/.
Decorate constants with `U' and `L' where necessary.

* src/sfnt/ttcmap.c (tt_cmap4_next): Remove unused variable.
2005-03-01 02:13:50 +00:00
David Turner e5680279b2 * many, many files: several memory optimizations were implemented to
drastically reduce the heap usage of FreeType, especially in the case
  of memory-mapped files. The idea is to avoid loading and decoding tables
  in the heap, and instead access the raw data whenever possible (i.e.
  when it doesn't compromise performance).

  This had several impacts: first, opening vera.ttf uses a ridiculous amount
  of memory (when the FT_Library footprint is accounted for), until you start
  loading glyphs. Even then, you'll save at least 20 Kb compared to the non
  optimized case. performance of various operations, including open/close
  has also been dramatically improved.

  More optimisations to come. The auto-hinter eats memory like crazy? This
  must be stopped...
2005-02-26 00:12:04 +00:00
David Turner e70d553111 * include/freetype/config/ftoption.h, include/freetype/internal/ttypes.h,
src/truetype/ttpload.c, src/truetype/ttpload.h, src/truetype/ttgload.c:
    added the temporary configuration FT_OPTIMIZE_MEMORY to control various
    optimizations used to reduce the heap footprint of memory-mapped TrueType
    files.

    * src/truetype/ttpload.c (tt_face_load_loca, tt_face_get_location,
    tt_face_done_loca): when FT_OPTIMIZE_MEMORY is set, the locations table
    is read directly from memory-mapped streams, instead of being decoded
    into the heap.

    * src/truetype/ttpload.c: only load the CVT and fpgm tables when the
    bytecode interpreter is compiled in.
2005-02-22 16:53:06 +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 685dd4f7b8 * src/sfnt/ttcmap.c (tt_face_build_cmaps): Check for pointer
overflow.

* src/sfnt/ttload.c (tt_face_load_hdmx): Protect against bad input.
Don't use FT_QNEW_ARRAY but FT_NEW_ARRAY to make deallocation work
in case of failure.

* src/sfnt/ttsbit.c (Load_SBit_Range): Check range intervals.
(tt_face_load_sbit_strikes): Allocate `strike_sbit_ranges' after
frame test.

* src/truetype/ttgload.c (TTLoad_Simple_Glyph): Add assertion for
`flag'.
2004-10-13 05:15:44 +00:00
Werner Lemberg dea712b4eb `Activate' gray-scale specifing hinting within the TrueType
bytecode interpreter.  This is an experimental feature which
should probably be made optional.

* src/truetype/ttgload.c (TT_Process_Simple_Glyph,
load_truetype_glyph): Move the code to set the pedantic_hinting flag
to...
(TT_Load_Glyph): Here.
Set `grayscale' flag except for `FT_LOAD_TARGET_MONO'.

* src/truetyep/ttinterp.c (Ins_GETINFO): Return MS rasterizer
version 1.7.
Return rotation and stretching info only if glyph is rotated or
stretched, respectively.
Handle grayscale info.

* src/truetype/ttinterp.h (TT_ExecContextRec): Add `grayscale'
member.
2004-08-07 15:08:33 +00:00
Werner Lemberg 5afaa672f3 * src/truetype/ttgload.c (load_truetype_glyph): Fix typo. 2004-06-28 14:19:15 +00:00
David Turner c28b8c1bfb * src/truetype/ttgload.c, src/truetype/ttxgvar.c: removing
compiler warnings
2004-06-24 20:18:24 +00:00
David Turner 2f0fdb9316 fixing a scaling bug in the TrueType glyph loader that generated ugly
artefacts when the TrueType bytecode interpreter was compiled in
2004-06-21 21:16:56 +00:00
Werner Lemberg 56a4d87cb2 * src/truetype/ttgload.c (compute_glyph_metrics): Fix compiler
warnings.
2004-06-03 07:56:21 +00:00
Werner Lemberg 2b54eba36b * src/cff/cffobjs.c (cff_size_done, cff_size_init, cff_size_reset,
cff_slot_done, cff_slot_init, cff_face_init, cff_face_done): Access
root fields directly.
* src/cff/cffdrivr.c (Load_Glyph): Access root fields directly.

* src/truetype/ttgload.c (TT_Process_Simple_Glyph): Save current
frame before calling TT_Vary_Get_Glyph_Deltas.

* src/pcf/pcfdrivr.c (PCF_CMapRec): Rename `cmap' to `root' for
consistency.
(pcf_cmap_init, pcf_cmap_done, pcf_cmap_char_index,
pcf_cmap_char_next): Don't use PCF_XXX but FT_XXX arguments which
are typecast to the proper PCF_XXX types within the function.
Update code accordingly.
(pcf_cmap_class): Remove casts.
(PCF_Face_Done, PCF_Face_Init, PCF_Set_Pixel_Size): Don't use
PCF_XXX but FT_XXX arguments which are typecast to the proper
PCF_XXX types within the function.
Update code accordingly.
Use FT_CALLBACK_DEF throughout.
(PCF_Set_Point_Size): New wrapper function.
(PCF_Glyph_Load, pcf_driver_requester): Use FT_CALLBACK_DEF.
(pcf_driver_class): Remove casts.
2004-05-07 07:08:14 +00:00
Werner Lemberg 44bb303510 * src/pcf/pcfdrivr.c: Revert change from 2004-04-17.
* src/pcf/pcfutil.c: Use FT_LOCAL_DEF.
* src/pcf/pcfutil.h: Include FT_CONFIG_CONFIG_H.
Use FT_BEGIN_HEADER and FT_END_HEADER.
Use FT_LOCAL.

2004-04-24  George Williams  <gww@silcom.com>

Add support for Apple's distortable font technology (in GX fonts).

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

* include/freetype/ftmm.h (FT_Var_Axis, FT_Var_Named_Style,
FT_MM_Var): New structures.
(FT_Get_MM_Var, FT_Set_Var_Design_Coordinates,
FT_Set_Var_Blend_Coordinates): New function declarations.

* include/freetype/internal/services/svmm.h (FT_Get_MM_Var_Func,
FT_Set_Var_Design_Func): New typedefs.
Update MultiMasters service.

* include/freetype/internal/tttypes.h
[TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include FT_MULTIPLE_MASTERS_H.
(GX_Blend) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New typedef.
(TT_Face) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New members `doblend'
and `blend'.

* include/freetype/tttags.h (TTAG_avar, TTAG_cvar, TTAG_gvar): New
macros.

* include/freetype/internal/fttrace.h: Add `ttgxvar'.

* src/base/ftmm.c (FT_Get_MM_Var, FT_Set_Var_Design_Coordinates,
FT_Set_Var_Blend_Coordinates): New functions.

* src/sfnt/sfobjs.c (sfnt_load_face)
[TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Set FT_FACE_FLAG_MULTIPLE_MASTERS
flag for GX var fonts.

* src/truetype/ttgxvar.c, src/truetype/ttgxvar.h: New files.

* src/truetype/truetype.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
ttgxvar.c.

* src/truetype/ttdriver.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
FT_MULTIPLE_MASTERS_H, FT_SERVICE_MULTIPLE_MASTERS_H, and ttgxvar.h.
(tt_service_gx_multi_masters) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]:
New service.
(tt_services) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Updated.

* src/truetype/ttgload.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
ttgxvar.h.
(TT_Process_Simple_Glyph, load_truetype_glyph)
[TT_CONFIG_OPTION_GX_VAR_SUPPORT] :Support GX var fonts.

* src/truetype/ttobjs.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
ttgxvar.h.
(tt_done_face) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Call
tt_done_blend.

* src/truetype/ttpload.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
ttgxvar.h.
(tt_face_load_cvt)  [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Call
tt_face_vary_cvt.

* src/truetype/rules.mk (TT_DRV_SRC): Add ttgxvar.c.

* src/type1/t1driver.c (t1_service_multi_masters): Add T1_Get_MM_Var
and T1_Set_Var_Design.

* src/type1/t1load.c (FT_INT_TO_FIXED, FT_FIXED_TO_INT): New macros.
(T1_Get_MM_Var, T1_Set_Var_Design): New functions.

* src/type1/t1load.h (T1_Get_MM_Var, T1_Set_Var_Design): New
function declarations.
2004-04-25 20:15:11 +00:00
Werner Lemberg c3dc56b85c * src/truetype/ttgload.c, src/truetype/ttgload.h (TT_Load_Glyph),
src/ttdriver.c (Load_Glyph): Change type of `glyph_index' to
FT_UInt.  From Lex Warners.


* src/sfnt/ttload.c (tt_face_load_sfnt_header): Really fix change
from 2004-03-19.

* src/bdf/bdfdrivr.c (BDF_Face_Init): Use `ft_strlen'.

* src/pcf/pcfutil.c, src/pcf/pcfutil.h: Decorate functions with
`static.'.
Remove unused function `RepadBitmap'.
* src/pcf/pcfdrivr.c: Don't include pcfutil.h.
2004-04-19 06:13:50 +00:00
Werner Lemberg 8bb07e6386 Add vertical phantom points.
* include/freetype/internal/tttypes.h (TT_LoaderRec): Add
`top_bearing', `vadvance', `pp3, and `pp4'.

* src/autofit/afloader.c (af_loader_load_g): Handle two more points.

* src/autohint/ahhint.c (ah_hinter_load): Handle two more points.
* src/truetype/ttgload.c (Get_VMetrics): New function.
(TT_Load_Simple_Glyph, TT_Process_Simple_Glyph): Handle two more
points.
(load_truetype_glyph): Use Get_VMetrics.
Handle two more points.
(compute_glyph_metrics): Thanks to vertical phantom points we now
can always compute `advance_height' and `top_bearing'.
* src/truetype/ttobjs.h (TT_SubglyphRec): Add vertical phantom
points.


* src/autohint/ahglyph.c (ah_outline_load): Fix allocation of
`news'.

Converting some files to Unix end-of-line convention.
2004-03-27 08:43:17 +00:00
Werner Lemberg 6cda9c489d * include/freetype/ftcache.h: Delete duplicated definition of
FTC_FaceID.

* src/cff/cffdrivr.c (cff_get_cmap_info): Call sfnt module's TT CMap
Info service function if the cmap comes from sfnt.  Return 0 if the
cmap is sythesized in cff module.

Formatting; updating copyright.
2004-01-22 09:07:12 +00:00
David Turner 4632fccb1b * include/freetype/internal/ftmemory.h,
src/autohint/ahhint.c, src/base/ftgloadr.c,
        src/base/ftglyph.c, src/base/ftoutln.c,
        src/base/ftstroke.c, src/cff/cffload.c, src/truetype/ttgload.c,
        src/truetype/ttinterp.c:

          introducing the new FT_ARRAY_COPY and FT_ARRAY_MOVE macros
          to make copying arrays easier
2004-01-15 19:07:44 +00:00
Werner Lemberg f946fc609b * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Revert previous
change.  It's not necessary.
2003-12-31 08:48:21 +00:00
Werner Lemberg 6fd9512aff * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Handle `repeated
flags set' correctly.

* src/cff/cffobjs.c (cff_face_init): Fix memory leak by deallocating
`full' and `weight' properly.
* src/cff/cffgload.c (cff_decoder_parse_charstrings)
<cff_op_hintmask> [FT_DEBUG_LEVEL_TRACE]: Use `0x' as prefix for
tracing output.
2003-12-31 07:51:30 +00:00
David Turner 87c0d30fc5 * 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 !
2003-12-24 01:10:46 +00:00
Werner Lemberg 779afe4b91 * src/winfonts/winfnt.c (FNT_Load_Glyph): Use first_char in
computation of glyph_index.
(FNT_Size_Set_Pixels): To find a strike, first check pixel_height
only, then try to find a better hit by comparing pixel_width also.
Without this fix it isn't possible to access all strikes.
Also compute metrics.max_advance to be in sync with other bitmap
drivers.

* src/base/ftobjs.c (FT_Set_Char_Size): Remove redundant code.
(FT_Set_Pixel_Size): Assign value to `metrics' after validation of
arguments.


Synchronize computation of height and width for bitmap strikes.  The
`width' field in the FT_Bitmap_Size structure is now only useful to
enumerate different strikes.  The `max_advance' field of the
FT_Size_Metrics structure should be used to get the (maximum) width
of a strike.

* src/bdf/bdfdrivr.c (BDF_Face_Init): Don't use AVERAGE_WIDTH for
computing `available_sizes->width' but make it always equal to
`available_sizes->height'.

* src/pcf/pcfread.c (pcf_load_font): Don't use RESOLUTION_X for
computing `available_sizes->width' but make it always equal to
`available_sizes->height'.

* src/truetype/ttdriver.c (Set_Pixel_Sizes): Pass only single
argument to function.

* src/psnames/psmodule.c (ps_unicode_value): Handle `.' after
`uniXXXX' and `uXXXX[X[X]]'.


* src/bdf/bdfdrivr.c: s/FT_Err_/BDF_Err/.
* src/cache/ftccache.c, src/cache/ftcsbits.c, src/cache/ftlru.c:
s/FT_Err_/FTC_Err_/.
* src/cff/cffcmap.c: s/FT_Err_/CFF_Err_/.
* src/pcf/pcfdrivr.c: s/FT_Err_/PCF_Err_/.
* src/psaux/t1cmap.c: Include psauxerr.h.
s/FT_Err_/PSaux_Err_/.
* src/pshinter/pshnterr.h: New file.
* src/pshinter/rules.mk: Updated.
* src/pshinter/pshalgo.c, src/pshinter/pshrec.c: Include pshnterr.h.
s/FT_Err_/PSH_Err_/.
* src/pfr/pfrdrivr.c, src/pfr/pfrobjs.c, src/pfr/pfrsbit.c:
s/FT_Err_/PFR_Err_/.
* src/sfnt/sfdriver.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap0.c,
src/sfnt/ttload.c: s/FT_Err_/SFNT_Err_/.
* src/truetype/ttgload.c: s/FT_Err_/TT_Err_/.
* src/gzip/ftgzip.c: Load FT_MODULE_ERRORS_H and define
FT_ERR_PREFIX and FT_ERR_BASE.
s/FT_Err_/Gzip_Err_/.
2003-06-22 15:33:53 +00:00
Werner Lemberg 0240d29cac * src/gzip/ftgzip.c (ft_gzip_file_fill_output): Handle Z_STREAM_END
correctly.

* src/pshinter/pshglob.c (psh_globals_new): Change calculation of
dim->stdw.count to avoid compiler problem.

* src/truetype/ttgload.c (TT_Load_Simple_Glyph): Move the block
variables to the beginning of the function to avoid compiler
problems.
Add casts necessary for 16bit compilers.

* src/pfr/rules.mk (PFR_DRV_SRC): Add pfrsbit.c.
(PFR_DRV_H): Add pfrtypes.h.

* include/freetype/config/ftconfig.h: s/__MWKS__/__MWERKS__/.

* src/pfr/pfrsbit.c (pfr_bitwriter_init): Change type of third
argument to FT_Bool.
(pfr_lookup_bitmap_data): Change type of third and fourth argument
to FT_UInt.  Updated caller.
(pfr_load_bitmap_bits): Change type of fourth argument to FT_Bool.
2003-06-09 15:54:18 +00:00
Werner Lemberg 7386197677 * include/freetype/internal/ftdriver.h,
include/freetype/internal/ftobjs.h,
include/freetype/internal/psaux.h, src/cid/cidgload.c,
src/psaux/psobjs.c, src/psaux/t1decode.c, src/psaux/psobjs.h,
src/pshinter/pshrec.c, src/pshinter/pshalgo.c,
src/psnames/psmodule.c, src/raster/ftraster.c, src/sfnt/sfobjs.c,
src/smooth/ftgrays.c, src/smooth/ftsmooth.c, src/truetype/ttobjs.c,
src/truetype/ttdriver.c, src/truetype/ttgload.c, src/type1/t1afm.c,
src/type1/t1gload.c, src/type1/t1gload.h, src/type1/t1load.c,
src/type1/t1objs.c, src/type42/t42parse.c, src/type42/t42parse.h:
Many casts and slight argument type changes to make it work with
a 16bit compiler.
2003-06-05 04:31:05 +00:00
Werner Lemberg 6ab5624330 * src/truetype/ttgload.c (load_truetype_glyph)
[TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Call
FT_GlyphLoader_CheckPoints before adding phantom points.  This fixes
a segfault bug with fonts (e.g. htst3.ttf) which have nested
subglyphs more than one level deep.  Reported by Anthony Fok.

* include/freetype/config/ftoption.h: Define
TT_CONFIG_OPTION_BYTECODE_INTERPRETER,
TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING, and
TT_CONFIG_OPTION_FORCE_UNPATENTED_HINTING to make it the new
default.
2003-06-04 07:59:58 +00:00
Werner Lemberg b442ca1713 Cleanups. 2003-04-23 15:50:27 +00:00
Graham Asher 46960df7b3 The incremental interface now passes the old metrics when asking for
replacement metrics so that they can be modified, not just replaced.
For example, CFF fonts need this.
2003-02-13 17:49:27 +00:00
David Turner 77b68b8e73 * src/truetype/ttgload.c: fixing the TrueType loader to handle invalid
composites correctly by limiting the recursion depth
2003-01-08 09:59:17 +00:00
Werner Lemberg e59dc91ff4 * src/truetype/ttdriver.c (Load_Glyph): Fourth parameter must be
FT_Int32.
* src/truetype/ttgload.c, src/truetype/ttgload.h (TT_Load_Glyph):
Ditto.
2002-09-21 18:43:10 +00:00
Werner Lemberg 6b5c669b7b * src/cid/cidobjs.c (CID_Size_Init): Renamed to...
(cid_size_init): This.
* src/psaux/psobjs.c (T1_Builder_Add_Point1): Renamed to...
(t1_builder_add_point1): This.

Updated all affected code.

* src/pshinter/pshalgo3.c (psh3_hint_align): Fix compiler warnings.
* src/type1/t1gload.c (T1_Compute_Max_Advance): Ditto.

Formatting, minor doc fixes.
2002-09-05 15:10:54 +00:00
David Turner b08fe2dc7a * 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_.
2002-08-27 20:20:29 +00:00
Werner Lemberg 215bf44438 * src/truetype/ttgload.c (TT_Get_Metrics): Add guard for k = 0. 2002-08-21 17:36:20 +00:00
Werner Lemberg eed446d0d5 Add support for Apple composite glyphs.
* include/freetype/config/ftoption.h
(TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED): New macro.

* src/truetype/ttgload.c (OVERLAP_COMPOUND, SCALED_COMPONENT_OFFSET,
UNSCALED_COMPONENT_OFFSET): New macros for additional OpenType
glyph loading flags.
(load_truetype_glyph): Implement it.
2002-08-16 12:46:52 +00:00
Werner Lemberg 3c403e4c17 Some formatting.
* src/cff/cffcmap.c: Remove compiler warnings.
* src/cache/ftccache.c, src/cache/ftccache.i,
src/pfr/pfrload.c, src/pfr/pfrgload.c: s/index/idx/.
* src/cff/cffload.c: s/select/fdselect/.
* src/raster/ftraster.c: s/wait/waiting/.
2002-08-06 21:47:40 +00:00
Graham Asher ce12182cfc Modified incremental loading interface to be closer to David Turner's
preferences. The header freetype.h is not now affected, the interface is
specified via an FT_Parameter, the pointer to the interface is hidden in an
internal part of the face record, and all the definitions are in ftincrem.h.
2002-08-01 15:29:17 +00:00
Werner Lemberg b3d5e9cf03 s/ft_memset/FT_MEM_SET/.
s/FT_MEM_SET/FT_MEM_ZERO/ where appropriate.
2002-07-28 05:05:24 +00:00
Werner Lemberg 7f74a52a21 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.
2002-07-26 09:09:10 +00:00
Graham Asher 13217f2509 Added the incremental loading system for the TrueType driver.
Tested using my own unit test code.
2002-07-18 15:59:23 +00:00
David Turner 318f3befc6 * src/truetype/ttgload.c (TT_Load_Composite_Glyph),
src/base/ftoutln.c (FT_Vector_Transform): fixed Werner's latest
        fix. FT_Vector_Transform wasn't buggy, the TrueType composite loader
        was...
2002-06-26 20:30:37 +00:00
Werner Lemberg 87a2bc7b69 * src/base/ftoutln.c (FT_Vector_Transform): Fix serious typo
(xy <-> yx).
* src/truetype/ttgload.c (load_truetype_glyph): Replace `|' with
`||' to make code easier to read.
2002-06-20 10:57:04 +00:00
Werner Lemberg 26aca0244d formatting 2002-05-05 07:40:16 +00:00
David Turner 8cd8907311 * src/truetype/ttgload.c (TT_Load_Glyph): finally fixing the last
bug that prevented FreeType 2.x and FreeType 1.x to produce
          bit-by-bit identical monochrome glyph bitmaps with native TrueType
          hinting. The culprit was a single-bit flag that wasn't set
          correctly by the TrueType glyph loader !!

        * src/otlayout/otlayout.h,
          src/otlayout/otlbase.c,
          src/otlayout/otlbase.h,
          src/otlayout/otlconf.h,
          src/otlayout/otlgdef.c,
          src/otlayout/otlgdef.h,
          src/otlayout/otlgpos.c,
          src/otlayout/otlgpos.h,
          src/otlayout/otlgsub.c,
          src/otlayout/otlgsub.h,
          src/otlayout/otljstf.c,
          src/otlayout/otljstf.h,
          src/otlayout/otltable.c,
          src/otlayout/otltable.h,
          src/otlayout/otltags.h:

            adding OpenType Layout source files. Module is still incomplete
2002-05-04 18:02:59 +00:00
Werner Lemberg 91db04cb9c * src/truetype/ttgload.c: 16bit fixes.
(TT_Load_Simple_Glyph): Improve debug messages.
(load_truetype_glyph): Remove dead code.
* src/truetype/ttinterp.c: 16bit fixes.
* src/truetype/ttobjs.c: Ditto.

* include/freetype/ftsnames.h, include/freetype/internal/sfnt.h,
src/cff/cffload.h, src/psaux/psobjs.h, src/truetype/ttinterp.[ch],
src/sfnt/ttpost.h: s/index/idx/.

formatting, copyright updates.
2002-04-01 14:25:28 +00:00
David Turner e459d742e6 * include/freetype/internal/ftmemory.h, and a lot of other files !!:
changed the names of memory macros. Examples:

              MEM_Set   => FT_MEM_SET
              MEM_Copy  => FT_MEM_COPY
              MEM_Move  => FT_MEM_MOVE

              ALLOC     => FT_ALLOC
              FREE      => FT_FREE
              REALLOC   = >FT_REALLOC

            FT_NEW was introduced to allocate a new object from a _typed_
            pointer..

            note that ALLOC_ARRAY and REALLOC_ARRAY have been replaced
            by FT_NEW_ARRAY and FT_RENEW_ARRAY which take _typed_ pointer
            arguments.

            This results in _lots_ of sources being changed, but makes the
            code more generic and less error-prone..
2002-03-22 13:52:37 +00:00
David Turner a890c29cb0 * include/freetype/internal/ftstream.h,
src/base/ftstream.c, src/cff/cffload.c, src/pcf/pcfread.c,
          src/sfnt/ttcmap.c, src/sfnt/ttcmap0.c, src/sfnt/ttload.c,
          src/sfnt/ttpost.c, src/sfnt/ttsbit.c,
          src/truetype/ttgload.c, src/truetype/ttpload.c,
          src/winfonts/winfnt.c:

            changed the definitions of stream macros. Examples:

              NEXT_Byte     => FT_NEXT_BYTE
              NEXT_Short    => FT_NEXT_SHORT
              NEXT_UShortLE => FT_NEXT_USHORT_LE
              READ_Short    => FT_READ_SHORT
              GET_Long      => FT_GET_LONG
              etc..

            also introduced the FT_PEEK_XXXX functions..
2002-03-22 12:55:23 +00:00
David Turner 7d3a26425b * renaming stream macros. Examples:
FILE_Skip    => FT_STREAM_SKIP
           FILE_Read    => FT_STREAM_READ
           ACCESS_Frame => FT_FRAME_ENTER
           FORGET_Frame => FT_FRAME_EXIT
           etc...
2002-03-20 10:49:31 +00:00
David Turner eba5ad4b37 no message 2002-03-14 12:56:35 +00:00
David Turner b5713c54c3 * include/freetype/internal/psglobals.h (removed),
include/freetype/internal/pshints.h,
          src/pshinter/pshglob.h: removing obsolete file

        * include/freetype/internal/tttypes.h,
          include/freetype/internal/sfnt.h,
          src/base/ftnames.c, src/cff/cffdrivr.c,
          src/sfnt/*.c, src/truetype/*.c: updated SFNT/TrueType type
          definitions
2002-03-14 11:26:29 +00:00
Werner Lemberg 0d9165e1d6 * src/base/ftdbgmem.c (ft_mem_table_resize, ft_mem_table_new,
ft_mem_table_set, ft_mem_debug_alloc, ft_mem_debug_free,
ft_mem_debug_realloc, ft_mem_debug_done, FT_Alloc_Debug,
FT_Realloc_Debug, FT_Free_Debug): Fix compiler warnings.
* src/base/ftcalc.c (FT_MulFix): Ditto.
* src/cff/cffdrivr.c (cff_get_name_index): Ditto.
* src/cff/cffobjs.c (CFF_Size_Get_Global_Funcs, CFF_Size_Init,
CFF_GlyphSlot_Init): Ditto.
* src/cid/cidobjs.c (CID_GlyphSlot_Init,
CID_Size_Get_Globals_Funcs): Ditto.
* src/type1/t1objs.c (T1_Size_Get_Globals_Funcs, T1_GlyphSlot_Init):
Ditto.
* src/pshinter/pshmod.c (pshinter_interface): Use `static const'.
* src/winfonts/winfnt.c (FNT_Get_Next_Char): Remove unused
variables.

* include/freetype/internal/psaux.h (T1_Builder_Funcs): Renamed
to...
(T1_Builder_FuncsRec): This.
(T1_Builder_Funcs): New typedef.
(PSAux_Interface): Remove compiler warnings.
* src/psaux/psauxmod.c (t1_builder_funcs), src/psaux/psobjs.h
(t1_builder_funcs): Updated.

* src/pshinter/pshglob.h (PSH_Blue_Align): Replaced with ...
(PSH_BLUE_ALIGN_{NONE,TOP,BOT}): New defines.
(PSH_AlignmentRec): Updated.

* include/freetype/internal/ftstream.h (GET_Char, GET_Byte): Fix
typo.
* include/freetype/internal/ftgloadr.h (FT_SubGlyph): Ditto.
* src/base/ftstream (FT_Get_Char): Rename to...
(FT_Stream_Get_Char): This.

* src/base/ftnames.c (FT_Get_Sfnt_Name): s/index/idx/ -- `index' is
a built-in function in gcc, causing warning messages with gcc 3.0.
* src/autohint/ahglyph.c (ah_outline_load): Ditto.
* src/autohint/ahglobal.c (ah_hinter_compute_blues): Ditto.
* src/cache/ftcmanag.c (ftc_family_table_alloc,
ftc_family_table_free, FTC_Manager_Done, FTC_Manager_Register_Cache):
Ditto.
* src/cff/cffload.c (cff_new_index, cff_done_index,
cff_explicit_index, CFF_Access_Element, CFF_Forget_Element,
CFF_Get_Name, CFF_Get_String, CFF_Load_SubFont, CFF_Load_Font,
CFF_Done_Font): Ditto.
* src/psaux/psobjs.c (PS_Table_Add, PS_Parser_LoadField): Ditto.
* src/psaux/t1decode.c (T1_Decoder_Parse_Charstrings): Ditto.
* src/pshinter/pshrec.c (ps_mask_test_bit, ps_mask_clear_bit,
ps_mask_set_bit, ps_dimension_add_t1stem, ps_hints_t1stem3,
* src/pshinter/pshalgo1.c (psh1_hint_table_record,
psh1_hint_table_record_mask, psh1_hint_table_activate_mask): Ditto.
* src/pshinter/pshalgo2.c (psh2_hint_table_record,
psh2_hint_table_record_mask, psh2_hint_table_activate_mask): Ditto.
* src/sfnt/ttpost.c (Load_Format_20, Load_Format_25,
TT_Get_PS_Name): Ditto.
* src/truetype/ttgload.c (TT_Get_Metrics, Get_HMetrics,
load_truetype_glyph): Ditto.
* src/type1/t1load.c (parse_subrs, T1_Open_Face): Ditto.
* src/type1/t1afm.c (T1_Get_Kerning): Ditto.
* include/freetype/cache/ftcmanag.h (ftc_family_table_free): Ditto.
2002-03-07 21:59:59 +00:00
David Turner bc82f1bbef * include/freetype/ftconfig.h: changed FT_LOCAL xxxx to FT_LOCAL( xxxx )
everywhere in the source. Sames goes for FT_LOCAL_DEF xxxx translated
        into FT_LOCAL_DEF( xxxxx )
2002-03-01 02:26:22 +00:00
David Turner 4e7eeeec7b yet another logical transformation of the internals to make them
more consistent and understandable..

mainly, changing things like PS_Table  => PS_TableRec + *PS_Table
2002-02-28 16:10:29 +00:00
David Turner 4d57024d1c * moving all code related to glyph loaders to "internal/ftgloadr.h"
and "src/base/ftgloadr.c".

        Note also that the type "FT_GlyphLoader" is now a pointer to the
        structure "FT_GlyphLoaderRec"..
2002-02-24 02:59:24 +00:00
Werner Lemberg b5349a9b75 * builds/freetype.mk (FT_CFLAGS): Use $(INCLUDE_FLAGS) first.
* src/cache/ftccache.c (ftc_cache_resize): Mark `error' as unused
to avoid compiler warning.
* src/cff/cffload.c (CFF_Get_String): Ditto.
* src/cff/cffobjs.c (CFF_StrCopy): Ditto.
* src/psaux/psobjs.c (PS_Table_Done): Ditto.
* src/pcf/pcfread.c (pcf_seek_to_table_type): Ditto.
* src/sfnt/sfdriver.c (get_sfnt_postscript_name): Ditto.
(pcf_get_bitmaps): The same for `sizebitmaps'.
* src/psaux/t1decode.c (T1_Decode_Parse_Charstrings): The same for
`orig_y'.
(t1operator_seac): Comment out more dead code.
* src/pshinter/pshalgo2.c (ps2_hints_apply): Add `DEBUG_HINTER'
conditional.
* src/truetype/ttgload.c (TT_Process_Simple_Glyph,
load_truetype_glyph): Add `TT_CONFIG_OPTION_BYTECODE_INTERPRETER'
conditional.
2002-02-19 16:30:15 +00:00
Werner Lemberg a7d2f5e1c0 * src/autohint/ahglyph.c (ah_outline_link_segments): Remove unused
variables.
* src/autohint/ahhint.c (ah_align_serif_edge): Use FT_UNUSED instead
of UNUSED.
* src/autohint/ahmodule.c (ft_autohinter_reset): Ditto.
* src/pshinter/pshrec.c (ps_mask_table_merge): Fix typo in variable
swapping code.
* src/pshinter/pshglob.h (PSH_Blue_Align): Add PSH_BLUE_ALIGN_NONE.
* src/pshinter/pshglob.c (psh_blues_snap_stem): Use it.
* src/pshinter/pshalgo1.c (psh1_hint_table_optimize): Ditto.
* src/pshinter/pshalgo2.c (psh2_hint_align): Ditto.
* include/freetype/internal/ftobjs.h (UNUSED): Removed.
2002-02-19 01:12:23 +00:00
Werner Lemberg ac812959bb formatting 2002-01-06 16:42:44 +00:00
David Turner f7f82d773b the TrueType glyph loader is now much more paranoid, this avoids
unpleasant overwrites in the case of invalid glyph data (found in
the output of buggy font converters)

the computation of auto-hinted stem widths has been modified to
avoid certain color fringes in LCD-decimation rendering (a.k.a.
"ClearType")
2002-01-06 10:13:40 +00:00
David Turner 662b344c23 * src/type1/t1objs.c (T1_Face_Init): fixed a bug that crashed the
library when dealing with certain weird fonts (like "Stalingrad",
        in "sadn.pfb". This font has no full font name entry.. )

        * src/base/ftoutln.c, include/freetype/ftoutln.h: added the
        FT_Outline_Check API to check the consistency of outline data

        * src/base/ftobjs.c (FT_Load_Glyph): added a call to the new
        FT_Outline_Check to ensure that loaded glyphs are valid. This
        allows certain fonts like "tt1095m_.ttf" to be loaded even though
        it appears they contain really funky glyphs..

        there still is a bug there though.. !!
2002-01-03 16:56:59 +00:00
Werner Lemberg 0d535112fd Formatting.
CFF encoding tables moved back from cffload.c to cffload.h.
2001-12-19 22:26:12 +00:00
David Turner 4937a3ebd2 * src/truetype/ttgload.c (TT_Load_Glyph), src/base/ftobjs.c
(FT_Load_Glyph): "fixed" the bug that prevented embedded bitmaps from
        begin loaded when the auto-hinter is used.. This actually is a hack
        but will be enough until the internal re-design scheduled for
        FreeType 2.1
2001-12-19 21:09:16 +00:00
David Turner c40a7e2d50 * include/freetype/cache/ftcache.h: added comments to indicate that
some of the exported functions should only be used by applications
        that need to implement custom cache types

        * src/truetype/ttgload.c: fixed a nasty bug that prevent composites
        from loading correctly. Believe it or not, this was due to an invalid
        macro definition !!
2001-12-19 19:17:35 +00:00
Werner Lemberg aef3fc816b * src/truetype/ttgload.c (load_truetype_glyph): Fix test for invalid
glyph header.
2001-12-17 16:21:22 +00:00
Werner Lemberg 5da9dd77f2 * src/base/ftglyph (FT_Glyph_To_Bitmap): Remove compiler warning.
* include/freetype/ftcache.h (FTC_Node_Unref): Removed.  It is
already in ftcmanag.h.
* src/cache/ftcsbits.c (ftc_sbit_node_load): Remove unused variable
`gfam'.
* src/cache/ftcmanag.c (ftc_family_table_alloc,
* ftc_family_table_free): Use FT_EXPORT_DEF.
* include/freetype/cache/ftcmanag.h: Updated.
* src/cache/ftccache.c (ftc_node_destroy): Use FT_EXPORT_DEF.
* src/cache/ftccmap.c (ftc_cmap_node_init): Remove unused variable
`cfam'.
Remove compiler warning.
(FTC_CMapCache_Lookup): Remove compiler warnings.
(ftc_cmap_family_init): Ditto.
(FTC_CMapCache_Lookup): Ditto.

* builds/unix/configure.ac: Increase `version_info' to 8:0:2.
* builds/unix/configure: Regenerated.

* builds/mac/README: Updated.
2001-12-16 08:17:33 +00:00
David Turner 59c9fea654 * src/truetype/ttgload.c (load_truetype_glyph): fixing crash when dealing
with invalid fonts (i.e. glyph size < 10 bytes)..
2001-12-14 15:14:44 +00:00
David Turner bce2986d0d fixing hinted advance width bug in all font drivers 2001-12-14 14:52:58 +00:00
David Turner 3b7049fe10 removed pedantic compiler warnings when the bytecode
interpreter is compiled in the library
2001-07-07 16:12:14 +00:00
Werner Lemberg 415235df1b finishing function header formatting
updating copyrights
2001-06-28 17:49:10 +00:00
Werner Lemberg 4a2305cf0c formatting 2001-06-28 07:17:51 +00:00
David Turner dee781342b * include/freetype/ftconfig.h, src/*/*.c: changed the definition and
uses of the FT_CALLBACK_DEF macro in order to support 16-bit compilers
2001-06-27 09:26:46 +00:00
Werner Lemberg 8eb0353fec Formatting. 2001-06-19 23:03:41 +00:00
David Turner 8edbcabce1 - updated doc for FT_New_Memory_Face
- removed lots of compiler warnings in lint-style
  warning modes (/W4 with Visual C++)
2001-06-19 08:28:24 +00:00
Werner Lemberg cf24d51531 Minor cleanups to remove compiler warnings.
* include/freetype/cache/ftcmanag.h (FTC_MAX_BYTES_DEFAULT): Use
`L' for constant.
* include/freetype/config/ftoption.h (FT_RENDER_POOL_SIZE): Ditto.
* src/base/ftcalc.c (FT_MulDiv): Use `L' for constant.
* src/base/ftglyph.c (FT_Glyph_Get_CBox): Remove `error' variable.
* src/base/fttrigon.c (ft_trig_arctan_table): Use `L' for constants.
* src/base/ftobjs.c (FT_Done_Size): Fix return value.
(FT_Set_Char_Size, FT_Set_Pixel_Sizes, FT_Get_Kerning): Remove
unused `memory' variable.
* src/autohint/ahglyph.c (ah_get_orientation): Use `L' for constant.
* src/autohint/ahhint.c (ah_hint_edges_3,
ah_hinter_align_edge_points): Remove unused `before' and `after'
variables.
(ah_hinter_align_weak_points): Remove unused `edge_limit' variable.
(ah_hinter_load): Remove unused `new_advance', `start_contour',
and `metrics' variables.
* src/cff/cffload.c (CFF_Load_Encoding): Remove dead code to avoid
compiler warning.
* src/cff/cffobjs.c (CFF_Init_Face): Remove unused `base_offset'
variable.
* src/cff/cffgload.c (CFF_Parse_CharStrings): Remove unused
`outline' variable.
(cff_compute_bias): Use `U' for constant.
* src/cid/cidload.c (cid_decrypt): Ditto.
* src/psaux/psobjs.c (T1_Decrypt): Ditto.
* src/psaux/t1decode.c (T1_Decoder_Parse_CharStrings): Ditto.
* src/sfnt/ttload.c (TT_Load_Kern): Remove unused `version'
variable.
* src/sfnt/ttsbit.c (TT_Load_SBit_Image): Remove unused `top'
variable.
* src/truetype/ttgload.c (load_truetype_glyph): Remove unused
`num_contours' and `ins_offset' variables.
(compute_glyph_metrics): Remove unused `Top' and `x_scale'
variables.
(TT_Load_Glyph): Remove unused `memory' variable.
* src/smooth/ftgrays.c (grays_raster_render): Use `L' for constants.
2001-06-18 14:23:45 +00:00
David Turner 57d4de0e51 fixed a bug that returned an invalid linear width for composite
TrueType glyphs

fixed source code to work with the new error scheme implemented
by Werner
2001-06-08 13:29:36 +00:00
Werner Lemberg 1f7f0e87e5 Complete redesign of error codes. Please check ftmoderr.h for more
details.

* include/freetype/internal/cfferrs.h,
include/freetype/internal/tterrors.h,
include/freetype/internal/t1errors.h: Removed.  Replaced with files
local to the module.  All extra error codes have been moved to
`fterrors.h'.

* src/sfnt/ttpost.h: Move error codes to `fterrors.h'.

* src/autohint/aherrors.h, src/cache/ftcerror.h, src/cff/cfferrs.h,
src/cid/ciderrs.h, src/pcf/pcferror.h, src/psaux/psauxerr.h,
src/psnames/psnamerr.h, src/raster/rasterrs.h, src/sfnt/sferrors.h,
src/smooth/ftsmerrs.h, src/truetype/tterrors.h,
src/type1/t1errors.h, src/winfonts/fnterrs.h: New files defining the
error names for the module it belongs to.

* include/freetype/ftmoderr.h: New file, defining the module error
offsets.  Its structure is similar to `fterrors.h'.

* include/freetype/fterrors.h (FT_NOERRORDEF): New macro.
(FT_ERRORDEF): Redefined to use module error offsets.
All internal error codes are now public; unused error codes have
been removed, some are new.

* include/freetype/config/ftheader.h (FT_MODULE_ERRORS_H): New
macro.
* include/freetype/config/ftoption.h
(FT_CONFIG_OPTION_USE_MODULE_ERRORS): New macro.

All other source files have been updated to use the new error codes;
some already existing (internal) error codes local to a module have
been renamed to give them the same name as in the base module.

All make files have been updated to include the local error files.


* src/cid/cidtokens.h: Replaced with...
* src/cid/cidtoken.h: This file for 8+3 consistency.

* src/raster/ftraster.c: Use macros for header file names.
2001-06-06 17:30:41 +00:00
David Turner 61d6b2b9aa * src/truetype/ttgload.c (load_truetype_glyph): fixed a bug in the
composite loader spotted by Keith Packard.
2001-05-16 17:49:07 +00:00
Werner Lemberg 1429db6c4f * README: Formatting.
* Jamfile: Fix typo.

* src/cff/cffparse.c: Move error code #defines to...
* include/freetype/internal/cfferrs.h: This file.
* src/cff/cffdrivr.c, src/cff/cffobjs.c, src/cff/cffload.c: Replaced
`FT_Err_*' with `CFF_Err_*'.
* src/cid/cidparse.c: Replaced `FT_Err_*' with `T1_Err_*'.
* src/psaux/psobjs.c, src/psaux/t1decode.c: Ditto.
* src/sfnt/sfobcs.c, src/sfnt/ttload.c: Replaced `FT_Err_*' with
`TT_Err_*'.
* src/truetype/ttgload.c, src/truetype/ttobjs.c: Ditto.
* src/type1/t1gload.c, src/type1/t1load.c, src/type1/t1objs.c,
src/type1/t1parse.c: Replaced `FT_Err_*' with `T1_Err_*'.

* include/freetype/internal/cfferrs.h: Add
`CFF_Err_Unknown_File_Format'.
* include/freetype/internal/t1errors.h: Add
`T1_Err_Unknown_File_Format'.
* include/freetype/internal/tterrors.h: Add
`TT_Err_Unknown_File_Format'.

* src/cff/cffload.h: Add `cff_*_encoding' and `cff_*_charset'
references.
* src/psaux/psobjs.c: Include `FT_INTERNAL_TYPE1_ERRORS_H'.

* src/cff/cffobjs.c (CFF_Init_Face, CFF_Done_Face): Use
FT_LOCAL_DEF.
* src/cid/cidobjs.c (CID_Done_Driver): Ditto.
* src/trutype/ttobjs.c (TT_Init_Face, TT_Done_Face, TT_Init_Size):
Ditto.
* src/type1/t1objs.c (T1_Done_Driver): Ditto.
* src/pcf/pcfdriver.c (PCF_Done_Face): Ditto.
* src/pcf/pcf.h: Use FT_LOCAL for `PCF_Done_Face'.
2001-04-02 23:54:01 +00:00
David Turner 8d3a401fa8 * builds/*/*-def.mk: changed the objects directory from "obj" to "objs"
* include/freetype/config/ftheader.h: removed obsolete macros like
	FT_SOURCE_FILE, etc.. and added cache-specific macro definitions that
	were previously defined in <freetype/ftcache.h>. Added comments to be
	included in a new API Reference section.

	* src/*/*: removed the use of FT_SOURCE_FILE, etc.. now, each component
	needs to added its own directory to the include path at compile time.
	Modified all "rules.mk" and "descrip.mms" accordingly..
2001-03-20 11:14:24 +00:00
Werner Lemberg 914b289f16 * src/*/*.c: Added many casts to make code more 64bit-safe. 2001-03-10 17:07:42 +00:00
David Turner 170c0d4c0d * include/freetype/config/ft2build.h,
include/freetype/internal/internal.h: fixed header inclusion macros
	to use direct definitions. This is the only way to do these things
	in a portable way :-( The rest of the code should follow shortly
	though everything compiles now..

	* builds/compiler/intelc.mk, builds/compiler/watcom.mk,
	builds/win32/detect.mk: added support for the Intel C/C++ compiler,
	as well as _preliminary_ (read: doesn't work !!) support for Watcom.
	Also added a new setup target. Type "make setup list" for a list
	of supported command-line compilers on Win32..
2000-12-13 19:55:11 +00:00
Werner Lemberg d5c1b27d58 * include/freetype/config/ft2build.h (FT2_ROOT, FT2_CONFIG_ROOT):
Removed.  ANSI C doesn't (explicitly) allow macro expansion in
arguments using `##'.
(FT2_PUBLIC_FILE, FT2_CONFIG_FILE, FT2_INTERNAL_FILE): Use directory
names directly.  Make them configurable.  Use `##' to strip leading
and trailing spaces from arguments.

* builds/unix/ft2unix.h: Adapted.

* src/base/ftsystem.c (ft_alloc, ft_realloc, ft_free, ft_io_stream,
ft_close_stream): Use FT_CALLBACK_DEF.

* builds/unix/ftsystem.c: Use new header scheme.
(FT_Done_Memory): Use free() from FT_Memory structure.

* src/base/ftinit.c, src/base/ftmac.c: Header scheme fixes.

* include/freetype/config/ft2build.h (FT2_CONFIG_ROOT,
FT2_PUBLIC_FILE, FT2_CONFIG_FILE, FT2_INTERNAL_FILE,
FT_SOURCE_FILE): Use `##' operator to be really ANSI C compliant.
2000-12-12 22:28:12 +00:00
Werner Lemberg cc069beb2d cleanups 2000-12-08 16:17:16 +00:00
David Turner 19ed8afe60 - 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
2000-12-08 02:42:29 +00:00
David Turner b1aabf4c5e - added support for the free command-line Borland C++ compiler
in the "builds" directory

- modified a few files because BCC32 didn't like certain comparisons
  (UInt compared with a UShort, apparently the UShort is promoted to
  an Int)

- updated the INSTALL file to include IDE compilation, prevent against
  BSD Make, and clarify the use of "make setup" (instead of "make")
  for build configuration
2000-11-30 23:48:22 +00:00
Werner Lemberg 4b68007b4f Complementing David's changes with formatting, adding documentation, etc.
More `*'-convention formatting, adding the `a' resp. `an' prefix to
variables.
2000-11-07 06:30:29 +00:00
David Turner f96594faf0 integrated Yamano-Uchi changes to the base source code. However,
I've made a few modifications:

  - there is no new field named "driver" in "FT_SizeRec"

  - the new fields in "TT_SizeRec" are:

       strike_index   :: value 0xFFFF means "no sbit strike selected"
       strike_metrics :: the FT_Size_Metrics structure corresponding to
                         the currently selected strike

  - the code in "ttload.c" has been somewhat cleaned up too

thanks a lot, Y-U !!

- David
2000-11-06 23:07:51 +00:00
David Turner 54e7574946 defining new types to hold "internal" fields of public
objects:

  FT_Face_Internal, FT_Size_Internal, FT_Slot_Internal

these contain some fields that may change between releases
of FreeType, without affecting the size of FT_FaceRec,
FT_SizeRec, FT_GlyphSlotRec, etc.., which means that
drivers wouldn't need to be recompiled if we only add new
fields to an internal structure..

I plan to hack a few things related to the auto-hinter and
I need this move to ensure that we will not break binary
compatibility between 2.0 and 2.1 :-)

- David
2000-11-04 02:52:02 +00:00
David Turner 76a5f62323 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
2000-11-04 01:55:49 +00:00
Werner Lemberg e4b32a5dc5 Removing trailing whitespace. 2000-10-31 20:42:18 +00:00
Werner Lemberg 353dfeafa3 More warnings fixed. 2000-08-29 18:58:41 +00:00
Werner Lemberg 29a90e2610 Updating unix/ftconfig.in to recent config/ftconfig.h changes.
More C++ fixes: Introducing LOCAL_FUNC_X for local functions used in
function pointers (there are no local anonymous functions in C++) and
FT_CPLUSPLUS (instead of FT_EXPORT_VAR) to define linkage of structures
which contain function pointers.
2000-08-03 00:03:08 +00:00
Werner Lemberg e72c9fec17 Simplifying the FIELD_* and FRAME_* macros. Before calling these macros,
you should #define FT_STRUCTURE to the structure which will be filled.

Replaced FT_FIELD_REF with FT_FIELD_SIZE, FT_FIELD_SIZE_DELTA, and
FT_FIELD_OFFSET to make the code more readable; additionally, it should be
more portable because we no longer cast a pointer to an FT_UShort (which
e.g. fails with Sun's C++ compiler) but computes the difference between two
pointers which is guaranteed to work.

Fixing warnings (and C++ errors) while using Sun's latest cc and CC
incarnations.  Most of them are related to variable shadowing.
2000-07-31 18:59:02 +00:00
David Turner 08d78b62e3 removed warning 2000-07-28 01:51:49 +00:00
Werner Lemberg 58b17f9647 Formatting. 2000-07-27 23:29:08 +00:00
David Turner c5cdf8bcf1 re-adding a "unix-dev.mk". Debugging libtool output
is just too much of a pain for me, I prefer a good old
static lib without optimizations :-)

"make devel" is back on Unix then..
2000-07-27 21:40:22 +00:00
Werner Lemberg 321cd27d0f Removing compiler warnings about unused portions of code.
Now unix.in uses absolute paths also to overcome problems with libtool.
To do that in a consistent way I had to modify the rules how to handle
$OBJ_DIR (and consequently $LIB_DIR): You should set $OBJ_DIR explicitly
on the command line (or environment).
2000-07-27 11:20:20 +00:00
David Turner 5fe4c00ed2 - fixed the incorrect SO extension for Visual C++
- disabled the TrueType interpreter by default
- disabled the "type1" driver, "type1z" is now used
  by default (the internal driver name is "type1" now !!)
2000-07-26 19:04:08 +00:00
David Turner e161ee449c fixed a bug that caused invalid clipping of monochrome bitmaps
when they were blitted on the left edge of an 8-bit pixmap..
2000-07-10 22:03:10 +00:00
Werner Lemberg 7fa51b5535 Formatting.
Adding some trivial error checking.

Adding/Fixing tracing levels.
2000-07-08 19:51:42 +00:00
David Turner a90663f591 vast clean-up of the sources in order to allow flat
directory compilation (by defining the FT_FLAT_COMPILE
macro at compile time..)

moved "freetype2/BUILD" to "freetype2/docs/BUILD"
2000-07-08 00:41:13 +00:00
David Turner 43a2f656a7 fixed a few bugs, cleaned up some code 2000-07-05 18:23:38 +00:00
Werner Lemberg bd5ae40006 Run g++ on the FreeType library. This should make the use of code in
C++ programs easier:

  Renamed FT_WordXX to FT_UIntXX.

  Changed a lot of void* to FT_Byte* if related to i/o streams -- FreeType
  always accesses streams byte-wise, so this makes sense IMHO.

  Added a lot of #ifdef __cplusplus to header files (and removed a few).

  Other minor syntax fixes (mostly casts).

  Replaced the variable `private' with `private_dict' -- `private' is
  reserved in C++.
2000-07-05 04:32:02 +00:00
David Turner c6a92202c2 various clean-ups:
- using FT_UNUSED instead of UNUSED
- using FT_LONG64 and FT_INT64 instead of LONG64 & INT64
- using FT_SIZEOF_INT & FT_SIZEOF_LONG instead of...

- removed the #ifdefs that used SIZEOF_INT, instead we now
  use FT_Int32 and FT_UInt32 when needed to support
  32-bits quantity correctly on 64-bits systems..
2000-07-04 18:12:13 +00:00
Werner Lemberg 5811c7c3a5 Formatting.
Fixed some errors which prevented compiling.
2000-07-02 13:53:16 +00:00
David Turner f9ca2bb58a managed to re-design entirely the API in <freetype/ftglyph.h>
It is now really the "glyph factory" that Stefan was probably
dreaming about..

fixed some recent formatting errors from Werner ;-)

cleaned up the demonstration programs from most of the
rust that they had, though I'm sure someone is going to
re-format them really soon !!

"ftstring" now uses the new ftglyph.h API, and is now
faster and smaller.. yep..
2000-06-30 23:12:55 +00:00
Werner Lemberg deb4e98396 Formatting...
Preprocessor lines now always start the line.

Improved error handling in `base' module.

Fixed a out-of-bounds error in ttgload.
2000-06-29 03:14:25 +00:00
David Turner 81bb4ad937 latest clean-ups..
The code compiles with NO WARNINGS with GCC and
Visual C++ (also with LCC minus debugging options)
2000-06-28 04:19:49 +00:00
David Turner 74abee8e2e various cleanups to reduce compiler warnings 2000-06-27 23:31:53 +00:00
Werner Lemberg dcd2e14c58 forgotten fixes. 2000-06-25 07:43:15 +00:00
Werner Lemberg a929ba9b20 applying formatting again 2000-06-25 06:47:11 +00:00
David Turner 994d7747fb various hacks to the TrueType driver that I cannot
explain now, but they'll be very useful in the near future :-)
2000-06-25 04:49:19 +00:00
David Turner 2a98b3c431 reduced some nasty memory leaks 2000-06-23 13:47:55 +00:00
David Turner 90f68b7272 still more updates to the TrueType driver to make it more
"extensible"..
2000-06-23 12:26:14 +00:00
David Turner c31286153a bugfixes in the Type1 drivers 2000-06-23 05:02:13 +00:00
David Turner f0df85ba2a - MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
    source in order to provide the following enhancements:

      - more generic module support:

        The FT_Module type is now defined to represent a handle to a given
        module. The file <freetype/ftmodule.h> contains the FT_Module_Class
        definition, as well as the module-loading public API

        The FT_Driver type is still defined, and still represents a pointer
        to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
        FT_Get_Driver by FT_Get_Module, etc..


      - support for generic glyph image types:

        The FT_Renderer type is a pointer to a module used to perform various
        operations on glyph image.

        Each renderer is capable of handling images in a single format
        (e.g. ft_glyph_format_outline). Its functions are used to:

           - transform an glyph image
           - render a glyph image into a bitmap
           - return the control box (dimensions) of a given glyph image


        The scan converters "ftraster.c" and "ftgrays.c" have been moved
        to the new directory "src/renderer", and are used to provide two
        default renderer modules.

        One corresponds to the "standard" scan-converter, the other to the
        "smooth" one.

        The current renderer can be set through the new function
        FT_Set_Renderer.

        The old raster-related function FT_Set_Raster, FT_Get_Raster and
        FT_Set_Raster_Mode have now disappeared, in favor of the new:

           FT_Get_Renderer
           FT_Set_Renderer

        see the file <freetype/ftrender.h> for more details..

        These changes were necessary to properly support different scalable
        formats in the future, like bi-color glyphs, etc..


      - glyph loader object:

        A new internal object, called a 'glyph loader' has been introduced
        in the base layer. It is used by all scalable format font drivers
        to load glyphs and composites.

        This object has been created to reduce the code size of each driver,
        as each one of them basically re-implemented its functionality.

        See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
        more information..



      - FT_GlyphSlot had new fields:

        In order to support extended features (see below), the FT_GlyphSlot
        structure has a few new fields:

           linearHoriAdvance:  this field gives the linearly scaled (i.e.
                               scaled but unhinted) advance width for the glyph,
                               expressed as a 16.16 fixed pixel value. This
                               is useful to perform WYSIWYG text.

           linearVertAdvance:  this field gives the linearly scaled advance
                               height for the glyph (relevant in vertical glyph
                               layouts only). This is useful to perform
                               WYSIWYG text.

        Note that the two above field replace the removed "metrics2" field
        in the glyph slot.

           advance:   this field is a vector that gives the transformed
                      advance for the glyph. By default, it corresponds
                      to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
                      was specified when calling FT_Load_Glyph or FT_Load_Char

           bitmap_left: this field gives the distance in integer pixels from
                        the current pen position to the left-most pixel of
                        a glyph image WHEN IT IS A BITMAP. It is only valid
                        when the "format" field is set to
                        "ft_glyph_format_bitmap", for example, after calling
                        the new function FT_Render_Glyph.

           bitmap_top:  this field gives the distance in integer pixels from
                        the current pen position (located on the baseline) to
                        the top-most pixel of the glyph image WHEN IT IS A
                        BITMAP. Positive values correspond to upwards Y.

           loader:  this is a new private field for the glyph slot. Client
                    applications should not touch it..


      - support for transforms and direct rendering in FT_Load_Glyph:

        Most of the functionality found in <freetype/ftglyph.h> has been
        moved to the core library. Hence, the following:

          - a transform can be specified for a face through FT_Set_Transform.
            this transform is applied by FT_Load_Glyph to scalable glyph images
            (i.e. NOT TO BITMAPS) before the function returns, unless the
            bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..


          - once a glyph image has been loaded, it can be directly converted to
            a bitmap by using the new FT_Render_Glyph function. Note that this
            function takes the glyph image from the glyph slot, and converts
            it to a bitmap whose properties are returned in "face.glyph.bitmap",
            "face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
            native image might be lost after the conversion.


          - when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
            and FT_Load_Char functions will call FT_Render_Glyph automatically
            when needed.
2000-06-22 00:17:42 +00:00
Werner Lemberg 9ca2af3838 A new formatting orgy.
Added some `#if 0' to completely disable the CID AFM stuff.  In case this is
not correct please fix.
2000-06-21 03:03:28 +00:00
David Turner f9b8dec437 major reformatting of the modules source code in order to get
rid of most of the basic types redefinitions (i.e. FT_Int instead
of "FT_Int", etc..)

The format-specific prefixs like "TT_", "T1_", "T2_" & 'CID_"
are now only used in relevant structures..

fixed Werner's fix to t2gload.c :-)
other small bug fixes
2000-06-16 19:34:52 +00:00
Werner Lemberg 7a4fda8821 The next round of formatting, checking documentation, etc. 2000-06-13 23:21:00 +00:00
Werner Lemberg 78575dc0d1 A lot of formatting.
Added more tracing levels.

More Makefile fixes.

Minor other changes.
2000-06-12 19:36:41 +00:00
Werner Lemberg 1c0d4acb25 Fine-tuned a lot of tracing levels to make them more functional with ftview.
Added a lot of \n to tracing messages.

Fixed a serious bug in loading SBit offsets (missing parentheses around a
xxx ? yyy : zzz construct).

Replaced most GET_xxx() functions with calls to READ_Frame() in ttsbit.c
2000-06-06 20:41:48 +00:00
David Turner 04aa800ce9 added a CID-keyed font driver in "src/cid"
fixed two bugs in the smooth renderer
2000-06-01 03:27:48 +00:00
David Turner 109fcf6086 fixed the sbit loader (src/base/sfnt/ttsbit.c)
introduced a new load flag (FT_LOAD_CROP_BITMAP) used
to indicate that we want embedded bitmaps to be cropped..

Thanks a lot to Yamano-uchi, Hidetoshi
2000-05-17 23:35:37 +00:00
David Turner 3475e7fba3 removed TT_MAX_SUBGLYPHS macro, there is no static
limit on the number of subglyphs in a TrueType font..

changed the default number of gray levels used by the
smooth renderer to 256 (instead of 128). Of course, the
human eye can't tell a difference ;-)
2000-05-17 20:56:01 +00:00
David Turner e49ab25c08 formatting - removed trailing spaces 2000-05-16 23:44:38 +00:00
David Turner efce08d67c major re-organisation of the FreeType 2 directory hierarchy 2000-05-11 18:23:52 +00:00
David Turner 48641d60ae added a simple line to set "glyph.control_len" when loading
a simple glyph. This is used to compute statistics on font files..
2000-05-02 11:00:06 +00:00
David Turner ed7f62aca5 support for FT_LOAD_NO_RECURSE needed by the auto-hinter 2000-03-28 11:19:28 +00:00
David Turner 7f615aef5e renamed all outlines functions to the
FT_Outline_<action> syntax..
2000-03-13 11:49:20 +00:00
David Turner 41dbcbf628 reformatting, changing the FT_Outline structure:
- "flags" have been renamed to "tags"
  - "outline_flags" have been renamed to "flags"

Look for more re-formatting today..
2000-03-09 11:46:25 +00:00
David Turner 0f99ddda5f changed the structure of FT_Outline in order to pack
all outline flags in a single integer..

Changed the rest of the library and demo programs
accordingly..
2000-03-06 13:23:32 +00:00
David Turner 7bb7fedef1 fixed a bug which appeared when loading
unscaled composite glyphs
2000-02-28 11:23:36 +00:00
David Turner 08fdac980a fixed a bug in the glyph loader that caused a memory
block to be freed twice. Also performed changes to use
the new glyph zone object that has appeared in ftobjs.h
2000-02-21 16:01:33 +00:00
David Turner 861ba624db small fix (reduce compiler warnings) 2000-02-15 12:54:51 +00:00
David Turner 71ec10efe5 support for the IGNORE_GLOBAL_ADVANCE_WIDTH
loading flag
2000-02-10 16:09:35 +00:00
David Turner 8f43c714a5 A major refresh of the TrueType driver :
- some #ifdefs were included in order to _not_
  compile support for the bytecode interpreter
  when FT_CONFIG_OPTION_BYTECODE_INTERPRETER
  is not defined in "ttconfig.h"

- the glyph loader has been seriously re-designed. It is now
  smaller, simpler and should load composites a bit faster

- works with the TrueType debugger
2000-02-02 12:16:19 +00:00
David Turner 3b925ef744 fixed a minor bug in the computation of the vertical
metrics top-side bearing
2000-01-17 11:22:59 +00:00
David Turner 454a428542 fixed a bug which caused some font family and style
names to be incorrectly ignored..
2000-01-13 18:19:51 +00:00
David Turner fc1f989446 Finally, the TrueType driver was completely audited. The code should
now be 100% compatible with the implementation in FreeType 1.x.

It's now time to make a new tag for the repository :-)

- David
2000-01-07 18:44:50 +00:00
David Turner d2b1f35704 Initial revision 1999-12-16 23:11:37 +00:00