Werner Lemberg
bf745003e9
[autofit] Minor optimization.
...
* src/autofit/afglobals.c (af_face_globals_compute_script_coverage):
Add loop condition.
12 years ago
Werner Lemberg
156ba42e4d
[autofit] Fix thinko.
...
* src/autofit/aftypes.h (AF_SCRIPT):
s/AF_SCRIPT_NONE/AF_SCRIPT_DUMMY/. We already use `AF_SCRIPT_NONE'
as a bit mask.
* src/autofit/afdummy.c: Updated.
12 years ago
Werner Lemberg
3683fb55c9
[autofit] Implement `increase-x-height' property.
...
* include/freetype/ftautoh.h (FT_Prop_IncreaseXHeight): New
structure.
* include/autofit/afmodule.c (af_property_get_face_globals): New
function, re-using code from `af_property_get'.
(af_property_set, af_property_get): Handle `increase-x-height'.
Updated.
12 years ago
Werner Lemberg
d180ac70fc
[autofit] Implement Infinality's `increase glyph heights'.
...
This is an improved version of a similar fix contained in the
so-called `Infinality patch', taken from
http://www.infinality.net/fedora/linux/zips/freetype-infinality-2.4.10-20120616_01-x86_64.tar.bz2
which addresses various enhancements of the auto-hinter. Without
properties to control a module's metadata it wasn't possible to
adapt the patches because everything was originally controlled by
environment variables which I consider not suitable in general.
A patch to control `increase_x_height' follows.
* src/autofit/afglobal.h (AF_PROP_INCREASE_X_HEIGHT_MIN,
AF_PROP_INCREASE_X_HEIGHT_MAX): New macros.
(AF_FaceGlobalsRec): Add `increase_x_height' member.
* src/autofit/afglobal.c (af_face_globals_new): Initialize it.
* src/autofit/aflatin.c (af_latin_metrics_scale_dim),
* src/autofit/aflatin2.c (af_latin2_metrics_scale_dim): Implement
handling of `increase_x_height'.
12 years ago
Werner Lemberg
842c4ea258
[autofit] Add hierarchical property access to some structures.
...
* src/autofit/afglobal.h: Include `afmodule.h'.
(AF_FaceGlobalsRec): Add `module' member.
(AF_FaceGlobals): Typedef moved to...
* src/autofit/aftypes.h: Here.
(AF_ScriptMetricsRec): Add `globals' member.
* src/autofit/afglobal.c (af_face_globals_new,
af_face_globals_compute_script_coverage,
af_face_globals_get_metrics): Updated.
* src/autofit/afloader.c (af_loader_reset), src/autofit/afmodule.c
(af_property_get): Updated.
12 years ago
Werner Lemberg
273e2b796f
Cosmetics.
12 years ago
Werner Lemberg
ebda8b3257
Fix Savannah bug #37350 .
...
* src/type1/t1parse.c (T1_Get_Private_Dict) <found>: Check for ASCII
storage only if we actually have at least four bytes.
12 years ago
Werner Lemberg
d4ec007541
[autofit] Implement `fallback-script' property.
...
* src/autofit/afglobal.c: s/default_script/fallback_script/.
* src/autofit/afglobal.h: s/AF_SCRIPT_DEFAULT/AF_SCRIPT_FALLBACK/.
* src/autofit/afmodule.c: s/default_script/fallback_script/.
(af_property_set, af_property_get): Implement `fallback-script'.
* src/autofit/afmodule.h: s/default_script/fallback_script/.
* include/freetype/ftautoh.h: Document it.
12 years ago
Werner Lemberg
44e1f0d3a0
[autofit] Correct previous Unicode 6.1.0 change.
...
The auto-hinter's latin module only handles latin ligatures in the
`Alphabetical Presentation Forms' block.
* src/autofit/aflatin.c (af_latin_uniranges): Fix it.
12 years ago
Werner Lemberg
ce92c5fabe
* src/autofit/afmodule.c: s/FT_Err_/AF_Err_/.
12 years ago
Werner Lemberg
d0014f2ccb
[autofit] Make default script a global property.
...
* src/autofit/afmodule.h (AF_ModuleRec): Add `default_script' field.
* src/autofit/afglobal.c (af_face_globals_compute_script_coverage,
af_face_globals_new), src/autofit/afloader.c (af_loader_reset),
src/autofit/afmodule.c (af_property_get) <glyph-to-script-map>,
af_autofitter_init:
Handle default script.
* src/autofit/afglobal.h: Updated.
12 years ago
Werner Lemberg
073a4cefbd
Use `FT_Module' instead of `FT_Library' argument in property funcs.
...
This internal change simplifies access to global module data.
* include/freetype/internal/services/svprop.h
(FT_Properties_SetFunc, FT_Properties_GetFunc): Change accordingly.
* src/base/ftobjs.c (ft_property_do), src/autofit/afmodule.c
(af_property_set, af_property_get): Updated.
12 years ago
Werner Lemberg
8ae2a65e09
[autofit] Update to Unicode 6.1.0.
...
* src/autofit/afcjk.c (af_cjk_uniranges), src/autofit/aflatin.c
(af_latin_uniranges): Add and fix ranges.
12 years ago
Werner Lemberg
95dae1c47a
[autofit] Pass `AF_Module' instead of `AF_Loader'.
...
We want to access the (not yet existing) module's global data later
on.
* src/autofit/afloader.c: Include `afmodule.h'.
(af_loader_init, af_loader_reset, af_loader_done,
af_loader_load_glyph): Change accordingly.
* src/autofit/afmodule.c (AF_ModuleRec): Move to `afmodule.h'.
Updated.
* src/autofit/afmodule.h: Include `afloader.h'.
(AF_ModuleRec): Define here.
* src/autofit/afloader.h (AF_Module): Define here.
Updated.
12 years ago
Werner Lemberg
6d29c5cbe3
[autofit] Fix `make multi'.
...
* include/freetype/internal/fttrace.h: Add `afmodule'.
* src/autofit/afmodule.c: Include FT_INTERNAL_DEBUG_H.
(FT_COMPONENT): Define.
12 years ago
Werner Lemberg
688da8eea7
* src/autofit/afmodule.c: s/FT_Autofitter/AF_Module/.
12 years ago
Werner Lemberg
7bbbcbfb1a
[autofit] Minor reorganization.
...
* src/autofit/afglobal.c (AF_SCRIPT_LIST_DEFAULT,
AF_SCRIPT_LIST_NONE, AF_DIGIT): Move to...
* src/autofit/afglobal.h (AF_SCRIPT_DEFAULT, AF_SCRIPT_LIST_NONE,
AF_DIGIT): This and update code.
13 years ago
Werner Lemberg
2be60cfe7e
[autofit] Implement `glyph-to-script-map' property.
...
* include/freetype/ftautoh.h: New public header file.
* include/freetype/config/ftheader.h (FT_AUTOHINTER_H): New macro.
* src/autofit/afglobal.c (AF_FaceGlobalsRec): Move structure to...
* src/autofit/afglobal.h: This header file.
* src/autofit/afmodule.c: Include FT_AUTOHINTER_H.
(af_property_get): Handle `glyph-to-script-map'.
13 years ago
Werner Lemberg
7f316f22d1
[autofit] Implement properties service framework.
...
No properties are added yet.
* src/autofit/afmodule.c: Include FT_SERVICE_PROPERTIES_H.
(af_property_set, af_property_get): New dummy functions.
(af_service_properties, af_services, af_get_interface): Provide
service setup.
(autofit_moduleclass): Add service interface.
* src/autofit/afpic.c: Add necessary forward declarations.
(autofit_module_class_pic_init): Add code for service addition.
(autofit_module_pic_free): Add code for service removal.
* src/autofit/afpic.h (AF_SERVICES_GET, AF_SERVICE_PROPERTIES_GET):
New macros which provide necessary syntactical sugar for PIC
support.
13 years ago
Werner Lemberg
0f8fd88e83
Implement properties to control FreeType modules.
...
* include/freetype/fterrdef.h (FT_Err_Missing_Property): New error
code.
* include/freetype/ftmodapi.h (FT_Property_Set, FT_Property_Get):
New API.
* include/freetype/internal/services/svprop.h: New file.
* include/freetype/internal/ftserv.h (FT_SERVICE_PROPERTIES_H): New
macro.
* src/base/ftobjs.c: Include FT_SERVICE_PROPERTIES_H.
(ft_property_do, FT_Property_Set, FT_Property_Get): New functions.
13 years ago
Werner Lemberg
590344cde0
[docmaker] Allow `-' in tags and identifiers.
...
* src/tools/docmaker/content.py (re_identifier),
src/tools/docmaker/sources.py (re_markup_tag1, re_markup_tag2,
re_crossref): Add `-' in patterns.
13 years ago
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.
13 years ago
Werner Lemberg
06e31e9b5e
[truetype] Fix compilation warning.
...
* src/truetype/ttgload.c (IS_HINTED): Move macro to...
* src/truetype/ttobjs.h: This header file.
13 years ago
Werner Lemberg
d9bf44a430
[autofit, cff, pshinter, psnames] More renamings for orthogonality.
...
* src/autofit/afmodule.c, src/autofit/afpic.h:
s/AF_AUTOFITTER_/AF_/.
* src/cff/cffdrivr.c, src/cff/cffobjs.c, src/cff/cffparse.c,
src/cff/cffpic.h: s/FT_CFF_/CFF_/.
* src/pshinter/pshmod.c, src/pshinter/pshpic.h:
s/FT_PSHINTER_/PSHINTER_/.
* src/psnames/psmodule.c, src/psnames/pspic.h:
s/FT_PSCMAPS/PSCMAPS_/.
13 years ago
Werner Lemberg
0c633e3fcd
[sfnt, truetype] More renamings for orthogonality.
...
* src/sfnt/sfdriver.c, src/sfnt/sfntpic.h, src/sfnt/ttcmap.c,
src/truetype/ttdriver.c, src/truetype/ttpic.h: s/FT_SFNT_/SFNT_/,
s/FT_TT_/TT_/, s/GET_CMAP_INFO_GET/CMAP_INFO_GET/.
13 years ago
Werner Lemberg
d0841ea73b
[autofit] Some macro and variable renamings for orthogonality.
...
* include/freetype/internal/autohint.h, src/base/ftobjs.c,
src/autofit/afmodule.c, src/autofit/afpic.c, src/autofit/afpic.h:
s/SERVICE/INTERFACE/, s/service/interface/, s/Service/Interface/.
13 years ago
Werner Lemberg
b355b5693a
Fix Savannah bug #37178 .
...
* src/base/ftobjs.c (FT_Open_Face): Initialize `error' with
`FT_Err_Missing_Module' before loop to indicate `no valid drivers'.
13 years ago
Werner Lemberg
04affa270b
* src/base/ftsynth.c (FT_GlyphSlot_Oblique): Fix shear angle.
...
The old value was far too large (more than 20°). The new one
corresponds to 12°, quite common in typography.
13 years ago
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.
13 years ago
Werner Lemberg
5b995a8dd8
[autofit] Improve recognition of flat segments.
...
Problem reported by Brad Dunzer <BDunzer@extensis.com>.
* src/autofit/aflatin.c (af_latin_metrics_init_blues): We have
a flat segment if the horizontal distance of best on-points is
larger than a given threshold.
13 years ago
Werner Lemberg
e194d7cd61
[autofit] Variable renamings.
...
* src/autofit/aflatin.c (af_latin_metrics_init_blues): Replace
`glyph' with `outline'.
s/best_first/best_contour_first/.
s/best_last/best_contour_last/.
13 years ago
Werner Lemberg
5cdeb3cd60
Fix Savannah bug #37000 .
...
* src/type1/t1load.c (parse_encoding): Fix order of checks.
13 years ago
Werner Lemberg
6b440425fc
Fix Savannah bug #36833 .
...
* src/psaux/t1decode.c (t1operator_seac): `seac' is not a valid
operator if we want metrics only.
13 years ago
Werner Lemberg
01b508f247
Fix Savannah bug #36832 .
...
* src/type1/t1load.c (parse_charstrings): Reject negative number of
glyphs.
13 years ago
Werner Lemberg
a8c243514c
Fix Savannah bug #36829 .
...
* src/type1/t1load.c (parse_encoding): Check cursor position after
call to T1_Skip_PS_Token.
13 years ago
Alexei Podtelezhnikov
45337b07a7
[ftstroke] Fix uninitialized return value.
...
* src/base/ftstroke.c (FT_Stroker_New): Return FT_Err_Ok instead.
13 years ago
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.
13 years ago
Werner Lemberg
26472b4f16
Fix compilation with MSVC 5.0.
...
Problem reported by Peter Breitenlohner and Akira Kakuto.
* include/freetype/config/ftstdlib.h (ft_setjmp): Updated.
* src/sfnt/ttcmap.c (tt_face_build_cmaps): Remove cast.
13 years ago
Werner Lemberg
5a0af493e4
[autofit] Improve debugging messages; do some code cleanup.
...
* src/autofit/aflatin.c (af_latin_align_linked_edge,
af_latin_hint_edges): Synchronize with formatting used in the
ttfautohint project.
13 years ago
Gilles Espinasse
9123404c57
Fix strict-aliasing warning.
...
* src/base/ftglyph.c (FT_Glyph_To_Bitmap): Avoid double cast.
13 years ago
Dave Thomas
fec113d724
[ARM] Fix FT_MulFix_arm.
...
* include/freetype/config/ftconfig.h (FT_MulFix_arm) [__arm__]:
Avoid ADDS instruction to clobber condition codes.
13 years ago
Werner Lemberg
b6978dd0c9
[autofit] Do some code cleanup.
...
* src/autofit/afglobal.c (af_face_globals_new): Simplify.
* src/autofit/afhints.c: Use `FT_TRACE7' instead of `printf'
everywhere.
(FT_COMPONENT): New macro.
(af_glyph_hints_done): Simplify.
* include/freetype/internal/fttrace.h: Updated.
13 years ago
Werner Lemberg
fd5ae9599a
[autofit] Improve output of debugging information.
...
* src/autofit/afhints.c (af_glyph_hints_dump_segments): Print more
data; report no data.
(af_glyph_hints_dump_edges): Report no data.
13 years ago
Werner Lemberg
5210306145
Fix Savannah bug #36091 .
...
* src/autofit/aflatin.c (af_latin_metrics_init_blues),
src/autofit/aflatin2.c (af_latin2_metrics_init_blues): Change the
constraint for testing round vs. flat segment: Accept either a
small distance or a small angle.
13 years ago
Werner Lemberg
09e9b59605
[autofit] Beautify blue zone tracing.
...
* src/autofit/aflatin.c (af_latin_metrics_init_blues),
src/autofit/aflatin2.c (af_latin2_metrics_init_blues): Implement it.
13 years ago
Werner Lemberg
2a9c4552f6
[autofit] Quantize stem widths.
...
* src/autofit/afangles.c (af_sort_widths): Rename to...
(af_sort_and_quantize_widths): This.
Add code to avoid stem widths which are almost identical.
* src/autofit/aftypes.h, src/autofit/aflatin.c, src/autofit/afcjk.c:
Updated.
13 years ago
Werner Lemberg
d4cbbf35d4
[autofit] Minor speed-up.
...
* src/autofit/afangles (af_sort_pos, af_sort_widths): Don't swap
elements if they are equal.
13 years ago
Werner Lemberg
ad866e2c9a
Fix `checking if gcc static flag -static works' test.
...
On my linux build tree, I receive yes answer in in every package I
build except freetype for this test checking if gcc static flag
`-static' works
On freetype, no is received, unless bzip2 and zlib are disabled using
./configure --without-bzip2 --without-zlib
The reason is that bzip2 and zlib tests add `-lz' and `-lbz2' to
LDFLAGS and this broke static flag test.
* builds/unix/configure.raw: Update CFLAGS and LDFLAGS only after
LT_INIT has run.
13 years ago
Infinality
d0a827b340
[truetype] Fix various artifacts.
13 years ago
Gilles Espinasse
34de9d2644
Fix CFLAGS and LDFLAGS share configure test.
...
* builds/unix/configure.raw: Fix typo.
13 years ago