* include/freetype/config/ftoption.h
(AF_CONFIG_OPTION_TT_SIZE_METRICS): New option, commented out by
default.
* src/autofit/afloader.c (af_loader_load_glyph): Use
AF_CONFIG_OPTION_TT_SIZE_METRICS to guard the corresponding code.
This mode uses fractional advance widths and doesn't scale glyphs
horizontally, only applying vertical scaling and hinting.
At the same time, the behaviour of the `light' auto-hinter gets
restored for backwards compatibility: Both vertical and horizontal
scaling is again based on rounded metrics values (this was changed
in a commit from 2017-03-30 as a side effect). To be more precise,
the behaviour is restored for TrueType fonts only; for other font
formats like Type 1, this is a new feature of the `light' hinting
mode.
* include/freetype/freetype.h (FT_LOAD_TARGET_SLIGHT): New macro.
(FT_RENDER_MODE_SLIGHT): New render mode.
* include/freetype/internal/ftobjs.h (FT_Size_InternalRec): Add
`autohint_mode' and `autohint_metrics' fields.
* src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c
(af_latin_hints_init), src/autofit/aflatin2 (af_latin2_hints_init):
Updated.
* src/autofit/afloader.c (af_loader_embolden_glyph_in_slot): Use
`autohint_metrics'.
(af_loader_load_glyph): s/internal/slot_internal/.
Initialize `autohint_metrics' and `autohint_mode' depending on
current auto-hint mode.
Use `autohint_metrics'.
Updated.
* src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Updated.
* src/base/ftobjs.c (FT_Load_Glyph): Updated.
(FT_New_Size): Allocate `internal' object.
* src/pshinter/pshalgo.c (ps_hints_apply): Updated.
* src/smooth/ftsmooth.c (ft_smooth_render): Updated.
We are going to extend this later on.
* include/freetype/internal/ftobjs.h (FT_Size_InternalRec): New
structure with a single field `module_data'.
* src/base/ftobjs.c (FT_New_Size): Allocate `internal' field of
`FT_Size' structure.
* src/cff/cffgload.c (cff_builder_init, cff_decoder_prepare): Use
`size->internal->module_data' instead of `size->internal'.
* src/cff/cffobjs.c (cff_size_done): Deallocate `module_data'.
(cff_size_init, cff_size_select, cff_size_request): Use
`size->internal->module_data' instead of `size->internal'.
* src/cif/cidobjs.c (cid_size_done, cid_size_init,
cid_size_request): Use `size->internal->module_data' instead of
`size->internal'.
* src/psaux/psobjs.c (t1_builder_ini): Use
`size->internal->module_data' instead of `size->internal'.
* src/type1/t1objs.c (T1_Size_Done, T1_Size_Init, T1_Size_Request):
Use `size->internal->module_data' instead of `size->internal'.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=981
* include/freetype/fterrdef.h (FT_Err_DEF_In_Glyf_Bytecode): New
error code.
* src/truetype/ttinterp.c (Ins_FDEF, Ins_IDEF): Prohibit execution
of these two opcodes in `glyf' bytecode.
(TT_RunIns): Don't enforce reexecution of `fpgm' and `prep' bytecode
in case of error since function tables can no longer be modified
(due to the changes in `Ins_FDEF' and `Ins_IDEF'). This change can
enormously speed up handling of broken fonts.
We have to make a separate case for Windows 64's LLP64 data model.
* builds/unix/ftconfig.in, builds/vms/ftconfig.h,
include/freetype/config/ftconfig.h (FT_UINT_TO_POINTER): New macro.
* src/truetype/ttgload.c (load_truetype_glyph): Use it.
Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
* include/freetype/internal/tttypes.h (TT_FaceRec): New fields
`var_postscript_prefix' and `var_postscript_prefix_len'.
* src/sfnt/sfdriver.c: Include FT_TRUETYPE_IDS_H.
(sfnt_is_alphanumeric): New wrapperfunction for `ft_isalnum'.
(get_win_string, get_apple_string): Remove `const' from return
value.
(MAX_VALUE_DESCRIPTOR_LEN, MAX_PS_NAME_LEN): New macros.
(hexdigits): New array.
(sfnt_get_var_ps_name): New function, implementing Adobe TechNote
5902 to construct a PS name for a variation font instance.
(sfnt_get_ps_name): Call `sfnt_get_var_ps_name' for font instances.
* src/sfnt/sfobjs.c (sfnt_done_face): Updated.
* src/truetype/ttgxvar.c (tt_set_mm_blend): Reset
`face->postscript_name' to trigger recalculation for new instance
parameters.
* include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func):
Add `normalizedcoords' argument.
* src/truetype/ttgxvar.h (GX_BlendRec): Add `coords' field to store
the design coordinates of the current instance.
Updated.
* src/truetype/ttgxvar.c (TT_Set_MM_Blend): Move functionality to...
(tt_set_mm_blend): ... New function.
Convert data in `normalizedcoords' array to `coords' array on
demand.
(TT_Set_Var_Design): Store argument data in `coords' array.
(TT_Get_Var_Design): Get data from `coords' array.
(tt_get_var_blend): Updated.
(tt_done_blend): Updated.
* src/cff/cffload.c, src/cff/cffload.h (cff_get_var_blend): Updated.
* src/cff/cf2ft.c (cf2_getNormalizedVector): Updated.
* src/cff/cffobjs.c (cff_face_init): Updated.
We need this for support of the `random' operator.
* include/freetype/ftcffdrv.h (FT_PARAM_TAG_RANDOM_SEED): New macro.
* include/freetype/internal/ftobjs.h (FT_Face_InternalRec): New
field `random_seed'.
* src/cff/cffobjs.h (CFF_DriverRec): New field `random_seed'.
This commit provides the framework, to be filled with something
useful in the next commits.
* include/freetype/freetype.h (FT_Face_Properties): Declare.
* src/base/ftobjs.c (FT_Face_Properties): New function.
* include/freetype/internal/tttypes.h (TT_LangTagRec): New
structure.
(TT_NameTableRec): Add fields `numLangTagRecords' and `langTags'.
* src/sfnt/ttload.c (tt_face_load_name): Add support for language
tags.
Reduce array size of name strings in case of invalid entries.
(tt_face_free_name): Updated.
* docs/CHANGES: Updated.
Show more macros in the reference: TT_MAC_LANGID_XXX, TT_MS_LANGID_XXX,
TT_NAME_ID_XXX, TT_UCR_XXX.
This commit is viewed best with
git diff --color-words='[^*/ ]+'
The change from 2016-09-29 was too radical (except for people using
the openSuSE GNU/Linux distribution). To ameliorate the situation,
PCF_CONFIG_OPTION_LONG_FAMILY_NAMES gets introduced which controls
the feature; if set, a new PCF property option
`no-long-family-names' can be used to switch this feature off.
* include/freetype/config/ftoption.h, devel/ftoption.h
(PCF_CONFIG_OPTION_LONG_FAMILY_NAMES): New option.
* include/freetype/ftpcfdrv.h: New header file (only containing
comments currently, used for building the documentation).
* include/freetype/config/ftheader.h (FT_PCF_DRIVER_H): New macro.
* src/pcf/pcf.h (PCF_Driver): Add `no_long_family_names' field.
* src/pcf/pcfdrivr.c: Include FT_SERVICE_PROPERTIES_H and
FT_PCF_DRIVER_H.
(pcf_property_set, pcf_property_get): New functions.
(pcf_service_properties): New service.
(pcf_servives): Updated.
(pcf_driver_init) [PCF_CONFIG_OPTION_LONG_FAMILY_NAMES]: Handle
`no_long_family_names'.
* src/pcf/pcfread.c (pcf_load_font): Handle `no_long_family_names'
and PCF_CONFIG_OPTION_LONG_FAMILY_NAMES.
* docs/CHANGES: Updated.
* include/freetype/internal/tttypes.h (TT_FACE_FLAG_VAR_XXX):
Remove all flags related to MVAR; replace it with...
(TT_FACE_FLAG_VAR_MVAR): ...this new macro.
(TT_Face): Remove `mvar_support' field (which was still unused).
* include/freetype/internal/tttypes.h (TT_FACE_FLAG_VAR_XXX):
New macros describing available functionality of various OpenType
tables related to font variation.
(TT_Face): New fields `variation_support' and `mvar_support',
replacing and extending `use_fvar'.
* src/sfnt/sfobjs.c (sfnt_init_face, sfnt_load_face): Use
`variation_support'.
* src/truetype/ttgxvar.c (ft_var_load_hvar): Set `variation_support'
field.
(TT_Vary_Apply_Glyph_Deltas): Updated.
In particular, we need access to named instance data.
* include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func):
Add argument for `FT_MM_Var'.
* src/cff/cffload.c (cff_get_var_blend): Updated.
* src/cff/cffload.h: Updated.
* src/cff/cf2ft.c (cf2_getNormalizedVector): Updated.
* src/truetype/ttgxvar.c (tt_get_var_blend): Updated.
Accept value `NULL' for arguments.
* src/truetype/ttgxvar.h: Updated.
This is better behaviour than exiting with an error.
* include/freetype/internal/tttypes.h (TT_Face): Add `use_fvar'
field.
* src/sfnt/sfobjs.c (sfnt_init_face): Compute `use_fvar', also
updating the validation code.
Use `use_fvar' to compute FT_FACE_FLAG_MULTIPLE_MASTERS.
* src/truetype/ttgxvar.c (TT_Get_MM_Var): Remove `fvar' validation
code.
* include/freetype/internal/tttypes.h (TT_Face): Move
`is_default_instance' into TT_CONFIG_OPTION_GX_VAR_SUPPORT
block.
* src/sfnt/sfobjs.c (sfnt_init_face): Updated.
* src/truetype/ttgload.c (IS_DEFAULT_INSTANCE): New macro.
(TT_Load_Glyph): Use it.
Note that this is not complete yet; it only handles advance width
variation.
Activation of the code follows in another commit.
* include/freetype/ftmm.h (FT_Var_Named_Style): Add `psid' member.
* src/truetype/ttgxvar.h (GX_HVarData, GX_AxisCoords, GX_HVarRegion,
GX_HVStore, GX_WidthMap): New auxiliary structures for...
(GX_HVarTable): ... HVAR main structure.
(GX_BlendRec): Add data for HVAR loading.
* src/truetype/ttgxvar.c (FT_FIXED_ONE, FT_fdot14ToFixed,
FT_intToFixed, FT_fixedToInt): New macros.
(ft_var_load_hvar): New function.
(TT_Get_MM_Var): Updated.
(tt_done_blend): Deallocate HVAR data.
No effect yet; service functions will be implemented later on.
Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
* include/freetype/internal/services/svmetric.h: New file.
* include/freetype/internal/ftserv.h
(FT_SERVICE_METRICS_VARIATIONS_H): New macro.
* include/freetype/internal/tttypes.h (TT_Face): New field `var'.
* src/sfnt/sfobjs.c: Include FT_SERVICE_METRICS_VARIATIONS_H.
(sfnt_init_face): Initialize `face->var'.
* src/truetype/ttdriver.c: Include FT_SERVICE_METRICS_VARIATIONS_H.
(tt_service_metrics_variations): New service.
(tt_services): Updated.
* src/truetype/ttpic.h: Updated.
The code simply uses the MM functions from the `truetype' module.
Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
* include/freetype/internal/tttypes.h (TT_Face): New field `mm'.
* src/cff/cffdrivr.c: Include FT_SERVICE_MULTIPLE_MASTERS_H.
(cff_set_mm_blend, cff_get_mm_blend, cff_get_mm_var,
cff_set_var_design, cff_get_var_design): New functions.
(cff_service_multi_masters): New service.
(cff_services): Updated.
* src/cff/cffload.c (cff_get_var_blend, cff_done_blend): New
functions.
* src/cff/cffload.h: Updated.
* src/cff/cffpic.h (CFF_SERVICE_MULTI_MASTERS_GET): New macro.
* src/sfnt/sfobjs.c: Include FT_SERVICE_MULTIPLE_MASTERS_H.
(sfnt_init_face): Initialize `face->mm'.
It can now differentiate between local and global searches.
* src/base/ftobjs.c (ft_module_get_service): Add `global' argument.
(FT_Get_TrueType_Engine_Type): Updated.
* src/cff/cffdrivr.c (cff_get_ps_name, cff_get_cmap_info): Updated.
* include/freetype/internal/ftobjs.h: Updated.
* include/freetype/internal/ftserv.h (FT_FACE_FIND_GLOBAL_SERVICE):
Updated.
For internal use; we want to share code between the forthcoming CFF2
support and TrueType.
* include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func):
New typedef.
(MultiMasters): Add `get_var_blend'.
(FT_Service_MultiMasters): Updated.
* src/truetype/ttgxvar.c (tt_get_var_blend): New function.
* src/truetype/ttgxvar.h: Updated.
* src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated.
* src/type1/t1driver.c (t1_service_multi_masters): Updated.
For internal use; we want to share code between the forthcoming CFF2
support and TrueType.
* include/freetype/internal/services/svmm.h (FT_Done_Blend_Func):
New typedef.
(MultiMasters): Add `done_blend'.
(FT_Service_MultiMasters): Updated.
* src/truetype/ttgxvar.c (tt_done_blend): Use `TT_Face' as argument.
* src/truetype/ttgxvar.h: Updated.
* src/truetype/ttobjs.c (TT_Face_Done): Updated.
* src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated.
* src/type1/t1driver.c (t1_service_multi_masters): Updated.
CFF2 fonts will need access to those two functions.
* include/freetype/internal/sfnt.h: Include FT_SERVICE_GLYPH_DICT_H.
(SFNT_Interface): Add `get_glyph_name' and `get_name_index' members.
(FT_DEFINE_SFNT_INTERFACE): Updated.
* src/sfnt/sfdriver.c (sfnt_get_glyph_name, sfnt_get_name_index):
Fix signatures to exactly correspond to the glyph dict service
function typedefs.
(sfnt_interface): Updated.
Note that the low-level functions aren't implemented yet.
* include/freetype/ftmm.h: Declare.
* include/freetype/internal/services/svmm.h
(FT_Get_Var_Design_Func): New typedef.
(MultiMasters): New MM service function `get_var_design'.
(FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated.
Update all callers.
* src/base/ftmm.c (FT_Get_Var_Design_Coordinates): Implement.
* src/truetype/ttdriver.c: Updated.
* src/truetype/ttgxvar.c (TT_Get_Var_Design): New dummy function to
handle `get_var_design' service.
* src/truetype/ttgxvar.h: Updated.
* src/type1/t1driver.c: Updated.
* src/type1/t1load.c (T1_Get_Var_Design): New dummp function to
handle `get_var_design' service.
* src/type1/t1load.h: Updated.
`FT_Load_Glyph' doesn't generate a bitmap for a non-bitmap glyph
until the user calls `FT_Render_Glyph'. However, it always
allocates memory for bitmaps and copies or decodes the contents of a
bitmap glyph, which can be quite slow for PNG data.
* include/freetype/freetype.h (FT_LOAD_BITMAP_METRICS_ONLY): New
macro.
* src/base/ftobjs.c (FT_Load_Glyph): Unset FT_LOAD_RENDER if
FT_LOAD_BITMAP_METRICS_ONLY is used.
* src/sfnt/ttsbit.c (tt_sbit_decoder_alloc_bitmap,
tt_sbit_decoder_load_bitmap): Add argument to control allocation of
the glyph slot.
(tt_sbit_decoder_load_image, tt_sbit_decoder_load_compound,
tt_face_load_sbit_image): Updated.
* src/pcf/pcfdrivr.c (PCF_Glyph_Load): Quickly exit if
`FT_LOAD_BITMAP_METRICS_ONLY' is set.
* src/pfr/pfrsbit.c, src/pfr/pfrsbit.h (pfr_slot_load_bitmap): Add
argument to control allocation of the glyph slot.
* src/pfr/pfrobjs (pfr_slot_load): Updated.
* src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto.
* docs/CHANGES: Updated.
* include/freetype/config/ftconfig.h, builds/unix/ftconfig.in,
builds/vms/ftconfig.h (FT_TYPEOF): Update code to use definition in
current version of `intprops.h'.
Other minor synchronization to reduce code differences between the
three files.
* include/freetype/ftmm.h: Declare.
* include/freetype/internal/services/svmm.h (FT_Get_MM_Blend_Func):
New typedef.
(MultiMasters): New MM service function `get_mm_blend'.
(FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated.
Update all callers.
* src/base/ftmm.c (FT_Get_MM_Blend_Coordinates,
FT_Get_Var_Blend_Coordinates): Implement.
* src/truetype/ttdriver.c: Updated.
* src/truetype/ttgxvar.c (TT_Get_MM_Blend): New function to handle
`get_mm_blend' service.
* src/truetype/ttgxvar.h: Updated.
* src/type1/t1driver.c: Updated.
* src/type1/t1load.c (T1_Get_MM_Blend): New function to handle
`get_mm_blend' service.
* src/type1/t1load.h: Updated.
* docs/CHANGES: Document.
This avoids additional calls to `tt_face_lookup_table' for the
`glyf' table, which can be expensive.
* include/freetype/internal/tttypes.h (TT_LoaderRec): Move
`glyf_offset' field to ...
(TT_FaceRec): ... this structure.
* src/truetype/ttgload.c (load_truetype_glyph): Updated.
(tt_loader_init): Move initialization of `glyf_offset' to ...
* src/truetype/ttpload.c (tt_face_load_loca): .. this function.
FreeType tries to sanitize strike header data; we now reject
completely broken ones.
* include/freetype/internal/tttypes.h (TT_FaceRec): New
`sbit_strike_map' array pointer.
* src/base/ftobjs.c (FT_Match_Size): Reject matches where either
width or height would be zero.
Add tracing message in case of error.
* src/sfnt/sfobjs.c (sfnt_load_face): Populate `sbit_strike_map',
only using (more or less) valid strike header data for
FT_Face's `available_sizes' array.
(sfnt_done_face): Updated.
* src/sfnt/ttsbit.c (tt_face_set_sbit_strike): Use
`sbit_strike_map'.
(tt_face_load_strike_metrics): Improve tracing.
* src/truetype/ttdriver.c (tt_size_select): Use `sbit_strike_map'.
=======================
Tag sources with `VER-2-7'.
* docs/VERSION.TXT: Add entry for version 2.7.
* README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
builds/windows/vc2005/index.html,
builds/windows/vc2008/freetype.vcproj,
builds/windows/vc2008/index.html,
builds/windows/vc2010/freetype.vcxproj,
builds/windows/vc2010/index.html,
builds/windows/visualc/freetype.dsp,
builds/windows/visualc/freetype.vcproj,
builds/windows/visualc/index.html,
builds/windows/visualce/freetype.dsp,
builds/windows/visualce/freetype.vcproj,
builds/windows/visualce/index.html,
builds/wince/vc2005-ce/freetype.vcproj,
builds/wince/vc2005-ce/index.html,
builds/wince/vc2008-ce/freetype.vcproj,
builds/wince/vc2008-ce/index.html: s/2.6.5/2.7/, s/265/27/.
* include/freetype/freetype.h (FREETYPE_MINOR): Set to 7.
(FREETYPE_PATCH): Set to 0.
* builds/unix/configure.raw (version_info): Set to 18:6:12.
* CMakeLists.txt (VERSION_MINOR): Set to 7.
(VERSION_PATCH): Set to 0.
* docs/CHANGES: Updated.
This commit avoids `EBDT' and friends being looked up again and
again while loading a single embedded bitmap.
* include/freetype/internal/tttypes.h (TT_FaceRec)
[TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: New fields `ebdt_start' and
`ebdt_size'.
* src/sfnt/ttsbit.c (tt_sbit_decoder_init): Move table lookup to ...
(tt_face_load_sbit): ... this function; also store the table size
and offset.
This removes unnecessary complexity of span merging and buffering.
Instead, the spans are rendered as they come, speeding up the
rendering by about 5% percents as a result.
* src/smooth/ftgrays.c [FT_MAX_GRAY_SPANS]: Macro removed.
(gray_TWorker): Remove span buffer and related fields.
(gray_sweep, gray_hline): Updated.
* include/freetype/ftimage.h: Remove documentation note about
`FT_MAX_GRAY_SPANS', which was never in `ftoption.h' and is now gone.
This commit covers the most important one.
* src/autofit/afmodule.c (af_property_set): Handle `warping',
`darkening-parameters', and `no-stem-darkening'.
* src/cff/cffdrivr.c (cff_property_set): Handle
`darkening-parameters', `hinting-engine', and `no-stem-darkening'.
* src/truetype/ttdriver.c (tt_property_set): Handle
`interpreter-version'.
Recognizing properties follows in another commit.
* devel/ftoption.h, include/freetype/config/ftoption.h
(FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES): New macro.
* include/freetype/config/ftstdlib.h (ft_getenv): New macro.
* src/base/ftinit.c (ft_set_default_properties): New function to
parse `FREETYPE_PROPERTIES' and calling `ft_property_string_set'.
(FT_Init_FreeType): Updated.
This is a preparation for handling an `FREETYPE_PROPERTIES'
environment variable to control (some) driver properties.
No change in functionality.
* src/base/ftobjs.c (ft_property_do): Add `value_is_string'
parameter.
(ft_property_string_set): New function.
(FT_Property_Set, FT_Property_Get): Updated.
* include/freetype/internal/ftobjs.h: Updated.
* include/freetype/internal/services/svprop.h
(FT_Properties_SetFunc): Add `value_is_string' parameter.
* src/autofit/afmodule.c (af_property_set), src/cff/cffdrivr.c
(cff_property_set), src/truetype/ttdriver.c (tt_property_set):
Updated, emitting an error currently if `value_is_string' is set.
=========================
Tag sources with `VER-2-6-4'.
* docs/VERSION.TXT: Update documentation and bump version number to
2.6.4.
* README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
builds/windows/vc2005/index.html,
builds/windows/vc2008/freetype.vcproj,
builds/windows/vc2008/index.html,
builds/windows/vc2010/freetype.vcxproj,
builds/windows/vc2010/index.html,
builds/windows/visualc/freetype.dsp,
builds/windows/visualc/freetype.vcproj,
builds/windows/visualc/index.html,
builds/windows/visualce/freetype.dsp,
builds/windows/visualce/freetype.vcproj,
builds/windows/visualce/index.html,
builds/wince/vc2005-ce/freetype.vcproj,
builds/wince/vc2005-ce/index.html,
builds/wince/vc2008-ce/freetype.vcproj,
builds/wince/vc2008-ce/index.html: s/2.6.3/2.6.4/, s/263/264/.
* include/freetype/freetype.h (FREETYPE_PATCH): Set to 4.
* builds/unix/configure.raw (version_info): Set to 18:4:12.
* CMakeLists.txt (VERSION_PATCH): Set to 4.
* docs/CHANGES: Updated.
This patch prepares data structures and the like.
See added comments in `ttinterp.h' for more information on this and
the following commits in the series.
* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_OPTION_SUBPIXEL_HINTING): Assign values to differentiate
between subpixel versions.
(TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY,
TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL): New macros.
* include/freetype/ftttdrv.h (TT_INTERPRETER_VERSION_40): New macro.
* include/freetype/internal/tttypes.h (TT_FaceRec): Updated.
* src/truetype/ttinterp.h (TT_ExecContextRec): Define new fields
`subpixel_hinting_lean', `vertical_lcd_lean',
`backwards_compatibility', `iupx_called', iupy_called', and
`grayscale_cleartype' for new hinting mode.
* src/truetype/ttdriver.c (tt_property_set): Handle v38 and v40
interpreters conditionally.
* src/truetype/ttgload.c (TT_Hint_Glyph): Save phantom points unless
in v38 backwards compatibility mode.
Updated.
(compute_glyph_metrics): Add v38 backwards compatibility mode
constraint for adjusting advance widths.
Updated.
(tt_loader_init): Handle new flags `subpixel_hinting_lean',
`grayscale_cleartype', and `vertical_lcd_lean'.
Updated.
(tt_get_metrics, TT_Process_Simple_Glyph, TT_LOADER_SET_PP):
Updated.
* src/truetype/ttobjs.c (tt_driver_init): Conditionally set
default interpreter version number.
* src/truetype/ttsubpix.c, src/truetype/ttsubpix.h: Updated.
* include/freetype/config/ftstdlib.h (FT_LONG_MIN): New macro.
* src/cff/cffparse.c (cff_parse_font_matrix): Use largest scaling
value of all matrix coefficients to scale matrix.
* src/cff/cffobjs.c (cff_face_init): Use `matrix->yx' member for
matrix normalization if `matrix->yy' is zero.
We need this for backwards compatibility.
Problem reported by John Emmas <johne53@tiscali.co.uk>.
* include/freetype/fterrors.h: Fix inclusion guard so that
undefining either `FTERRORS_H_' or `__FTERRORS_H__' works as
expected.
* src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights): Enable filter
in addition to setting weights.
(FT_Library_SetLcdFilter): Clean out FT_FORCE_LIGHT_LCD_FILTER and
FT_FORCE_LEGACY_LCD_FILTER.
* include/freetype/ftlcdfil.h: Documentation update.
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_/.
We now use a hash to map from subr indices to array elements holding
the subroutines, if necessary.
* include/freetype/internal/t1types.h: Include FT_INTERNAL_HASH_H.
(T1_FontRec): Add `subrs_hash' field.
* include/freetype/internal/psaux.h: Include FT_INTERNAL_HASH_H.
(T1_DecoderRec): Add `subrs_hash' field.
* src/type1/t1load.h (T1_LoaderRec): Add `subrs_hash' field.
* src/type1/t1driver.c: Include FT_INTERNAL_HASH_H.
(t1_ps_get_font_value) [PS_DICT_SUBR]: Look up hash if necessary.
* src/type1/t1load.c: Include FT_INTERNAL_HASH_H.
(parse_subrs): Use hash for subr indices that exceed the allocated
number of subr slots.
(t1_init_loader): Remove unnecessary code.
(t1_done_loader, T1_Open_Face): Updated.
* src/type1/t1gload.c (T1_Compute_Max_Advance, T1_Get_Advances,
T1_Load_Glyph): Updated.
* src/type1/t1objs.c (T1_Face_Done): Updated.
* src/psaux/t1decode.c: Include FT_INTERNAL_HASH_H.
(t1_decoder_parse_charstrings) [op_callsubr]: Look up hash if
necessary.
* src/cid/cidgload.c (cid_load_glyph): Updated.
* src/base/fthash.c (hash_num_lookup, hash_num_compare): New
functions.
(ft_hash_init): Add argument to select between number and string
hashing.
(ft_hash_num_insert, ft_hash_num_lookup): New functions.
* include/freetype/internal/fthash.h: Updated.
* src/bdf/bdflib.c (_bdf_parse_start): Updated.
* include/freetype/internal/fthash.c (FT_Hash_LookupFunc,
FT_Hash_CompareFunc, FT_Hash_FreeFunc): New typedefs.
(FT_HashRec): Add `lookup', `compare', and `free' fields.
* src/base/fthash.c (hash_str_lookup, hash_str_compare,
hash_str_free): New functions.
(ft_hash_init): Set function pointers.
(hash_bucket, ft_hash_free): Use them.
We want to support both an integer and a string key later on.
* include/freetype/internal/fthash.h (FT_Hashkey): New union.
(FT_HashnodeRec): Updated.
(ft_hash_insert, ft_hash_lookup): Renamed to ...
(ft_hash_str_insert, ft_hash_str_lookup): ... this.
* src/base/fthash.c (hash_bucket): Updated.
(ft_hash_insert, ft_hash_lookup): Renamed to ...
(hash_insert, hash_lookup): ... this.
(ft_hash_str_insert, ft_hash_str_lookup): New wrapper functions.
* src/bdf/bdflib.c: Updated.
Scripts like Khmer have blue zones that can't be directly
represented by Unicode characters. Instead, it is necessary to let
HarfBuzz convert character clusters into proper glyph representation
forms, then deriving the blue zone information from the resulting
glyphs.
* src/autofit/hbshim.c, src/autofit/hbshim.h: Replaced by...
* src/autofit/afshaper.c, src/autofit/afshaper.h: ... these two new
files, providing a new API to access HarfBuzz.
The new API manages a HarfBuzz buffer with `af_shaper_buf_create'
and `af_shaper_buf_destroy'. The buffer receives a UTF8 encoded
string with function `af_shaper_get_cluster', and the resulting
glyph data (indices, advance widths, vertical offsets) can be
iteratively accessed with function `af_shaper_get_elem'.
* src/autofit/afcjk.c (af_cjk_metrics_init_widths,
af_cjk_metrics_init_blues, af_cjk_metrics_check_digits): Updated.
* src/autofit/aflatin.c (af_latin_metrics_init_widths,
af_latin_metrics_init_blues, af_latin_metrics_check_digits):
Updated.
* include/freetype/internal/fttrace.h: s/afharfbuzz/afshaper/.
* src/autofit/afglobal.c: s/hbshim.h/afshaper.h/.
(af_face_globals_compute_style_coverage): Updated.
* src/autofit/afglocal.h: s/hbshim.h/afshaper.h/.
* src/autofit/autofit.c: s/hbshim.c/afshaper.c/.
* src/autofit/Jamfile, src/autofit/rules.mk (AUTOF_DRV_SRC):
Updated.
=========================
Tag sources with `VER-2-6-2'.
* docs/VERSION.DLL: Update documentation and bump version number to
2.6.2.
* README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
builds/windows/vc2005/index.html,
builds/windows/vc2008/freetype.vcproj,
builds/windows/vc2008/index.html,
builds/windows/vc2010/freetype.vcxproj,
builds/windows/vc2010/index.html,
builds/windows/visualc/freetype.dsp,
builds/windows/visualc/freetype.vcproj,
builds/windows/visualc/index.html,
builds/windows/visualce/freetype.dsp,
builds/windows/visualce/freetype.vcproj,
builds/windows/visualce/index.html,
builds/wince/vc2005-ce/freetype.vcproj,
builds/wince/vc2005-ce/index.html,
builds/wince/vc2008-ce/freetype.vcproj,
builds/wince/vc2008-ce/index.html: s/2.6.1/2.6.2/, s/261/262/.
* include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
* builds/unix/configure.raw (version_info): Set to 18:2:12.
* CMakeLists.txt (VERSION_PATCH): Set to 2.
* docs/CHANGES: Updated.