Commit Graph

96 Commits

Author SHA1 Message Date
Werner Lemberg 84f034aed9 A first try to integrate the Infinality patches for the autohinter.
It provides a framework for properties and adds a single property, `adjust
glyph heights'.
2012-02-08 07:31:32 +01:00
Werner Lemberg c52f44d4fd Whitespace. 2011-11-30 10:46:53 +01:00
Werner Lemberg 4696dde23d * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Fix change
from 2011-05-04.
2011-06-20 19:09:02 +02:00
Werner Lemberg 58d1a5ee74 [autofit] Remove unused structure member.
* src/autofit/afhints.h (AF_SegmentRec): Remove `contour'.
* src/autofit/aflatin.c (af_latin_hints_compute_segments),
src/autofit/aflatin2.c (af_latin2_hints_compute_segments): Updated.
2011-06-08 09:32:56 +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
Werner Lemberg 735e5abb7b [autofit] Improve tracing of hinting process.
* src/autofit/aflatin.c (af_latin_hint_edges): Add tracing message
`ADJUST'.
2011-05-27 10:22:42 +02:00
Werner Lemberg a3a0f57a1d * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Simplify. 2011-05-04 06:14:30 +02:00
Werner Lemberg c3135e43f5 [autofit] Fix and add comments. 2011-05-02 06:04:15 +02:00
Werner Lemberg b9aa1f1339 [autofit] Improve tracing messages.
* src/autofit/aflatin.c (af_latin_metrics_init_blues,
af_latin_align_linked_edge, af_latin_hint_edges): Do it.
2011-04-28 09:09:45 +02:00
Werner Lemberg d503b1bce2 Integrate autofitter debugging stuff.
* devel/ftoption.h, include/freetype/config/ftoption.h
(FT_DEBUG_AUTOFIT): New macro.

* include/freetype/internal/fttrace.h: Add trace components for
autofitter.

* src/autofit/aftypes.h (AF_LOG): Removed.
(_af_debug): Removed.

* src/autofit/*: s/AF_DEBUG/FT_DEBUG_AUTOFIT/.
s/AF_LOG/FT_TRACE5/.
Define FT_COMPONENT where necessary.
2011-04-18 19:05:28 +02:00
Werner Lemberg 948a8fb674 Fix formatting of autofit debug dumps.
* src/autofit/afhints.c (af_glyph_hints_dump_points,
af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Adjust
column widths.
2011-04-04 13:02:08 +02:00
Werner Lemberg 9f5ed8118c Cosmetics. 2011-04-02 07:23:00 +02:00
Werner Lemberg 544adf7313 Whitespace, typo. 2011-04-02 07:15:33 +02:00
Werner Lemberg c7f26a1982 C++ compilation fixes.
* src/autofit/aflatin.c (af_latin_hints_apply), src/autofit/afcjk.c
(af_cjk_hints_apply): Use cast for `dim'.
2011-03-19 02:28:21 +01:00
Werner Lemberg 576fc2c06e Add AF_CONFIG_OPTION_USE_WARPER to control the autofit warper.
* devel/ftoption.h, include/freetype/config/ftoption.h
(AF_CONFIG_OPTION_USE_WARPER): New macro.
* src/autofit/aftypes.h (AF_USE_WARPER): Remove.

