Commit Graph

403 Commits

Author SHA1 Message Date
Alexei Podtelezhnikov 597c69596c [smooth] Variable type revision (part 1).
This patch restores original `TCoord' definition as `int' so that the
rendering pool is used more efficiently on LP64 platforms (unix).

* src/smooth/ftgrays.c (gray_TWorker, TCell, gray_TBand): Switch some
fields to `TCoord'.
(gray_find_cell, gray_render_scanline, gray_render_line, gray_hline,
gray_sweep, gray_convert_glyph): Updated.
2016-07-01 23:27:41 -04:00
Alexei Podtelezhnikov ef0a3e7e65 [smooth] Minor clean-ups.
* src/smooth/ftgrays.c (gray_TWorker): Remove redundant `ycount'.
(gray_sweep, gray_convert_glyph, gray_dump_cells): Updated.
2016-06-28 22:56:22 -04:00
Alexei Podtelezhnikov c9cf359fd2 [smooth] Minor clean-ups.
* src/smooth/ftgrays.c (gray_convert_glyph): Do not use volatile
qualifier.
(gray_raster_render): Move span initializations from here.
(gray_sweep): ... to here and remove unused `target' argument.
2016-06-28 00:30:58 -04:00
Alexei Podtelezhnikov 25e82bc2b5 [smooth] Consolidate memory management.
* src/smooth/ftgrays.c (gray_init_cells): Remove function.
(gray_TWorker): Remove fields that become local variables.
(gray_raster_render): Move rendering buffer declaration from here.
(gray_convert_glyph): ... to here and update accordingly.
2016-06-23 23:17:39 -04:00
Alexei Podtelezhnikov e22334812f [smooth] Consolidate boundary checks.
Removing the checks from `gray_hline' shaves 1% off rendering speed.

* src/smooth/ftgrays.c [STANDALONE_]: Duplicate `FT_MIN' and `FT_MAX'.
(gray_TWorker): No need to store `clip_box'.
(gray_hline): Remove unnecessary boundary checks.
(gray_convert_glyph): Move boundary checks from here.
(gray_raster_render): ... to here and consolidate.
2016-06-22 23:14:26 -04:00
Alexei Podtelezhnikov 78e8fc0dad [smooth] Use `FT_Outline_Get_CBox'.
* src/smooth/ftgrays.c [STANDALONE_]: Duplicate `FT_Outline_Get_CBox'.
(gray_compute_cbox): Remove this function.
(gray_convert_glyph): Update to use `FT_Outline_Get_CBox'.
2016-06-22 00:04:08 -04:00
Werner Lemberg 20c6ef4c25 [smooth] Remove compiler warnings.
* src/smooth/ftgrays.c (gray_convert_glyph): Fix reports from clang.
2016-06-21 11:39:34 +02:00
Alexei Podtelezhnikov 3c64af98ff [smooth] Sanitize memory managenent.
* src/smooth/ftgrays.c (gray_convert_glyph): Cleaned up.
2016-06-20 00:01:55 -04:00
Alexei Podtelezhnikov 74fd251b4a [smooth] Remove `band_shoot' that never worked.
* src/smooth/ftgrays.c (gray_TWorker): Remove `band_shoot'.
(gray_convert_glyph): Updated.
2016-06-18 22:31:26 -04:00
Alexei Podtelezhnikov 3e1f7bc506 Fresh typos. 2016-06-18 22:13:23 -04:00
Alexei Podtelezhnikov 72a0653142 [raster, smooth] Handle FT_RENDER_POOL_SIZE better.
* src/raster/ftraster.c (FT_MAX_BLACK_POOL): New macro.
(ft_black_render): Updated.
* src/smooth/ftgrays.c (FT_MAX_GRAY_POOL): New macro.
(gray_raster_render): Updated.
2016-06-17 23:10:22 -04:00
Alexei Podtelezhnikov 7f569f4574 Move function. 2016-06-14 23:49:31 -04:00
Alexei Podtelezhnikov 32acceff83 * src/smooth/ftgrays.c (gray_hline): Optimize if-condition. 2016-06-14 23:38:17 -04:00
Alexei Podtelezhnikov 77180c7adc [smooth] Re-enable new line renderer on 64-bit archs.
* src/smooth/ftgrays (gray_render_line): Conditionally re-enable new
implementation, where it is safe from overflows.
2016-06-08 23:31:28 -04:00
Alexei Podtelezhnikov 9cf232ed66 [smooth] Minor clean-ups.
* src/smooth/ftgrays.c (gray_dump_cells): Move out of the way.
(gray_render_span): Remove spurious casts and streamline.
2016-06-08 23:19:41 -04:00
Alexei Podtelezhnikov e9f950938f [smooth] Shrink bisection stack.
The convergence of Bézier flatteners is fast with the deviation
from straight line being assymptotically cut 4-fold on each bisection.
This justifies smaller bisection stack size.