* src/autofit/*: s/AF_USE_WARPER/AF_CONFIG_OPTION_USE_WARPER/.

* src/autofit/afwarp.c [!AF_CONFIG_OPTION_USE_WARPER]: Replace dummy
variable assignment with a typedef.
2011-03-02 03:52:36 +01:00
Werner Lemberg e547a656a5 [autofit] More comments, formatting, whitespace. 2011-02-26 18:39:10 +01:00
Werner Lemberg b7fc0c7461 [autofit] Slight simplifications.
* src/autofit/aflatin.c (af_latin_hints_link_segments): Remove
test which always returns false.
(af_latin_hints_compute_blue_edges): Remove redundant assignment.
2011-02-26 18:36:21 +01:00
Werner Lemberg 6c28689691 [autofit] Comment out unused code.
* src/autofit/aflatin.c, src/autofit/aflatin2.c
(af_latin_hints_compute_edges): Do it.
2011-02-24 05:52:14 +01:00
Werner Lemberg 5220ef58c5 Fix minor issues reported by <muktha.narayan@wipro.com>.
* src/autofit/aflatin.c (af_latin_compute_stem_width): Remove
redundant conditional check.
* src/base/ftsynth.c (FT_GlyphSlot_Embolden): Ditto.
* src/cff/cffload.c (cff_encoding_load): Remove conditional check
which always evaluates to `true'.
* src/pshinter/pshalgo.c (ps_glyph_interpolate_strong_points):
Ditto.
* src/truetype/ttinterp.c (Ins_IUP): Ditto.
* src/cid/cidgload.c (cid_slot_load_glyph): Don't check for NULL if
value is already dereferenced.
* src/winfonts/winfnt.c (FNT_Load_Glyph): Fix check of `face'.
2010-09-13 07:32:22 +02:00
Werner Lemberg 09344385ee autofit: Remove dead code.
Suggested by Graham.

* src/autofit/afhints.c (af_glyph_hints_compute_inflections):
Removed.
(af_glyph_hints_reload): Remove third argument.
Update all callers.
2010-05-22 07:43:22 +02:00
Werner Lemberg 7635ba64b7 Really fix FreeDesktop bug #21197.
This also fixes Savannah bug #28021.

* src/autofit/aflatin.c (af_latin_metrics_check_digits),
src/autofit/aflatin2.c (af_latin2_metrics_check_digits): Fix loop.
2009-11-15 10:17:44 +01:00
suzuki toshiya 76f1b9d9cf [autofit] Fix for multi build. 2009-09-25 23:57:30 +09:00
suzuki toshiya 87054758fb autofit: Fix some data types mismatching with their sources. 2009-08-01 00:32:08 +09:00
suzuki toshiya b56680240a autofit: Count the size of the memory object by ptrdiff_t. 2009-08-01 00:32:07 +09:00
suzuki toshiya 38e480b4c6 autofit: Improve Unicode range definitions. 2009-08-01 00:30:21 +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 b34c9b49cc aflatin.c: Fix compiler warning. 2009-06-20 06:32:23 +02:00
Werner Lemberg 8b84c9d19f autohinter: Don't change digit widths if all widths are the same.
This fixes FreeDesktop bug #21197.

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

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

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

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

* docs/CHANGES: Document it.
2009-04-27 19:40:35 +02:00
Oran Agra 59b4af8d59 Position Independent Code (PIC) support in autofit module.
* include/freetype/internal/autohint.h add macros to init
instances of FT_AutoHinter_ServiceRec.

* src/autofit/afmodule.h declare autofit_module_class
using macros from ftmodapi.h,
when FT_CONFIG_OPTION_PIC is defined create and destroy
functions will be declared.
* src/autofit/afmodule.c when FT_CONFIG_OPTION_PIC is defined
af_autofitter_service and autofit_module_class structs
will have functions to init or create and destroy them
instead of being allocated in the global scope.
And macros will be used from afpic.h in order to access them.

* src/autofit/aftypes.h add macros to init and declare
instances of AF_ScriptClassRec.

* src/autofit/afcjk.h declare af_cjk_script_class
using macros from aftypes.h,
when FT_CONFIG_OPTION_PIC is defined init function will be declared.
* src/autofit/afcjk.c when FT_CONFIG_OPTION_PIC is defined
af_cjk_script_class struct will have function to init it instead of
being allocated in the global scope.

* src/autofit/afdummy.h declare af_dummy_script_class
using macros from aftypes.h,
when FT_CONFIG_OPTION_PIC is defined init function will be declared.
* src/autofit/afdummy.c when FT_CONFIG_OPTION_PIC is defined
af_dummy_script_class struct will have function to init it instead of
being allocated in the global scope.

* src/autofit/afindic.h declare af_indic_script_class
using macros from aftypes.h,
when FT_CONFIG_OPTION_PIC is defined init function will be declared.
* src/autofit/afindic.c when FT_CONFIG_OPTION_PIC is defined
af_indic_script_class struct will have function to init it instead of
being allocated in the global scope.

* src/autofit/aflatin.h declare af_latin_script_class
using macros from aftypes.h,
when FT_CONFIG_OPTION_PIC is defined init function will be declared.
* src/autofit/aflatin.c when FT_CONFIG_OPTION_PIC is defined
af_latin_script_class struct will have function to init it instead of
being allocated in the global scope.
Change af_latin_blue_chars to be PIC-compatible by being a two
dimentional array rather than array of pointers.


* src/autofit/aflatin2.h declare af_latin2_script_class
using macros from aftypes.h,
when FT_CONFIG_OPTION_PIC is defined init function will be declared.
* src/autofit/aflatin2.c when FT_CONFIG_OPTION_PIC is defined
af_latin2_script_class struct will have function to init it instead of
being allocated in the global scope.
Change af_latin2_blue_chars to be PIC-compatible by being a two
dimentional array rather than array of pointers.

* src/autofit/afglobal.c when FT_CONFIG_OPTION_PIC is defined
af_script_classes array initialization was moved to afpic.c and
is later refered using macros defeined in afpic.h.

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

* src/autofit/autofit.c add new file to build: afpic.c.
* src/autofit/jamfile add new files to FT2_MULTI build: afpic.c.
2009-04-05 18:23:38 +03:00
Werner Lemberg b6fa845146 * src/autofit/aflatin.c (af_latin_hint_edges),
src/autofit/aflatin2.c (af_latin2_hint_edges), src/autofit/afcjk.c
(af_cjk_hint_edges): Protect against division by zero.
2008-12-21 09:46:31 +00:00
Werner Lemberg e3b083c65b * src/autofit/aflatin.c (af_latin_uniranges): Add more ranges. This
fixes Savannah bug #21190 which also provides a basic patch.
2008-12-05 22:50:40 +00:00
Werner Lemberg 1e1b6dff54 * src/pfr/pfrcmap.c: Include pfrerror.h.
* src/autofit/afindic.c: Add some external declarations to pacify
`make multi' compilation.

* src/cid/cidgload.c (cid_load_glyph): Pacify compiler.

* src/cff/cffdrivr.c (cff_ps_get_font_info), src/cff/cffobjs.c
(cff_strcpy), include/freetype/internal/ftmemory.h (FT_MEM_STRDUP),
src/autofit/aflatin.c (af_latin_hints_compute_edges),
src/autofit/afcjk.c (af_cjk_hints_compute_edges), src/sfnt/ttmtx.c
(tt_face_get_metrics), src/base/ftobjs.c (open_face)
[FT_CONFIG_OPTION_INCREMENTAL]: Fix compilation with C++ compiler.

* docs/release: Mention test compilation targets.
2007-07-07 07:30:40 +00:00
Werner Lemberg 3b0e500601 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Initialize
`round' to pacify compiler.

Really commit changes which have been used to build release 2.3.5.
2007-07-03 04:48:19 +00:00
David Turner 74cc0e9ee4 * src/truetype/ttinterp.c: add missing variable initialization,
gets rid of Valgrind fixes.

	* src/autofit/aflatin.c: get rid of an infinite loop in the case
	of degenerate fonts.
2007-06-30 22:54:12 +00:00
Werner Lemberg 46dde4953a * src/autofit/aflatin.c (af_latin_uniranges): Expand structure to
cover all ranges which could possibly be handled by the aflatin
module (since the default fallback for unknown ranges is now the
afcjk module).  It might be necessary to fine-tune this further by
splitting off modules for Greek, Cyrillic, or other blocks.
2007-06-14 03:59:02 +00:00
Werner Lemberg 49e18b8d5f formatting 2007-06-11 21:15:09 +00:00
David Turner b38c15da09 fix bug #19565, which was caused by an incorrect segment link computation 2007-06-11 19:36:48 +00:00
David Turner b792017faf experimental changes for the Latin auto-hinter.
note that the new code is disabled by default.
2007-06-11 05:37:35 +00:00
Werner Lemberg 94be20ea82 * src/truetype/ttinterp.c (Ins_IP), src/autofit/aflatin.c
(af_latin_metrics_scale_dim): Fix compiler warnings.
2007-05-09 20:02:55 +00:00
Werner Lemberg 94f1227f32 formatting; improved ChangeLog entries 2007-04-03 07:19:53 +00:00
David Turner e6472c1251 detect "extra-light" fonts in the auto-hinter in order to avoid producing weird results with them 2007-04-02 13:13:54 +00:00
Werner Lemberg 644b1ad49e * builds/win32/visualc/index.html,
builds/win32/visualc/freetype.dsp,
builds/win32/visualc/freetype.vcproc, README: s/2.3.2/2.3.3/,
s/232/233/.

* docs/CHANGES: Mention ftdiff.
2007-03-28 21:17:11 +00:00
David Turner f58caa09bc fix autofit's blue zone computations: it now ignores 1-point contours that
correspond to mark attach coordinates, and not to the real glyph outline
2007-03-26 12:39:25 +00:00
Werner Lemberg 3d92f08bc5 * include/freetype/config/ftstdlib.h (ft_strstr): New wrapper
macro for `strstr'.

* src/truetype/ttobjs.c (tt_face_init): Use ft_strstr for scanning
`trick_names', as suggested by Ivan Nincic.
2007-03-06 11:59:24 +00:00
Werner Lemberg a091517a04 * src/truetype/ttinterp.c (Ins_MD): Remove unused variable.
* src/autofit/aflatin.c (af_latin_hints_link_segments): Ditto.
2007-02-16 08:12:50 +00:00
Werner Lemberg 3cd6cc24f2 formatting 2007-02-16 08:10:17 +00:00
David Turner a6bdb667d9 better handling of serif segments in the Latin auto-fitter, gets rid of
broken "9" in Arial 9pt/96dpi
2007-02-12 22:33:48 +00:00
Werner Lemberg b1be9e8b57 * src/cff/cffload.c (cff_index_get_pointers): Handle last entry
correctly.  This fixes Savannah bug #18867.

* docs/CHANGES: Document it.

Other formatting.
2007-01-25 11:50:00 +00:00
David Turner b6de8d1d3f * src/autofit/aflatin.c, src/autofit/aftypes.h, src/autofit/afwarp.h,
src/autofit/afwarp.c: fix and enable the warper to improve "light"
        hinting mode. This is not necessarily a final version, but it seems
        to work well
2007-01-23 15:51:50 +00:00
Werner Lemberg b4142d5126 Whitespace and spelling fixes from Alexei.
Formatting, copyright years.
2007-01-17 12:45:26 +00:00