* src/smooth/ftgrays.c (gray_TWorker): Remove common `bez_stack'.
(gray_render_conic): Create and use conic `bez_stack'. Move back the
band analysis from...
(gray_conic_to): ... here.
(gray_render_cubic): Create and use cubic `bez_stack'. Move back the
band analysis from...
(gray_cubic_to): ... here.
(gray_move_to): Updated.
2016-05-26 23:46:38 -04:00
Alexei Podtelezhnikov 6e88087d69 [smooth] More efficient accounting of conic splits and draws.
A single decrement counter of segments to draw, instead of an array,
contains all the information necessary to decide when to split and
when to draw a conic segment. The number of splits before each draw is
equal to the number of trailing zeros in the counter.

* src/smooth/ftgrays.c (gray_TWorker): Remove `lev_stack'.
(gray_render_conic): Updated to use decrement counter of segments.
2016-05-05 23:41:03 -04:00
Alexei Podtelezhnikov 98967b77e5 Add comment. 2016-03-23 23:07:24 -04:00
Werner Lemberg 31f2dc1946 [raster, smooth] Directly test outline size (#47500).
This improves stand-alone compilation.

* src/base/ftoutln.c (FT_Outline_Render): Move cbox size test to...

* src/raster/ftraster.c (ft_black_render), src/smooth/ftgrays.c
(gray_raster_render): ...these functions.
2016-03-23 07:31:59 +01:00
Werner Lemberg e9181aba2c [raster, smooth] Fix some clang sanitizer runtime issues.
* src/raster/ftraster.c (ft_black_reset, ft_black_set_mode,
ft_black_render): Harmonize signatures with `ftimage.h'.

* src/smooth/ftgrays.c (gray_raster_render, gray_raster_reset):
Ditto.
2016-03-23 06:58:20 +01:00
Alexei Podtelezhnikov 3beccbdf39 [smooth] Partly revert recent changes.
* src/smooth/ftgrays.c (gray_conic_to, gray_cubic_to): Rework
conditions to fix rendering issues.
2016-03-21 00:07:47 -04:00
Alexei Podtelezhnikov 8e8bb126d1 [smooth] Minor refactoring and microoptimizations.
* src/smooth/ftgrays.c (gray_render_conic, gray_render_cubic): Move
band clipping from here.
(gray_conic_to, gray_cubic_to): ... to here.
(gray_rander_line, gray_render_scanline): Initialize variables closer
to their use.
2016-03-18 23:21:59 -04:00
Alexei Podtelezhnikov 84b2c63374 [smooth] Minor refactoring.
* src/smooth/ftgrays.c (gray_render_conic, gray_render_cubic): Move
upscaling from here...
(gray_conic_to, gray_cubic_to):... to here.
2016-03-17 00:53:09 -04:00
Alexei Podtelezhnikov 1865575a71 [smooth] Temporarily revert 6eb6158dd7 (#47114).
* src/smooth/ftgrays.c (gray_render_line): Old implementation.
2016-03-14 22:39:22 -04:00
Alexei Podtelezhnikov d0b0e31ed7 [smooth] Replace left shifts with multiplications (#47114).
* src/smooth/ftgrays.c (SUBPIXELS, UPSCALE, DOWNSCALE): Do it.
2016-03-06 23:01:50 -05:00
Werner Lemberg 015c6e08a1 Fix clang warnings.
* src/autofit/aflatin.c (af_latin_hints_compute_segments): Use
FT_UShort for `min_flags' and `max_flags'.
Initialize `prev_*' variables.

* src/cff/cffobjs.c (cff_face_init) [FT_DEBUG_LEVEL_TRACE]: Fix
types of local variables.

* src/smooth/ftgrays.c (gray_dump_cells) [FT_DEBUG_LEVEL_TRACE]:
Update `printf' format string.

* src/tools/ftfuzzer/ftfuzzer.cc (setIntermediateAxis): Add cast.
(LLVMFuzzerTestOneInput): Fix loop type.
2016-03-01 06:45:52 +01:00
Alexei Podtelezhnikov 08e89b734c [smooth] Fix integer overflow (#47114).
* src/smooth/ftgrays.c (TArea): Make it unconditionally `long'.
2016-02-16 22:32:13 -05:00
Werner Lemberg 9adeab6452 Update copyright year. 2016-01-13 11:54:10 +01:00
Werner Lemberg 9d0b76d7f6 Don't use macro names that start with `_[A-Z]' [2/3].
Such macro names are reserved for both C and C++.

* include/freetype/ftimage.h, src/raster/ftraster.c,
src/smooth/ftgrays.c, src/smooth/ftgrays.h:
s/_STANDALONE_/STANDALONE_/.
2016-01-12 22:27:29 +01:00
Werner Lemberg 37412ff9f4 Don't use macro names that contain `__' [1/2].
Such macro names are reserved for both C and C++.

*/*: Replace macros of the form `__XXX_H__' with `XXX_H_'.
2016-01-12 21:37:13 +01:00
Alexei Podtelezhnikov 6eb6158dd7 [smooth] Faster alternative line renderer.
This implementation renders the entire line segment at once without
subdividing it into scanlines.  The main speed improvement comes from
reducing the number of divisions to just two per line segment, which
is a bare minimum to calculate cell coverage in a smooth rasterizer.
Notably, the progression from cell to cell does not itself require any
divisions at all.  The speed improvement is more noticeable at larger
sizes.

* src/smooth/ftgrays.c (gray_render_line): New implementation.
2015-10-06 22:39:54 -04:00
Alexei Podtelezhnikov e2dae8fead [smooth] Clean up worker.
* src/smooth/ftgrays.c (gray_TWorker): Remove never used fields.
2015-10-01 22:03:34 -04:00
Alexei Podtelezhnikov 8bbcfb2c2f [smooth] Clean up worker.
* src/smooth/ftgrays.c (gray_TWorker): Remove lightly used `last_ey'.
(gray_start_cell, gray_render_line): Update.
2015-09-30 23:08:53 -04:00
Alexei Podtelezhnikov d8a44ff932 Remove unused macro. 2015-09-26 22:33:55 -04:00
Alexei Podtelezhnikov b002f6882d * src/smooth/ftgrays.c (gray_render_line): Simplify clipping. 2015-09-07 13:47:36 -04:00
Alexei Podtelezhnikov 5a6dc87240 [raster,smooth] Microoptimizations.
* src/raster/ftraster.c (Insert_Y_Turn, Finalize_Profile_Table,
Beziier_Up, ): Use do-while loops.

* src/smooth/ftgrays.c (gray_render_scanline, gray_render_line,
gray_convert_glyph): Ditto.
2015-09-04 23:14:46 -04:00
Werner Lemberg f9be567f5f Better support of user-supplied C++ namespaces.
See

  http://lists.nongnu.org/archive/html/freetype-devel/2015-07/msg00008.html

for a rationale.

* src/autofit/afpic.h, src/base/basepic.h, src/cff/cffpic.h,
src/pshinter/pshpic.h, src/psnames/pspic.h, src/raster/rastpic.h,
src/sfnt/sfntpic.h, src/smooth/ftspic.h, src/truetype/ttpic.h
(FT_BEGIN_HEADER, FT_END_HEADER): Move macro calls to not enclose
header files that contain FT_{BEGIN,END}_HEADER macros by
themselves.

* src/autofit/aftypes.h [FT_DEBUG_AUTOFIT]: Include
FT_CONFIG_STANDARD_LIBRARY_H earlier.

* src/truetype/ttpic.h: Include FT_INTERNL_PIC_H.
2015-07-09 15:10:31 +02:00
Werner Lemberg 392cf22f8a Another adjustment to header locations.
This change is a result of a discussion thread on freetype-devel

  http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html

Re-introduce the `freetype2' subdirectory for all FreeType header
files after installation, and rename the `freetype2' subdirectory in
the git repository to `freetype'.

* include/freetype2: Renamed to...
* include/freetype: This.

* CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
PRIVATE_HEADERS): Updated.
Update creation of `ftconfig.h'.
Install generated `ftconfig.h'.

* Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.

* builds/amiga/include/config/ftconfig.h, builds/freetype.mk
(PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
builds/unix/freetype2.in: Updated.

* builds/unix/freetype-config.in: Updated.
* builds/unix/configure.raw: Don't check for `rmdir'.
* builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable
according to the autoconf info manual.
* builds/unix/install.mk (install, uninstall,
distclean_project_unix): Update and simplify.

* builds/wince/*, builds/windows/*: Updated.

* devel/ft2build.h, include/ft2build.h: Updated.

* include/freetype2/config/ftheader.h,
include/freetype2/internal/ftserv.h,
include/freetype2/internal/internal.h: Update all header file
macros.

* src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.

* docs/*: Updated.
2015-06-26 06:48:00 +02:00
Werner Lemberg 8502c98b15 Fix Savannah bug #45097.
We no longer `pollute' the namespace of possible header file names;
instead we move `ft2build.h' up by one level so that it gets
installed in the default include directory (e.g.,
/usr/local/include).  After this commit, only `ft2build.h' stays in
the compiler's include path.

No visible changes for the user who follows the standard FreeType
header inclusion rules.

* include/*: Move to ...
* include/freetype2/*: This directory, except `ft2build.h'.

* CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
PRIVATE_HEADERS), Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.

* builds/amiga/include/config/ftconfig.h, builds/freetype.mk
(PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
builds/unix/install.mk (install, uninstall),
builds/unix/freetype2.in: Updated.

* builds/unix/freetype-config.in: Updated.
Emit -I directory only if it is not `/usr/include'.

* builds/wince/*, builds/windows/*: Updated.

* devel/ft2build.h, include/ft2build.h: Updated.

* include/freetype2/config/ftheader.h,
include/freetype2/internal/ftserv.h,
include/freetype2/internal/internal.h: Update all header file
macros.

* src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.

* docs/*: Updated.
2015-06-22 06:35:23 +02:00
Werner Lemberg 31d97df99f Make Jam support work again.
This is just very basic stuff and just a little bit tested on
GNU/Linux only.  I won't delve into this since I'm not a Jam user.

* Jamfile: Call `HDRMACRO' for `ftserv.h' also.
(DEFINES): Replace with...
(CCFLAGS): ... this.

* src/Jamfile: Don't call `HDRMACRO' for `internal.h'; this is
already handled in the top-level Jamfile.

* src/autofit/Jamfile (DEFINES): Replace with...
(CCFLAGS): ... this.
(_sources): Add missing files.

* src/cache/Jamfile: Don't call `HDRMACRO' for `ftcache.h'; it no
longer contains macro header definitions.

* src/base/Jamfile, src/cff/Jamfile, src/sfnt/Jamfile,
src/truetype/Jamfile (_sources): Add missing files.
2015-06-21 19:12:12 +02:00
Werner Lemberg 4d1f7af17b [smooth, raster] Re-enable standalone compilation.
* src/raster/ftraster.c (FT_RENDER_POOL_SIZE, FT_MAX)
[_STANDALONE_]: Define macros.

* src/smooth/ftgrays.c (FT_RENDER_POOL_SIZE, FT_MAX, FT_ABS,
FT_HYPOT) [_STANDALONE_]: Define macros.
2015-02-23 07:04:36 +01:00
Werner Lemberg cb13e7109c [smooth] Signedness fixes.
* src/smooth/ftgrays.c, src/smooth/ftsmooth.c: Apply.
2015-02-23 06:41:52 +01:00
Werner Lemberg f57fc59e01 Run `src/tools/update-copyright'. 2015-01-17 20:41:43 +01:00
Behdad Esfahbod b2ba68665f [smooth] Fix uninitialized memory access.
Looks like `ras.span_y' could always be used without initialization.
This was never detected by valgrind before because the library-wide
`raster_pool' was used for the worker object and `raster_pool' was
originally zero'ed.  But subsequent reuses of it were using `span_y'
uninitialized.  With the recent change to not use `render_pool' and
allocate worker and buffer on the stack, valgrind now detects this
uninitialized access.

* src/smooth/ftgrays.c (gray_raster_render): Initialize
`ras.span_y'.
2015-01-14 18:43:13 +01:00
Behdad Esfahbod 747ae2c8aa [smooth] Allocate render pool for smooth rasterizer on the stack.
Instead of using the `render_pool' member of `FT_Library' that is
provided down to the rasterizer, completely ignore that and allocate
needed objects on the stack instead.

With this patch, rasterizing glyphs from different faces from
different threads doesn't crash in the smooth rasterizer.

Bugs:

  https://bugzilla.redhat.com/show_bug.cgi?id=678397
  https://bugzilla.redhat.com/show_bug.cgi?id=1004315
  https://bugzilla.redhat.com/show_bug.cgi?id=1165471
  https://bugs.freedesktop.org/show_bug.cgi?id=69034

* src/smooth/ftgrays.c (gray_TRaster): Remove `buffer',
`buffer_size', `band_size', and `worker' members.

(gray_raster_render): Create `buffer', `buffer_size', and
`band_size' locally.
(gray_raster_reset): Updated.
2015-01-14 17:54:26 +01:00
Werner Lemberg 36d03c9f58 Fix Savannah bug #43976.
Assure that FreeType's internal include directories are found before
`CPPFLAGS' (which might be set by the user in the environment), and
`CPPFLAGS' before `CFLAGS'.

* builds/freetype.mk (FT_CFLAGS): Don't add `INCLUDE_FLAGS'.
(FT_COMPILE): Make this a special variable for compiling only the
files handled in `freetype.mk'.
(.c.$O): Removed, unused.

* src/*/rules.mk (*_COMPILE): Fix order of include directories.
2015-01-12 11:26:30 +01:00
Werner Lemberg 553c9672b3 Work around a bug in Borland's C++ compiler.
See

  http://qc.embarcadero.com/wc/qcmain.aspx?d=118998

for Borland's bug tracker entry.

Reported by Yuliana Zigangirova <zigangirova@inbox.ru>,
http://lists.gnu.org/archive/html/freetype-devel/2014-04/msg00001.html.

* include/internal/ftvalid.h (FT_ValidatorRec), src/smooth/ftgrays.c
(gray_TWorker_): Move `ft_jmp_buf' field to be the first element.
2014-12-07 19:29:52 +01:00
suzuki toshiya 2676e07aa4 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Remove
unrequired negative value check for `width' and `height'.
2014-11-28 00:58:25 +09:00
suzuki toshiya 1b057040d8 Prevent too negative values (< FT_INT_MIN) in bitmap metrics,
suggested by Alexei.

* src/pfr/pfrsbit.c (pfr_slot_load_bitmap): Prevent too
negative values in `xpos' and `ypos + ysize'.
* src/smooth/ftsmooth.c (ft_smooth_render_generic): Prevent
too negative values in `x_left' and `y_top'.  Either negative
values in `width' and `height' are checked.
2014-11-27 17:53:20 +09:00
Werner Lemberg 04c2aa18bf */*: s/Invalid_Argument/Invalid_Outline/ where appropriate. 2014-11-25 10:22:12 +01:00
Werner Lemberg 3e86711ebf [Savannah bug #43682] Adjust some renderer callbacks.
* src/raster/ftraster.c (ft_black_set_mode): Change return type to
`int' to stay in sync with `FT_Renderer_SetModeFunc' prototype.

* src/smooth/ftgrays.c (gray_raster_set_mode): New dummy function
for orthogonality.
(ft_grays_raster): Use it.
2014-11-25 09:01:07 +01:00
Alexei Podtelezhnikov 525d4876be [smooth] Improve code readability.
* src/smooth/ftsmooth.c (ft_smooth_render_generic): Rearrange code.
2014-10-31 22:12:37 -04:00
Alexei Podtelezhnikov e1efe0a2fc [smooth] Reduce outline translations during rendering.
* src/smooth/ftsmooth.c (ft_smooth_render_generic): Translate origin
virtually by modifying cbox, actually translate outline if cumulative
shift is not zero.
2014-10-31 00:07:14 -04:00
Alexei Podtelezhnikov c7fd93565c [smooth] Fix Savannah bug #35604 (cont'd).
* src/smooth/ftsmooth.c (ft_smooth_render_generic): Remove checks and
casts that became unnecessary after the variable type upgrades.
2014-10-30 22:43:01 -04:00
Alexei Podtelezhnikov 465ab99585 [smooth] Improve code readability.
* src/smooth/ftsmooth.c (ft_smooth_render_generic): Rearrange code.
2014-10-29 23:45:23 -04:00
Alexei Podtelezhnikov 74916997de Unify hypotenuse approximations.
* include/internal/ftcalc.h (FT_HYPOT): Move macro from here...
* include/internal/ftobjs.h: ... to here, next to required `FT_ABS'.
* src/smooth/ftgrays.c (gray_render_cubic): Use it here.
2014-10-29 22:24:24 -04:00
David Weber 7630787a6a [smooth] Fix stand-alone compilation.
* src/smooth/ftgrays.c (FT_BEGIN_STMNT, FT_END_STMNT): Define.
2014-04-13 15:41:13 +02:00
Sean McBride 7be2a94a50 Fix clang static analyzer and compiler warnings.
* src/autofit/afhints.c (af_glyph_hints_align_weak_points),
src/autofit/afloader (af_loader_load_g) <FT_GLYPH_FORMAT_COMPOSITE>,
src/base/ftcalc.c (FT_MSB), src/base/ftoutln.c
(FT_Outline_Decompose), src/bdf/bdfdrivr.c (bdf_interpret_style),
src/cff/cffparse.c (cff_parse_integer), src/cid/cidparse.c
(cid_parser_new), src/pfr/pfrload.c (pfr_phy_font_load),
src/raster/ftraster.c (Decompose_Curve), src/sfnt/sfdriver.c
(sfnt_get_ps_name), src/sfnt/ttcmap.c (tt_cmap12_next,
tt_cmap13_next), src/smooth/ftgrays.c (gray_hline): Remove dead
code.

* src/autofit/afmodule.c (af_property_get_face_globals,
af_property_set, af_property_get), src/base/ftbitmap.c
(ft_gray_for_premultiplied_srgb_bgra): Make functions static.

* src/base/ftobjs.c (ft_remove_renderer): Protect against
library == NULL.
(ft_property_do): Make function static.

* src/base/ftrfork.c: Include `ftbase.h'.

* src/sfnt/ttsbit.c (tt_face_load_sbix_image)
[!FT_CONFIG_OPTION_USE_PNG], src/type1/t1gload.c
(T1_Compute_Max_Advance): Avoid compiler warning.

* src/truetype/ttinterp.c (TT_New_Context): Reduce scope of
variable.
2014-02-08 13:55:38 +01:00
Werner Lemberg fae3820764 Simplify header file hierarchy.
This large patch changes the header file directory layout from
`include/freetype/...' to `include/...', effectively removing one
level.  Since the file `ft2build.h' is also located in `include'
(and it stays there even after installation), all FreeType header
files are now in a single directory.

Applications that use (a) `freetype-config' or FreeType's
`pkg-config' file to get the include directory for the compiler, and
(b) the documented way for header inclusion like

  #include <ft2build.h>
  #include FT_FREETYPE_H
  ...

don't need any change to the source code.

* include/freetype/*: Move up to...
* include/*: ... this directory.

* builds/amiga/include/freetype/*: Move up to...
* builds/amiga/include/*: ... this directory.

*/*: Essentially do `s@/freetype/@/@' where appropriate.

* CMakeList.txt: Simplify.
* builds/unix/freetype-config.in, builds/unix/freetype2.in: For
`--cflags', return a single directory.
* builds/unix/install.mk (install): No longer try to remove `cache'
and `internal' subdirectories; instead, remove the `freetype'
subdirectory.
2013-11-13 08:55:46 +01:00
Werner Lemberg 9a7951d99b [smooth] Fix segfault caused by previous commit.
* src/smooth/ftgrays.c (gray_set_cell): Always compute
`ras.invalid'.
2013-07-16 15:25:24 +02:00
David Turner 89929ec6b9 [smooth] Improve performance.
Provide a work-around for an ARM-specific performance bug in GCC.
This speeds up the rasterizer by more than 5%.

Also slightly optimize `set_gray_cell' and `gray_record_cell' (which
also improves performance on other platforms by a tiny bit (<1%).

* src/smooth/ftgrays.c (FT_DIV_MOD): New macro.
Use it where appropriate.

(gray_record_cell, gray_set_cell, gray_move_to,
gray_convert_glyph_inner): Streamline condition handling.
2013-07-16 13:36:07 +02:00
Werner Lemberg d7e3444b8a * src/smooth/ftgrays.c One final pragma to silence 64-bit MSVC. 2013-06-14 18:33:39 +02:00
Werner Lemberg 45392b77a8 Fix compiler warnings.
* include/freetype/internal/ftmemory.h: Decorate memory allocation
macros with `FT_Long' where appropriate.
Remove duplicate of FT_MEM_QRENEW_ARRAY definition.

* src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Use
cast.

* src/base/ftobjs.c: Add warning disabling pragma for MSVC while
including `md5.c'.

* src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdESC>: Add
cast.

* src/sfnt/ttsbit.c (tt_sbit_decoder_load_compound): Fix casts.
(tt_sbit_decoder_load_bitmap): Beautification.

* src/smooth/ftsmooth.c (ft_smooth_render_generic): Initialize
variables (earlier).

* src/truetype/ttgload.c (TT_Process_Simple_Glyph): Pacify compiler.

* src/truetype/ttgxvar.c (TT_Get_MM_Var): Use unsigned constants
where appropriate.

* src/type1/t1load.c (T1_Get_MM_Var): Ditto.
2013-06-05 13:43:20 +02:00
Werner Lemberg dc624ca4dc Apply fixes for cppcheck nitpicks.
http://cppcheck.sourceforge.net/

Note that the current version heavily chokes on FreeType, delivering
even wrong results.  I will report those issues to the cppcheck team
so that a newer version gives improved results hopefully.

*/* Improve variable scopes.
*/* Remove redundant initializations which get overwritten.

* src/base/ftmac.c ,builds/mac/ftmac.c (count_faces_scalable):
Remove unused variable.

* src/base/ftdbgmem.c (ft_mem_table_destroy): `table' can't be zero.

* src/gxvalid/gxvkern.c (gxv_kern_subtable_fmt1_entry_validate):
Remove functionless code.

* src/tools/ftrandom.c (main): Fix memory leak.
2013-06-04 10:30:48 +02:00
Werner Lemberg 5ea06ce017 Whitespace. 2013-03-17 08:14:46 +01:00
Werner Lemberg 706fc83370 Remove dead code.
* src/raster/rastpic.c (ft_raster1_renderer_class_pic_init)
src/smooth/ftspic.c (ft_smooth_renderer_class_pic_init): Do it.
2013-03-17 08:09:17 +01:00
Werner Lemberg e3c9301581 */*: Use FT_Err_Ok only.
This is a purely mechanical conversion.
2013-03-14 11:21:17 +01:00
Werner Lemberg 059bc335ce */*: Use `FT_THROW'.
This is essentially a mechanical conversion, adding inclusion of
`FT_INTERNAL_DEBUG_H' where necessary, and providing the macros for
stand-alone compiling modes of the rasterizer modules.

To convert the remaining occurrences of FT_Err_XXX and friends it is
necessary to rewrite the code.  Note, however, that it doesn't harm
if some cases are not handled since FT_THROW is a no-op.
2013-03-14 10:27:35 +01:00
Werner Lemberg 4cd5fd463e Remove trailing whitespace. 2013-01-24 13:33:06 +01:00
Werner Lemberg fdcbaf19fe [smooth] Improve tracing.
* src/smooth/ftgrays.c (gray_sweep): Trace last sweep line of
current band also.
2012-10-21 10:40:12 +02:00
Werner Lemberg 328aa3b203 [FT_CONFIG_OPTION_PIC] Fix g++ 4.6.2 compiler warnings.
* include/freetype/internal/ftdriver.h (FT_DEFINE_DRIVER),
include/freetype/internal/ftobjs.h (FT_DEFINE_RENDERER,
FT_DEFINE_MODULE), include/freetype/internal/ftserv.h
(FT_DEFINE_SERVICEDESCREC1, FT_DEFINE_SERVICEDESCREC2,
FT_DEFINE_SERVICEDESCREC3, FT_DEFINE_SERVICEDESCREC4,
FT_DEFINE_SERVICEDESCREC5, FT_DEFINE_SERVICEDESCREC6),
src/autofit/afpic.c (autofit_module_class_pic_init),
src/base/basepic.c (ft_base_pic_init), src/base/ftinit.c
(ft_create_default_module_classes), src/cff/cffparse.c
(FT_Create_Class_cff_field_handlers), src/cff/cffpic.c
(cff_driver_class_pic_init), src/pshinter/pshpic.c
(pshinter_module_class_pic_init), src/psnames/pspic.c
(psnames_module_class_pic_init), src/raster/rastpic.c
(ft_raster1_renderer_class_pic_init), src/sfnt/sfntpic.c
(sfnt_module_class_pic_init), src/sfnt/ttcmap.c
(FT_Create_Class_tt_cmap_classes), src/smooth/ftspic.c
(ft_smooth_renderer_class_pic_init), src/truetype/ttpic.c
(tt_driver_class_pic_init): Initialize allocation variable.
2012-08-27 11:23:41 +02:00
Alexei Podtelezhnikov 9ea55c7c33 Fix Savannah bug #37017.
* src/smooth/ftgrays.c (gray_render_cubic): Use a different set of
checks when detecting super curvy splines to be split.
2012-08-12 11:14:46 -04:00
Werner Lemberg e7454a47e2 [smooth] Avoid memory like in case of failure.
* src/smooth/ftsmooth.c (ft_smooth_render_generic): Use flags to
indicate what to clean up after finishing the function, with and
without errors.
2012-07-11 12:05:58 +02:00
Werner Lemberg f1ec084292 s/maximal/maximum/ everywhere, s/minimal/minimum/ where appropriate. 2012-03-11 13:48:25 +01:00
Vinnie Falco 26dfeb6d63 Prepare source code for amalgamation.
* src\autofit\aferrors.h, src\bdf\bdferror.h, src\bzip2\ftbzip2.c,
src\cache\ftcerror.h, src\cff\cfferrs.h, src\cid\ciderrs.h,
src\gxvalid\gxverror.h, src\gzip\ftgzip.c, src\lzw\ftlzw.c,
src\otvalid\otverror.h, src\pcf\pcferror.h, src\pfr\pfrerror.h,
src\psaux\psauxerr.h, src\pshinter\pshnterr.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\type42\t42error.h, src\winfonts\fnterrs.h:
Add #undef FT_ERR_PREFIX before #define FT_ERR_PREFIX.
2012-03-08 06:04:03 +01:00
Werner Lemberg fcbc82e69e [smooth] Fix Savannah bug #35604.
* src/smooth/ftsmooth.c (ft_smooth_render_generic): Use `FT_Pos'
instead of `FT_UInt' for some variables and update comparisons
accordingly.  A detailed analysis can be found in the bug report.
2012-02-26 20:54:19 +01:00
Vinnie Falco 9511143385 Prepare source code for amalgamation (4/6).
* src/smooth/ftgrays.c, src/raster/ftraster.c: Undefine RAS_ARG,
RAS_ARGS, RAS_VAR, and RAS_VARS before defining it.

* src/smooth/ftgrays.c: s/TRaster/black_TRaster/,
s/PRaster/black_PRaster/.
* src/raster/ftraster.c: s/TRaster/gray_TRaster/,
s/PRaster/gray_PRaster/.
2012-02-22 07:01:35 +01:00
Vinnie Falco d55f16df11 Prepare source code for amalgamation (3/6).
* src/smooth/ftgrays.c: s/TWorker/black_TWorker/,
s/PWorker/black_PWorker/.
* src/raster/ftraster.c: s/TWorker/gray_TWorker/,
s/PWorker/gray_PWorker/
2012-02-21 09:21:19 +01:00
Vinnie Falco 5ccebc4e1e Prepare source code for amalgamation (2/6).
* src/smooth/ftgrays.c, src/raster/ftraster.c: Undefine FLOOR,
CEILING, TRUNC, and SCALED before defining it.
2012-02-21 08:54:55 +01:00
Vinnie Falco 126405adde Prepare source code for amalgamation (1/6).
See discussion starting at

  http://lists.gnu.org/archive/html/freetype-devel/2012-01/msg00037.html

* src/smooth/ftgrays.c: s/TBand/gray_TBand/.
* src/raster/ftraster.c: s/TBand/black_TBand/.
2012-02-21 08:48:39 +01:00
suzuki toshiya 1749d8bc6a Remove trailing spaces. 2012-01-17 02:00:24 +09:00
suzuki toshiya c24f77ac76 Formatting PIC related sources.
* src/autofit/afpic.c: Harmonize to FT2 coding conventions.
* src/base/basepic.c: Ditto.
* src/base/ftpic.c: Ditto.
* src/cff/cffpic.c: Ditto.
* src/pshinter/pshpic.c: Ditto.
* src/psnames/pspic.c: Ditto.
* src/raster/rastpic.c: Ditto.
* src/sfnt/sfntpic.c: Ditto.
* src/smooth/ftspic.c: Ditto.
* src/truetype/ttpic.c: Ditto.
2012-01-16 21:13:05 +09:00
suzuki toshiya 3c96681856 Fix redundant declaration warning in PIC mode.
Originally FT_DEFINE_{DRIVER,MODULE,RENDERER}() macros were
designed to declare xxx_pic_{free,init} by themselves.
Because these macros are used at the end of the module
interface (e.g. ttdriver.c) and the wrapper source to build
a module as a single object (e.g. truetype.c) includes
the PIC file (e.g. ttpic.c) before the module interface,
these macros are expanded AFTER xxx_pic_{free,init} body
when the modules are built as single object.
The declaration after the implementation causes the redundant
declaration warnings, so the declarations are moved to module
PIC headers (e.g. ttpic.h).  Separating to other header files
are needed for multi build.

* include/freetype/internal/ftdriver.h (FT_DEFINE_DRIVER):
Remove class_##_pic_free and class_##_pic_init declarations.
* include/freetype/internal/ftobjs.h (FT_DEFINE_RENDERER,
FT_DEFINE_MODULE): Ditto.

* src/base/basepic.h: Insert a comment and fix coding style.
* src/autofit/afpic.h: Declare autofit_module_class_pic_{free,
init}.
* src/cff/cffpic.h: Declare cff_driver_class_pic_{free,init}.
* src/pshinter/pshpic.h: Declare pshinter_module_class_pic_{free,
init}.
* src/psnames/pspic.h: Declare psnames_module_class_pic_{free,
init}.
* src/raster/rastpic.h: Declare
ft_raster{1,5}_renderer_class_pic_{free,init}
* src/sfnt/sfntpic.h: Declare sfnt_module_class_pic_{free,init}.
* src/smooth/ftspic.h: Declare
ft_smooth_{,lcd_,lcdv_}renderer_class_pic_{free,init}.
* src/truetype/ttpic.h: Declare tt_driver_class_pic_{free,init}.
2012-01-15 23:35:31 +09:00
suzuki toshiya 4b733517d7 Make PIC files to include module error headers, to use the
error codes with per-module prefix.

* src/autofit/afpic.c: Include `aferrors.h'.
* src/cff/cffpic.c: Include `cfferrs.h'.
* src/pshinter/pshpic.c: Include `pshnterr.h'.
* src/raster/rastpic.c: Include `rasterrs.h'.
* src/sfnt/sfntpic.c: Include `sferrors.h'.
* src/smooth/ftspic.c: Include `ftsmerrs.h'.
* src/truetype/ttpic.c: Include `tterrors.h'.
2012-01-14 06:32:50 +09:00
Werner Lemberg 5cb356405e Add some variable initializations.
Reported by Richard COOK <rscook@unicode.org>.

* src/type1/t1driver.c (t1_ps_get_font_value): Initialize `val'.
* src/smooth/ftgrays.c (gray_render_conic): Initialize `levels'
earlier.
2011-12-10 23:16:04 +01:00
Werner Lemberg c52f44d4fd Whitespace. 2011-11-30 10:46:53 +01:00
Werner Lemberg e9e93d1b19 [smooth] Slightly optimize conic and cubic flatterners.
* src/smooth/ftgrays.c (gray_render_conic, gray_render_cubic): Move
out some code from the main loop to speed it up.
2011-09-17 09:21:25 +02:00
Werner Lemberg 71cc1a83d8 Fix gcc 4.6 compiler warnings.
* src/autofit/afcjk.c (af_cjk_metrics_init_blues): Use casts and
remove unused variables.
* src/autofit/aflatin.c (af_latin_hints_compute_edges): Comment out
`up_dir'.
* src/smooth/ftsmooth.c (ft_smooth_render_generic): Use `height_org'
and `width_org' conditionalized.
2011-05-30 07:20:37 +02:00
Alexei Podtelezhnikov 8fb8841430 A better fix for Savannah bug #32671.
* src/smooth/ftgrays.c (gray_render_conic): Clean up code and
replace WHILE loop with a more natural DO-WHILE construct.
2011-03-17 20:24:57 +01:00
Werner Lemberg 6c045535ea Quick fix for Savannah bug #32671.
This isn't the optimal solution yet, but it restores the previous
rendering quality (more or less).

* src/smooth/ftgrays.c (gray_render_conic): Do more splitting.
2011-03-07 05:40:42 +01:00
Werner Lemberg f3ce237027 */rules.mk: Handle `*pic.c' files. 2011-01-03 07:11:54 +01:00
Алексей Подтележников 7c4ac3cb0c [ftsmooth]: Minor code simplification.
* src/smooth/ftgrays (gray_render_cubic): Do only one comparison
instead of two.
2010-11-28 08:23:40 +01:00
Alexei Podtelezhnikov 6aee69096f [ftsmooth] Improve rendering.
* src/smooth/ftsmooth.c (gray_render_conic): Since version 2.4.3,
cubic deviations have been estimated _after_ UPSCALE, whereas
conic ones have been evaluated _before_ UPSCALE, which produces
inferior rendering results.  Fix this.
Partially undo change from 2010-10-15 by using ONE_PIXEL/4; this has
been tested with demo images sent to the mailing list.  See

  http://lists.gnu.org/archive/html/freetype-devel/2010-10/msg00055.html

and later mails in this thread.
2010-11-02 16:01:03 +01:00
Werner Lemberg 34d61e8637 Fix thinko in spline flattening.
FT_MAX_CURVE_DEVIATION is dependent on the value of ONE_PIXEL.

* src/smooth/ftgrays.c (FT_MAX_CURVE_DEVIATION): Remove it and
replace it everywhere with ONE_PIXEL/8.
2010-10-15 20:44:15 +02:00
Werner Lemberg 0e6fc09134 [smooth] Fix splitting of cubics for negative values.
Reported by Róbert Márki <gsmiko@gmail.com>; see
http://lists.gnu.org/archive/html/freetype/2010-09/msg00019.html.

* src/smooth/ftgrays.c (gray_render_cubic): Fix thinko.
2010-10-02 09:05:46 +02:00
Graham Asher e0a9a93330 [smooth] Fix and improve spline flattening.
This fixes the flattening of cubic, S-shaped curves and speeds up
the handling of both the conic and cubic arcs.

See the discussions on the freetype-devel mailing list in late
August and September 2010 for details.

* src/smooth/ftgrays.c (FT_MAX_CURVE_DEVIATION): New macro.
(TWorker): Remove `conic_level' and `cubic_level' elements.
(gray_render_conic): Simplify algorithm.
(gray_render_cubic): New algorithm; details are given in the code
comments.
(gray_convert_glyph): Remove heuristics.
2010-09-20 09:29:23 +02:00
Werner Lemberg a205b3ca85 Try to fix Savannah bug #30717 (and probably #30719 too).
* src/smooth/ftsmooth.c (ft_smooth_render_generic): Add another
overflow test for `width' and `height'.
2010-08-10 02:59:12 +02:00
Werner Lemberg c8f5b98be2 Remove C++ warnings.
*/*: Initialize pointers where necessary to make g++ happy.
2010-07-12 21:13:22 +02:00
Werner Lemberg e017639710 Make ftgrays.c compile stand-alone again.
* src/smooth/ftgrays.c [_STANDALONE_]: Include `stddef.h'.
(FT_INT_MAX, FT_PtrDist)[_STANDALONE_]: Define.
2010-07-03 15:31:38 +02:00
Werner Lemberg 6305b869d8 Fix Savannah bug #30263.
* src/smooth/ftgrays.c (gray_render_span): Use cast to `unsigned
int' to avoid integer overflow.

* src/smooth/ftsmooth.c (ft_smooth_render_generic): Use smaller
threshold values for `width' and `height'.  This is not directly
related to the bug fix but makes sense anyway.
2010-06-30 18:24:33 +02:00
Graham Asher e419f48b40 * src/smooth/ftgrays.c (gray_render_cubic): Fix algorithm.
The previous version was too aggressive, as demonstrated in
http://lists.gnu.org/archive/html/freetype-devel/2010-06/msg00020.html.
2010-06-24 12:50:46 +02:00
Werner Lemberg f765e4403c */*: Use module specific error names where appropriate. 2010-06-24 10:34:29 +02:00
Graham Asher 7fb3ef64a2 ftgrays: Speed up rendering of small cubic splines.
* src/smooth/ftgrays.c (gray_render_cubic): Implement new,
simplified algorithm to find out whether the spline can be replaced
with two straight lines.  See this thread for more:

  http://lists.gnu.org/archive/html/freetype-devel/2010-06/msg00000.html
2010-06-10 08:10:57 +02:00
Werner Lemberg ad61f178e2 Oops, revert unwanted previous commit for ftgrays.c. 2010-06-09 15:18:57 +02:00
Werner Lemberg 7d3d2cc4fe Fix Savannah bug #30082.
* src/cff/cffgload.c (cff_decoder_parse_charstrings)
<cff_op_callothersubr>: Protect against stack underflow.
2010-06-09 09:14:09 +02:00
suzuki toshiya 057bc4c071 smooth: Exclude 16-bit system in invalid pitch/height check. 2009-08-01 00:35:40 +09:00
suzuki toshiya 471980d9dc smooth: Improve the format in debug message. 2009-08-01 00:32:20 +09:00
suzuki toshiya e45e052279 smooth: Fix some data types mismatching with their sources. 2009-08-01 00:32:08 +09:00
suzuki toshiya e866cf3f55 Improve bitmap size or pixel variables for 16-bit systems. 2009-08-01 00:32:06 +09:00
suzuki toshiya 93bb15940b smooth: Fix a data type mismatching with its source. 2009-08-01 00:30:21 +09:00
suzuki toshiya ea5268d2d2 smooth: Fix a data type mismatching with its source. 2009-08-01 00:30:20 +09:00
suzuki toshiya da59462780 smooth: Check glyph size by width/height, instead of pitch/height. 2009-07-09 17:21:32 +09:00
Werner Lemberg 858abbedc0 For warning messages, replace FT_ERROR with FT_TRACE0.
FT_ERROR is now used only if a function produces a non-zero `error'
value.

Formatting, improving and harmonizing debug strings.
2009-06-26 06:15:41 +02:00
Werner Lemberg d1862d227c More ftgray fixes for FT_STATIC_RASTER.
Problems reported by suyu@cooee.cn.

* src/smooth/ftgrays.c (gray_move_to, gray_raster_render): Use
RAS_VAR.
2009-06-19 09:09:34 +02:00
Werner Lemberg b5a460597a Make ftgrays compile with _STANDALONE_ and FT_STATIC_RASTER again.
Problems reported by suyu@cooee.cn.

* src/smooth/ftgrays.c (FT_DEFINE_OUTLINE_FUNCS,
FT_DEFINE_RASTER_FUNCS) [_STANDALONE_]: Define.
[!_STANDALONE_]: Include ftspic.h only here.
(ras): Define/declare after definition of `TWorker'.
Use `RAS_VAR_' where necessary.
2009-04-26 16:32:10 +02:00
Oran Agra c1e22f3986 Position Independent Code (PIC) support in smooth renderer.
* src/smooth/ftsmooth.h declare ft_smooth_renderer_class,
ft_smooth_lcd_renderer_class and ft_smooth_lcd_v_renderer_class
using macros from ftrender.h,
when FT_CONFIG_OPTION_PIC is defined create and destroy
functions will be declared.
* src/smooth/ftsmooth.c when FT_CONFIG_OPTION_PIC is defined
the following structs:
ft_smooth_renderer_class, ft_smooth_lcd_renderer_class
and ft_smooth_lcd_v_renderer_class
will have functions to init or create and destroy them
instead of being allocated in the global scope.
And macros will be used from ftspic.h in order to access
ft_grays_raster from the pic_container (allocated in ftgrays.c).

* src/smooth/ftgrays.h include FT_CONFIG_CONFIG_H
* src/smooth/ftgrays.c when FT_CONFIG_OPTION_PIC is NOT defined
func_interface was moved from gray_convert_glyph_inner function
to the global scope.
When FT_CONFIG_OPTION_PIC is defined
func_interface and ft_grays_raster structs
will have functions to init them
instead of being allocated in the global scope.
And func_interface will be allocated on the stack of
gray_convert_glyph_inner.

New Files:
* src/smooth/ftspic.h declare struct to hold PIC globals for smooth
renderer and macros to access them.
* src/smooth/ftspic.c implement functions to allocate, destroy and
initialize PIC globals for smooth renderer.

* src/smooth/smooth.c add new file to build: ftspic.c.
* src/smooth/jamfile add new files to FT2_MULTI build: ftspic.c.
2009-04-05 18:14:04 +03:00
Werner Lemberg 7171ff5782 Fix `make multi' run.
* src/smooth/ftsmooth.h: Include FT_INTERNAL_DEBUG_H.
2009-03-20 21:08:29 +01:00
Werner Lemberg 79972af4f0 Protect against too large glyphs.
Problem reported by Tavis Ormandy <taviso@google.com>.

* src/smooth/ftsmooth.c (ft_smooth_render_generic): Don't allow
`width' or `pitch' to be larger than 0xFFFF.
2009-03-20 08:21:37 +01:00
Werner Lemberg f47acf2b5f Avoid compiler warnings.
* */*: s/do ; while ( 0 )/do { } while ( 0 )/.
Reported by Sean McBride <sean@rogue-research.com>.
2009-01-12 20:11:14 +00:00
Werner Lemberg e85baf4f8e Fix stdlib dependencies.
Problem reported by Mickey Gabel <mickey@monfort.co.il>.

* include/freetype/config/ftstdlib.h (ft_exit): Removed.  Unused.

* src/autofit/afhints.c, src/base/ftlcdfil.c, src/smooth/ftsmooth.c:
s/memcpy/ft_memcpy/.
* src/psaux/t1decode.c: s/memset/ft_memset/, s/memcpy/ft_memcpy/.
2009-01-12 20:01:10 +00:00
Werner Lemberg 3c5ad95166 * src/pfr/pfrdrivr.c, src/winfonts/winfnt.c, src/cache/ftcmanag.c,
src/smooth/ftgrays.c, src/base/ftobjc.s, src/sfobjs.c:
s/_Err_Bad_Argument/_Err_Invalid_Argument/.  The former is for
errors in the bytecode interpreter only.
2008-12-21 17:51:12 +00:00
Werner Lemberg ce33a312da FT_USE_MODULE declares things as:
extern const FT_Module_Class

(or similar for C++).  However, the actual types of the variables
being declared are often different, e.g., FT_Driver_ClassRec or
FT_Renderer_Class.  (Some are, indeed, FT_Module_Class.)

This works with most C compilers (since those structs begin with an
FT_Module_Class struct), but technically it's undefined behavior.

To quote the ISO/IEC 9899:TC2 final committee draft, section 6.2.7
paragraph 2:

  All declarations that refer to the same object or function shall
  have compatible type; otherwise, the behavior is undefined.

(And they are not compatible types.)

Most C compilers don't reject (or even detect!) code which has this
issue, but the GCC LTO development branch compiler does.  (It
outputs the types of the objects while generating .o files, along
with a bunch of other information, then compares them when doing the
final link-time code generation pass.)

Patch from Savannah bug #25133.

* src/base/ftinit.c (FT_USE_MODULE): Include variable type.

* builds/amiga/include/freetype/config/ftmodule.h,
include/freetype/config/ftmodule.h, */module.mk: Updated to declare
pass correct types to FT_USE_MODULE.
2008-12-21 10:29:30 +00:00
Werner Lemberg 1a5d561dce * src/autofit/afcjk.c, src/base/ftoutln.c, src/base/ftrfork.c,
src/bdf/bdfdrivr.c, src/gxvalid/gxvmorx.c, src/otvalid/otvmath.c,
src/pcf/pcfdrivr.c, src/psnames/pstables.h, src/smooth/ftgrays.c,
src/tools/glnames.py, src/truetype/ttinterp.c, src/type1/t1load.c,
src/type42/t42objs.c, src/winfonts/winfnt.c: Fix compiler warnings
(Atari PureC).
2008-11-29 22:50:24 +00:00
Werner Lemberg bd0f71aa96 Fix Savannah bug #24307.
* include/freetype/internal/t1types.h (CID_FaceRec),
src/type42/t42types.h (T42_FaceRec): Comment out `afm_data'.


* src/smooth/ftgrays.c (gray_raster_render): Don't dereference
`target_map' if FT_RASTER_FLAG_DIRECT is set.  Problem reported by
Stephan T. Lavavej <stl@nuwen.net>.
2008-09-22 08:55:44 +00:00
Werner Lemberg 70f4cff19d * src/smooth/ftgrays.c (gray_find_cell): Fix threshold. The values
passed to this function are already `normalized'.  Problem reported
by Stephan T. Lavavej  <stl@nuwen.net>.

* docs/CHANGES: Document it.
2008-09-20 16:12:05 +00:00
Werner Lemberg 22e970a23e Formatting, minor code fixes. 2008-09-20 12:20:21 +00:00
Werner Lemberg 6874d85ba0 * src/base/ftoutln.c: Include FT_INTERNAL_DEBUG_H.
(FT_Outline_Decompose): Decorate with tracing messages.

* src/smooth/ftgrays.c [DEBUG_GRAYS]: Replace with
FT_DEBUG_LEVEL_TRACE.
[_STANDALONE_ && FT_DEBUG_LEVEL_TRACE]: Include stdio.h and
stdarg.h.

(FT_TRACE) [_STANDALONE_]: Remove.
(FT_Message) [_STANDALONE_ && FT_DEBUG_LEVEL_TRACE]: New function.
(FT_TRACE5, FT_TRACE7) [_STANDALONE_]: New macros.
(FT_ERROR) [_STANDALONE_]: Updated.

(gray_hline) [FT_DEBUG_LEVEL_TRACE]: Fix condition.
Use FT_TRACE7.
(gray_dump_cells): Make it `static void'.
(graay_convert_glyph): Use FT_TRACE7.

(FT_Outline_Decompose) [_STANDALONE_]: Synchronize with version in
ftoutln.c.

* src/base/ftadvanc.c (FT_Get_Advance, FT_Get_Advances): Use
FT_ERROR_BASE.

Other minor modifications.
2008-09-20 11:50:47 +00:00
Werner Lemberg c91dfa39e8 Improve documentation of gray-level rastering and what to do if you need
less than 256 gray levels.
2008-06-21 06:27:53 +00:00
Werner Lemberg d2e1573706 * src/smooth/ftgrays.c (gray_raster_render): Check `outline'
correctly.

Whitespace.
2007-12-30 23:49:14 +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 6c2ab0977c prevent a 16-bit integer overflow that would create problems when rendering
*very* large anti-aliased outlines
2007-06-16 16:40:37 +00:00
Werner Lemberg 6e87ed9f04 Spelling fixes from Alexei. 2007-01-26 22:18:56 +00:00
Werner Lemberg 4ea0a7f0b6 formatting, minor doc fixes, copyright years 2007-01-05 09:03:31 +00:00
David Turner 8a2c7f8fb8 * src/raster/ftraster.c, src/smooth/ftgrays.c: small optimization, the
rasterizers now	uses the render pool to store their state during scanline
	convertion. this saves about 6 KB of heap space for each FT_Library instance
2007-01-04 18:33:12 +00:00
David Turner 91bd5ddf17 * src/smooth/ftgrays.c: small optimization, the rasterizer now
uses the render pool to store its state during its operation,
        this saves about 4 KB of heap for each FT_Library instance
2007-01-04 18:00:14 +00:00
Werner Lemberg 960ba59ad9 * src/sfnt/sfobjs.c (tt_face_get_name): All Unicode strings are
encoded in UTF-16BE.  Patch from Rajeev Pahuja <rpahuja@esri.com>.
(tt_name_entry_ascii_from_ucs4): Removed.


* include/freetype/ftxf86.h: Fix and extend comment so that it
appears in the documentation.

* include/freetype/ftchapters.h: Add `font_format' section.


* src/tools/docmaker/tohtml.py (HtmlFormatter::index_exit): Add link
to TOC in index page.


Formatting.
2006-12-01 08:20:47 +00:00
David Turner 3a18c5e29e * src/smooth/ftgrays.c (gray_raster_render): return 0 when we're
trying to rendering into a zero-width/height bitmap, instead of an
    error code.
2006-11-28 08:38:31 +00:00
David Turner 80658e5075 * src/truetype/ttobjs.c (tt_face_init): Fix typo in previous patch
* src/smooth/ftgrays.c: remove hard-coded error values, use FreeType
    ones instead

    * src/autofit/afhints.c (af_glyph_hints_dump_segments): remove unused
    variable
2006-11-28 08:09:20 +00:00
Werner Lemberg 0d0d78dadc formatting 2006-11-14 10:37:10 +00:00
David Turner 8765c71b41 * include/freetype/ftlcdfil.h, include/internal/ftobjs.h,
src/base/ftlcdfilt.c, src/smooth/ftsmooth.c: API change for
       the LCD filter, the FT_LcdFilter value is a enum describing
       which filter to apply, new values FT_LCD_FILTER_LIGHT and
       FT_LCD_FILTER_LEGACY (the latter implements the LibXft original
       algorithm which produces incredible color fringes for everything
       except very-well hinted text)

       * src/autofit/aflatin.c: various tiny improvements that drastically
       improve the handling of serif fonts and of LCD/LCD_V hinting modes.
2006-11-10 16:49:42 +00:00
Werner Lemberg 2c002e13a7 formatting, improving documentation 2006-09-29 21:31:53 +00:00
David Turner 8a317cf7ab * include/freetype/freetype.h: bumping FT_FREETYPE_PATCH to 2
for an upcoming 2.2.2 release

        * include/freetype/ftlcdfil.h, src/freetype/ftlcdfil.c:
        added a new API to support color filtering of subpixel glyph
        bitmaps. In default build, the function FT_Library_SetLcdFilter
        returns FT_Err_Unimplemented_Feature; you need to #define
        FT_CONFIG_OPTION_SUBPIXEL_RENDERING in ftoption.h to compile
        the real implementation

        * src/smooth/ftsmooth.c: adding support for sub-pixel color
        filtering; simplifying a few function calls

        * include/freetype/config/ftheader.h: adding FT_LCD_FILTER_H
        macro that points to <freetype/ftlcdfil.h>
2006-09-27 07:52:48 +00:00
Werner Lemberg 110246c641 formatting 2006-09-26 21:55:44 +00:00
David Turner e3d6e94853 CHANGES BETWEEN 2.2.1 and 2.2.2
I. IMPORTANT BUG FIXES

    - Various integer overflows have been fixed.

    - PFB fonts with MacOS resource fork weren't  handled correctly on
      non-MacOS platforms.

    - The PCF font loarder has been seriously hardened against malformed
      font files.

  II. IMPORTANT CHANGES

    - the unpatented hinter is now part of the default build of the
      library, and we added code to automatically support "tricky"
      fonts that need it.

      what this means is that FreeType should "just work" with certain
      Asian fonts, like MingLiu, which cannot properly load without a
      bytecode interpreter, but fortunately do not use any of the
      patented bytecode opcodes.

      Note that the API didn't change, so you can still force
      unpatented hinting with a special parameter to FT_Open_Face
      as well.

      if you're an embedded systems developer, you might want to
      *disable* the feature to save code space by undefining
      TT_CONFIG_OPTION_UNPATENTED_HINTING in ftoption.h.

    - LCD-optimized rendering is now disabled in all default builds
      of the library, mainly due to patent reasons. For more information
      see:

      http://lists.gnu.org/archive/html/freetype/2006-09/msg00064.html

      a new configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING has
      been introduced in ftoption.h; manually define it in this file
      if you want to re-enable the feature.

      the change only affects the implementation, not the FreeType API.
      This means that clients don't need to be modified, because the
      library still generates LCD decimated bitmaps, but with the added
      constraint that R=G=B on each triplet.

   - Some computation bugs in the TrueType bytecode interpreter were found,
     which allow us to get rid of very subtle and rare differences we had
     with the Windows renderer.

  III. MISCELLANEOUS

    - TrueType glyph loading is now about 25% faster.

    - the anti-aliased rasterizer has been optimized and is now 15% to 25%
      percent faster than the previous one, depending on content

    - the Type 1 loader has been improved; as an example, it now skips
      over top-level dictionaries properly

======================================================================
2006-09-26 16:58:21 +00:00
Werner Lemberg 36d2eab054 * src/truetype/ttpload.c (tt_face_load_hdmx): Handle `record_size'
values which have the upper two bytes set to 0xFF instead of 0xFF
(as it happens in at least two CJKV fonts, `HAN NOM A.ttf' and
`HAN NOM B.ttf').

* src/smooth/ftgrays.c [GRAYS_USE_GAMMA]: Really remove all code.

Formatting.
2006-09-05 19:24:34 +00:00
David Turner 2066e0acd6 fix stupid bug 2006-09-05 14:58:22 +00:00
David Turner c7bc9b7907 * src/smooth/ftgrays.c: minor source cleanups and optimization 2006-09-05 12:17:38 +00:00
David Turner 772e55d38e * src/smooth/ftgrays.c (gray_sweep): Avoid buffer overwrites
when to the end of a bitmap scanline. The fun never ends ;-)
2006-09-05 09:45:15 +00:00
David Turner aa557a908a fix for the latest rasterizer optimization 2006-09-04 16:42:44 +00:00
Werner Lemberg 2d8629b393 * devel/ftoption.h: Synchronize with
include/freetype/config/ftoption.h.

* src/smooth/ftgrays.c (gray_record_cell): Remove shadowing
variable declaration.
(gray_convert_glyph): Fix compiler warnings.

Formatting, copyright years.
2006-09-03 06:18:45 +00:00
David Turner bd50295ca4 * src/smooth/ftgrays.c: optmized the performance of the anti-aliased
rasterizer. The speed gains is between 15% and 25%, depending on
    content
2006-09-01 19:05:24 +00:00
Werner Lemberg 7f049f4221 Formatting, copyright years. 2006-02-25 16:52:16 +00:00
David Turner de271ab8f0 * builds/unix/ftsystem.c, include/freetype/config/ftheader.h,
include/freetype/internal/services/svotval.h,
    include/freetype/internal/services/svpfr.h,
    src/base/ftsystem.c, src/bdf/bdfdrivr.c, src/cache/ftcbasic.c,
    src/cff/cffcmap.c, src/gzip/ftgzip.c, src/lzw/ftlzw.c,
    src/lzw/ftlzw2.c, src/psaux/t1cmap.c, src/sfnt/ttbdf.c,
    src/smooth/ftgrays.c:

       solved -Wmissing-prototypes warnings with GCC
2006-02-25 14:53:02 +00:00
Werner Lemberg 59939244ad Implement new, simplified module selection. With GNU make it is now
sufficient to modify a single file, `modules.cfg', to control the
inclusion of modules and base extension files.

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

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

* modules.cfg: New file.

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

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

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

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

* src/*/module.mk: Change

    make_module_list: foo
    foo: ...

to

    FTMODULE_H_COMMANDS += FOO
    define FOO
    ...
    endef

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

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

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

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

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

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

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

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

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

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

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

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

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


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

* src/base/ftdbgmem.c (FT_Alloc_Debug, FT_Realloc_Debug,
FT_QAlloc_Debug, FT_QRealloc_Debug, FT_Free_Debug)
[FT_STRICT_ALIASING]: Implement.
2006-01-31 20:17:42 +00:00
Werner Lemberg 7596fd3a46 * src/*/module.mk (.PHONY): Add. 2006-01-28 16:29:29 +00:00
Werner Lemberg f6a25503c5 * devel/ftoption.h: Synchronize with
include/freetype/config/ftoption.h.

* src/autofit/module.mk (add_autofit_module), src/bdf/module.mk
(add_bdf_module), src/type42/module.mk (add_type42_driver): Fix
whitespace.

* src/smooth/module.mk (add_smooth_renderer): Add lcd and lcdv
renderer classes.
2006-01-28 10:38:15 +00:00
Werner Lemberg 60a04df7b0 Add license. 2005-06-04 23:04:30 +00:00
Werner Lemberg 8ae1dceb94 * include/freetype/ftimage.h (FT_Raster_Params),
include/freetype/ftoutln.h (FT_Outline_Translate,
FT_Outline_Transform), src/base/ftoutln.c (FT_Outline_Translate,
FT_Outline_Transform): Decorate parameters with `const' where
appropriate.
Update all callers.

* src/raster/ftraster.c (ft_black_reset), src/smooth/ftgrays.c
(gray_raster_reset): Remove `const' from `pool_base' argument.
2005-05-20 06:22:20 +00:00
Werner Lemberg eaab4a3c3b * docs/announce: Start updating. 2005-05-18 07:01:59 +00:00
Werner Lemberg ce235eaf09 * builds/win32/visualc/freetype.vcproj: Updated.
Exclude debug info for `Release' versions to reduce library size.


* src/base/ftobjs.c (FT_Open_Face): Make it work as documented, this
is, ignore `aface' completely if face_index < 0.  Reported by David
Osborn <spam@habitualhiatus.com>.


* include/freetype/ftimage.h (FT_Outline_MoveToFunc,
FT_Outline_LineTo_Func, FT_Outline_ConicToFunc,
FT_Outline_CubicToFunc), src/smooth/ftgrays.c (gray_render_conic,
gray_render_cubic, gray_move_to, gray_line_to, gray_conic_to,
gray_cubic_to, gray_render_span, gray_sweep): Decorate parameters
with `const' where appropriate.
2005-05-17 20:35:23 +00:00
Werner Lemberg fa420250c5 * include/freetype/ftimage.h (FT_Raster_RenderFunc),
include/freetype/ftrender.h (FT_Glyph_TransformFunc,
FT_Renderer_Render_Func, FT_Renderer_TransformFunc),
src/base/ftglyph.c (ft_outline_glyph_transform),
src/raster/ftrend1.c (ft_raster1_transform, ft_raster1_render),
src/smooth/ftgrays.c (FT_Outline_Decompose, gray_raster_render),
src/smooth/ftsmooth.c (ft_smooth_transform,
ft_smooth_render_generic, ft_smooth_render, ft_smooth_render_lcd,
ft_smooth_render_lcd_v): Decorate parameters with `const' where
appropriate.

* src/raster/ftraster.c (RASTER_RENDER_POOL): Removed.  Obsolete.
(ft_black_render): Decorate parameters with `const' where
appropriate.


* src/sfnt/ttcmap.c (tt_cmap4_set_range): Fix typo (FT_PEEK_SHORT ->
FT_PEEK_USHORT) which caused crashes.  Reported by Ismail Donmez
<ismail@kde.org.tr>.
2005-05-11 20:04:35 +00:00
Werner Lemberg c01c904249 * include/freetype/freetype.h (FT_Vector_Transform),
include/freetype/ftimage.h (FT_Raster_Params),
include/freetype/ftoutln.h, src/base/ftoutln.c (FT_Outline_Get_CBox,
FT_Outline_Copy, FT_Outline_Transform, FT_Vector_Transform,
FT_Outline_Get_Bitmap), src/raster/ftraster.c (ft_black_render),
src/smooth/ftgrays.c (gray_raster_render): Decorate parameters with
`const' where appropriate.

* src/sfnt/ttsbit0.c (tt_sbit_decoder_load_image): Fix arguments
to call of tt_sbit_decoder_load_bitmap.
2005-04-14 16:03:15 +00:00
Werner Lemberg bbdee28f75 * builds/unix/configure.ac: Add `-fno-strict-aliasing' if gcc is
used.
* builds/unix/configure: Regenerated.
* builds/unix/config.guess, builds/unix/config.sub: Updated from
`config' CVS module at subversions.gnu.org.


* src/cache/ftcglyph.c (FTC_GNode_UnselectFamily,
FTC_GCache_Lookup): Fix comparison with zero.

* docs/INSTALL.VMS: Updated.

* vms_make.com: Updated.  All `descrip.mms' files are now created
automatically.

* src/*/descrip.mms: Removed.
2004-11-17 08:19:27 +00:00
Werner Lemberg c846eac112 * include/freetype/freetype.h: Document FT_LOAD_TARGET_XXX properly.
* src/base/ftglyph.c (ft_bitmap_glyph_class,
ft_outline_glyph_class): Tag with FT_CALLBACK_TABLE_DEF.

* src/smooth/ftsmooth.c (ft_smooth_render): Handle
FT_RENDER_MODE_LIGHT.
2004-02-19 21:39:58 +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 7a0241049a * include/freetype/freetype.h (FT_Open_Flags): Replaced with
#defines for the constants.
(FT_Open_Args): Change type of `flags' to FT_UInt.
(FT_GlyphSlot): Move `flags' to FT_Slot_Internal.

* include/freetype/ftimage.h (FT_Outline_Flags, FT_Raster_Flag):
Replaced with #defines for the constants.

* include/freetype/internal/ftobjs.h (FT_Slot_Internal): New
field `flags' (from FT_GlyphSlot).
Updated all affected source files.
(FT_GLYPH_OWN_BITMAP): New macro (from ftgloadr.h).

* include/freetype/internal/ftgloadr.h (FT_GLYPH_OWN_BITMAP): Moved
to ftobjs.h.

* src/base/ftglyph.c (FT_Glyph_To_Bitmap): Use dummy
FT_GlyphSlot_Internal object.
2003-06-18 06:59:57 +00:00
Werner Lemberg 052904e3a0 * include/freetype/ftglyph.h (ft_glyph_bbox_unscaled,
ft_glyph_bbox_subpixels, ft_glyph_bbox_gridfit,
ft_glyph_bbox_truncate, ft_glyph_bbox_pixels): Replaced with
FT_GLYPH_BBOX_UNSCALED, FT_GLYPH_BBOX_SUBPIXELS,
FT_GLYPH_BBIX_GRIDFIT, FT_GLYPH_BBOX_TRUNCATE, FT_GLYPH_BBOX_PIXELS.
The lowercase variants are now (deprecated aliases) to the uppercase
versions.
Updated all other files.

* include/freetype/ftmodule.h (ft_module_font_driver,
ft_module_renderer, ft_module_hinter, ft_module_styler,
ft_module_driver_scalable, ft_module_driver_no_outlines,
ft_module_driver_has_hinter): Replaced with FT_MODULE_FONT_DRIVER,
FT_MODULE_RENDERER, FT_MODULE_HINTER, FT_MODULE_STYLER,
FT_MODULE_DRIVER_SCALABLE, FT_MODULE_DRIVER_NO_OUTLINES,
FT_MODULE_DRIVER_HAS_HINTER.
The lowercase variants are now (deprecated aliases) to the uppercase
versions.
Updated all other files.

* src/base/ftglyph.c (FT_Glyph_Get_CBox): Handle bbox_mode better
as enumeration.

* src/pcf/pcfdrivr.c (pcf_driver_class), src/winfonts/winfnt.c
(winfnt_driver_class), src/bdf/bdfdrivr.c (bdf_driver_class): Add
the FT_MODULE_DRIVER_NO_OUTLINES flag.
2003-06-17 10:42:27 +00:00
Werner Lemberg 858f310b80 Completely revised FreeType's make management.
. In all makefiles `/' is used as the path separator.  The
  conversion to the real path separators is done as late as
  possible using $(subst ...).

. $(HOSTSEP) no longer exists.  Now, $(SEP) gives the path separator
  for the operating system, and the new $(COMPILER_SEP) the path
  separator for the compiler tools.

. $(BUILD) has been renamed to $(BUILD_DIR).  In general, all
  directory variables end with `_DIR'.  The variants ending in `_'
  (like `BASE_' have been removed).

The following ChangeLog entries only describe changes which are
not related to the redesign.

* builds/beos/beos-def.mk (BUILD_DIR): Fix typo.
* builds/compiler/watcom.mk (LINK_LIBRARY): Fix linker call to avoid
overlong arguments as suggested by J. Ali Harlow
<ali@avrc.city.ac.uk>.
* builds/dos/dos-wat.mk: New file.
* builds/freetype.mk (FREETYPE_H): Include header files from the
`devel' subdirectory.

* builds/os2/os2-dev.mk, builds/unix/unixddef.mk,
builds/unix/unixddef.mk, builds/win32/w32-bccd.mk,
builds/win32/w32-dev.mk (BUILD_DIR): Fix path.

* builds/unix/configure.ac, builds/unic/configure: Updated.
* builds/unix/unix-def.in (DISTCLEAN): Add `freetype2.pc'.


* devel/ftoption.h: Updated.
2003-06-09 04:46:30 +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 b442ca1713 Cleanups. 2003-04-23 15:50:27 +00:00
David Turner b280537b6d * src/base/ftdbgmem.c, docs/DEBUG.TXT: added new environment variables
to control memory debugging with FreeType. See the description of
    "FT2_DEBUG_MEMORY", "FT2_ALLOC_TOTAL_MAX" and "FT2_ALLOC_COUNT_MAX"
    in DEBUG.TXT

    * src/cache/ftccache.c, src/cache/ftccmap.c, src/cache/ftcsbits.c,
    ftlru.c: fixed the cache sub-system to correctly deal with out-of-memory
    conditions.

    * src/pfr/pfrobjs.c, src/pfr/pfrsbits.c: fixing compiler warnings and a
    small memory leak

    * src/psaux/psobjs.c (t1_reallocate_table): fixed a bug (memory leak) that
    only happened when trying to resize an array would end in an OOM.

    * src/smooth/ftgrays.c: removed compiler warnings / volatile bug

    * src/truetype/ttobjs.c: removed segmentation fault that happened in
    tight memory environments.
2003-03-13 21:07:51 +00:00
David Turner 621e488622 2002-12-16 David Turner <david@freetype.org>
* docs/VERSION.DLL: updating document to better explain the differences between
        the three version numbers being used on Unix, as well as provide the AutoConf
        fragment provided by Lars Clausen

        * src/smooth/ftgrays.c (gray_render_conic): fixed small bug that
        prevented bezier arcs with negative vertical coordinates to be rendered
        appropriately


2002-11-27  Vincent Caron <v.caron@zerodeux.net>

        * builds/unix/unix-def.in, builds/unix/freetype-config.in,
        builds/unix/configure.ac, src/gzip/rules.mk, src/gzip/ftgzip.c:
        adding support for system zlib installations when available on the
        target platform (Unix only)
2002-12-16 21:51:24 +00:00
David Turner 60b32e16e7 2002-11-05 David Turner <david@freetype.org>
* include/freetype/config/ftoption.h, src/gzip/ftgzip.c: added
        support for the FT_CONFIG_OPTION_SYSTEM_ZLIB option, used to specify
        the use of system-wide zlib.

        Note that this macro, as well as FT_CONFIG_OPTION_BYTECODE_INTERPRETER,
        is not #undef-ed anymore. This allows the build system to define them
        depending on the configuration (typically by adding -D flags at
        compile time).

        * src/sfnt/ttcmap0.c (tt_face_build_cmaps): removed compiler warnings
        in optimized mode relative to the "volatile" local variables. This was
        not a compiler bug after all, but the fact that a pointer to a volatile
        variable is not the same than a volatile pointer to a variable :-)

        the fix was to change  "volatile FT_Byte*  p"
        into                   "FT_Byte* volatile  p"

        * src/pfr/pfrload.c, src/pfr/pfrdrivr.c, src/gzip/inftrees.c: removed
        compiler warnings in optimized modes

        * src/gzip/*.[hc]: modified our ZLib copy in order to prevent exporting
        any zlib function names outside of the component. This prevents linking
        problems on some platforms, when applications want to link FreeType
        _and_ ZLib together.


2002-11-05  Juliusz  <jch@pps.jussieu.fr>

        * src/psaux/psobjs.c (ps_table_add): modified increment loop in
        order to implement exponential behaviour
2002-11-06 22:32:54 +00:00
Werner Lemberg b4e18f1d6a Fix header comment. 2002-10-24 21:37:02 +00:00
Werner Lemberg 4c09ae8002 * src/smooth/ftgrays.c (SUBPIXELS): Add cast to `TPos'.
Update all callers.
(TRUNC): Add cast to `TCoord'.
Update all callers.
(TRaster): Use `TPos' for min_ex, max_ex, min_ey, max_ey, and
last_ey.
Update all casts.
(gray_render_line): Fix casts for `p' and `first'.
2002-10-05 06:57:53 +00:00
Werner Lemberg c219a5e8c4 * src/include/freetype/internal/tttypes.h (num_sbit_strikes,
num_sbit_scales): Use `FT_ULong'.
* src/sfnt/sfobjs.c (sfnt_load_face): Updated accordingly.
* src/sfnt/ttsbit.c (tt_face_set_sbit_strike): Ditto.
(find_sbit_image): Remove cast.
* src/raster/ftrend1.c (ft_raster1_render): Fix cast.

* src/sfnt/ttload.c (tt_face_load_names): Use cast.
* src/sfnt/ttcmap.c (code_to_next2): Use long constant.
(code_to_index4): Use cast.
(code_to_index8_12): Fix cast.
* src/sfnt/ttcmap0.c (tt_cmap4_char_next, tt_cmap8_char_index,
tt_cmap12_char_index): Use cast for `result'.
(tt_face_build_cmaps): Use cast.
* src/sfnt/sfobjs.c (tt_name_entry_ascii_from_ucs4): Use cast for
`code'.
(sfnt_load_face): Use FT_Int32 for `flags'.

* src/smooth/ftgrays.c (gray_render_scanline, gray_render_line,
gray_compute_cbox, gray_convert_glyph, gray_raster_reset): Add casts
to `TCoord' and `int'.
More 16bit fixes.
s/FT_Pos/TPos/.
* src/smooth/ftsmooth.c (ft_smooth_render_generic): Add casts.
2002-09-28 16:40:57 +00:00
Werner Lemberg 68e9f92710 * src/sfnt/ttpost.c (load_post_names, tt_face_free_ps_names,
tt_face_get_ps_name): Replace switch statement with if clauses to
make it more portable.

* src/cff/cffobjs.c (cff_face_init): Ditto.

* include/freetype/ftmodule.h (FT_Module_Class): Use `FT_Long' for
`module_size'.
* include/freetype/ftrender.h (FT_Glyph_Class_): Use `FT_Long' for
`glyph_size'.

* src/base/ftobjs.c (FT_Render_Glyph): Change second parameter to
`FT_Render_Mode'.
(FT_Render_Glyph_Internal): Change third parameter to
`FT_Render_Mode'.
* src/base/ftglyph.c (FT_Glyph_To_Bitmap): Change second parameter
to `FT_Render_Mode'.

* src/raster/ftrend1.c (ft_raster1_render): Change third parameter
to `FT_Render_Mode'.
* src/smooth/ftsmooth.c (ft_smooth_render, ft_smooth_render_lcd,
ft_smooth_render_lcd_v): Ditto.
(ft_smooth_render_generic): Change third and fifth parameter to
`FT_Render_Mode'.

* include/freetype/freetype.h, include/freetype/internal/ftobjs.h,
include/freetype/ftglyph.h: Updated.

* src/cff/cffdrivr.c (Load_Glyph), src/pcf/pcfdriver.c
(PCF_Glyph_Load), src/pfr/pfrobjs.c (pfr_slot_load),
src/winfonts/winfnt.c (FNT_Load_Glyph), src/t42/t42objs.c
(T42_GlyphSlot_Load), src/bdf/bdfdrivr.c (BDF_Glyph_Load): Change
fourth parameter to `FT_Int32'.

* src/pfr/pfrobjs.c (pfr_face_init): Add two missing parameters
and declare them as unused.

* src/cid/cidparse.h (CID_Parser): Use FT_Long for `postscript_len'.

* src/psnames/psnames.h (PS_Unicode_Value_Func): Change return
value to FT_UInt32.
* src/psnames/psmodule.c (ps_unicode_value, ps_build_unicode_table):
Updated accordingly.

* src/cff/cffdrivr.c (Get_Kerning): Use FT_Long for `middle'.
(cff_get_glyph_name): Use cast for result of ft_strlen.
* src/cff/cffparse.c (cff_parse_real): User cast for assigning
`exp'.
* src/cff/cffload.c (cff_index_get_pointers): Use FT_ULong for
some local variables.
(cff_charset_load, cff_encoding_load): Use casts to FT_UInt for some
switch statements.
(cff_font_load): Use cast in call to CFF_Load_FD_Select.
* src/cff/cffobjs.c (cff_size_init): Use more casts.
(cff_face_init): Use FT_Int32 for `flags'.
* src/cff/cffgload.c (cff_operator_seac): Use cast for assigning
`adx' and `ady'.
(cff_decoder_parse_charstrings): Use FT_ULong for third parameter.
Use more casts.
* src/cff/cffcmap.c (cff_cmap_unicode_init): Use cast for `count'.

* src/cid/cidload.c (cid_read_subrs): Use FT_ULong for `len'.
* src/cid/cidgload.c (cid_load_glyph): Add missing cast for
`cid_get_offset'.

* src/psaux/t1decode.c (t1_decoder_parse_charstrings) <18>: Use
cast for `num_points'.
(t1_decoder_init): Use cast for assigning `decoder->num_glyphs'.

* src/base/ftdebug.c (ft_debug_init): Use FT_Int.
* include/freetype/internal/ftdriver.h (FT_Slot_LoadFunc): Use
`FT_Int32' for fourth parameter.
* src/base/ftobjs.c (open_face): Use cast for calling
clazz->init_face.

* src/raster/ftraster.c (Set_High_Precision): Use `1' instead of
`1L'.
(Finalize_Profile_Table, Line_Up, ft_black_init): Use casts.
* src/raster/ftrend1.c (ft_raster1_render): Ditto.

* src/sfnt/sfnt_dir_check: Compare `magic' with unsigned long
constant.

* builds/amiga/include/freetype/config/ftmodule.h: Updated.
2002-09-27 11:09:23 +00:00
Werner Lemberg 5dfbdf7659 Making ftgrays.c compile stand-alone again.
* include/freetype/ftimage.h: Include ft2build.h only if _STANDALONE_
isn't defined.
* src/smooth/ftgrays.c [_STANDALONE_]: Define ft_memset,
FT_BEGIN_HEADER, FT_END_HEADER.
(FT_MEM_ZERO): Define.
(TRaster) [GRAYS_USE_GAMMA]: Use `unsigned char' instead of FT_Byte.
(gray_render_span, gray_init_gamma): Don't use `FT_UInt'.
Don't cast with `FT_Byte'.
(grays_init_gamma): Don't use `FT_UInt'.

* src/base/ftinit.c (FT_Add_Default_Modules): Improve error message.
* src/pcf/pcfdriver.c (PCF_Face_Done): Improve tracing message.
* include/freetype/config/ftoption.h (FT_MAX_MODULES): Increased
to 32.
2002-09-16 06:15:31 +00:00
David Turner 00d9f40cf7 * src/smooth/ftsmooth.c, src/base/ftobjs.c,
include/freetype/config/ftmodule.h: updated to correctly support
        sub-pixel rendering

        * include/freetype/cache/ftcimage.h, include/freetype/cache/ftcsbits.h,
        src/cache/ftcimage.c, src/cache/ftcsbit.c: updated to support sub-pixel
        rendering correctly. Definition of FTC_ImageTypeRec that replaces the
        obsolete FTC_ImageDesc, and has slightly different fields. The
        image type is now determined directly by "load_flags" values.

        * src/autohint/ahtypes.h, src/autohint/ahhint.c,
        src/pshinter/pshalgo3.c, src/pshinter/pshalgo3.h: various enhancements
        to the automatic and Postscript hinters !! and sub-pixel hinting now
        works correctly (see demo programs)
2002-09-08 21:29:11 +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 b3d5e9cf03 s/ft_memset/FT_MEM_SET/.
s/FT_MEM_SET/FT_MEM_ZERO/ where appropriate.
2002-07-28 05:05:24 +00:00
David Turner 25a6e3a167 * include/freetype/internal/ftobjs.h, src/autohint/ahglyph.c,
src/base/ftobjs.c, src/objs/fttype1.c, src/sfnt/ttcmap0.c,
    src/smooth/ftgrays.c: changed uses of "setjmp" and "longjmp"
    to "ft_setjmp" and "ft_lonjmp". Removed direct references to
    <stdio.h> and <setjmp.h> when appropriate, to eventually replace
    them with a FT_CONFIG_STANDARD_LIBRARY_H. Useful for the XFree86
    Font Server backend based on FT2.
2002-06-10 23:03:35 +00:00
Werner Lemberg 9ca7a15727 * src/base/ftmac.c (p2c_str): Removed.
(file_spec_from_path) [TARGET_API_MAC_CARBON]: Added support for
OS X.
(is_dfont) [TARGET_API_MAC_CARBON]: Define only for OS X.
Handle `nameLen' <= 6 also.
(parse_fond): Remove unused variable `name_table'.
Use functionality of old p2c_str directly.
Add safety checks.
(read_lwfn): Initialize `size_p'.
Check for size_p == NULL.
(new_memory_stream, open_face_from_buffer): Updated to FreeType 2.1.
(FT_New_Face_From_LWFN): Remove unused variable `memory'.
Remove some dead code.
(FT_New_Face_From_SFNT): Remove unused variable `stream'.
(FT_New_Face_From_dfont) [TARGET_API_MAC_CARBON]: Define only for
OS X.
(FT_New_Face_From_FOND): Remove unused variable `error'.
(ResourceForkSize): New function.
(FT_New_Face): Use it.
Handle empty resource forks.
Conditionalize some code for OS X.
Add code to call normal loader as a fallback.

Some more variable renames to avoid troubles on the Mac.

* src/raster/ftraster.c:
s/Unknown|Ascending|Descending|Flat/\1_State/.
* src/smooth/ftgrays.c: s/TScan/TCoord/.

Other changes for the Mac.

* include/freetype/config/ftconfig.h: Define FT_MACINTOSH for
Mac platforms.
* src/base/ftobjs.c: s/macintosh/FT_MACINTOSH/.

* src/raster/ftrend1.c (ft_raster1_render): Make `pitch' always
an even number.
2002-04-30 14:26:49 +00:00
Werner Lemberg 5f0ee94c06 `interface' is reserved on the Mac.
* include/freetype/ftoutln.h, include/freetype/internal/sfnt.h,
src/base/ftoutln.c: s/interface/func_interface/.
* src/base/ftbbox.c (FT_Outline_Get_BBox):
s/interface/bbox_interface/.
* src/cff/cffdrivr.c: s/interface/module_interface/.
* src/cff/cffload.c, src/cff/cffload.h:
s/interface/psnames_interface/.
* src/cid/cidriver.c: s/interface/cid_interface/.
* src/sfnt/sfdriver.c: s/interface/module_interface/.
* src/smooth/ftgrays.c: s/interface/func_interface/.
* src/truetype/ttdriver.c: s/interface/tt_interface/.
* src/type1/t1driver.c: s/interface/t1_interface/.
2002-04-30 06:37:52 +00:00
Werner Lemberg 94ffae5239 * src/cff/cffgload.c (CFF_Parse_CharStrings): s/rand/Rand/ to avoid
compiler warning.

formatting/fixing ChangeLog
2002-04-14 00:54:32 +00:00
David Turner d15bc0d13a * README.UNX: updated the Unix-specific quick-compilation guide to
warn about the GNU Make requirement at compile time..

        * include/freetype/config/ftstdlib.h,
          include/freetype/config/ftconfig.h,
          include/freetype/config/ftheader.h,
          include/freetype/internal/ftmemory.h,
          include/freetype/internal/ftobjs.h,

          src/autohint/ahoptim.c,

          src/base/ftdbgmem.c, src/base/ftdebug.c,
          src/base/ftmac.c,    src/base/ftobjs.c,
          src/base/ftsystem.c,

          src/cache/ftcimage.c, src/cache/ftcsbits.c,

          src/cff/cffdriver.c, src/cff/cffload.c, src/cff/cffobjs.c,

          src/cid/cidload.c, src/cid/cidparse.c, src/cid/cidriver.c,

          src/pcf/pcfdriver.c, src/pcf/pcfread.c,

          src/psaux/t1cmap.c, src/psaux/t1decode.c,

          src/pshinter/pshalgo1.c, src/pshinter/pshalgo2.c,
          src/pshinter/pshrec.c,

          src/psnames/psmodule.c,

          src/raster/ftraster.c,

          src/sfnt/sfdriver.c, src/sfnt/ttload.c, src/sfnt/ttpost.c,

          src/smooth/ftgrays.c,

          src/type1/t1afm.c,  src/type1/t1driver.c, src/type1/t1gload.c,
          src/type1/t1load.c, src/type1/t1objs.c,   src/type1/t1parse.c:

            added the new configuration file "ftstdlib.h" used to define
            aliases for all ISO C library functions used by the engine
            (e.g. strlen, qsort, setjmp, etc...)

            this eases the porting of FreeType 2 to exotic environments like
            XFree86 modules/extensions..

            also removed many #include <string.h>, #include <stdlib.h>, etc...
            from the engine's sources where they're not needed..
2002-04-12 09:31:48 +00:00
David Turner 2c7558ce40 * README, docs/CHANGES, Jamfile.in: updating for the 2.1.0 release 2002-04-11 14:21:16 +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 4a23351091 renaming "ft_glyph_own_bitmap" into "FT_GLYPH_OWN_BITMAP" 2002-02-24 02:39:08 +00:00
David Turner 222cec8c20 * include/freetype/internal/ftdebug.h, src/base/ftdebug.c: modified
the debug sub-system initialization. trace levels can now be specified
        within the "FT2_DEBUG" environment variable. See the comments within
        "ftdebug.c" for more details

        * include/freetype/internal/fttrace.h: new file to define the trace
        levels used for debugging. it is used both to define enums and
        toggle names for FT2_DEBUG

        * src/base/ftobjs.c, src/base/ftstream.c: FT_Assert renamed to
        FT_ASSERT

        * include/freetype/internal/ftextend.h, src/base/ftextend.c,
        src/base/Jamfile, src/base/rules.mk: removing "ftextend" from the
        library, since it is now completely obsolete..
2002-02-21 11:48:48 +00:00
Werner Lemberg e274290d71 * src/smooth/ftgrays.c (gray_render_scanline): Fix bug which caused
bad rendering of thin lines (less than one pixel thick).
2002-01-28 05:04:22 +00:00
Werner Lemberg 8880f2c14d * src/cache/ftccache.c (ftc_node_done, ftc_node_destroy): Fix
compilation warnings.
* src/base/descrip.mms (OBJS): Add `ftmm.obj'.
* src/cache/descrip.mms (ftcache.obj): Dependencies added.
2002-01-25 16:05:39 +00:00
Werner Lemberg 3975e2e1f5 Formatting. 2002-01-09 21:01:18 +00:00
David Turner db3ac3b360 small speed-up to the anti-aliased renderer 2002-01-09 10:48:25 +00:00
David Turner c8ad30a7a0 * src/base/ftglyph.c (FT_Glyph_To_Bitmap): re-ordered code for debugging
purposes..


    * src/smooth/ftsmooth.c (ft_smooth_render): fixed a nasty hidden bug where
    outline shifting wasn't correctly undone after bitmap rasterization. this
    created problems with certain glyphs (like '"' of certain fonts..) and
    the cache system..
2001-12-05 17:24:34 +00:00
Werner Lemberg c3b2160869 Formatting.
Cleaning up of ChangeLog.

* docs/license.txt: s/X Windows/X Window System/.

* src/raster/ftraster.c: Fix definition condition of MEM_Set().
* src/smooth/ftgrays.c (M_Y): Change value to 192.
* src/base/ftdbgmem.c (ft_mem_table_destroy): Fix printf() parameter.
Remove unused variable.
* src/cache/ftcimage.c (ftc_image_node_init,
ftc_image_node_compare): Remove unused variables.
* src/cache/ftcsbits.c (ftc_sbit_node_weight): Remove unused
variable.
* src/raster/ftraster.c (MEM_Set): Move definition down to avoid
compiler warning.
* src/autohint/ahhint.c (ah_hinter_hint_edges): Use UNUSED() to
avoid compiler warnings.
* src/pcf/pcfread.c (tableNames): Use `const'.
(pcf_read_TOC): Change counter name to avoid compiler warning.
Use `const'.
* src/pshinter/pshrec.c (ps_hints_close): Remove redundant
declaration.
* src/pshinter/pshalgo1.c (psh1_hint_table_init): Rename variables
to avoid shadowing.
* src/pshinter/pshalgo2.c (psh2_hint_table_activate_mask): Ditto.
* src/type1/t1objs.h: Remove double declarations of `T1_Size_Init()'
and `T1_Size_Done()'.
2001-12-05 01:22:05 +00:00
David Turner f2c56515f5 * src/pshinter/{pshalgo2.c, pshalgo1.c}: fixed stupid bug in sorting
routine that created nasty alignment artefacts.

        * src/pshinter/pshrec.c, tests/gview.c: debugging updates..

        * src/smooth/ftgrays.c: de-activated experimental gamme support,
        apparently, "optimal" gamma tables depend on the monitor type,
        resolution and general karma, so it's better to compute them outside
        of the rasterizer itself..
2001-11-20 01:29:34 +00:00
David Turner adf07a930c * src/smooth/ftgrays.c: adding experimental "gamma" support. This
produces smoother glyphs at small sizes for very little cost

	* src/autohint/ahglyph.c, src/autohint/ahhint.c: various fixes to
	the auto-hinter. They merely improve the output of sans-serif fonts.
	Note that there are still problems with serifed fonts and composites
	(accented characters)

	* tests/gview.c: updated the debugging glyph viewer to show the
	hints generated by the "autohint" module
2001-10-30 23:51:24 +00:00