Index: reactos/sdk/lib/3rdparty/freetype/autogen.sh =================================================================== --- reactos/sdk/lib/3rdparty/freetype/autogen.sh (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/autogen.sh (working copy) @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2005-2016 by +# Copyright 2005-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, Index: reactos/sdk/lib/3rdparty/freetype/ChangeLog =================================================================== --- reactos/sdk/lib/3rdparty/freetype/ChangeLog (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/ChangeLog (working copy) @@ -1,5 +1,2021 @@ -2016-09-08 Werner Lemberg +2017-05-13 Werner Lemberg + * Version 2.8 released. + ======================= + + + Tag sources with `VER-2-8'. + + * docs/VERSION.TXT: Add entry for version 2.8. + * docs/CHANGES: Updated. + + * 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.7.1/2.8/, s/271/28/. + + * include/freetype/freetype.h (FREETYPE_MINOR): Set to 8. + (FREETYPE_PATCH): Set to 0. + + * builds/unix/configure.raw (version_info): Set to 20:0:14. + * CMakeLists.txt (VERSION_MINOR): Set to 8. + (VERSION_PATCH): Set to 0. + +2017-05-12 Hin-Tak Leung + + Fix `FT_UINT_TO_POINTER' macro for Windows. + + * builds/unix/ftconfig.in, builds/vms/ftconfig.h, + include/freetype/config/ftconfig.h (FT_UINT_TO_POINTER) [_WIN64]: + Fix definition. + +2017-05-11 Sascha Brawer + Werner Lemberg + Werner Lemberg + Werner Lemberg + Werner Lemberg + Werner Lemberg + Werner Lemberg + Werner Lemberg + Werner Lemberg + Werner Lemberg + Werner Lemberg + + [truetype] Add tricky font `DFGirl-W6-WIN-BF' (from Dynalab). + + Reported by Roy Tam . + + * src/truetype/ttobjs.c (tt_check_trickyness_family): Implement it. + +2017-05-07 Roy Tam + Werner Lemberg + + [truetype] More tricky fonts (mainly from Dynalab). + + * src/truetype/ttobjs.c (tt_check_trickyness_family, + tt_check_trickyness_sfnt_ids): Add them. + +2017-05-07 Werner Lemberg + + [truetype] Add tricky font `DLCHayMedium' (from Dynalab). + + Reported by Roy Tam . + + * src/truetype/ttobjs.c (tt_check_trickyness_family): Implement it. + +2017-05-03 Werner Lemberg + + */*: s/backwards compatibility/backward compatibility/. + +2017-05-03 Sascha Brawer + Werner Lemberg + Werner Lemberg + + [autofit] Add blue-zone support for Sundanese script. + + This essentially moves the Sundanese script from the `Indic' hinter + to the `Latin' hinter. + + * src/autofit/afblue.dat: Add blue zone data for Sundanese. + + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + + * src/autofit/afscript.h: Add Sundanese standard character and move + data out of AF_CONFIG_OPTION_INDIC block. + + * src/autofit/afranges.c: Move Sundanese data out of + AF_CONFIG_OPTION_INDIC block. + + * src/autofit/afstyles.h: Update Sundanese data; in particular, use + AF_WRITING_SYSTEM_LATIN. + +2017-05-03 Sascha Brawer + Werner Lemberg + + [truetype] Make `IUP' gvar deltas do the same as Apple (#50832). + + When points are not touched by gvar interpolation deltas, FreeType + gave a slightly different result than Apple's CoreText. + + The OpenType working group will update the specification to document + the following behaviour: If the two points with deltas to the `left' + and `right' of the untouched point have the same coordinate, then + the inferred delta for the untouched point should be zero. + + * src/truetype/ttgxvar.c (tt_delta_interpolate): Implement new + behaviour. + +2017-05-02 Werner Lemberg + + [autofit] Remove `slight' auto-hint mode again. + + A poll on freetype-devel favoured changes directly applied to + `light'. + + * include/freetype/freetype.h (FT_LOAD_TARGET_SLIGHT, + FT_RENDER_MODE_SLIGHT): Removed. + + * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c + (af_latin_hints_init), src/autofit/aflatin2.c + (af_latin2_hints_init): Revert change from 2017-04-22. + + * src/autofit/afloader.c (af_loader_load_glyph) Remove references to + FT_RENDER_MODE_SLIGHT. + [AF_CONFIG_OPTION_TT_SIZE_METRICS]: Enable TrueType-like metrics + unconditionally. + + * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Revert change from + 2017-04-22. + + * src/base/ftobjs.c (FT_Load_Glyph): Revert change from 2017-04-22. + + * src/pshinter/pshalgo.c (ps_hints_apply): Revert change from + 2017-04-22. + + * src/smooth/ftsmooth.c (ft_smooth_render): Revert change from + 2017-04-22. + + * docs/CHANGES: Updated. + +2017-04-30 Werner Lemberg + + [autofit] Fix metrics computation. + + Problem reported by Markus Trippelsdorf and + Nikolaus Waxweiler . + + * src/base/ftobjs.c (FT_Request_Size): Trigger recomputation of + auto-hinter metrics. Without this change, multiple size changing + calls for a single face fail. + +2017-04-29 Werner Lemberg + + * src/truetype/ttdriver.c (tt_size_request): Properly check `error'. + + Reported by Earnestly in + + http://lists.nongnu.org/archive/html/freetype/2017-04/msg00031.html + +2017-04-27 Werner Lemberg + + Introduce AF_CONFIG_OPTION_TT_SIZE_METRICS configuration option. + + * 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. + +2017-04-26 Werner Lemberg + + * include/freetype/freetype.h (FT_Render_Mode): Fix order. + + This retains backward compatibility. + + Noted by Alexei. + +2017-04-22 Werner Lemberg + + [truetype] Do linear scaling for FT_LOAD_NO_HINTING (#50470). + + * src/truetype/ttobs.h (TT_SizeRec): Add field `hinted_metrics' to + hold hinted metrics. + Make `metrics' a pointer so that `tt_glyph_load' can easily switch + between metrics. + + * src/truetype/ttdriver.c (tt_size_request): Updated. + (tt_glyph_load): Use top-level metrics if FT_LOAD_NO_HINTING is + used. + + * src/truetype/ttgload.c (TT_Hint_Glyph, TT_Process_Simple_Glyph, + TT_Process_Composite_Component, load_truetype_glyph, + compute_glyph_metrics, TT_Load_Glyph): Updated. + + * src/truetype/ttinterp.c (TT_Load_Context): Updated. + + * src/truetype/ttobjs.c (tt_size_reset): Updated. + + * src/truetype/ttsubpix.c (sph_set_tweaks): Updated. + +2017-04-22 Werner Lemberg + + Add new `slight' auto-hinting mode. + + 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 backward 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. + +2017-04-22 Werner Lemberg + + Introduce `FT_Size_InternalRec' structure. + + 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'. + +2017-04-21 Alexei Podtelezhnikov + + * src/smooth/ftsmooth.h: Remove unused guards and declaration. + +2017-04-16 Hin-Tak Leung + + Fix tracing messages. + + * src/base/ftobjs.c (FT_Face_GetCharVariantIndex, + FT_Face_GetCharVariantIsDefault, FT_Face_GetVariantsOfChar): Print + correct function name. + +2017-04-08 Sascha Brawer + Werner Lemberg + Werner Lemberg + Werner Lemberg + Werner Lemberg + + [autofit] Fix invalid character range description (#50745). + + Also reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1034 + + * src/autofit/afranges.c (af_glag_nonbase_uniranges): Fix typo in + recent commit. + +2017-04-07 Werner Lemberg + + [ftfuzzer] Fix clang warnings. + + * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Add + casts. + +2017-04-06 Sascha Brawer + Werner Lemberg + Werner Lemberg + Werner Lemberg + Werner Lemberg + Werner Lemberg + Werner Lemberg + + [autofit] Add support for Adlam script. + + * src/autofit/afblue.dat: Add blue zone data for Adlam. + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + + * src/autofit/afscript.h: Add Adlam standard characters. + + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Adlam data. + +2017-04-06 Sascha Brawer + + [autofit] Add support for Ol Chiki script. + + * src/autofit/afblue.dat: Add blue zone data for Ol Chiki. + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + + * src/autofit/afscript.h: Add Ol Chiki standard character. + + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Ol Chiki data. + +2017-04-03 Werner Lemberg + + [truetype] Avoid reexecution of `fpgm' and `prep' in case of error. + + 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. + +2017-04-02 Alexei Podtelezhnikov + + [autofit] Disable metrics adjustment for `FT_LOAD_TARGET_LCD'. + + * src/autofit/aflatin.c (af_latin_hints_init): Updated. + * src/autofit/aflatin2.c (af_latin2_hints_init): Ditto. + +2017-04-01 Werner Lemberg + + * src/truetype/ttgload.c: Include FT_CONFIG_CONFIG_H. + + Otherwise FT_UINT_TO_POINTER might not be defined. + + Problem reported by Alexei. + +2017-03-31 Alexei Podtelezhnikov + + [autofit] Disable stem adjustment for `FT_LOAD_TARGET_LCD'. + + * include/freetype/freetype.h (FT_LOAD_TARGET_LCD): Document it. + * src/autofit/afcjk.c (af_cjk_hints_init): Updated. + * src/autofit/aflatin.c (af_latin_hints_init): Ditto. + * src/autofit/aflatin2.c (af_latin2_hints_init): Ditto. + +2017-03-31 Werner Lemberg + + * src/cff/cffload.c (cff_font_load): Improve fix from 2017-01-04. + + Allow CFFs containing a single font to have an empty font name. + + Problem reported by 張俊芝 <418092625@qq.com> in + + http://lists.nongnu.org/archive/html/freetype-devel/2017-03/msg00074.html + +2017-03-30 Werner Lemberg + + * src/cff/cffparse.h (CFF2_DEFAULT_STACK): Set to 513 also. + + Requested by Dave Arnold. + +2017-03-30 Werner Lemberg + + [truetype] Fix HVAR and VVAR handling (#50678). + + * src/truetype/ttgxvar.c (tt_hvadvance_adjust): Handle + glyph indices larger than `mapCount' as described in the + specification. + +2017-03-30 Werner Lemberg + + [truetype] Allow linear scaling for unhinted rendering (#50470). + + * src/truetype/ttdriver.c (tt_size_request): Revert change from + 2011-07-16; the intended metrics fix seems now to be implemented in + a different way, making the patch unnecessary. Note that this + change was usually patched out by all major GNU/Linux distributions + due to heavy side effects. + + * src/truetype/ttgload.c (compute_glyph_metrics, TT_Load_Glyph): + Refer to the metrics of the `TT_Size' object. + +2017-03-29 Werner Lemberg + + [truetype] Fix thinko related to PS name of default named instance. + + * src/truetype/ttgxvar.c (TT_Get_MM_Var): `strid' and `psid' are + name ID values, not indices into the array of name entries. + +2017-03-27 Werner Lemberg + + [cid, truetype] Don't use `index' as a variable name. + + At least on FreeBSD there is a global declaration of `index' in file + `/usr/include/strings.h'. + + * src/cff/cf2intrp.c, src/truetype/ttgload.c: s/index/idx/ where + appropriate. + +2017-03-27 Wojciech Mamrak + + [sfnt] Minor improvement for handling kern tables. + + * src/sfnt/ttkern.c (tt_face_load_kern): Don't check for + cross-stream kerning tables since we reject format 2 tables later + on anyways. + Modify code for limit test... + (tt_face_get_kerning): ... to avoid a limit test here. + +2017-03-27 Werner Lemberg + + [pcf] Fix compiler warnings. + + Reported by Alexander Hedges . + + * src/pcf/pcfdrivr.c (pcf_property_set, pcf_property_get): Tag + `property_name' with `FT_UNUSED' where necessary. + +2017-03-26 Werner Lemberg + + * src/psaux/psobjs.c (t1_builder_close_contour): Add safety guard. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=941 + +2017-03-23 Werner Lemberg + + [psaux] Better protect `flex' handling. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=935 + + * src/psaux/t1decode.c (t1_decoder_parse_charstrings) + : Since there is not a single flex operator but a + series of subroutine calls, malformed fonts can call arbitrary other + operators after the start of a flex, possibly adding points. For + this reason we have to check the available number of points before + inserting a point. + +2017-03-23 Werner Lemberg + + [sfnt] Fix check for default named instance. + + * src/sfnt/sfobjs.c (sfnt_init_face): A `fixed' number needs four + bytes, not two... + +2017-03-23 Werner Lemberg + + Make MM fonts work (again). + + * src/base/ftmm.c (FT_Set_Var_Design_Coordinates, + FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Ignore + return value of `ft_face_get_mvar_service'; instead, check whether a + service is actually returned. + +2017-03-20 Werner Lemberg + + [truetype] Some variable renamings. + + Too much local variables holding different structures were called + `metrics'. + + * src/truetype/ttdriver.c (tt_size_select): s/metrics/size_metrics/. + + * src/truetype/ttgload.c (tt_get_metrics_incr_overrides, + compute_glyph_metrics): s/metrics/incr_metrics/. + (load_sbit_image): s/metrics/sbit_metrics/. + + * src/truetype/ttobjs.c (tt_size_run_fpgm): s/metrics/size_metrics/. + (tt_size_init_bytecode): s/metrics/tt_metrics/. + (tt_size_reset): s/metrics/size_metrics/. + +2017-03-20 Werner Lemberg + + [sfnt] Don't add instances to non-variation fonts. + + * src/sfnt/sfobjs.c (sfnt_init_face): Fix it. + +2017-03-20 Werner Lemberg + + * src/cff/cffgload.c (cff_builder_init): Add safety guard (#50578). + +2017-03-18 Werner Lemberg + + Introduce FT_UINT_TO_POINTER macro (#50560). + + 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. + +2017-03-18 Werner Lemberg + + * src/truetype/ttinterp.c (TT_RunIns): Adjust loop counter (#50573). + + The problematic font that exceeds the old limit is Lato-Regular, + version 2.007, containing bytecode generated by a buggy version of + ttfautohint. + +2017-03-18 Werner Lemberg + + [truetype] Another limitation for bytecode loop count maximum. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=900 + + * src/truetype/ttinterp.c (TT_RunIns): Limit `loopcall_counter_max' + by number of glyphs also. + +2017-03-18 Werner Lemberg + + [ftfuzzer] Minor improvement. + + * src/tools/ftfuzzer/ftfuzzer.cc: Don't set intermediate axis if + bitmap strikes are active. + +2017-03-18 Werner Lemberg + + Improve `make multi'. + + * src/autofit/aflatin2.c: Guard file with FT_OPTION_AUTOFIT2. + + * src/base/ftmac.c: Guard more parts of the file with FT_MACINTOSH. + + * src/psaux/afmparse.c: Guard file with T1_CONFIG_OPTION_NO_AFM. + + * src/sfnt/pngshim.c: Guard file with + TT_CONFIG_OPTION_EMBEDDED_BITMAPS also. + + * src/sfnt/ttbdf.c: Avoid empty source file. + * src/sfnt/ttpost.c: Guard file with + TT_CONFIG_OPTION_POSTSCRIPT_NAMES. + * src/sfnt/ttsbit.c: Guard file with + TT_CONFIG_OPTION_EMBEDDED_BITMAPS. + + * src/truetype/ttgxvar.c, src/truetype/ttinterp.c: Avoid empty + source file. + + * src/truetype/ttsubpix.c: Guard file with + TT_USE_BYTECODE_INTERPRETER also. + + * src/type1/t1afm.c: Guard file with T1_CONFIG_OPTION_NO_AFM. + + * src/autofit/autofit.c, src/base/ftbase.c, src/cache/ftcache.c, + src/cff/cff.c, src/cid/type1cid.c, src/gxvalid/gxvalid.c, + src/pcf/pcf.c, src/pfr/pfr.c, src/psaux/psaux.c, + src/pshinter/pshinter.c, src/psnames/psnames.c, src/raster/raster.c, + src/sfnt/sfnt.c, src/smooth/smooth.c, src/truetype/truetype.c, + src/type1/type1.c, src/type42/type42.c: Remove conditionals; sort + entries. + +2017-03-17 Werner Lemberg + + Fixes for conditional compilation. + + * src/autofit/afcjk.c, src/autofit/afindic.c: Include `afcjk.h' + earlier. + + * src/sfnt/sfobjs.c (sfnt_init_face): Put `memory' variable into + TT_CONFIG_OPTION_GX_VAR_SUPPORT block. + (sfnt_done_face): Protect some code with + TT_CONFIG_OPTION_GX_VAR_SUPPORT. + + * src/sfnt/ttsbit.c (tt_face_load_sbix_image): Remove compiler + warning. + + * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Put `tmp' variable + into TT_USE_BYTECODE_INTERPRETER block. + + (tt_loader_init): Put `error' variable into + TT_USE_BYTECODE_INTERPRETER block. + +2017-03-17 Werner Lemberg + + Fix preprocessor warning. + + * devel/ftoption.h, include/freetype/config/ftoption.h: Test whether + TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined before checking its + value. + +2017-03-17 Werner Lemberg + + `make multi' fixes; compiler warnings. + + * src/base/ftsnames.c: Include FT_INTERNAL_DEBUG_H. + + * src/cff/cffobjs.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include + FT_MULTIPLE_MASTERS_H and FT_SERVICE_MULTIPLE_MASTERS_H. + + * src/sfnt/sfdriver.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include + FT_MULTIPLE_MASTERS_H and FT_SERVICE_MULTIPLE_MASTERS_H. + (get_win_string, get_apple_string): Initialize `result'. + +2017-03-17 Dave Arnold + + [cff] Fix potential bugs in default NDV for CFF2. + + * src/cff/cffload.c (cff_blend_build_vector): Explicitly build blend + vector when `lenNDV' is zero; don't rely on zero-init. + Save `lenNDV' as part of cache key even when `lenNDV' is zero. + +2017-03-17 Dave Arnold + + [cff] Fix CFF2 stack allocation. + + * src/cff/cffparse.c (cff_parser_init) add 1 for operator. + +2017-03-16 Werner Lemberg + + * src/truetype/ttgxvar.c (tt_done_blend): Free `vvar_table'. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=883 + +2017-03-15 Werner Lemberg + + Remove clang compiler warnings (#50548). + + * include/freetype/internal/tttypes.h (TT_FaceRec): Make + `var_postscript_prefix_len' unsigned. + + * src/autofit/afwarp.c (af_warper_compute_line_best): Remove + redundant assignment. + + * src/cff/cffload.c (cff_subfont_load): Add casts. + + * src/cff/cffparse.c (cff_parse_blend): Remove redundant assignment. + + * src/sfnt/sfdriver.c (fmix32, murmur_hash_3_128): Add `static' + keyword. + Add casts. + (fixed2float): Add cast. + (sfnt_get_var_ps_name): Make `p' always initialized. + Add casts. + + * src/truetype/ttgxvar.c (TT_Get_MM_Var): Add casts. + +2017-03-15 Werner Lemberg + + [ftfuzzer] Limit number of tested faces and instances. + + This is inspired by the discussion in and analysis of + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=859 + + * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Use only + up to 20 face indices. + Use only up to 20 instance indices. + +2017-03-15 Werner Lemberg + + * src/tools/ftfuzzer/ftfuzzer.cc: Improve readability; formatting. + +2017-03-14 Werner Lemberg + + [sfnt] Implement PS names for font instances [3/3]. + + 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. + +2017-03-14 Werner Lemberg + + [sfnt] Implement PS names for font instances [2/3]. + + * src/sfnt/sfdriver.c (fix2float) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: + New function to find the shortest representation of a 16.16 + fractional number. + +2017-03-14 Werner Lemberg + + [sfnt] Implement PS names for font instances [1/3]. + + Add 128bit MurmurHash 3 function. + + Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. + + * src/sfnt/sfdriver.c (ROTL32): New macro. + (fmix32, murmur_hash_3_128): New functions. + +2017-03-13 Werner Lemberg + + [truetype] Ignore invalid MVAR tags. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=838 + + * src/truetype/ttgxvar.c (ft_var_load_mvar): Ignore value and emit + warning for invalid tags. + (tt_apply_mvar): Ignore invalid tags. + +2017-03-12 Werner Lemberg + + [truetype] Store and use design coordinates also. + + * 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. + +2017-03-12 Werner Lemberg + + src/truetype/ttgxvar.[ch]: s/avar_checked/avar_loaded/. + +2017-03-08 Werner Lemberg + + [sfnt] Another fix for buggy variation fonts. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=759 + + * src/sfnt/sfobjs.c (sfnt_init_face): While setting number of + instances to zero for `CFF' fonts table, ensure that there is no + `CFF2' present also (which gets priority). + +2017-03-07 Werner Lemberg + + [sfnt] Improve handling for buggy variation fonts. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=738 + + * src/sfnt/sfobjs.c (sfnt_init_face): While setting number of + instances to zero for `CFF' fonts table, ensure that there is no + `glyf' table present also (which gets priority). + +2017-03-06 Werner Lemberg + + [sfnt, truetype] Always provide default instance. + + As documented in the OpenType specification, an entry for the + default instance may be omitted in the named instance table. In + particular this means that even if there is no named instance table + in the font we actually do have a named instance, namely the default + instance. + + For consistency, we always want the default instance in our list of + named instances. If it is missing, we try to synthesize it. + + * src/sfnt/sfobjs.c (sfnt_init_face): Check whether the default + instance is in the table of named instances. Otherwise adjust + number of instances. + + * src/truetype/ttgxvar.c: Include FT_TRUETYPE_IDS_H. + (TT_Get_MM_Var): Use `face->root.style_flags' as the number of named + instances. + Sythesize a named instance entry if necessary. + (tt_done_blend): Free `normalized_stylecoords'. + +2017-03-05 Werner Lemberg + + [sfnt] Remove redundant code. + + * src/sfnt/sfobjs.c (sfnt_init_face): Remove second test for + `num_instances', which will always succeed. + +2017-03-04 Werner Lemberg + + [sfnt] Add `get_name_id' service. + + * include/freetype/internal/sfnt.h (TT_Get_Name_ID_Func): New + typedef. + (SFNT_Interface): Add `get_name_id' field. + (FT_DEFINE_SFNT_INTERFACE): Updated. + + * src/sfnt/sfdriver.c (search_name_id): Rename to... + (sfnt_get_name_id): ... this. + (sfnt_get_ps_name, sfnt_interface): Udpated. + +2017-03-04 Werner Lemberg + + [truetype] Make `TT_Set_MM_Blend' set named instance index. + + * src/truetype/ttgxvar.h (GX_Blend): New array + `normalized_stylecoords'. + + * src/truetype/ttgxvar.c (TT_Get_MM_Var): Allocate and fill + `normalized_stylecoords'. + (TT_Set_MM_Blend): Check instance tuple and adjust `face_index' + accordingly. + +2017-03-02 Werner Lemberg + + [truetype] Split off designer/normalized conversion routines. + + * src/truetype/ttgxvar.c (TT_Set_Var_Design): Split off conversion + code designer->normalized coordinates to... + (ft_var_to_normalized): ... New function. + (TT_Get_Var_Design): Split off conversion code normalized->designer + coordinates to... + (ft_var_to_design): ... New function. + +2017-02-28 Werner Lemberg + + [sfnt] Further generalize `sfnt_get_ps_name'; report invalid data. + + * src/sfnt/sfdriver.c (sfnt_ps_map): New array. + (sfnt_is_postscript): New function. + (char_type_func): New typedef. + (get_win_string, get_apple_string): Add argument to specify + character checking function. + Add argument whether argument checking failures should be reported. + Update callers. + (search_name_id): Fix return value. + +2017-02-23 Werner Lemberg + + [sfnt] Split off another bit of `sfnt_get_ps_name'. + + * src/sfnt/sfdriver.c (sfnt_get_ps_name): Split off some + functionality into... + (search_name_id): ... New function. + +2017-02-23 Werner Lemberg + + [sfnt] Modularize `sfnt_get_ps_name'. + + * src/sfnt/sfdriver.c (sfnt_get_ps_name): Split off some + functionality into... + (IS_WIN, IS_APPLE): ... New macros. + (get_win_string, get_apple_string): ... New functions. + +2017-02-23 Werner Lemberg + + [truetype] Minor improvement. + + * src/truetype/ttgload.c (TT_Process_Simple_Glyph, + load_truetype_glyph): Remove unnecessary tests. + +2017-02-23 Werner Lemberg + + * include/freetype/internal/tttypes.h (TT_Face): s/isCFF2/is_cff2/. + + For orthogonality with other structure field names. + + Update all users. + +2017-02-22 Alexei Podtelezhnikov + + * src/smooth/ftgrays.c (gray_hline): Improve code. + +2017-02-20 Dominik Röttsches + + Fix some `ttnameid.h' entries (#50313). + + * include/freetype/ttnameid.h: + s/TT_MS_LANGID_SPANISH_INTERNATIONAL_SORT/TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT/, + s/TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIA/TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN/. + +2017-02-20 Werner Lemberg + + [cff] Finish support for `random' operator. + + * src/cff/cfftypes.h (CFF_SubFontRec): Add `random' field. + + * src/cff/cffobjs.c: Updated. + (cff_driver_init): Initialize random seed value. + + * src/cff/cffload.c (cff_random): New function. + (cff_subfont_load): Add `face' argument. + Update all callers. + Initialize random number generator with a proper seed value. + (cff_font_load): Add `face' argument. + Update all callers. + + * src/cff/cffload.h: Updated. + + * src/cff/cf2intrp.c (CF2_FIXME): Removed. + (cf2_interpT2CharString) : Implement opcode. + + * src/cff/cffgload.c (cff_decoder_parse_charstrings): Don't + initialize random seed value. + : Use new random seed framework. + +2017-02-20 Werner Lemberg + + [cff] Sanitize `initialRandomSeed'. + + * src/cff/cffload.c (cff_load_private_dict): Make + `initial_random_seed' value always positive. + +2017-02-20 Werner Lemberg + + [cff] Introduce `random-seed' property (2/2). + + * src/base/ftobjs.c: Include `FT_CFF_DRIVER_H'. + (open_face): Initialize `face->internal->random_seed'. + (FT_Face_Properties): Handle `FT_PARAM_TAG_RANDOM_SEED'. + + * src/cff/cffdrivr.c (cff_property_set): Handle `random-seed' + property. + +2017-02-20 Werner Lemberg + + [cff] Introduce `random-seed' property (1/2). + + 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'. + +2017-02-17 Werner Lemberg + + Remove clang warnings. + + * src/autofit/aflatin.c (af_latin_sort_blue): Add missing `static' + keyword. + + * src/base/ftmm.c (FT_Set_Var_Design_Coordinates, + FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): + Initialize some variables. + +2017-02-16 Nikolaus Waxweiler + Werner Lemberg + + Add face property for stem darkening. + + * include/freetype/ftautoh.h (FT_PARAM_TAG_STEM_DARKENING): New + macro. + + * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Add + `no_stem_darkening' field. + + * src/autofit/afloader.c (af_loader_load_glyph), + src/autofit/afmodule.c (af_property_set): Updated. + + * src/base/ftobjs.c: Include FT_AUTOHINTER_H. + (ft_open_face_internal): Updated. + (FT_Face_Properties): Handle FT_PARAM_TAG_STEM_DARKENING. + + * src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Updated. + + * src/cff/cffdrivr.c (cff_property_set): Updated. + +2017-02-16 Nikolaus Waxweiler + Werner Lemberg + + Add face property for LCD filter weights. + + * include/freetype/ftlcdfil.h (FT_PARAM_TAG_LCD_FILTER_WEIGHTS, + FT_LCD_FILTER_FIVE_TAPS): New macros. + (FT_LcdFiveTapFilter): New typedef. + + * include/freetype/ftobjs.h (FT_Face_InternalRec) + [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Add `lcd_weights' field. + (FT_Bitmap_LcdFilterFunc): Change third argument to weights array. + (ft_lcd_filter_fir): New prototype. + (FT_LibraryRec): Updated. + + * src/base/ftlcdfil.c (_ft_lcd_filter_fir): Renamed to... + (ft_lcd_filter_fir): ... this base function. + Updated. + (_ft_lcd_filter_legacy): Updated. + (FT_Library_SetLcdFilterWeights, FT_Library_SetLcdFilter): Updated. + + * src/base/ftobjs.c (ft_open_face_internal): Updated. + (FT_Face_Properties): Handle FT_PARAM_TAG_LCD_FILTER_WEIGHTS. + + * src/smooth/ftsmooth.c (ft_smooth_render_generic) + [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Handle LCD weights from + `FT_Face_Internal'. + +2017-02-14 Nikolaus Waxweiler + Werner Lemberg + + Add new function `FT_Face_Properties'. + + 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. + +2017-02-13 Werner Lemberg + + [autofit] Prevent overlapping blue zones. + + Problem reported as + + https://github.com/google/fonts/issues/632 + + The font in question (Nunito) has values 705 and 713 for the + reference and overshoot values, respectively, of the first blue + zone. Blue zone 2, however, has value 710 for both the reference + and overshoot. At 12ppem, reference and overshoot of blue zone 0 + becomes 8px, while blue zone 2 becomes 9px. + + A peculiarity of this font is that the tops of isolated vertical + stems like `N' have a slight overshoot also. The auto-hinter tries + to find the nearest blue zone using the *original* coordinates. For + vertical stems, this is value 713. For normal horizontal tops like + in character `E', this is value 710. Since value 713 is mapped to + 8px but value 710 to 9px, `N' and similar characters are one pixel + higher than `E', which looks very bad. + + This commit sanitizes blue zones to avoid such a behaviour. + + * src/autofit/aflatin.c (af_latin_sort_blue): New function. + (af_latin_metrics_init_blues): Sort blue values and remove overlaps. + +2017-02-12 Alexei Podtelezhnikov + + * src/smooth/ftgrays.c (gray_sweep): Improve code. + +2017-02-06 Werner Lemberg + + [truetype] Implement `VVAR' table support. + + * src/truetype/ttgxvar.h (GX_HVarTable): Renamed to... + (GX_HVVarTable): ...This. + (GX_Blend): Add fields for `VVAR' table handling. + Other minor updates. + + * src/truetype/ttgxvar.c (ft_var_load_hvar): Renamed to... + (ft_var_load_hvvar): ...This. + Handle VVAR loading also (controlled by an additional parameter). + (tt_hadvance_adjust): Renamed to... + (tt_hvadvance_adjust): ...This. + Handle application of advance height also (controlled by an + additional parameter). + (tt_hadvance_adjust, tt_vadvance_adjust): Wrappers for + `tt_hvadvance_adjust'. + + * src/truetype/ttdriver.c (tt_service_metrics_variations): Updated. + +2017-02-05 Werner Lemberg + + [autofit] Use better blue zone characters for lowercase latin. + + The number of lowercase characters for computing the top flat blue + zone value was too small (in most cases only `x' and `z'). If one + of the two characters has a large serif, say, it can happen that + FreeType must select between two different values, having a 50% + chance to use the wrong one. As a result, rendering at larger PPEM + values could yield uneven lowercase glyph heights. + + Problem reported by Christoph Koeberlin . + + * src/autofit/afblue.dat (AF_BLUE_STRING_LATIN_SMALL): Replaced + with... + (AF_BLUE_STRING_LATIN_SMALL_TOP, AF_BLUE_STRING_LATIN_SMALL_BOTTOM): + ... New, extended sets. + (AF_BLUE_STRINGSET_LATN): Updated. + + * src/autofit/afblue.c, scr/autofit/afblue.h: Regenerated. + +2017-02-04 Werner Lemberg + + Make `freetype-config' a wrapper of `pkg-config' if possible. + + Based on ideas taken from + + http://pkgs.fedoraproject.org/cgit/rpms/freetype.git/tree/freetype-multilib.patch + http://pkgs.fedoraproject.org/cgit/rpms/freetype.git/tree/freetype-2.5.3-freetype-config-prefix.patch + + * builds/unix/freetype-config.in: Rewritten. Use `pkg-config' to + set output variables if program is available. + + * docs/CHANGES, docs/freetype-config.1: Updated. + +2017-02-04 Werner Lemberg + + * builds/unix/unix-def.in (freetype-config): Fix permissions. + +2017-02-03 Werner Lemberg + + * src/autofit/afglobal.c (af_face_globals_free): Erase useless code. + +2017-02-03 Werner Lemberg + + * include/freetype/ftgasp.h (FT_GASP_SYMMETRIC_GRIDFIT): Fix value. + + Reported by Behdad. + +2017-02-02 Werner Lemberg + + [truetype] Fix MVAR post-action handling. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=509 + + * src/truetype/ttobjs.c (tt_size_reset): Do nothing for CFF2. This + is important to make `tt_size_reset_iterator' (called in + `tt_apply_mvar') always work. + +2017-02-02 Werner Lemberg + + Make compilation with FT_CONFIG_OPTION_PIC work again. + + All code committed here is guarded with `FT_CONFIG_OPTION_PIC'. + + * include/freetype/internal/services/svmetric.h + (FT_DEFINE_SERVICE_METRICSVARIATIONSREC): Remove trailing semicolon. + + * src/autofit/aflatin.c (af_latin_hints_compute_edges, + af_latin_hint_edges): Provide `globals' variable. + + * src/autofit/afloader.c (af_loader_load_glyph): Remove shadowing + variable. + + * src/autofit/afmodule.c (AF_SCRIPT_CLASSES_GET, + AF_STYLE_CLASSES_GET): Redefine. + + * src/autofit/aftypes.h (AF_DEFINE_WRITING_SYSTEM_CLASS): Fix typo. + + * src/cff/cffparse.c (CFF_FIELD_BLEND): Provide it. + + * src/cff/cffpic.h (CffModulePIC): Fix typo. + +2017-01-31 Alexei Podtelezhnikov + + * src/smooth/ftgrays.c (gray_render_scanline): Improve code. + +2017-01-31 Werner Lemberg + + [cff] Provide metrics variation service interface (#50196). + + Only now I've got an OTF with an HVAR table for testing... + + The code in `ftmm.c' uses `FT_FACE_LOOKUP_SERVICE' to get the + metrics variations interface. However, this didn't work with + `FT_FACE_FIND_GLOBAL_SERVICE' used in `sfnt_init_face'. + + * src/cff/cffdrivr.c: Include FT_SERVICE_METRICS_VARIATIONS_H. + (cff_hadvance_adjust, cff_metrics_adjust): Wrapper functions for + metric service functions from the `truetype' module. + (cff_service_metrics_variations): New service. + (cff_services): Updated. + + * src/cff/cffpic.h (CFF_SERVICE_METRICS_VAR_GET): New macro. + [FT_CONFIG_OPTION_PIC]: Synchronize code. + + * src/sfnt/sfobjs.c (sfnt_init_face): Replace call to + FT_FACE_FIND_GLOBAL_SERVICE with `ft_module_get_service' to always + load the service from the `truetype' module. + +2017-01-31 Werner Lemberg + + Add framework to support services with 9 functions. + + * include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC9): + New macro. + +2017-01-31 Werner Lemberg + + [base] Fix error handing in MM functions. + + * src/base/ftmm.c (FT_Set_Var_Design_Coordinates, + FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): + Implement it. + +2017-01-31 Werner Lemberg + + [truetype] Fix sanity check for `gvar' table (#50184). + + * src/truetype/ttgxvar.c (ft_var_load_gvar): There might be missing + variation data for some glyphs. + +2017-01-31 Werner Lemberg + + [autofit] Avoid uninitialized jumps (#50191). + + * src/autofit/afcjk.c (af_cjk_metrics_check_digits), + src/autofit/aflatin.c (af_latin_metrics_check_digits): Initialize + `advance'. + +2017-01-27 Werner Lemberg + + s/GB2312/PRC/. + + * include/freetype/freetype.h (FT_ENCODING_PRC): New enum value. + (FT_ENCODING_GB2312): Deprecated. + + * include/freetype/ttnameid.h (TT_MS_ID_PRC): New macro. + (TT_MS_ID_GB2312): Deprecated. + + * src/sfnt/sfobjs.c (sfnt_find_encoding): Updated. + + * docs/CHANGES: Updated. + +2017-01-26 Werner Lemberg + + [base] Add `FT_Get_Sfnt_LangTag' function. + + * include/freetype/ftsnames.h (FT_SfntLangTag): New structure. + (FT_Get_Sfnt_LangTag): New declaration. + + * src/base/ftsnames.c (FT_Get_Sfnt_LangTag): New funtion. + + * docs/CHANGES: Updated. + +2017-01-26 Werner Lemberg + + [sfnt] Support `name' table format 1. + + * 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. + +2017-01-25 Werner Lemberg + + [sfnt] s/TT_NameEntry/TT_Name/. + + * include/freetype/internal/tttypes.h (TT_NameEntryRec): Renamed + to... + (TT_NameRec): This. + (TT_NameTableRec): Updated. + + * src/base/ftsnames.c (FT_Get_Sfnt_Name): Updated. + + * src/sfnt/sfdriver.c (sfnt_get_ps_name): Updated. + + * src/sfnt/sfobjs.c (tt_name_entry_ascii_from_utf16, + tt_name_entry_ascii_from_other): Renamed to... + (tt_name_ascii_from_utf16, tt_name_entry_ascii_from_other): This, + respectively. + (TT_NameEntry_ConvertFunc): Renamed to... + (TT_Name_ConvertFunc): This. + (tt_face_get_name): Updated. + + * src/sfnt/ttload.c (tt_face_load_name, tt_face_free_name): + Updated. + +2017-01-24 Werner Lemberg + + [sfnt] Fix Postscript name service for symbol fonts. + + * src/sfnt/sfdriver.c (sfnt_get_ps_name): Accept PID/EID=3/0 + entries also. + +2017-01-24 Werner Lemberg + + [truetype] For OpenType 1.7: s/preferred/typographic/ (sub)family. + + * include/freetype/ftsnames.h + (FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY, + FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY): New macros. + (FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY, + FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY): Deprecated. + + * include/freetype/ttnameid.h (TT_NAME_ID_TYPOGRAPHIC_FAMILY, + TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY): New macros. + (TT_NAME_ID_PREFERRED_FAMILY, TT_NAME_ID_PREFERRED_SUBFAMILY): + Deprecated. + + * src/sfnt/sfobjs.c (sfnt_load_face): Updated. + + * docs/CHANGES: Updated. + +2017-01-23 Werner Lemberg + + [base] Add `FT_Set_Default_Properties' (#49187). + + * include/freetype/ftmodapi.h: Add declaration. + + * src/base/ftinit.c (ft_set_default_properties): Renamed to... + (FT_Set_Default_Properties): ... this. + (FT_Init_FreeType): Updated. + + * docs/CHANGES: Updated. + +2017-01-23 Werner Lemberg + + [truetype] Minor updates for OpenType 1.8.1. + + * src/truetype/ttgxvar.h (GX_MVarTable): `axisCount' has been + removed from the specification; it is now reserved. + + * src/truetype/ttgxvar.c (ft_var_load_mvar): Updated. + (GX_FVar_Head): Remove `countSizePairs'; the corresponding data + field in the `MVAR' table is now reserved. + (fvar_fields): Updated. + +2017-01-23 Werner Lemberg + + [truetype] Avoid segfault for invalid variation data. + + * src/truetype/ttgxvar.c (ft_var_load_item_variation_store): Assure + `itemCount' is not zero. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=441 + +2017-01-20 Werner Lemberg + + * src/truetype/ttinterp.c (TT_RunIns): Adjust loop detector limits. + +2017-01-17 Werner Lemberg + + * include/freetype/ttnameid.h: Updated to OpenType 1.8.1. + + (TT_APPLE_ID_FULL_UNICODE): New macro. + + (TT_MS_LANGID_BOSNIAN_BOSNIA_HERZ_CYRILLIC, + TT_MS_LANGID_UPPER_SORBIAN_GERMANY, + TT_MS_LANGID_LOWER_SORBIAN_GERMANY, TT_MS_LANGID_IRISH_IRELAND, + TT_MS_LANGID_INUKTITUT_CANADA_LATIN, TT_MS_LANGID_BASHKIR_RUSSIA, + TT_MS_LANGID_LUXEMBOURGISH_LUXEMBOURG, + TT_MS_LANGID_GREENLANDIC_GREENLAND, TT_MS_LANGID_MAPUDUNGUN_CHILE, + TT_MS_LANGID_MOHAWK_MOHAWK, TT_MS_LANGID_BRETON_FRANCE, + TT_MS_LANGID_OCCITAN_FRANCE, TT_MS_LANGID_CORSICAN_FRANCE, + TT_MS_LANGID_ALSATIAN_FRANCE, TT_MS_LANGID_YAKUT_RUSSIA, + TT_MS_LANGID_KICHE_GUATEMALA, TT_MS_LANGID_KINYARWANDA_RWANDA, + TT_MS_LANGID_WOLOF_SENEGAL, TT_MS_LANGID_DARI_AFGHANISTAN): New + macros. + + (TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC): Fix value. + + (TT_MS_LANGID_GERMAN_LIECHTENSTEIN, TT_MS_LANGID_CATALAN_CATALAN, + TT_MS_LANGID_CHINESE_MACAO, TT_MS_LANGID_SPANISH_SPAIN_MODERN_SORT, + TT_MS_LANGID_KOREAN_KOREA, TT_MS_LANGID_ROMANSH_SWITZERLAND, + TT_MS_LANGID_SLOVENIAN_SLOVENIA, TT_MS_LANGID_BASQUE_BASQUE, + TT_MS_LANGID_SETSWANA_SOUTH_AFRICA, + TT_MS_LANGID_ISIXHOSA_SOUTH_AFRICA, + TT_MS_LANGID_ISIZULU_SOUTH_AFRICA, TT_MS_LANGID_KAZAKH_KAZAKHSTAN, + TT_MS_LANGID_KYRGYZ_KYRGYZSTAN, TT_MS_LANGID_KISWAHILI_KENYA, + TT_MS_LANGID_TATAR_RUSSIA, TT_MS_LANGID_ODIA_INDIA, + TT_MS_LANGID_MONGOLIAN_PRC, TT_MS_LANGID_TIBETAN_PRC, + TT_MS_LANGID_WELSH_UNITED_KINGDOM, TT_MS_LANGID_GALICIAN_GALICIAN, + TT_MS_LANGID_SINHALA_SRI_LANKA, TT_MS_LANGID_TAMAZIGHT_ALGERIA, + TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA, TT_MS_LANGID_YI_PRC, + TT_MS_LANGID_UIGHUR_PRC): New aliases. + + Remove commented out code. + + (TT_NAME_ID_LIGHT_BACKGROUND, TT_NAME_ID_DARK_BACKGROUND, + TT_NAME_ID_VARIATIONS_PREFIX): New macros. + + (HAVE_LIMIT_ON_IDENTS): Remove macro (which was useless since many + years), use guarded long macros by default and define short versions + as aliases for the long ones. + +2017-01-15 Werner Lemberg + + * src/truetype/ttgxvar.c (tt_apply_var): Handle underline parameters + also. + +2017-01-11 Werner Lemberg + + * src/base/ftobjs.c (ft_open_face_internal): Improve tracing. + +2017-01-11 Werner Lemberg + + [truetype] Actually use metrics variation service. + + * src/base/ftmm.c: Include FT_SERVICE_METRICS_VARIATIONS_H. + (ft_face_get_mvar_service): New auxiliary function to look up + metrics variation service. + (FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates, + FT_Set_Var_Blend_Coordinates): Call metrics variation service. + + * src/truetype/ttobjs.c (tt_face_init): Use metrics variations for + named instances. + +2017-01-11 Werner Lemberg + + [truetype] Provide metrics variation service. + + * include/freetype/internal/services/svmetric.h + (FT_Metrics_Adjust_Func): Reduce number of necessary parameters. + + * src/truetype/ttgxvar.c: Include FT_LIST_H. + (tt_size_reset_iterator): New auxiliary function for... + (tt_apply_var): New function. + + * src/truetype/ttgxvar.h: Updated. + + * src/truetype/ttdriver.c (tt_service_metrics_variations): Add + `tt_apply_mvar'. + + * include/freetype/internal/ftserv.h (FT_ServiceCache): Add metrics + variation service. + +2017-01-11 Werner Lemberg + + [truetype] Parse `MVAR' table. + + * src/truetype/ttgxvar.h (MVAR_TAG_XXX): New macros for MVAR tags. + (GX_Value, GX_MVarTable): New structures. + (GX_Blend): Add it. + + * src/truetype/ttgxvar.c (GX_VALUE_SIZE, GX_VALUE_CASE, + GX_GASP_CASE): New macros. + (ft_var_get_value_pointer): New auxiliary function to get a pointer + to a value from various SFNT tables already stored in `TT_Face'. + (ft_var_load_mvar): New function. + (TT_Get_MM_Var): Call it. + (tt_done_blend): Updated. + +2017-01-11 Werner Lemberg + + [truetype] More preparations for MVAR support. + + * src/truetype/ttobjs.c (tt_size_reset): Add argument to make + function only recompute ascender, descender, and height. + + * src/truetype/ttobjs.h: Updated. + + * src/truetype/ttdriver.c (tt_size_select, tt_size_request): + Updated. + +2017-01-09 Werner Lemberg + + [pcf] Disable long family names by default. + + * include/freetype/config/ftoption.h + (PCF_CONFIG_OPTION_LONG_FAMILY_NAMES): Comment out. + +2017-01-09 Werner Lemberg + + [pcf] Make long family names configurable. + + 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_services): 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. + +2017-01-09 Werner Lemberg + + [pcf] Introduce a driver structure. + + To be filled later on with something useful. + + * src/pcf/pcf.h (PCF_Driver): New structure. + + * src/pcf/pcfdrivr.c (pcf_driver_init, pcf_driver_done): New dummy + functions. + (pcf_driver_class): Updated. + +2017-01-08 Werner Lemberg + + [truetype] Again some GX code shuffling. + + We need this later on for MVAR also. + + * src/truetype/ttgxvar.c (tt_hadvance_adjust): Split off computing + an item store variation delta into... + (ft_var_get_item_delta): ...new function. + +2017-01-08 Werner Lemberg + + [truetype] Adjust font variation flags for MVAR. + + * 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). + +2017-01-06 Werner Lemberg + + [truetype] More GX code shuffling. + + We need this later on for MVAR also. + + * src/truetype/ttgxvar.c (tt_done_blend): Split off handling of item + variation store into... + (ft_var_done_item_variation_store): ...new function. + +2017-01-06 Werner Lemberg + + [truetype] More generalization of GX stuff. + + We need this later on for MVAR also. + + * src/truetype/ttgxvar.c (ft_var_load_delta_set_index_mapping): Add + parameters for delta-set index mapping and item variation store. + (ft_var_load_item_variation_store): Add parameter for item variation + store. + s/hvarData/varData/. + Move allocation of `hvar_table' to... + (ft_var_load_hvar): ...this function. + Updated. + +2017-01-06 Werner Lemberg + + [truetype] Some GX structure renames for generalization. + + We need this later on for MVAR also. + + * src/truetype/ttgxvar.h (GX_HVarData): Renamed to... + (GX_ItemVarData): ...this. + (GX_HVarRegion): Renamed to... + (GX_VarRegion): ...this. + (GX_HVStore): Renamed to... + (GX_ItemVarStore): ...this. + (GX_WidthMap): Renamed to... + (GX_DeltaSetIdxMap): ...this. + + (GX_HVarTable): Updated. + + * src/truetype/ttgxvar.c: Updated. + +2017-01-06 Werner Lemberg + + [truetype] Code shuffling. + + * src/truetype/ttgxvar.c (ft_var_load_hvar): Split off loading of + item variation store and delta set index mapping into... + (ft_var_load_item_variation_store, + ft_var_load_delta_set_index_mapping): ...new functions. + +2017-01-06 Werner Lemberg + + [truetype] Add HVAR access without advance width map. + + * src/truetype/ttgxvar.c (ft_var_load_hvar): Handle case where + `offsetToAdvanceWidthMapping' is zero. + (tt_hadvance_adjust): Implement direct deltaSet access by glyph + index. + +2017-01-06 Werner Lemberg + + [pcf] Revise driver. + + This commit improves tracing and handling of malformed fonts. In + particular, the changes to `pcf_get_properties' fix + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=379 + + * src/pcf/pcfread.c (tableNames): Use long names for better + readability. + (pcf_read_TOC): Allow at most 9 tables. + (pcf_get_properties): Allow at most 256 properties. + Limit strings array length to 256 * (65536 + 1) bytes. + Better tracing. + (pcf_get_metric): Trace metric data. + (pcf_get_metrics): Allow at most 65536 metrics. + Fix comparison of `metrics->ascent' and `metrics->descent' to avoid + potential overflow. + Better tracing. + (pcf_get_bitmaps): Allow at most 65536 bitmaps. + Better tracing. + (pcf_get_encodings, pcf_get_accel): Better tracing. + + * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Don't trace `format' details. + These are now shown by `pcf_get_bitmaps'. + +2017-01-04 Werner Lemberg + + * src/pcf/pcfdrivr.c (PCF_Face_Init): Trace compression format. + +2017-01-04 Werner Lemberg + + [cff] More consistency checks for pure CFFs. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=378 + + * src/cff/cffload.c (cff_font_load): Check element number and size + of Name and Top DICT indices. + +2017-01-04 Werner Lemberg + + [cff, truetype] Minor tracing improvement. + + * src/cff/cffobjs.c (cff_face_init), src/truetype/ttobjs.c + (tt_face_init): Indent first tracing message from SFNT driver. + +2017-01-03 Werner Lemberg + + [truetype] Various minor fixes. + + * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Check instruction + size only if we do native hinting. + (TT_Load_Glyph): Trace returned error code. + + * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Trace + returned error code. + (tt_size_ready_bytecode): Don't run `prep' table if `fpgm' table is + invalid. + +2017-01-03 Werner Lemberg + + [sfnt] Don't fail if PCLT, EBLC (and similar tables) are invalid. + + These tables are optional. + + * src/sfnt/sfobjs.c (sfnt_load_face): Implement it. + +2017-01-03 Werner Lemberg + + * src/cff/cffparse.c (cff_parse_num): Simplify. + +2017-01-03 Werner Lemberg + + Various fixes for clang's undefined behaviour sanitizer. + + * src/cff/cffload.c (FT_fdot14ToFixed): Fix casting. + (cff_blend_doBlend): Don't left-shift negative numbers. + Handle 5-byte numbers byte by byte to avoid alignment issues. + + * src/cff/cffparse.c (cff_parse_num): Handle 5-byte numbers byte by + byte to avoid alignment issues. + + * src/cid/cidload (cid_read_subrs): Do nothing if we don't have any + subrs. + + * src/psaux/t1decode.c (t1_decode_parse_charstring): Fix tracing. + + * src/tools/glnames.py (main): Put `DEFINE_PSTABLES' guard around + definition of `ft_get_adobe_glyph_index'. + + * src/psnames/pstables.h: Regenerated. + + * src/psnames/psmodule.c: Include `pstables.h' twice to get both + declaration and definition. + + * src/truetype/ttgxvar.c (FT_fdot14ToFixed, FT_intToFixed): Fix + casting. + +2017-01-01 Werner Lemberg + + [cff] Handle multiple `blend' operators in a row correctly. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=368 + + * src/cff/cffload.c (cff_blend_doBlend): Adjust `parser->stack' + pointers into `subFont->blend_stack' after reallocation. + +2017-01-01 Werner Lemberg + + [sfnt] Return correct number of named instances for TTCs. + + Without this patch, requesting information for face index N returned + the data for face index N+1 (or index 0). + + * src/sfnt/sfobjs.c (sfnt_init_face): Correctly adjust `face_index' + for negative `face_instance_index' values. + +2016-12-31 Werner Lemberg + + */*: Use hex numbers for errors in tracing messages. + +2016-12-31 Werner Lemberg + + [truetype] Check axis count in HVAR table. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=362 + + * src/truetype/ttgxvar.c (ft_var_load_hvar): Check axis count. + (ft_var_load_avar): Fix tracing message. + +2016-12-30 Werner Lemberg + * Version 2.7.1 released. ========================= @@ -51,7 +2067,7 @@ * src/tools/ftfuzzer/ftfuzzer.cc: Include `stdlib.h' for `rand'. (Random): Small class to provide n randomly selected numbers - (without repitition) out of the value set [1,N]. + (without repetition) out of the value set [1,N]. (LLVMFuzzerTestOneInput): Use it to test only up to 10 bitmap strikes. @@ -891,7 +2907,7 @@ * src/type1/t1driver.c: Updated. - * src/type1/t1load.c (T1_Get_Var_Design): New dummp function to + * src/type1/t1load.c (T1_Get_Var_Design): New dump function to handle `get_var_design' service. * src/type1/t1load.h: Updated. @@ -1239,7 +3255,7 @@ 2016-09-29 Werner Lemberg - [truetype] Disallow bitmap strokes for non-default instances. + [truetype] Disallow bitmap strikes for non-default instances. Also speed up access of default instances if GX variations are active. @@ -1494,7 +3510,7 @@ 2016-09-07 Alexei Podtelezhnikov - * src/smooth/ftgrays.c (gray_hline): Microptimize. + * src/smooth/ftgrays.c (gray_hline): Micro-optimize. 2016-09-06 Alexei Podtelezhnikov @@ -1626,12 +3642,12 @@ 2016-09-03 Werner Lemberg - [base] Avoid negative bitmap stroke dimensions (#48985). + [base] Avoid negative bitmap strike dimensions (#48985). * src/base/ftobjs.c (FT_Open_Face): Check whether negation was actually successful. For example, this can fail for value -32768 if the type is `signed short'. If there are problems, - disable the stroke. + disable the strike. 2016-09-03 Werner Lemberg @@ -1670,7 +3686,7 @@ [smooth] Simplify span rendering more. It turns out that there is significant cost associated with `FT_Span' - creation and calls to `gray_render_span' because it happerns so + creation and calls to `gray_render_span' because it happens so frequently. This removes these steps from our internal use but leaves it alone for `FT_RASTER_FLAG_DIRECT" to preserve API. The speed gain is about 5%. @@ -2070,7 +4086,7 @@ [sfnt] Fix `face_index' value in `FT_Face' for named instances. - * src/sfnt/sfobjc.s (sfnt_init_face): Don't strip off higher 16bits. + * src/sfnt/sfobjs.c (sfnt_init_face): Don't strip off higher 16bits. 2016-07-14 Werner Lemberg @@ -2090,7 +4106,7 @@ ---------------------------------------------------------------------------- -Copyright 2016 by +Copyright 2016-2017 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, Index: reactos/sdk/lib/3rdparty/freetype/configure =================================================================== --- reactos/sdk/lib/3rdparty/freetype/configure (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/configure (working copy) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright 2002-2016 by +# Copyright 2002-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -15,7 +15,7 @@ rm -f config.mk builds/unix/unix-def.mk builds/unix/unix-cc.mk -# respect GNUMAKE environment variable for backwards compatibility +# respect GNUMAKE environment variable for backward compatibility if test "x$GNUMAKE" = x; then if test "x$MAKE" = x; then if test "x`make -v 2>/dev/null | egrep 'GNU|makepp'`" = x; then Index: reactos/sdk/lib/3rdparty/freetype/devel/ft2build.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/devel/ft2build.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/devel/ft2build.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType 2 build and setup macros (development version). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/devel/ftoption.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/devel/ftoption.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/devel/ftoption.h (working copy) @@ -4,7 +4,7 @@ /* */ /* User-selectable configuration macros (specification only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -82,8 +82,8 @@ /* to control the various font drivers and modules. The controllable */ /* properties are listed in the section `Controlling FreeType Modules' */ /* in the reference's table of contents; currently there are properties */ - /* for the auto-hinter (file `ftautoh.h'), CFF (file `ftcffdrv.h'), and */ - /* TrueType (file `ftttdrv.h'). */ + /* for the auto-hinter (file `ftautoh.h'), CFF (file `ftcffdrv.h'), */ + /* TrueType (file `ftttdrv.h'), and PCF (file `ftpcfdrv.h'). */ /* */ /* `FREETYPE_PROPERTIES' has the following syntax form (broken here into */ /* multiple lines for better readability). */ @@ -835,6 +835,33 @@ /*************************************************************************/ /*************************************************************************/ /**** ****/ + /**** P C F D R I V E R C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* There are many PCF fonts just called `Fixed' which look completely */ + /* different, and which have nothing to do with each other. When */ + /* selecting `Fixed' in KDE or Gnome one gets results that appear rather */ + /* random, the style changes often if one changes the size and one */ + /* cannot select some fonts at all. This option makes the PCF module */ + /* prepend the foundry name (plus a space) to the family name. */ + /* */ + /* We also check whether we have `wide' characters; all put together, we */ + /* get family names like `Sony Fixed' or `Misc Fixed Wide'. */ + /* */ + /* If this option is activated, it can be controlled with the */ + /* `no-long-family-names' property of the pcf driver module. */ + /* */ +#define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ /**** A U T O F I T M O D U L E C O N F I G U R A T I O N ****/ /**** ****/ /*************************************************************************/ @@ -886,6 +913,7 @@ #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER #define TT_USE_BYTECODE_INTERPRETER +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING #if TT_CONFIG_OPTION_SUBPIXEL_HINTING & 1 #define TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY #endif @@ -894,6 +922,7 @@ #define TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL #endif #endif +#endif /* Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/config/ftconfig.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/config/ftconfig.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/config/ftconfig.h (working copy) @@ -4,7 +4,7 @@ /* */ /* ANSI-specific configuration file (specification only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -333,6 +333,15 @@ #endif +#ifdef _WIN64 + /* only 64bit Windows uses the LLP64 data model, i.e., */ + /* 32bit integers, 64bit pointers */ +#define FT_UINT_TO_POINTER( x ) (void*)(unsigned __int64)(x) +#else +#define FT_UINT_TO_POINTER( x ) (void*)(unsigned long)(x) +#endif + + /*************************************************************************/ /* */ /* miscellaneous */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/config/ftheader.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/config/ftheader.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/config/ftheader.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Build macros of the FreeType 2 library. */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -357,6 +357,19 @@ /************************************************************************* * * @macro: + * FT_PCF_DRIVER_H + * + * @description: + * A macro used in #include statements to name the file containing + * structures and macros related to the PCF driver module. + * + */ +#define FT_PCF_DRIVER_H + + + /************************************************************************* + * + * @macro: * FT_TYPE1_TABLES_H * * @description: Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/config/ftoption.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/config/ftoption.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/config/ftoption.h (working copy) @@ -4,7 +4,7 @@ /* */ /* User-selectable configuration macros (specification only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -82,8 +82,8 @@ /* to control the various font drivers and modules. The controllable */ /* properties are listed in the section `Controlling FreeType Modules' */ /* in the reference's table of contents; currently there are properties */ - /* for the auto-hinter (file `ftautoh.h'), CFF (file `ftcffdrv.h'), and */ - /* TrueType (file `ftttdrv.h'). */ + /* for the auto-hinter (file `ftautoh.h'), CFF (file `ftcffdrv.h'), */ + /* TrueType (file `ftttdrv.h'), and PCF (file `ftpcfdrv.h'). */ /* */ /* `FREETYPE_PROPERTIES' has the following syntax form (broken here into */ /* multiple lines for better readability). */ @@ -640,10 +640,11 @@ /* [1] for a technical overview on what this means. See `ttinterp.h' */ /* for more details on the LEAN option. */ /* */ - /* There are three options. */ + /* There are three possible values. */ /* */ - /* 1. This option is associated with the `Infinality' moniker. */ - /* Contributed by an individual nicknamed Infinality with the goal of */ + /* Value 1: */ + /* This value is associated with the `Infinality' moniker, */ + /* contributed by an individual nicknamed Infinality with the goal of */ /* making TrueType fonts render better than on Windows. A high */ /* amount of configurability and flexibility, down to rules for */ /* single glyphs in fonts, but also very slow. Its experimental and */ @@ -650,7 +651,10 @@ /* slow nature and the original developer losing interest meant that */ /* this option was never enabled in default builds. */ /* */ - /* 2. The new default mode for the TrueType driver. The Infinality code */ + /* The corresponding interpreter version is v38. */ + /* */ + /* Value 2: */ + /* The new default mode for the TrueType driver. The Infinality code */ /* base was stripped to the bare minimum and all configurability */ /* removed in the name of speed and simplicity. The configurability */ /* was mainly aimed at legacy fonts like Arial, Times New Roman, or */ @@ -660,14 +664,19 @@ /* that modern and web fonts render well while legacy fonts render */ /* okay. */ /* */ - /* 3. Compile both. */ + /* The corresponding interpreter version is v40. */ /* */ + /* Value 3: */ + /* Compile both, making both v38 and v40 available (the latter is the */ + /* default). */ + /* */ /* By undefining these, you get rendering behavior like on Windows */ /* without ClearType, i.e., Windows XP without ClearType enabled and */ /* Win9x (interpreter version v35). Or not, depending on how much */ /* hinting blood and testing tears the font designer put into a given */ /* font. If you define one or both subpixel hinting options, you can */ - /* switch between between v35 and the ones you define. */ + /* switch between between v35 and the ones you define (using */ + /* `FT_Property_Set'). */ /* */ /* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */ /* defined. */ @@ -835,6 +844,33 @@ /*************************************************************************/ /*************************************************************************/ /**** ****/ + /**** P C F D R I V E R C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* There are many PCF fonts just called `Fixed' which look completely */ + /* different, and which have nothing to do with each other. When */ + /* selecting `Fixed' in KDE or Gnome one gets results that appear rather */ + /* random, the style changes often if one changes the size and one */ + /* cannot select some fonts at all. This option makes the PCF module */ + /* prepend the foundry name (plus a space) to the family name. */ + /* */ + /* We also check whether we have `wide' characters; all put together, we */ + /* get family names like `Sony Fixed' or `Misc Fixed Wide'. */ + /* */ + /* If this option is activated, it can be controlled with the */ + /* `no-long-family-names' property of the pcf driver module. */ + /* */ +/* #define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */ + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ /**** A U T O F I T M O D U L E C O N F I G U R A T I O N ****/ /**** ****/ /*************************************************************************/ @@ -850,7 +886,9 @@ /*************************************************************************/ /* */ - /* Compile autofit module with Indic script support. */ + /* Compile autofit module with fallback Indic script support, covering */ + /* some scripts that the `latin' submodule of the autofit module doesn't */ + /* (yet) handle. */ /* */ #define AF_CONFIG_OPTION_INDIC @@ -869,6 +907,26 @@ /* */ #define AF_CONFIG_OPTION_USE_WARPER + /*************************************************************************/ + /* */ + /* Use TrueType-like size metrics for `light' auto-hinting. */ + /* */ + /* It is strongly recommended to avoid this option, which exists only to */ + /* help some legacy applications retain its appearance and behaviour */ + /* with respect to auto-hinted TrueType fonts. */ + /* */ + /* The very reason this option exists at all are GNU/Linux distributions */ + /* like Fedora that did not un-patch the following change (which was */ + /* present in FreeType between versions 2.4.6 and 2.7.1, inclusive). */ + /* */ + /* 2011-07-16 Steven Chu */ + /* */ + /* [truetype] Fix metrics on size request for scalable fonts. */ + /* */ + /* This problematic commit is now reverted (more or less). */ + /* */ +/* #define AF_CONFIG_OPTION_TT_SIZE_METRICS */ + /* */ @@ -886,6 +944,7 @@ #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER #define TT_USE_BYTECODE_INTERPRETER +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING #if TT_CONFIG_OPTION_SUBPIXEL_HINTING & 1 #define TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY #endif @@ -894,6 +953,7 @@ #define TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL #endif #endif +#endif /* Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/config/ftstdlib.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/config/ftstdlib.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/config/ftstdlib.h (working copy) @@ -5,7 +5,7 @@ /* ANSI-specific library and header configuration file (specification */ /* only). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/freetype.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/freetype.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/freetype.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType high-level API and common types (specification only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -175,6 +175,7 @@ /* FT_Done_Face */ /* FT_Reference_Face */ /* FT_New_Memory_Face */ + /* FT_Face_Properties */ /* FT_Open_Face */ /* FT_Open_Args */ /* FT_Parameter */ @@ -265,8 +266,8 @@ /* FT_Glyph_Metrics */ /* */ /* */ - /* A structure used to model the metrics of a single glyph. The */ - /* values are expressed in 26.6 fractional pixel format; if the flag */ + /* A structure to model the metrics of a single glyph. The values */ + /* are expressed in 26.6 fractional pixel format; if the flag */ /* @FT_LOAD_NO_SCALE has been used while loading the glyph, values */ /* are expressed in font units instead. */ /* */ @@ -305,6 +306,11 @@ /* `horiAdvance' or `vertAdvance'; you have to manually adjust these */ /* values to account for the added width and height. */ /* */ + /* FreeType doesn't use the `VORG' table data for CFF fonts because */ + /* it doesn't have an interface to quickly retrieve the glyph height. */ + /* The y~coordinate of the vertical origin can be simply computed as */ + /* `vertBearingY + height' after loading a glyph. */ + /* */ typedef struct FT_Glyph_Metrics_ { FT_Pos width; @@ -349,10 +355,10 @@ /* */ /* */ /* Windows FNT: */ - /* The nominal size given in a FNT font is not reliable. Thus when */ - /* the driver finds it incorrect, it sets `size' to some calculated */ - /* values and sets `x_ppem' and `y_ppem' to the pixel width and */ - /* height given in the font, respectively. */ + /* The nominal size given in a FNT font is not reliable. If the */ + /* driver finds it incorrect, it sets `size' to some calculated */ + /* values, and `x_ppem' and `y_ppem' to the pixel width and height */ + /* given in the font, respectively. */ /* */ /* TrueType embedded bitmaps: */ /* `size', `width', and `height' values are not contained in the */ @@ -421,9 +427,9 @@ /* FT_Module */ /* */ /* */ - /* A handle to a given FreeType module object. Each module can be a */ + /* A handle to a given FreeType module object. A module can be a */ /* font driver, a renderer, or anything else that provides services */ - /* to the formers. */ + /* to the former. */ /* */ typedef struct FT_ModuleRec_* FT_Module; @@ -434,8 +440,8 @@ /* FT_Driver */ /* */ /* */ - /* A handle to a given FreeType font driver object. Each font driver */ - /* is a special module capable of creating faces from font files. */ + /* A handle to a given FreeType font driver object. A font driver */ + /* is a module capable of creating faces from font files. */ /* */ typedef struct FT_DriverRec_* FT_Driver; @@ -446,10 +452,10 @@ /* FT_Renderer */ /* */ /* */ - /* A handle to a given FreeType renderer. A renderer is a special */ - /* module in charge of converting a glyph image to a bitmap, when */ - /* necessary. Each renderer supports a given glyph image format, and */ - /* one or more target surface depths. */ + /* A handle to a given FreeType renderer. A renderer is a module in */ + /* charge of converting a glyph's outline image to a bitmap. It */ + /* supports a single glyph image format, and one or more target */ + /* surface depths. */ /* */ typedef struct FT_RendererRec_* FT_Renderer; @@ -467,15 +473,15 @@ /* FT_Face */ /* */ /* */ - /* A handle to a given typographic face object. A face object models */ - /* a given typeface, in a given style. */ + /* A handle to a typographic face object. A face object models a */ + /* given typeface, in a given style. */ /* */ /* */ - /* Each face object also owns a single @FT_GlyphSlot object, as well */ + /* A face object also owns a single @FT_GlyphSlot object, as well */ /* as one or more @FT_Size objects. */ /* */ /* Use @FT_New_Face or @FT_Open_Face to create a new face object from */ - /* a given filepathname or a custom input stream. */ + /* a given filepath or a custom input stream. */ /* */ /* Use @FT_Done_Face to destroy it (along with its slot and sizes). */ /* */ @@ -500,11 +506,11 @@ /* FT_Size */ /* */ /* */ - /* A handle to an object used to model a face scaled to a given */ + /* A handle to an object that models a face scaled to a given */ /* character size. */ /* */ /* */ - /* Each @FT_Face has an _active_ @FT_Size object that is used by */ + /* An @FT_Face has one _active_ @FT_Size object that is used by */ /* functions like @FT_Load_Glyph to determine the scaling */ /* transformation that in turn is used to load and hint glyphs and */ /* metrics. */ @@ -531,9 +537,8 @@ /* FT_GlyphSlot */ /* */ /* */ - /* A handle to a given `glyph slot'. A slot is a container where it */ - /* is possible to load any of the glyphs contained in its parent */ - /* face. */ + /* A handle to a given `glyph slot'. A slot is a container that can */ + /* hold any of the glyphs contained in its parent face. */ /* */ /* In other words, each time you call @FT_Load_Glyph or */ /* @FT_Load_Char, the slot's content is erased by the new glyph data, */ @@ -552,13 +557,14 @@ /* FT_CharMap */ /* */ /* */ - /* A handle to a given character map. A charmap is used to translate */ - /* character codes in a given encoding into glyph indexes for its */ - /* parent's face. Some font formats may provide several charmaps per */ - /* font. */ + /* A handle to a character map (usually abbreviated to `charmap'). A */ + /* charmap is used to translate character codes in a given encoding */ + /* into glyph indexes for its parent's face. Some font formats may */ + /* provide several charmaps per font. */ /* */ /* Each face object owns zero or more charmaps, but only one of them */ - /* can be `active' and used by @FT_Get_Char_Index or @FT_Load_Char. */ + /* can be `active', providing the data used by @FT_Get_Char_Index or */ + /* @FT_Load_Char. */ /* */ /* The list of available charmaps in a face is available through the */ /* `face->num_charmaps' and `face->charmaps' fields of @FT_FaceRec. */ @@ -615,8 +621,8 @@ /* FT_Encoding */ /* */ /* */ - /* An enumeration used to specify character sets supported by */ - /* charmaps. Used in the @FT_Select_Charmap API function. */ + /* An enumeration to specify character sets supported by charmaps. */ + /* Used in the @FT_Select_Charmap API function. */ /* */ /* */ /* Despite the name, this enumeration lists specific character */ @@ -630,10 +636,9 @@ /* The encoding value~0 is reserved. */ /* */ /* FT_ENCODING_UNICODE :: */ - /* Corresponds to the Unicode character set. This value covers */ - /* all versions of the Unicode repertoire, including ASCII and */ - /* Latin-1. Most fonts include a Unicode charmap, but not all */ - /* of them. */ + /* The Unicode character set. This value covers all versions of */ + /* the Unicode repertoire, including ASCII and Latin-1. Most fonts */ + /* include a Unicode charmap, but not all of them. */ /* */ /* For example, if you want to access Unicode value U+1F028 (and */ /* the font contains it), use value 0x1F028 as the input value for */ @@ -640,8 +645,8 @@ /* @FT_Get_Char_Index. */ /* */ /* FT_ENCODING_MS_SYMBOL :: */ - /* Corresponds to the Microsoft Symbol encoding, used to encode */ - /* mathematical symbols and wingdings. For more information, see */ + /* Microsoft Symbol encoding, used to encode mathematical symbols */ + /* and wingdings. For more information, see */ /* `http://www.microsoft.com/typography/otspec/recom.htm', */ /* `http://www.kostis.net/charsets/symbol.htm', and */ /* `http://www.kostis.net/charsets/wingding.htm'. */ @@ -650,13 +655,14 @@ /* Area) in the range U+F020-U+F0FF. */ /* */ /* FT_ENCODING_SJIS :: */ - /* Corresponds to Japanese SJIS encoding. More info at */ - /* `http://en.wikipedia.org/wiki/Shift_JIS'. */ - /* See note on multi-byte encodings below. */ + /* Shift JIS encoding for Japanese. More info at */ + /* `http://en.wikipedia.org/wiki/Shift_JIS'. See note on */ + /* multi-byte encodings below. */ /* */ - /* FT_ENCODING_GB2312 :: */ - /* Corresponds to an encoding system for Simplified Chinese as */ - /* used in mainland China. */ + /* FT_ENCODING_PRC :: */ + /* Corresponds to encoding systems mainly for Simplified Chinese as */ + /* used in People's Republic of China (PRC). The encoding layout */ + /* is based on GB~2312 and its supersets GBK and GB~18030. */ /* */ /* FT_ENCODING_BIG5 :: */ /* Corresponds to an encoding system for Traditional Chinese as */ @@ -663,14 +669,15 @@ /* used in Taiwan and Hong Kong. */ /* */ /* FT_ENCODING_WANSUNG :: */ - /* Corresponds to the Korean encoding system known as Wansung. */ + /* Corresponds to the Korean encoding system known as Extended */ + /* Wansung (MS Windows code page 949). */ /* For more information see */ - /* `https://msdn.microsoft.com/en-US/goglobal/cc305154'. */ + /* `http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit949.txt'. */ /* */ /* FT_ENCODING_JOHAB :: */ /* The Korean standard character set (KS~C 5601-1992), which */ /* corresponds to MS Windows code page 1361. This character set */ - /* includes all possible Hangeul character combinations. */ + /* includes all possible Hangul character combinations. */ /* */ /* FT_ENCODING_ADOBE_LATIN_1 :: */ /* Corresponds to a Latin-1 encoding as defined in a Type~1 */ @@ -677,14 +684,12 @@ /* PostScript font. It is limited to 256 character codes. */ /* */ /* FT_ENCODING_ADOBE_STANDARD :: */ - /* Corresponds to the Adobe Standard encoding, as found in Type~1, */ - /* CFF, and OpenType/CFF fonts. It is limited to 256 character */ - /* codes. */ + /* Adobe Standard encoding, as found in Type~1, CFF, and */ + /* OpenType/CFF fonts. It is limited to 256 character codes. */ /* */ /* FT_ENCODING_ADOBE_EXPERT :: */ - /* Corresponds to the Adobe Expert encoding, as found in Type~1, */ - /* CFF, and OpenType/CFF fonts. It is limited to 256 character */ - /* codes. */ + /* Adobe Expert encoding, as found in Type~1, CFF, and OpenType/CFF */ + /* fonts. It is limited to 256 character codes. */ /* */ /* FT_ENCODING_ADOBE_CUSTOM :: */ /* Corresponds to a custom encoding, as found in Type~1, CFF, and */ @@ -691,12 +696,12 @@ /* OpenType/CFF fonts. It is limited to 256 character codes. */ /* */ /* FT_ENCODING_APPLE_ROMAN :: */ - /* Corresponds to the 8-bit Apple roman encoding. Many TrueType */ - /* and OpenType fonts contain a charmap for this encoding, since */ - /* older versions of Mac OS are able to use it. */ + /* Apple roman encoding. Many TrueType and OpenType fonts contain */ + /* a charmap for this 8-bit encoding, since older versions of Mac */ + /* OS are able to use it. */ /* */ /* FT_ENCODING_OLD_LATIN_2 :: */ - /* This value is deprecated and was never used nor reported by */ + /* This value is deprecated and was neither used nor reported by */ /* FreeType. Don't use or test for it. */ /* */ /* FT_ENCODING_MS_SJIS :: */ @@ -703,7 +708,7 @@ /* Same as FT_ENCODING_SJIS. Deprecated. */ /* */ /* FT_ENCODING_MS_GB2312 :: */ - /* Same as FT_ENCODING_GB2312. Deprecated. */ + /* Same as FT_ENCODING_PRC. Deprecated. */ /* */ /* FT_ENCODING_MS_BIG5 :: */ /* Same as FT_ENCODING_BIG5. Deprecated. */ @@ -716,7 +721,7 @@ /* */ /* */ /* By default, FreeType automatically synthesizes a Unicode charmap */ - /* for PostScript fonts, using their glyph names dictionaries. */ + /* for PostScript fonts, using their glyph name dictionaries. */ /* However, it also reports the encodings defined explicitly in the */ /* font file, for the cases when they are needed, with the Adobe */ /* values as well. */ @@ -736,7 +741,7 @@ /* Russian). */ /* */ /* FT_ENCODING_NONE is set if `platform_id' is @TT_PLATFORM_MACINTOSH */ - /* and `encoding_id' is not @TT_MAC_ID_ROMAN (otherwise it is set to */ + /* and `encoding_id' is not `TT_MAC_ID_ROMAN' (otherwise it is set to */ /* FT_ENCODING_APPLE_ROMAN). */ /* */ /* If `platform_id' is @TT_PLATFORM_MACINTOSH, use the function */ @@ -748,9 +753,9 @@ /* to get an idea how to do that. Basically, if the language ID */ /* is~0, don't use it, otherwise subtract 1 from the language ID. */ /* Then examine `encoding_id'. If, for example, `encoding_id' is */ - /* @TT_MAC_ID_ROMAN and the language ID (minus~1) is */ + /* `TT_MAC_ID_ROMAN' and the language ID (minus~1) is */ /* `TT_MAC_LANGID_GREEK', it is the Greek encoding, not Roman. */ - /* @TT_MAC_ID_ARABIC with `TT_MAC_LANGID_FARSI' means the Farsi */ + /* `TT_MAC_ID_ARABIC' with `TT_MAC_LANGID_FARSI' means the Farsi */ /* variant the Arabic encoding. */ /* */ typedef enum FT_Encoding_ @@ -761,14 +766,15 @@ FT_ENC_TAG( FT_ENCODING_UNICODE, 'u', 'n', 'i', 'c' ), FT_ENC_TAG( FT_ENCODING_SJIS, 's', 'j', 'i', 's' ), - FT_ENC_TAG( FT_ENCODING_GB2312, 'g', 'b', ' ', ' ' ), + FT_ENC_TAG( FT_ENCODING_PRC, 'g', 'b', ' ', ' ' ), FT_ENC_TAG( FT_ENCODING_BIG5, 'b', 'i', 'g', '5' ), FT_ENC_TAG( FT_ENCODING_WANSUNG, 'w', 'a', 'n', 's' ), FT_ENC_TAG( FT_ENCODING_JOHAB, 'j', 'o', 'h', 'a' ), - /* for backwards compatibility */ + /* for backward compatibility */ + FT_ENCODING_GB2312 = FT_ENCODING_PRC, FT_ENCODING_MS_SJIS = FT_ENCODING_SJIS, - FT_ENCODING_MS_GB2312 = FT_ENCODING_GB2312, + FT_ENCODING_MS_GB2312 = FT_ENCODING_PRC, FT_ENCODING_MS_BIG5 = FT_ENCODING_BIG5, FT_ENCODING_MS_WANSUNG = FT_ENCODING_WANSUNG, FT_ENCODING_MS_JOHAB = FT_ENCODING_JOHAB, @@ -793,7 +799,7 @@ #define ft_encoding_latin_1 FT_ENCODING_ADOBE_LATIN_1 #define ft_encoding_latin_2 FT_ENCODING_OLD_LATIN_2 #define ft_encoding_sjis FT_ENCODING_SJIS -#define ft_encoding_gb2312 FT_ENCODING_GB2312 +#define ft_encoding_gb2312 FT_ENCODING_PRC #define ft_encoding_big5 FT_ENCODING_BIG5 #define ft_encoding_wansung FT_ENCODING_WANSUNG #define ft_encoding_johab FT_ENCODING_JOHAB @@ -820,11 +826,11 @@ /* */ /* platform_id :: An ID number describing the platform for the */ /* following encoding ID. This comes directly from */ - /* the TrueType specification and should be emulated */ - /* for other formats. */ + /* the TrueType specification and gets emulated for */ + /* other formats. */ /* */ /* encoding_id :: A platform specific encoding number. This also */ - /* comes from the TrueType specification and should be */ + /* comes from the TrueType specification and gets */ /* emulated similarly. */ /* */ typedef struct FT_CharMapRec_ @@ -852,8 +858,8 @@ /* FT_Face_Internal */ /* */ /* */ - /* An opaque handle to an `FT_Face_InternalRec' structure, used to */ - /* model private data of a given @FT_Face object. */ + /* An opaque handle to an `FT_Face_InternalRec' structure that models */ + /* the private data of a given @FT_Face object. */ /* */ /* This structure might change between releases of FreeType~2 and is */ /* not generally available to client applications. */ @@ -873,7 +879,7 @@ /* */ /* num_faces :: The number of faces in the font file. Some */ /* font formats can have multiple faces in */ - /* a font file. */ + /* a single font file. */ /* */ /* face_index :: This field holds two different values. */ /* Bits 0-15 are the index of the face in the */ @@ -881,14 +887,15 @@ /* are set to~0 if there is only one face in */ /* the font file. */ /* */ - /* Bits 16-30 are relevant to GX variation */ - /* fonts only, holding the named instance */ - /* index for the current face index (starting */ - /* with value~1; value~0 indicates font access */ - /* without GX variation data). For non-GX */ - /* fonts, bits 16-30 are ignored. If we have */ - /* the third named instance of face~4, say, */ - /* `face_index' is set to 0x00030004. */ + /* Bits 16-30 are relevant to GX and OpenType */ + /* variation fonts only, holding the named */ + /* instance index for the current face index */ + /* (starting with value~1; value~0 indicates */ + /* font access without a named instance). For */ + /* non-variation fonts, bits 16-30 are */ + /* ignored. If we have the third named */ + /* instance of face~4, say, `face_index' is */ + /* set to 0x00030004. */ /* */ /* Bit 31 is always zero (this is, */ /* `face_index' is always a positive value). */ @@ -902,9 +909,12 @@ /* @FT_STYLE_FLAG_XXX for the details. Bits */ /* 16-30 hold the number of named instances */ /* available for the current face if we have a */ - /* GX variation (sub)font. Bit 31 is always */ - /* zero (this is, `style_flags' is always a */ - /* positive value). */ + /* GX or OpenType variation (sub)font. Bit 31 */ + /* is always zero (this is, `style_flags' is */ + /* always a positive value). Note that a */ + /* variation font has always at least one */ + /* named instance, namely the default */ + /* instance. */ /* */ /* num_glyphs :: The number of glyphs in the face. If the */ /* face is scalable and has sbits (see */ @@ -911,8 +921,9 @@ /* `num_fixed_sizes'), it is set to the number */ /* of outline glyphs. */ /* */ - /* For CID-keyed fonts, this value gives the */ - /* highest CID used in the font. */ + /* For CID-keyed fonts (not in an SFNT */ + /* wrapper) this value gives the highest CID */ + /* used in the font. */ /* */ /* family_name :: The face's family name. This is an ASCII */ /* string, usually in English, that describes */ @@ -990,8 +1001,8 @@ /* expressed in font units. For font formats */ /* not having this information, it is set to */ /* `bbox.yMin'. Note that this field is */ - /* usually negative. Only relevant for */ - /* scalable formats. */ + /* negative for values below the baseline. */ + /* Only relevant for scalable formats. */ /* */ /* height :: This value is the vertical distance */ /* between two consecutive baselines, */ @@ -1034,6 +1045,12 @@ /* Fields may be changed after a call to @FT_Attach_File or */ /* @FT_Attach_Stream. */ /* */ + /* For an OpenType variation font, the values of the following fields */ + /* can change after a call to @FT_Set_Var_Design_Coordinates (and */ + /* friends) if the font contains an `MVAR' table: `ascender', */ + /* `descender', `height', `underline_position', and */ + /* `underline_thickness'. */ + /* */ typedef struct FT_FaceRec_ { FT_Long num_faces; @@ -1105,49 +1122,51 @@ /* */ /* */ /* FT_FACE_FLAG_SCALABLE :: */ - /* Indicates that the face contains outline glyphs. This doesn't */ - /* prevent bitmap strikes, i.e., a face can have both this and */ + /* The face contains outline glyphs. Note that a face can contain */ + /* bitmap strikes also, i.e., a face can have both this flag and */ /* @FT_FACE_FLAG_FIXED_SIZES set. */ /* */ /* FT_FACE_FLAG_FIXED_SIZES :: */ - /* Indicates that the face contains bitmap strikes. See also the */ + /* The face contains bitmap strikes. See also the */ /* `num_fixed_sizes' and `available_sizes' fields of @FT_FaceRec. */ /* */ /* FT_FACE_FLAG_FIXED_WIDTH :: */ - /* Indicates that the face contains fixed-width characters (like */ - /* Courier, Lucido, MonoType, etc.). */ + /* The face contains fixed-width characters (like Courier, Lucida, */ + /* MonoType, etc.). */ /* */ /* FT_FACE_FLAG_SFNT :: */ - /* Indicates that the face uses the `sfnt' storage scheme. For */ - /* now, this means TrueType and OpenType. */ + /* The face uses the SFNT storage scheme. For now, this means */ + /* TrueType and OpenType. */ /* */ /* FT_FACE_FLAG_HORIZONTAL :: */ - /* Indicates that the face contains horizontal glyph metrics. This */ - /* should be set for all common formats. */ + /* The face contains horizontal glyph metrics. This should be set */ + /* for all common formats. */ /* */ /* FT_FACE_FLAG_VERTICAL :: */ - /* Indicates that the face contains vertical glyph metrics. This */ - /* is only available in some formats, not all of them. */ + /* The face contains vertical glyph metrics. This is only */ + /* available in some formats, not all of them. */ /* */ /* FT_FACE_FLAG_KERNING :: */ - /* Indicates that the face contains kerning information. If set, */ - /* the kerning distance can be retrieved through the function */ - /* @FT_Get_Kerning. Otherwise the function always return the */ - /* vector (0,0). Note that FreeType doesn't handle kerning data */ - /* from the `GPOS' table (as present in some OpenType fonts). */ + /* The face contains kerning information. If set, the kerning */ + /* distance can be retrieved using the function @FT_Get_Kerning. */ + /* Otherwise the function always return the vector (0,0). Note */ + /* that FreeType doesn't handle kerning data from the SFNT `GPOS' */ + /* table (as present in many OpenType fonts). */ /* */ /* FT_FACE_FLAG_FAST_GLYPHS :: */ /* THIS FLAG IS DEPRECATED. DO NOT USE OR TEST IT. */ /* */ /* FT_FACE_FLAG_MULTIPLE_MASTERS :: */ - /* Indicates that the font contains multiple masters and is capable */ - /* of interpolating between them. See the multiple-masters */ - /* specific API for details. */ + /* The face contains multiple masters and is capable of */ + /* interpolating between them. Supported formats are Adobe MM, */ + /* TrueType GX, and OpenType variation fonts. */ /* */ + /* See the multiple-masters specific API for details. */ + /* */ /* FT_FACE_FLAG_GLYPH_NAMES :: */ - /* Indicates that the font contains glyph names that can be */ - /* retrieved through @FT_Get_Glyph_Name. Note that some TrueType */ - /* fonts contain broken glyph name tables. Use the function */ + /* The face contains glyph names, which can be retrieved using */ + /* @FT_Get_Glyph_Name. Note that some TrueType fonts contain */ + /* broken glyph name tables. Use the function */ /* @FT_Has_PS_Glyph_Names when needed. */ /* */ /* FT_FACE_FLAG_EXTERNAL_STREAM :: */ @@ -1156,31 +1175,31 @@ /* when @FT_Done_Face is called. Don't read or test this flag. */ /* */ /* FT_FACE_FLAG_HINTER :: */ - /* Set if the font driver has a hinting machine of its own. For */ - /* example, with TrueType fonts, it makes sense to use data from */ - /* the SFNT `gasp' table only if the native TrueType hinting engine */ - /* (with the bytecode interpreter) is available and active. */ + /* The font driver has a hinting machine of its own. For example, */ + /* with TrueType fonts, it makes sense to use data from the SFNT */ + /* `gasp' table only if the native TrueType hinting engine (with */ + /* the bytecode interpreter) is available and active. */ /* */ /* FT_FACE_FLAG_CID_KEYED :: */ - /* Set if the font is CID-keyed. In that case, the font is not */ - /* accessed by glyph indices but by CID values. For subsetted */ - /* CID-keyed fonts this has the consequence that not all index */ - /* values are a valid argument to FT_Load_Glyph. Only the CID */ - /* values for which corresponding glyphs in the subsetted font */ - /* exist make FT_Load_Glyph return successfully; in all other cases */ - /* you get an `FT_Err_Invalid_Argument' error. */ + /* The face is CID-keyed. In that case, the face is not accessed */ + /* by glyph indices but by CID values. For subsetted CID-keyed */ + /* fonts this has the consequence that not all index values are a */ + /* valid argument to @FT_Load_Glyph. Only the CID values for which */ + /* corresponding glyphs in the subsetted font exist make */ + /* `FT_Load_Glyph' return successfully; in all other cases you get */ + /* an `FT_Err_Invalid_Argument' error. */ /* */ - /* Note that CID-keyed fonts that are in an SFNT wrapper don't */ - /* have this flag set since the glyphs are accessed in the normal */ - /* way (using contiguous indices); the `CID-ness' isn't visible to */ - /* the application. */ + /* Note that CID-keyed fonts that are in an SFNT wrapper (this is, */ + /* all OpenType/CFF fonts) don't have this flag set since the */ + /* glyphs are accessed in the normal way (using contiguous */ + /* indices); the `CID-ness' isn't visible to the application. */ /* */ /* FT_FACE_FLAG_TRICKY :: */ - /* Set if the font is `tricky', this is, it always needs the */ - /* font format's native hinting engine to get a reasonable result. */ - /* A typical example is the Chinese font `mingli.ttf' that uses */ - /* TrueType bytecode instructions to move and scale all of its */ - /* subglyphs. */ + /* The face is `tricky', this is, it always needs the font format's */ + /* native hinting engine to get a reasonable result. A typical */ + /* example is the old Chinese font `mingli.ttf' (but not */ + /* `mingliu.ttc') that uses TrueType bytecode instructions to move */ + /* and scale all of its subglyphs. */ /* */ /* It is not possible to auto-hint such fonts using */ /* @FT_LOAD_FORCE_AUTOHINT; it will also ignore */ @@ -1192,8 +1211,8 @@ /* tricky fonts; they are hard-coded in file `ttobjs.c'. */ /* */ /* FT_FACE_FLAG_COLOR :: */ - /* Set if the font has color glyph tables. To access color glyphs */ - /* use @FT_LOAD_COLOR. */ + /* The face has color glyph tables. To access color glyphs use */ + /* @FT_LOAD_COLOR. */ /* */ #define FT_FACE_FLAG_SCALABLE ( 1L << 0 ) #define FT_FACE_FLAG_FIXED_SIZES ( 1L << 1 ) @@ -1265,7 +1284,7 @@ * @description: * A macro that returns true whenever a face object contains a scalable * font face (true for TrueType, Type~1, Type~42, CID, OpenType/CFF, - * and PFR font formats. + * and PFR font formats). * */ #define FT_IS_SCALABLE( face ) \ @@ -1369,7 +1388,7 @@ * * @description: * A macro that returns true whenever a face object is a named instance - * of a GX variation font. + * of a GX or OpenType variation font. * */ #define FT_IS_NAMED_INSTANCE( face ) \ @@ -1428,15 +1447,15 @@ /* FT_STYLE_FLAG_XXX */ /* */ /* */ - /* A list of bit flags used to indicate the style of a given face. */ - /* These are used in the `style_flags' field of @FT_FaceRec. */ + /* A list of bit flags to indicate the style of a given face. These */ + /* are used in the `style_flags' field of @FT_FaceRec. */ /* */ /* */ /* FT_STYLE_FLAG_ITALIC :: */ - /* Indicates that a given face style is italic or oblique. */ + /* The face style is italic or oblique. */ /* */ /* FT_STYLE_FLAG_BOLD :: */ - /* Indicates that a given face is bold. */ + /* The face is bold. */ /* */ /* */ /* The style information as provided by FreeType is very basic. More */ @@ -1477,43 +1496,50 @@ /* hence the term `ppem' (pixels per EM). It is also */ /* referred to as `nominal height'. */ /* */ - /* x_scale :: A 16.16 fractional scaling value used to convert */ + /* x_scale :: A 16.16 fractional scaling value to convert */ /* horizontal metrics from font units to 26.6 */ /* fractional pixels. Only relevant for scalable */ /* font formats. */ /* */ - /* y_scale :: A 16.16 fractional scaling value used to convert */ + /* y_scale :: A 16.16 fractional scaling value to convert */ /* vertical metrics from font units to 26.6 */ /* fractional pixels. Only relevant for scalable */ /* font formats. */ /* */ - /* ascender :: The ascender in 26.6 fractional pixels. See */ - /* @FT_FaceRec for the details. */ + /* ascender :: The ascender in 26.6 fractional pixels, rounded up */ + /* to an integer value. See @FT_FaceRec for the */ + /* details. */ /* */ - /* descender :: The descender in 26.6 fractional pixels. See */ - /* @FT_FaceRec for the details. */ + /* descender :: The descender in 26.6 fractional pixels, rounded */ + /* down to an integer value. See @FT_FaceRec for the */ + /* details. */ /* */ - /* height :: The height in 26.6 fractional pixels. See */ - /* @FT_FaceRec for the details. */ + /* height :: The height in 26.6 fractional pixels, rounded to */ + /* an integer value. See @FT_FaceRec for the */ + /* details. */ /* */ /* max_advance :: The maximum advance width in 26.6 fractional */ - /* pixels. See @FT_FaceRec for the details. */ + /* pixels, rounded to an integer value. See */ + /* @FT_FaceRec for the details. */ /* */ /* */ /* The scaling values, if relevant, are determined first during a */ /* size changing operation. The remaining fields are then set by the */ /* driver. For scalable formats, they are usually set to scaled */ - /* values of the corresponding fields in @FT_FaceRec. */ + /* values of the corresponding fields in @FT_FaceRec. Some values */ + /* like ascender or descender are rounded for historical reasons; */ + /* more precise values (for outline fonts) can be derived by scaling */ + /* the corresponding @FT_FaceRec values manually. */ /* */ - /* Note that due to glyph hinting, these values might not be exact */ - /* for certain fonts. Thus they must be treated as unreliable */ - /* with an error margin of at least one pixel! */ + /* Note that due to glyph hinting and the selected rendering mode */ + /* these values are usually not exact; consequently, they must be */ + /* treated as unreliable with an error margin of at least one pixel! */ /* */ /* Indeed, the only way to get the exact metrics is to render _all_ */ /* glyphs. As this would be a definite performance hit, it is up to */ /* client applications to perform such computations. */ /* */ - /* The FT_Size_Metrics structure is valid for bitmap fonts also. */ + /* The `FT_Size_Metrics' structure is valid for bitmap fonts also. */ /* */ typedef struct FT_Size_Metrics_ { @@ -1653,8 +1679,8 @@ /* contained in the glyph slot. Typically */ /* @FT_GLYPH_FORMAT_BITMAP, */ /* @FT_GLYPH_FORMAT_OUTLINE, or */ - /* @FT_GLYPH_FORMAT_COMPOSITE, but others are */ - /* possible. */ + /* @FT_GLYPH_FORMAT_COMPOSITE, but other values */ + /* are possible. */ /* */ /* bitmap :: This field is used as a bitmap descriptor */ /* when the slot format is */ @@ -1669,16 +1695,15 @@ /* glyph slot contains a bitmap. */ /* */ /* bitmap_top :: The bitmap's top bearing expressed in integer */ - /* pixels. Remember that this is the distance */ - /* from the baseline to the top-most glyph */ - /* scanline, upwards y~coordinates being */ - /* *positive*. */ + /* pixels. This is the distance from the */ + /* baseline to the top-most glyph scanline, */ + /* upwards y~coordinates being *positive*. */ /* */ /* outline :: The outline descriptor for the current glyph */ /* image if its format is */ /* @FT_GLYPH_FORMAT_OUTLINE. Once a glyph is */ /* loaded, `outline' can be transformed, */ - /* distorted, embolded, etc. However, it must */ + /* distorted, emboldened, etc. However, it must */ /* not be freed. */ /* */ /* num_subglyphs :: The number of subglyphs in a composite glyph. */ @@ -1694,15 +1719,13 @@ /* control_data :: Certain font drivers can also return the */ /* control data for a given glyph image (e.g. */ /* TrueType bytecode, Type~1 charstrings, etc.). */ - /* This field is a pointer to such data. */ + /* This field is a pointer to such data; it is */ + /* currently internal to FreeType. */ /* */ /* control_len :: This is the length in bytes of the control */ - /* data. */ + /* data. Currently internal to FreeType. */ /* */ - /* other :: Really wicked formats can use this pointer to */ - /* present their own glyph image to client */ - /* applications. Note that the application */ - /* needs to know about the image format. */ + /* other :: Reserved. */ /* */ /* lsb_delta :: The difference between hinted and unhinted */ /* left side bearing while auto-hinting is */ @@ -1719,7 +1742,7 @@ /* formats). */ /* */ /* This image can later be converted into a bitmap by calling */ - /* @FT_Render_Glyph. This function finds the current renderer for */ + /* @FT_Render_Glyph. This function searches the current renderer for */ /* the native image's format, then invokes it. */ /* */ /* The renderer is in charge of transforming the native image through */ @@ -1732,29 +1755,55 @@ /* `slot->format' is also changed to @FT_GLYPH_FORMAT_BITMAP. */ /* */ /* Here is a small pseudo code fragment that shows how to use */ - /* `lsb_delta' and `rsb_delta': */ + /* `lsb_delta' and `rsb_delta' to do fractional positioning of */ + /* glyphs: */ /* */ /* { */ - /* FT_Pos origin_x = 0; */ - /* FT_Pos prev_rsb_delta = 0; */ + /* FT_GlyphSlot slot = face->glyph; */ + /* FT_Pos origin_x = 0; */ /* */ /* */ /* for all glyphs do */ - /* */ + /* */ /* */ + /* FT_Outline_Translate( slot->outline, origin_x & 63, 0 ); */ + /* */ + /* */ + /* */ + /* */ + /* */ + /* origin_x += slot->advance.x; */ + /* origin_x += slot->rsb_delta - slot->lsb_relta; */ + /* endfor */ + /* } */ + /* */ + /* Here is another small pseudo code fragment that shows how to use */ + /* `lsb_delta' and `rsb_delta' to improve integer positioning of */ + /* glyphs: */ + /* */ + /* { */ + /* FT_GlyphSlot slot = face->glyph; */ + /* FT_Pos origin_x = 0; */ + /* FT_Pos prev_rsb_delta = 0; */ + /* */ + /* */ + /* for all glyphs do */ + /* */ + /* */ /* */ /* */ - /* if ( prev_rsb_delta - face->glyph->lsb_delta >= 32 ) */ + /* if ( prev_rsb_delta - slot->lsb_delta >= 32 ) */ /* origin_x -= 64; */ - /* else if ( prev_rsb_delta - face->glyph->lsb_delta < -32 ) */ + /* else if ( prev_rsb_delta - slot->lsb_delta < -32 ) */ /* origin_x += 64; */ /* */ - /* prev_rsb_delta = face->glyph->rsb_delta; */ + /* prev_rsb_delta = slot->rsb_delta; */ /* */ /* */ /* */ - /* origin_x += face->glyph->advance.x; */ + /* origin_x += slot->advance.x; */ /* endfor */ /* } */ /* */ @@ -1828,7 +1877,8 @@ /* */ /* In case you want to provide your own memory allocating routines, */ /* use @FT_New_Library instead, followed by a call to */ - /* @FT_Add_Default_Modules (or a series of calls to @FT_Add_Module). */ + /* @FT_Add_Default_Modules (or a series of calls to @FT_Add_Module) */ + /* and @FT_Set_Default_Properties. */ /* */ /* See the documentation of @FT_Library and @FT_Face for */ /* multi-threading issues. */ @@ -1836,6 +1886,11 @@ /* If you need reference-counting (cf. @FT_Reference_Library), use */ /* @FT_New_Library and @FT_Done_Library. */ /* */ + /* If compilation option FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES is */ + /* set, this function reads the `FREETYPE_PROPERTIES' environment */ + /* variable to control driver properties. See sections @auto_hinter, */ + /* @cff_driver, @pcf_driver, and @tt_driver for more. */ + /* */ FT_EXPORT( FT_Error ) FT_Init_FreeType( FT_Library *alibrary ); @@ -1906,8 +1961,8 @@ /* FT_Parameter */ /* */ /* */ - /* A simple structure used to pass more or less generic parameters to */ - /* @FT_Open_Face. */ + /* A simple structure to pass more or less generic parameters to */ + /* @FT_Open_Face and @FT_Face_Properties. */ /* */ /* */ /* tag :: A four-byte identification tag. */ @@ -1932,9 +1987,9 @@ /* FT_Open_Args */ /* */ /* */ - /* A structure used to indicate how to open a new font file or */ - /* stream. A pointer to such a structure can be used as a parameter */ - /* for the functions @FT_Open_Face and @FT_Attach_Stream. */ + /* A structure to indicate how to open a new font file or stream. A */ + /* pointer to such a structure can be used as a parameter for the */ + /* functions @FT_Open_Face and @FT_Attach_Stream. */ /* */ /* */ /* flags :: A set of bit flags indicating how to use the */ @@ -1949,9 +2004,10 @@ /* stream :: A handle to a source stream object. */ /* */ /* driver :: This field is exclusively used by @FT_Open_Face; */ - /* it simply specifies the font driver to use to open */ - /* the face. If set to~0, FreeType tries to load the */ - /* face with each one of the drivers in its list. */ + /* it simply specifies the font driver to use for */ + /* opening the face. If set to NULL, FreeType tries */ + /* to load the face with each one of the drivers in */ + /* its list. */ /* */ /* num_params :: The number of extra parameters. */ /* */ @@ -1981,7 +2037,7 @@ /* `num_params' and `params' is used. They are ignored otherwise. */ /* */ /* Ideally, both the `pathname' and `params' fields should be tagged */ - /* as `const'; this is missing for API backwards compatibility. In */ + /* as `const'; this is missing for API backward compatibility. In */ /* other words, applications should treat them as read-only. */ /* */ typedef struct FT_Open_Args_ @@ -2004,7 +2060,7 @@ /* FT_New_Face */ /* */ /* */ - /* This function calls @FT_Open_Face to open a font by its pathname. */ + /* Call @FT_Open_Face to open a font by its pathname. */ /* */ /* */ /* library :: A handle to the library resource. */ @@ -2039,8 +2095,8 @@ /* FT_New_Memory_Face */ /* */ /* */ - /* This function calls @FT_Open_Face to open a font that has been */ - /* loaded into memory. */ + /* Call @FT_Open_Face to open a font that has been loaded into */ + /* memory. */ /* */ /* */ /* library :: A handle to the library resource. */ @@ -2092,20 +2148,21 @@ /* with value~0). Set it to~0 if there is only one */ /* face in the font file. */ /* */ - /* Bits 16-30 are relevant to GX variation fonts only, */ - /* specifying the named instance index for the current */ - /* face index (starting with value~1; value~0 makes */ - /* FreeType ignore named instances). For non-GX fonts, */ - /* bits 16-30 are ignored. Assuming that you want to */ - /* access the third named instance in face~4, */ - /* `face_index' should be set to 0x00030004. If you */ - /* want to access face~4 without GX variation handling, */ - /* simply set `face_index' to value~4. */ + /* Bits 16-30 are relevant to GX and OpenType variation */ + /* fonts only, specifying the named instance index for */ + /* the current face index (starting with value~1; */ + /* value~0 makes FreeType ignore named instances). For */ + /* non-variation fonts, bits 16-30 are ignored. */ + /* Assuming that you want to access the third named */ + /* instance in face~4, `face_index' should be set to */ + /* 0x00030004. If you want to access face~4 without */ + /* variation handling, simply set `face_index' to */ + /* value~4. */ /* */ - /* FT_Open_Face and its siblings can be used to quickly */ - /* check whether the font format of a given font */ - /* resource is supported by FreeType. In general, if */ - /* the `face_index' argument is negative, the */ + /* `FT_Open_Face' and its siblings can be used to */ + /* quickly check whether the font format of a given */ + /* font resource is supported by FreeType. In general, */ + /* if the `face_index' argument is negative, the */ /* function's return value is~0 if the font format is */ /* recognized, or non-zero otherwise. The function */ /* allocates a more or less empty face handle in */ @@ -2114,10 +2171,10 @@ /* `face->num_faces' and `face->style_flags'. For any */ /* negative value of `face_index', `face->num_faces' */ /* gives the number of faces within the font file. For */ - /* the negative value `-(N+1)' (with `N' a 16-bit */ - /* value), bits 16-30 in `face->style_flags' give the */ - /* number of named instances in face `N' if we have a */ - /* GX variation font (or zero otherwise). After */ + /* the negative value `-(N+1)' (with `N' a non-negative */ + /* 16-bit value), bits 16-30 in `face->style_flags' */ + /* give the number of named instances in face `N' if we */ + /* have a variation font (or zero otherwise). After */ /* examination, the returned @FT_Face structure should */ /* be deallocated with a call to @FT_Done_Face. */ /* */ @@ -2224,7 +2281,7 @@ /* FT_Attach_File */ /* */ /* */ - /* This function calls @FT_Attach_Stream to attach a file. */ + /* Call @FT_Attach_Stream to attach a file. */ /* */ /* */ /* face :: The target face object. */ @@ -2268,7 +2325,7 @@ /* */ /* Client applications are expected to know what they are doing */ /* when invoking this function. Most drivers simply do not implement */ - /* file attachments. */ + /* file or stream attachments. */ /* */ FT_EXPORT( FT_Error ) FT_Attach_Stream( FT_Face face, @@ -2352,11 +2409,11 @@ /* FreeType silently uses outlines if there is no bitmap for a given */ /* glyph index. */ /* */ - /* For GX variation fonts, a bitmap strike makes sense only if the */ - /* default instance is active (this is, no glyph variation takes */ - /* place); otherwise, FreeType simply ignores bitmap strikes. The */ - /* same is true for all named instances that are different from the */ - /* default instance. */ + /* For GX and OpenType variation fonts, a bitmap strike makes sense */ + /* only if the default instance is active (this is, no glyph */ + /* variation takes place); otherwise, FreeType simply ignores bitmap */ + /* strikes. The same is true for all named instances that are */ + /* different from the default instance. */ /* */ /* Don't use this function if you are using the FreeType cache API. */ /* */ @@ -2389,7 +2446,7 @@ /* */ /* FT_SIZE_REQUEST_TYPE_REAL_DIM :: */ /* The real dimension. The sum of the `ascender' and (minus of) */ - /* the `descender' fields of @FT_FaceRec are used to determine both */ + /* the `descender' fields of @FT_FaceRec is used to determine both */ /* scaling values. */ /* */ /* FT_SIZE_REQUEST_TYPE_BBOX :: */ @@ -2435,7 +2492,7 @@ /* FT_Size_RequestRec */ /* */ /* */ - /* A structure used to model a size request. */ + /* A structure to model a size request. */ /* */ /* */ /* type :: See @FT_Size_Request_Type. */ @@ -2448,14 +2505,16 @@ /* */ /* horiResolution :: The horizontal resolution (dpi, i.e., pixels per */ /* inch). If set to zero, `width' is treated as a */ - /* 26.6 fractional *pixel* value. */ + /* 26.6 fractional *pixel* value, which gets */ + /* internally rounded to an integer. */ /* */ /* vertResolution :: The vertical resolution (dpi, i.e., pixels per */ /* inch). If set to zero, `height' is treated as a */ - /* 26.6 fractional *pixel* value. */ + /* 26.6 fractional *pixel* value, which gets */ + /* internally rounded to an integer. */ /* */ /* */ - /* If `width' is zero, then the horizontal scaling value is set equal */ + /* If `width' is zero, the horizontal scaling value is set equal */ /* to the vertical scaling value, and vice versa. */ /* */ /* If `type' is FT_SIZE_REQUEST_TYPE_SCALES, `width' and `height' are */ @@ -2512,8 +2571,12 @@ /* size is dependent entirely on how the size is defined in the */ /* source face. The font designer chooses the final size of each */ /* glyph relative to this size. For more information refer to */ - /* `http://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html' */ + /* `https://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html'. */ /* */ + /* Contrary to @FT_Set_Char_Size, this function doesn't have special */ + /* code to normalize zero-valued widths, heights, or resolutions */ + /* (which lead to errors in most cases). */ + /* */ /* Don't use this function if you are using the FreeType cache API. */ /* */ FT_EXPORT( FT_Error ) @@ -2527,8 +2590,7 @@ /* FT_Set_Char_Size */ /* */ /* */ - /* This function calls @FT_Request_Size to request the nominal size */ - /* (in points). */ + /* Call @FT_Request_Size to request the nominal size (in points). */ /* */ /* */ /* face :: A handle to a target face object. */ @@ -2546,6 +2608,10 @@ /* FreeType error code. 0~means success. */ /* */ /* */ + /* While this function allows fractional points as input values, the */ + /* resulting ppem value for the given resolution is always rounded to */ + /* the nearest integer. */ + /* */ /* If either the character width or height is zero, it is set equal */ /* to the other value. */ /* */ @@ -2571,8 +2637,7 @@ /* FT_Set_Pixel_Sizes */ /* */ /* */ - /* This function calls @FT_Request_Size to request the nominal size */ - /* (in pixels). */ + /* Call @FT_Request_Size to request the nominal size (in pixels). */ /* */ /* */ /* face :: A handle to the target face object. */ @@ -2586,8 +2651,8 @@ /* FreeType error code. 0~means success. */ /* */ /* */ - /* You should not rely on the resulting glyphs matching, or being */ - /* constrained, to this pixel size. Refer to @FT_Request_Size to */ + /* You should not rely on the resulting glyphs matching or being */ + /* constrained to this pixel size. Refer to @FT_Request_Size to */ /* understand how requested sizes relate to actual sizes. */ /* */ /* Don't use this function if you are using the FreeType cache API. */ @@ -2604,8 +2669,7 @@ /* FT_Load_Glyph */ /* */ /* */ - /* A function used to load a single glyph into the glyph slot of a */ - /* face object. */ + /* Load a glyph into the glyph slot of a face object. */ /* */ /* */ /* face :: A handle to the target face object where the glyph */ @@ -2650,8 +2714,8 @@ /* FT_Load_Char */ /* */ /* */ - /* A function used to load a single glyph into the glyph slot of a */ - /* face object, according to its character code. */ + /* Load a glyph into the glyph slot of a face object, accessed by its */ + /* character code. */ /* */ /* */ /* face :: A handle to a target face object where the glyph */ @@ -2673,6 +2737,10 @@ /* */ /* This function simply calls @FT_Get_Char_Index and @FT_Load_Glyph. */ /* */ + /* Many fonts contain glyphs that can't be loaded by this function */ + /* since its glyph indices are not listed in any of the font's */ + /* charmaps. */ + /* */ FT_EXPORT( FT_Error ) FT_Load_Char( FT_Face face, FT_ULong char_code, @@ -2685,8 +2753,8 @@ * FT_LOAD_XXX * * @description: - * A list of bit field constants used with @FT_Load_Glyph to indicate - * what kind of operations to perform during glyph loading. + * A list of bit field constants for @FT_Load_Glyph to indicate what + * kind of operations to perform during glyph loading. * * @values: * FT_LOAD_DEFAULT :: @@ -2698,13 +2766,13 @@ * The bitmap data can be accessed from the glyph slot (see note * below). * - * 2. If no embedded bitmap is searched or found, FreeType looks for a - * scalable outline. If one is found, it is loaded from the font - * file, scaled to device pixels, then `hinted' to the pixel grid - * in order to optimize it. The outline data can be accessed from - * the glyph slot (see note below). + * 2. If no embedded bitmap is searched for or found, FreeType looks + * for a scalable outline. If one is found, it is loaded from + * the font file, scaled to device pixels, then `hinted' to the + * pixel grid in order to optimize it. The outline data can be + * accessed from the glyph slot (see note below). * - * Note that by default, the glyph loader doesn't render outlines into + * Note that by default the glyph loader doesn't render outlines into * bitmaps. The following flags are used to modify this default * behaviour to more specific and useful cases. * @@ -2751,13 +2819,13 @@ * various font formats. * * FT_LOAD_FORCE_AUTOHINT :: - * Indicates that the auto-hinter is preferred over the font's native - * hinter. See also the note below. + * Prefer the auto-hinter over the font's native hinter. See also + * the note below. * * FT_LOAD_PEDANTIC :: - * Indicates that the font driver should perform pedantic verifications - * during glyph loading. This is mostly used to detect broken glyphs - * in fonts. By default, FreeType tries to handle broken fonts also. + * Make the font driver perform pedantic verifications during glyph + * loading. This is mostly used to detect broken glyphs in fonts. + * By default, FreeType tries to handle broken fonts also. * * In particular, errors from the TrueType bytecode engine are not * passed to the application if this flag is not set; this might @@ -2765,17 +2833,16 @@ * bytecode is buggy. * * FT_LOAD_NO_RECURSE :: - * Indicate that the font driver should not load composite glyphs - * recursively. Instead, it should set the `num_subglyph' and - * `subglyphs' values of the glyph slot accordingly, and set - * `glyph->format' to @FT_GLYPH_FORMAT_COMPOSITE. The description of - * subglyphs can then be accessed with @FT_Get_SubGlyph_Info. + * Don't load composite glyphs recursively. Instead, the font + * driver should set the `num_subglyph' and `subglyphs' values of + * the glyph slot accordingly, and set `glyph->format' to + * @FT_GLYPH_FORMAT_COMPOSITE. The description of subglyphs can + * then be accessed with @FT_Get_SubGlyph_Info. * * This flag implies @FT_LOAD_NO_SCALE and @FT_LOAD_IGNORE_TRANSFORM. * * FT_LOAD_IGNORE_TRANSFORM :: - * Indicates that the transform matrix set by @FT_Set_Transform should - * be ignored. + * Ignore the transform matrix set by @FT_Set_Transform. * * FT_LOAD_MONOCHROME :: * This flag is used with @FT_LOAD_RENDER to indicate that you want to @@ -2787,26 +2854,24 @@ * monochrome-optimized hinting algorithm is used. * * FT_LOAD_LINEAR_DESIGN :: - * Indicates that the `linearHoriAdvance' and `linearVertAdvance' - * fields of @FT_GlyphSlotRec should be kept in font units. See - * @FT_GlyphSlotRec for details. + * Keep `linearHoriAdvance' and `linearVertAdvance' fields of + * @FT_GlyphSlotRec in font units. See @FT_GlyphSlotRec for + * details. * * FT_LOAD_NO_AUTOHINT :: - * Disable auto-hinter. See also the note below. + * Disable the auto-hinter. See also the note below. * * FT_LOAD_COLOR :: - * This flag is used to request loading of color embedded-bitmap - * images. The resulting color bitmaps, if available, will have the - * @FT_PIXEL_MODE_BGRA format. When the flag is not used and color - * bitmaps are found, they will be converted to 256-level gray - * bitmaps transparently. Those bitmaps will be in the + * Load embedded color bitmap images. The resulting color bitmaps, + * if available, will have the @FT_PIXEL_MODE_BGRA format. If the + * flag is not set and color bitmaps are found, they are converted + * to 256-level gray bitmaps transparently, using the * @FT_PIXEL_MODE_GRAY format. * * FT_LOAD_COMPUTE_METRICS :: - * This flag sets computing glyph metrics without the use of bundled - * metrics tables (for example, the `hdmx' table in TrueType fonts). - * Well-behaving fonts have optimized bundled metrics and these should - * be used. This flag is mainly used by font validating or font + * Compute glyph metrics from the glyph data, without the use of + * bundled metrics tables (for example, the `hdmx' table in TrueType + * fonts). This flag is mainly used by font validating or font * editing applications, which need to ignore, verify, or edit those * tables. * @@ -2813,10 +2878,10 @@ * Currently, this flag is only implemented for TrueType fonts. * * FT_LOAD_BITMAP_METRICS_ONLY :: - * This flag is used to request loading of the metrics and bitmap - * image information of a (possibly embedded) bitmap glyph without - * allocating or copying the bitmap image data itself. No effect if - * the target glyph is not a bitmap image. + * Request loading of the metrics and bitmap image information of a + * (possibly embedded) bitmap glyph without allocating or copying + * the bitmap image data itself. No effect if the target glyph is + * not a bitmap image. * * This flag unsets @FT_LOAD_RENDER. * @@ -2863,7 +2928,7 @@ #define FT_LOAD_MONOCHROME ( 1L << 12 ) #define FT_LOAD_LINEAR_DESIGN ( 1L << 13 ) #define FT_LOAD_NO_AUTOHINT ( 1L << 15 ) - /* Bits 16..19 are used by `FT_LOAD_TARGET_' */ + /* Bits 16-19 are used by `FT_LOAD_TARGET_' */ #define FT_LOAD_COLOR ( 1L << 20 ) #define FT_LOAD_COMPUTE_METRICS ( 1L << 21 ) #define FT_LOAD_BITMAP_METRICS_ONLY ( 1L << 22 ) @@ -2870,7 +2935,7 @@ /* */ - /* used internally only by certain font drivers! */ + /* used internally only by certain font drivers */ #define FT_LOAD_ADVANCE_ONLY ( 1L << 8 ) #define FT_LOAD_SBITS_ONLY ( 1L << 14 ) @@ -2881,30 +2946,41 @@ * FT_LOAD_TARGET_XXX * * @description: - * A list of values that are used to select a specific hinting algorithm - * to use by the hinter. You should OR one of these values to your - * `load_flags' when calling @FT_Load_Glyph. + * A list of values to select a specific hinting algorithm for the + * hinter. You should OR one of these values to your `load_flags' + * when calling @FT_Load_Glyph. * - * Note that font's native hinters may ignore the hinting algorithm you - * have specified (e.g., the TrueType bytecode interpreter). You can set - * @FT_LOAD_FORCE_AUTOHINT to ensure that the auto-hinter is used. + * Note that a font's native hinters may ignore the hinting algorithm + * you have specified (e.g., the TrueType bytecode interpreter). You + * can set @FT_LOAD_FORCE_AUTOHINT to ensure that the auto-hinter is + * used. * * @values: * FT_LOAD_TARGET_NORMAL :: - * This corresponds to the default hinting algorithm, optimized for - * standard gray-level rendering. For monochrome output, use - * @FT_LOAD_TARGET_MONO instead. + * The default hinting algorithm, optimized for standard gray-level + * rendering. For monochrome output, use @FT_LOAD_TARGET_MONO + * instead. * * FT_LOAD_TARGET_LIGHT :: * A lighter hinting algorithm for gray-level modes. Many generated * glyphs are fuzzier but better resemble their original shape. This * is achieved by snapping glyphs to the pixel grid only vertically - * (Y-axis), as is done by Microsoft's ClearType and Adobe's - * proprietary font renderer. This preserves inter-glyph spacing in + * (Y-axis), as is done by FreeType's new CFF engine or Microsoft's + * ClearType font renderer. This preserves inter-glyph spacing in * horizontal text. The snapping is done either by the native font - * driver if the driver itself and the font support it or by the + * driver, if the driver itself and the font support it, or by the * auto-hinter. * + * Advance widths are rounded to integer values; however, using the + * `lsb_delta' and `rsb_delta' fields of @FT_GlyphSlotRec, it is + * possible to get fractional advance widths for sub-pixel positioning + * (which is recommended to use). + * + * If configuration option AF_CONFIG_OPTION_TT_SIZE_METRICS is active, + * TrueType-like metrics are used to make this mode behave similarly + * as in unpatched FreeType versions between 2.4.6 and 2.7.1 + * (inclusive). + * * FT_LOAD_TARGET_MONO :: * Strong hinting algorithm that should only be used for monochrome * output. The result is probably unpleasant if the glyph is rendered @@ -2911,7 +2987,7 @@ * in non-monochrome modes. * * FT_LOAD_TARGET_LCD :: - * A variant of @FT_LOAD_TARGET_NORMAL optimized for horizontally + * A variant of @FT_LOAD_TARGET_LIGHT optimized for horizontally * decimated LCD displays. * * FT_LOAD_TARGET_LCD_V :: @@ -2939,6 +3015,13 @@ * FT_Render_Glyph( face->glyph, FT_RENDER_MODE_LCD ); * } * + * In general, you should stick with one rendering mode. For example, + * switching between @FT_LOAD_TARGET_NORMAL and @FT_LOAD_TARGET_MONO + * enforces a lot of recomputation for TrueType fonts, which is slow. + * Another reason is caching: Selecting a different mode usually causes + * changes in both the outlines and the rasterized bitmaps; it is thus + * necessary to empty the cache after a mode switch to avoid false hits. + * */ #define FT_LOAD_TARGET_( x ) ( (FT_Int32)( (x) & 15 ) << 16 ) @@ -2968,18 +3051,17 @@ /* FT_Set_Transform */ /* */ /* */ - /* A function used to set the transformation that is applied to glyph */ - /* images when they are loaded into a glyph slot through */ - /* @FT_Load_Glyph. */ + /* Set the transformation that is applied to glyph images when they */ + /* are loaded into a glyph slot through @FT_Load_Glyph. */ /* */ /* */ /* face :: A handle to the source face object. */ /* */ /* */ - /* matrix :: A pointer to the transformation's 2x2 matrix. Use~0 for */ - /* the identity matrix. */ - /* delta :: A pointer to the translation vector. Use~0 for the null */ - /* vector. */ + /* matrix :: A pointer to the transformation's 2x2 matrix. Use NULL */ + /* for the identity matrix. */ + /* delta :: A pointer to the translation vector. Use NULL for the */ + /* null vector. */ /* */ /* */ /* The transformation is only applied to scalable image formats after */ @@ -3002,9 +3084,8 @@ /* FT_Render_Mode */ /* */ /* */ - /* An enumeration type that lists the render modes supported by */ - /* FreeType~2. Each mode corresponds to a specific type of scanline */ - /* conversion performed on the outline. */ + /* Render modes supported by FreeType~2. Each mode corresponds to a */ + /* specific type of scanline conversion performed on the outline. */ /* */ /* For bitmap fonts and embedded bitmaps the `bitmap->pixel_mode' */ /* field in the @FT_GlyphSlotRec structure gives the format of the */ @@ -3017,8 +3098,8 @@ /* */ /* */ /* FT_RENDER_MODE_NORMAL :: */ - /* This is the default render mode; it corresponds to 8-bit */ - /* anti-aliased bitmaps. */ + /* Default render mode; it corresponds to 8-bit anti-aliased */ + /* bitmaps. */ /* */ /* FT_RENDER_MODE_LIGHT :: */ /* This is equivalent to @FT_RENDER_MODE_NORMAL. It is only */ @@ -3043,11 +3124,11 @@ /* glyph outline in pixels and use the @FT_PIXEL_MODE_LCD_V mode. */ /* */ /* */ - /* The LCD-optimized glyph bitmaps produced by FT_Render_Glyph can be */ - /* filtered to reduce color-fringes by using @FT_Library_SetLcdFilter */ - /* (not active in the default builds). It is up to the caller to */ - /* either call @FT_Library_SetLcdFilter (if available) or do the */ - /* filtering itself. */ + /* The LCD-optimized glyph bitmaps produced by `FT_Render_Glyph' can */ + /* be filtered to reduce color-fringes by using */ + /* @FT_Library_SetLcdFilter (not active in the default builds). It */ + /* is up to the caller to either call `FT_Library_SetLcdFilter' (if */ + /* available) or do the filtering itself. */ /* */ /* The selected render mode only affects vector glyphs of a font. */ /* Embedded bitmaps often have a different pixel mode like */ @@ -3088,9 +3169,9 @@ /* convert. */ /* */ /* */ - /* render_mode :: This is the render mode used to render the glyph */ - /* image into a bitmap. See @FT_Render_Mode for a */ - /* list of possible values. */ + /* render_mode :: The render mode used to render the glyph image into */ + /* a bitmap. See @FT_Render_Mode for a list of */ + /* possible values. */ /* */ /* */ /* FreeType error code. 0~means success. */ @@ -3097,7 +3178,7 @@ /* */ /* */ /* To get meaningful results, font scaling values must be set with */ - /* functions like @FT_Set_Char_Size before calling FT_Render_Glyph. */ + /* functions like @FT_Set_Char_Size before calling `FT_Render_Glyph'. */ /* */ /* When FreeType outputs a bitmap of a glyph, it really outputs an */ /* alpha coverage map. If a pixel is completely covered by a */ @@ -3123,7 +3204,7 @@ /* this does not translate to 50% brightness for that pixel on our */ /* sRGB and gamma~2.2 screens. Due to their non-linearity, they */ /* dwell longer in the darks and only a pixel value of about 186 */ - /* results in 50% brightness – 128 ends up too dark on both bright */ + /* results in 50% brightness -- 128 ends up too dark on both bright */ /* and dark backgrounds. The net result is that dark text looks */ /* burnt-out, pixely and blotchy on bright background, bright text */ /* too frail on dark backgrounds, and colored text on colored */ @@ -3187,17 +3268,15 @@ /* FT_Kerning_Mode */ /* */ /* */ - /* An enumeration used to specify which kerning values to return in */ + /* An enumeration to specify the format of kerning values returned by */ /* @FT_Get_Kerning. */ /* */ /* */ /* FT_KERNING_DEFAULT :: Return grid-fitted kerning distances in */ - /* pixels (value is~0). Whether they are */ - /* scaled depends on @FT_LOAD_NO_SCALE. */ + /* 26.6 fractional pixels. */ /* */ /* FT_KERNING_UNFITTED :: Return un-grid-fitted kerning distances in */ - /* 26.6 fractional pixels. Whether they are */ - /* scaled depends on @FT_LOAD_NO_SCALE. */ + /* 26.6 fractional pixels. */ /* */ /* FT_KERNING_UNSCALED :: Return the kerning vector in original font */ /* units. */ @@ -3207,9 +3286,13 @@ /* FreeType heuristically scale down kerning distances at small ppem */ /* values so that they don't become too big. */ /* */ + /* Both FT_KERNING_DEFAULT and FT_KERNING_UNFITTED use the current */ + /* horizontal scaling factor (as set e.g. with @FT_Set_Char_Size) to */ + /* convert font units to pixels. */ + /* */ typedef enum FT_Kerning_Mode_ { - FT_KERNING_DEFAULT = 0, + FT_KERNING_DEFAULT = 0, FT_KERNING_UNFITTED, FT_KERNING_UNSCALED @@ -3229,7 +3312,7 @@ /* FT_Get_Kerning */ /* */ /* */ - /* Return the kerning vector between two glyphs of a same face. */ + /* Return the kerning vector between two glyphs of the same face. */ /* */ /* */ /* face :: A handle to a source face object. */ @@ -3257,6 +3340,10 @@ /* kernings, are out of the scope of this API function -- they can be */ /* implemented through format-specific interfaces. */ /* */ + /* Kerning for OpenType fonts implemented in a `GPOS' table is not */ + /* supported; use @FT_HAS_KERNING to find out whether a font has data */ + /* that can be extracted with `FT_Get_Kerning'. */ + /* */ FT_EXPORT( FT_Error ) FT_Get_Kerning( FT_Face face, FT_UInt left_glyph, @@ -3296,7 +3383,7 @@ /* @FT_Attach_Stream). */ /* */ /* Only very few AFM files come with track kerning data; please refer */ - /* to the Adobe's AFM specification for more details. */ + /* to Adobe's AFM specification for more details. */ /* */ FT_EXPORT( FT_Error ) FT_Get_Track_Kerning( FT_Face face, @@ -3358,7 +3445,7 @@ /* */ /* */ /* Retrieve the ASCII PostScript name of a given face, if available. */ - /* This only works with PostScript and TrueType fonts. */ + /* This only works with PostScript, TrueType, and OpenType fonts. */ /* */ /* */ /* face :: A handle to the source face object. */ @@ -3370,6 +3457,13 @@ /* The returned pointer is owned by the face and is destroyed with */ /* it. */ /* */ + /* For variation fonts, this string changes if you select a different */ + /* instance, and you have to call `FT_Get_PostScript_Name' again to */ + /* retrieve it. FreeType follows Adobe TechNote #5902, `Generating */ + /* PostScript Names for Fonts Using OpenType Font Variations'. */ + /* */ + /* http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/font/pdfs/5902.AdobePSNameGeneration.html */ + /* */ FT_EXPORT( const char* ) FT_Get_Postscript_Name( FT_Face face ); @@ -3429,7 +3523,8 @@ /* the face (i.e., if it is not listed in the `face->charmaps' */ /* table). */ /* */ - /* It also fails if a type~14 charmap is selected. */ + /* It also fails if an OpenType type~14 charmap is selected (which */ + /* doesn't map character codes to glyph indices at all). */ /* */ FT_EXPORT( FT_Error ) FT_Set_Charmap( FT_Face face, @@ -3464,7 +3559,7 @@ /* */ /* */ /* Return the glyph index of a given character code. This function */ - /* uses a charmap object to do the mapping. */ + /* uses the currently selected charmap to do the mapping. */ /* */ /* */ /* face :: A handle to the source face object. */ @@ -3498,9 +3593,8 @@ /* FT_Get_First_Char */ /* */ /* */ - /* This function is used to return the first character code in the */ - /* current charmap of a given face. It also returns the */ - /* corresponding glyph index. */ + /* Return the first character code in the current charmap of a given */ + /* face, together with its corresponding glyph index. */ /* */ /* */ /* face :: A handle to the source face object. */ @@ -3513,7 +3607,7 @@ /* The charmap's first character code. */ /* */ /* */ - /* You should use this function with @FT_Get_Next_Char to be able to */ + /* You should use this function together with @FT_Get_Next_Char to */ /* parse all character codes available in a given charmap. The code */ /* should look like this: */ /* */ @@ -3553,12 +3647,13 @@ /* FT_Get_Next_Char */ /* */ /* */ - /* This function is used to return the next character code in the */ - /* current charmap of a given face following the value `char_code', */ - /* as well as the corresponding glyph index. */ + /* Return the next character code in the current charmap of a given */ + /* face following the value `char_code', as well as the corresponding */ + /* glyph index. */ /* */ /* */ /* face :: A handle to the source face object. */ + /* */ /* char_code :: The starting character code. */ /* */ /* */ @@ -3571,7 +3666,7 @@ /* */ /* You should use this function with @FT_Get_First_Char to walk */ /* over all character codes available in a given charmap. See the */ - /* note for this function for a simple code example. */ + /* note for that function for a simple code example. */ /* */ /* Note that `*agindex' is set to~0 when there are no more codes in */ /* the charmap. */ @@ -3582,6 +3677,102 @@ FT_UInt *agindex ); + /************************************************************************* + * + * @function: + * FT_Face_Properties + * + * @description: + * Set or override certain (library or module-wide) properties on a + * face-by-face basis. Useful for finer-grained control and avoiding + * locks on shared structures (threads can modify their own faces as + * they see fit). + * + * Contrary to @FT_Property_Set, this function uses @FT_Parameter so + * that you can pass multiple properties to the target face in one call. + * Note that only a subset of the available properties can be + * controlled. + * + * * Stem darkening (@FT_PARAM_TAG_STEM_DARKENING, corresponding to the + * property `no-stem-darkening' provided by the `autofit' and `cff' + * modules; see @no-stem-darkening[autofit] and + * @no-stem-darkening[cff]). + * + * * LCD filter weights (@FT_PARAM_TAG_LCD_FILTER_WEIGHTS, corresponding + * to function @FT_Library_SetLcdFilterWeights). + * + * * Seed value for the CFF `random' operator + * (@FT_PARAM_TAG_RANDOM_SEED, corresponding to the `random-seed' + * property provided by the `cff' module; see @random-seed). + * + * Pass NULL as `data' in @FT_Parameter for a given tag to reset the + * option and use the library or module default again. + * + * @input: + * face :: + * A handle to the source face object. + * + * num_properties :: + * The number of properties that follow. + * + * properties :: + * A handle to an @FT_Parameter array with `num_properties' elements. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * Here an example that sets three properties. You must define + * FT_CONFIG_OPTION_SUBPIXEL_RENDERING to make the LCD filter examples + * work. + * + * { + * FT_Parameter property1; + * FT_Bool darken_stems = 1; + * + * FT_Parameter property2; + * FT_LcdFiveTapFilter custom_weight = + * { 0x11, 0x44, 0x56, 0x44, 0x11 }; + * + * FT_Parameter property3; + * FT_Int32 random_seed = 314159265; + * + * FT_Parameter properties[3] = { property1, + * property2, + * property3 }; + * + * + * property1.tag = FT_PARAM_TAG_STEM_DARKENING; + * property1.data = &darken_stems; + * + * property2.tag = FT_PARAM_TAG_LCD_FILTER_WEIGHTS; + * property2.data = custom_weight; + * + * property3.tag = FT_PARAM_TAG_RANDOM_SEED; + * property3.data = &random_seed; + * + * FT_Face_Properties( face, 3, properties ); + * } + * + * The next example resets a single property to its default value. + * + * { + * FT_Parameter property; + * + * + * property.tag = FT_PARAM_TAG_LCD_FILTER_WEIGHTS; + * property.data = NULL; + * + * FT_Face_Properties( face, 1, &property ); + * } + * + */ + FT_EXPORT( FT_Error ) + FT_Face_Properties( FT_Face face, + FT_UInt num_properties, + FT_Parameter* properties ); + + /*************************************************************************/ /* */ /* */ @@ -3588,8 +3779,7 @@ /* FT_Get_Name_Index */ /* */ /* */ - /* Return the glyph index of a given glyph name. This function uses */ - /* driver specific objects to do the translation. */ + /* Return the glyph index of a given glyph name. */ /* */ /* */ /* face :: A handle to the source face object. */ @@ -3610,8 +3800,10 @@ * FT_SUBGLYPH_FLAG_XXX * * @description: - * A list of constants used to describe subglyphs. Please refer to the - * TrueType specification for the meaning of the various flags. + * A list of constants describing subglyphs. Please refer to the + * `glyf' table description in the OpenType specification for the + * meaning of the various flags (which get synthesized for + * non-OpenType subglyphs). * * @values: * FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS :: @@ -3672,7 +3864,7 @@ * @note: * The values of `*p_arg1', `*p_arg2', and `*p_transform' must be * interpreted depending on the flags returned in `*p_flags'. See the - * TrueType specification for details. + * OpenType specification for details. * */ FT_EXPORT( FT_Error ) @@ -3712,33 +3904,31 @@ /* the font software copyright owner. */ /* */ /* FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING :: */ - /* If this bit is set, the font may be embedded and temporarily */ - /* loaded on the remote system. Documents containing Preview & */ - /* Print fonts must be opened `read-only'; no edits can be applied */ - /* to the document. */ + /* The font may be embedded and temporarily loaded on the remote */ + /* system. Documents containing Preview & Print fonts must be */ + /* opened `read-only'; no edits can be applied to the document. */ /* */ /* FT_FSTYPE_EDITABLE_EMBEDDING :: */ - /* If this bit is set, the font may be embedded but must only be */ - /* installed temporarily on other systems. In contrast to Preview */ - /* & Print fonts, documents containing editable fonts may be opened */ - /* for reading, editing is permitted, and changes may be saved. */ + /* The font may be embedded but must only be installed temporarily */ + /* on other systems. In contrast to Preview & Print fonts, */ + /* documents containing editable fonts may be opened for reading, */ + /* editing is permitted, and changes may be saved. */ /* */ /* FT_FSTYPE_NO_SUBSETTING :: */ - /* If this bit is set, the font may not be subsetted prior to */ - /* embedding. */ + /* The font may not be subsetted prior to embedding. */ /* */ /* FT_FSTYPE_BITMAP_EMBEDDING_ONLY :: */ - /* If this bit is set, only bitmaps contained in the font may be */ - /* embedded; no outline data may be embedded. If there are no */ - /* bitmaps available in the font, then the font is unembeddable. */ + /* Only bitmaps contained in the font may be embedded; no outline */ + /* data may be embedded. If there are no bitmaps available in the */ + /* font, then the font is unembeddable. */ /* */ /* */ /* The flags are ORed together, thus more than a single value can be */ /* returned. */ /* */ - /* While the fsType flags can indicate that a font may be embedded, a */ - /* license with the font vendor may be separately required to use the */ - /* font in this way. */ + /* While the `fsType' flags can indicate that a font may be embedded, */ + /* a license with the font vendor may be separately required to use */ + /* the font in this way. */ /* */ #define FT_FSTYPE_INSTALLABLE_EMBEDDING 0x0000 #define FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING 0x0002 @@ -3754,13 +3944,13 @@ /* FT_Get_FSType_Flags */ /* */ /* */ - /* Return the fsType flags for a font. */ + /* Return the `fsType' flags for a font. */ /* */ /* */ /* face :: A handle to the source face object. */ /* */ /* */ - /* The fsType flags, @FT_FSTYPE_XXX. */ + /* The `fsType' flags, see @FT_FSTYPE_XXX. */ /* */ /* */ /* Use this function rather than directly reading the `fs_type' field */ @@ -3780,40 +3970,52 @@ /* glyph_variants */ /* */ /* */ - /* Glyph Variants */ + /* Unicode Variation Sequences */ /* */ /* <Abstract> */ - /* The FreeType~2 interface to Unicode Ideographic Variation */ - /* Sequences (IVS), using the SFNT cmap format~14. */ + /* The FreeType~2 interface to Unicode Variation Sequences (UVS), */ + /* using the SFNT cmap format~14. */ /* */ /* <Description> */ - /* Many CJK characters have variant forms. They are a sort of grey */ - /* area somewhere between being totally irrelevant and semantically */ - /* distinct; for this reason, the Unicode consortium decided to */ - /* introduce Ideographic Variation Sequences (IVS), consisting of a */ - /* Unicode base character and one of 240 variant selectors */ - /* (U+E0100-U+E01EF), instead of further extending the already huge */ - /* code range for CJK characters. */ + /* Many characters, especially for CJK scripts, have variant forms. */ + /* They are a sort of grey area somewhere between being totally */ + /* irrelevant and semantically distinct; for this reason, the Unicode */ + /* consortium decided to introduce Variation Sequences (VS), */ + /* consisting of a Unicode base character and a variation selector */ + /* instead of further extending the already huge number of */ + /* characters. */ /* */ - /* An IVS is registered and unique; for further details please refer */ - /* to Unicode Technical Standard #37, the Ideographic Variation */ - /* Database: */ + /* Unicode maintains two different sets, namely `Standardized */ + /* Variation Sequences' and registered `Ideographic Variation */ + /* Sequences' (IVS), collected in the `Ideographic Variation */ + /* Database' (IVD). */ /* */ - /* http://www.unicode.org/reports/tr37/ */ + /* http://unicode.org/Public/UCD/latest/ucd/StandardizedVariants.txt */ + /* http://unicode.org/reports/tr37/ */ + /* http://unicode.org/ivd/ */ /* */ - /* To date (November 2014), the character with the most variants is */ - /* U+9089, having 32 such IVS. */ + /* To date (January 2017), the character with the most ideographic */ + /* variations is U+9089, having 32 such IVS. */ /* */ - /* Adobe and MS decided to support IVS with a new cmap subtable */ - /* (format~14). It is an odd subtable because it is not a mapping of */ - /* input code points to glyphs, but contains lists of all variants */ - /* supported by the font. */ + /* Three Mongolian Variation Selectors have the values U+180B-U+180D; */ + /* 256 generic Variation Selectors are encoded in the ranges */ + /* U+FE00-U+FE0F and U+E0100-U+E01EF. IVS currently use Variation */ + /* Selectors from the range U+E0100-U+E01EF only. */ /* */ - /* A variant may be either `default' or `non-default'. A default */ - /* variant is the one you will get for that code point if you look it */ - /* up in the standard Unicode cmap. A non-default variant is a */ - /* different glyph. */ + /* A VS consists of the base character value followed by a single */ + /* Variation Selector. For example, to get the first variation of */ + /* U+9089, you have to write the character sequence `U+9089 U+E0100'. */ /* */ + /* Adobe and MS decided to support both standardized and ideographic */ + /* VS with a new cmap subtable (format~14). It is an odd subtable */ + /* because it is not a mapping of input code points to glyphs, but */ + /* contains lists of all variations supported by the font. */ + /* */ + /* A variation may be either `default' or `non-default' for a given */ + /* font. A default variation is the one you will get for that code */ + /* point if you look it up in the standard Unicode cmap. A */ + /* non-default variation is a different glyph. */ + /* */ /*************************************************************************/ @@ -3868,8 +4070,8 @@ /* FT_Face_GetCharVariantIsDefault */ /* */ /* <Description> */ - /* Check whether this variant of this Unicode character is the one to */ - /* be found in the `cmap'. */ + /* Check whether this variation of this Unicode character is the one */ + /* to be found in the `cmap'. */ /* */ /* <Input> */ /* face :: */ @@ -3883,7 +4085,7 @@ /* */ /* <Return> */ /* 1~if found in the standard (Unicode) cmap, 0~if found in the */ - /* variation selector cmap, or -1 if it is not a variant. */ + /* variation selector cmap, or -1 if it is not a variation. */ /* */ /* <Note> */ /* This function is only meaningful if the font has a variation */ @@ -3904,7 +4106,7 @@ /* FT_Face_GetVariantSelectors */ /* */ /* <Description> */ - /* Return a zero-terminated list of Unicode variant selectors found */ + /* Return a zero-terminated list of Unicode variation selectors found */ /* in the font. */ /* */ /* <Input> */ @@ -3913,7 +4115,7 @@ /* */ /* <Return> */ /* A pointer to an array of selector code points, or NULL if there is */ - /* no valid variant selector cmap subtable. */ + /* no valid variation selector cmap subtable. */ /* */ /* <Note> */ /* The last item in the array is~0; the array is owned by the */ @@ -3933,7 +4135,7 @@ /* FT_Face_GetVariantsOfChar */ /* */ /* <Description> */ - /* Return a zero-terminated list of Unicode variant selectors found */ + /* Return a zero-terminated list of Unicode variation selectors found */ /* for the specified character code. */ /* */ /* <Input> */ @@ -3944,7 +4146,7 @@ /* The character codepoint in Unicode. */ /* */ /* <Return> */ - /* A pointer to an array of variant selector code points that are */ + /* A pointer to an array of variation selector code points that are */ /* active for the given character, or NULL if the corresponding list */ /* is empty. */ /* */ @@ -3968,7 +4170,7 @@ /* */ /* <Description> */ /* Return a zero-terminated list of Unicode character codes found for */ - /* the specified variant selector. */ + /* the specified variation selector. */ /* */ /* <Input> */ /* face :: */ @@ -3975,12 +4177,12 @@ /* A handle to the source face object. */ /* */ /* variantSelector :: */ - /* The variant selector code point in Unicode. */ + /* The variation selector code point in Unicode. */ /* */ /* <Return> */ /* A list of all the code points that are specified by this selector */ /* (both default and non-default codes are returned) or NULL if there */ - /* is no valid cmap or the variant selector is invalid. */ + /* is no valid cmap or the variation selector is invalid. */ /* */ /* <Note> */ /* The last item in the array is~0; the array is owned by the */ @@ -4030,9 +4232,8 @@ /* FT_MulDiv */ /* */ /* <Description> */ - /* A very simple function used to perform the computation `(a*b)/c' */ - /* with maximum accuracy (it uses a 64-bit intermediate integer */ - /* whenever necessary). */ + /* Compute `(a*b)/c' with maximum accuracy, using a 64-bit */ + /* intermediate integer whenever necessary. */ /* */ /* This function isn't necessarily as fast as some processor specific */ /* operations, but is at least completely portable. */ @@ -4039,7 +4240,9 @@ /* */ /* <Input> */ /* a :: The first multiplier. */ + /* */ /* b :: The second multiplier. */ + /* */ /* c :: The divisor. */ /* */ /* <Return> */ @@ -4059,12 +4262,12 @@ /* FT_MulFix */ /* */ /* <Description> */ - /* A very simple function used to perform the computation */ - /* `(a*b)/0x10000' with maximum accuracy. Most of the time this is */ - /* used to multiply a given value by a 16.16 fixed-point factor. */ + /* Compute `(a*b)/0x10000' with maximum accuracy. Its main use is to */ + /* multiply a given value by a 16.16 fixed-point factor. */ /* */ /* <Input> */ /* a :: The first multiplier. */ + /* */ /* b :: The second multiplier. Use a 16.16 factor here whenever */ /* possible (see note below). */ /* */ @@ -4093,12 +4296,12 @@ /* FT_DivFix */ /* */ /* <Description> */ - /* A very simple function used to perform the computation */ - /* `(a*0x10000)/b' with maximum accuracy. Most of the time, this is */ - /* used to divide a given value by a 16.16 fixed-point factor. */ + /* Compute `(a*0x10000)/b' with maximum accuracy. Its main use is to */ + /* divide a given value by a 16.16 fixed-point factor. */ /* */ /* <Input> */ /* a :: The numerator. */ + /* */ /* b :: The denominator. Use a 16.16 factor here. */ /* */ /* <Return> */ @@ -4115,13 +4318,13 @@ /* FT_RoundFix */ /* */ /* <Description> */ - /* A very simple function used to round a 16.16 fixed number. */ + /* Round a 16.16 fixed number. */ /* */ /* <Input> */ /* a :: The number to be rounded. */ /* */ /* <Return> */ - /* `a' rounded to nearest 16.16 fixed integer, halfway cases away */ + /* `a' rounded to the nearest 16.16 fixed integer, halfway cases away */ /* from zero. */ /* */ FT_EXPORT( FT_Fixed ) @@ -4134,8 +4337,7 @@ /* FT_CeilFix */ /* */ /* <Description> */ - /* A very simple function used to compute the ceiling function of a */ - /* 16.16 fixed number. */ + /* Compute the smallest following integer of a 16.16 fixed number. */ /* */ /* <Input> */ /* a :: The number for which the ceiling function is to be computed. */ @@ -4153,8 +4355,7 @@ /* FT_FloorFix */ /* */ /* <Description> */ - /* A very simple function used to compute the floor function of a */ - /* 16.16 fixed number. */ + /* Compute the largest previous integer of a 16.16 fixed number. */ /* */ /* <Input> */ /* a :: The number for which the floor function is to be computed. */ @@ -4240,8 +4441,8 @@ * */ #define FREETYPE_MAJOR 2 -#define FREETYPE_MINOR 7 -#define FREETYPE_PATCH 1 +#define FREETYPE_MINOR 8 +#define FREETYPE_PATCH 0 /*************************************************************************/ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ftadvanc.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ftadvanc.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ftadvanc.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Quick computation of advance widths (specification only). */ /* */ -/* Copyright 2008-2016 by */ +/* Copyright 2008-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ftautoh.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ftautoh.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ftautoh.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType API for controlling the auto-hinter (specification only). */ /* */ -/* Copyright 2012-2016 by */ +/* Copyright 2012-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -448,7 +448,7 @@ * no-stem-darkening[autofit] * * @description: - * *Experimental* *only,* *requires* *linear* *alpha* *blending* *and* + * *Experimental* *only*, *requires* *linear* *alpha* *blending* *and* * *gamma* *correction* * * Stem darkening emboldens glyphs at smaller sizes to make them more @@ -477,7 +477,8 @@ * of emboldening versus the CFF driver. * * This property can be set via the `FREETYPE_PROPERTIES' environment - * variable similar to the CFF driver. + * variable similar to the CFF driver. It can also be set per face + * using @FT_Face_Properties with @FT_PARAM_TAG_STEM_DARKENING. * */ @@ -484,6 +485,27 @@ /************************************************************************** * + * @constant: + * FT_PARAM_TAG_STEM_DARKENING + * + * @description: + * An @FT_Parameter tag to be used with @FT_Face_Properties. The + * corresponding Boolean argument specifies whether to apply stem + * darkening, overriding the global default values or the values set up + * with @FT_Property_Set (see @no-stem-darkening[autofit] and + * @no-stem-darkening[cff]). + * + * This is a passive setting that only takes effect if the font driver + * or autohinter honors it, which the CFF driver always does, but the + * autohinter only in `light' hinting mode (as of version 2.7.0). + * + */ +#define FT_PARAM_TAG_STEM_DARKENING \ + FT_MAKE_TAG( 'd', 'a', 'r', 'k' ) + + + /************************************************************************** + * * @property: * darkening-parameters[autofit] * Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ftbbox.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ftbbox.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ftbbox.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType exact bbox computation (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ftbdf.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ftbdf.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ftbdf.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType API for accessing BDF-specific strings (specification). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ftbitmap.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ftbitmap.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ftbitmap.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType utility functions for bitmaps (specification). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ftbzip2.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ftbzip2.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ftbzip2.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Bzip2-compressed stream support. */ /* */ -/* Copyright 2010-2016 by */ +/* Copyright 2010-2017 by */ /* Joel Klinghed. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ftcache.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ftcache.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ftcache.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType Cache subsystem (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ftcffdrv.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ftcffdrv.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ftcffdrv.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType API for controlling the CFF driver (specification only). */ /* */ -/* Copyright 2013-2016 by */ +/* Copyright 2013-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -113,6 +113,7 @@ * hinting-engine[cff] * no-stem-darkening[cff] * darkening-parameters[cff] + * random-seed * */ @@ -203,6 +204,8 @@ * * This property can be set via the `FREETYPE_PROPERTIES' environment * variable (using values 1 and 0 for `on' and `off', respectively). + * It can also be set per face using @FT_Face_Properties with + * @FT_PARAM_TAG_STEM_DARKENING. * */ @@ -263,6 +266,49 @@ * } */ + + /************************************************************************** + * + * @property: + * random-seed + * + * @description: + * By default, the seed value for the CFF `random' operator is set to a + * random value. However, mainly for debugging purposes, it is often + * necessary to use a known value as a seed so that the pseudo-random + * number sequences generated by `random' are repeatable. + * + * The `random-seed' property does that. Its argument is a signed 32bit + * integer; if the value is zero or negative, the seed given by the + * `intitialRandomSeed' private DICT operator in a CFF file gets used + * (or a default value if there is no such operator). If the value is + * positive, use it instead of `initialRandomSeed', which is + * consequently ignored. + * + * @note: + * This property can be set via the `FREETYPE_PROPERTIES' environment + * variable. It can also be set per face using @FT_Face_Properties with + * @FT_PARAM_TAG_RANDOM_SEED. + * + */ + + + /************************************************************************** + * + * @constant: + * FT_PARAM_TAG_RANDOM_SEED + * + * @description: + * An @FT_Parameter tag to be used with @FT_Face_Properties. The + * corresponding 32bit signed integer argument overrides the CFF + * module's random seed value with a face-specific one; see + * @random-seed. + * + */ +#define FT_PARAM_TAG_RANDOM_SEED \ + FT_MAKE_TAG( 's', 'e', 'e', 'd' ) + + /* */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ftchapters.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ftchapters.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ftchapters.h (working copy) @@ -77,6 +77,7 @@ /* auto_hinter */ /* cff_driver */ /* tt_driver */ +/* pcf_driver */ /* */ /***************************************************************************/ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ftcid.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ftcid.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ftcid.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType API for accessing CID font information (specification). */ /* */ -/* Copyright 2007-2016 by */ +/* Copyright 2007-2017 by */ /* Dereg Clegg and Michael Toftdal. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/fterrdef.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/fterrdef.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/fterrdef.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType error codes (specification). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -231,6 +231,8 @@ "invalid PostScript (post) table format" ) FT_ERRORDEF_( Invalid_Post_Table, 0x9B, "invalid PostScript (post) table" ) + FT_ERRORDEF_( DEF_In_Glyf_Bytecode, 0x9C, + "found FDEF or IDEF opcode in glyf bytecode" ) /* CFF, CID, and Type 1 errors */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/fterrors.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/fterrors.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/fterrors.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType error code handling (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -106,7 +106,7 @@ /* */ /* #undefine __FTERRORS_H__ */ /* */ - /* work for backwards compatibility. */ + /* work for backward compatibility. */ /* */ #if !( defined( FTERRORS_H_ ) && defined ( __FTERRORS_H__ ) ) #define FTERRORS_H_ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ftfntfmt.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ftfntfmt.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ftfntfmt.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Support functions for font formats. */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ftgasp.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ftgasp.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ftgasp.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Access of TrueType's `gasp' table (specification). */ /* */ -/* Copyright 2007-2016 by */ +/* Copyright 2007-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -92,8 +92,8 @@ #define FT_GASP_NO_TABLE -1 #define FT_GASP_DO_GRIDFIT 0x01 #define FT_GASP_DO_GRAY 0x02 +#define FT_GASP_SYMMETRIC_GRIDFIT 0x04 #define FT_GASP_SYMMETRIC_SMOOTHING 0x08 -#define FT_GASP_SYMMETRIC_GRIDFIT 0x10 /************************************************************************* @@ -102,11 +102,13 @@ * FT_Get_Gasp * * @description: - * Read the `gasp' table from a TrueType or OpenType font file and - * return the entry corresponding to a given character pixel size. + * For a TrueType or OpenType font file, return the rasterizer behaviour + * flags from the font's `gasp' table corresponding to a given + * character pixel size. * * @input: * face :: The source face handle. + * * ppem :: The vertical character pixel size. * * @return: @@ -113,6 +115,12 @@ * Bit flags (see @FT_GASP_XXX), or @FT_GASP_NO_TABLE if there is no * `gasp' table in the face. * + * @note: + * If you want to use the MM functionality of OpenType variation fonts + * (i.e., using @FT_Set_Var_Design_Coordinates and friends), call this + * function *after* setting an instance since the return values can + * change. + * * @since: * 2.3.0 */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ftglyph.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ftglyph.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ftglyph.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType convenience functions to handle glyphs (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -453,7 +453,7 @@ /* */ /* */ /* // load glyph */ - /* error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAUT ); */ + /* error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAULT ); */ /* */ /* // extract glyph image */ /* error = FT_Get_Glyph( face->glyph, &glyph ); */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ftgxval.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ftgxval.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ftgxval.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType API for validating TrueTypeGX/AAT tables (specification). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* Masatake YAMATO, Redhat K.K, */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ftgzip.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ftgzip.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ftgzip.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Gzip-compressed stream support. */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ftimage.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ftimage.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ftimage.h (working copy) @@ -5,7 +5,7 @@ /* FreeType glyph image formats and default raster interface */ /* (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -619,7 +619,7 @@ /* */ /* { */ /* x' = (x << shift) - delta */ - /* y' = (x << shift) - delta */ + /* y' = (y << shift) - delta */ /* } */ /* */ /* Set the values of `shift' and `delta' to~0 to get the original */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ftincrem.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ftincrem.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ftincrem.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType incremental loading (specification). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ftlcdfil.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ftlcdfil.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ftlcdfil.h (working copy) @@ -5,7 +5,7 @@ /* FreeType API for color filtering of subpixel bitmap glyphs */ /* (specification). */ /* */ -/* Copyright 2006-2016 by */ +/* Copyright 2006-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -268,6 +268,9 @@ * defined in your build of the library, which should correspond to all * default builds of FreeType. * + * LCD filter weights can also be set per face using @FT_Face_Properties + * with @FT_PARAM_TAG_LCD_FILTER_WEIGHTS. + * * @since: * 2.4.0 */ @@ -275,6 +278,38 @@ FT_Library_SetLcdFilterWeights( FT_Library library, unsigned char *weights ); + + /************************************************************************** + * + * @constant: + * FT_PARAM_TAG_LCD_FILTER_WEIGHTS + * + * @description: + * An @FT_Parameter tag to be used with @FT_Face_Properties. The + * corresponding argument specifies the five LCD filter weights for a + * given face (if using @FT_LOAD_TARGET_LCD, for example), overriding + * the global default values or the values set up with + * @FT_Library_SetLcdFilterWeights. + * + */ +#define FT_PARAM_TAG_LCD_FILTER_WEIGHTS \ + FT_MAKE_TAG( 'l', 'c', 'd', 'f' ) + + + /* + * @type: + * FT_LcdFiveTapFilter + * + * @description: + * A typedef for passing the five LCD filter weights to + * @FT_Face_Properties within an @FT_Parameter structure. + * + */ +#define FT_LCD_FILTER_FIVE_TAPS 5 + + typedef FT_Byte FT_LcdFiveTapFilter[FT_LCD_FILTER_FIVE_TAPS]; + + /* */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ftlist.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ftlist.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ftlist.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Generic list support for FreeType (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ftlzw.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ftlzw.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ftlzw.h (working copy) @@ -4,7 +4,7 @@ /* */ /* LZW-compressed stream support. */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ftmac.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ftmac.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ftmac.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Additional Mac-specific API. */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ftmm.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ftmm.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ftmm.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType Multiple Master font interface (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -43,11 +43,10 @@ /* Master fonts, i.e., the selection of specific design instances by */ /* setting design axis coordinates. */ /* */ - /* George Williams has extended this interface to make it work with */ - /* both Type~1 Multiple Masters fonts and GX distortable (var) */ - /* fonts. Some of these routines only work with MM fonts, others */ - /* will work with both types. They are similar enough that a */ - /* consistent interface makes sense. */ + /* Besides Adobe MM fonts, the interface supports Apple's TrueType GX */ + /* and OpenType variation fonts. Some of the routines only work with */ + /* Adobe MM fonts, others will work with all three types. They are */ + /* similar enough that a consistent interface makes sense. */ /* */ /*************************************************************************/ @@ -58,10 +57,11 @@ /* FT_MM_Axis */ /* */ /* <Description> */ - /* A simple structure used to model a given axis in design space for */ - /* Multiple Masters fonts. */ + /* A structure to model a given axis in design space for Multiple */ + /* Masters fonts. */ /* */ - /* This structure can't be used for GX var fonts. */ + /* This structure can't be used for TrueType GX or OpenType variation */ + /* fonts. */ /* */ /* <Fields> */ /* name :: The axis's name. */ @@ -85,10 +85,11 @@ /* FT_Multi_Master */ /* */ /* <Description> */ - /* A structure used to model the axes and space of a Multiple Masters */ + /* A structure to model the axes and space of a Multiple Masters */ /* font. */ /* */ - /* This structure can't be used for GX var fonts. */ + /* This structure can't be used for TrueType GX or OpenType variation */ + /* fonts. */ /* */ /* <Fields> */ /* num_axis :: Number of axes. Cannot exceed~4. */ @@ -115,28 +116,36 @@ /* FT_Var_Axis */ /* */ /* <Description> */ - /* A simple structure used to model a given axis in design space for */ - /* Multiple Masters and GX var fonts. */ + /* A structure to model a given axis in design space for Multiple */ + /* Masters, TrueType GX, and OpenType variation fonts. */ /* */ /* <Fields> */ /* name :: The axis's name. */ - /* Not always meaningful for GX. */ + /* Not always meaningful for TrueType GX or OpenType */ + /* variation fonts. */ /* */ /* minimum :: The axis's minimum design coordinate. */ /* */ /* def :: The axis's default design coordinate. */ - /* FreeType computes meaningful default values for MM; it */ - /* is then an integer value, not in 16.16 format. */ + /* FreeType computes meaningful default values for Adobe */ + /* MM fonts. */ /* */ /* maximum :: The axis's maximum design coordinate. */ /* */ - /* tag :: The axis's tag (the GX equivalent to `name'). */ - /* FreeType provides default values for MM if possible. */ + /* tag :: The axis's tag (the equivalent to `name' for TrueType */ + /* GX and OpenType variation fonts). FreeType provides */ + /* default values for Adobe MM fonts if possible. */ /* */ - /* strid :: The entry in `name' table (another GX version of */ - /* `name'). */ - /* Not meaningful for MM. */ + /* strid :: The axis name entry in the font's `name' table. This */ + /* is another (and often better) version of the `name' */ + /* field for TrueType GX or OpenType variation fonts. Not */ + /* meaningful for Adobe MM fonts. */ /* */ + /* <Note> */ + /* The fields `minimum', `def', and `maximum' are 16.16 fractional */ + /* values for TrueType GX and OpenType variation fonts. For Adobe MM */ + /* fonts, the values are integers. */ + /* */ typedef struct FT_Var_Axis_ { FT_String* name; @@ -157,16 +166,20 @@ /* FT_Var_Named_Style */ /* */ /* <Description> */ - /* A simple structure used to model a named style in a GX var font. */ + /* A structure to model a named instance in a TrueType GX or OpenType */ + /* variation font. */ /* */ - /* This structure can't be used for MM fonts. */ + /* This structure can't be used for Adobe MM fonts. */ /* */ /* <Fields> */ - /* coords :: The design coordinates for this style. */ + /* coords :: The design coordinates for this instance. */ /* This is an array with one entry for each axis. */ /* */ - /* strid :: The entry in `name' table identifying this style. */ + /* strid :: The entry in `name' table identifying this instance. */ /* */ + /* psid :: The entry in `name' table identifying a PostScript name */ + /* for this instance. */ + /* */ typedef struct FT_Var_Named_Style_ { FT_Fixed* coords; @@ -182,17 +195,19 @@ /* FT_MM_Var */ /* */ /* <Description> */ - /* A structure used to model the axes and space of a Multiple Masters */ - /* or GX var distortable font. */ + /* A structure to model the axes and space of a Adobe MM, TrueType */ + /* GX, or OpenType variation font. */ /* */ - /* Some fields are specific to one format and not to the other. */ + /* Some fields are specific to one format and not to the others. */ /* */ /* <Fields> */ /* num_axis :: The number of axes. The maximum value is~4 for */ - /* MM; no limit in GX. */ + /* Adobe MM fonts; no limit in TrueType GX or */ + /* OpenType variation fonts. */ /* */ /* num_designs :: The number of designs; should be normally */ - /* 2^num_axis for MM fonts. Not meaningful for GX */ + /* 2^num_axis for Adobe MM fonts. Not meaningful */ + /* for TrueType GX or OpenType variation fonts */ /* (where every glyph could have a different */ /* number of designs). */ /* */ @@ -200,21 +215,23 @@ /* a tuple of design coordinates that has a string */ /* ID (in the `name' table) associated with it. */ /* The font can tell the user that, for example, */ - /* [Weight=1.5,Width=1.1] is `Bold'. */ + /* [Weight=1.5,Width=1.1] is `Bold'. Another name */ + /* for `named style' is `named instance'. */ /* */ - /* For Type 1 Multiple Masters fonts, this value */ - /* is always zero because the format does not */ - /* support named styles. */ + /* For Adobe Multiple Masters fonts, this value is */ + /* always zero because the format does not support */ + /* named styles. */ /* */ /* axis :: An axis descriptor table. */ - /* GX fonts contain slightly more data than MM. */ + /* TrueType GX and OpenType variation fonts */ + /* contain slightly more data than Adobe MM fonts. */ /* Memory management of this pointer is done */ /* internally by FreeType. */ /* */ - /* namedstyle :: A named style table. */ - /* Only meaningful with GX. */ - /* Memory management of this pointer is done */ - /* internally by FreeType. */ + /* namedstyle :: A named style (instance) table. */ + /* Only meaningful for TrueType GX and OpenType */ + /* variation fonts. Memory management of this */ + /* pointer is done internally by FreeType. */ /* */ typedef struct FT_MM_Var_ { @@ -233,9 +250,10 @@ /* FT_Get_Multi_Master */ /* */ /* <Description> */ - /* Retrieve the Multiple Master descriptor of a given font. */ + /* Retrieve a variation descriptor of a given Adobe MM font. */ /* */ - /* This function can't be used with GX fonts. */ + /* This function can't be used with TrueType GX or OpenType variation */ + /* fonts. */ /* */ /* <Input> */ /* face :: A handle to the source face. */ @@ -257,13 +275,15 @@ /* FT_Get_MM_Var */ /* */ /* <Description> */ - /* Retrieve the Multiple Master/GX var descriptor of a given font. */ + /* Retrieve a variation descriptor for a given font. */ /* */ + /* This function works with all supported variation formats. */ + /* */ /* <Input> */ /* face :: A handle to the source face. */ /* */ /* <Output> */ - /* amaster :: The Multiple Masters/GX var descriptor. */ + /* amaster :: The variation descriptor. */ /* Allocates a data structure, which the user must */ /* deallocate with `free' after use. */ /* */ @@ -281,10 +301,11 @@ /* FT_Set_MM_Design_Coordinates */ /* */ /* <Description> */ - /* For Multiple Masters fonts, choose an interpolated font design */ - /* through design coordinates. */ + /* For Adobe MM fonts, choose an interpolated font design through */ + /* design coordinates. */ /* */ - /* This function can't be used with GX fonts. */ + /* This function can't be used with TrueType GX or OpenType variation */ + /* fonts. */ /* */ /* <InOut> */ /* face :: A handle to the source face. */ @@ -312,9 +333,10 @@ /* FT_Set_Var_Design_Coordinates */ /* */ /* <Description> */ - /* For Multiple Master or GX Var fonts, choose an interpolated font */ - /* design through design coordinates. */ + /* Choose an interpolated font design through design coordinates. */ /* */ + /* This function works with all supported variation formats. */ + /* */ /* <InOut> */ /* face :: A handle to the source face. */ /* */ @@ -341,9 +363,11 @@ /* FT_Get_Var_Design_Coordinates */ /* */ /* <Description> */ - /* For Multiple Master and GX Var fonts, get the design coordinates */ - /* of the currently selected interpolated font. */ + /* Get the design coordinates of the currently selected interpolated */ + /* font. */ /* */ + /* This function works with all supported variation formats. */ + /* */ /* <Input> */ /* face :: A handle to the source face. */ /* */ @@ -369,9 +393,11 @@ /* FT_Set_MM_Blend_Coordinates */ /* */ /* <Description> */ - /* For Multiple Masters and GX var fonts, choose an interpolated font */ - /* design through normalized blend coordinates. */ + /* Choose an interpolated font design through normalized blend */ + /* coordinates. */ /* */ + /* This function works with all supported variation formats. */ + /* */ /* <InOut> */ /* face :: A handle to the source face. */ /* */ @@ -382,8 +408,9 @@ /* use default values for the remaining axes. */ /* */ /* coords :: The design coordinates array (each element must be */ - /* between 0 and 1.0 for MM fonts, and between -1.0 and */ - /* 1.0 for GX var fonts). */ + /* between 0 and 1.0 for Adobe MM fonts, and between */ + /* -1.0 and 1.0 for TrueType GX and OpenType variation */ + /* fonts). */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ @@ -400,16 +427,18 @@ /* FT_Get_MM_Blend_Coordinates */ /* */ /* <Description> */ - /* For Multiple Masters and GX var fonts, get the normalized blend */ - /* coordinates of the currently selected interpolated font. */ + /* Get the normalized blend coordinates of the currently selected */ + /* interpolated font. */ /* */ + /* This function works with all supported variation formats. */ + /* */ /* <Input> */ /* face :: A handle to the source face. */ /* */ /* num_coords :: The number of normalized blend coordinates to */ /* retrieve. If it is larger than the number of axes, */ - /* set the excess values to~0.5 for MM fonts, and to~0 */ - /* for GX var fonts. */ + /* set the excess values to~0.5 for Adobe MM fonts, and */ + /* to~0 for TrueType GX and OpenType variation fonts. */ /* */ /* <Output> */ /* coords :: The normalized blend coordinates array. */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ftmodapi.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ftmodapi.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ftmodapi.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType modules public interface (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -89,6 +89,7 @@ /* */ /* FT_Property_Set */ /* FT_Property_Get */ + /* FT_Set_Default_Properties */ /* */ /* FT_New_Library */ /* FT_Done_Library */ @@ -440,6 +441,47 @@ /*************************************************************************/ /* */ /* <Function> */ + /* FT_Set_Default_Properties */ + /* */ + /* <Description> */ + /* If compilation option FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES is */ + /* set, this function reads the `FREETYPE_PROPERTIES' environment */ + /* variable to control driver properties. See sections @auto_hinter, */ + /* @cff_driver, @pcf_driver, and @tt_driver for more. */ + /* */ + /* If the compilation option is not set, this function does nothing. */ + /* */ + /* `FREETYPE_PROPERTIES' has the following syntax form (broken here */ + /* into multiple lines for better readability). */ + /* */ + /* { */ + /* <optional whitespace> */ + /* <module-name1> ':' */ + /* <property-name1> '=' <property-value1> */ + /* <whitespace> */ + /* <module-name2> ':' */ + /* <property-name2> '=' <property-value2> */ + /* ... */ + /* } */ + /* */ + /* Example: */ + /* */ + /* { */ + /* FREETYPE_PROPERTIES=truetype:interpreter-version=35 \ */ + /* cff:no-stem-darkening=1 \ */ + /* autofitter:warping=1 */ + /* } */ + /* */ + /* <InOut> */ + /* library :: A handle to a new library object. */ + /* */ + FT_EXPORT( void ) + FT_Set_Default_Properties( FT_Library library ); + + + /*************************************************************************/ + /* */ + /* <Function> */ /* FT_Reference_Library */ /* */ /* <Description> */ @@ -477,8 +519,9 @@ /* valid for the life of the @FT_Library object. */ /* */ /* Normally, you would call this function (followed by a call to */ - /* @FT_Add_Default_Modules or a series of calls to @FT_Add_Module) */ - /* instead of @FT_Init_FreeType to initialize the FreeType library. */ + /* @FT_Add_Default_Modules or a series of calls to @FT_Add_Module, */ + /* and a call to @FT_Set_Default_Properties) instead of */ + /* @FT_Init_FreeType to initialize the FreeType library. */ /* */ /* Don't use @FT_Done_FreeType but @FT_Done_Library to destroy a */ /* library instance. */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ftmoderr.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ftmoderr.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ftmoderr.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType module error offsets (specification). */ /* */ -/* Copyright 2001-2016 by */ +/* Copyright 2001-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ftotval.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ftotval.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ftotval.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType API for validating OpenType tables (specification). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ftoutln.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ftoutln.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ftoutln.h (working copy) @@ -5,7 +5,7 @@ /* Support for the FT_Outline type used to store glyph shapes of */ /* most scalable font formats (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ftpcfdrv.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ftpcfdrv.h (nonexistent) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ftpcfdrv.h (working copy) @@ -0,0 +1,105 @@ +/***************************************************************************/ +/* */ +/* ftpcfdrv.h */ +/* */ +/* FreeType API for controlling the PCF driver (specification only). */ +/* */ +/* Copyright 2017 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef FTPCFDRV_H_ +#define FTPCFDRV_H_ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /************************************************************************** + * + * @section: + * pcf_driver + * + * @title: + * The PCF driver + * + * @abstract: + * Controlling the PCF driver module. + * + * @description: + * While FreeType's PCF driver doesn't expose API functions by itself, + * it is possible to control its behaviour with @FT_Property_Set and + * @FT_Property_Get. Right now, there is a single property + * `no-long-family-names' available if FreeType is compiled with + * PCF_CONFIG_OPTION_LONG_FAMILY_NAMES. + * + * The PCF driver's module name is `pcf'. + * + */ + + + /************************************************************************** + * + * @property: + * no-long-family-names + * + * @description: + * If PCF_CONFIG_OPTION_LONG_FAMILY_NAMES is active while compiling + * FreeType, the PCF driver constructs long family names. + * + * There are many PCF fonts just called `Fixed' which look completely + * different, and which have nothing to do with each other. When + * selecting `Fixed' in KDE or Gnome one gets results that appear rather + * random, the style changes often if one changes the size and one + * cannot select some fonts at all. The improve this situation, the PCF + * module prepends the foundry name (plus a space) to the family name. + * It also checks whether there are `wide' characters; all put together, + * family names like `Sony Fixed' or `Misc Fixed Wide' are constructed. + * + * If `no-long-family-names' is set, this feature gets switched off. + * + * { + * FT_Library library; + * FT_Bool no_long_family_names = TRUE; + * + * + * FT_Init_FreeType( &library ); + * + * FT_Property_Set( library, "pcf", + * "no-long-family-names", + * &no_long_family_names ); + * } + * + * @note: + * This property can be used with @FT_Property_Get also. + * + * This property can be set via the `FREETYPE_PROPERTIES' environment + * variable (using values 1 and 0 for `on' and `off', respectively). + * + */ + + +FT_END_HEADER + + +#endif /* FTPCFDRV_H_ */ + + +/* END */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ftpfr.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ftpfr.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ftpfr.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType API for accessing PFR-specific data (specification only). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ftrender.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ftrender.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ftrender.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType renderer modules public interface (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ftsizes.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ftsizes.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ftsizes.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType size objects management (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ftsnames.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ftsnames.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ftsnames.h (working copy) @@ -2,12 +2,12 @@ /* */ /* ftsnames.h */ /* */ -/* Simple interface to access SFNT name tables (which are used */ +/* Simple interface to access SFNT `name' tables (which are used */ /* to hold font names, copyright info, notices, etc.) (specification). */ /* */ /* This is _not_ used to retrieve glyph names! */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -49,7 +49,7 @@ /* */ /* <Description> */ /* The TrueType and OpenType specifications allow the inclusion of */ - /* a special `names table' in font files. This table contains */ + /* a special names table (`name') in font files. This table contains */ /* textual (and internationalized) information regarding the font, */ /* like family name, copyright, version, etc. */ /* */ @@ -70,31 +70,38 @@ /* */ /* <Fields> */ /* platform_id :: The platform ID for `string'. */ + /* See @TT_PLATFORM_XXX for possible values. */ /* */ /* encoding_id :: The encoding ID for `string'. */ + /* See @TT_APPLE_ID_XXX, @TT_MAC_ID_XXX, */ + /* @TT_ISO_ID_XXX, @TT_MS_ID_XXX, and @TT_ADOBE_ID_XXX */ + /* for possible values. */ /* */ /* language_id :: The language ID for `string'. */ + /* See @TT_MAC_LANGID_XXX and @TT_MS_LANGID_XXX for */ + /* possible values. */ /* */ + /* Registered OpenType values for `language_id' are */ + /* always smaller than 0x8000; values equal or larger */ + /* than 0x8000 usually indicate a language tag string */ + /* (introduced in OpenType version 1.6). Use function */ + /* @FT_Get_Sfnt_LangTag with `language_id' as its */ + /* argument to retrieve the associated language tag. */ + /* */ /* name_id :: An identifier for `string'. */ + /* See @TT_NAME_ID_XXX for possible values. */ /* */ /* string :: The `name' string. Note that its format differs */ - /* depending on the (platform,encoding) pair. It can */ - /* be a Pascal String, a UTF-16 one, etc. */ + /* depending on the (platform,encoding) pair, being */ + /* either a string of bytes (without a terminating */ + /* NULL byte) or containing UTF-16BE entities. */ /* */ - /* Generally speaking, the string is not */ - /* zero-terminated. Please refer to the TrueType */ - /* specification for details. */ - /* */ /* string_len :: The length of `string' in bytes. */ /* */ /* <Note> */ - /* Possible values for `platform_id', `encoding_id', `language_id', */ - /* and `name_id' are given in the file `ttnameid.h'. For details */ - /* please refer to the TrueType or OpenType specification. */ + /* Please refer to the TrueType or OpenType specification for more */ + /* details. */ /* */ - /* See also @TT_PLATFORM_XXX, @TT_APPLE_ID_XXX, @TT_MAC_ID_XXX, */ - /* @TT_ISO_ID_XXX, and @TT_MS_ID_XXX. */ - /* */ typedef struct FT_SfntName_ { FT_UShort platform_id; @@ -103,7 +110,7 @@ FT_UShort name_id; FT_Byte* string; /* this string is *not* null-terminated! */ - FT_UInt string_len; /* in bytes */ + FT_UInt string_len; /* in bytes */ } FT_SfntName; @@ -147,13 +154,16 @@ /* */ /* <Note> */ /* The `string' array returned in the `aname' structure is not */ - /* null-terminated. The application should deallocate it if it is no */ - /* longer in use. */ + /* null-terminated. Note that you don't have to deallocate `string' */ + /* by yourself; FreeType takes care of it if you call @FT_Done_Face. */ /* */ /* Use @FT_Get_Sfnt_Name_Count to get the total number of available */ /* `name' table entries, then do a loop until you get the right */ /* platform, encoding, and name ID. */ /* */ + /* `name' table format~1 entries can use language tags also, see */ + /* @FT_Get_Sfnt_LangTag. */ + /* */ FT_EXPORT( FT_Error ) FT_Get_Sfnt_Name( FT_Face face, FT_UInt idx, @@ -160,35 +170,112 @@ FT_SfntName *aname ); + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_SfntLangTag */ + /* */ + /* <Description> */ + /* A structure to model a language tag entry from an SFNT `name' */ + /* table. */ + /* */ + /* <Fields> */ + /* string :: The language tag string, encoded in UTF-16BE */ + /* (without trailing NULL bytes). */ + /* */ + /* string_len :: The length of `string' in *bytes*. */ + /* */ + /* <Note> */ + /* Please refer to the TrueType or OpenType specification for more */ + /* details. */ + /* */ + typedef struct FT_SfntLangTag_ + { + FT_Byte* string; /* this string is *not* null-terminated! */ + FT_UInt string_len; /* in bytes */ + + } FT_SfntLangTag; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Sfnt_LangTag */ + /* */ + /* <Description> */ + /* Retrieve the language tag associated with a language ID of an SFNT */ + /* `name' table entry. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face. */ + /* */ + /* langID :: The language ID, as returned by @FT_Get_Sfnt_Name. */ + /* This is always a value larger than 0x8000. */ + /* */ + /* <Output> */ + /* alangTag :: The language tag associated with the `name' table */ + /* entry's language ID. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The `string' array returned in the `alangTag' structure is not */ + /* null-terminated. Note that you don't have to deallocate `string' */ + /* by yourself; FreeType takes care of it if you call @FT_Done_Face. */ + /* */ + /* Only `name' table format~1 supports language tags. For format~0 */ + /* tables, this function always returns FT_Err_Invalid_Table. For */ + /* invalid format~1 language ID values, FT_Err_Invalid_Argument is */ + /* returned. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Sfnt_LangTag( FT_Face face, + FT_UInt langID, + FT_SfntLangTag *alangTag ); + + /*************************************************************************** * * @constant: - * FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY + * FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY * * @description: - * A constant used as the tag of @FT_Parameter structures to make - * FT_Open_Face() ignore preferred family subfamily names in `name' - * table since OpenType version 1.4. For backwards compatibility with - * legacy systems that have a 4-face-per-family restriction. + * A tag for @FT_Parameter to make @FT_Open_Face ignore typographic + * family names in the `name' table (introduced in OpenType version + * 1.4). Use this for backward compatibility with legacy systems that + * have a four-faces-per-family restriction. * */ -#define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY FT_MAKE_TAG( 'i', 'g', 'p', 'f' ) +#define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY \ + FT_MAKE_TAG( 'i', 'g', 'p', 'f' ) + /* this constant is deprecated */ +#define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY \ + FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY + + /*************************************************************************** * * @constant: - * FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY + * FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY * * @description: - * A constant used as the tag of @FT_Parameter structures to make - * FT_Open_Face() ignore preferred subfamily names in `name' table since - * OpenType version 1.4. For backwards compatibility with legacy - * systems that have a 4-face-per-family restriction. + * A tag for @FT_Parameter to make @FT_Open_Face ignore typographic + * subfamily names in the `name' table (introduced in OpenType version + * 1.4). Use this for backward compatibility with legacy systems that + * have a four-faces-per-family restriction. * */ -#define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY FT_MAKE_TAG( 'i', 'g', 'p', 's' ) +#define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY \ + FT_MAKE_TAG( 'i', 'g', 'p', 's' ) + + /* this constant is deprecated */ +#define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY \ + FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY + /* */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ftstroke.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ftstroke.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ftstroke.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType path stroker (specification). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -136,7 +136,7 @@ * FT_STROKER_LINEJOIN_MITER_VARIABLE generates a mitered line * join as used in XPS. FT_STROKER_LINEJOIN_MITER is an alias * for FT_STROKER_LINEJOIN_MITER_VARIABLE, retained for - * backwards compatibility. + * backward compatibility. */ typedef enum FT_Stroker_LineJoin_ { Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ftsynth.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ftsynth.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ftsynth.h (working copy) @@ -5,7 +5,7 @@ /* FreeType synthesizing code for emboldening and slanting */ /* (specification). */ /* */ -/* Copyright 2000-2016 by */ +/* Copyright 2000-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ftsystem.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ftsystem.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ftsystem.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType low-level system interface definition (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/fttrigon.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/fttrigon.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/fttrigon.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType trigonometric functions (specification). */ /* */ -/* Copyright 2001-2016 by */ +/* Copyright 2001-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ftttdrv.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ftttdrv.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ftttdrv.h (working copy) @@ -5,7 +5,7 @@ /* FreeType API for controlling the TrueType driver */ /* (specification only). */ /* */ -/* Copyright 2013-2016 by */ +/* Copyright 2013-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -110,7 +110,7 @@ * TrueType interpreter fully allows the advance width to be adjusted in * this mode, just the DWrite client will ignore those changes. * - * _ClearType_ _Backwards_ _Compatibility_ + * _ClearType_ _Backward_ _Compatibility_ * * This is a set of exceptions made in the TrueType interpreter to * minimize hinting techniques that were problematic with the extra @@ -118,9 +118,9 @@ * http://www.beatstamm.com/typography/RTRCh4.htm#Sec1 and * http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx. * This technique is not to be confused with ClearType compatible - * widths. ClearType backwards compatibility has no direct impact on + * widths. ClearType backward compatibility has no direct impact on * changing advance widths, but there might be an indirect impact on - * disabling some deltas. This could be worked around in backwards + * disabling some deltas. This could be worked around in backward * compatibility mode. * * _Native_ _ClearType_ _Mode_ @@ -138,7 +138,6 @@ * interpreter-version * * @description: - * Currently, three versions are available, two representing the * bytecode interpreter with subpixel hinting support (old `Infinality' * code and new stripped-down and higher performance `minimal' code) and @@ -226,7 +225,7 @@ * filtering. * * If FreeType has not been compiled with the configuration option - * FT_CONFIG_OPTION_SUBPIXEL_HINTING, selecting version~38 or~40 causes + * TT_CONFIG_OPTION_SUBPIXEL_HINTING, selecting version~38 or~40 causes * an `FT_Err_Unimplemented_Feature' error. * * Depending on the graphics framework, Microsoft uses different Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/fttypes.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/fttypes.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/fttypes.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType simple types definitions (specification only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ftwinfnt.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ftwinfnt.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ftwinfnt.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType API for accessing Windows fnt-specific data. */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/autohint.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/autohint.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/autohint.h (working copy) @@ -4,7 +4,7 @@ /* */ /* High-level `autohint' module-specific interface (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/ftcalc.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/ftcalc.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/ftcalc.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Arithmetic computations (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/ftdebug.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/ftdebug.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/ftdebug.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Debugging and logging component (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/ftdriver.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/ftdriver.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/ftdriver.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType font driver interface (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/ftgloadr.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/ftgloadr.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/ftgloadr.h (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType glyph loader (specification). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/ftmemory.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/ftmemory.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/ftmemory.h (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType memory management macros (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/ftobjs.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/ftobjs.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/ftobjs.h (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType private base classes (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -342,6 +342,20 @@ /* this data when first opened. This field exists only if */ /* @FT_CONFIG_OPTION_INCREMENTAL is defined. */ /* */ + /* no_stem_darkening :: */ + /* Overrides the module-level default, see @stem-darkening[cff], */ + /* for example. FALSE and TRUE toggle stem darkening on and off, */ + /* respectively, value~-1 means to use the module/driver default. */ + /* */ + /* random_seed :: */ + /* If positive, override the seed value for the CFF `random' */ + /* operator. Value~0 means to use the font's value. Value~-1 */ + /* means to use the CFF driver's default. */ + /* */ + /* lcd_weights :: */ + /* Overrides the library default with custom weights for the 5-tap */ + /* FIR filter. `{0, 0, 0, 0, 0}' means to use the library default. */ + /* */ /* refcount :: */ /* A counter initialized to~1 at the time an @FT_Face structure is */ /* created. @FT_Reference_Face increments this counter, and */ @@ -350,9 +364,9 @@ /* */ typedef struct FT_Face_InternalRec_ { - FT_Matrix transform_matrix; - FT_Vector transform_delta; - FT_Int transform_flags; + FT_Matrix transform_matrix; + FT_Vector transform_delta; + FT_Int transform_flags; FT_ServiceCacheRec services; @@ -360,8 +374,14 @@ FT_Incremental_InterfaceRec* incremental_interface; #endif - FT_Int refcount; + FT_Char no_stem_darkening; + FT_Int32 random_seed; +#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING + FT_LcdFiveTapFilter lcd_weights; /* preset or custom filter weights */ +#endif + FT_Int refcount; + } FT_Face_InternalRec; @@ -413,8 +433,6 @@ } FT_GlyphSlot_InternalRec; -#if 0 - /*************************************************************************/ /* */ /* <Struct> */ @@ -422,19 +440,27 @@ /* */ /* <Description> */ /* This structure contains the internal fields of each FT_Size */ - /* object. Currently, it's empty. */ + /* object. */ /* */ + /* <Fields> */ + /* module_data :: Data specific to a driver module. */ + /* */ + /* autohint_mode :: The used auto-hinting mode. */ + /* */ + /* autohint_metrics :: Metrics used by the auto-hinter. */ + /* */ /*************************************************************************/ typedef struct FT_Size_InternalRec_ { - /* empty */ + void* module_data; + FT_Render_Mode autohint_mode; + FT_Size_Metrics autohint_metrics; + } FT_Size_InternalRec; -#endif - /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ @@ -775,14 +801,21 @@ /* This hook is used by the TrueType debugger. It must be set to an */ /* alternate truetype bytecode interpreter function. */ -#define FT_DEBUG_HOOK_TRUETYPE 0 +#define FT_DEBUG_HOOK_TRUETYPE 0 typedef void (*FT_Bitmap_LcdFilterFunc)( FT_Bitmap* bitmap, FT_Render_Mode render_mode, - FT_Library library ); + FT_Byte* weights ); + /* This is the default LCD filter, an in-place, 5-tap FIR filter. */ + FT_BASE( void ) + ft_lcd_filter_fir( FT_Bitmap* bitmap, + FT_Render_Mode mode, + FT_LcdFiveTapFilter weights ); + + /*************************************************************************/ /* */ /* <Struct> */ @@ -821,7 +854,7 @@ /* handle to the current renderer for the */ /* FT_GLYPH_FORMAT_OUTLINE format. */ /* */ - /* auto_hinter :: XXX */ + /* auto_hinter :: The auto-hinter module interface. */ /* */ /* raster_pool :: The raster object's render pool. This can */ /* ideally be changed dynamically at run-time. */ @@ -828,7 +861,10 @@ /* */ /* raster_pool_size :: The size of the render pool in bytes. */ /* */ - /* debug_hooks :: XXX */ + /* debug_hooks :: An array of four function pointers that allow */ + /* debuggers to hook into a font format's */ + /* interpreter. Currently, only the TrueType */ + /* bytecode debugger uses this. */ /* */ /* lcd_filter :: If subpixel rendering is activated, the */ /* selected LCD filter mode. */ @@ -876,7 +912,7 @@ #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING FT_LcdFilter lcd_filter; FT_Int lcd_extra; /* number of extra pixels */ - FT_Byte lcd_weights[5]; /* filter weights, if any */ + FT_LcdFiveTapFilter lcd_weights; /* filter weights, if any */ FT_Bitmap_LcdFilterFunc lcd_filter_func; /* filtering callback */ #endif Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/ftpic.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/ftpic.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/ftpic.h (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services (declaration). */ /* */ -/* Copyright 2009-2016 by */ +/* Copyright 2009-2017 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/ftrfork.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/ftrfork.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/ftrfork.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Embedded resource forks accessor (specification). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* Masatake YAMATO and Redhat K.K. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/ftserv.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/ftserv.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/ftserv.h (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType services (specification only). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -306,6 +306,30 @@ { NULL, NULL } \ }; +#define FT_DEFINE_SERVICEDESCREC9( class_, \ + serv_id_1, serv_data_1, \ + serv_id_2, serv_data_2, \ + serv_id_3, serv_data_3, \ + serv_id_4, serv_data_4, \ + serv_id_5, serv_data_5, \ + serv_id_6, serv_data_6, \ + serv_id_7, serv_data_7, \ + serv_id_8, serv_data_8, \ + serv_id_9, serv_data_9 ) \ + static const FT_ServiceDescRec class_[] = \ + { \ + { serv_id_1, serv_data_1 }, \ + { serv_id_2, serv_data_2 }, \ + { serv_id_3, serv_data_3 }, \ + { serv_id_4, serv_data_4 }, \ + { serv_id_5, serv_data_5 }, \ + { serv_id_6, serv_data_6 }, \ + { serv_id_7, serv_data_7 }, \ + { serv_id_8, serv_data_8 }, \ + { serv_id_9, serv_data_9 }, \ + { NULL, NULL } \ + }; + #else /* FT_CONFIG_OPTION_PIC */ #define FT_DEFINE_SERVICEDESCREC1( class_, \ @@ -672,6 +696,65 @@ return FT_Err_Ok; \ } +#define FT_DEFINE_SERVICEDESCREC9( class_, \ + serv_id_1, serv_data_1, \ + serv_id_2, serv_data_2, \ + serv_id_3, serv_data_3, \ + serv_id_4, serv_data_4, \ + serv_id_5, serv_data_5, \ + serv_id_6, serv_data_6, \ + serv_id_7, serv_data_7, \ + serv_id_8, serv_data_8, \ + serv_id_9, serv_data_9 ) \ + void \ + FT_Destroy_Class_ ## class_( FT_Library library, \ + FT_ServiceDescRec* clazz ) \ + { \ + FT_Memory memory = library->memory; \ + \ + \ + if ( clazz ) \ + FT_FREE( clazz ); \ + } \ + \ + FT_Error \ + FT_Create_Class_ ## class_( FT_Library library, \ + FT_ServiceDescRec** output_class) \ + { \ + FT_ServiceDescRec* clazz = NULL; \ + FT_Error error; \ + FT_Memory memory = library->memory; \ + \ + \ + if ( FT_ALLOC( clazz, sizeof ( *clazz ) * 10 ) ) \ + return error; \ + \ + clazz[0].serv_id = serv_id_1; \ + clazz[0].serv_data = serv_data_1; \ + clazz[1].serv_id = serv_id_2; \ + clazz[1].serv_data = serv_data_2; \ + clazz[2].serv_id = serv_id_3; \ + clazz[2].serv_data = serv_data_3; \ + clazz[3].serv_id = serv_id_4; \ + clazz[3].serv_data = serv_data_4; \ + clazz[4].serv_id = serv_id_5; \ + clazz[4].serv_data = serv_data_5; \ + clazz[5].serv_id = serv_id_6; \ + clazz[5].serv_data = serv_data_6; \ + clazz[6].serv_id = serv_id_7; \ + clazz[6].serv_data = serv_data_7; \ + clazz[7].serv_id = serv_id_8; \ + clazz[7].serv_data = serv_data_8; \ + clazz[8].serv_id = serv_id_9; \ + clazz[8].serv_data = serv_data_9; \ + clazz[9].serv_id = NULL; \ + clazz[9].serv_data = NULL; \ + \ + *output_class = clazz; \ + \ + return FT_Err_Ok; \ + } + #endif /* FT_CONFIG_OPTION_PIC */ @@ -714,6 +797,7 @@ { FT_Pointer service_POSTSCRIPT_FONT_NAME; FT_Pointer service_MULTI_MASTERS; + FT_Pointer service_METRICS_VARIATIONS; FT_Pointer service_GLYPH_DICT; FT_Pointer service_PFR_METRICS; FT_Pointer service_WINFNT; @@ -734,7 +818,7 @@ * FT_FACE_LOOKUP_SERVICE * * @description: - * This macro is used to lookup a service from a face's driver module + * This macro is used to look up a service from a face's driver module * using its cache. * * @input: Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/ftstream.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/ftstream.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/ftstream.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Stream handling (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -502,7 +502,7 @@ #define FT_STREAM_READ_AT( position, buffer, count ) \ FT_SET_ERROR( FT_Stream_ReadAt( stream, \ (FT_ULong)(position), \ - (FT_Byte*)buffer, \ + (FT_Byte*)(buffer), \ (FT_ULong)(count) ) ) #define FT_STREAM_READ_FIELDS( fields, object ) \ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/fttrace.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/fttrace.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/fttrace.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Tracing handling (specification only). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/ftvalid.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/ftvalid.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/ftvalid.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType validation support (specification). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/internal.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/internal.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/internal.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Internal header files (specification only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/psaux.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/psaux.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/psaux.h (working copy) @@ -5,7 +5,7 @@ /* Auxiliary functions and data structures related to PostScript fonts */ /* (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -817,7 +817,7 @@ } PSAux_ServiceRec, *PSAux_Service; - /* backwards-compatible type definition */ + /* backward compatible type definition */ typedef PSAux_ServiceRec PSAux_Interface; Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/pshints.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/pshints.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/pshints.h (working copy) @@ -6,7 +6,7 @@ /* recorders (specification only). These are used to support native */ /* T1/T2 hints in the `type1', `cid', and `cff' font drivers. */ /* */ -/* Copyright 2001-2016 by */ +/* Copyright 2001-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svbdf.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svbdf.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svbdf.h (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType BDF services (specification). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svcid.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svcid.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svcid.h (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType CID font services (specification). */ /* */ -/* Copyright 2007-2016 by */ +/* Copyright 2007-2017 by */ /* Derek Clegg and Michael Toftdal. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svfntfmt.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svfntfmt.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svfntfmt.h (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType font format service (specification only). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svgldict.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svgldict.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svgldict.h (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType glyph dictionary services (specification). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svgxval.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svgxval.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svgxval.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType API for validating TrueTypeGX/AAT tables (specification). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svkern.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svkern.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svkern.h (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType Kerning service (specification). */ /* */ -/* Copyright 2006-2016 by */ +/* Copyright 2006-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svmetric.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svmetric.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svmetric.h (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType services for metrics variations (specification). */ /* */ -/* Copyright 2016 by */ +/* Copyright 2016-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -74,10 +74,8 @@ /* MVAR */ - typedef FT_Error - (*FT_Metrics_Adjust_Func)( FT_Face face, - FT_ULong tag, - FT_Int *avalue ); + typedef void + (*FT_Metrics_Adjust_Func)( FT_Face face ); FT_DEFINE_SERVICE( MetricsVariations ) @@ -140,7 +138,7 @@ clazz->bsb_adjust = bsb_adjust_; \ clazz->vorg_adjust = vorg_adjust_; \ clazz->metrics_adjust = metrics_adjust_; \ - }; + } #endif /* FT_CONFIG_OPTION_PIC */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svmm.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svmm.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svmm.h (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType Multiple Masters and GX var services (specification). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -72,6 +72,7 @@ (*FT_Get_Var_Blend_Func)( FT_Face face, FT_UInt *num_coords, FT_Fixed* *coords, + FT_Fixed* *normalizedcoords, FT_MM_Var* *mm_var ); typedef void Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svotval.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svotval.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svotval.h (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType OpenType validation service (specification). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svpfr.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svpfr.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svpfr.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Internal PFR service functions (specification). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svpostnm.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svpostnm.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svpostnm.h (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType PostScript name services (specification). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svprop.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svprop.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svprop.h (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType property service (specification). */ /* */ -/* Copyright 2012-2016 by */ +/* Copyright 2012-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svpscmap.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svpscmap.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svpscmap.h (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType PostScript charmap service (specification). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svpsinfo.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svpsinfo.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svpsinfo.h (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType PostScript info service (specification). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svsfnt.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svsfnt.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svsfnt.h (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType SFNT table loading service (specification). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svttcmap.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svttcmap.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svttcmap.h (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType TrueType/sfnt cmap extra information service. */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* Masatake YAMATO, Redhat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svtteng.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svtteng.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svtteng.h (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType TrueType engine query service (specification). */ /* */ -/* Copyright 2006-2016 by */ +/* Copyright 2006-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svttglyf.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svttglyf.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svttglyf.h (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType TrueType glyph service. */ /* */ -/* Copyright 2007-2016 by */ +/* Copyright 2007-2017 by */ /* David Turner. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svwinfnt.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svwinfnt.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/services/svwinfnt.h (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType Windows FNT/FONT service (specification). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/sfnt.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/sfnt.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/sfnt.h (working copy) @@ -4,7 +4,7 @@ /* */ /* High-level `sfnt' driver interface (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -458,6 +458,37 @@ /*************************************************************************/ /* */ /* <FuncType> */ + /* TT_Get_Name_ID_Func */ + /* */ + /* <Description> */ + /* Search whether an ENGLISH version for a given name ID is in the */ + /* `name' table. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face object. */ + /* */ + /* nameid :: The name id of the name record to return. */ + /* */ + /* <Out> */ + /* win :: If non-negative, an index into the `name' table with */ + /* the corresponding (3,1) or (3,0) Windows entry. */ + /* */ + /* apple :: If non-negative, an index into the `name' table with */ + /* the corresponding (1,0) Apple entry. */ + /* */ + /* <Return> */ + /* 1 if there is either a win or apple entry (or both), 0 otheriwse. */ + /* */ + typedef FT_Bool + (*TT_Get_Name_ID_Func)( TT_Face face, + FT_UShort nameid, + FT_Int *win, + FT_Int *apple ); + + + /*************************************************************************/ + /* */ + /* <FuncType> */ /* TT_Load_Table_Func */ /* */ /* <Description> */ @@ -588,6 +619,7 @@ TT_Get_Metrics_Func get_metrics; TT_Get_Name_Func get_name; + TT_Get_Name_ID_Func get_name_id; } SFNT_Interface; @@ -628,7 +660,8 @@ set_sbit_strike_, \ load_strike_metrics_, \ get_metrics_, \ - get_name_ ) \ + get_name_, \ + get_name_id_ ) \ static const SFNT_Interface class_ = \ { \ goto_table_, \ @@ -661,6 +694,7 @@ load_strike_metrics_, \ get_metrics_, \ get_name_, \ + get_name_id_ \ }; #else /* FT_CONFIG_OPTION_PIC */ @@ -699,7 +733,8 @@ set_sbit_strike_, \ load_strike_metrics_, \ get_metrics_, \ - get_name_ ) \ + get_name_, \ + get_name_id_ ) \ void \ FT_Init_Class_ ## class_( FT_Library library, \ SFNT_Interface* clazz ) \ @@ -736,6 +771,7 @@ clazz->load_strike_metrics = load_strike_metrics_; \ clazz->get_metrics = get_metrics_; \ clazz->get_name = get_name_; \ + clazz->get_name_id = get_name_id_; \ } #endif /* FT_CONFIG_OPTION_PIC */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/t1types.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/t1types.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/t1types.h (working copy) @@ -5,7 +5,7 @@ /* Basic Type1/Type2 type definitions and interface (specification */ /* only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/tttypes.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/tttypes.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/internal/tttypes.h (working copy) @@ -5,7 +5,7 @@ /* Basic SFNT/TrueType type definitions and interface (specification */ /* only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -243,7 +243,7 @@ /*************************************************************************/ /* */ /* <Struct> */ - /* TT_NameEntryRec */ + /* TT_NameRec */ /* */ /* <Description> */ /* A structure modeling TrueType name records. Name records are used */ @@ -267,7 +267,7 @@ /* string :: A pointer to the string's bytes. Note that these */ /* are usually UTF-16 encoded characters. */ /* */ - typedef struct TT_NameEntryRec_ + typedef struct TT_NameRec_ { FT_UShort platformID; FT_UShort encodingID; @@ -279,14 +279,44 @@ /* this last field is not defined in the spec */ /* but used by the FreeType engine */ - FT_Byte* string; + FT_Byte* string; - } TT_NameEntryRec, *TT_NameEntry; + } TT_NameRec, *TT_Name; /*************************************************************************/ /* */ /* <Struct> */ + /* TT_LangTagRec */ + /* */ + /* <Description> */ + /* A structure modeling language tag records in SFNT `name' tables, */ + /* introduced in OpenType version 1.6. */ + /* */ + /* <Fields> */ + /* stringLength :: The length of the string in bytes. */ + /* */ + /* stringOffset :: The offset to the string in the `name' table. */ + /* */ + /* string :: A pointer to the string's bytes. Note that these */ + /* are UTF-16BE encoded characters. */ + /* */ + typedef struct TT_LangTagRec_ + { + FT_UShort stringLength; + FT_ULong stringOffset; + + /* this last field is not defined in the spec */ + /* but used by the FreeType engine */ + + FT_Byte* string; + + } TT_LangTagRec, *TT_LangTag; + + + /*************************************************************************/ + /* */ + /* <Struct> */ /* TT_NameTableRec */ /* */ /* <Description> */ @@ -293,24 +323,30 @@ /* A structure modeling the TrueType name table. */ /* */ /* <Fields> */ - /* format :: The format of the name table. */ + /* format :: The format of the name table. */ /* */ - /* numNameRecords :: The number of names in table. */ + /* numNameRecords :: The number of names in table. */ /* */ - /* storageOffset :: The offset of the name table in the `name' */ - /* TrueType table. */ + /* storageOffset :: The offset of the name table in the `name' */ + /* TrueType table. */ /* */ - /* names :: An array of name records. */ + /* names :: An array of name records. */ /* */ - /* stream :: the file's input stream. */ + /* numLangTagRecords :: The number of language tags in table. */ /* */ + /* langTags :: An array of language tag records. */ + /* */ + /* stream :: The file's input stream. */ + /* */ typedef struct TT_NameTableRec_ { - FT_UShort format; - FT_UInt numNameRecords; - FT_UInt storageOffset; - TT_NameEntryRec* names; - FT_Stream stream; + FT_UShort format; + FT_UInt numNameRecords; + FT_UInt storageOffset; + TT_NameRec* names; + FT_UInt numLangTagRecords; + TT_LangTagRec* langTags; + FT_Stream stream; } TT_NameTableRec, *TT_NameTable; @@ -1084,51 +1120,10 @@ #define TT_FACE_FLAG_VAR_BSB ( 1 << 6 ) #define TT_FACE_FLAG_VAR_VORG ( 1 << 7 ) - /* MVAR gasp data */ -#define TT_FACE_FLAG_VAR_GASP_0 ( 1 << 20 ) -#define TT_FACE_FLAG_VAR_GASP_1 ( 1 << 21 ) -#define TT_FACE_FLAG_VAR_GASP_2 ( 1 << 22 ) -#define TT_FACE_FLAG_VAR_GASP_3 ( 1 << 23 ) -#define TT_FACE_FLAG_VAR_GASP_4 ( 1 << 24 ) -#define TT_FACE_FLAG_VAR_GASP_5 ( 1 << 25 ) -#define TT_FACE_FLAG_VAR_GASP_6 ( 1 << 26 ) -#define TT_FACE_FLAG_VAR_GASP_7 ( 1 << 27 ) -#define TT_FACE_FLAG_VAR_GASP_8 ( 1 << 28 ) -#define TT_FACE_FLAG_VAR_GASP_9 ( 1 << 29 ) + /* MVAR */ +#define TT_FACE_FLAG_VAR_MVAR ( 1 << 8 ) - /* The following flag macros are for the field `mvar_support'. */ - /* remaining MVAR data */ -#define TT_FACE_FLAG_VAR_CPHT ( 1 << 0 ) -#define TT_FACE_FLAG_VAR_HASC ( 1 << 1 ) -#define TT_FACE_FLAG_VAR_HCLA ( 1 << 2 ) -#define TT_FACE_FLAG_VAR_HCLD ( 1 << 3 ) -#define TT_FACE_FLAG_VAR_HCOF ( 1 << 4 ) -#define TT_FACE_FLAG_VAR_HCRN ( 1 << 5 ) -#define TT_FACE_FLAG_VAR_HCRS ( 1 << 6 ) -#define TT_FACE_FLAG_VAR_HDSC ( 1 << 7 ) -#define TT_FACE_FLAG_VAR_HLGP ( 1 << 8 ) -#define TT_FACE_FLAG_VAR_SBXO ( 1 << 9 ) -#define TT_FACE_FLAG_VAR_SBXS ( 1 << 10 ) -#define TT_FACE_FLAG_VAR_SBYO ( 1 << 11 ) -#define TT_FACE_FLAG_VAR_SBYS ( 1 << 12 ) -#define TT_FACE_FLAG_VAR_SPXO ( 1 << 13 ) -#define TT_FACE_FLAG_VAR_SPXS ( 1 << 14 ) -#define TT_FACE_FLAG_VAR_SPYO ( 1 << 15 ) -#define TT_FACE_FLAG_VAR_SPYS ( 1 << 16 ) -#define TT_FACE_FLAG_VAR_STRO ( 1 << 17 ) -#define TT_FACE_FLAG_VAR_STRS ( 1 << 18 ) -#define TT_FACE_FLAG_VAR_UNDO ( 1 << 19 ) -#define TT_FACE_FLAG_VAR_UNDS ( 1 << 20 ) -#define TT_FACE_FLAG_VAR_VASC ( 1 << 21 ) -#define TT_FACE_FLAG_VAR_VCOF ( 1 << 22 ) -#define TT_FACE_FLAG_VAR_VCRN ( 1 << 23 ) -#define TT_FACE_FLAG_VAR_VCRS ( 1 << 24 ) -#define TT_FACE_FLAG_VAR_VDSC ( 1 << 25 ) -#define TT_FACE_FLAG_VAR_VLGP ( 1 << 26 ) -#define TT_FACE_FLAG_VAR_XHGT ( 1 << 27 ) - - /*************************************************************************/ /* */ /* TrueType Face Type */ @@ -1295,6 +1290,8 @@ /* */ /* glyf_offset :: The file offset of the `glyf' table. */ /* */ + /* is_cff2 :: Set if the font format is CFF2. */ + /* */ /* doblend :: A boolean which is set if the font should */ /* be blended (this is for GX var). */ /* */ @@ -1312,9 +1309,15 @@ /* For example, TT_FACE_FLAG_VAR_FVAR is only */ /* set if we have at least one design axis. */ /* */ - /* mvar_support :: Flags that indicate which metrics */ - /* variations are supported. */ + /* var_postscript_prefix :: */ + /* The PostScript name prefix needed for */ + /* constructing a variation font instance's */ + /* PS name . */ /* */ + /* var_postscript_prefix_len :: */ + /* The length of the `var_postscript_prefix' */ + /* string. */ + /* */ /* horz_metrics_size :: The size of the `hmtx' table. */ /* */ /* vert_metrics_size :: The size of the `vmtx' table. */ @@ -1344,7 +1347,7 @@ /* */ /* sbit_table_size :: The size of `sbit_table'. */ /* */ - /* sbit_table_type :: The sbit table type (CBLC, SBIX, etc.). */ + /* sbit_table_type :: The sbit table type (CBLC, sbix, etc.). */ /* */ /* sbit_num_strikes :: The number of sbit strikes exposed by */ /* FreeType's API, omitting invalid strikes. */ @@ -1380,7 +1383,7 @@ /* */ /* sph_compatibility_mode :: */ /* This flag is set if we are in ClearType */ - /* backwards compatibility mode (used by the */ + /* backward compatibility mode (used by the */ /* v38 implementation of the bytecode */ /* interpreter). */ /* */ @@ -1465,7 +1468,7 @@ /***********************************************************************/ /* */ - /* TrueType-specific fields (ignored by the OTF-Type2 driver) */ + /* TrueType-specific fields (ignored by the CFF driver) */ /* */ /***********************************************************************/ @@ -1500,7 +1503,7 @@ FT_ULong glyf_len; FT_ULong glyf_offset; /* since 2.7.1 */ - FT_Bool isCFF2; /* since 2.7.1 */ + FT_Bool is_cff2; /* since 2.7.1 */ #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT FT_Bool doblend; @@ -1508,7 +1511,10 @@ FT_Bool is_default_instance; /* since 2.7.1 */ FT_UInt32 variation_support; /* since 2.7.1 */ - FT_UInt32 mvar_support; /* since 2.7.1 */ + + const char* var_postscript_prefix; /* since 2.7.2 */ + FT_UInt var_postscript_prefix_len; /* since 2.7.2 */ + #endif /* since version 2.2 */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/t1tables.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/t1tables.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/t1tables.h (working copy) @@ -5,7 +5,7 @@ /* Basic Type 1/Type 2 tables definitions and interface (specification */ /* only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -291,7 +291,7 @@ } PS_DesignMapRec, *PS_DesignMap; - /* backwards-compatible definition */ + /* backward compatible definition */ typedef PS_DesignMapRec T1_DesignMap; @@ -326,7 +326,7 @@ } PS_BlendRec, *PS_Blend; - /* backwards-compatible definition */ + /* backward compatible definition */ typedef PS_BlendRec T1_Blend; Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ttnameid.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ttnameid.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ttnameid.h (working copy) @@ -4,7 +4,7 @@ /* */ /* TrueType name ID definitions (specification only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -36,7 +36,7 @@ /*************************************************************************/ /* */ /* Possible values for the `platform' identifier code in the name */ - /* records of the TTF `name' table. */ + /* records of an SFNT `name' table. */ /* */ /*************************************************************************/ @@ -119,14 +119,19 @@ * TT_APPLE_ID_VARIANT_SELECTOR :: * From Adobe, not Apple. Not a normal cmap. Specifies variations * on a real cmap. + * + * TT_APPLE_ID_FULL_UNICODE :: + * Used for fallback fonts that provide complete Unicode coverage with + * a type~13 cmap. */ -#define TT_APPLE_ID_DEFAULT 0 /* Unicode 1.0 */ -#define TT_APPLE_ID_UNICODE_1_1 1 /* specify Hangul at U+34xx */ -#define TT_APPLE_ID_ISO_10646 2 /* deprecated */ -#define TT_APPLE_ID_UNICODE_2_0 3 /* or later */ +#define TT_APPLE_ID_DEFAULT 0 /* Unicode 1.0 */ +#define TT_APPLE_ID_UNICODE_1_1 1 /* specify Hangul at U+34xx */ +#define TT_APPLE_ID_ISO_10646 2 /* deprecated */ +#define TT_APPLE_ID_UNICODE_2_0 3 /* or later */ #define TT_APPLE_ID_UNICODE_32 4 /* 2.0 or later, full repertoire */ -#define TT_APPLE_ID_VARIANT_SELECTOR 5 /* variation selector data */ +#define TT_APPLE_ID_VARIANT_SELECTOR 5 /* variation selector data */ +#define TT_APPLE_ID_FULL_UNICODE 6 /* used with type 13 cmaps */ /*********************************************************************** @@ -137,42 +142,6 @@ * @description: * A list of valid values for the `encoding_id' for * @TT_PLATFORM_MACINTOSH charmaps and name entries. - * - * @values: - * TT_MAC_ID_ROMAN :: - * TT_MAC_ID_JAPANESE :: - * TT_MAC_ID_TRADITIONAL_CHINESE :: - * TT_MAC_ID_KOREAN :: - * TT_MAC_ID_ARABIC :: - * TT_MAC_ID_HEBREW :: - * TT_MAC_ID_GREEK :: - * TT_MAC_ID_RUSSIAN :: - * TT_MAC_ID_RSYMBOL :: - * TT_MAC_ID_DEVANAGARI :: - * TT_MAC_ID_GURMUKHI :: - * TT_MAC_ID_GUJARATI :: - * TT_MAC_ID_ORIYA :: - * TT_MAC_ID_BENGALI :: - * TT_MAC_ID_TAMIL :: - * TT_MAC_ID_TELUGU :: - * TT_MAC_ID_KANNADA :: - * TT_MAC_ID_MALAYALAM :: - * TT_MAC_ID_SINHALESE :: - * TT_MAC_ID_BURMESE :: - * TT_MAC_ID_KHMER :: - * TT_MAC_ID_THAI :: - * TT_MAC_ID_LAOTIAN :: - * TT_MAC_ID_GEORGIAN :: - * TT_MAC_ID_ARMENIAN :: - * TT_MAC_ID_MALDIVIAN :: - * TT_MAC_ID_SIMPLIFIED_CHINESE :: - * TT_MAC_ID_TIBETAN :: - * TT_MAC_ID_MONGOLIAN :: - * TT_MAC_ID_GEEZ :: - * TT_MAC_ID_SLAVIC :: - * TT_MAC_ID_VIETNAMESE :: - * TT_MAC_ID_SINDHI :: - * TT_MAC_ID_UNINTERP :: */ #define TT_MAC_ID_ROMAN 0 @@ -247,45 +216,48 @@ * * @values: * TT_MS_ID_SYMBOL_CS :: - * Corresponds to Microsoft symbol encoding. See - * @FT_ENCODING_MS_SYMBOL. + * Microsoft symbol encoding. See @FT_ENCODING_MS_SYMBOL. * * TT_MS_ID_UNICODE_CS :: - * Corresponds to a Microsoft WGL4 charmap, matching Unicode. See + * Microsoft WGL4 charmap, matching Unicode. See * @FT_ENCODING_UNICODE. * * TT_MS_ID_SJIS :: - * Corresponds to SJIS Japanese encoding. See @FT_ENCODING_SJIS. + * Shift JIS Japanese encoding. See @FT_ENCODING_SJIS. * - * TT_MS_ID_GB2312 :: - * Corresponds to Simplified Chinese as used in Mainland China. See - * @FT_ENCODING_GB2312. + * TT_MS_ID_PRC :: + * Chinese encodings as used in the People's Republic of China (PRC). + * This means the encodings GB~2312 and its supersets GBK and + * GB~18030. See @FT_ENCODING_PRC. * * TT_MS_ID_BIG_5 :: - * Corresponds to Traditional Chinese as used in Taiwan and Hong Kong. - * See @FT_ENCODING_BIG5. + * Traditional Chinese as used in Taiwan and Hong Kong. See + * @FT_ENCODING_BIG5. * * TT_MS_ID_WANSUNG :: - * Corresponds to Korean Wansung encoding. See @FT_ENCODING_WANSUNG. + * Korean Extended Wansung encoding. See @FT_ENCODING_WANSUNG. * * TT_MS_ID_JOHAB :: - * Corresponds to Johab encoding. See @FT_ENCODING_JOHAB. + * Korean Johab encoding. See @FT_ENCODING_JOHAB. * * TT_MS_ID_UCS_4 :: - * Corresponds to UCS-4 or UTF-32 charmaps. This has been added to - * the OpenType specification version 1.4 (mid-2001.) + * UCS-4 or UTF-32 charmaps. This has been added to the OpenType + * specification version 1.4 (mid-2001). */ #define TT_MS_ID_SYMBOL_CS 0 #define TT_MS_ID_UNICODE_CS 1 #define TT_MS_ID_SJIS 2 -#define TT_MS_ID_GB2312 3 +#define TT_MS_ID_PRC 3 #define TT_MS_ID_BIG_5 4 #define TT_MS_ID_WANSUNG 5 #define TT_MS_ID_JOHAB 6 #define TT_MS_ID_UCS_4 10 + /* this value is deprecated */ +#define TT_MS_ID_GB2312 TT_MS_ID_PRC + /*********************************************************************** * * @enum: @@ -312,17 +284,22 @@ #define TT_ADOBE_ID_LATIN_1 3 - /*************************************************************************/ - /* */ - /* Possible values of the language identifier field in the name records */ - /* of the TTF `name' table if the `platform' identifier code is */ - /* TT_PLATFORM_MACINTOSH. These values are also used as return values */ - /* for function @FT_Get_CMap_Language_ID. */ - /* */ - /* The canonical source for the Apple assigned Language ID's is at */ - /* */ - /* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6name.html */ - /* */ + /*********************************************************************** + * + * @enum: + * TT_MAC_LANGID_XXX + * + * @description: + * Possible values of the language identifier field in the name records + * of the SFNT `name' table if the `platform' identifier code is + * @TT_PLATFORM_MACINTOSH. These values are also used as return values + * for function @FT_Get_CMap_Language_ID. + * + * The canonical source for Apple's IDs is + * + * https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6name.html + */ + #define TT_MAC_LANGID_ENGLISH 0 #define TT_MAC_LANGID_FRENCH 1 #define TT_MAC_LANGID_GERMAN 2 @@ -433,15 +410,6 @@ #define TT_MAC_LANGID_JAVANESE 138 #define TT_MAC_LANGID_SUNDANESE 139 - -#if 0 /* these seem to be errors that have been dropped */ - -#define TT_MAC_LANGID_SCOTTISH_GAELIC 140 -#define TT_MAC_LANGID_IRISH_GAELIC 141 - -#endif - - /* The following codes are new as of 2000-03-10 */ #define TT_MAC_LANGID_GALICIAN 140 #define TT_MAC_LANGID_AFRIKAANS 141 @@ -456,18 +424,30 @@ #define TT_MAC_LANGID_AZERBAIJANI_ROMAN_SCRIPT 150 - /*************************************************************************/ - /* */ - /* Possible values of the language identifier field in the name records */ - /* of the TTF `name' table if the `platform' identifier code is */ - /* TT_PLATFORM_MICROSOFT. */ - /* */ - /* The canonical source for the MS assigned LCIDs is */ - /* */ - /* http://www.microsoft.com/globaldev/reference/lcid-all.mspx */ - /* */ + /*********************************************************************** + * + * @enum: + * TT_MS_LANGID_XXX + * + * @description: + * Possible values of the language identifier field in the name records + * of the SFNT `name' table if the `platform' identifier code is + * @TT_PLATFORM_MICROSOFT. These values are also used as return values + * for function @FT_Get_CMap_Language_ID. + * + * The canonical source for Microsoft's IDs is + * + * http://www.microsoft.com/globaldev/reference/lcid-all.mspx , + * + * however, we only provide macros for language identifiers present in + * the OpenType specification: Microsoft has abandoned the concept of + * LCIDs (language code identifiers), and format~1 of the `name' table + * provides a better mechanism for languages not covered here. + * + * More legacy values not listed in the reference can be found in the + * @FT_TRUETYPE_IDS_H header file. + */ -#define TT_MS_LANGID_ARABIC_GENERAL 0x0001 #define TT_MS_LANGID_ARABIC_SAUDI_ARABIA 0x0401 #define TT_MS_LANGID_ARABIC_IRAQ 0x0801 #define TT_MS_LANGID_ARABIC_EGYPT 0x0C01 @@ -485,24 +465,12 @@ #define TT_MS_LANGID_ARABIC_BAHRAIN 0x3C01 #define TT_MS_LANGID_ARABIC_QATAR 0x4001 #define TT_MS_LANGID_BULGARIAN_BULGARIA 0x0402 -#define TT_MS_LANGID_CATALAN_SPAIN 0x0403 -#define TT_MS_LANGID_CHINESE_GENERAL 0x0004 +#define TT_MS_LANGID_CATALAN_CATALAN 0x0403 #define TT_MS_LANGID_CHINESE_TAIWAN 0x0404 #define TT_MS_LANGID_CHINESE_PRC 0x0804 #define TT_MS_LANGID_CHINESE_HONG_KONG 0x0C04 #define TT_MS_LANGID_CHINESE_SINGAPORE 0x1004 - -#if 1 /* this looks like the correct value */ -#define TT_MS_LANGID_CHINESE_MACAU 0x1404 -#else /* but beware, Microsoft may change its mind... - the most recent Word reference has the following: */ -#define TT_MS_LANGID_CHINESE_MACAU TT_MS_LANGID_CHINESE_HONG_KONG -#endif - -#if 0 /* used only with .NET `cultures'; commented out */ -#define TT_MS_LANGID_CHINESE_TRADITIONAL 0x7C04 -#endif - +#define TT_MS_LANGID_CHINESE_MACAO 0x1404 #define TT_MS_LANGID_CZECH_CZECH_REPUBLIC 0x0405 #define TT_MS_LANGID_DANISH_DENMARK 0x0406 #define TT_MS_LANGID_GERMAN_GERMANY 0x0407 @@ -509,15 +477,8 @@ #define TT_MS_LANGID_GERMAN_SWITZERLAND 0x0807 #define TT_MS_LANGID_GERMAN_AUSTRIA 0x0C07 #define TT_MS_LANGID_GERMAN_LUXEMBOURG 0x1007 -#define TT_MS_LANGID_GERMAN_LIECHTENSTEI 0x1407 +#define TT_MS_LANGID_GERMAN_LIECHTENSTEIN 0x1407 #define TT_MS_LANGID_GREEK_GREECE 0x0408 - - /* don't ask what this one means... It is commented out currently. */ -#if 0 -#define TT_MS_LANGID_GREEK_GREECE2 0x2008 -#endif - -#define TT_MS_LANGID_ENGLISH_GENERAL 0x0009 #define TT_MS_LANGID_ENGLISH_UNITED_STATES 0x0409 #define TT_MS_LANGID_ENGLISH_UNITED_KINGDOM 0x0809 #define TT_MS_LANGID_ENGLISH_AUSTRALIA 0x0C09 @@ -531,14 +492,12 @@ #define TT_MS_LANGID_ENGLISH_TRINIDAD 0x2C09 #define TT_MS_LANGID_ENGLISH_ZIMBABWE 0x3009 #define TT_MS_LANGID_ENGLISH_PHILIPPINES 0x3409 -#define TT_MS_LANGID_ENGLISH_INDONESIA 0x3809 -#define TT_MS_LANGID_ENGLISH_HONG_KONG 0x3C09 #define TT_MS_LANGID_ENGLISH_INDIA 0x4009 #define TT_MS_LANGID_ENGLISH_MALAYSIA 0x4409 #define TT_MS_LANGID_ENGLISH_SINGAPORE 0x4809 #define TT_MS_LANGID_SPANISH_SPAIN_TRADITIONAL_SORT 0x040A #define TT_MS_LANGID_SPANISH_MEXICO 0x080A -#define TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT 0x0C0A +#define TT_MS_LANGID_SPANISH_SPAIN_MODERN_SORT 0x0C0A #define TT_MS_LANGID_SPANISH_GUATEMALA 0x100A #define TT_MS_LANGID_SPANISH_COSTA_RICA 0x140A #define TT_MS_LANGID_SPANISH_PANAMA 0x180A @@ -557,9 +516,6 @@ #define TT_MS_LANGID_SPANISH_NICARAGUA 0x4C0A #define TT_MS_LANGID_SPANISH_PUERTO_RICO 0x500A #define TT_MS_LANGID_SPANISH_UNITED_STATES 0x540A - /* The following ID blatantly violate MS specs by using a */ - /* sublanguage > 0x1F. */ -#define TT_MS_LANGID_SPANISH_LATIN_AMERICA 0xE40AU #define TT_MS_LANGID_FINNISH_FINLAND 0x040B #define TT_MS_LANGID_FRENCH_FRANCE 0x040C #define TT_MS_LANGID_FRENCH_BELGIUM 0x080C @@ -567,19 +523,6 @@ #define TT_MS_LANGID_FRENCH_SWITZERLAND 0x100C #define TT_MS_LANGID_FRENCH_LUXEMBOURG 0x140C #define TT_MS_LANGID_FRENCH_MONACO 0x180C -#define TT_MS_LANGID_FRENCH_WEST_INDIES 0x1C0C -#define TT_MS_LANGID_FRENCH_REUNION 0x200C -#define TT_MS_LANGID_FRENCH_CONGO 0x240C - /* which was formerly: */ -#define TT_MS_LANGID_FRENCH_ZAIRE TT_MS_LANGID_FRENCH_CONGO -#define TT_MS_LANGID_FRENCH_SENEGAL 0x280C -#define TT_MS_LANGID_FRENCH_CAMEROON 0x2C0C -#define TT_MS_LANGID_FRENCH_COTE_D_IVOIRE 0x300C -#define TT_MS_LANGID_FRENCH_MALI 0x340C -#define TT_MS_LANGID_FRENCH_MOROCCO 0x380C -#define TT_MS_LANGID_FRENCH_HAITI 0x3C0C - /* and another violation of the spec (see 0xE40AU) */ -#define TT_MS_LANGID_FRENCH_NORTH_AFRICA 0xE40CU #define TT_MS_LANGID_HEBREW_ISRAEL 0x040D #define TT_MS_LANGID_HUNGARIAN_HUNGARY 0x040E #define TT_MS_LANGID_ICELANDIC_ICELAND 0x040F @@ -586,8 +529,7 @@ #define TT_MS_LANGID_ITALIAN_ITALY 0x0410 #define TT_MS_LANGID_ITALIAN_SWITZERLAND 0x0810 #define TT_MS_LANGID_JAPANESE_JAPAN 0x0411 -#define TT_MS_LANGID_KOREAN_EXTENDED_WANSUNG_KOREA 0x0412 -#define TT_MS_LANGID_KOREAN_JOHAB_KOREA 0x0812 +#define TT_MS_LANGID_KOREAN_KOREA 0x0412 #define TT_MS_LANGID_DUTCH_NETHERLANDS 0x0413 #define TT_MS_LANGID_DUTCH_BELGIUM 0x0813 #define TT_MS_LANGID_NORWEGIAN_NORWAY_BOKMAL 0x0414 @@ -595,26 +537,17 @@ #define TT_MS_LANGID_POLISH_POLAND 0x0415 #define TT_MS_LANGID_PORTUGUESE_BRAZIL 0x0416 #define TT_MS_LANGID_PORTUGUESE_PORTUGAL 0x0816 -#define TT_MS_LANGID_RHAETO_ROMANIC_SWITZERLAND 0x0417 +#define TT_MS_LANGID_ROMANSH_SWITZERLAND 0x0417 #define TT_MS_LANGID_ROMANIAN_ROMANIA 0x0418 -#define TT_MS_LANGID_MOLDAVIAN_MOLDAVIA 0x0818 #define TT_MS_LANGID_RUSSIAN_RUSSIA 0x0419 -#define TT_MS_LANGID_RUSSIAN_MOLDAVIA 0x0819 #define TT_MS_LANGID_CROATIAN_CROATIA 0x041A #define TT_MS_LANGID_SERBIAN_SERBIA_LATIN 0x081A #define TT_MS_LANGID_SERBIAN_SERBIA_CYRILLIC 0x0C1A - -#if 0 /* this used to be this value, but it looks like we were wrong */ -#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA 0x101A -#else /* current sources say */ #define TT_MS_LANGID_CROATIAN_BOSNIA_HERZEGOVINA 0x101A #define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA 0x141A - /* and XPsp2 Platform SDK added (2004-07-26) */ - /* Names are shortened to be significant within 40 chars. */ #define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_LATIN 0x181A -#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC 0x181A -#endif - +#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC 0x1C1A +#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZ_CYRILLIC 0x201A #define TT_MS_LANGID_SLOVAK_SLOVAKIA 0x041B #define TT_MS_LANGID_ALBANIAN_ALBANIA 0x041C #define TT_MS_LANGID_SWEDISH_SWEDEN 0x041D @@ -622,36 +555,30 @@ #define TT_MS_LANGID_THAI_THAILAND 0x041E #define TT_MS_LANGID_TURKISH_TURKEY 0x041F #define TT_MS_LANGID_URDU_PAKISTAN 0x0420 -#define TT_MS_LANGID_URDU_INDIA 0x0820 #define TT_MS_LANGID_INDONESIAN_INDONESIA 0x0421 #define TT_MS_LANGID_UKRAINIAN_UKRAINE 0x0422 #define TT_MS_LANGID_BELARUSIAN_BELARUS 0x0423 -#define TT_MS_LANGID_SLOVENE_SLOVENIA 0x0424 +#define TT_MS_LANGID_SLOVENIAN_SLOVENIA 0x0424 #define TT_MS_LANGID_ESTONIAN_ESTONIA 0x0425 #define TT_MS_LANGID_LATVIAN_LATVIA 0x0426 #define TT_MS_LANGID_LITHUANIAN_LITHUANIA 0x0427 -#define TT_MS_LANGID_CLASSIC_LITHUANIAN_LITHUANIA 0x0827 #define TT_MS_LANGID_TAJIK_TAJIKISTAN 0x0428 -#define TT_MS_LANGID_FARSI_IRAN 0x0429 #define TT_MS_LANGID_VIETNAMESE_VIET_NAM 0x042A #define TT_MS_LANGID_ARMENIAN_ARMENIA 0x042B #define TT_MS_LANGID_AZERI_AZERBAIJAN_LATIN 0x042C #define TT_MS_LANGID_AZERI_AZERBAIJAN_CYRILLIC 0x082C -#define TT_MS_LANGID_BASQUE_SPAIN 0x042D -#define TT_MS_LANGID_SORBIAN_GERMANY 0x042E +#define TT_MS_LANGID_BASQUE_BASQUE 0x042D +#define TT_MS_LANGID_UPPER_SORBIAN_GERMANY 0x042E +#define TT_MS_LANGID_LOWER_SORBIAN_GERMANY 0x082E #define TT_MS_LANGID_MACEDONIAN_MACEDONIA 0x042F -#define TT_MS_LANGID_SUTU_SOUTH_AFRICA 0x0430 -#define TT_MS_LANGID_TSONGA_SOUTH_AFRICA 0x0431 -#define TT_MS_LANGID_TSWANA_SOUTH_AFRICA 0x0432 -#define TT_MS_LANGID_VENDA_SOUTH_AFRICA 0x0433 -#define TT_MS_LANGID_XHOSA_SOUTH_AFRICA 0x0434 -#define TT_MS_LANGID_ZULU_SOUTH_AFRICA 0x0435 +#define TT_MS_LANGID_SETSWANA_SOUTH_AFRICA 0x0432 +#define TT_MS_LANGID_ISIXHOSA_SOUTH_AFRICA 0x0434 +#define TT_MS_LANGID_ISIZULU_SOUTH_AFRICA 0x0435 #define TT_MS_LANGID_AFRIKAANS_SOUTH_AFRICA 0x0436 #define TT_MS_LANGID_GEORGIAN_GEORGIA 0x0437 #define TT_MS_LANGID_FAEROESE_FAEROE_ISLANDS 0x0438 #define TT_MS_LANGID_HINDI_INDIA 0x0439 #define TT_MS_LANGID_MALTESE_MALTA 0x043A - /* Added by XPsp2 Platform SDK (2004-07-26) */ #define TT_MS_LANGID_SAMI_NORTHERN_NORWAY 0x043B #define TT_MS_LANGID_SAMI_NORTHERN_SWEDEN 0x083B #define TT_MS_LANGID_SAMI_NORTHERN_FINLAND 0x0C3B @@ -661,37 +588,21 @@ #define TT_MS_LANGID_SAMI_SOUTHERN_SWEDEN 0x1C3B #define TT_MS_LANGID_SAMI_SKOLT_FINLAND 0x203B #define TT_MS_LANGID_SAMI_INARI_FINLAND 0x243B - /* ... and we also keep our old identifier... */ -#define TT_MS_LANGID_SAAMI_LAPONIA 0x043B - -#if 0 /* this seems to be a previous inversion */ -#define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043C -#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083C -#else -#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083C -#define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043C -#endif - -#define TT_MS_LANGID_YIDDISH_GERMANY 0x043D +#define TT_MS_LANGID_IRISH_IRELAND 0x083C #define TT_MS_LANGID_MALAY_MALAYSIA 0x043E #define TT_MS_LANGID_MALAY_BRUNEI_DARUSSALAM 0x083E -#define TT_MS_LANGID_KAZAK_KAZAKSTAN 0x043F -#define TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN /* Cyrillic*/ 0x0440 - /* alias declared in Windows 2000 */ -#define TT_MS_LANGID_KIRGHIZ_KIRGHIZ_REPUBLIC \ - TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN - -#define TT_MS_LANGID_SWAHILI_KENYA 0x0441 +#define TT_MS_LANGID_KAZAKH_KAZAKHSTAN 0x043F +#define TT_MS_LANGID_KYRGYZ_KYRGYZSTAN /* Cyrillic*/ 0x0440 +#define TT_MS_LANGID_KISWAHILI_KENYA 0x0441 #define TT_MS_LANGID_TURKMEN_TURKMENISTAN 0x0442 #define TT_MS_LANGID_UZBEK_UZBEKISTAN_LATIN 0x0443 #define TT_MS_LANGID_UZBEK_UZBEKISTAN_CYRILLIC 0x0843 -#define TT_MS_LANGID_TATAR_TATARSTAN 0x0444 +#define TT_MS_LANGID_TATAR_RUSSIA 0x0444 #define TT_MS_LANGID_BENGALI_INDIA 0x0445 #define TT_MS_LANGID_BENGALI_BANGLADESH 0x0845 #define TT_MS_LANGID_PUNJABI_INDIA 0x0446 -#define TT_MS_LANGID_PUNJABI_ARABIC_PAKISTAN 0x0846 #define TT_MS_LANGID_GUJARATI_INDIA 0x0447 -#define TT_MS_LANGID_ORIYA_INDIA 0x0448 +#define TT_MS_LANGID_ODIA_INDIA 0x0448 #define TT_MS_LANGID_TAMIL_INDIA 0x0449 #define TT_MS_LANGID_TELUGU_INDIA 0x044A #define TT_MS_LANGID_KANNADA_INDIA 0x044B @@ -700,143 +611,242 @@ #define TT_MS_LANGID_MARATHI_INDIA 0x044E #define TT_MS_LANGID_SANSKRIT_INDIA 0x044F #define TT_MS_LANGID_MONGOLIAN_MONGOLIA /* Cyrillic */ 0x0450 -#define TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN 0x0850 -#define TT_MS_LANGID_TIBETAN_CHINA 0x0451 - /* Don't use the next constant! It has */ - /* (1) the wrong spelling (Dzonghka) */ - /* (2) Microsoft doesn't officially define it -- */ - /* at least it is not in the List of Local */ - /* ID Values. */ - /* (3) Dzongkha is not the same language as */ - /* Tibetan, so merging it is wrong anyway. */ - /* */ - /* TT_MS_LANGID_TIBETAN_BHUTAN is correct, BTW. */ -#define TT_MS_LANGID_DZONGHKA_BHUTAN 0x0851 - -#if 0 - /* the following used to be defined */ -#define TT_MS_LANGID_TIBETAN_BHUTAN 0x0451 - /* ... but it was changed; */ -#else - /* So we will continue to #define it, but with the correct value */ -#define TT_MS_LANGID_TIBETAN_BHUTAN TT_MS_LANGID_DZONGHKA_BHUTAN -#endif - -#define TT_MS_LANGID_WELSH_WALES 0x0452 +#define TT_MS_LANGID_MONGOLIAN_PRC 0x0850 +#define TT_MS_LANGID_TIBETAN_PRC 0x0451 +#define TT_MS_LANGID_WELSH_UNITED_KINGDOM 0x0452 #define TT_MS_LANGID_KHMER_CAMBODIA 0x0453 #define TT_MS_LANGID_LAO_LAOS 0x0454 -#define TT_MS_LANGID_BURMESE_MYANMAR 0x0455 -#define TT_MS_LANGID_GALICIAN_SPAIN 0x0456 +#define TT_MS_LANGID_GALICIAN_GALICIAN 0x0456 #define TT_MS_LANGID_KONKANI_INDIA 0x0457 -#define TT_MS_LANGID_MANIPURI_INDIA /* Bengali */ 0x0458 -#define TT_MS_LANGID_SINDHI_INDIA /* Arabic */ 0x0459 -#define TT_MS_LANGID_SINDHI_PAKISTAN 0x0859 - /* Missing a LCID for Sindhi in Devanagari script */ #define TT_MS_LANGID_SYRIAC_SYRIA 0x045A -#define TT_MS_LANGID_SINHALESE_SRI_LANKA 0x045B -#define TT_MS_LANGID_CHEROKEE_UNITED_STATES 0x045C +#define TT_MS_LANGID_SINHALA_SRI_LANKA 0x045B #define TT_MS_LANGID_INUKTITUT_CANADA 0x045D +#define TT_MS_LANGID_INUKTITUT_CANADA_LATIN 0x085D #define TT_MS_LANGID_AMHARIC_ETHIOPIA 0x045E -#define TT_MS_LANGID_TAMAZIGHT_MOROCCO /* Arabic */ 0x045F -#define TT_MS_LANGID_TAMAZIGHT_MOROCCO_LATIN 0x085F - /* Missing a LCID for Tifinagh script */ -#define TT_MS_LANGID_KASHMIRI_PAKISTAN /* Arabic */ 0x0460 - /* Spelled this way by XPsp2 Platform SDK (2004-07-26) */ - /* script is yet unclear... might be Arabic, Nagari or Sharada */ -#define TT_MS_LANGID_KASHMIRI_SASIA 0x0860 - /* ... and aliased (by MS) for compatibility reasons. */ -#define TT_MS_LANGID_KASHMIRI_INDIA TT_MS_LANGID_KASHMIRI_SASIA +#define TT_MS_LANGID_TAMAZIGHT_ALGERIA 0x085F #define TT_MS_LANGID_NEPALI_NEPAL 0x0461 -#define TT_MS_LANGID_NEPALI_INDIA 0x0861 #define TT_MS_LANGID_FRISIAN_NETHERLANDS 0x0462 #define TT_MS_LANGID_PASHTO_AFGHANISTAN 0x0463 #define TT_MS_LANGID_FILIPINO_PHILIPPINES 0x0464 #define TT_MS_LANGID_DHIVEHI_MALDIVES 0x0465 - /* alias declared in Windows 2000 */ -#define TT_MS_LANGID_DIVEHI_MALDIVES TT_MS_LANGID_DHIVEHI_MALDIVES -#define TT_MS_LANGID_EDO_NIGERIA 0x0466 -#define TT_MS_LANGID_FULFULDE_NIGERIA 0x0467 #define TT_MS_LANGID_HAUSA_NIGERIA 0x0468 -#define TT_MS_LANGID_IBIBIO_NIGERIA 0x0469 #define TT_MS_LANGID_YORUBA_NIGERIA 0x046A #define TT_MS_LANGID_QUECHUA_BOLIVIA 0x046B #define TT_MS_LANGID_QUECHUA_ECUADOR 0x086B #define TT_MS_LANGID_QUECHUA_PERU 0x0C6B -#define TT_MS_LANGID_SEPEDI_SOUTH_AFRICA 0x046C - /* Also spelled by XPsp2 Platform SDK (2004-07-26) */ +#define TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA 0x046C +#define TT_MS_LANGID_BASHKIR_RUSSIA 0x046D +#define TT_MS_LANGID_LUXEMBOURGISH_LUXEMBOURG 0x046E +#define TT_MS_LANGID_GREENLANDIC_GREENLAND 0x046F +#define TT_MS_LANGID_IGBO_NIGERIA 0x0470 +#define TT_MS_LANGID_YI_PRC 0x0478 +#define TT_MS_LANGID_MAPUDUNGUN_CHILE 0x047A +#define TT_MS_LANGID_MOHAWK_MOHAWK 0x047C +#define TT_MS_LANGID_BRETON_FRANCE 0x047E +#define TT_MS_LANGID_UIGHUR_PRC 0x0480 +#define TT_MS_LANGID_MAORI_NEW_ZEALAND 0x0481 +#define TT_MS_LANGID_OCCITAN_FRANCE 0x0482 +#define TT_MS_LANGID_CORSICAN_FRANCE 0x0483 +#define TT_MS_LANGID_ALSATIAN_FRANCE 0x0484 +#define TT_MS_LANGID_YAKUT_RUSSIA 0x0485 +#define TT_MS_LANGID_KICHE_GUATEMALA 0x0486 +#define TT_MS_LANGID_KINYARWANDA_RWANDA 0x0487 +#define TT_MS_LANGID_WOLOF_SENEGAL 0x0488 +#define TT_MS_LANGID_DARI_AFGHANISTAN 0x048C + + /* */ + + + /* legacy macro definitions not present in OpenType 1.8.1 */ +#define TT_MS_LANGID_ARABIC_GENERAL 0x0001 +#define TT_MS_LANGID_CATALAN_SPAIN \ + TT_MS_LANGID_CATALAN_CATALAN +#define TT_MS_LANGID_CHINESE_GENERAL 0x0004 +#define TT_MS_LANGID_CHINESE_MACAU \ + TT_MS_LANGID_CHINESE_MACAO +#define TT_MS_LANGID_GERMAN_LIECHTENSTEI \ + TT_MS_LANGID_GERMAN_LIECHTENSTEIN +#define TT_MS_LANGID_ENGLISH_GENERAL 0x0009 +#define TT_MS_LANGID_ENGLISH_INDONESIA 0x3809 +#define TT_MS_LANGID_ENGLISH_HONG_KONG 0x3C09 +#define TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT \ + TT_MS_LANGID_SPANISH_SPAIN_MODERN_SORT +#define TT_MS_LANGID_SPANISH_LATIN_AMERICA 0xE40AU +#define TT_MS_LANGID_FRENCH_WEST_INDIES 0x1C0C +#define TT_MS_LANGID_FRENCH_REUNION 0x200C +#define TT_MS_LANGID_FRENCH_CONGO 0x240C + /* which was formerly: */ +#define TT_MS_LANGID_FRENCH_ZAIRE \ + TT_MS_LANGID_FRENCH_CONGO +#define TT_MS_LANGID_FRENCH_SENEGAL 0x280C +#define TT_MS_LANGID_FRENCH_CAMEROON 0x2C0C +#define TT_MS_LANGID_FRENCH_COTE_D_IVOIRE 0x300C +#define TT_MS_LANGID_FRENCH_MALI 0x340C +#define TT_MS_LANGID_FRENCH_MOROCCO 0x380C +#define TT_MS_LANGID_FRENCH_HAITI 0x3C0C +#define TT_MS_LANGID_FRENCH_NORTH_AFRICA 0xE40CU +#define TT_MS_LANGID_KOREAN_EXTENDED_WANSUNG_KOREA \ + TT_MS_LANGID_KOREAN_KOREA +#define TT_MS_LANGID_KOREAN_JOHAB_KOREA 0x0812 +#define TT_MS_LANGID_RHAETO_ROMANIC_SWITZERLAND \ + TT_MS_LANGID_ROMANSH_SWITZERLAND +#define TT_MS_LANGID_MOLDAVIAN_MOLDAVIA 0x0818 +#define TT_MS_LANGID_RUSSIAN_MOLDAVIA 0x0819 +#define TT_MS_LANGID_URDU_INDIA 0x0820 +#define TT_MS_LANGID_CLASSIC_LITHUANIAN_LITHUANIA 0x0827 +#define TT_MS_LANGID_SLOVENE_SLOVENIA \ + TT_MS_LANGID_SLOVENIAN_SLOVENIA +#define TT_MS_LANGID_FARSI_IRAN 0x0429 +#define TT_MS_LANGID_BASQUE_SPAIN \ + TT_MS_LANGID_BASQUE_BASQUE +#define TT_MS_LANGID_SORBIAN_GERMANY \ + TT_MS_LANGID_UPPER_SORBIAN_GERMANY +#define TT_MS_LANGID_SUTU_SOUTH_AFRICA 0x0430 +#define TT_MS_LANGID_TSONGA_SOUTH_AFRICA 0x0431 +#define TT_MS_LANGID_TSWANA_SOUTH_AFRICA \ + TT_MS_LANGID_SETSWANA_SOUTH_AFRICA +#define TT_MS_LANGID_VENDA_SOUTH_AFRICA 0x0433 +#define TT_MS_LANGID_XHOSA_SOUTH_AFRICA \ + TT_MS_LANGID_ISIXHOSA_SOUTH_AFRICA +#define TT_MS_LANGID_ZULU_SOUTH_AFRICA \ + TT_MS_LANGID_ISIZULU_SOUTH_AFRICA +#define TT_MS_LANGID_SAAMI_LAPONIA 0x043B + /* the next two values are incorrectly inverted */ +#define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043C +#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083C +#define TT_MS_LANGID_YIDDISH_GERMANY 0x043D +#define TT_MS_LANGID_KAZAK_KAZAKSTAN \ + TT_MS_LANGID_KAZAKH_KAZAKHSTAN +#define TT_MS_LANGID_KIRGHIZ_KIRGHIZ_REPUBLIC \ + TT_MS_LANGID_KYRGYZ_KYRGYZSTAN +#define TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN \ + TT_MS_LANGID_KYRGYZ_KYRGYZSTAN +#define TT_MS_LANGID_SWAHILI_KENYA \ + TT_MS_LANGID_KISWAHILI_KENYA +#define TT_MS_LANGID_TATAR_TATARSTAN \ + TT_MS_LANGID_TATAR_RUSSIA +#define TT_MS_LANGID_PUNJABI_ARABIC_PAKISTAN 0x0846 +#define TT_MS_LANGID_ORIYA_INDIA \ + TT_MS_LANGID_ODIA_INDIA +#define TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN \ + TT_MS_LANGID_MONGOLIAN_PRC +#define TT_MS_LANGID_TIBETAN_CHINA \ + TT_MS_LANGID_TIBETAN_PRC +#define TT_MS_LANGID_DZONGHKA_BHUTAN 0x0851 +#define TT_MS_LANGID_TIBETAN_BHUTAN \ + TT_MS_LANGID_DZONGHKA_BHUTAN +#define TT_MS_LANGID_WELSH_WALES \ + TT_MS_LANGID_WELSH_UNITED_KINGDOM +#define TT_MS_LANGID_BURMESE_MYANMAR 0x0455 +#define TT_MS_LANGID_GALICIAN_SPAIN \ + TT_MS_LANGID_GALICIAN_GALICIAN +#define TT_MS_LANGID_MANIPURI_INDIA /* Bengali */ 0x0458 +#define TT_MS_LANGID_SINDHI_INDIA /* Arabic */ 0x0459 +#define TT_MS_LANGID_SINDHI_PAKISTAN 0x0859 +#define TT_MS_LANGID_SINHALESE_SRI_LANKA \ + TT_MS_LANGID_SINHALA_SRI_LANKA +#define TT_MS_LANGID_CHEROKEE_UNITED_STATES 0x045C +#define TT_MS_LANGID_TAMAZIGHT_MOROCCO /* Arabic */ 0x045F +#define TT_MS_LANGID_TAMAZIGHT_MOROCCO_LATIN \ + TT_MS_LANGID_TAMAZIGHT_ALGERIA +#define TT_MS_LANGID_KASHMIRI_PAKISTAN /* Arabic */ 0x0460 +#define TT_MS_LANGID_KASHMIRI_SASIA 0x0860 +#define TT_MS_LANGID_KASHMIRI_INDIA \ + TT_MS_LANGID_KASHMIRI_SASIA +#define TT_MS_LANGID_NEPALI_INDIA 0x0861 +#define TT_MS_LANGID_DIVEHI_MALDIVES \ + TT_MS_LANGID_DHIVEHI_MALDIVES +#define TT_MS_LANGID_EDO_NIGERIA 0x0466 +#define TT_MS_LANGID_FULFULDE_NIGERIA 0x0467 +#define TT_MS_LANGID_IBIBIO_NIGERIA 0x0469 +#define TT_MS_LANGID_SEPEDI_SOUTH_AFRICA \ + TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA #define TT_MS_LANGID_SOTHO_SOUTHERN_SOUTH_AFRICA \ - TT_MS_LANGID_SEPEDI_SOUTH_AFRICA - /* language codes 0x046D, 0x046E and 0x046F are (still) unknown. */ -#define TT_MS_LANGID_IGBO_NIGERIA 0x0470 + TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA #define TT_MS_LANGID_KANURI_NIGERIA 0x0471 #define TT_MS_LANGID_OROMO_ETHIOPIA 0x0472 #define TT_MS_LANGID_TIGRIGNA_ETHIOPIA 0x0473 #define TT_MS_LANGID_TIGRIGNA_ERYTHREA 0x0873 - /* also spelled in the `Passport SDK' list as: */ -#define TT_MS_LANGID_TIGRIGNA_ERYTREA TT_MS_LANGID_TIGRIGNA_ERYTHREA +#define TT_MS_LANGID_TIGRIGNA_ERYTREA \ + TT_MS_LANGID_TIGRIGNA_ERYTHREA #define TT_MS_LANGID_GUARANI_PARAGUAY 0x0474 #define TT_MS_LANGID_HAWAIIAN_UNITED_STATES 0x0475 #define TT_MS_LANGID_LATIN 0x0476 #define TT_MS_LANGID_SOMALI_SOMALIA 0x0477 - /* Note: Yi does not have a (proper) ISO 639-2 code, since it is mostly */ - /* not written (but OTOH the peculiar writing system is worth */ - /* studying). */ -#define TT_MS_LANGID_YI_CHINA 0x0478 +#define TT_MS_LANGID_YI_CHINA \ + TT_MS_LANGID_YI_PRC #define TT_MS_LANGID_PAPIAMENTU_NETHERLANDS_ANTILLES 0x0479 - /* language codes from 0x047A to 0x047F are (still) unknown. */ -#define TT_MS_LANGID_UIGHUR_CHINA 0x0480 -#define TT_MS_LANGID_MAORI_NEW_ZEALAND 0x0481 +#define TT_MS_LANGID_UIGHUR_CHINA \ + TT_MS_LANGID_UIGHUR_PRC -#if 0 /* not deemed useful for fonts */ -#define TT_MS_LANGID_HUMAN_INTERFACE_DEVICE 0x04FF -#endif + /*********************************************************************** + * + * @enum: + * TT_NAME_ID_XXX + * + * @description: + * Possible values of the `name' identifier field in the name records of + * an SFNT `name' table. These values are platform independent. + */ - /*************************************************************************/ - /* */ - /* Possible values of the `name' identifier field in the name records of */ - /* the TTF `name' table. These values are platform independent. */ - /* */ -#define TT_NAME_ID_COPYRIGHT 0 -#define TT_NAME_ID_FONT_FAMILY 1 -#define TT_NAME_ID_FONT_SUBFAMILY 2 -#define TT_NAME_ID_UNIQUE_ID 3 -#define TT_NAME_ID_FULL_NAME 4 -#define TT_NAME_ID_VERSION_STRING 5 -#define TT_NAME_ID_PS_NAME 6 -#define TT_NAME_ID_TRADEMARK 7 +#define TT_NAME_ID_COPYRIGHT 0 +#define TT_NAME_ID_FONT_FAMILY 1 +#define TT_NAME_ID_FONT_SUBFAMILY 2 +#define TT_NAME_ID_UNIQUE_ID 3 +#define TT_NAME_ID_FULL_NAME 4 +#define TT_NAME_ID_VERSION_STRING 5 +#define TT_NAME_ID_PS_NAME 6 +#define TT_NAME_ID_TRADEMARK 7 /* the following values are from the OpenType spec */ -#define TT_NAME_ID_MANUFACTURER 8 -#define TT_NAME_ID_DESIGNER 9 -#define TT_NAME_ID_DESCRIPTION 10 -#define TT_NAME_ID_VENDOR_URL 11 -#define TT_NAME_ID_DESIGNER_URL 12 -#define TT_NAME_ID_LICENSE 13 -#define TT_NAME_ID_LICENSE_URL 14 +#define TT_NAME_ID_MANUFACTURER 8 +#define TT_NAME_ID_DESIGNER 9 +#define TT_NAME_ID_DESCRIPTION 10 +#define TT_NAME_ID_VENDOR_URL 11 +#define TT_NAME_ID_DESIGNER_URL 12 +#define TT_NAME_ID_LICENSE 13 +#define TT_NAME_ID_LICENSE_URL 14 /* number 15 is reserved */ -#define TT_NAME_ID_PREFERRED_FAMILY 16 -#define TT_NAME_ID_PREFERRED_SUBFAMILY 17 -#define TT_NAME_ID_MAC_FULL_NAME 18 +#define TT_NAME_ID_TYPOGRAPHIC_FAMILY 16 +#define TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY 17 +#define TT_NAME_ID_MAC_FULL_NAME 18 /* The following code is new as of 2000-01-21 */ -#define TT_NAME_ID_SAMPLE_TEXT 19 +#define TT_NAME_ID_SAMPLE_TEXT 19 /* This is new in OpenType 1.3 */ -#define TT_NAME_ID_CID_FINDFONT_NAME 20 +#define TT_NAME_ID_CID_FINDFONT_NAME 20 /* This is new in OpenType 1.5 */ -#define TT_NAME_ID_WWS_FAMILY 21 -#define TT_NAME_ID_WWS_SUBFAMILY 22 +#define TT_NAME_ID_WWS_FAMILY 21 +#define TT_NAME_ID_WWS_SUBFAMILY 22 + /* This is new in OpenType 1.7 */ +#define TT_NAME_ID_LIGHT_BACKGROUND 23 +#define TT_NAME_ID_DARK_BACKGROUND 24 - /*************************************************************************/ - /* */ - /* Bit mask values for the Unicode Ranges from the TTF `OS2 ' table. */ - /* */ - /* Updated 08-Nov-2008. */ - /* */ + /* This is new in OpenType 1.8 */ +#define TT_NAME_ID_VARIATIONS_PREFIX 25 + /* these two values are deprecated */ +#define TT_NAME_ID_PREFERRED_FAMILY TT_NAME_ID_TYPOGRAPHIC_FAMILY +#define TT_NAME_ID_PREFERRED_SUBFAMILY TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY + + + /*********************************************************************** + * + * @enum: + * TT_UCR_XXX + * + * @description: + * Possible bit mask values for the `ulUnicodeRangeX' fields in an SFNT + * `OS/2' table. + */ + + /* ulUnicodeRange1 */ + /* --------------- */ + /* Bit 0 Basic Latin */ #define TT_UCR_BASIC_LATIN (1L << 0) /* U+0020-U+007E */ /* Bit 1 C1 Controls and Latin-1 Supplement */ @@ -857,7 +867,7 @@ /* U+A700-U+A71F */ /* Bit 6 Combining Diacritical Marks */ /* Combining Diacritical Marks Supplement */ -#define TT_UCR_COMBINING_DIACRITICS (1L << 6) /* U+0300-U+036F */ +#define TT_UCR_COMBINING_DIACRITICAL_MARKS (1L << 6) /* U+0300-U+036F */ /* U+1DC0-U+1DFF */ /* Bit 7 Greek and Coptic */ #define TT_UCR_GREEK (1L << 7) /* U+0370-U+03FF */ @@ -925,12 +935,17 @@ /* Supplemental Punctuation */ #define TT_UCR_GENERAL_PUNCTUATION (1L << 31) /* U+2000-U+206F */ /* U+2E00-U+2E7F */ + + /* ulUnicodeRange2 */ + /* --------------- */ + /* Bit 32 Superscripts And Subscripts */ #define TT_UCR_SUPERSCRIPTS_SUBSCRIPTS (1L << 0) /* U+2070-U+209F */ /* Bit 33 Currency Symbols */ #define TT_UCR_CURRENCY_SYMBOLS (1L << 1) /* U+20A0-U+20CF */ /* Bit 34 Combining Diacritical Marks For Symbols */ -#define TT_UCR_COMBINING_DIACRITICS_SYMB (1L << 2) /* U+20D0-U+20FF */ +#define TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB \ + (1L << 2) /* U+20D0-U+20FF */ /* Bit 35 Letterlike Symbols */ #define TT_UCR_LETTERLIKE_SYMBOLS (1L << 3) /* U+2100-U+214F */ /* Bit 36 Number Forms */ @@ -996,13 +1011,13 @@ /* Bit 57 High Surrogates */ /* High Private Use Surrogates */ /* Low Surrogates */ - /* */ + /* According to OpenType specs v.1.3+, */ /* setting bit 57 implies that there is */ /* at least one codepoint beyond the */ /* Basic Multilingual Plane that is */ /* supported by this font. So it really */ - /* means >= U+10000 */ + /* means >= U+10000. */ #define TT_UCR_SURROGATES (1L << 25) /* U+D800-U+DB7F */ /* U+DB80-U+DBFF */ /* U+DC00-U+DFFF */ @@ -1034,7 +1049,11 @@ /* Bit 62 Alphabetic Presentation Forms */ #define TT_UCR_ALPHABETIC_PRESENTATION_FORMS (1L << 30) /* U+FB00-U+FB4F */ /* Bit 63 Arabic Presentation Forms-A */ -#define TT_UCR_ARABIC_PRESENTATIONS_A (1L << 31) /* U+FB50-U+FDFF */ +#define TT_UCR_ARABIC_PRESENTATION_FORMS_A (1L << 31) /* U+FB50-U+FDFF */ + + /* ulUnicodeRange3 */ + /* --------------- */ + /* Bit 64 Combining Half Marks */ #define TT_UCR_COMBINING_HALF_MARKS (1L << 0) /* U+FE20-U+FE2F */ /* Bit 65 Vertical forms */ @@ -1044,7 +1063,7 @@ /* Bit 66 Small Form Variants */ #define TT_UCR_SMALL_FORM_VARIANTS (1L << 2) /* U+FE50-U+FE6F */ /* Bit 67 Arabic Presentation Forms-B */ -#define TT_UCR_ARABIC_PRESENTATIONS_B (1L << 3) /* U+FE70-U+FEFE */ +#define TT_UCR_ARABIC_PRESENTATION_FORMS_B (1L << 3) /* U+FE70-U+FEFE */ /* Bit 68 Halfwidth and Fullwidth Forms */ #define TT_UCR_HALFWIDTH_FULLWIDTH_FORMS (1L << 4) /* U+FF00-U+FFEF */ /* Bit 69 Specials */ @@ -1123,6 +1142,10 @@ #define TT_UCR_TAI_LE (1L << 30) /* U+1950-U+197F */ /* Bit 95 New Tai Lue */ #define TT_UCR_NEW_TAI_LUE (1L << 31) /* U+1980-U+19DF */ + + /* ulUnicodeRange4 */ + /* --------------- */ + /* Bit 96 Buginese */ #define TT_UCR_BUGINESE (1L << 0) /* U+1A00-U+1A1F */ /* Bit 97 Glagolitic */ @@ -1191,44 +1214,20 @@ /*U+1F000-U+1F02F*/ /* Bit 123-127 Reserved for process-internal usage */ + /* */ - /*************************************************************************/ - /* */ - /* Some compilers have a very limited length of identifiers. */ - /* */ -#if defined( __TURBOC__ ) && __TURBOC__ < 0x0410 || defined( __PACIFIC__ ) -#define HAVE_LIMIT_ON_IDENTS -#endif + /* for backward compatibility with older FreeType versions */ +#define TT_UCR_ARABIC_PRESENTATION_A \ + TT_UCR_ARABIC_PRESENTATION_FORMS_A +#define TT_UCR_ARABIC_PRESENTATION_B \ + TT_UCR_ARABIC_PRESENTATION_FORMS_B +#define TT_UCR_COMBINING_DIACRITICS \ + TT_UCR_COMBINING_DIACRITICAL_MARKS +#define TT_UCR_COMBINING_DIACRITICS_SYMB \ + TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB -#ifndef HAVE_LIMIT_ON_IDENTS - - /*************************************************************************/ - /* */ - /* Here some alias #defines in order to be clearer. */ - /* */ - /* These are not always #defined to stay within the 31~character limit, */ - /* which some compilers have. */ - /* */ - /* Credits go to Dave Hoo <dhoo@flash.net> for pointing out that modern */ - /* Borland compilers (read: from BC++ 3.1 on) can increase this limit. */ - /* If you get a warning with such a compiler, use the -i40 switch. */ - /* */ -#define TT_UCR_ARABIC_PRESENTATION_FORMS_A \ - TT_UCR_ARABIC_PRESENTATIONS_A -#define TT_UCR_ARABIC_PRESENTATION_FORMS_B \ - TT_UCR_ARABIC_PRESENTATIONS_B - -#define TT_UCR_COMBINING_DIACRITICAL_MARKS \ - TT_UCR_COMBINING_DIACRITICS -#define TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB \ - TT_UCR_COMBINING_DIACRITICS_SYMB - - -#endif /* !HAVE_LIMIT_ON_IDENTS */ - - FT_END_HEADER #endif /* TTNAMEID_H_ */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/tttables.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/tttables.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/tttables.h (working copy) @@ -5,7 +5,7 @@ /* Basic SFNT/TrueType tables definitions and interface */ /* (specification only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -45,8 +45,9 @@ /* TrueType specific table types and functions. */ /* */ /* <Description> */ - /* This section contains the definition of TrueType-specific tables */ - /* as well as some routines used to access and process them. */ + /* This section contains definitions of some basic tables specific to */ + /* TrueType and OpenType as well as some routines used to access and */ + /* process them. */ /* */ /* <Order> */ /* TT_Header */ @@ -76,8 +77,8 @@ /* TT_Header */ /* */ /* <Description> */ - /* A structure used to model a TrueType font header table. All */ - /* fields follow the TrueType specification. */ + /* A structure to model a TrueType font header table. All fields */ + /* follow the OpenType specification. */ /* */ typedef struct TT_Header_ { @@ -114,9 +115,9 @@ /* TT_HoriHeader */ /* */ /* <Description> */ - /* A structure used to model a TrueType horizontal header, the `hhea' */ + /* A structure to model a TrueType horizontal header, the `hhea' */ /* table, as well as the corresponding horizontal metrics table, */ - /* i.e., the `hmtx' table. */ + /* `hmtx'. */ /* */ /* <Fields> */ /* Version :: The table version. */ @@ -131,7 +132,7 @@ /* glyphs found in the font (maybe ASCII). */ /* */ /* You should use the `sTypoAscender' field */ - /* of the OS/2 table instead if you want */ + /* of the `OS/2' table instead if you want */ /* the correct one. */ /* */ /* Descender :: The font's descender, i.e., the distance */ @@ -145,7 +146,7 @@ /* glyphs found in the font (maybe ASCII). */ /* */ /* You should use the `sTypoDescender' */ - /* field of the OS/2 table instead if you */ + /* field of the `OS/2' table instead if you */ /* want the correct one. */ /* */ /* Line_Gap :: The font's line gap, i.e., the distance */ @@ -175,6 +176,8 @@ /* caret_Slope_Run :: The run coefficient of the cursor's */ /* slope. */ /* */ + /* caret_Offset :: The cursor's offset for slanted fonts. */ + /* */ /* Reserved :: 8~reserved bytes. */ /* */ /* metric_Data_Format :: Always~0. */ @@ -188,14 +191,11 @@ /* short_metrics :: A pointer into the `hmtx' table. */ /* */ /* <Note> */ - /* IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should */ - /* be identical except for the names of their fields, */ - /* which are different. */ + /* For an OpenType variation font, the values of the following fields */ + /* can change after a call to @FT_Set_Var_Design_Coordinates (and */ + /* friends) if the font contains an `MVAR' table: `caret_Slope_Rise', */ + /* `caret_Slope_Run', and `caret_Offset'. */ /* */ - /* This ensures that a single function in the `ttload' */ - /* module is able to read both the horizontal and vertical */ - /* headers. */ - /* */ typedef struct TT_HoriHeader_ { FT_Fixed Version; @@ -217,9 +217,9 @@ FT_Short metric_Data_Format; FT_UShort number_Of_HMetrics; - /* The following fields are not defined by the TrueType specification */ + /* The following fields are not defined by the OpenType specification */ /* but they are used to connect the metrics header to the relevant */ - /* `HMTX' table. */ + /* `hmtx' table. */ void* long_metrics; void* short_metrics; @@ -234,8 +234,8 @@ /* */ /* <Description> */ /* A structure used to model a TrueType vertical header, the `vhea' */ - /* table, as well as the corresponding vertical metrics table, i.e., */ - /* the `vmtx' table. */ + /* table, as well as the corresponding vertical metrics table, */ + /* `vmtx'. */ /* */ /* <Fields> */ /* Version :: The table version. */ @@ -251,8 +251,8 @@ /* ASCII). */ /* */ /* You should use the `sTypoAscender' */ - /* field of the OS/2 table instead if you */ - /* want the correct one. */ + /* field of the `OS/2' table instead if */ + /* you want the correct one. */ /* */ /* Descender :: The font's descender, i.e., the */ /* distance from the baseline to the */ @@ -266,8 +266,8 @@ /* ASCII). */ /* */ /* You should use the `sTypoDescender' */ - /* field of the OS/2 table instead if you */ - /* want the correct one. */ + /* field of the `OS/2' table instead if */ + /* you want the correct one. */ /* */ /* Line_Gap :: The font's line gap, i.e., the distance */ /* to add to the ascender and descender to */ @@ -297,31 +297,27 @@ /* slope. */ /* */ /* caret_Offset :: The cursor's offset for slanted fonts. */ - /* This value is `reserved' in vmtx */ - /* version 1.0. */ /* */ /* Reserved :: 8~reserved bytes. */ /* */ /* metric_Data_Format :: Always~0. */ /* */ - /* number_Of_HMetrics :: Number of VMetrics entries in the */ + /* number_Of_VMetrics :: Number of VMetrics entries in the */ /* `vmtx' table -- this value can be */ /* smaller than the total number of glyphs */ /* in the font. */ /* */ - /* long_metrics :: A pointer into the `vmtx' table. */ + /* long_metrics :: A pointer into the `vmtx' table. */ /* */ - /* short_metrics :: A pointer into the `vmtx' table. */ + /* short_metrics :: A pointer into the `vmtx' table. */ /* */ /* <Note> */ - /* IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should */ - /* be identical except for the names of their fields, */ - /* which are different. */ + /* For an OpenType variation font, the values of the following fields */ + /* can change after a call to @FT_Set_Var_Design_Coordinates (and */ + /* friends) if the font contains an `MVAR' table: `Ascender', */ + /* `Descender', `Line_Gap', `caret_Slope_Rise', `caret_Slope_Run', */ + /* and `caret_Offset'. */ /* */ - /* This ensures that a single function in the `ttload' */ - /* module is able to read both the horizontal and vertical */ - /* headers. */ - /* */ typedef struct TT_VertHeader_ { FT_Fixed Version; @@ -331,9 +327,9 @@ FT_UShort advance_Height_Max; /* advance height maximum */ - FT_Short min_Top_Side_Bearing; /* minimum left-sb or top-sb */ - FT_Short min_Bottom_Side_Bearing; /* minimum right-sb or bottom-sb */ - FT_Short yMax_Extent; /* xmax or ymax extents */ + FT_Short min_Top_Side_Bearing; /* minimum top-sb */ + FT_Short min_Bottom_Side_Bearing; /* minimum bottom-sb */ + FT_Short yMax_Extent; /* ymax extents */ FT_Short caret_Slope_Rise; FT_Short caret_Slope_Run; FT_Short caret_Offset; @@ -343,9 +339,9 @@ FT_Short metric_Data_Format; FT_UShort number_Of_VMetrics; - /* The following fields are not defined by the TrueType specification */ - /* but they're used to connect the metrics header to the relevant */ - /* `HMTX' or `VMTX' table. */ + /* The following fields are not defined by the OpenType specification */ + /* but they are used to connect the metrics header to the relevant */ + /* `vmtx' table. */ void* long_metrics; void* short_metrics; @@ -359,12 +355,28 @@ /* TT_OS2 */ /* */ /* <Description> */ - /* A structure used to model a TrueType OS/2 table. All fields */ - /* comply to the OpenType specification. */ + /* A structure to model a TrueType `OS/2' table. All fields comply */ + /* to the OpenType specification. */ /* */ - /* Note that we now support old Mac fonts that do not include an OS/2 */ - /* table. In this case, the `version' field is always set to 0xFFFF. */ + /* Note that we now support old Mac fonts that do not include an */ + /* `OS/2' table. In this case, the `version' field is always set to */ + /* 0xFFFF. */ /* */ + /* <Note> */ + /* For an OpenType variation font, the values of the following fields */ + /* can change after a call to @FT_Set_Var_Design_Coordinates (and */ + /* friends) if the font contains an `MVAR' table: `sCapHeight', */ + /* `sTypoAscender', `sTypoDescender', `sTypoLineGap', `sxHeight', */ + /* `usWinAscent', `usWinDescent', `yStrikeoutPosition', */ + /* `yStrikeoutSize', `ySubscriptXOffset', `ySubScriptXSize', */ + /* `ySubscriptYOffset', `ySubscriptYSize', `ySuperscriptXOffset', */ + /* `ySuperscriptXSize', `ySuperscriptYOffset', and */ + /* `ySuperscriptYSize'. */ + /* */ + /* Possible values for bits in the `ulUnicodeRangeX' fields are given */ + /* by the @TT_UCR_XXX macros. */ + /* */ + typedef struct TT_OS2_ { FT_UShort version; /* 0x0001 - more or 0xFFFF */ @@ -429,11 +441,17 @@ /* TT_Postscript */ /* */ /* <Description> */ - /* A structure used to model a TrueType PostScript table. All fields */ - /* comply to the TrueType specification. This structure does not */ - /* reference the PostScript glyph names, which can be nevertheless */ - /* accessed with the `ttpost' module. */ + /* A structure to model a TrueType `post' table. All fields comply */ + /* to the OpenType specification. This structure does not reference */ + /* a font's PostScript glyph names; use @FT_Get_Glyph_Name to */ + /* retrieve them. */ /* */ + /* <Note> */ + /* For an OpenType variation font, the values of the following fields */ + /* can change after a call to @FT_Set_Var_Design_Coordinates (and */ + /* friends) if the font contains an `MVAR' table: `underlinePosition' */ + /* and `underlineThickness'. */ + /* */ typedef struct TT_Postscript_ { FT_Fixed FormatType; @@ -446,8 +464,8 @@ FT_ULong minMemType1; FT_ULong maxMemType1; - /* Glyph names follow in the file, but we don't */ - /* load them by default. See the ttpost.c file. */ + /* Glyph names follow in the `post' table, but we don't */ + /* load them by default. */ } TT_Postscript; @@ -458,8 +476,8 @@ /* TT_PCLT */ /* */ /* <Description> */ - /* A structure used to model a TrueType PCLT table. All fields */ - /* comply to the TrueType specification. */ + /* A structure to model a TrueType `PCLT' table. All fields comply */ + /* to the OpenType specification. */ /* */ typedef struct TT_PCLT_ { @@ -488,9 +506,9 @@ /* TT_MaxProfile */ /* */ /* <Description> */ - /* The maximum profile is a table containing many max values, which */ - /* can be used to pre-allocate arrays. This ensures that no memory */ - /* allocation occurs during a glyph load. */ + /* The maximum profile (`maxp') table contains many max values, which */ + /* can be used to pre-allocate arrays for speeding up glyph loading */ + /* and hinting. */ /* */ /* <Fields> */ /* version :: The version number. */ @@ -500,21 +518,19 @@ /* */ /* maxPoints :: The maximum number of points in a */ /* non-composite TrueType glyph. See also */ - /* the structure element */ /* `maxCompositePoints'. */ /* */ /* maxContours :: The maximum number of contours in a */ /* non-composite TrueType glyph. See also */ - /* the structure element */ /* `maxCompositeContours'. */ /* */ /* maxCompositePoints :: The maximum number of points in a */ - /* composite TrueType glyph. See also the */ - /* structure element `maxPoints'. */ + /* composite TrueType glyph. See also */ + /* `maxPoints'. */ /* */ /* maxCompositeContours :: The maximum number of contours in a */ - /* composite TrueType glyph. See also the */ - /* structure element `maxContours'. */ + /* composite TrueType glyph. See also */ + /* `maxContours'. */ /* */ /* maxZones :: The maximum number of zones used for */ /* glyph hinting. */ @@ -575,8 +591,9 @@ /* FT_Sfnt_Tag */ /* */ /* <Description> */ - /* An enumeration used to specify the index of an SFNT table. */ - /* Used in the @FT_Get_Sfnt_Table API function. */ + /* An enumeration to specify indices of SFNT tables loaded and parsed */ + /* by FreeType during initialization of an SFNT font. Used in the */ + /* @FT_Get_Sfnt_Table API function. */ /* */ /* <Values> */ /* FT_SFNT_HEAD :: To access the font's @TT_Header structure. */ @@ -624,7 +641,7 @@ /* FT_Get_Sfnt_Table */ /* */ /* <Description> */ - /* Return a pointer to a given SFNT table within a face. */ + /* Return a pointer to a given SFNT table stored within a face. */ /* */ /* <Input> */ /* face :: A handle to the source. */ @@ -632,7 +649,7 @@ /* tag :: The index of the SFNT table. */ /* */ /* <Return> */ - /* A type-less pointer to the table. This will be~0 in case of */ + /* A type-less pointer to the table. This will be NULL in case of */ /* error, or if the corresponding table was not found *OR* loaded */ /* from the file. */ /* */ @@ -661,70 +678,70 @@ FT_Sfnt_Tag tag ); - /************************************************************************** - * - * @function: - * FT_Load_Sfnt_Table - * - * @description: - * Load any font table into client memory. - * - * @input: - * face :: - * A handle to the source face. - * - * tag :: - * The four-byte tag of the table to load. Use the value~0 if you want - * to access the whole font file. Otherwise, you can use one of the - * definitions found in the @FT_TRUETYPE_TAGS_H file, or forge a new - * one with @FT_MAKE_TAG. - * - * offset :: - * The starting offset in the table (or file if tag == 0). - * - * @output: - * buffer :: - * The target buffer address. The client must ensure that the memory - * array is big enough to hold the data. - * - * @inout: - * length :: - * If the `length' parameter is NULL, then try to load the whole table. - * Return an error code if it fails. - * - * Else, if `*length' is~0, exit immediately while returning the - * table's (or file) full size in it. - * - * Else the number of bytes to read from the table or file, from the - * starting offset. - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * If you need to determine the table's length you should first call this - * function with `*length' set to~0, as in the following example: - * - * { - * FT_ULong length = 0; - * - * - * error = FT_Load_Sfnt_Table( face, tag, 0, NULL, &length ); - * if ( error ) { ... table does not exist ... } - * - * buffer = malloc( length ); - * if ( buffer == NULL ) { ... not enough memory ... } - * - * error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &length ); - * if ( error ) { ... could not load table ... } - * } - * - * Note that structures like @TT_Header or @TT_OS2 can't be used with - * this function; they are limited to @FT_Get_Sfnt_Table. Reason is that - * those structures depend on the processor architecture, with varying - * size (e.g. 32bit vs. 64bit) or order (big endian vs. little endian). - * - */ + /************************************************************************** + * + * @function: + * FT_Load_Sfnt_Table + * + * @description: + * Load any SFNT font table into client memory. + * + * @input: + * face :: + * A handle to the source face. + * + * tag :: + * The four-byte tag of the table to load. Use value~0 if you want + * to access the whole font file. Otherwise, you can use one of the + * definitions found in the @FT_TRUETYPE_TAGS_H file, or forge a new + * one with @FT_MAKE_TAG. + * + * offset :: + * The starting offset in the table (or file if tag~==~0). + * + * @output: + * buffer :: + * The target buffer address. The client must ensure that the memory + * array is big enough to hold the data. + * + * @inout: + * length :: + * If the `length' parameter is NULL, try to load the whole table. + * Return an error code if it fails. + * + * Else, if `*length' is~0, exit immediately while returning the + * table's (or file) full size in it. + * + * Else the number of bytes to read from the table or file, from the + * starting offset. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * If you need to determine the table's length you should first call this + * function with `*length' set to~0, as in the following example: + * + * { + * FT_ULong length = 0; + * + * + * error = FT_Load_Sfnt_Table( face, tag, 0, NULL, &length ); + * if ( error ) { ... table does not exist ... } + * + * buffer = malloc( length ); + * if ( buffer == NULL ) { ... not enough memory ... } + * + * error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &length ); + * if ( error ) { ... could not load table ... } + * } + * + * Note that structures like @TT_Header or @TT_OS2 can't be used with + * this function; they are limited to @FT_Get_Sfnt_Table. Reason is that + * those structures depend on the processor architecture, with varying + * size (e.g. 32bit vs. 64bit) or order (big endian vs. little endian). + * + */ FT_EXPORT( FT_Error ) FT_Load_Sfnt_Table( FT_Face face, FT_ULong tag, @@ -733,41 +750,41 @@ FT_ULong* length ); - /************************************************************************** - * - * @function: - * FT_Sfnt_Table_Info - * - * @description: - * Return information on an SFNT table. - * - * @input: - * face :: - * A handle to the source face. - * - * table_index :: - * The index of an SFNT table. The function returns - * FT_Err_Table_Missing for an invalid value. - * - * @inout: - * tag :: - * The name tag of the SFNT table. If the value is NULL, `table_index' - * is ignored, and `length' returns the number of SFNT tables in the - * font. - * - * @output: - * length :: - * The length of the SFNT table (or the number of SFNT tables, depending - * on `tag'). - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * While parsing fonts, FreeType handles SFNT tables with length zero as - * missing. - * - */ + /************************************************************************** + * + * @function: + * FT_Sfnt_Table_Info + * + * @description: + * Return information on an SFNT table. + * + * @input: + * face :: + * A handle to the source face. + * + * table_index :: + * The index of an SFNT table. The function returns + * FT_Err_Table_Missing for an invalid value. + * + * @inout: + * tag :: + * The name tag of the SFNT table. If the value is NULL, `table_index' + * is ignored, and `length' returns the number of SFNT tables in the + * font. + * + * @output: + * length :: + * The length of the SFNT table (or the number of SFNT tables, depending + * on `tag'). + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * While parsing fonts, FreeType handles SFNT tables with length zero as + * missing. + * + */ FT_EXPORT( FT_Error ) FT_Sfnt_Table_Info( FT_Face face, FT_UInt table_index, @@ -781,8 +798,8 @@ /* FT_Get_CMap_Language_ID */ /* */ /* <Description> */ - /* Return TrueType/sfnt specific cmap language ID. Definitions of */ - /* language ID values are in `ttnameid.h'. */ + /* Return cmap language ID as specified in the OpenType standard. */ + /* Definitions of language ID values are in file @FT_TRUETYPE_IDS_H. */ /* */ /* <Input> */ /* charmap :: */ @@ -789,8 +806,8 @@ /* The target charmap. */ /* */ /* <Return> */ - /* The language ID of `charmap'. If `charmap' doesn't belong to a */ - /* TrueType/sfnt face, just return~0 as the default value. */ + /* The language ID of `charmap'. If `charmap' doesn't belong to an */ + /* SFNT face, just return~0 as the default value. */ /* */ /* For a format~14 cmap (to access Unicode IVS), the return value is */ /* 0xFFFFFFFF. */ @@ -805,7 +822,7 @@ /* FT_Get_CMap_Format */ /* */ /* <Description> */ - /* Return TrueType/sfnt specific cmap format. */ + /* Return the format of an SFNT `cmap' table. */ /* */ /* <Input> */ /* charmap :: */ @@ -812,8 +829,8 @@ /* The target charmap. */ /* */ /* <Return> */ - /* The format of `charmap'. If `charmap' doesn't belong to a */ - /* TrueType/sfnt face, return -1. */ + /* The format of `charmap'. If `charmap' doesn't belong to an SFNT */ + /* face, return -1. */ /* */ FT_EXPORT( FT_Long ) FT_Get_CMap_Format( FT_CharMap charmap ); Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/tttags.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/tttags.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/tttags.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Tags for TrueType and OpenType tables (specification only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/include/freetype/ttunpat.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/freetype/ttunpat.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/freetype/ttunpat.h (working copy) @@ -3,9 +3,9 @@ /* ttunpat.h */ /* */ /* Definitions for the unpatented TrueType hinting system. */ -/* Obsolete, retained for backwards compatibility. */ +/* Obsolete, retained for backward compatibility. */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* Written by Graham Asher <graham.asher@btinternet.com> */ Index: reactos/sdk/lib/3rdparty/freetype/include/ft2build.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/include/ft2build.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/include/ft2build.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType 2 build and setup macros. */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/modules.cfg =================================================================== --- reactos/sdk/lib/3rdparty/freetype/modules.cfg (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/modules.cfg (working copy) @@ -1,6 +1,6 @@ # modules.cfg # -# Copyright 2005-2016 by +# Copyright 2005-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -238,7 +238,7 @@ # See include/freetype/ftstroke.h for the API. BASE_EXTENSIONS += ftstroke.c -# Support for synthetic embolding and slanting of fonts. Needs ftbitmap.c. +# Support for synthetic emboldening and slanting of fonts. Needs ftbitmap.c. # # See include/freetype/ftsynth.h for the API. BASE_EXTENSIONS += ftsynth.c Index: reactos/sdk/lib/3rdparty/freetype/README =================================================================== --- reactos/sdk/lib/3rdparty/freetype/README (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/README (working copy) @@ -1,5 +1,5 @@ - FreeType 2.7.1 - ============== + FreeType 2.8 + ============ Homepage: http://www.freetype.org @@ -24,9 +24,9 @@ and download one of the following files. - freetype-doc-2.7.1.tar.bz2 - freetype-doc-2.7.1.tar.gz - ftdoc271.zip + freetype-doc-2.8.tar.bz2 + freetype-doc-2.8.tar.gz + ftdoc28.zip To view the documentation online, go to @@ -71,7 +71,7 @@ ---------------------------------------------------------------------- -Copyright 2006-2016 by +Copyright 2006-2017 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/afangles.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/afangles.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/afangles.c (working copy) @@ -5,7 +5,7 @@ /* Routines used to compute vector angles with limited accuracy */ /* and very high speed. It also contains sorting routines (body). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/afblue.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/afblue.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/afblue.c (working copy) @@ -7,7 +7,7 @@ /* */ /* Auto-fitter data for blue strings (body). */ /* */ -/* Copyright 2013-2016 by */ +/* Copyright 2013-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -26,6 +26,14 @@ af_blue_strings[] = { /* */ + '\xF0', '\x9E', '\xA4', '\x8C', ' ', '\xF0', '\x9E', '\xA4', '\x85', ' ', '\xF0', '\x9E', '\xA4', '\x88', ' ', '\xF0', '\x9E', '\xA4', '\x8F', ' ', '\xF0', '\x9E', '\xA4', '\x94', ' ', '\xF0', '\x9E', '\xA4', '\x9A', /* 𞤌 𞤅 𞤈 𞤏 𞤔 𞤚 */ + '\0', + '\xF0', '\x9E', '\xA4', '\x82', ' ', '\xF0', '\x9E', '\xA4', '\x96', /* 𞤂 𞤖 */ + '\0', + '\xF0', '\x9E', '\xA4', '\xAC', ' ', '\xF0', '\x9E', '\xA4', '\xAE', ' ', '\xF0', '\x9E', '\xA4', '\xBB', ' ', '\xF0', '\x9E', '\xA4', '\xBC', ' ', '\xF0', '\x9E', '\xA4', '\xBE', /* 𞤬 𞤮 𞤻 𞤼 𞤾 */ + '\0', + '\xF0', '\x9E', '\xA4', '\xA4', ' ', '\xF0', '\x9E', '\xA4', '\xA8', ' ', '\xF0', '\x9E', '\xA4', '\xA9', ' ', '\xF0', '\x9E', '\xA4', '\xAD', ' ', '\xF0', '\x9E', '\xA4', '\xB4', ' ', '\xF0', '\x9E', '\xA4', '\xB8', ' ', '\xF0', '\x9E', '\xA4', '\xBA', ' ', '\xF0', '\x9E', '\xA5', '\x80', /* 𞤤 𞤨 𞤩 𞤭 𞤴 𞤸 𞤺 𞥀 */ + '\0', '\xD8', '\xA7', ' ', '\xD8', '\xA5', ' ', '\xD9', '\x84', ' ', '\xD9', '\x83', ' ', '\xD8', '\xB7', ' ', '\xD8', '\xB8', /* ا إ ل ك ط ظ */ '\0', '\xD8', '\xAA', ' ', '\xD8', '\xAB', ' ', '\xD8', '\xB7', ' ', '\xD8', '\xB8', ' ', '\xD9', '\x83', /* ت ث ط ظ ك */ @@ -44,6 +52,14 @@ '\0', '\xD5', '\xA2', ' ', '\xD5', '\xA8', ' ', '\xD5', '\xAB', ' ', '\xD5', '\xAC', ' ', '\xD5', '\xB2', ' ', '\xD5', '\xBA', ' ', '\xD6', '\x83', ' ', '\xD6', '\x81', /* բ ը ի լ ղ պ փ ց */ '\0', + '\xF0', '\x90', '\xAC', '\x80', ' ', '\xF0', '\x90', '\xAC', '\x81', ' ', '\xF0', '\x90', '\xAC', '\x90', ' ', '\xF0', '\x90', '\xAC', '\x9B', /* 𐬀 𐬁 𐬐 𐬛 */ + '\0', + '\xF0', '\x90', '\xAC', '\x80', ' ', '\xF0', '\x90', '\xAC', '\x81', /* 𐬀 𐬁 */ + '\0', + '\xEA', '\x9A', '\xA7', ' ', '\xEA', '\x9A', '\xA8', ' ', '\xEA', '\x9B', '\x9B', ' ', '\xEA', '\x9B', '\x89', ' ', '\xEA', '\x9B', '\x81', ' ', '\xEA', '\x9B', '\x88', ' ', '\xEA', '\x9B', '\xAB', ' ', '\xEA', '\x9B', '\xAF', /* ꚧ ꚨ ꛛ ꛉ ꛁ ꛈ ꛫ ꛯ */ + '\0', + '\xEA', '\x9A', '\xAD', ' ', '\xEA', '\x9A', '\xB3', ' ', '\xEA', '\x9A', '\xB6', ' ', '\xEA', '\x9B', '\xAC', ' ', '\xEA', '\x9A', '\xA2', ' ', '\xEA', '\x9A', '\xBD', ' ', '\xEA', '\x9B', '\xAF', ' ', '\xEA', '\x9B', '\xB2', /* ꚭ ꚳ ꚶ ꛬ ꚢ ꚽ ꛯ ꛲ */ + '\0', '\xE0', '\xA6', '\x85', ' ', '\xE0', '\xA6', '\xA1', ' ', '\xE0', '\xA6', '\xA4', ' ', '\xE0', '\xA6', '\xA8', ' ', '\xE0', '\xA6', '\xAC', ' ', '\xE0', '\xA6', '\xAD', ' ', '\xE0', '\xA6', '\xB2', ' ', '\xE0', '\xA6', '\x95', /* অ ড ত ন ব ভ ল ক */ '\0', '\xE0', '\xA6', '\x87', ' ', '\xE0', '\xA6', '\x9F', ' ', '\xE0', '\xA6', '\xA0', ' ', '\xE0', '\xA6', '\xBF', ' ', '\xE0', '\xA7', '\x80', ' ', '\xE0', '\xA7', '\x88', ' ', '\xE0', '\xA7', '\x97', /* ই ট ঠ ি ী ৈ ৗ */ @@ -50,6 +66,36 @@ '\0', '\xE0', '\xA6', '\x93', ' ', '\xE0', '\xA6', '\x8F', ' ', '\xE0', '\xA6', '\xA1', ' ', '\xE0', '\xA6', '\xA4', ' ', '\xE0', '\xA6', '\xA8', ' ', '\xE0', '\xA6', '\xAC', ' ', '\xE0', '\xA6', '\xB2', ' ', '\xE0', '\xA6', '\x95', /* ও এ ড ত ন ব ল ক */ '\0', + '\xE1', '\x9D', '\x90', ' ', '\xE1', '\x9D', '\x88', /* ᝐ ᝈ */ + '\0', + '\xE1', '\x9D', '\x85', ' ', '\xE1', '\x9D', '\x8A', ' ', '\xE1', '\x9D', '\x8E', /* ᝅ ᝊ ᝎ */ + '\0', + '\xE1', '\x9D', '\x82', ' ', '\xE1', '\x9D', '\x83', ' ', '\xE1', '\x9D', '\x89', ' ', '\xE1', '\x9D', '\x8C', /* ᝂ ᝃ ᝉ ᝌ */ + '\0', + '\xE1', '\x9D', '\x80', ' ', '\xE1', '\x9D', '\x83', ' ', '\xE1', '\x9D', '\x86', ' ', '\xE1', '\x9D', '\x89', ' ', '\xE1', '\x9D', '\x8B', ' ', '\xE1', '\x9D', '\x8F', ' ', '\xE1', '\x9D', '\x91', /* ᝀ ᝃ ᝆ ᝉ ᝋ ᝏ ᝑ */ + '\0', + '\xE1', '\x97', '\x9C', ' ', '\xE1', '\x96', '\xB4', ' ', '\xE1', '\x90', '\x81', ' ', '\xE1', '\x92', '\xA3', ' ', '\xE1', '\x91', '\xAB', ' ', '\xE1', '\x91', '\x8E', ' ', '\xE1', '\x94', '\x91', ' ', '\xE1', '\x97', '\xB0', /* ᗜ ᖴ ᐁ ᒣ ᑫ ᑎ ᔑ ᗰ */ + '\0', + '\xE1', '\x97', '\xB6', ' ', '\xE1', '\x96', '\xB5', ' ', '\xE1', '\x92', '\xA7', ' ', '\xE1', '\x90', '\x83', ' ', '\xE1', '\x91', '\x8C', ' ', '\xE1', '\x92', '\x8D', ' ', '\xE1', '\x94', '\x91', ' ', '\xE1', '\x97', '\xA2', /* ᗶ ᖵ ᒧ ᐃ ᑌ ᒍ ᔑ ᗢ */ + '\0', + '\xE1', '\x93', '\x93', ' ', '\xE1', '\x93', '\x95', ' ', '\xE1', '\x93', '\x80', ' ', '\xE1', '\x93', '\x82', ' ', '\xE1', '\x93', '\x84', ' ', '\xE1', '\x95', '\x84', ' ', '\xE1', '\x95', '\x86', ' ', '\xE1', '\x98', '\xA3', /* ᓓ ᓕ ᓀ ᓂ ᓄ ᕄ ᕆ ᘣ */ + '\0', + '\xE1', '\x95', '\x83', ' ', '\xE1', '\x93', '\x82', ' ', '\xE1', '\x93', '\x80', ' ', '\xE1', '\x95', '\x82', ' ', '\xE1', '\x93', '\x97', ' ', '\xE1', '\x93', '\x9A', ' ', '\xE1', '\x95', '\x86', ' ', '\xE1', '\x98', '\xA3', /* ᕃ ᓂ ᓀ ᕂ ᓗ ᓚ ᕆ ᘣ */ + '\0', + '\xE1', '\x90', '\xAA', ' ', '\xE1', '\x99', '\x86', ' ', '\xE1', '\xA3', '\x98', ' ', '\xE1', '\x90', '\xA2', ' ', '\xE1', '\x92', '\xBE', ' ', '\xE1', '\xA3', '\x97', ' ', '\xE1', '\x94', '\x86', /* ᐪ ᙆ ᣘ ᐢ ᒾ ᣗ ᔆ */ + '\0', + '\xE1', '\x99', '\x86', ' ', '\xE1', '\x97', '\xAE', ' ', '\xE1', '\x92', '\xBB', ' ', '\xE1', '\x90', '\x9E', ' ', '\xE1', '\x94', '\x86', ' ', '\xE1', '\x92', '\xA1', ' ', '\xE1', '\x92', '\xA2', ' ', '\xE1', '\x93', '\x91', /* ᙆ ᗮ ᒻ ᐞ ᔆ ᒡ ᒢ ᓑ */ + '\0', + '\xF0', '\x90', '\x8A', '\xA7', ' ', '\xF0', '\x90', '\x8A', '\xAB', ' ', '\xF0', '\x90', '\x8A', '\xAC', ' ', '\xF0', '\x90', '\x8A', '\xAD', ' ', '\xF0', '\x90', '\x8A', '\xB1', ' ', '\xF0', '\x90', '\x8A', '\xBA', ' ', '\xF0', '\x90', '\x8A', '\xBC', ' ', '\xF0', '\x90', '\x8A', '\xBF', /* 𐊧 𐊫 𐊬 𐊭 𐊱 𐊺 𐊼 𐊿 */ + '\0', + '\xF0', '\x90', '\x8A', '\xA3', ' ', '\xF0', '\x90', '\x8A', '\xA7', ' ', '\xF0', '\x90', '\x8A', '\xB7', ' ', '\xF0', '\x90', '\x8B', '\x80', ' ', '\xF0', '\x90', '\x8A', '\xAB', ' ', '\xF0', '\x90', '\x8A', '\xB8', ' ', '\xF0', '\x90', '\x8B', '\x89', /* 𐊣 𐊧 𐊷 𐋀 𐊫 𐊸 𐋉 */ + '\0', + '\xF0', '\x91', '\x84', '\x83', ' ', '\xF0', '\x91', '\x84', '\x85', ' ', '\xF0', '\x91', '\x84', '\x89', ' ', '\xF0', '\x91', '\x84', '\x99', ' ', '\xF0', '\x91', '\x84', '\x97', /* 𑄃 𑄅 𑄉 𑄙 𑄗 */ + '\0', + '\xF0', '\x91', '\x84', '\x85', ' ', '\xF0', '\x91', '\x84', '\x9B', ' ', '\xF0', '\x91', '\x84', '\x9D', ' ', '\xF0', '\x91', '\x84', '\x97', ' ', '\xF0', '\x91', '\x84', '\x93', /* 𑄅 𑄛 𑄝 𑄗 𑄓 */ + '\0', + '\xF0', '\x91', '\x84', '\x96', '\xF0', '\x91', '\x84', '\xB3', '\xF0', '\x91', '\x84', '\xA2', ' ', '\xF0', '\x91', '\x84', '\x98', '\xF0', '\x91', '\x84', '\xB3', '\xF0', '\x91', '\x84', '\xA2', ' ', '\xF0', '\x91', '\x84', '\x99', '\xF0', '\x91', '\x84', '\xB3', '\xF0', '\x91', '\x84', '\xA2', ' ', '\xF0', '\x91', '\x84', '\xA4', '\xF0', '\x91', '\x84', '\xB3', '\xF0', '\x91', '\x84', '\xA2', ' ', '\xF0', '\x91', '\x84', '\xA5', '\xF0', '\x91', '\x84', '\xB3', '\xF0', '\x91', '\x84', '\xA2', /* 𑄖𑄳𑄢 𑄘𑄳𑄢 𑄙𑄳𑄢 𑄤𑄳𑄢 𑄥𑄳𑄢 */ + '\0', '\xE1', '\x8F', '\x86', ' ', '\xE1', '\x8E', '\xBB', ' ', '\xE1', '\x8E', '\xAC', ' ', '\xE1', '\x8F', '\x83', ' ', '\xE1', '\x8E', '\xA4', ' ', '\xE1', '\x8F', '\xA3', ' ', '\xE1', '\x8E', '\xA6', ' ', '\xE1', '\x8F', '\x95', /* Ꮖ Ꮋ Ꭼ Ꮓ Ꭴ Ꮳ Ꭶ Ꮥ */ '\0', '\xEA', '\xAE', '\x92', ' ', '\xEA', '\xAE', '\xA4', ' ', '\xEA', '\xAE', '\xB6', ' ', '\xEA', '\xAD', '\xB4', ' ', '\xEA', '\xAD', '\xBE', ' ', '\xEA', '\xAE', '\x97', ' ', '\xEA', '\xAE', '\x9D', ' ', '\xEA', '\xAE', '\xBF', /* ꮒ ꮤ ꮶ ꭴ ꭾ ꮗ ꮝ ꮿ */ @@ -58,6 +104,20 @@ '\0', '\xE1', '\x8F', '\xB8', ' ', '\xEA', '\xAE', '\x90', ' ', '\xEA', '\xAD', '\xB9', ' ', '\xEA', '\xAD', '\xBB', /* ᏸ ꮐ ꭹ ꭻ */ '\0', + '\xE2', '\xB2', '\x8C', ' ', '\xE2', '\xB2', '\x8E', ' ', '\xE2', '\xB2', '\xA0', ' ', '\xE2', '\xB3', '\x9E', ' ', '\xE2', '\xB2', '\x9E', ' ', '\xE2', '\xB2', '\x90', ' ', '\xE2', '\xB2', '\xA4', ' ', '\xE2', '\xB3', '\x8A', /* Ⲍ Ⲏ Ⲡ Ⳟ Ⲟ Ⲑ Ⲥ Ⳋ */ + '\0', + '\xE2', '\xB3', '\x90', ' ', '\xE2', '\xB3', '\x98', ' ', '\xE2', '\xB3', '\x9E', ' ', '\xE2', '\xB2', '\x8E', ' ', '\xE2', '\xB2', '\x9E', ' ', '\xE2', '\xB2', '\x90', ' ', '\xE2', '\xB3', '\x9C', ' ', '\xE2', '\xB2', '\xB0', /* Ⳑ Ⳙ Ⳟ Ⲏ Ⲟ Ⲑ Ⳝ Ⲱ */ + '\0', + '\xE2', '\xB2', '\x8D', ' ', '\xE2', '\xB2', '\x8F', ' ', '\xE2', '\xB2', '\xA1', ' ', '\xE2', '\xB3', '\x9F', ' ', '\xE2', '\xB2', '\x9F', ' ', '\xE2', '\xB2', '\x91', ' ', '\xE2', '\xB2', '\xA5', ' ', '\xE2', '\xB3', '\x8B', /* ⲍ ⲏ ⲡ ⳟ ⲟ ⲑ ⲥ ⳋ */ + '\0', + '\xE2', '\xB3', '\x91', ' ', '\xE2', '\xB3', '\x99', ' ', '\xE2', '\xB3', '\x9F', ' ', '\xE2', '\xB2', '\x8F', ' ', '\xE2', '\xB2', '\x9F', ' ', '\xE2', '\xB2', '\x91', ' ', '\xE2', '\xB3', '\x9D', ' ', '\xE2', '\xB3', '\x92', /* ⳑ ⳙ ⳟ ⲏ ⲟ ⲑ ⳝ Ⳓ */ + '\0', + '\xF0', '\x90', '\xA0', '\x8D', ' ', '\xF0', '\x90', '\xA0', '\x99', ' ', '\xF0', '\x90', '\xA0', '\xB3', ' ', '\xF0', '\x90', '\xA0', '\xB1', ' ', '\xF0', '\x90', '\xA0', '\x85', ' ', '\xF0', '\x90', '\xA0', '\x93', ' ', '\xF0', '\x90', '\xA0', '\xA3', ' ', '\xF0', '\x90', '\xA0', '\xA6', /* 𐠍 𐠙 𐠳 𐠱 𐠅 𐠓 𐠣 𐠦 */ + '\0', + '\xF0', '\x90', '\xA0', '\x83', ' ', '\xF0', '\x90', '\xA0', '\x8A', ' ', '\xF0', '\x90', '\xA0', '\x9B', ' ', '\xF0', '\x90', '\xA0', '\xA3', ' ', '\xF0', '\x90', '\xA0', '\xB3', ' ', '\xF0', '\x90', '\xA0', '\xB5', ' ', '\xF0', '\x90', '\xA0', '\x90', /* 𐠃 𐠊 𐠛 𐠣 𐠳 𐠵 𐠐 */ + '\0', + '\xF0', '\x90', '\xA0', '\x88', ' ', '\xF0', '\x90', '\xA0', '\x8F', ' ', '\xF0', '\x90', '\xA0', '\x96', /* 𐠈 𐠏 𐠖 */ + '\0', '\xD0', '\x91', ' ', '\xD0', '\x92', ' ', '\xD0', '\x95', ' ', '\xD0', '\x9F', ' ', '\xD0', '\x97', ' ', '\xD0', '\x9E', ' ', '\xD0', '\xA1', ' ', '\xD0', '\xAD', /* Б В Е П З О С Э */ '\0', '\xD0', '\x91', ' ', '\xD0', '\x92', ' ', '\xD0', '\x95', ' ', '\xD0', '\xA8', ' ', '\xD0', '\x97', ' ', '\xD0', '\x9E', ' ', '\xD0', '\xA1', ' ', '\xD0', '\xAD', /* Б В Е Ш З О С Э */ @@ -66,6 +126,14 @@ '\0', '\xD1', '\x80', ' ', '\xD1', '\x83', ' ', '\xD1', '\x84', /* р у ф */ '\0', + '\xF0', '\x90', '\x90', '\x82', ' ', '\xF0', '\x90', '\x90', '\x84', ' ', '\xF0', '\x90', '\x90', '\x8B', ' ', '\xF0', '\x90', '\x90', '\x97', ' ', '\xF0', '\x90', '\x90', '\x91', /* 𐐂 𐐄 𐐋 𐐗 𐐑 */ + '\0', + '\xF0', '\x90', '\x90', '\x80', ' ', '\xF0', '\x90', '\x90', '\x82', ' ', '\xF0', '\x90', '\x90', '\x84', ' ', '\xF0', '\x90', '\x90', '\x97', ' ', '\xF0', '\x90', '\x90', '\x9B', /* 𐐀 𐐂 𐐄 𐐗 𐐛 */ + '\0', + '\xF0', '\x90', '\x90', '\xAA', ' ', '\xF0', '\x90', '\x90', '\xAC', ' ', '\xF0', '\x90', '\x90', '\xB3', ' ', '\xF0', '\x90', '\x90', '\xBF', ' ', '\xF0', '\x90', '\x90', '\xB9', /* 𐐪 𐐬 𐐳 𐐿 𐐹 */ + '\0', + '\xF0', '\x90', '\x90', '\xA8', ' ', '\xF0', '\x90', '\x90', '\xAA', ' ', '\xF0', '\x90', '\x90', '\xAC', ' ', '\xF0', '\x90', '\x90', '\xBF', ' ', '\xF0', '\x90', '\x91', '\x83', /* 𐐨 𐐪 𐐬 𐐿 𐑃 */ + '\0', '\xE0', '\xA4', '\x95', ' ', '\xE0', '\xA4', '\xAE', ' ', '\xE0', '\xA4', '\x85', ' ', '\xE0', '\xA4', '\x86', ' ', '\xE0', '\xA4', '\xA5', ' ', '\xE0', '\xA4', '\xA7', ' ', '\xE0', '\xA4', '\xAD', ' ', '\xE0', '\xA4', '\xB6', /* क म अ आ थ ध भ श */ '\0', '\xE0', '\xA4', '\x88', ' ', '\xE0', '\xA4', '\x90', ' ', '\xE0', '\xA4', '\x93', ' ', '\xE0', '\xA4', '\x94', ' ', '\xE0', '\xA4', '\xBF', ' ', '\xE0', '\xA5', '\x80', ' ', '\xE0', '\xA5', '\x8B', ' ', '\xE0', '\xA5', '\x8C', /* ई ऐ ओ औ ि ी ो ौ */ @@ -98,6 +166,18 @@ '\0', '\xE2', '\xB4', '\x84', ' ', '\xE2', '\xB4', '\x85', ' ', '\xE2', '\xB4', '\x94', ' ', '\xE2', '\xB4', '\x95', ' ', '\xE2', '\xB4', '\x81', ' ', '\xE2', '\xB4', '\x82', ' ', '\xE2', '\xB4', '\x98', ' ', '\xE2', '\xB4', '\x9D', /* ⴄ ⴅ ⴔ ⴕ ⴁ ⴂ ⴘ ⴝ */ '\0', + '\xE2', '\xB0', '\x85', ' ', '\xE2', '\xB0', '\x94', ' ', '\xE2', '\xB0', '\xAA', ' ', '\xE2', '\xB0', '\x84', ' ', '\xE2', '\xB0', '\x82', ' ', '\xE2', '\xB0', '\x8A', ' ', '\xE2', '\xB0', '\xAB', ' ', '\xE2', '\xB0', '\x8B', /* Ⰵ Ⱄ Ⱚ Ⰴ Ⰲ Ⰺ Ⱛ Ⰻ */ + '\0', + '\xE2', '\xB0', '\x85', ' ', '\xE2', '\xB0', '\x84', ' ', '\xE2', '\xB0', '\x82', ' ', '\xE2', '\xB0', '\xAA', ' ', '\xE2', '\xB0', '\x9E', ' ', '\xE2', '\xB0', '\xA1', ' ', '\xE2', '\xB0', '\x8A', ' ', '\xE2', '\xB0', '\x94', /* Ⰵ Ⰴ Ⰲ Ⱚ Ⱎ Ⱑ Ⰺ Ⱄ */ + '\0', + '\xE2', '\xB0', '\xB5', ' ', '\xE2', '\xB1', '\x84', ' ', '\xE2', '\xB1', '\x9A', ' ', '\xE2', '\xB0', '\xB4', ' ', '\xE2', '\xB0', '\xB2', ' ', '\xE2', '\xB0', '\xBA', ' ', '\xE2', '\xB1', '\x9B', ' ', '\xE2', '\xB0', '\xBB', /* ⰵ ⱄ ⱚ ⰴ ⰲ ⰺ ⱛ ⰻ */ + '\0', + '\xE2', '\xB0', '\xB5', ' ', '\xE2', '\xB0', '\xB4', ' ', '\xE2', '\xB0', '\xB2', ' ', '\xE2', '\xB1', '\x9A', ' ', '\xE2', '\xB1', '\x8E', ' ', '\xE2', '\xB1', '\x91', ' ', '\xE2', '\xB0', '\xBA', ' ', '\xE2', '\xB1', '\x84', /* ⰵ ⰴ ⰲ ⱚ ⱎ ⱑ ⰺ ⱄ */ + '\0', + '\xF0', '\x90', '\x8C', '\xB2', ' ', '\xF0', '\x90', '\x8C', '\xB6', ' ', '\xF0', '\x90', '\x8D', '\x80', ' ', '\xF0', '\x90', '\x8D', '\x84', ' ', '\xF0', '\x90', '\x8C', '\xB4', ' ', '\xF0', '\x90', '\x8D', '\x83', ' ', '\xF0', '\x90', '\x8D', '\x88', ' ', '\xF0', '\x90', '\x8C', '\xBE', /* 𐌲 𐌶 𐍀 𐍄 𐌴 𐍃 𐍈 𐌾 */ + '\0', + '\xF0', '\x90', '\x8C', '\xB6', ' ', '\xF0', '\x90', '\x8C', '\xB4', ' ', '\xF0', '\x90', '\x8D', '\x83', ' ', '\xF0', '\x90', '\x8D', '\x88', /* 𐌶 𐌴 𐍃 𐍈 */ + '\0', '\xCE', '\x93', ' ', '\xCE', '\x92', ' ', '\xCE', '\x95', ' ', '\xCE', '\x96', ' ', '\xCE', '\x98', ' ', '\xCE', '\x9F', ' ', '\xCE', '\xA9', /* Γ Β Ε Ζ Θ Ο Ω */ '\0', '\xCE', '\x92', ' ', '\xCE', '\x94', ' ', '\xCE', '\x96', ' ', '\xCE', '\x9E', ' ', '\xCE', '\x98', ' ', '\xCE', '\x9F', /* Β Δ Ζ Ξ Θ Ο */ @@ -138,6 +218,16 @@ '\0', '\xE0', '\xB2', '\x85', ' ', '\xE0', '\xB2', '\x89', ' ', '\xE0', '\xB2', '\x8E', ' ', '\xE0', '\xB2', '\xB2', ' ', '\xE0', '\xB3', '\xA6', ' ', '\xE0', '\xB3', '\xA8', ' ', '\xE0', '\xB3', '\xAC', ' ', '\xE0', '\xB3', '\xAD', /* ಅ ಉ ಎ ಲ ೦ ೨ ೬ ೭ */ '\0', + '\xEA', '\xA4', '\x85', ' ', '\xEA', '\xA4', '\x8F', ' ', '\xEA', '\xA4', '\x81', ' ', '\xEA', '\xA4', '\x8B', ' ', '\xEA', '\xA4', '\x80', ' ', '\xEA', '\xA4', '\x8D', /* ꤅ ꤏ ꤁ ꤋ ꤀ ꤍ */ + '\0', + '\xEA', '\xA4', '\x88', ' ', '\xEA', '\xA4', '\x98', ' ', '\xEA', '\xA4', '\x80', ' ', '\xEA', '\xA4', '\x8D', ' ', '\xEA', '\xA4', '\xA2', /* ꤈ ꤘ ꤀ ꤍ ꤢ */ + '\0', + '\xEA', '\xA4', '\x96', ' ', '\xEA', '\xA4', '\xA1', /* ꤖ ꤡ */ + '\0', + '\xEA', '\xA4', '\x91', ' ', '\xEA', '\xA4', '\x9C', ' ', '\xEA', '\xA4', '\x9E', /* ꤑ ꤜ ꤞ */ + '\0', + '\xEA', '\xA4', '\x91', '\xEA', '\xA4', '\xAC', ' ', '\xEA', '\xA4', '\x9C', '\xEA', '\xA4', '\xAD', ' ', '\xEA', '\xA4', '\x94', '\xEA', '\xA4', '\xAC', /* ꤑ꤬ ꤜ꤭ ꤔ꤬ */ + '\0', '\xE1', '\x9E', '\x81', ' ', '\xE1', '\x9E', '\x91', ' ', '\xE1', '\x9E', '\x93', ' ', '\xE1', '\x9E', '\xA7', ' ', '\xE1', '\x9E', '\xA9', ' ', '\xE1', '\x9E', '\xB6', /* ខ ទ ន ឧ ឩ ា */ '\0', '\xE1', '\x9E', '\x80', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x80', ' ', '\xE1', '\x9E', '\x80', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x81', ' ', '\xE1', '\x9E', '\x80', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x82', ' ', '\xE1', '\x9E', '\x80', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x90', /* ក្ក ក្ខ ក្គ ក្ថ */ @@ -168,8 +258,10 @@ '\0', 'f', ' ', 'i', ' ', 'j', ' ', 'k', ' ', 'd', ' ', 'b', ' ', 'h', /* f i j k d b h */ '\0', - 'x', ' ', 'z', ' ', 'r', ' ', 'o', ' ', 'e', ' ', 's', ' ', 'c', /* x z r o e s c */ + 'u', ' ', 'v', ' ', 'x', ' ', 'z', ' ', 'o', ' ', 'e', ' ', 's', ' ', 'c', /* u v x z o e s c */ '\0', + 'n', ' ', 'r', ' ', 'x', ' ', 'z', ' ', 'o', ' ', 'e', ' ', 's', ' ', 'c', /* n r x z o e s c */ + '\0', 'p', ' ', 'q', ' ', 'g', ' ', 'j', ' ', 'y', /* p q g j y */ '\0', '\xE2', '\x82', '\x80', ' ', '\xE2', '\x82', '\x83', ' ', '\xE2', '\x82', '\x85', ' ', '\xE2', '\x82', '\x87', ' ', '\xE2', '\x82', '\x88', /* ₀ ₃ ₅ ₇ ₈ */ @@ -192,6 +284,10 @@ '\0', '\xE1', '\xB5', '\x96', ' ', '\xCA', '\xB8', ' ', '\xE1', '\xB5', '\x8D', /* ᵖ ʸ ᵍ */ '\0', + '\xEA', '\x93', '\xA1', ' ', '\xEA', '\x93', '\xA7', ' ', '\xEA', '\x93', '\xB1', ' ', '\xEA', '\x93', '\xB6', ' ', '\xEA', '\x93', '\xA9', ' ', '\xEA', '\x93', '\x9A', ' ', '\xEA', '\x93', '\xB5', ' ', '\xEA', '\x93', '\xB3', /* ꓡ ꓧ ꓱ ꓶ ꓩ ꓚ ꓵ ꓳ */ + '\0', + '\xEA', '\x93', '\x95', ' ', '\xEA', '\x93', '\x9C', ' ', '\xEA', '\x93', '\x9E', ' ', '\xEA', '\x93', '\xA1', ' ', '\xEA', '\x93', '\x9B', ' ', '\xEA', '\x93', '\xA2', ' ', '\xEA', '\x93', '\xB3', ' ', '\xEA', '\x93', '\xB4', /* ꓕ ꓜ ꓞ ꓡ ꓛ ꓢ ꓳ ꓴ */ + '\0', '\xE0', '\xB4', '\x92', ' ', '\xE0', '\xB4', '\x9F', ' ', '\xE0', '\xB4', '\xA0', ' ', '\xE0', '\xB4', '\xB1', ' ', '\xE0', '\xB4', '\x9A', ' ', '\xE0', '\xB4', '\xAA', ' ', '\xE0', '\xB4', '\x9A', '\xE0', '\xB5', '\x8D', '\xE0', '\xB4', '\x9A', ' ', '\xE0', '\xB4', '\xAA', '\xE0', '\xB5', '\x8D', '\xE0', '\xB4', '\xAA', /* ഒ ട ഠ റ ച പ ച്ച പ്പ */ '\0', '\xE0', '\xB4', '\x9F', ' ', '\xE0', '\xB4', '\xA0', ' ', '\xE0', '\xB4', '\xA7', ' ', '\xE0', '\xB4', '\xB6', ' ', '\xE0', '\xB4', '\x98', ' ', '\xE0', '\xB4', '\x9A', ' ', '\xE0', '\xB4', '\xA5', ' ', '\xE0', '\xB4', '\xB2', /* ട ഠ ധ ശ ഘ ച ഥ ല */ @@ -204,6 +300,52 @@ '\0', '\xE1', '\x80', '\x89', ' ', '\xE1', '\x80', '\x8A', ' ', '\xE1', '\x80', '\xA5', ' ', '\xE1', '\x80', '\xA9', ' ', '\xE1', '\x80', '\xA8', ' ', '\xE1', '\x81', '\x82', ' ', '\xE1', '\x81', '\x85', ' ', '\xE1', '\x81', '\x89', /* ဉ ည ဥ ဩ ဨ ၂ ၅ ၉ */ '\0', + '\xDF', '\x90', ' ', '\xDF', '\x89', ' ', '\xDF', '\x92', ' ', '\xDF', '\x9F', ' ', '\xDF', '\x96', ' ', '\xDF', '\x9C', ' ', '\xDF', '\xA0', ' ', '\xDF', '\xA5', /* ߐ ߉ ߒ ߟ ߖ ߜ ߠ ߥ */ + '\0', + '\xDF', '\x80', ' ', '\xDF', '\x98', ' ', '\xDF', '\xA1', ' ', '\xDF', '\xA0', ' ', '\xDF', '\xA5', /* ߀ ߘ ߡ ߠ ߥ */ + '\0', + '\xDF', '\x8F', ' ', '\xDF', '\x9B', ' ', '\xDF', '\x8B', /* ߏ ߛ ߋ */ + '\0', + '\xDF', '\x8E', ' ', '\xDF', '\x8F', ' ', '\xDF', '\x9B', ' ', '\xDF', '\x8B', /* ߎ ߏ ߛ ߋ */ + '\0', + '\xE1', '\xB1', '\x9B', ' ', '\xE1', '\xB1', '\x9C', ' ', '\xE1', '\xB1', '\x9D', ' ', '\xE1', '\xB1', '\xA1', ' ', '\xE1', '\xB1', '\xA2', ' ', '\xE1', '\xB1', '\xA5', /* ᱛ ᱜ ᱝ ᱡ ᱢ ᱥ */ + '\0', + '\xF0', '\x90', '\xB0', '\x97', ' ', '\xF0', '\x90', '\xB0', '\x98', ' ', '\xF0', '\x90', '\xB0', '\xA7', /* 𐰗 𐰘 𐰧 */ + '\0', + '\xF0', '\x90', '\xB0', '\x89', ' ', '\xF0', '\x90', '\xB0', '\x97', ' ', '\xF0', '\x90', '\xB0', '\xA6', ' ', '\xF0', '\x90', '\xB0', '\xA7', /* 𐰉 𐰗 𐰦 𐰧 */ + '\0', + '\xF0', '\x90', '\x92', '\xBE', ' ', '\xF0', '\x90', '\x93', '\x8D', ' ', '\xF0', '\x90', '\x93', '\x92', ' ', '\xF0', '\x90', '\x93', '\x93', ' ', '\xF0', '\x90', '\x92', '\xBB', ' ', '\xF0', '\x90', '\x93', '\x82', ' ', '\xF0', '\x90', '\x92', '\xB5', ' ', '\xF0', '\x90', '\x93', '\x86', /* 𐒾 𐓍 𐓒 𐓓 𐒻 𐓂 𐒵 𐓆 */ + '\0', + '\xF0', '\x90', '\x92', '\xB0', ' ', '\xF0', '\x90', '\x93', '\x8D', ' ', '\xF0', '\x90', '\x93', '\x82', ' ', '\xF0', '\x90', '\x92', '\xBF', ' ', '\xF0', '\x90', '\x93', '\x8E', ' ', '\xF0', '\x90', '\x92', '\xB9', /* 𐒰 𐓍 𐓂 𐒿 𐓎 𐒹 */ + '\0', + '\xF0', '\x90', '\x92', '\xBC', ' ', '\xF0', '\x90', '\x92', '\xBD', ' ', '\xF0', '\x90', '\x92', '\xBE', /* 𐒼 𐒽 𐒾 */ + '\0', + '\xF0', '\x90', '\x93', '\xB5', ' ', '\xF0', '\x90', '\x93', '\xB6', ' ', '\xF0', '\x90', '\x93', '\xBA', ' ', '\xF0', '\x90', '\x93', '\xBB', ' ', '\xF0', '\x90', '\x93', '\x9D', ' ', '\xF0', '\x90', '\x93', '\xA3', ' ', '\xF0', '\x90', '\x93', '\xAA', ' ', '\xF0', '\x90', '\x93', '\xAE', /* 𐓵 𐓶 𐓺 𐓻 𐓝 𐓣 𐓪 𐓮 */ + '\0', + '\xF0', '\x90', '\x93', '\x98', ' ', '\xF0', '\x90', '\x93', '\x9A', ' ', '\xF0', '\x90', '\x93', '\xA3', ' ', '\xF0', '\x90', '\x93', '\xB5', ' ', '\xF0', '\x90', '\x93', '\xA1', ' ', '\xF0', '\x90', '\x93', '\xA7', ' ', '\xF0', '\x90', '\x93', '\xAA', ' ', '\xF0', '\x90', '\x93', '\xB6', /* 𐓘 𐓚 𐓣 𐓵 𐓡 𐓧 𐓪 𐓶 */ + '\0', + '\xF0', '\x90', '\x93', '\xA4', ' ', '\xF0', '\x90', '\x93', '\xA6', ' ', '\xF0', '\x90', '\x93', '\xB8', ' ', '\xF0', '\x90', '\x93', '\xB9', ' ', '\xF0', '\x90', '\x93', '\x9B', /* 𐓤 𐓦 𐓸 𐓹 𐓛 */ + '\0', + '\xF0', '\x90', '\x93', '\xA4', ' ', '\xF0', '\x90', '\x93', '\xA5', ' ', '\xF0', '\x90', '\x93', '\xA6', /* 𐓤 𐓥 𐓦 */ + '\0', + '\xF0', '\x90', '\x92', '\x86', ' ', '\xF0', '\x90', '\x92', '\x89', ' ', '\xF0', '\x90', '\x92', '\x90', ' ', '\xF0', '\x90', '\x92', '\x92', ' ', '\xF0', '\x90', '\x92', '\x98', ' ', '\xF0', '\x90', '\x92', '\x9B', ' ', '\xF0', '\x90', '\x92', '\xA0', ' ', '\xF0', '\x90', '\x92', '\xA3', /* 𐒆 𐒉 𐒐 𐒒 𐒘 𐒛 𐒠 𐒣 */ + '\0', + '\xF0', '\x90', '\x92', '\x80', ' ', '\xF0', '\x90', '\x92', '\x82', ' ', '\xF0', '\x90', '\x92', '\x86', ' ', '\xF0', '\x90', '\x92', '\x88', ' ', '\xF0', '\x90', '\x92', '\x8A', ' ', '\xF0', '\x90', '\x92', '\x92', ' ', '\xF0', '\x90', '\x92', '\xA0', ' ', '\xF0', '\x90', '\x92', '\xA9', /* 𐒀 𐒂 𐒆 𐒈 𐒊 𐒒 𐒠 𐒩 */ + '\0', + '\xEA', '\xA2', '\x9C', ' ', '\xEA', '\xA2', '\x9E', ' ', '\xEA', '\xA2', '\xB3', ' ', '\xEA', '\xA2', '\x82', ' ', '\xEA', '\xA2', '\x96', ' ', '\xEA', '\xA2', '\x92', ' ', '\xEA', '\xA2', '\x9D', ' ', '\xEA', '\xA2', '\x9B', /* ꢜ ꢞ ꢳ ꢂ ꢖ ꢒ ꢝ ꢛ */ + '\0', + '\xEA', '\xA2', '\x82', ' ', '\xEA', '\xA2', '\xA8', ' ', '\xEA', '\xA2', '\xBA', ' ', '\xEA', '\xA2', '\xA4', ' ', '\xEA', '\xA2', '\x8E', /* ꢂ ꢨ ꢺ ꢤ ꢎ */ + '\0', + '\xF0', '\x90', '\x91', '\x95', ' ', '\xF0', '\x90', '\x91', '\x99', /* 𐑕 𐑙 */ + '\0', + '\xF0', '\x90', '\x91', '\x94', ' ', '\xF0', '\x90', '\x91', '\x96', ' ', '\xF0', '\x90', '\x91', '\x97', ' ', '\xF0', '\x90', '\x91', '\xB9', ' ', '\xF0', '\x90', '\x91', '\xBB', /* 𐑔 𐑖 𐑗 𐑹 𐑻 */ + '\0', + '\xF0', '\x90', '\x91', '\x9F', ' ', '\xF0', '\x90', '\x91', '\xA3', /* 𐑟 𐑣 */ + '\0', + '\xF0', '\x90', '\x91', '\xB1', ' ', '\xF0', '\x90', '\x91', '\xB2', ' ', '\xF0', '\x90', '\x91', '\xB3', ' ', '\xF0', '\x90', '\x91', '\xB4', ' ', '\xF0', '\x90', '\x91', '\xB8', ' ', '\xF0', '\x90', '\x91', '\xBA', ' ', '\xF0', '\x90', '\x91', '\xBC', /* 𐑱 𐑲 𐑳 𐑴 𐑸 𐑺 𐑼 */ + '\0', + '\xF0', '\x90', '\x91', '\xB4', ' ', '\xF0', '\x90', '\x91', '\xBB', ' ', '\xF0', '\x90', '\x91', '\xB9', /* 𐑴 𐑻 𐑹 */ + '\0', '\xE0', '\xB6', '\x89', ' ', '\xE0', '\xB6', '\x9A', ' ', '\xE0', '\xB6', '\x9D', ' ', '\xE0', '\xB6', '\xB3', ' ', '\xE0', '\xB6', '\xB4', ' ', '\xE0', '\xB6', '\xBA', ' ', '\xE0', '\xB6', '\xBD', ' ', '\xE0', '\xB7', '\x86', /* ඉ ක ඝ ඳ ප ය ල ෆ */ '\0', '\xE0', '\xB6', '\x91', ' ', '\xE0', '\xB6', '\x94', ' ', '\xE0', '\xB6', '\x9D', ' ', '\xE0', '\xB6', '\xA2', ' ', '\xE0', '\xB6', '\xA7', ' ', '\xE0', '\xB6', '\xAE', ' ', '\xE0', '\xB6', '\xB0', ' ', '\xE0', '\xB6', '\xBB', /* එ ඔ ඝ ජ ට ථ ධ ර */ @@ -210,6 +352,16 @@ '\0', '\xE0', '\xB6', '\xAF', ' ', '\xE0', '\xB6', '\xB3', ' ', '\xE0', '\xB6', '\x8B', ' ', '\xE0', '\xB6', '\xBD', ' ', '\xE0', '\xB6', '\xAD', '\xE0', '\xB7', '\x96', ' ', '\xE0', '\xB6', '\xAD', '\xE0', '\xB7', '\x94', ' ', '\xE0', '\xB6', '\xB6', '\xE0', '\xB7', '\x94', ' ', '\xE0', '\xB6', '\xAF', '\xE0', '\xB7', '\x94', /* ද ඳ උ ල තූ තු බු දු */ '\0', + '\xE1', '\xAE', '\x8B', ' ', '\xE1', '\xAE', '\x9E', ' ', '\xE1', '\xAE', '\xAE', ' ', '\xE1', '\xAE', '\xBD', ' ', '\xE1', '\xAE', '\xB0', ' ', '\xE1', '\xAE', '\x88', /* ᮋ ᮞ ᮮ ᮽ ᮰ ᮈ */ + '\0', + '\xE1', '\xAE', '\x84', ' ', '\xE1', '\xAE', '\x94', ' ', '\xE1', '\xAE', '\x95', ' ', '\xE1', '\xAE', '\x97', ' ', '\xE1', '\xAE', '\xB0', ' ', '\xE1', '\xAE', '\x86', ' ', '\xE1', '\xAE', '\x88', ' ', '\xE1', '\xAE', '\x89', /* ᮄ ᮔ ᮕ ᮗ ᮰ ᮆ ᮈ ᮉ */ + '\0', + '\xE1', '\xAE', '\xBC', ' ', '\xE1', '\xB3', '\x84', /* ᮼ ᳄ */ + '\0', + '\xEA', '\xAA', '\x86', ' ', '\xEA', '\xAA', '\x94', ' ', '\xEA', '\xAA', '\x92', ' ', '\xEA', '\xAA', '\x96', ' ', '\xEA', '\xAA', '\xAB', /* ꪆ ꪔ ꪒ ꪖ ꪫ */ + '\0', + '\xEA', '\xAA', '\x89', ' ', '\xEA', '\xAA', '\xAB', ' ', '\xEA', '\xAA', '\xAE', /* ꪉ ꪫ ꪮ */ + '\0', '\xE0', '\xAE', '\x89', ' ', '\xE0', '\xAE', '\x92', ' ', '\xE0', '\xAE', '\x93', ' ', '\xE0', '\xAE', '\xB1', ' ', '\xE0', '\xAE', '\x88', ' ', '\xE0', '\xAE', '\x95', ' ', '\xE0', '\xAE', '\x99', ' ', '\xE0', '\xAE', '\x9A', /* உ ஒ ஓ ற ஈ க ங ச */ '\0', '\xE0', '\xAE', '\x95', ' ', '\xE0', '\xAE', '\x9A', ' ', '\xE0', '\xAE', '\xB2', ' ', '\xE0', '\xAE', '\xB6', ' ', '\xE0', '\xAE', '\x89', ' ', '\xE0', '\xAE', '\x99', ' ', '\xE0', '\xAE', '\x9F', ' ', '\xE0', '\xAE', '\xAA', /* க ச ல ஶ உ ங ட ப */ @@ -231,6 +383,12 @@ '\xE0', '\xB8', '\x8D', ' ', '\xE0', '\xB8', '\x90', /* ญ ฐ */ '\0', '\xE0', '\xB9', '\x90', ' ', '\xE0', '\xB9', '\x91', ' ', '\xE0', '\xB9', '\x93', /* ๐ ๑ ๓ */ + '\0', + '\xE2', '\xB5', '\x94', ' ', '\xE2', '\xB5', '\x99', ' ', '\xE2', '\xB5', '\x9B', ' ', '\xE2', '\xB5', '\x9E', ' ', '\xE2', '\xB4', '\xB5', ' ', '\xE2', '\xB4', '\xBC', ' ', '\xE2', '\xB4', '\xB9', ' ', '\xE2', '\xB5', '\x8E', /* ⵔ ⵙ ⵛ ⵞ ⴵ ⴼ ⴹ ⵎ */ + '\0', + '\xEA', '\x97', '\x8D', ' ', '\xEA', '\x98', '\x96', ' ', '\xEA', '\x98', '\x99', ' ', '\xEA', '\x98', '\x9C', ' ', '\xEA', '\x96', '\x9C', ' ', '\xEA', '\x96', '\x9D', ' ', '\xEA', '\x94', '\x85', ' ', '\xEA', '\x95', '\xA2', /* ꗍ ꘖ ꘙ ꘜ ꖜ ꖝ ꔅ ꕢ */ + '\0', + '\xEA', '\x97', '\x8D', ' ', '\xEA', '\x98', '\x96', ' ', '\xEA', '\x98', '\x99', ' ', '\xEA', '\x97', '\x9E', ' ', '\xEA', '\x94', '\x85', ' ', '\xEA', '\x95', '\xA2', ' ', '\xEA', '\x96', '\x9C', ' ', '\xEA', '\x94', '\x86', /* ꗍ ꘖ ꘙ ꗞ ꔅ ꕢ ꖜ ꔆ */ #ifdef AF_CONFIG_OPTION_CJK '\0', '\xE4', '\xBB', '\x96', ' ', '\xE4', '\xBB', '\xAC', ' ', '\xE4', '\xBD', '\xA0', ' ', '\xE4', '\xBE', '\x86', ' ', '\xE5', '\x80', '\x91', ' ', '\xE5', '\x88', '\xB0', ' ', '\xE5', '\x92', '\x8C', ' ', '\xE5', '\x9C', '\xB0', /* 他 们 你 來 們 到 和 地 */ @@ -281,6 +439,12 @@ af_blue_stringsets[] = { /* */ + { AF_BLUE_STRING_ADLAM_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_ADLAM_CAPITAL_BOTTOM, 0 }, + { AF_BLUE_STRING_ADLAM_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | + AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, + { AF_BLUE_STRING_ADLAM_SMALL_BOTTOM, 0 }, + { AF_BLUE_STRING_MAX, 0 }, { AF_BLUE_STRING_ARABIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_ARABIC_BOTTOM, 0 }, { AF_BLUE_STRING_ARABIC_JOIN, AF_BLUE_PROPERTY_LATIN_NEUTRAL }, @@ -293,6 +457,12 @@ { AF_BLUE_STRING_ARMENIAN_SMALL_BOTTOM, 0 }, { AF_BLUE_STRING_ARMENIAN_SMALL_DESCENDER, 0 }, { AF_BLUE_STRING_MAX, 0 }, + { AF_BLUE_STRING_AVESTAN_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_AVESTAN_BOTTOM, 0 }, + { AF_BLUE_STRING_MAX, 0 }, + { AF_BLUE_STRING_BAMUM_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_BAMUM_BOTTOM, 0 }, + { AF_BLUE_STRING_MAX, 0 }, { AF_BLUE_STRING_BENGALI_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_BENGALI_HEAD, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_BENGALI_BASE, AF_BLUE_PROPERTY_LATIN_TOP | @@ -300,6 +470,27 @@ AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, { AF_BLUE_STRING_BENGALI_BASE, 0 }, { AF_BLUE_STRING_MAX, 0 }, + { AF_BLUE_STRING_BUHID_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_BUHID_LARGE, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_BUHID_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | + AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, + { AF_BLUE_STRING_BUHID_BOTTOM, 0 }, + { AF_BLUE_STRING_MAX, 0 }, + { AF_BLUE_STRING_CHAKMA_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_CHAKMA_BOTTOM, 0 }, + { AF_BLUE_STRING_CHAKMA_DESCENDER, 0 }, + { AF_BLUE_STRING_MAX, 0 }, + { AF_BLUE_STRING_CANADIAN_SYLLABICS_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_CANADIAN_SYLLABICS_BOTTOM, 0 }, + { AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | + AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, + { AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_BOTTOM, 0 }, + { AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_BOTTOM, 0 }, + { AF_BLUE_STRING_MAX, 0 }, + { AF_BLUE_STRING_CARIAN_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_CARIAN_BOTTOM, 0 }, + { AF_BLUE_STRING_MAX, 0 }, { AF_BLUE_STRING_CHEROKEE_CAPITAL, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_CHEROKEE_CAPITAL, 0 }, { AF_BLUE_STRING_CHEROKEE_SMALL_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }, @@ -308,6 +499,17 @@ { AF_BLUE_STRING_CHEROKEE_SMALL, 0 }, { AF_BLUE_STRING_CHEROKEE_SMALL_DESCENDER, 0 }, { AF_BLUE_STRING_MAX, 0 }, + { AF_BLUE_STRING_COPTIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_COPTIC_CAPITAL_BOTTOM, 0 }, + { AF_BLUE_STRING_COPTIC_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | + AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, + { AF_BLUE_STRING_COPTIC_SMALL_BOTTOM, 0 }, + { AF_BLUE_STRING_MAX, 0 }, + { AF_BLUE_STRING_CYPRIOT_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_CYPRIOT_BOTTOM, 0 }, + { AF_BLUE_STRING_CYPRIOT_SMALL, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_CYPRIOT_SMALL, 0 }, + { AF_BLUE_STRING_MAX, 0 }, { AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM, 0 }, { AF_BLUE_STRING_CYRILLIC_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | @@ -323,6 +525,12 @@ { AF_BLUE_STRING_DEVANAGARI_BASE, 0 }, { AF_BLUE_STRING_DEVANAGARI_BOTTOM, 0 }, { AF_BLUE_STRING_MAX, 0 }, + { AF_BLUE_STRING_DESERET_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_DESERET_CAPITAL_BOTTOM, 0 }, + { AF_BLUE_STRING_DESERET_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | + AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, + { AF_BLUE_STRING_DESERET_SMALL_BOTTOM, 0 }, + { AF_BLUE_STRING_MAX, 0 }, { AF_BLUE_STRING_ETHIOPIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_ETHIOPIC_BOTTOM, 0 }, { AF_BLUE_STRING_MAX, 0 }, @@ -340,6 +548,15 @@ { AF_BLUE_STRING_GEORGIAN_NUSKHURI_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_GEORGIAN_NUSKHURI_DESCENDER, 0 }, { AF_BLUE_STRING_MAX, 0 }, + { AF_BLUE_STRING_GLAGOLITIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_GLAGOLITIC_CAPITAL_BOTTOM, 0 }, + { AF_BLUE_STRING_GLAGOLITIC_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | + AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, + { AF_BLUE_STRING_GLAGOLITIC_SMALL_BOTTOM, 0 }, + { AF_BLUE_STRING_MAX, 0 }, + { AF_BLUE_STRING_GOTHIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_GOTHIC_BOTTOM, 0 }, + { AF_BLUE_STRING_MAX, 0 }, { AF_BLUE_STRING_GREEK_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM, 0 }, { AF_BLUE_STRING_GREEK_SMALL_BETA_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, @@ -368,6 +585,13 @@ { AF_BLUE_STRING_HEBREW_BOTTOM, 0 }, { AF_BLUE_STRING_HEBREW_DESCENDER, 0 }, { AF_BLUE_STRING_MAX, 0 }, + { AF_BLUE_STRING_KAYAH_LI_TOP, AF_BLUE_PROPERTY_LATIN_TOP | + AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, + { AF_BLUE_STRING_KAYAH_LI_BOTTOM, 0 }, + { AF_BLUE_STRING_KAYAH_LI_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_KAYAH_LI_DESCENDER, 0 }, + { AF_BLUE_STRING_KAYAH_LI_LARGE_DESCENDER, 0 }, + { AF_BLUE_STRING_MAX, 0 }, { AF_BLUE_STRING_KANNADA_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_KANNADA_BOTTOM, 0 }, { AF_BLUE_STRING_MAX, 0 }, @@ -392,9 +616,9 @@ { AF_BLUE_STRING_LATIN_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM, 0 }, { AF_BLUE_STRING_LATIN_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_LATIN_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | + { AF_BLUE_STRING_LATIN_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_LATIN_SMALL, 0 }, + { AF_BLUE_STRING_LATIN_SMALL_BOTTOM, 0 }, { AF_BLUE_STRING_LATIN_SMALL_DESCENDER, 0 }, { AF_BLUE_STRING_MAX, 0 }, { AF_BLUE_STRING_LATIN_SUBS_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, @@ -413,6 +637,9 @@ { AF_BLUE_STRING_LATIN_SUPS_SMALL, 0 }, { AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER, 0 }, { AF_BLUE_STRING_MAX, 0 }, + { AF_BLUE_STRING_LISU_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_LISU_BOTTOM, 0 }, + { AF_BLUE_STRING_MAX, 0 }, { AF_BLUE_STRING_MALAYALAM_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_MALAYALAM_BOTTOM, 0 }, { AF_BLUE_STRING_MAX, 0 }, @@ -422,14 +649,55 @@ { AF_BLUE_STRING_MYANMAR_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_MYANMAR_DESCENDER, 0 }, { AF_BLUE_STRING_MAX, 0 }, + { AF_BLUE_STRING_NKO_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_NKO_BOTTOM, 0 }, + { AF_BLUE_STRING_NKO_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | + AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, + { AF_BLUE_STRING_NKO_SMALL_BOTTOM, 0 }, + { AF_BLUE_STRING_MAX, 0 }, { AF_BLUE_STRING_MAX, 0 }, + { AF_BLUE_STRING_OL_CHIKI, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_OL_CHIKI, 0 }, + { AF_BLUE_STRING_MAX, 0 }, + { AF_BLUE_STRING_OLD_TURKIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_OLD_TURKIC_BOTTOM, 0 }, + { AF_BLUE_STRING_MAX, 0 }, + { AF_BLUE_STRING_OSAGE_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_OSAGE_CAPITAL_BOTTOM, 0 }, + { AF_BLUE_STRING_OSAGE_CAPITAL_DESCENDER, 0 }, + { AF_BLUE_STRING_OSAGE_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | + AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, + { AF_BLUE_STRING_OSAGE_SMALL_BOTTOM, 0 }, + { AF_BLUE_STRING_OSAGE_SMALL_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_OSAGE_SMALL_DESCENDER, 0 }, + { AF_BLUE_STRING_MAX, 0 }, + { AF_BLUE_STRING_OSMANYA_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_OSMANYA_BOTTOM, 0 }, + { AF_BLUE_STRING_MAX, 0 }, + { AF_BLUE_STRING_SAURASHTRA_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_SAURASHTRA_BOTTOM, 0 }, + { AF_BLUE_STRING_MAX, 0 }, + { AF_BLUE_STRING_SHAVIAN_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_SHAVIAN_BOTTOM, 0 }, + { AF_BLUE_STRING_SHAVIAN_DESCENDER, 0 }, + { AF_BLUE_STRING_SHAVIAN_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | + AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, + { AF_BLUE_STRING_SHAVIAN_SMALL_BOTTOM, 0 }, + { AF_BLUE_STRING_MAX, 0 }, { AF_BLUE_STRING_SINHALA_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_SINHALA_BOTTOM, 0 }, { AF_BLUE_STRING_SINHALA_DESCENDER, 0 }, { AF_BLUE_STRING_MAX, 0 }, + { AF_BLUE_STRING_SUNDANESE_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_SUNDANESE_BOTTOM, 0 }, + { AF_BLUE_STRING_SUNDANESE_DESCENDER, 0 }, + { AF_BLUE_STRING_MAX, 0 }, { AF_BLUE_STRING_TAMIL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_TAMIL_BOTTOM, 0 }, { AF_BLUE_STRING_MAX, 0 }, + { AF_BLUE_STRING_TAI_VIET_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_TAI_VIET_BOTTOM, 0 }, + { AF_BLUE_STRING_MAX, 0 }, { AF_BLUE_STRING_TELUGU_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_TELUGU_BOTTOM, 0 }, { AF_BLUE_STRING_MAX, 0 }, @@ -442,6 +710,12 @@ { AF_BLUE_STRING_THAI_LARGE_DESCENDER, 0 }, { AF_BLUE_STRING_THAI_DIGIT_TOP, 0 }, { AF_BLUE_STRING_MAX, 0 }, + { AF_BLUE_STRING_TIFINAGH, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_TIFINAGH, 0 }, + { AF_BLUE_STRING_MAX, 0 }, + { AF_BLUE_STRING_VAI_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_VAI_BOTTOM, 0 }, + { AF_BLUE_STRING_MAX, 0 }, #ifdef AF_CONFIG_OPTION_CJK { AF_BLUE_STRING_CJK_TOP, AF_BLUE_PROPERTY_CJK_TOP }, { AF_BLUE_STRING_CJK_BOTTOM, 0 }, Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/afblue.cin =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/afblue.cin (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/afblue.cin (working copy) @@ -4,7 +4,7 @@ /* */ /* Auto-fitter data for blue strings (body). */ /* */ -/* Copyright 2013-2016 by */ +/* Copyright 2013-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/afblue.dat =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/afblue.dat (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/afblue.dat (working copy) @@ -2,7 +2,7 @@ // // Auto-fitter data for blue strings. // -// Copyright 2013-2016 by +// Copyright 2013-2017 by // David Turner, Robert Wilhelm, and Werner Lemberg. // // This file is part of the FreeType project, and may only be used, @@ -74,6 +74,15 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN: + AF_BLUE_STRING_ADLAM_CAPITAL_TOP + "𞤌 𞤅 𞤈 𞤏 𞤔 𞤚" + AF_BLUE_STRING_ADLAM_CAPITAL_BOTTOM + "𞤂 𞤖" + AF_BLUE_STRING_ADLAM_SMALL_TOP + "𞤬 𞤮 𞤻 𞤼 𞤾" + AF_BLUE_STRING_ADLAM_SMALL_BOTTOM + "𞤤 𞤨 𞤩 𞤭 𞤴 𞤸 𞤺 𞥀" + AF_BLUE_STRING_ARABIC_TOP "ا إ ل ك ط ظ" AF_BLUE_STRING_ARABIC_BOTTOM @@ -99,6 +108,16 @@ AF_BLUE_STRING_ARMENIAN_SMALL_DESCENDER "բ ը ի լ ղ պ փ ց" + AF_BLUE_STRING_AVESTAN_TOP + "𐬀 𐬁 𐬐 𐬛" + AF_BLUE_STRING_AVESTAN_BOTTOM + "𐬀 𐬁" + + AF_BLUE_STRING_BAMUM_TOP + "ꚧ ꚨ ꛛ ꛉ ꛁ ꛈ ꛫ ꛯ" + AF_BLUE_STRING_BAMUM_BOTTOM + "ꚭ ꚳ ꚶ ꛬ ꚢ ꚽ ꛯ ꛲" + AF_BLUE_STRING_BENGALI_BASE "অ ড ত ন ব ভ ল ক" AF_BLUE_STRING_BENGALI_TOP @@ -106,6 +125,40 @@ AF_BLUE_STRING_BENGALI_HEAD "ও এ ড ত ন ব ল ক" + AF_BLUE_STRING_BUHID_TOP + "ᝐ ᝈ" + AF_BLUE_STRING_BUHID_LARGE + "ᝅ ᝊ ᝎ" + AF_BLUE_STRING_BUHID_SMALL + "ᝂ ᝃ ᝉ ᝌ" + AF_BLUE_STRING_BUHID_BOTTOM + "ᝀ ᝃ ᝆ ᝉ ᝋ ᝏ ᝑ" + + AF_BLUE_STRING_CANADIAN_SYLLABICS_TOP + "ᗜ ᖴ ᐁ ᒣ ᑫ ᑎ ᔑ ᗰ" + AF_BLUE_STRING_CANADIAN_SYLLABICS_BOTTOM + "ᗶ ᖵ ᒧ ᐃ ᑌ ᒍ ᔑ ᗢ" + AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_TOP + "ᓓ ᓕ ᓀ ᓂ ᓄ ᕄ ᕆ ᘣ" + AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_BOTTOM + "ᕃ ᓂ ᓀ ᕂ ᓗ ᓚ ᕆ ᘣ" + AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_TOP + "ᐪ ᙆ ᣘ ᐢ ᒾ ᣗ ᔆ" + AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_BOTTOM + "ᙆ ᗮ ᒻ ᐞ ᔆ ᒡ ᒢ ᓑ" + + AF_BLUE_STRING_CARIAN_TOP + "𐊧 𐊫 𐊬 𐊭 𐊱 𐊺 𐊼 𐊿" + AF_BLUE_STRING_CARIAN_BOTTOM + "𐊣 𐊧 𐊷 𐋀 𐊫 𐊸 𐋉" + + AF_BLUE_STRING_CHAKMA_TOP + "𑄃 𑄅 𑄉 𑄙 𑄗" + AF_BLUE_STRING_CHAKMA_BOTTOM + "𑄅 𑄛 𑄝 𑄗 𑄓" + AF_BLUE_STRING_CHAKMA_DESCENDER + "𑄖𑄳𑄢 𑄘𑄳𑄢 𑄙𑄳𑄢 𑄤𑄳𑄢 𑄥𑄳𑄢" + AF_BLUE_STRING_CHEROKEE_CAPITAL "Ꮖ Ꮋ Ꭼ Ꮓ Ꭴ Ꮳ Ꭶ Ꮥ" AF_BLUE_STRING_CHEROKEE_SMALL_ASCENDER @@ -115,6 +168,22 @@ AF_BLUE_STRING_CHEROKEE_SMALL_DESCENDER "ᏸ ꮐ ꭹ ꭻ" + AF_BLUE_STRING_COPTIC_CAPITAL_TOP + "Ⲍ Ⲏ Ⲡ Ⳟ Ⲟ Ⲑ Ⲥ Ⳋ" + AF_BLUE_STRING_COPTIC_CAPITAL_BOTTOM + "Ⳑ Ⳙ Ⳟ Ⲏ Ⲟ Ⲑ Ⳝ Ⲱ" + AF_BLUE_STRING_COPTIC_SMALL_TOP + "ⲍ ⲏ ⲡ ⳟ ⲟ ⲑ ⲥ ⳋ" + AF_BLUE_STRING_COPTIC_SMALL_BOTTOM + "ⳑ ⳙ ⳟ ⲏ ⲟ ⲑ ⳝ Ⳓ" + + AF_BLUE_STRING_CYPRIOT_TOP + "𐠍 𐠙 𐠳 𐠱 𐠅 𐠓 𐠣 𐠦" + AF_BLUE_STRING_CYPRIOT_BOTTOM + "𐠃 𐠊 𐠛 𐠣 𐠳 𐠵 𐠐" + AF_BLUE_STRING_CYPRIOT_SMALL + "𐠈 𐠏 𐠖" + AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP "Б В Е П З О С Э" AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM @@ -124,6 +193,15 @@ AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER "р у ф" + AF_BLUE_STRING_DESERET_CAPITAL_TOP + "𐐂 𐐄 𐐋 𐐗 𐐑" + AF_BLUE_STRING_DESERET_CAPITAL_BOTTOM + "𐐀 𐐂 𐐄 𐐗 𐐛" + AF_BLUE_STRING_DESERET_SMALL_TOP + "𐐪 𐐬 𐐳 𐐿 𐐹" + AF_BLUE_STRING_DESERET_SMALL_BOTTOM + "𐐨 𐐪 𐐬 𐐿 𐑃" + AF_BLUE_STRING_DEVANAGARI_BASE "क म अ आ थ ध भ श" AF_BLUE_STRING_DEVANAGARI_TOP @@ -164,6 +242,20 @@ AF_BLUE_STRING_GEORGIAN_NUSKHURI_DESCENDER "ⴄ ⴅ ⴔ ⴕ ⴁ ⴂ ⴘ ⴝ" + AF_BLUE_STRING_GLAGOLITIC_CAPITAL_TOP + "Ⰵ Ⱄ Ⱚ Ⰴ Ⰲ Ⰺ Ⱛ Ⰻ" + AF_BLUE_STRING_GLAGOLITIC_CAPITAL_BOTTOM + "Ⰵ Ⰴ Ⰲ Ⱚ Ⱎ Ⱑ Ⰺ Ⱄ" + AF_BLUE_STRING_GLAGOLITIC_SMALL_TOP + "ⰵ ⱄ ⱚ ⰴ ⰲ ⰺ ⱛ ⰻ" + AF_BLUE_STRING_GLAGOLITIC_SMALL_BOTTOM + "ⰵ ⰴ ⰲ ⱚ ⱎ ⱑ ⰺ ⱄ" + + AF_BLUE_STRING_GOTHIC_TOP + "𐌲 𐌶 𐍀 𐍄 𐌴 𐍃 𐍈 𐌾" + AF_BLUE_STRING_GOTHIC_BOTTOM + "𐌶 𐌴 𐍃 𐍈" + AF_BLUE_STRING_GREEK_CAPITAL_TOP "Γ Β Ε Ζ Θ Ο Ω" AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM @@ -209,6 +301,17 @@ AF_BLUE_STRING_KANNADA_BOTTOM "ಅ ಉ ಎ ಲ ೦ ೨ ೬ ೭" + AF_BLUE_STRING_KAYAH_LI_TOP + "꤅ ꤏ ꤁ ꤋ ꤀ ꤍ" + AF_BLUE_STRING_KAYAH_LI_BOTTOM + "꤈ ꤘ ꤀ ꤍ ꤢ" + AF_BLUE_STRING_KAYAH_LI_ASCENDER + "ꤖ ꤡ" + AF_BLUE_STRING_KAYAH_LI_DESCENDER + "ꤑ ꤜ ꤞ" + AF_BLUE_STRING_KAYAH_LI_LARGE_DESCENDER + "ꤑ꤬ ꤜ꤭ ꤔ꤬" + AF_BLUE_STRING_KHMER_TOP "ខ ទ ន ឧ ឩ ា" AF_BLUE_STRING_KHMER_SUBSCRIPT_TOP @@ -242,8 +345,10 @@ "H E Z L O C U S" AF_BLUE_STRING_LATIN_SMALL_F_TOP "f i j k d b h" - AF_BLUE_STRING_LATIN_SMALL - "x z r o e s c" + AF_BLUE_STRING_LATIN_SMALL_TOP + "u v x z o e s c" + AF_BLUE_STRING_LATIN_SMALL_BOTTOM + "n r x z o e s c" AF_BLUE_STRING_LATIN_SMALL_DESCENDER "p q g j y" @@ -272,6 +377,11 @@ AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER "ᵖ ʸ ᵍ" + AF_BLUE_STRING_LISU_TOP + "ꓡ ꓧ ꓱ ꓶ ꓩ ꓚ ꓵ ꓳ" + AF_BLUE_STRING_LISU_BOTTOM + "ꓕ ꓜ ꓞ ꓡ ꓛ ꓢ ꓳ ꓴ" + AF_BLUE_STRING_MALAYALAM_TOP "ഒ ട ഠ റ ച പ ച്ച പ്പ" AF_BLUE_STRING_MALAYALAM_BOTTOM @@ -286,6 +396,59 @@ AF_BLUE_STRING_MYANMAR_DESCENDER "ဉ ည ဥ ဩ ဨ ၂ ၅ ၉" + AF_BLUE_STRING_NKO_TOP + "ߐ ߉ ߒ ߟ ߖ ߜ ߠ ߥ" + AF_BLUE_STRING_NKO_BOTTOM + "߀ ߘ ߡ ߠ ߥ" + AF_BLUE_STRING_NKO_SMALL_TOP + "ߏ ߛ ߋ" + AF_BLUE_STRING_NKO_SMALL_BOTTOM + "ߎ ߏ ߛ ߋ" + + AF_BLUE_STRING_OL_CHIKI + "ᱛ ᱜ ᱝ ᱡ ᱢ ᱥ" + + AF_BLUE_STRING_OLD_TURKIC_TOP + "𐰗 𐰘 𐰧" + AF_BLUE_STRING_OLD_TURKIC_BOTTOM + "𐰉 𐰗 𐰦 𐰧" + + AF_BLUE_STRING_OSAGE_CAPITAL_TOP + "𐒾 𐓍 𐓒 𐓓 𐒻 𐓂 𐒵 𐓆" + AF_BLUE_STRING_OSAGE_CAPITAL_BOTTOM + "𐒰 𐓍 𐓂 𐒿 𐓎 𐒹" + AF_BLUE_STRING_OSAGE_CAPITAL_DESCENDER + "𐒼 𐒽 𐒾" + AF_BLUE_STRING_OSAGE_SMALL_TOP + "𐓵 𐓶 𐓺 𐓻 𐓝 𐓣 𐓪 𐓮" + AF_BLUE_STRING_OSAGE_SMALL_BOTTOM + "𐓘 𐓚 𐓣 𐓵 𐓡 𐓧 𐓪 𐓶" + AF_BLUE_STRING_OSAGE_SMALL_ASCENDER + "𐓤 𐓦 𐓸 𐓹 𐓛" + AF_BLUE_STRING_OSAGE_SMALL_DESCENDER + "𐓤 𐓥 𐓦" + + AF_BLUE_STRING_OSMANYA_TOP + "𐒆 𐒉 𐒐 𐒒 𐒘 𐒛 𐒠 𐒣" + AF_BLUE_STRING_OSMANYA_BOTTOM + "𐒀 𐒂 𐒆 𐒈 𐒊 𐒒 𐒠 𐒩" + + AF_BLUE_STRING_SAURASHTRA_TOP + "ꢜ ꢞ ꢳ ꢂ ꢖ ꢒ ꢝ ꢛ" + AF_BLUE_STRING_SAURASHTRA_BOTTOM + "ꢂ ꢨ ꢺ ꢤ ꢎ" + + AF_BLUE_STRING_SHAVIAN_TOP + "𐑕 𐑙" + AF_BLUE_STRING_SHAVIAN_BOTTOM + "𐑔 𐑖 𐑗 𐑹 𐑻" + AF_BLUE_STRING_SHAVIAN_DESCENDER + "𐑟 𐑣" + AF_BLUE_STRING_SHAVIAN_SMALL_TOP + "𐑱 𐑲 𐑳 𐑴 𐑸 𐑺 𐑼" + AF_BLUE_STRING_SHAVIAN_SMALL_BOTTOM + "𐑴 𐑻 𐑹" + AF_BLUE_STRING_SINHALA_TOP "ඉ ක ඝ ඳ ප ය ල ෆ" AF_BLUE_STRING_SINHALA_BOTTOM @@ -293,6 +456,18 @@ AF_BLUE_STRING_SINHALA_DESCENDER "ද ඳ උ ල තූ තු බු දු" + AF_BLUE_STRING_SUNDANESE_TOP + "ᮋ ᮞ ᮮ ᮽ ᮰ ᮈ" + AF_BLUE_STRING_SUNDANESE_BOTTOM + "ᮄ ᮔ ᮕ ᮗ ᮰ ᮆ ᮈ ᮉ" + AF_BLUE_STRING_SUNDANESE_DESCENDER + "ᮼ ᳄" + + AF_BLUE_STRING_TAI_VIET_TOP + "ꪆ ꪔ ꪒ ꪖ ꪫ" + AF_BLUE_STRING_TAI_VIET_BOTTOM + "ꪉ ꪫ ꪮ" + AF_BLUE_STRING_TAMIL_TOP "உ ஒ ஓ ற ஈ க ங ச" AF_BLUE_STRING_TAMIL_BOTTOM @@ -318,7 +493,15 @@ AF_BLUE_STRING_THAI_DIGIT_TOP "๐ ๑ ๓" + AF_BLUE_STRING_TIFINAGH + "ⵔ ⵙ ⵛ ⵞ ⴵ ⴼ ⴹ ⵎ" + AF_BLUE_STRING_VAI_TOP + "ꗍ ꘖ ꘙ ꘜ ꖜ ꖝ ꔅ ꕢ" + AF_BLUE_STRING_VAI_BOTTOM + "ꗍ ꘖ ꘙ ꗞ ꔅ ꕢ ꖜ ꔆ" + + #ifdef AF_CONFIG_OPTION_CJK AF_BLUE_STRING_CJK_TOP @@ -483,6 +666,14 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN: + AF_BLUE_STRINGSET_ADLM + { AF_BLUE_STRING_ADLAM_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_ADLAM_CAPITAL_BOTTOM, 0 } + { AF_BLUE_STRING_ADLAM_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | + AF_BLUE_PROPERTY_LATIN_X_HEIGHT } + { AF_BLUE_STRING_ADLAM_SMALL_BOTTOM, 0 } + { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_STRINGSET_ARAB { AF_BLUE_STRING_ARABIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP } { AF_BLUE_STRING_ARABIC_BOTTOM, 0 } @@ -499,6 +690,16 @@ { AF_BLUE_STRING_ARMENIAN_SMALL_DESCENDER, 0 } { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_STRINGSET_AVST + { AF_BLUE_STRING_AVESTAN_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_AVESTAN_BOTTOM, 0 } + { AF_BLUE_STRING_MAX, 0 } + + AF_BLUE_STRINGSET_BAMU + { AF_BLUE_STRING_BAMUM_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_BAMUM_BOTTOM, 0 } + { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_STRINGSET_BENG { AF_BLUE_STRING_BENGALI_TOP, AF_BLUE_PROPERTY_LATIN_TOP } { AF_BLUE_STRING_BENGALI_HEAD, AF_BLUE_PROPERTY_LATIN_TOP } @@ -508,6 +709,35 @@ { AF_BLUE_STRING_BENGALI_BASE, 0 } { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_STRINGSET_BUHD + { AF_BLUE_STRING_BUHID_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_BUHID_LARGE, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_BUHID_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | + AF_BLUE_PROPERTY_LATIN_X_HEIGHT } + { AF_BLUE_STRING_BUHID_BOTTOM, 0 } + { AF_BLUE_STRING_MAX, 0 } + + AF_BLUE_STRINGSET_CAKM + { AF_BLUE_STRING_CHAKMA_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_CHAKMA_BOTTOM, 0 } + { AF_BLUE_STRING_CHAKMA_DESCENDER, 0 } + { AF_BLUE_STRING_MAX, 0 } + + AF_BLUE_STRINGSET_CANS + { AF_BLUE_STRING_CANADIAN_SYLLABICS_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_CANADIAN_SYLLABICS_BOTTOM, 0 } + { AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | + AF_BLUE_PROPERTY_LATIN_X_HEIGHT } + { AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_BOTTOM, 0 } + { AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_BOTTOM, 0 } + { AF_BLUE_STRING_MAX, 0 } + + AF_BLUE_STRINGSET_CARI + { AF_BLUE_STRING_CARIAN_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_CARIAN_BOTTOM, 0 } + { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_STRINGSET_CHER { AF_BLUE_STRING_CHEROKEE_CAPITAL, AF_BLUE_PROPERTY_LATIN_TOP } { AF_BLUE_STRING_CHEROKEE_CAPITAL, 0 } @@ -518,6 +748,21 @@ { AF_BLUE_STRING_CHEROKEE_SMALL_DESCENDER, 0 } { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_STRINGSET_COPT + { AF_BLUE_STRING_COPTIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_COPTIC_CAPITAL_BOTTOM, 0 } + { AF_BLUE_STRING_COPTIC_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | + AF_BLUE_PROPERTY_LATIN_X_HEIGHT } + { AF_BLUE_STRING_COPTIC_SMALL_BOTTOM, 0 } + { AF_BLUE_STRING_MAX, 0 } + + AF_BLUE_STRINGSET_CPRT + { AF_BLUE_STRING_CYPRIOT_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_CYPRIOT_BOTTOM, 0 } + { AF_BLUE_STRING_CYPRIOT_SMALL, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_CYPRIOT_SMALL, 0 } + { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_STRINGSET_CYRL { AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } { AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM, 0 } @@ -537,6 +782,14 @@ { AF_BLUE_STRING_DEVANAGARI_BOTTOM, 0 } { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_STRINGSET_DSRT + { AF_BLUE_STRING_DESERET_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_DESERET_CAPITAL_BOTTOM, 0 } + { AF_BLUE_STRING_DESERET_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | + AF_BLUE_PROPERTY_LATIN_X_HEIGHT } + { AF_BLUE_STRING_DESERET_SMALL_BOTTOM, 0 } + { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_STRINGSET_ETHI { AF_BLUE_STRING_ETHIOPIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP } { AF_BLUE_STRING_ETHIOPIC_BOTTOM, 0 } @@ -561,6 +814,19 @@ { AF_BLUE_STRING_GEORGIAN_NUSKHURI_DESCENDER, 0 } { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_STRINGSET_GLAG + { AF_BLUE_STRING_GLAGOLITIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_GLAGOLITIC_CAPITAL_BOTTOM, 0 } + { AF_BLUE_STRING_GLAGOLITIC_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | + AF_BLUE_PROPERTY_LATIN_X_HEIGHT } + { AF_BLUE_STRING_GLAGOLITIC_SMALL_BOTTOM, 0 } + { AF_BLUE_STRING_MAX, 0 } + + AF_BLUE_STRINGSET_GOTH + { AF_BLUE_STRING_GOTHIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_GOTHIC_BOTTOM, 0 } + { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_STRINGSET_GREK { AF_BLUE_STRING_GREEK_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } { AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM, 0 } @@ -597,6 +863,15 @@ { AF_BLUE_STRING_HEBREW_DESCENDER, 0 } { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_STRINGSET_KALI + { AF_BLUE_STRING_KAYAH_LI_TOP, AF_BLUE_PROPERTY_LATIN_TOP | + AF_BLUE_PROPERTY_LATIN_X_HEIGHT } + { AF_BLUE_STRING_KAYAH_LI_BOTTOM, 0 } + { AF_BLUE_STRING_KAYAH_LI_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_KAYAH_LI_DESCENDER, 0 } + { AF_BLUE_STRING_KAYAH_LI_LARGE_DESCENDER, 0 } + { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_STRINGSET_KNDA { AF_BLUE_STRING_KANNADA_TOP, AF_BLUE_PROPERTY_LATIN_TOP } { AF_BLUE_STRING_KANNADA_BOTTOM, 0 } @@ -630,9 +905,9 @@ { AF_BLUE_STRING_LATIN_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } { AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM, 0 } { AF_BLUE_STRING_LATIN_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_LATIN_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | + { AF_BLUE_STRING_LATIN_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_LATIN_SMALL, 0 } + { AF_BLUE_STRING_LATIN_SMALL_BOTTOM, 0 } { AF_BLUE_STRING_LATIN_SMALL_DESCENDER, 0 } { AF_BLUE_STRING_MAX, 0 } @@ -656,6 +931,11 @@ { AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER, 0 } { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_STRINGSET_LISU + { AF_BLUE_STRING_LISU_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_LISU_BOTTOM, 0 } + { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_STRINGSET_MLYM { AF_BLUE_STRING_MALAYALAM_TOP, AF_BLUE_PROPERTY_LATIN_TOP } { AF_BLUE_STRING_MALAYALAM_BOTTOM, 0 } @@ -669,9 +949,57 @@ { AF_BLUE_STRING_MYANMAR_DESCENDER, 0 } { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_STRINGSET_NKOO + { AF_BLUE_STRING_NKO_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_NKO_BOTTOM, 0 } + { AF_BLUE_STRING_NKO_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | + AF_BLUE_PROPERTY_LATIN_X_HEIGHT } + { AF_BLUE_STRING_NKO_SMALL_BOTTOM, 0 } + { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_STRINGSET_NONE { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_STRINGSET_OLCK + { AF_BLUE_STRING_OL_CHIKI, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_OL_CHIKI, 0 } + { AF_BLUE_STRING_MAX, 0 } + + AF_BLUE_STRINGSET_ORKH + { AF_BLUE_STRING_OLD_TURKIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_OLD_TURKIC_BOTTOM, 0 } + { AF_BLUE_STRING_MAX, 0 } + + AF_BLUE_STRINGSET_OSGE + { AF_BLUE_STRING_OSAGE_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_OSAGE_CAPITAL_BOTTOM, 0 } + { AF_BLUE_STRING_OSAGE_CAPITAL_DESCENDER, 0 } + { AF_BLUE_STRING_OSAGE_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | + AF_BLUE_PROPERTY_LATIN_X_HEIGHT } + { AF_BLUE_STRING_OSAGE_SMALL_BOTTOM, 0 } + { AF_BLUE_STRING_OSAGE_SMALL_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_OSAGE_SMALL_DESCENDER, 0 } + { AF_BLUE_STRING_MAX, 0 } + + AF_BLUE_STRINGSET_OSMA + { AF_BLUE_STRING_OSMANYA_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_OSMANYA_BOTTOM, 0 } + { AF_BLUE_STRING_MAX, 0 } + + AF_BLUE_STRINGSET_SAUR + { AF_BLUE_STRING_SAURASHTRA_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_SAURASHTRA_BOTTOM, 0 } + { AF_BLUE_STRING_MAX, 0 } + + AF_BLUE_STRINGSET_SHAW + { AF_BLUE_STRING_SHAVIAN_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_SHAVIAN_BOTTOM, 0 } + { AF_BLUE_STRING_SHAVIAN_DESCENDER, 0 } + { AF_BLUE_STRING_SHAVIAN_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | + AF_BLUE_PROPERTY_LATIN_X_HEIGHT } + { AF_BLUE_STRING_SHAVIAN_SMALL_BOTTOM, 0 } + { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_STRINGSET_SINH { AF_BLUE_STRING_SINHALA_TOP, AF_BLUE_PROPERTY_LATIN_TOP } { AF_BLUE_STRING_SINHALA_BOTTOM, 0 } @@ -678,11 +1006,22 @@ { AF_BLUE_STRING_SINHALA_DESCENDER, 0 } { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_STRINGSET_SUND + { AF_BLUE_STRING_SUNDANESE_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_SUNDANESE_BOTTOM, 0 } + { AF_BLUE_STRING_SUNDANESE_DESCENDER, 0 } + { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_STRINGSET_TAML { AF_BLUE_STRING_TAMIL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } { AF_BLUE_STRING_TAMIL_BOTTOM, 0 } { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_STRINGSET_TAVT + { AF_BLUE_STRING_TAI_VIET_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_TAI_VIET_BOTTOM, 0 } + { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_STRINGSET_TELU { AF_BLUE_STRING_TELUGU_TOP, AF_BLUE_PROPERTY_LATIN_TOP } { AF_BLUE_STRING_TELUGU_BOTTOM, 0 } @@ -699,7 +1038,16 @@ { AF_BLUE_STRING_THAI_DIGIT_TOP, 0 } { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_STRINGSET_TFNG + { AF_BLUE_STRING_TIFINAGH, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_TIFINAGH, 0 } + { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_STRINGSET_VAII + { AF_BLUE_STRING_VAI_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_VAI_BOTTOM, 0 } + { AF_BLUE_STRING_MAX, 0 } + #ifdef AF_CONFIG_OPTION_CJK AF_BLUE_STRINGSET_HANI Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/afblue.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/afblue.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/afblue.h (working copy) @@ -7,7 +7,7 @@ /* */ /* Auto-fitter data for blue strings (specification). */ /* */ -/* Copyright 2013-2016 by */ +/* Copyright 2013-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -77,110 +77,189 @@ typedef enum AF_Blue_String_ { - AF_BLUE_STRING_ARABIC_TOP = 0, - AF_BLUE_STRING_ARABIC_BOTTOM = 18, - AF_BLUE_STRING_ARABIC_JOIN = 33, - AF_BLUE_STRING_ARMENIAN_CAPITAL_TOP = 36, - AF_BLUE_STRING_ARMENIAN_CAPITAL_BOTTOM = 60, - AF_BLUE_STRING_ARMENIAN_SMALL_ASCENDER = 84, - AF_BLUE_STRING_ARMENIAN_SMALL_TOP = 105, - AF_BLUE_STRING_ARMENIAN_SMALL_BOTTOM = 129, - AF_BLUE_STRING_ARMENIAN_SMALL_DESCENDER = 153, - AF_BLUE_STRING_BENGALI_BASE = 177, - AF_BLUE_STRING_BENGALI_TOP = 209, - AF_BLUE_STRING_BENGALI_HEAD = 237, - AF_BLUE_STRING_CHEROKEE_CAPITAL = 269, - AF_BLUE_STRING_CHEROKEE_SMALL_ASCENDER = 301, - AF_BLUE_STRING_CHEROKEE_SMALL = 333, - AF_BLUE_STRING_CHEROKEE_SMALL_DESCENDER = 365, - AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP = 381, - AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM = 405, - AF_BLUE_STRING_CYRILLIC_SMALL = 429, - AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER = 453, - AF_BLUE_STRING_DEVANAGARI_BASE = 462, - AF_BLUE_STRING_DEVANAGARI_TOP = 494, - AF_BLUE_STRING_DEVANAGARI_HEAD = 526, - AF_BLUE_STRING_DEVANAGARI_BOTTOM = 558, - AF_BLUE_STRING_ETHIOPIC_TOP = 566, - AF_BLUE_STRING_ETHIOPIC_BOTTOM = 598, - AF_BLUE_STRING_GEORGIAN_MKHEDRULI_TOP = 630, - AF_BLUE_STRING_GEORGIAN_MKHEDRULI_BOTTOM = 662, - AF_BLUE_STRING_GEORGIAN_MKHEDRULI_ASCENDER = 694, - AF_BLUE_STRING_GEORGIAN_MKHEDRULI_DESCENDER = 726, - AF_BLUE_STRING_GEORGIAN_ASOMTAVRULI_TOP = 758, - AF_BLUE_STRING_GEORGIAN_ASOMTAVRULI_BOTTOM = 790, - AF_BLUE_STRING_GEORGIAN_NUSKHURI_TOP = 822, - AF_BLUE_STRING_GEORGIAN_NUSKHURI_BOTTOM = 854, - AF_BLUE_STRING_GEORGIAN_NUSKHURI_ASCENDER = 886, - AF_BLUE_STRING_GEORGIAN_NUSKHURI_DESCENDER = 918, - AF_BLUE_STRING_GREEK_CAPITAL_TOP = 950, - AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM = 971, - AF_BLUE_STRING_GREEK_SMALL_BETA_TOP = 989, - AF_BLUE_STRING_GREEK_SMALL = 1007, - AF_BLUE_STRING_GREEK_SMALL_DESCENDER = 1031, - AF_BLUE_STRING_GUJARATI_TOP = 1055, - AF_BLUE_STRING_GUJARATI_BOTTOM = 1087, - AF_BLUE_STRING_GUJARATI_ASCENDER = 1119, - AF_BLUE_STRING_GUJARATI_DESCENDER = 1169, - AF_BLUE_STRING_GUJARATI_DIGIT_TOP = 1202, - AF_BLUE_STRING_GURMUKHI_BASE = 1222, - AF_BLUE_STRING_GURMUKHI_HEAD = 1254, - AF_BLUE_STRING_GURMUKHI_TOP = 1286, - AF_BLUE_STRING_GURMUKHI_BOTTOM = 1318, - AF_BLUE_STRING_GURMUKHI_DIGIT_TOP = 1350, - AF_BLUE_STRING_HEBREW_TOP = 1370, - AF_BLUE_STRING_HEBREW_BOTTOM = 1394, - AF_BLUE_STRING_HEBREW_DESCENDER = 1412, - AF_BLUE_STRING_KANNADA_TOP = 1427, - AF_BLUE_STRING_KANNADA_BOTTOM = 1471, - AF_BLUE_STRING_KHMER_TOP = 1503, - AF_BLUE_STRING_KHMER_SUBSCRIPT_TOP = 1527, - AF_BLUE_STRING_KHMER_BOTTOM = 1567, - AF_BLUE_STRING_KHMER_DESCENDER = 1599, - AF_BLUE_STRING_KHMER_LARGE_DESCENDER = 1633, - AF_BLUE_STRING_KHMER_SYMBOLS_WAXING_TOP = 1720, - AF_BLUE_STRING_KHMER_SYMBOLS_WANING_BOTTOM = 1728, - AF_BLUE_STRING_LAO_TOP = 1736, - AF_BLUE_STRING_LAO_BOTTOM = 1768, - AF_BLUE_STRING_LAO_ASCENDER = 1800, - AF_BLUE_STRING_LAO_LARGE_ASCENDER = 1816, - AF_BLUE_STRING_LAO_DESCENDER = 1828, - AF_BLUE_STRING_LATIN_CAPITAL_TOP = 1852, - AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM = 1868, - AF_BLUE_STRING_LATIN_SMALL_F_TOP = 1884, - AF_BLUE_STRING_LATIN_SMALL = 1898, - AF_BLUE_STRING_LATIN_SMALL_DESCENDER = 1912, - AF_BLUE_STRING_LATIN_SUBS_CAPITAL_TOP = 1922, - AF_BLUE_STRING_LATIN_SUBS_CAPITAL_BOTTOM = 1942, - AF_BLUE_STRING_LATIN_SUBS_SMALL_F_TOP = 1962, - AF_BLUE_STRING_LATIN_SUBS_SMALL = 1982, - AF_BLUE_STRING_LATIN_SUBS_SMALL_DESCENDER = 2018, - AF_BLUE_STRING_LATIN_SUPS_CAPITAL_TOP = 2038, - AF_BLUE_STRING_LATIN_SUPS_CAPITAL_BOTTOM = 2069, - AF_BLUE_STRING_LATIN_SUPS_SMALL_F_TOP = 2098, - AF_BLUE_STRING_LATIN_SUPS_SMALL = 2124, - AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER = 2149, - AF_BLUE_STRING_MALAYALAM_TOP = 2160, - AF_BLUE_STRING_MALAYALAM_BOTTOM = 2204, - AF_BLUE_STRING_MYANMAR_TOP = 2236, - AF_BLUE_STRING_MYANMAR_BOTTOM = 2268, - AF_BLUE_STRING_MYANMAR_ASCENDER = 2300, - AF_BLUE_STRING_MYANMAR_DESCENDER = 2328, - AF_BLUE_STRING_SINHALA_TOP = 2360, - AF_BLUE_STRING_SINHALA_BOTTOM = 2392, - AF_BLUE_STRING_SINHALA_DESCENDER = 2424, - AF_BLUE_STRING_TAMIL_TOP = 2468, - AF_BLUE_STRING_TAMIL_BOTTOM = 2500, - AF_BLUE_STRING_TELUGU_TOP = 2532, - AF_BLUE_STRING_TELUGU_BOTTOM = 2560, - AF_BLUE_STRING_THAI_TOP = 2588, - AF_BLUE_STRING_THAI_BOTTOM = 2612, - AF_BLUE_STRING_THAI_ASCENDER = 2640, - AF_BLUE_STRING_THAI_LARGE_ASCENDER = 2652, - AF_BLUE_STRING_THAI_DESCENDER = 2664, - AF_BLUE_STRING_THAI_LARGE_DESCENDER = 2680, - AF_BLUE_STRING_THAI_DIGIT_TOP = 2688, - af_blue_1_1 = 2699, + AF_BLUE_STRING_ADLAM_CAPITAL_TOP = 0, + AF_BLUE_STRING_ADLAM_CAPITAL_BOTTOM = 30, + AF_BLUE_STRING_ADLAM_SMALL_TOP = 40, + AF_BLUE_STRING_ADLAM_SMALL_BOTTOM = 65, + AF_BLUE_STRING_ARABIC_TOP = 105, + AF_BLUE_STRING_ARABIC_BOTTOM = 123, + AF_BLUE_STRING_ARABIC_JOIN = 138, + AF_BLUE_STRING_ARMENIAN_CAPITAL_TOP = 141, + AF_BLUE_STRING_ARMENIAN_CAPITAL_BOTTOM = 165, + AF_BLUE_STRING_ARMENIAN_SMALL_ASCENDER = 189, + AF_BLUE_STRING_ARMENIAN_SMALL_TOP = 210, + AF_BLUE_STRING_ARMENIAN_SMALL_BOTTOM = 234, + AF_BLUE_STRING_ARMENIAN_SMALL_DESCENDER = 258, + AF_BLUE_STRING_AVESTAN_TOP = 282, + AF_BLUE_STRING_AVESTAN_BOTTOM = 302, + AF_BLUE_STRING_BAMUM_TOP = 312, + AF_BLUE_STRING_BAMUM_BOTTOM = 344, + AF_BLUE_STRING_BENGALI_BASE = 376, + AF_BLUE_STRING_BENGALI_TOP = 408, + AF_BLUE_STRING_BENGALI_HEAD = 436, + AF_BLUE_STRING_BUHID_TOP = 468, + AF_BLUE_STRING_BUHID_LARGE = 476, + AF_BLUE_STRING_BUHID_SMALL = 488, + AF_BLUE_STRING_BUHID_BOTTOM = 504, + AF_BLUE_STRING_CANADIAN_SYLLABICS_TOP = 532, + AF_BLUE_STRING_CANADIAN_SYLLABICS_BOTTOM = 564, + AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_TOP = 596, + AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_BOTTOM = 628, + AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_TOP = 660, + AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_BOTTOM = 688, + AF_BLUE_STRING_CARIAN_TOP = 720, + AF_BLUE_STRING_CARIAN_BOTTOM = 760, + AF_BLUE_STRING_CHAKMA_TOP = 795, + AF_BLUE_STRING_CHAKMA_BOTTOM = 820, + AF_BLUE_STRING_CHAKMA_DESCENDER = 845, + AF_BLUE_STRING_CHEROKEE_CAPITAL = 910, + AF_BLUE_STRING_CHEROKEE_SMALL_ASCENDER = 942, + AF_BLUE_STRING_CHEROKEE_SMALL = 974, + AF_BLUE_STRING_CHEROKEE_SMALL_DESCENDER = 1006, + AF_BLUE_STRING_COPTIC_CAPITAL_TOP = 1022, + AF_BLUE_STRING_COPTIC_CAPITAL_BOTTOM = 1054, + AF_BLUE_STRING_COPTIC_SMALL_TOP = 1086, + AF_BLUE_STRING_COPTIC_SMALL_BOTTOM = 1118, + AF_BLUE_STRING_CYPRIOT_TOP = 1150, + AF_BLUE_STRING_CYPRIOT_BOTTOM = 1190, + AF_BLUE_STRING_CYPRIOT_SMALL = 1225, + AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP = 1240, + AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM = 1264, + AF_BLUE_STRING_CYRILLIC_SMALL = 1288, + AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER = 1312, + AF_BLUE_STRING_DESERET_CAPITAL_TOP = 1321, + AF_BLUE_STRING_DESERET_CAPITAL_BOTTOM = 1346, + AF_BLUE_STRING_DESERET_SMALL_TOP = 1371, + AF_BLUE_STRING_DESERET_SMALL_BOTTOM = 1396, + AF_BLUE_STRING_DEVANAGARI_BASE = 1421, + AF_BLUE_STRING_DEVANAGARI_TOP = 1453, + AF_BLUE_STRING_DEVANAGARI_HEAD = 1485, + AF_BLUE_STRING_DEVANAGARI_BOTTOM = 1517, + AF_BLUE_STRING_ETHIOPIC_TOP = 1525, + AF_BLUE_STRING_ETHIOPIC_BOTTOM = 1557, + AF_BLUE_STRING_GEORGIAN_MKHEDRULI_TOP = 1589, + AF_BLUE_STRING_GEORGIAN_MKHEDRULI_BOTTOM = 1621, + AF_BLUE_STRING_GEORGIAN_MKHEDRULI_ASCENDER = 1653, + AF_BLUE_STRING_GEORGIAN_MKHEDRULI_DESCENDER = 1685, + AF_BLUE_STRING_GEORGIAN_ASOMTAVRULI_TOP = 1717, + AF_BLUE_STRING_GEORGIAN_ASOMTAVRULI_BOTTOM = 1749, + AF_BLUE_STRING_GEORGIAN_NUSKHURI_TOP = 1781, + AF_BLUE_STRING_GEORGIAN_NUSKHURI_BOTTOM = 1813, + AF_BLUE_STRING_GEORGIAN_NUSKHURI_ASCENDER = 1845, + AF_BLUE_STRING_GEORGIAN_NUSKHURI_DESCENDER = 1877, + AF_BLUE_STRING_GLAGOLITIC_CAPITAL_TOP = 1909, + AF_BLUE_STRING_GLAGOLITIC_CAPITAL_BOTTOM = 1941, + AF_BLUE_STRING_GLAGOLITIC_SMALL_TOP = 1973, + AF_BLUE_STRING_GLAGOLITIC_SMALL_BOTTOM = 2005, + AF_BLUE_STRING_GOTHIC_TOP = 2037, + AF_BLUE_STRING_GOTHIC_BOTTOM = 2077, + AF_BLUE_STRING_GREEK_CAPITAL_TOP = 2097, + AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM = 2118, + AF_BLUE_STRING_GREEK_SMALL_BETA_TOP = 2136, + AF_BLUE_STRING_GREEK_SMALL = 2154, + AF_BLUE_STRING_GREEK_SMALL_DESCENDER = 2178, + AF_BLUE_STRING_GUJARATI_TOP = 2202, + AF_BLUE_STRING_GUJARATI_BOTTOM = 2234, + AF_BLUE_STRING_GUJARATI_ASCENDER = 2266, + AF_BLUE_STRING_GUJARATI_DESCENDER = 2316, + AF_BLUE_STRING_GUJARATI_DIGIT_TOP = 2349, + AF_BLUE_STRING_GURMUKHI_BASE = 2369, + AF_BLUE_STRING_GURMUKHI_HEAD = 2401, + AF_BLUE_STRING_GURMUKHI_TOP = 2433, + AF_BLUE_STRING_GURMUKHI_BOTTOM = 2465, + AF_BLUE_STRING_GURMUKHI_DIGIT_TOP = 2497, + AF_BLUE_STRING_HEBREW_TOP = 2517, + AF_BLUE_STRING_HEBREW_BOTTOM = 2541, + AF_BLUE_STRING_HEBREW_DESCENDER = 2559, + AF_BLUE_STRING_KANNADA_TOP = 2574, + AF_BLUE_STRING_KANNADA_BOTTOM = 2618, + AF_BLUE_STRING_KAYAH_LI_TOP = 2650, + AF_BLUE_STRING_KAYAH_LI_BOTTOM = 2674, + AF_BLUE_STRING_KAYAH_LI_ASCENDER = 2694, + AF_BLUE_STRING_KAYAH_LI_DESCENDER = 2702, + AF_BLUE_STRING_KAYAH_LI_LARGE_DESCENDER = 2714, + AF_BLUE_STRING_KHMER_TOP = 2735, + AF_BLUE_STRING_KHMER_SUBSCRIPT_TOP = 2759, + AF_BLUE_STRING_KHMER_BOTTOM = 2799, + AF_BLUE_STRING_KHMER_DESCENDER = 2831, + AF_BLUE_STRING_KHMER_LARGE_DESCENDER = 2865, + AF_BLUE_STRING_KHMER_SYMBOLS_WAXING_TOP = 2952, + AF_BLUE_STRING_KHMER_SYMBOLS_WANING_BOTTOM = 2960, + AF_BLUE_STRING_LAO_TOP = 2968, + AF_BLUE_STRING_LAO_BOTTOM = 3000, + AF_BLUE_STRING_LAO_ASCENDER = 3032, + AF_BLUE_STRING_LAO_LARGE_ASCENDER = 3048, + AF_BLUE_STRING_LAO_DESCENDER = 3060, + AF_BLUE_STRING_LATIN_CAPITAL_TOP = 3084, + AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM = 3100, + AF_BLUE_STRING_LATIN_SMALL_F_TOP = 3116, + AF_BLUE_STRING_LATIN_SMALL_TOP = 3130, + AF_BLUE_STRING_LATIN_SMALL_BOTTOM = 3146, + AF_BLUE_STRING_LATIN_SMALL_DESCENDER = 3162, + AF_BLUE_STRING_LATIN_SUBS_CAPITAL_TOP = 3172, + AF_BLUE_STRING_LATIN_SUBS_CAPITAL_BOTTOM = 3192, + AF_BLUE_STRING_LATIN_SUBS_SMALL_F_TOP = 3212, + AF_BLUE_STRING_LATIN_SUBS_SMALL = 3232, + AF_BLUE_STRING_LATIN_SUBS_SMALL_DESCENDER = 3268, + AF_BLUE_STRING_LATIN_SUPS_CAPITAL_TOP = 3288, + AF_BLUE_STRING_LATIN_SUPS_CAPITAL_BOTTOM = 3319, + AF_BLUE_STRING_LATIN_SUPS_SMALL_F_TOP = 3348, + AF_BLUE_STRING_LATIN_SUPS_SMALL = 3374, + AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER = 3399, + AF_BLUE_STRING_LISU_TOP = 3410, + AF_BLUE_STRING_LISU_BOTTOM = 3442, + AF_BLUE_STRING_MALAYALAM_TOP = 3474, + AF_BLUE_STRING_MALAYALAM_BOTTOM = 3518, + AF_BLUE_STRING_MYANMAR_TOP = 3550, + AF_BLUE_STRING_MYANMAR_BOTTOM = 3582, + AF_BLUE_STRING_MYANMAR_ASCENDER = 3614, + AF_BLUE_STRING_MYANMAR_DESCENDER = 3642, + AF_BLUE_STRING_NKO_TOP = 3674, + AF_BLUE_STRING_NKO_BOTTOM = 3698, + AF_BLUE_STRING_NKO_SMALL_TOP = 3713, + AF_BLUE_STRING_NKO_SMALL_BOTTOM = 3722, + AF_BLUE_STRING_OL_CHIKI = 3734, + AF_BLUE_STRING_OLD_TURKIC_TOP = 3758, + AF_BLUE_STRING_OLD_TURKIC_BOTTOM = 3773, + AF_BLUE_STRING_OSAGE_CAPITAL_TOP = 3793, + AF_BLUE_STRING_OSAGE_CAPITAL_BOTTOM = 3833, + AF_BLUE_STRING_OSAGE_CAPITAL_DESCENDER = 3863, + AF_BLUE_STRING_OSAGE_SMALL_TOP = 3878, + AF_BLUE_STRING_OSAGE_SMALL_BOTTOM = 3918, + AF_BLUE_STRING_OSAGE_SMALL_ASCENDER = 3958, + AF_BLUE_STRING_OSAGE_SMALL_DESCENDER = 3983, + AF_BLUE_STRING_OSMANYA_TOP = 3998, + AF_BLUE_STRING_OSMANYA_BOTTOM = 4038, + AF_BLUE_STRING_SAURASHTRA_TOP = 4078, + AF_BLUE_STRING_SAURASHTRA_BOTTOM = 4110, + AF_BLUE_STRING_SHAVIAN_TOP = 4130, + AF_BLUE_STRING_SHAVIAN_BOTTOM = 4140, + AF_BLUE_STRING_SHAVIAN_DESCENDER = 4165, + AF_BLUE_STRING_SHAVIAN_SMALL_TOP = 4175, + AF_BLUE_STRING_SHAVIAN_SMALL_BOTTOM = 4210, + AF_BLUE_STRING_SINHALA_TOP = 4225, + AF_BLUE_STRING_SINHALA_BOTTOM = 4257, + AF_BLUE_STRING_SINHALA_DESCENDER = 4289, + AF_BLUE_STRING_SUNDANESE_TOP = 4333, + AF_BLUE_STRING_SUNDANESE_BOTTOM = 4357, + AF_BLUE_STRING_SUNDANESE_DESCENDER = 4389, + AF_BLUE_STRING_TAI_VIET_TOP = 4397, + AF_BLUE_STRING_TAI_VIET_BOTTOM = 4417, + AF_BLUE_STRING_TAMIL_TOP = 4429, + AF_BLUE_STRING_TAMIL_BOTTOM = 4461, + AF_BLUE_STRING_TELUGU_TOP = 4493, + AF_BLUE_STRING_TELUGU_BOTTOM = 4521, + AF_BLUE_STRING_THAI_TOP = 4549, + AF_BLUE_STRING_THAI_BOTTOM = 4573, + AF_BLUE_STRING_THAI_ASCENDER = 4601, + AF_BLUE_STRING_THAI_LARGE_ASCENDER = 4613, + AF_BLUE_STRING_THAI_DESCENDER = 4625, + AF_BLUE_STRING_THAI_LARGE_DESCENDER = 4641, + AF_BLUE_STRING_THAI_DIGIT_TOP = 4649, + AF_BLUE_STRING_TIFINAGH = 4661, + AF_BLUE_STRING_VAI_TOP = 4693, + AF_BLUE_STRING_VAI_BOTTOM = 4725, + af_blue_1_1 = 4756, #ifdef AF_CONFIG_OPTION_CJK AF_BLUE_STRING_CJK_TOP = af_blue_1_1 + 1, AF_BLUE_STRING_CJK_BOTTOM = af_blue_1_1 + 203, @@ -239,34 +318,59 @@ typedef enum AF_Blue_Stringset_ { - AF_BLUE_STRINGSET_ARAB = 0, - AF_BLUE_STRINGSET_ARMN = 4, - AF_BLUE_STRINGSET_BENG = 11, - AF_BLUE_STRINGSET_CHER = 16, - AF_BLUE_STRINGSET_CYRL = 23, - AF_BLUE_STRINGSET_DEVA = 29, - AF_BLUE_STRINGSET_ETHI = 35, - AF_BLUE_STRINGSET_GEOR = 38, - AF_BLUE_STRINGSET_GEOK = 43, - AF_BLUE_STRINGSET_GREK = 50, - AF_BLUE_STRINGSET_GUJR = 57, - AF_BLUE_STRINGSET_GURU = 63, - AF_BLUE_STRINGSET_HEBR = 69, - AF_BLUE_STRINGSET_KNDA = 73, - AF_BLUE_STRINGSET_KHMR = 76, - AF_BLUE_STRINGSET_KHMS = 82, - AF_BLUE_STRINGSET_LAO = 85, - AF_BLUE_STRINGSET_LATN = 91, - AF_BLUE_STRINGSET_LATB = 98, - AF_BLUE_STRINGSET_LATP = 105, - AF_BLUE_STRINGSET_MLYM = 112, - AF_BLUE_STRINGSET_MYMR = 115, - AF_BLUE_STRINGSET_NONE = 120, - AF_BLUE_STRINGSET_SINH = 121, - AF_BLUE_STRINGSET_TAML = 125, - AF_BLUE_STRINGSET_TELU = 128, - AF_BLUE_STRINGSET_THAI = 131, - af_blue_2_1 = 139, + AF_BLUE_STRINGSET_ADLM = 0, + AF_BLUE_STRINGSET_ARAB = 5, + AF_BLUE_STRINGSET_ARMN = 9, + AF_BLUE_STRINGSET_AVST = 16, + AF_BLUE_STRINGSET_BAMU = 19, + AF_BLUE_STRINGSET_BENG = 22, + AF_BLUE_STRINGSET_BUHD = 27, + AF_BLUE_STRINGSET_CAKM = 32, + AF_BLUE_STRINGSET_CANS = 36, + AF_BLUE_STRINGSET_CARI = 43, + AF_BLUE_STRINGSET_CHER = 46, + AF_BLUE_STRINGSET_COPT = 53, + AF_BLUE_STRINGSET_CPRT = 58, + AF_BLUE_STRINGSET_CYRL = 63, + AF_BLUE_STRINGSET_DEVA = 69, + AF_BLUE_STRINGSET_DSRT = 75, + AF_BLUE_STRINGSET_ETHI = 80, + AF_BLUE_STRINGSET_GEOR = 83, + AF_BLUE_STRINGSET_GEOK = 88, + AF_BLUE_STRINGSET_GLAG = 95, + AF_BLUE_STRINGSET_GOTH = 100, + AF_BLUE_STRINGSET_GREK = 103, + AF_BLUE_STRINGSET_GUJR = 110, + AF_BLUE_STRINGSET_GURU = 116, + AF_BLUE_STRINGSET_HEBR = 122, + AF_BLUE_STRINGSET_KALI = 126, + AF_BLUE_STRINGSET_KNDA = 132, + AF_BLUE_STRINGSET_KHMR = 135, + AF_BLUE_STRINGSET_KHMS = 141, + AF_BLUE_STRINGSET_LAO = 144, + AF_BLUE_STRINGSET_LATN = 150, + AF_BLUE_STRINGSET_LATB = 157, + AF_BLUE_STRINGSET_LATP = 164, + AF_BLUE_STRINGSET_LISU = 171, + AF_BLUE_STRINGSET_MLYM = 174, + AF_BLUE_STRINGSET_MYMR = 177, + AF_BLUE_STRINGSET_NKOO = 182, + AF_BLUE_STRINGSET_NONE = 187, + AF_BLUE_STRINGSET_OLCK = 188, + AF_BLUE_STRINGSET_ORKH = 191, + AF_BLUE_STRINGSET_OSGE = 194, + AF_BLUE_STRINGSET_OSMA = 202, + AF_BLUE_STRINGSET_SAUR = 205, + AF_BLUE_STRINGSET_SHAW = 208, + AF_BLUE_STRINGSET_SINH = 214, + AF_BLUE_STRINGSET_SUND = 218, + AF_BLUE_STRINGSET_TAML = 222, + AF_BLUE_STRINGSET_TAVT = 225, + AF_BLUE_STRINGSET_TELU = 228, + AF_BLUE_STRINGSET_THAI = 231, + AF_BLUE_STRINGSET_TFNG = 239, + AF_BLUE_STRINGSET_VAII = 242, + af_blue_2_1 = 245, #ifdef AF_CONFIG_OPTION_CJK AF_BLUE_STRINGSET_HANI = af_blue_2_1 + 0, af_blue_2_1_1 = af_blue_2_1 + 2, Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/afblue.hin =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/afblue.hin (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/afblue.hin (working copy) @@ -4,7 +4,7 @@ /* */ /* Auto-fitter data for blue strings (specification). */ /* */ -/* Copyright 2013-2016 by */ +/* Copyright 2013-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/afcjk.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/afcjk.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/afcjk.c (working copy) @@ -4,7 +4,7 @@ /* */ /* Auto-fitter hinting routines for CJK writing system (body). */ /* */ -/* Copyright 2006-2016 by */ +/* Copyright 2006-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -29,6 +29,7 @@ #include "afglobal.h" #include "afpic.h" #include "aflatin.h" +#include "afcjk.h" #ifdef AF_CONFIG_OPTION_CJK @@ -35,7 +36,6 @@ #undef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT -#include "afcjk.h" #include "aferrors.h" @@ -578,7 +578,7 @@ FT_Face face ) { FT_Bool started = 0, same_width = 1; - FT_Fixed advance, old_advance = 0; + FT_Fixed advance = 0, old_advance = 0; void* shaper_buf; @@ -1413,9 +1413,9 @@ other_flags |= AF_LATIN_HINTS_VERT_SNAP; /* - * We adjust stems to full pixels only if we don't use the `light' mode. + * We adjust stems to full pixels unless in `light' or `lcd' mode. */ - if ( mode != FT_RENDER_MODE_LIGHT ) + if ( mode != FT_RENDER_MODE_LIGHT && mode != FT_RENDER_MODE_LCD ) other_flags |= AF_LATIN_HINTS_STEM_ADJUST; if ( mode == FT_RENDER_MODE_MONO ) Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/afcjk.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/afcjk.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/afcjk.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Auto-fitter hinting routines for CJK writing system (specification). */ /* */ -/* Copyright 2006-2016 by */ +/* Copyright 2006-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/afcover.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/afcover.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/afcover.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Auto-fitter coverages (specification only). */ /* */ -/* Copyright 2013-2016 by */ +/* Copyright 2013-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/afdummy.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/afdummy.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/afdummy.c (working copy) @@ -5,7 +5,7 @@ /* Auto-fitter dummy routines to be used if no hinting should be */ /* performed (body). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/afdummy.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/afdummy.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/afdummy.h (working copy) @@ -5,7 +5,7 @@ /* Auto-fitter dummy routines to be used if no hinting should be */ /* performed (specification). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/aferrors.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/aferrors.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/aferrors.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Autofitter error codes (specification only). */ /* */ -/* Copyright 2005-2016 by */ +/* Copyright 2005-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/afglobal.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/afglobal.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/afglobal.c (working copy) @@ -4,7 +4,7 @@ /* */ /* Auto-fitter routines to compute global hinting values (body). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -411,10 +411,7 @@ #ifdef FT_CONFIG_OPTION_USE_HARFBUZZ hb_font_destroy( globals->hb_font ); - globals->hb_font = NULL; - hb_buffer_destroy( globals->hb_buf ); - globals->hb_buf = NULL; #endif /* no need to free `globals->glyph_styles'; */ Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/afglobal.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/afglobal.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/afglobal.h (working copy) @@ -5,7 +5,7 @@ /* Auto-fitter routines to compute global hinting values */ /* (specification). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/afhints.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/afhints.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/afhints.c (working copy) @@ -4,7 +4,7 @@ /* */ /* Auto-fitter hinting routines (body). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/afhints.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/afhints.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/afhints.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Auto-fitter hinting routines (specification). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/afindic.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/afindic.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/afindic.c (working copy) @@ -4,7 +4,7 @@ /* */ /* Auto-fitter hinting routines for Indic writing system (body). */ /* */ -/* Copyright 2007-2016 by */ +/* Copyright 2007-2017 by */ /* Rahul Bhalerao <rahul.bhalerao@redhat.com>, <b.rahul.pm@gmail.com>. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -18,6 +18,7 @@ #include "aftypes.h" #include "aflatin.h" +#include "afcjk.h" #ifdef AF_CONFIG_OPTION_INDIC @@ -24,7 +25,6 @@ #include "afindic.h" #include "aferrors.h" -#include "afcjk.h" #ifdef AF_CONFIG_OPTION_USE_WARPER Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/afindic.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/afindic.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/afindic.h (working copy) @@ -5,7 +5,7 @@ /* Auto-fitter hinting routines for Indic writing system */ /* (specification). */ /* */ -/* Copyright 2007-2016 by */ +/* Copyright 2007-2017 by */ /* Rahul Bhalerao <rahul.bhalerao@redhat.com>, <b.rahul.pm@gmail.com>. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/aflatin.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/aflatin.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/aflatin.c (working copy) @@ -4,7 +4,7 @@ /* */ /* Auto-fitter hinting routines for latin writing system (body). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -281,6 +281,45 @@ } + static void + af_latin_sort_blue( FT_UInt count, + AF_LatinBlue* table ) + { + FT_UInt i, j; + AF_LatinBlue swap; + + + /* we sort from bottom to top */ + for ( i = 1; i < count; i++ ) + { + for ( j = i; j > 0; j-- ) + { + FT_Pos a, b; + + + if ( table[j - 1]->flags & ( AF_LATIN_BLUE_TOP | + AF_LATIN_BLUE_SUB_TOP ) ) + a = table[j - 1]->ref.org; + else + a = table[j - 1]->shoot.org; + + if ( table[j]->flags & ( AF_LATIN_BLUE_TOP | + AF_LATIN_BLUE_SUB_TOP ) ) + b = table[j]->ref.org; + else + b = table[j]->shoot.org; + + if ( b >= a ) + break; + + swap = table[j]; + table[j] = table[j - 1]; + table[j - 1] = swap; + } + } + } + + /* Find all blue zones. Flat segments give the reference points, */ /* round segments the overshoot positions. */ @@ -944,6 +983,60 @@ af_shaper_buf_destroy( face, shaper_buf ); + /* we finally check whether blue zones are ordered; */ + /* `ref' and `shoot' values of two blue zones must not overlap */ + if ( axis->blue_count ) + { + FT_UInt i; + AF_LatinBlue blue_sorted[AF_BLUE_STRINGSET_MAX_LEN + 2]; + + + for ( i = 0; i < axis->blue_count; i++ ) + blue_sorted[i] = &axis->blues[i]; + + /* sort bottoms of blue zones... */ + af_latin_sort_blue( axis->blue_count, blue_sorted ); + + /* ...and adjust top values if necessary */ + for ( i = 0; i < axis->blue_count - 1; i++ ) + { + FT_Pos* a; + FT_Pos* b; + +#ifdef FT_DEBUG_LEVEL_TRACE + FT_Bool a_is_top = 0; +#endif + + + if ( blue_sorted[i]->flags & ( AF_LATIN_BLUE_TOP | + AF_LATIN_BLUE_SUB_TOP ) ) + { + a = &blue_sorted[i]->shoot.org; +#ifdef FT_DEBUG_LEVEL_TRACE + a_is_top = 1; +#endif + } + else + a = &blue_sorted[i]->ref.org; + + if ( blue_sorted[i + 1]->flags & ( AF_LATIN_BLUE_TOP | + AF_LATIN_BLUE_SUB_TOP ) ) + b = &blue_sorted[i + 1]->shoot.org; + else + b = &blue_sorted[i + 1]->ref.org; + + if ( *a > *b ) + { + *a = *b; + FT_TRACE5(( "blue zone overlap:" + " adjusting %s %d to %ld\n", + a_is_top ? "overshoot" : "reference", + blue_sorted[i] - axis->blues, + *a )); + } + } + } + FT_TRACE5(( "\n" )); return; @@ -957,7 +1050,7 @@ FT_Face face ) { FT_Bool started = 0, same_width = 1; - FT_Fixed advance, old_advance = 0; + FT_Fixed advance = 0, old_advance = 0; void* shaper_buf; @@ -1967,6 +2060,10 @@ FT_Memory memory = hints->memory; AF_LatinAxis laxis = &((AF_LatinMetrics)hints->metrics)->axis[dim]; +#ifdef FT_CONFIG_OPTION_PIC + AF_FaceGlobals globals = hints->metrics->globals; +#endif + AF_StyleClass style_class = hints->metrics->style_class; AF_ScriptClass script_class = AF_SCRIPT_CLASSES_GET [style_class->script]; @@ -2494,9 +2591,9 @@ other_flags |= AF_LATIN_HINTS_VERT_SNAP; /* - * We adjust stems to full pixels only if we don't use the `light' mode. + * We adjust stems to full pixels unless in `light' or `lcd' mode. */ - if ( mode != FT_RENDER_MODE_LIGHT ) + if ( mode != FT_RENDER_MODE_LIGHT && mode != FT_RENDER_MODE_LCD ) other_flags |= AF_LATIN_HINTS_STEM_ADJUST; if ( mode == FT_RENDER_MODE_MONO ) @@ -2503,14 +2600,14 @@ other_flags |= AF_LATIN_HINTS_MONO; /* - * In `light' hinting mode we disable horizontal hinting completely. + * In `light' or `lcd' mode we disable horizontal hinting completely. * We also do it if the face is italic. * * However, if warping is enabled (which only works in `light' hinting * mode), advance widths get adjusted, too. */ - if ( mode == FT_RENDER_MODE_LIGHT || - ( face->style_flags & FT_STYLE_FLAG_ITALIC ) != 0 ) + if ( mode == FT_RENDER_MODE_LIGHT || mode == FT_RENDER_MODE_LCD || + ( face->style_flags & FT_STYLE_FLAG_ITALIC ) != 0 ) scaler_flags |= AF_SCALER_FLAG_NO_HORIZONTAL; #ifdef AF_CONFIG_OPTION_USE_WARPER @@ -2850,6 +2947,10 @@ AF_Edge anchor = NULL; FT_Int has_serifs = 0; +#ifdef FT_CONFIG_OPTION_PIC + AF_FaceGlobals globals = hints->metrics->globals; +#endif + AF_StyleClass style_class = hints->metrics->style_class; AF_ScriptClass script_class = AF_SCRIPT_CLASSES_GET [style_class->script]; Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/aflatin.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/aflatin.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/aflatin.h (working copy) @@ -5,7 +5,7 @@ /* Auto-fitter hinting routines for latin writing system */ /* (specification). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/aflatin2.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/aflatin2.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/aflatin2.c (working copy) @@ -9,7 +9,7 @@ /* */ /* Auto-fitter hinting routines for latin writing system (body). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -23,6 +23,9 @@ #include FT_ADVANCES_H + +#ifdef FT_OPTION_AUTOFIT2 + #include "afglobal.h" #include "aflatin.h" #include "aflatin2.h" @@ -1555,9 +1558,9 @@ other_flags |= AF_LATIN_HINTS_VERT_SNAP; /* - * We adjust stems to full pixels only if we don't use the `light' mode. + * We adjust stems to full pixels unless in `light' or `lcd' mode. */ - if ( mode != FT_RENDER_MODE_LIGHT ) + if ( mode != FT_RENDER_MODE_LIGHT && mode != FT_RENDER_MODE_LCD ) other_flags |= AF_LATIN_HINTS_STEM_ADJUST; if ( mode == FT_RENDER_MODE_MONO ) @@ -1564,11 +1567,11 @@ other_flags |= AF_LATIN_HINTS_MONO; /* - * In `light' hinting mode we disable horizontal hinting completely. + * In `light' or `lcd' mode we disable horizontal hinting completely. * We also do it if the face is italic. */ - if ( mode == FT_RENDER_MODE_LIGHT || - ( face->style_flags & FT_STYLE_FLAG_ITALIC ) != 0 ) + if ( mode == FT_RENDER_MODE_LIGHT || mode == FT_RENDER_MODE_LCD || + ( face->style_flags & FT_STYLE_FLAG_ITALIC ) != 0 ) scaler_flags |= AF_SCALER_FLAG_NO_HORIZONTAL; #ifdef AF_CONFIG_OPTION_USE_WARPER @@ -2419,5 +2422,12 @@ (AF_WritingSystem_ApplyHintsFunc) af_latin2_hints_apply /* style_hints_apply */ ) +#else /* !FT_OPTION_AUTOFIT2 */ + /* ANSI C doesn't like empty source files */ + typedef int _af_latin2_dummy; + +#endif /* !FT_OPTION_AUTOFIT2 */ + + /* END */ Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/aflatin2.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/aflatin2.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/aflatin2.h (working copy) @@ -10,7 +10,7 @@ /* Auto-fitter hinting routines for latin writing system */ /* (specification). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/afloader.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/afloader.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/afloader.c (working copy) @@ -4,7 +4,7 @@ /* */ /* Auto-fitter glyph loading routines (body). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -97,11 +97,13 @@ AF_FaceGlobals globals = loader->globals; AF_WritingSystemClass writing_system_class; + FT_Size_Metrics* size_metrics = &face->size->internal->autohint_metrics; + FT_Pos stdVW = 0; FT_Pos stdHW = 0; - FT_Bool size_changed = face->size->metrics.x_ppem - != globals->stem_darkening_for_ppem; + FT_Bool size_changed = size_metrics->x_ppem != + globals->stem_darkening_for_ppem; FT_Fixed em_size = af_intToFixed( face->units_per_EM ); FT_Fixed em_ratio = FT_DivFix( af_intToFixed( 1000 ), em_size ); @@ -112,7 +114,7 @@ /* Skip stem darkening for broken fonts. */ if ( !face->units_per_EM ) { - error = FT_Err_Corrupted_Font_Header; + error = FT_ERR( Corrupted_Font_Header ); goto Exit; } @@ -130,7 +132,7 @@ &stdVW ); else { - error = FT_Err_Unimplemented_Feature; + error = FT_ERR( Unimplemented_Feature ); goto Exit; } @@ -145,11 +147,11 @@ face, stdVW ) ); darken_x = FT_DivFix( FT_MulFix( darken_by_font_units_x, - face->size->metrics.x_scale ), + size_metrics->x_scale ), em_ratio ); globals->standard_vertical_width = stdVW; - globals->stem_darkening_for_ppem = face->size->metrics.x_ppem; + globals->stem_darkening_for_ppem = size_metrics->x_ppem; globals->darken_x = af_fixedToInt( darken_x ); } @@ -164,11 +166,11 @@ face, stdHW ) ); darken_y = FT_DivFix( FT_MulFix( darken_by_font_units_y, - face->size->metrics.y_scale ), + size_metrics->y_scale ), em_ratio ); globals->standard_horizontal_width = stdHW; - globals->stem_darkening_for_ppem = face->size->metrics.x_ppem; + globals->stem_darkening_for_ppem = size_metrics->x_ppem; globals->darken_y = af_fixedToInt( darken_y ); /* @@ -217,15 +219,16 @@ { FT_Error error; - FT_Size size = face->size; - FT_GlyphSlot slot = face->glyph; - FT_Slot_Internal internal = slot->internal; - FT_GlyphLoader gloader = internal->loader; + FT_Size size = face->size; + FT_Size_Internal size_internal = size->internal; + FT_GlyphSlot slot = face->glyph; + FT_Slot_Internal slot_internal = slot->internal; + FT_GlyphLoader gloader = slot_internal->loader; - AF_GlyphHints hints = loader->hints; + AF_GlyphHints hints = loader->hints; AF_ScalerRec scaler; AF_StyleMetrics style_metrics; - FT_UInt style_options = AF_STYLE_NONE_DFLT; + FT_UInt style_options = AF_STYLE_NONE_DFLT; AF_StyleClass style_class; AF_WritingSystemClass writing_system_class; @@ -239,24 +242,65 @@ FT_ZERO( &scaler ); + if ( !size_internal->autohint_metrics.x_scale || + size_internal->autohint_mode != FT_LOAD_TARGET_MODE( load_flags ) ) + { + /* switching between hinting modes usually means different scaling */ + /* values; this later on enforces recomputation of everything */ + /* related to the current size */ + + size_internal->autohint_mode = FT_LOAD_TARGET_MODE( load_flags ); + size_internal->autohint_metrics = size->metrics; + +#ifdef AF_CONFIG_OPTION_TT_SIZE_METRICS + { + FT_Size_Metrics* size_metrics = &size_internal->autohint_metrics; + + + /* set metrics to integer values and adjust scaling accordingly; */ + /* this is the same setup as with TrueType fonts, cf. function */ + /* `tt_size_reset' in file `ttobjs.c' */ + size_metrics->ascender = FT_PIX_ROUND( + FT_MulFix( face->ascender, + size_metrics->y_scale ) ); + size_metrics->descender = FT_PIX_ROUND( + FT_MulFix( face->descender, + size_metrics->y_scale ) ); + size_metrics->height = FT_PIX_ROUND( + FT_MulFix( face->height, + size_metrics->y_scale ) ); + + size_metrics->x_scale = FT_DivFix( size_metrics->x_ppem << 6, + face->units_per_EM ); + size_metrics->y_scale = FT_DivFix( size_metrics->y_ppem << 6, + face->units_per_EM ); + size_metrics->max_advance = FT_PIX_ROUND( + FT_MulFix( face->max_advance_width, + size_metrics->x_scale ) ); + } +#endif /* AF_CONFIG_OPTION_TT_SIZE_METRICS */ + } + /* * TODO: This code currently doesn't support fractional advance widths, - * i.e. placing hinted glyphs at anything other than integer + * i.e., placing hinted glyphs at anything other than integer * x-positions. This is only relevant for the warper code, which * scales and shifts glyphs to optimize blackness of stems (hinting on * the x-axis by nature places things on pixel integers, hinting on the - * y-axis only, i.e. LIGHT mode, doesn't touch the x-axis). The delta + * y-axis only, i.e., LIGHT mode, doesn't touch the x-axis). The delta * values of the scaler would need to be adjusted. */ scaler.face = face; - scaler.x_scale = size->metrics.x_scale; + scaler.x_scale = size_internal->autohint_metrics.x_scale; scaler.x_delta = 0; - scaler.y_scale = size->metrics.y_scale; + scaler.y_scale = size_internal->autohint_metrics.y_scale; scaler.y_delta = 0; scaler.render_mode = FT_LOAD_TARGET_MODE( load_flags ); scaler.flags = 0; + /* note that the fallback style can't be changed anymore */ + /* after the first call of `af_loader_load_glyph' */ error = af_loader_reset( loader, module, face ); if ( error ) goto Exit; @@ -334,18 +378,24 @@ * `standard_{vertical,horizontal}_width' change. * * Ignore errors and carry on without emboldening. + * */ - if ( !module->no_stem_darkening ) + + /* stem darkening only works well in `light' mode */ + if ( scaler.render_mode == FT_RENDER_MODE_LIGHT && + ( !face->internal->no_stem_darkening || + ( face->internal->no_stem_darkening < 0 && + !module->no_stem_darkening ) ) ) af_loader_embolden_glyph_in_slot( loader, face, style_metrics ); - loader->transformed = internal->glyph_transformed; + loader->transformed = slot_internal->glyph_transformed; if ( loader->transformed ) { FT_Matrix inverse; - loader->trans_matrix = internal->glyph_matrix; - loader->trans_delta = internal->glyph_delta; + loader->trans_matrix = slot_internal->glyph_matrix; + loader->trans_delta = slot_internal->glyph_delta; inverse = loader->trans_matrix; if ( !FT_Matrix_Invert( &inverse ) ) @@ -375,19 +425,12 @@ /* now load the slot image into the auto-outline */ /* and run the automatic hinting process */ - { -#ifdef FT_CONFIG_OPTION_PIC - AF_FaceGlobals globals = loader->globals; -#endif + if ( writing_system_class->style_hints_apply ) + writing_system_class->style_hints_apply( glyph_index, + hints, + &gloader->base.outline, + style_metrics ); - - if ( writing_system_class->style_hints_apply ) - writing_system_class->style_hints_apply( glyph_index, - hints, - &gloader->base.outline, - style_metrics ); - } - /* we now need to adjust the metrics according to the change in */ /* width/positioning that occurred during the hinting process */ if ( scaler.render_mode != FT_RENDER_MODE_LIGHT ) @@ -408,6 +451,8 @@ old_lsb = edge1->opos /* - loader->pp1.x */; new_lsb = edge1->pos; + /* remember unhinted values to later account */ + /* for rounding errors */ pp1x_uh = new_lsb - old_lsb; pp2x_uh = edge2->pos + old_rsb; @@ -445,6 +490,8 @@ slot->rsb_delta = loader->pp2.x - pp2x; } } + /* `light' mode uses integer advance widths */ + /* but sets `lsb_delta' and `rsb_delta' */ else { FT_Pos pp1x = loader->pp1.x; Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/afloader.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/afloader.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/afloader.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Auto-fitter glyph loading routines (specification). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/afmodule.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/afmodule.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/afmodule.c (working copy) @@ -4,7 +4,7 @@ /* */ /* Auto-fitter module implementation (body). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -104,6 +104,19 @@ } +#ifdef FT_CONFIG_OPTION_PIC + +#undef AF_SCRIPT_CLASSES_GET +#define AF_SCRIPT_CLASSES_GET \ + ( GET_PIC( ft_module->library )->af_script_classes ) + +#undef AF_STYLE_CLASSES_GET +#define AF_STYLE_CLASSES_GET \ + ( GET_PIC( ft_module->library )->af_style_classes ) + +#endif + + static FT_Error af_property_set( FT_Module ft_module, const char* property_name, @@ -291,12 +304,10 @@ long nsd = ft_strtol( s, NULL, 10 ); - if ( nsd == 0 ) - module->no_stem_darkening = 0; - else if ( nsd == 1 ) - module->no_stem_darkening = 1; + if ( !nsd ) + module->no_stem_darkening = FALSE; else - return FT_THROW( Invalid_Argument ); + module->no_stem_darkening = TRUE; } else #endif Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/afmodule.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/afmodule.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/afmodule.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Auto-fitter module implementation (specification). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/afpic.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/afpic.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/afpic.c (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for autofit module. */ /* */ -/* Copyright 2009-2016 by */ +/* Copyright 2009-2017 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/afpic.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/afpic.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/afpic.h (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for autofit module. */ /* */ -/* Copyright 2009-2016 by */ +/* Copyright 2009-2017 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -69,7 +69,7 @@ #define GET_PIC( lib ) \ - ( (AFModulePIC*)((lib)->pic_container.autofit) ) + ( (AFModulePIC*)( (lib)->pic_container.autofit ) ) #define AF_SERVICES_GET \ ( GET_PIC( library )->af_services ) Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/afranges.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/afranges.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/afranges.c (working copy) @@ -4,7 +4,7 @@ /* */ /* Auto-fitter Unicode script ranges (body). */ /* */ -/* Copyright 2013-2016 by */ +/* Copyright 2013-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -52,10 +52,23 @@ /* not be affected by blue zones, regardless of whether this is a */ /* spacing or no-spacing glyph */ - /* the `ta_xxxx_nonbase_uniranges' ranges must be strict subsets */ - /* of the corresponding `ta_xxxx_uniranges' ranges */ + /* the `af_xxxx_nonbase_uniranges' ranges must be strict subsets */ + /* of the corresponding `af_xxxx_uniranges' ranges */ + const AF_Script_UniRangeRec af_adlm_uniranges[] = + { + AF_UNIRANGE_REC( 0x1E900, 0x1E95F ), /* Adlam */ + AF_UNIRANGE_REC( 0, 0 ) + }; + + const AF_Script_UniRangeRec af_adlm_nonbase_uniranges[] = + { + AF_UNIRANGE_REC( 0x1D944, 0x1E94A ), + AF_UNIRANGE_REC( 0, 0 ) + }; + + const AF_Script_UniRangeRec af_arab_uniranges[] = { AF_UNIRANGE_REC( 0x0600, 0x06FF ), /* Arabic */ @@ -106,6 +119,37 @@ }; + const AF_Script_UniRangeRec af_avst_uniranges[] = + { + AF_UNIRANGE_REC( 0x10B00, 0x10B3F ), /* Avestan */ + AF_UNIRANGE_REC( 0, 0 ) + }; + + const AF_Script_UniRangeRec af_avst_nonbase_uniranges[] = + { + AF_UNIRANGE_REC( 0x10B39, 0x10B3F ), + AF_UNIRANGE_REC( 0, 0 ) + }; + + + const AF_Script_UniRangeRec af_bamu_uniranges[] = + { + AF_UNIRANGE_REC( 0xA6A0, 0xA6FF ), /* Bamum */ +#if 0 + /* The characters in the Bamum supplement are pictograms, */ + /* not (directly) related to the syllabic Bamum script */ + AF_UNIRANGE_REC( 0x16800, 0x16A3F ), /* Bamum Supplement */ +#endif + AF_UNIRANGE_REC( 0, 0 ) + }; + + const AF_Script_UniRangeRec af_bamu_nonbase_uniranges[] = + { + AF_UNIRANGE_REC( 0xA6F0, 0xA6F1 ), + AF_UNIRANGE_REC( 0, 0 ) + }; + + const AF_Script_UniRangeRec af_beng_uniranges[] = { AF_UNIRANGE_REC( 0x0980, 0x09FF ), /* Bengali */ @@ -123,6 +167,58 @@ }; + const AF_Script_UniRangeRec af_buhd_uniranges[] = + { + AF_UNIRANGE_REC( 0x1740, 0x175F ), /* Buhid */ + AF_UNIRANGE_REC( 0, 0 ) + }; + + const AF_Script_UniRangeRec af_buhd_nonbase_uniranges[] = + { + AF_UNIRANGE_REC( 0x1752, 0x1753 ), + AF_UNIRANGE_REC( 0, 0 ) + }; + + + const AF_Script_UniRangeRec af_cakm_uniranges[] = + { + AF_UNIRANGE_REC( 0x11100, 0x1114F ), /* Chakma */ + AF_UNIRANGE_REC( 0, 0 ) + }; + + const AF_Script_UniRangeRec af_cakm_nonbase_uniranges[] = + { + AF_UNIRANGE_REC( 0x11100, 0x11102 ), + AF_UNIRANGE_REC( 0x11127, 0x11134 ), + AF_UNIRANGE_REC( 0, 0 ) + }; + + + const AF_Script_UniRangeRec af_cans_uniranges[] = + { + AF_UNIRANGE_REC( 0x1400, 0x167F ), /* Unified Canadian Aboriginal Syllabics */ + AF_UNIRANGE_REC( 0x18B0, 0x18FF ), /* Unified Canadian Aboriginal Syllabics Extended */ + AF_UNIRANGE_REC( 0, 0 ) + }; + + const AF_Script_UniRangeRec af_cans_nonbase_uniranges[] = + { + AF_UNIRANGE_REC( 0, 0 ) + }; + + + const AF_Script_UniRangeRec af_cari_uniranges[] = + { + AF_UNIRANGE_REC( 0x102A0, 0x102DF ), /* Carian */ + AF_UNIRANGE_REC( 0, 0 ) + }; + + const AF_Script_UniRangeRec af_cari_nonbase_uniranges[] = + { + AF_UNIRANGE_REC( 0, 0 ) + }; + + const AF_Script_UniRangeRec af_cher_uniranges[] = { AF_UNIRANGE_REC( 0x13A0, 0x13FF ), /* Cherokee */ @@ -136,6 +232,31 @@ }; + const AF_Script_UniRangeRec af_copt_uniranges[] = + { + AF_UNIRANGE_REC( 0x2C80, 0x2CFF ), /* Coptic */ + AF_UNIRANGE_REC( 0, 0 ) + }; + + const AF_Script_UniRangeRec af_copt_nonbase_uniranges[] = + { + AF_UNIRANGE_REC( 0x2CEF, 0x2CF1 ), + AF_UNIRANGE_REC( 0, 0 ) + }; + + + const AF_Script_UniRangeRec af_cprt_uniranges[] = + { + AF_UNIRANGE_REC( 0x10800, 0x1083F ), /* Cypriot */ + AF_UNIRANGE_REC( 0, 0 ) + }; + + const AF_Script_UniRangeRec af_cprt_nonbase_uniranges[] = + { + AF_UNIRANGE_REC( 0, 0 ) + }; + + const AF_Script_UniRangeRec af_cyrl_uniranges[] = { AF_UNIRANGE_REC( 0x0400, 0x04FF ), /* Cyrillic */ @@ -187,6 +308,18 @@ }; + const AF_Script_UniRangeRec af_dsrt_uniranges[] = + { + AF_UNIRANGE_REC( 0x10400, 0x1044F ), /* Deseret */ + AF_UNIRANGE_REC( 0, 0 ) + }; + + const AF_Script_UniRangeRec af_dsrt_nonbase_uniranges[] = + { + AF_UNIRANGE_REC( 0, 0 ) + }; + + const AF_Script_UniRangeRec af_ethi_uniranges[] = { AF_UNIRANGE_REC( 0x1200, 0x137F ), /* Ethiopic */ @@ -233,6 +366,32 @@ }; + const AF_Script_UniRangeRec af_glag_uniranges[] = + { + AF_UNIRANGE_REC( 0x2C00, 0x2C5F ), /* Glagolitic */ + AF_UNIRANGE_REC( 0x1E000, 0x1E02F ), /* Glagolitic Supplement */ + AF_UNIRANGE_REC( 0, 0 ) + }; + + const AF_Script_UniRangeRec af_glag_nonbase_uniranges[] = + { + AF_UNIRANGE_REC( 0x1E000, 0x1E02F ), + AF_UNIRANGE_REC( 0, 0 ) + }; + + + const AF_Script_UniRangeRec af_goth_uniranges[] = + { + AF_UNIRANGE_REC( 0x10330, 0x1034F ), /* Gothic */ + AF_UNIRANGE_REC( 0, 0 ) + }; + + const AF_Script_UniRangeRec af_goth_nonbase_uniranges[] = + { + AF_UNIRANGE_REC( 0, 0 ) + }; + + const AF_Script_UniRangeRec af_grek_uniranges[] = { AF_UNIRANGE_REC( 0x0370, 0x03FF ), /* Greek and Coptic */ @@ -305,6 +464,19 @@ }; + const AF_Script_UniRangeRec af_kali_uniranges[] = + { + AF_UNIRANGE_REC( 0xA900, 0xA92F ), /* Kayah Li */ + AF_UNIRANGE_REC( 0, 0 ) + }; + + const AF_Script_UniRangeRec af_kali_nonbase_uniranges[] = + { + AF_UNIRANGE_REC( 0xA926, 0xA92D ), + AF_UNIRANGE_REC( 0, 0 ) + }; + + const AF_Script_UniRangeRec af_knda_uniranges[] = { AF_UNIRANGE_REC( 0x0C80, 0x0CFF ), /* Kannada */ @@ -463,6 +635,18 @@ }; + const AF_Script_UniRangeRec af_lisu_uniranges[] = + { + AF_UNIRANGE_REC( 0xA4D0, 0xA4FF ), /* Lisu */ + AF_UNIRANGE_REC( 0, 0 ) + }; + + const AF_Script_UniRangeRec af_lisu_nonbase_uniranges[] = + { + AF_UNIRANGE_REC( 0, 0 ) + }; + + const AF_Script_UniRangeRec af_mlym_uniranges[] = { AF_UNIRANGE_REC( 0x0D00, 0x0D7F ), /* Malayalam */ @@ -480,30 +664,43 @@ const AF_Script_UniRangeRec af_mymr_uniranges[] = { - AF_UNIRANGE_REC( 0x1000, 0x109F ), /* Myanmar */ - AF_UNIRANGE_REC( 0xA9E0, 0xA9FF ), /* Myanmar Extended-B */ - AF_UNIRANGE_REC( 0xAA60, 0xAA7F ), /* Myanmar Extended-A */ - AF_UNIRANGE_REC( 0, 0 ) + AF_UNIRANGE_REC( 0x1000, 0x109F ), /* Myanmar */ + AF_UNIRANGE_REC( 0xA9E0, 0xA9FF ), /* Myanmar Extended-B */ + AF_UNIRANGE_REC( 0xAA60, 0xAA7F ), /* Myanmar Extended-A */ + AF_UNIRANGE_REC( 0, 0 ) }; const AF_Script_UniRangeRec af_mymr_nonbase_uniranges[] = { - AF_UNIRANGE_REC( 0x102D, 0x1030 ), - AF_UNIRANGE_REC( 0x1032, 0x1037 ), - AF_UNIRANGE_REC( 0x103A, 0x103A ), - AF_UNIRANGE_REC( 0x103D, 0x103E ), - AF_UNIRANGE_REC( 0x1058, 0x1059 ), - AF_UNIRANGE_REC( 0x105E, 0x1060 ), - AF_UNIRANGE_REC( 0x1071, 0x1074 ), - AF_UNIRANGE_REC( 0x1082, 0x1082 ), - AF_UNIRANGE_REC( 0x1085, 0x1086 ), - AF_UNIRANGE_REC( 0x108D, 0x108D ), - AF_UNIRANGE_REC( 0xA9E5, 0xA9E5 ), - AF_UNIRANGE_REC( 0xAA7C, 0xAA7C ), - AF_UNIRANGE_REC( 0, 0 ) + AF_UNIRANGE_REC( 0x102D, 0x1030 ), + AF_UNIRANGE_REC( 0x1032, 0x1037 ), + AF_UNIRANGE_REC( 0x103A, 0x103A ), + AF_UNIRANGE_REC( 0x103D, 0x103E ), + AF_UNIRANGE_REC( 0x1058, 0x1059 ), + AF_UNIRANGE_REC( 0x105E, 0x1060 ), + AF_UNIRANGE_REC( 0x1071, 0x1074 ), + AF_UNIRANGE_REC( 0x1082, 0x1082 ), + AF_UNIRANGE_REC( 0x1085, 0x1086 ), + AF_UNIRANGE_REC( 0x108D, 0x108D ), + AF_UNIRANGE_REC( 0xA9E5, 0xA9E5 ), + AF_UNIRANGE_REC( 0xAA7C, 0xAA7C ), + AF_UNIRANGE_REC( 0, 0 ) }; + const AF_Script_UniRangeRec af_nkoo_uniranges[] = + { + AF_UNIRANGE_REC( 0x07C0, 0x07FF ), /* N'Ko */ + AF_UNIRANGE_REC( 0, 0 ) + }; + + const AF_Script_UniRangeRec af_nkoo_nonbase_uniranges[] = + { + AF_UNIRANGE_REC( 0x07EB, 0x07F5 ), + AF_UNIRANGE_REC( 0, 0 ) + }; + + const AF_Script_UniRangeRec af_none_uniranges[] = { AF_UNIRANGE_REC( 0, 0 ) @@ -515,6 +712,80 @@ }; + const AF_Script_UniRangeRec af_olck_uniranges[] = + { + AF_UNIRANGE_REC( 0x1C50, 0x1C7F ), /* Ol Chiki */ + AF_UNIRANGE_REC( 0, 0 ) + }; + + const AF_Script_UniRangeRec af_olck_nonbase_uniranges[] = + { + AF_UNIRANGE_REC( 0, 0 ) + }; + + + const AF_Script_UniRangeRec af_orkh_uniranges[] = + { + AF_UNIRANGE_REC( 0x10C00, 0x10C4F ), /* Old Turkic */ + AF_UNIRANGE_REC( 0, 0 ) + }; + + const AF_Script_UniRangeRec af_orkh_nonbase_uniranges[] = + { + AF_UNIRANGE_REC( 0, 0 ) + }; + + + const AF_Script_UniRangeRec af_osge_uniranges[] = + { + AF_UNIRANGE_REC( 0x104B0, 0x104FF ), /* Osage */ + AF_UNIRANGE_REC( 0, 0 ) + }; + + const AF_Script_UniRangeRec af_osge_nonbase_uniranges[] = + { + AF_UNIRANGE_REC( 0, 0 ) + }; + + + const AF_Script_UniRangeRec af_osma_uniranges[] = + { + AF_UNIRANGE_REC( 0x10480, 0x104AF ), /* Osmanya */ + AF_UNIRANGE_REC( 0, 0 ) + }; + + const AF_Script_UniRangeRec af_osma_nonbase_uniranges[] = + { + AF_UNIRANGE_REC( 0, 0 ) + }; + + + const AF_Script_UniRangeRec af_saur_uniranges[] = + { + AF_UNIRANGE_REC( 0xA880, 0xA8DF ), /* Saurashtra */ + AF_UNIRANGE_REC( 0, 0 ) + }; + + const AF_Script_UniRangeRec af_saur_nonbase_uniranges[] = + { + AF_UNIRANGE_REC( 0xA880, 0xA881 ), + AF_UNIRANGE_REC( 0xA8B4, 0xA8C5 ), + AF_UNIRANGE_REC( 0, 0 ) + }; + + + const AF_Script_UniRangeRec af_shaw_uniranges[] = + { + AF_UNIRANGE_REC( 0x10450, 0x1047F ), /* Shavian */ + AF_UNIRANGE_REC( 0, 0 ) + }; + + const AF_Script_UniRangeRec af_shaw_nonbase_uniranges[] = + { + AF_UNIRANGE_REC( 0, 0 ) + }; + + const AF_Script_UniRangeRec af_sinh_uniranges[] = { AF_UNIRANGE_REC( 0x0D80, 0x0DFF ), /* Sinhala */ @@ -529,6 +800,21 @@ }; + const AF_Script_UniRangeRec af_sund_uniranges[] = + { + AF_UNIRANGE_REC( 0x1B80, 0x1BBF ), /* Sundanese */ + AF_UNIRANGE_REC( 0x1CC0, 0x1CCF ), /* Sundanese Supplement */ + AF_UNIRANGE_REC( 0, 0 ) + }; + + const AF_Script_UniRangeRec af_sund_nonbase_uniranges[] = + { + AF_UNIRANGE_REC( 0x1B80, 0x1B82 ), + AF_UNIRANGE_REC( 0x1BA1, 0x1BAD ), + AF_UNIRANGE_REC( 0, 0 ) + }; + + const AF_Script_UniRangeRec af_taml_uniranges[] = { AF_UNIRANGE_REC( 0x0B80, 0x0BFF ), /* Tamil */ @@ -544,6 +830,23 @@ }; + const AF_Script_UniRangeRec af_tavt_uniranges[] = + { + AF_UNIRANGE_REC( 0xAA80, 0xAADF ), /* Tai Viet */ + AF_UNIRANGE_REC( 0, 0 ) + }; + + const AF_Script_UniRangeRec af_tavt_nonbase_uniranges[] = + { + AF_UNIRANGE_REC( 0xAAB0, 0xAAB0 ), + AF_UNIRANGE_REC( 0xAAB2, 0xAAB4 ), + AF_UNIRANGE_REC( 0xAAB7, 0xAAB8 ), + AF_UNIRANGE_REC( 0xAABE, 0xAABF ), + AF_UNIRANGE_REC( 0xAAC1, 0xAAC1 ), + AF_UNIRANGE_REC( 0, 0 ) + }; + + const AF_Script_UniRangeRec af_telu_uniranges[] = { AF_UNIRANGE_REC( 0x0C00, 0x0C7F ), /* Telugu */ @@ -575,6 +878,30 @@ }; + const AF_Script_UniRangeRec af_tfng_uniranges[] = + { + AF_UNIRANGE_REC( 0x2D30, 0x2D7F ), /* Tifinagh */ + AF_UNIRANGE_REC( 0, 0 ) + }; + + const AF_Script_UniRangeRec af_tfng_nonbase_uniranges[] = + { + AF_UNIRANGE_REC( 0, 0 ) + }; + + + const AF_Script_UniRangeRec af_vaii_uniranges[] = + { + AF_UNIRANGE_REC( 0xA500, 0xA63F ), /* Vai */ + AF_UNIRANGE_REC( 0, 0 ) + }; + + const AF_Script_UniRangeRec af_vaii_nonbase_uniranges[] = + { + AF_UNIRANGE_REC( 0, 0 ) + }; + + #ifdef AF_CONFIG_OPTION_INDIC const AF_Script_UniRangeRec af_limb_uniranges[] = @@ -610,21 +937,6 @@ }; - const AF_Script_UniRangeRec af_sund_uniranges[] = - { - AF_UNIRANGE_REC( 0x1B80, 0x1BBF ), /* Sundanese */ - AF_UNIRANGE_REC( 0x1CC0, 0x1CCF ), /* Sundanese Supplement */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_sund_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0x1B80, 0x1B82 ), - AF_UNIRANGE_REC( 0x1BA1, 0x1BAD ), - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_sylo_uniranges[] = { AF_UNIRANGE_REC( 0xA800, 0xA82F ), /* Syloti Nagri */ Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/afranges.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/afranges.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/afranges.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Auto-fitter Unicode script ranges (specification). */ /* */ -/* Copyright 2013-2016 by */ +/* Copyright 2013-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/afscript.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/afscript.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/afscript.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Auto-fitter scripts (specification only). */ /* */ -/* Copyright 2013-2016 by */ +/* Copyright 2013-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -30,6 +30,12 @@ /* use `HB_SCRIPT_INVALID' as the HarfBuzz script name tag for */ /* them. */ + SCRIPT( adlm, ADLM, + "Adlam", + HB_SCRIPT_ADLAM, + HINTING_BOTTOM_TO_TOP, + "\xF0\x9E\xA4\x8C \xF0\x9E\xA4\xAE" ) /* 𞤌 𞤮 */ + SCRIPT( arab, ARAB, "Arabic", HB_SCRIPT_ARABIC, @@ -42,6 +48,18 @@ HINTING_BOTTOM_TO_TOP, "\xD5\xBD \xD5\x8D" ) /* ս Ս */ + SCRIPT( avst, AVST, + "Avestan", + HB_SCRIPT_AVESTAN, + HINTING_BOTTOM_TO_TOP, + "\xF0\x90\xAC\x9A" ) /* 𐬚 */ + + SCRIPT( bamu, BAMU, + "Bamum", + HB_SCRIPT_BAMUM, + HINTING_BOTTOM_TO_TOP, + "\xEA\x9B\x81 \xEA\x9B\xAF" ) /* ꛁ ꛯ */ + /* there are no simple forms for letters; we thus use two digit shapes */ SCRIPT( beng, BENG, "Bengali", @@ -49,6 +67,30 @@ HINTING_TOP_TO_BOTTOM, "\xE0\xA7\xA6 \xE0\xA7\xAA" ) /* ০ ৪ */ + SCRIPT( buhd, BUHD, + "Buhid", + HB_SCRIPT_BUHID, + HINTING_BOTTOM_TO_TOP, + "\xE1\x9D\x8B \xE1\x9D\x8F" ) /* ᝋ ᝏ */ + + SCRIPT( cakm, CAKM, + "Chakma", + HB_SCRIPT_CHAKMA, + HINTING_BOTTOM_TO_TOP, + "\xF0\x91\x84\xA4 \xF0\x91\x84\x89 \xF0\x91\x84\x9B" ) /* 𑄤 𑄉 𑄛 */ + + SCRIPT( cans, CANS, + "Canadian Syllabics", + HB_SCRIPT_CANADIAN_SYLLABICS, + HINTING_BOTTOM_TO_TOP, + "\xE1\x91\x8C \xE1\x93\x9A" ) /* ᑌ ᓚ */ + + SCRIPT( cari, CARI, + "Carian", + HB_SCRIPT_CARIAN, + HINTING_BOTTOM_TO_TOP, + "\xF0\x90\x8A\xAB \xF0\x90\x8B\x89" ) /* 𐊫 𐋉 */ + SCRIPT( cher, CHER, "Cherokee", HB_SCRIPT_CHEROKEE, @@ -55,6 +97,18 @@ HINTING_BOTTOM_TO_TOP, "\xE1\x8E\xA4 \xE1\x8F\x85 \xEA\xAE\x95" ) /* Ꭴ Ꮕ ꮕ */ + SCRIPT( copt, COPT, + "Coptic", + HB_SCRIPT_COPTIC, + HINTING_BOTTOM_TO_TOP, + "\xE2\xB2\x9E \xE2\xB2\x9F" ) /* Ⲟ ⲟ */ + + SCRIPT( cprt, CPRT, + "Cypriot", + HB_SCRIPT_CYPRIOT, + HINTING_BOTTOM_TO_TOP, + "\xF0\x90\xA0\x85 \xF0\x90\xA0\xA3" ) /* 𐠅 𐠣 */ + SCRIPT( cyrl, CYRL, "Cyrillic", HB_SCRIPT_CYRILLIC, @@ -67,6 +121,12 @@ HINTING_TOP_TO_BOTTOM, "\xE0\xA4\xA0 \xE0\xA4\xB5 \xE0\xA4\x9F" ) /* ठ व ट */ + SCRIPT( dsrt, DSRT, + "Deseret", + HB_SCRIPT_DESERET, + HINTING_BOTTOM_TO_TOP, + "\xF0\x90\x90\x84 \xF0\x90\x90\xAC" ) /* 𐐄 𐐬 */ + SCRIPT( ethi, ETHI, "Ethiopic", HB_SCRIPT_ETHIOPIC, @@ -85,6 +145,18 @@ HINTING_BOTTOM_TO_TOP, "\xE1\x82\xB6 \xE1\x82\xB1 \xE2\xB4\x99" ) /* Ⴖ Ⴑ ⴙ */ + SCRIPT( glag, GLAG, + "Glagolitic", + HB_SCRIPT_GLAGOLITIC, + HINTING_BOTTOM_TO_TOP, + "\xE2\xB0\x95 \xE2\xB1\x85" ) /* Ⱅ ⱅ */ + + SCRIPT( goth, GOTH, + "Gothic", + HB_SCRIPT_GOTHIC, + HINTING_TOP_TO_BOTTOM, + "\xF0\x90\x8C\xB4 \xF0\x90\x8C\xBE \xF0\x90\x8D\x83" ) /* 𐌴 𐌾 𐍃 */ + SCRIPT( grek, GREK, "Greek", HB_SCRIPT_GREEK, @@ -109,6 +181,12 @@ HINTING_BOTTOM_TO_TOP, "\xD7\x9D" ) /* ם */ + SCRIPT( kali, KALI, + "Kayah Li", + HB_SCRIPT_KAYAH_LI, + HINTING_BOTTOM_TO_TOP, + "\xEA\xA4\x8D \xEA\xA4\x80" ) /* ꤍ ꤀ */ + SCRIPT( knda, KNDA, "Kannada", HB_SCRIPT_KANNADA, @@ -153,6 +231,12 @@ HINTING_BOTTOM_TO_TOP, "\xE1\xB5\x92 \xE1\xB4\xBC \xE2\x81\xB0" ) /* ᵒ ᴼ ⁰ */ + SCRIPT( lisu, LISU, + "Lisu", + HB_SCRIPT_LISU, + HINTING_BOTTOM_TO_TOP, + "\xEA\x93\xB3" ) /* ꓳ */ + SCRIPT( mlym, MLYM, "Malayalam", HB_SCRIPT_MALAYALAM, @@ -165,6 +249,12 @@ HINTING_BOTTOM_TO_TOP, "\xE1\x80\x9D \xE1\x80\x84 \xE1\x80\x82" ) /* ဝ င ဂ */ + SCRIPT( nkoo, NKOO, + "N'Ko", + HB_SCRIPT_NKO, + HINTING_BOTTOM_TO_TOP, + "\xDF\x8B \xDF\x80" ) /* ߋ ߀ */ + SCRIPT( none, NONE, "no script", HB_SCRIPT_INVALID, @@ -171,6 +261,42 @@ HINTING_BOTTOM_TO_TOP, "" ) + SCRIPT( olck, OLCK, + "Ol Chiki", + HB_SCRIPT_OL_CHIKI, + HINTING_BOTTOM_TO_TOP, + "\xE1\xB1\x9B" ) /* ᱛ */ + + SCRIPT( orkh, ORKH, + "Old Turkic", + HB_SCRIPT_OLD_TURKIC, + HINTING_BOTTOM_TO_TOP, + "\xF0\x90\xB0\x97" ) /* 𐰗 */ + + SCRIPT( osge, OSGE, + "Osage", + HB_SCRIPT_OSAGE, + HINTING_BOTTOM_TO_TOP, + "\xF0\x90\x93\x82 \xF0\x90\x93\xAA" ) /* 𐓂 𐓪 */ + + SCRIPT( osma, OSMA, + "Osmanya", + HB_SCRIPT_OSMANYA, + HINTING_BOTTOM_TO_TOP, + "\xF0\x90\x92\x86 \xF0\x90\x92\xA0" ) /* 𐒆 𐒠 */ + + SCRIPT( saur, SAUR, + "Saurashtra", + HB_SCRIPT_SAURASHTRA, + HINTING_BOTTOM_TO_TOP, + "\xEA\xA2\x9D \xEA\xA3\x90" ) /* ꢝ ꣐ */ + + SCRIPT( shaw, SHAW, + "Shavian", + HB_SCRIPT_SHAVIAN, + HINTING_BOTTOM_TO_TOP, + "\xF0\x90\x91\xB4" ) /* 𐑴 */ + SCRIPT( sinh, SINH, "Sinhala", HB_SCRIPT_SINHALA, @@ -177,6 +303,13 @@ HINTING_BOTTOM_TO_TOP, "\xE0\xB6\xA7" ) /* ට */ + /* only digit zero has a simple (round) shape in the Sundanese script */ + SCRIPT( sund, SUND, + "Sundanese", + HB_SCRIPT_SUNDANESE, + HINTING_BOTTOM_TO_TOP, + "\xE1\xAE\xB0" ) /* ᮰ */ + /* only digit zero has a simple (round) shape in the Tamil script */ SCRIPT( taml, TAML, "Tamil", @@ -184,6 +317,12 @@ HINTING_BOTTOM_TO_TOP, "\xE0\xAF\xA6" ) /* ௦ */ + SCRIPT( tavt, TAVT, + "Tai Viet", + HB_SCRIPT_TAI_VIET, + HINTING_BOTTOM_TO_TOP, + "\xEA\xAA\x92 \xEA\xAA\xAB" ) /* ꪒ ꪫ */ + /* there are no simple forms for letters; we thus use two digit shapes */ SCRIPT( telu, TELU, "Telugu", @@ -197,6 +336,18 @@ HINTING_BOTTOM_TO_TOP, "\xE0\xB8\xB2 \xE0\xB9\x85 \xE0\xB9\x90" ) /* า ๅ ๐ */ + SCRIPT( tfng, TFNG, + "Tifinagh", + HB_SCRIPT_TIFINAGH, + HINTING_BOTTOM_TO_TOP, + "\xE2\xB5\x94" ) /* ⵔ */ + + SCRIPT( vaii, VAII, + "Vai", + HB_SCRIPT_VAI, + HINTING_BOTTOM_TO_TOP, + "\xEA\x98\x93 \xEA\x96\x9C \xEA\x96\xB4" ) /* ꘓ ꖜ ꖴ */ + #ifdef AF_CONFIG_OPTION_INDIC SCRIPT( limb, LIMB, @@ -211,12 +362,6 @@ HINTING_BOTTOM_TO_TOP, "o" ) /* XXX */ - SCRIPT( sund, SUND, - "Sundanese", - HB_SCRIPT_SUNDANESE, - HINTING_BOTTOM_TO_TOP, - "o" ) /* XXX */ - SCRIPT( sylo, SYLO, "Syloti Nagri", HB_SCRIPT_SYLOTI_NAGRI, Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/afshaper.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/afshaper.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/afshaper.c (working copy) @@ -4,7 +4,7 @@ /* */ /* HarfBuzz interface for accessing OpenType features (body). */ /* */ -/* Copyright 2013-2016 by */ +/* Copyright 2013-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/afshaper.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/afshaper.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/afshaper.h (working copy) @@ -4,7 +4,7 @@ /* */ /* HarfBuzz interface for accessing OpenType features (specification). */ /* */ -/* Copyright 2013-2016 by */ +/* Copyright 2013-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/afstyles.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/afstyles.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/afstyles.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Auto-fitter styles (specification only). */ /* */ -/* Copyright 2013-2016 by */ +/* Copyright 2013-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -83,6 +83,13 @@ DEFAULT ) + STYLE( adlm_dflt, ADLM_DFLT, + "Adlam default style", + AF_WRITING_SYSTEM_LATIN, + AF_SCRIPT_ADLM, + AF_BLUE_STRINGSET_ADLM, + AF_COVERAGE_DEFAULT ) + STYLE( arab_dflt, ARAB_DFLT, "Arabic default style", AF_WRITING_SYSTEM_LATIN, @@ -97,6 +104,20 @@ AF_BLUE_STRINGSET_ARMN, AF_COVERAGE_DEFAULT ) + STYLE( avst_dflt, AVST_DFLT, + "Avestan default style", + AF_WRITING_SYSTEM_LATIN, + AF_SCRIPT_AVST, + AF_BLUE_STRINGSET_AVST, + AF_COVERAGE_DEFAULT ) + + STYLE( bamu_dflt, BAMU_DFLT, + "Bamum default style", + AF_WRITING_SYSTEM_LATIN, + AF_SCRIPT_BAMU, + AF_BLUE_STRINGSET_BAMU, + AF_COVERAGE_DEFAULT ) + STYLE( beng_dflt, BENG_DFLT, "Bengali default style", AF_WRITING_SYSTEM_LATIN, @@ -104,6 +125,34 @@ AF_BLUE_STRINGSET_BENG, AF_COVERAGE_DEFAULT ) + STYLE( buhd_dflt, BUHD_DFLT, + "Buhid default style", + AF_WRITING_SYSTEM_LATIN, + AF_SCRIPT_BUHD, + AF_BLUE_STRINGSET_BUHD, + AF_COVERAGE_DEFAULT ) + + STYLE( cakm_dflt, CAKM_DFLT, + "Chakma default style", + AF_WRITING_SYSTEM_LATIN, + AF_SCRIPT_CAKM, + AF_BLUE_STRINGSET_CAKM, + AF_COVERAGE_DEFAULT ) + + STYLE( cans_dflt, CANS_DFLT, + "Canadian Syllabics default style", + AF_WRITING_SYSTEM_LATIN, + AF_SCRIPT_CANS, + AF_BLUE_STRINGSET_CANS, + AF_COVERAGE_DEFAULT ) + + STYLE( cari_dflt, CARI_DFLT, + "Carian default style", + AF_WRITING_SYSTEM_LATIN, + AF_SCRIPT_CARI, + AF_BLUE_STRINGSET_CARI, + AF_COVERAGE_DEFAULT ) + STYLE( cher_dflt, CHER_DFLT, "Cherokee default style", AF_WRITING_SYSTEM_LATIN, @@ -111,6 +160,20 @@ AF_BLUE_STRINGSET_CHER, AF_COVERAGE_DEFAULT ) + STYLE( copt_dflt, COPT_DFLT, + "Coptic default style", + AF_WRITING_SYSTEM_LATIN, + AF_SCRIPT_COPT, + AF_BLUE_STRINGSET_COPT, + AF_COVERAGE_DEFAULT ) + + STYLE( cprt_dflt, CPRT_DFLT, + "Cypriot default style", + AF_WRITING_SYSTEM_LATIN, + AF_SCRIPT_CPRT, + AF_BLUE_STRINGSET_CPRT, + AF_COVERAGE_DEFAULT ) + META_STYLE_LATIN( cyrl, CYRL, "Cyrillic" ) STYLE( deva_dflt, DEVA_DFLT, @@ -120,6 +183,13 @@ AF_BLUE_STRINGSET_DEVA, AF_COVERAGE_DEFAULT ) + STYLE( dsrt_dflt, DSRT_DFLT, + "Deseret default style", + AF_WRITING_SYSTEM_LATIN, + AF_SCRIPT_DSRT, + AF_BLUE_STRINGSET_DSRT, + AF_COVERAGE_DEFAULT ) + STYLE( ethi_dflt, ETHI_DFLT, "Ethiopic default style", AF_WRITING_SYSTEM_LATIN, @@ -141,6 +211,20 @@ AF_BLUE_STRINGSET_GEOK, AF_COVERAGE_DEFAULT ) + STYLE( glag_dflt, GLAG_DFLT, + "Glagolitic default style", + AF_WRITING_SYSTEM_LATIN, + AF_SCRIPT_GLAG, + AF_BLUE_STRINGSET_GLAG, + AF_COVERAGE_DEFAULT ) + + STYLE( goth_dflt, GOTH_DFLT, + "Gothic default style", + AF_WRITING_SYSTEM_LATIN, + AF_SCRIPT_GOTH, + AF_BLUE_STRINGSET_GOTH, + AF_COVERAGE_DEFAULT ) + META_STYLE_LATIN( grek, GREK, "Greek" ) STYLE( gujr_dflt, GUJR_DFLT, @@ -164,6 +248,13 @@ AF_BLUE_STRINGSET_HEBR, AF_COVERAGE_DEFAULT ) + STYLE( kali_dflt, KALI_DFLT, + "Kayah Li default style", + AF_WRITING_SYSTEM_LATIN, + AF_SCRIPT_KALI, + AF_BLUE_STRINGSET_KALI, + AF_COVERAGE_DEFAULT ) + STYLE( knda_dflt, KNDA_DFLT, "Kannada default style", AF_WRITING_SYSTEM_LATIN, @@ -217,6 +308,13 @@ AF_COVERAGE_DEFAULT ) #endif + STYLE( lisu_dflt, LISU_DFLT, + "Lisu default style", + AF_WRITING_SYSTEM_LATIN, + AF_SCRIPT_LISU, + AF_BLUE_STRINGSET_LISU, + AF_COVERAGE_DEFAULT ) + STYLE( mlym_dflt, MLYM_DFLT, "Malayalam default style", AF_WRITING_SYSTEM_LATIN, @@ -231,6 +329,13 @@ AF_BLUE_STRINGSET_MYMR, AF_COVERAGE_DEFAULT ) + STYLE( nkoo_dflt, NKOO_DFLT, + "N'Ko default style", + AF_WRITING_SYSTEM_LATIN, + AF_SCRIPT_NKOO, + AF_BLUE_STRINGSET_NKOO, + AF_COVERAGE_DEFAULT ) + STYLE( none_dflt, NONE_DFLT, "no style", AF_WRITING_SYSTEM_DUMMY, @@ -238,6 +343,48 @@ AF_BLUE_STRINGSET_NONE, AF_COVERAGE_DEFAULT ) + STYLE( olck_dflt, OLCK_DFLT, + "Ol Chiki default style", + AF_WRITING_SYSTEM_LATIN, + AF_SCRIPT_OLCK, + AF_BLUE_STRINGSET_OLCK, + AF_COVERAGE_DEFAULT ) + + STYLE( orkh_dflt, ORKH_DFLT, + "Old Turkic default style", + AF_WRITING_SYSTEM_LATIN, + AF_SCRIPT_ORKH, + AF_BLUE_STRINGSET_ORKH, + AF_COVERAGE_DEFAULT ) + + STYLE( osge_dflt, OSGE_DFLT, + "Osage default style", + AF_WRITING_SYSTEM_LATIN, + AF_SCRIPT_OSGE, + AF_BLUE_STRINGSET_OSGE, + AF_COVERAGE_DEFAULT ) + + STYLE( osma_dflt, OSMA_DFLT, + "Osmanya default style", + AF_WRITING_SYSTEM_LATIN, + AF_SCRIPT_OSMA, + AF_BLUE_STRINGSET_OSMA, + AF_COVERAGE_DEFAULT ) + + STYLE( saur_dflt, SAUR_DFLT, + "Saurashtra default style", + AF_WRITING_SYSTEM_LATIN, + AF_SCRIPT_SAUR, + AF_BLUE_STRINGSET_SAUR, + AF_COVERAGE_DEFAULT ) + + STYLE( shaw_dflt, SHAW_DFLT, + "Shavian default style", + AF_WRITING_SYSTEM_LATIN, + AF_SCRIPT_SHAW, + AF_BLUE_STRINGSET_SHAW, + AF_COVERAGE_DEFAULT ) + STYLE( sinh_dflt, SINH_DFLT, "Sinhala default style", AF_WRITING_SYSTEM_LATIN, @@ -245,6 +392,13 @@ AF_BLUE_STRINGSET_SINH, AF_COVERAGE_DEFAULT ) + STYLE( sund_dflt, SUND_DFLT, + "Sundanese default style", + AF_WRITING_SYSTEM_LATIN, + AF_SCRIPT_SUND, + AF_BLUE_STRINGSET_SUND, + AF_COVERAGE_DEFAULT ) + STYLE( taml_dflt, TAML_DFLT, "Tamil default style", AF_WRITING_SYSTEM_LATIN, @@ -252,6 +406,13 @@ AF_BLUE_STRINGSET_TAML, AF_COVERAGE_DEFAULT ) + STYLE( tavt_dflt, TAVT_DFLT, + "Tai Viet default style", + AF_WRITING_SYSTEM_LATIN, + AF_SCRIPT_TAVT, + AF_BLUE_STRINGSET_TAVT, + AF_COVERAGE_DEFAULT ) + STYLE( telu_dflt, TELU_DFLT, "Telugu default style", AF_WRITING_SYSTEM_LATIN, @@ -266,6 +427,20 @@ AF_BLUE_STRINGSET_THAI, AF_COVERAGE_DEFAULT ) + STYLE( tfng_dflt, TFNG_DFLT, + "Tifinagh default style", + AF_WRITING_SYSTEM_LATIN, + AF_SCRIPT_TFNG, + AF_BLUE_STRINGSET_TFNG, + AF_COVERAGE_DEFAULT ) + + STYLE( vaii_dflt, VAII_DFLT, + "Vai default style", + AF_WRITING_SYSTEM_LATIN, + AF_SCRIPT_VAII, + AF_BLUE_STRINGSET_VAII, + AF_COVERAGE_DEFAULT ) + #ifdef AF_CONFIG_OPTION_INDIC /* no blue stringset support for the Indic writing system yet */ @@ -280,7 +455,6 @@ STYLE_DEFAULT_INDIC( limb, LIMB, "Limbu" ) STYLE_DEFAULT_INDIC( orya, ORYA, "Oriya" ) - STYLE_DEFAULT_INDIC( sund, SUND, "Sundanese" ) STYLE_DEFAULT_INDIC( sylo, SYLO, "Syloti Nagri" ) STYLE_DEFAULT_INDIC( tibt, TIBT, "Tibetan" ) Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/aftypes.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/aftypes.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/aftypes.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Auto-fitter types (specification only). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -575,6 +575,7 @@ m_init, \ m_scale, \ m_done, \ + m_stdw, \ h_init, \ h_apply ) \ FT_LOCAL_DEF( void ) \ Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/afwarp.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/afwarp.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/afwarp.c (working copy) @@ -4,7 +4,7 @@ /* */ /* Auto-fitter warping algorithm (body). */ /* */ -/* Copyright 2006-2016 by */ +/* Copyright 2006-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -98,7 +98,6 @@ if ( xx1min + w < warper->x2min ) xx1min = warper->x2min - w; - xx1max = warper->x1max; if ( xx1max + w > warper->x2max ) xx1max = warper->x2max - w; Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/afwarp.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/afwarp.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/afwarp.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Auto-fitter warping algorithm (specification). */ /* */ -/* Copyright 2006-2016 by */ +/* Copyright 2006-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/afwrtsys.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/afwrtsys.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/afwrtsys.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Auto-fitter writing systems (specification only). */ /* */ -/* Copyright 2013-2016 by */ +/* Copyright 2013-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/autofit/autofit.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/autofit/autofit.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/autofit/autofit.c (working copy) @@ -4,7 +4,7 @@ /* */ /* Auto-fitter module (body). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -18,29 +18,22 @@ #define FT_MAKE_OPTION_SINGLE_OBJECT #include <ft2build.h> -#include "afpic.c" + #include "afangles.c" #include "afblue.c" +#include "afcjk.c" +#include "afdummy.c" #include "afglobal.c" #include "afhints.c" - -#include "afranges.c" - -#include "afdummy.c" +#include "afindic.c" #include "aflatin.c" -#ifdef FT_OPTION_AUTOFIT2 #include "aflatin2.c" -#endif -#include "afcjk.c" -#include "afindic.c" - -#include "afshaper.c" - #include "afloader.c" #include "afmodule.c" - -#ifdef AF_CONFIG_OPTION_USE_WARPER +#include "afpic.c" +#include "afranges.c" +#include "afshaper.c" #include "afwarp.c" -#endif + /* END */ Index: reactos/sdk/lib/3rdparty/freetype/src/base/basepic.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/basepic.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/basepic.c (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for base. */ /* */ -/* Copyright 2009-2016 by */ +/* Copyright 2009-2017 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/base/basepic.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/basepic.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/basepic.h (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for base. */ /* */ -/* Copyright 2009-2016 by */ +/* Copyright 2009-2017 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/base/ftadvanc.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/ftadvanc.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/ftadvanc.c (working copy) @@ -4,7 +4,7 @@ /* */ /* Quick computation of advance widths (body). */ /* */ -/* Copyright 2008-2016 by */ +/* Copyright 2008-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/base/ftapi.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/ftapi.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/ftapi.c (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType compatibility functions (body). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -38,7 +38,7 @@ /*************************************************************************/ /*************************************************************************/ - /* backwards compatibility API */ + /* backward compatibility API */ FT_BASE_DEF( void ) FT_New_Memory_Stream( FT_Library library, Index: reactos/sdk/lib/3rdparty/freetype/src/base/ftbase.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/ftbase.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/ftbase.c (working copy) @@ -4,7 +4,7 @@ /* */ /* Single object library component (body only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -17,10 +17,8 @@ #include <ft2build.h> - #define FT_MAKE_OPTION_SINGLE_OBJECT -#include "ftpic.c" #include "basepic.c" #include "ftadvanc.c" #include "ftcalc.c" @@ -27,8 +25,10 @@ #include "ftdbgmem.c" #include "ftgloadr.c" #include "fthash.c" +#include "ftmac.c" #include "ftobjs.c" #include "ftoutln.c" +#include "ftpic.c" #include "ftrfork.c" #include "ftsnames.c" #include "ftstream.c" @@ -35,8 +35,5 @@ #include "fttrigon.c" #include "ftutil.c" -#ifdef FT_MACINTOSH -#include "ftmac.c" -#endif /* END */ Index: reactos/sdk/lib/3rdparty/freetype/src/base/ftbase.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/ftbase.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/ftbase.h (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType private functions used in base module (specification). */ /* */ -/* Copyright 2008-2016 by */ +/* Copyright 2008-2017 by */ /* David Turner, Robert Wilhelm, Werner Lemberg, and suzuki toshiya. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/base/ftbbox.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/ftbbox.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/ftbbox.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType bbox computation (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used */ Index: reactos/sdk/lib/3rdparty/freetype/src/base/ftbdf.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/ftbdf.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/ftbdf.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType API for accessing BDF-specific strings (body). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/base/ftbitmap.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/ftbitmap.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/ftbitmap.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType utility functions for bitmaps (body). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/base/ftcalc.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/ftcalc.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/ftcalc.c (working copy) @@ -4,7 +4,7 @@ /* */ /* Arithmetic computations (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/base/ftcid.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/ftcid.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/ftcid.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType API for accessing CID font information. */ /* */ -/* Copyright 2007-2016 by */ +/* Copyright 2007-2017 by */ /* Derek Clegg and Michael Toftdal. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/base/ftdbgmem.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/ftdbgmem.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/ftdbgmem.c (working copy) @@ -4,7 +4,7 @@ /* */ /* Memory debugger (body). */ /* */ -/* Copyright 2001-2016 by */ +/* Copyright 2001-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/base/ftdebug.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/ftdebug.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/ftdebug.c (working copy) @@ -4,7 +4,7 @@ /* */ /* Debugging and logging component (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/base/ftfntfmt.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/ftfntfmt.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/ftfntfmt.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType utility file for font formats (body). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/base/ftfstype.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/ftfstype.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/ftfstype.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType utility file to access FSType data (body). */ /* */ -/* Copyright 2008-2016 by */ +/* Copyright 2008-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/base/ftgasp.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/ftgasp.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/ftgasp.c (working copy) @@ -4,7 +4,7 @@ /* */ /* Access of TrueType's `gasp' table (body). */ /* */ -/* Copyright 2007-2016 by */ +/* Copyright 2007-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/base/ftgloadr.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/ftgloadr.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/ftgloadr.c (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType glyph loader (body). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/base/ftglyph.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/ftglyph.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/ftglyph.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType convenience functions to handle glyphs (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/base/ftgxval.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/ftgxval.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/ftgxval.c (working copy) @@ -2,9 +2,9 @@ /* */ /* ftgxval.c */ /* */ -/* FreeType API for validating TrueTyepGX/AAT tables (body). */ +/* FreeType API for validating TrueTypeGX/AAT tables (body). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* Masatake YAMATO, Redhat K.K, */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ Index: reactos/sdk/lib/3rdparty/freetype/src/base/ftinit.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/ftinit.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/ftinit.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType initialization layer (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -230,31 +230,10 @@ #define MAX_LENGTH 128 - /* - * Set default properties derived from the `FREETYPE_PROPERTIES' - * environment variable. - * - * `FREETYPE_PROPERTIES' has the following syntax form (broken here into - * multiple lines for better readability) - * - * <optional whitespace> - * <module-name1> ':' - * <property-name1> '=' <property-value1> - * <whitespace> - * <module-name2> ':' - * <property-name2> '=' <property-value2> - * ... - * - * Example: - * - * FREETYPE_PROPERTIES=truetype:interpreter-version=35 \ - * cff:no-stem-darkening=1 \ - * autofitter:warping=1 - * - */ + /* documentation is in ftmodapi.h */ - static void - ft_set_default_properties( FT_Library library ) + FT_EXPORT_DEF( void ) + FT_Set_Default_Properties( FT_Library library ) { const char* env; const char* p; @@ -326,8 +305,8 @@ #else - static void - ft_set_default_properties( FT_Library library ) + FT_EXPORT_DEF( void ) + FT_Set_Default_Properties( FT_Library library ) { FT_UNUSED( library ); } @@ -365,7 +344,7 @@ else FT_Add_Default_Modules( *alibrary ); - ft_set_default_properties( *alibrary ); + FT_Set_Default_Properties( *alibrary ); return error; } Index: reactos/sdk/lib/3rdparty/freetype/src/base/ftlcdfil.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/ftlcdfil.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/ftlcdfil.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType API for color filtering of subpixel bitmap glyphs (body). */ /* */ -/* Copyright 2006-2016 by */ +/* Copyright 2006-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -30,14 +30,13 @@ #define USE_LEGACY /* FIR filter used by the default and light filters */ - static void - _ft_lcd_filter_fir( FT_Bitmap* bitmap, - FT_Render_Mode mode, - FT_Library library ) + FT_BASE( void ) + ft_lcd_filter_fir( FT_Bitmap* bitmap, + FT_Render_Mode mode, + FT_LcdFiveTapFilter weights ) { - FT_Byte* weights = library->lcd_weights; - FT_UInt width = (FT_UInt)bitmap->width; - FT_UInt height = (FT_UInt)bitmap->rows; + FT_UInt width = (FT_UInt)bitmap->width; + FT_UInt height = (FT_UInt)bitmap->rows; /* horizontal in-place FIR filter */ @@ -176,7 +175,7 @@ static void _ft_lcd_filter_legacy( FT_Bitmap* bitmap, FT_Render_Mode mode, - FT_Library library ) + FT_Byte* weights ) { FT_UInt width = (FT_UInt)bitmap->width; FT_UInt height = (FT_UInt)bitmap->rows; @@ -189,7 +188,7 @@ { 65538 * 1/13, 65538 * 1/6, 65538 * 9/13 } }; - FT_UNUSED( library ); + FT_UNUSED( weights ); /* horizontal in-place intra-pixel filter */ @@ -295,8 +294,8 @@ if ( !weights ) return FT_THROW( Invalid_Argument ); - ft_memcpy( library->lcd_weights, weights, 5 ); - library->lcd_filter_func = _ft_lcd_filter_fir; + ft_memcpy( library->lcd_weights, weights, FT_LCD_FILTER_FIVE_TAPS ); + library->lcd_filter_func = ft_lcd_filter_fir; library->lcd_extra = 2; return FT_Err_Ok; @@ -307,10 +306,10 @@ FT_Library_SetLcdFilter( FT_Library library, FT_LcdFilter filter ) { - static const FT_Byte default_filter[5] = - { 0x08, 0x4d, 0x56, 0x4d, 0x08 }; - static const FT_Byte light_filter[5] = - { 0x00, 0x55, 0x56, 0x55, 0x00 }; + static const FT_LcdFiveTapFilter default_weights = + { 0x08, 0x4d, 0x56, 0x4d, 0x08 }; + static const FT_LcdFiveTapFilter light_weights = + { 0x00, 0x55, 0x56, 0x55, 0x00 }; if ( !library ) @@ -324,14 +323,18 @@ break; case FT_LCD_FILTER_DEFAULT: - ft_memcpy( library->lcd_weights, default_filter, 5 ); - library->lcd_filter_func = _ft_lcd_filter_fir; + ft_memcpy( library->lcd_weights, + default_weights, + FT_LCD_FILTER_FIVE_TAPS ); + library->lcd_filter_func = ft_lcd_filter_fir; library->lcd_extra = 2; break; case FT_LCD_FILTER_LIGHT: - ft_memcpy( library->lcd_weights, light_filter, 5 ); - library->lcd_filter_func = _ft_lcd_filter_fir; + ft_memcpy( library->lcd_weights, + light_weights, + FT_LCD_FILTER_FIVE_TAPS ); + library->lcd_filter_func = ft_lcd_filter_fir; library->lcd_extra = 2; break; @@ -356,6 +359,17 @@ #else /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ + FT_BASE( void ) + ft_lcd_filter_fir( FT_Bitmap* bitmap, + FT_Render_Mode mode, + FT_LcdFiveTapFilter weights ) + { + FT_UNUSED( bitmap ); + FT_UNUSED( mode ); + FT_UNUSED( weights ); + } + + FT_EXPORT_DEF( FT_Error ) FT_Library_SetLcdFilterWeights( FT_Library library, unsigned char *weights ) Index: reactos/sdk/lib/3rdparty/freetype/src/base/ftmac.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/ftmac.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/ftmac.c (working copy) @@ -8,7 +8,7 @@ /* This file is for Mac OS X only; see builds/mac/ftoldmac.c for */ /* classic platforms built by MPW. */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -71,6 +71,9 @@ #include FT_INTERNAL_STREAM_H #include "ftbase.h" + +#ifdef FT_MACINTOSH + /* This is for Mac OS X. Without redefinition, OS_INLINE */ /* expands to `static inline' which doesn't survive the */ /* -ansi compilation flag of GCC. */ @@ -118,8 +121,6 @@ #endif -#ifdef FT_MACINTOSH - /* This function is deprecated because FSSpec is deprecated in Mac OS X */ FT_EXPORT_DEF( FT_Error ) FT_GetFile_From_Mac_Name( const char* fontName, @@ -1076,7 +1077,12 @@ #endif } -#endif /* FT_MACINTOSH */ +#else /* !FT_MACINTOSH */ + /* ANSI C doesn't like empty source files */ + typedef int _ft_mac_dummy; +#endif /* !FT_MACINTOSH */ + + /* END */ Index: reactos/sdk/lib/3rdparty/freetype/src/base/ftmm.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/ftmm.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/ftmm.c (working copy) @@ -4,7 +4,7 @@ /* */ /* Multiple Master font support (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -22,6 +22,7 @@ #include FT_MULTIPLE_MASTERS_H #include FT_INTERNAL_OBJECTS_H #include FT_SERVICE_MULTIPLE_MASTERS_H +#include FT_SERVICE_METRICS_VARIATIONS_H /*************************************************************************/ @@ -62,6 +63,34 @@ } + static FT_Error + ft_face_get_mvar_service( FT_Face face, + FT_Service_MetricsVariations *aservice ) + { + FT_Error error; + + + *aservice = NULL; + + if ( !face ) + return FT_THROW( Invalid_Face_Handle ); + + error = FT_ERR( Invalid_Argument ); + + if ( FT_HAS_MULTIPLE_MASTERS( face ) ) + { + FT_FACE_LOOKUP_SERVICE( face, + *aservice, + METRICS_VARIATIONS ); + + if ( *aservice ) + error = FT_Err_Ok; + } + + return error; + } + + /* documentation is in ftmm.h */ FT_EXPORT_DEF( FT_Error ) @@ -158,8 +187,9 @@ FT_UInt num_coords, FT_Fixed* coords ) { - FT_Error error; - FT_Service_MultiMasters service; + FT_Error error; + FT_Service_MultiMasters service_mm = NULL; + FT_Service_MetricsVariations service_mvar = NULL; /* check of `face' delayed to `ft_face_get_mm_service' */ @@ -167,14 +197,22 @@ if ( !coords ) return FT_THROW( Invalid_Argument ); - error = ft_face_get_mm_service( face, &service ); + error = ft_face_get_mm_service( face, &service_mm ); if ( !error ) { error = FT_ERR( Invalid_Argument ); - if ( service->set_var_design ) - error = service->set_var_design( face, num_coords, coords ); + if ( service_mm->set_var_design ) + error = service_mm->set_var_design( face, num_coords, coords ); } + if ( !error ) + { + (void)ft_face_get_mvar_service( face, &service_mvar ); + + if ( service_mvar && service_mvar->metrics_adjust ) + service_mvar->metrics_adjust( face ); + } + /* enforce recomputation of auto-hinting data */ if ( !error && face->autohint.finalizer ) { @@ -221,8 +259,9 @@ FT_UInt num_coords, FT_Fixed* coords ) { - FT_Error error; - FT_Service_MultiMasters service; + FT_Error error; + FT_Service_MultiMasters service_mm = NULL; + FT_Service_MetricsVariations service_mvar = NULL; /* check of `face' delayed to `ft_face_get_mm_service' */ @@ -230,14 +269,22 @@ if ( !coords ) return FT_THROW( Invalid_Argument ); - error = ft_face_get_mm_service( face, &service ); + error = ft_face_get_mm_service( face, &service_mm ); if ( !error ) { error = FT_ERR( Invalid_Argument ); - if ( service->set_mm_blend ) - error = service->set_mm_blend( face, num_coords, coords ); + if ( service_mm->set_mm_blend ) + error = service_mm->set_mm_blend( face, num_coords, coords ); } + if ( !error ) + { + (void)ft_face_get_mvar_service( face, &service_mvar ); + + if ( service_mvar && service_mvar->metrics_adjust ) + service_mvar->metrics_adjust( face ); + } + /* enforce recomputation of auto-hinting data */ if ( !error && face->autohint.finalizer ) { @@ -259,8 +306,9 @@ FT_UInt num_coords, FT_Fixed* coords ) { - FT_Error error; - FT_Service_MultiMasters service; + FT_Error error; + FT_Service_MultiMasters service_mm = NULL; + FT_Service_MetricsVariations service_mvar = NULL; /* check of `face' delayed to `ft_face_get_mm_service' */ @@ -268,14 +316,22 @@ if ( !coords ) return FT_THROW( Invalid_Argument ); - error = ft_face_get_mm_service( face, &service ); + error = ft_face_get_mm_service( face, &service_mm ); if ( !error ) { error = FT_ERR( Invalid_Argument ); - if ( service->set_mm_blend ) - error = service->set_mm_blend( face, num_coords, coords ); + if ( service_mm->set_mm_blend ) + error = service_mm->set_mm_blend( face, num_coords, coords ); } + if ( !error ) + { + (void)ft_face_get_mvar_service( face, &service_mvar ); + + if ( service_mvar && service_mvar->metrics_adjust ) + service_mvar->metrics_adjust( face ); + } + /* enforce recomputation of auto-hinting data */ if ( !error && face->autohint.finalizer ) { Index: reactos/sdk/lib/3rdparty/freetype/src/base/ftobjs.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/ftobjs.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/ftobjs.c (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType private base classes (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -37,6 +37,9 @@ #include FT_SERVICE_KERNING_H #include FT_SERVICE_TRUETYPE_ENGINE_H +#include FT_AUTOHINTER_H +#include FT_CFF_DRIVER_H + #ifdef FT_CONFIG_OPTION_MAC_FONTS #include "ftbase.h" #endif @@ -462,7 +465,8 @@ Exit: - FT_TRACE4(( "FT_New_GlyphSlot: Return %d\n", error )); + FT_TRACE4(( "FT_New_GlyphSlot: Return 0x%x\n", error )); + return error; } @@ -698,7 +702,7 @@ /* check the size of the `fpgm' and `prep' tables, too -- */ /* the assumption is that there don't exist real TTFs where */ /* both `fpgm' and `prep' tables are missing */ - if ( ( mode == FT_RENDER_MODE_LIGHT && + if ( ( mode == FT_RENDER_MODE_LIGHT && !FT_DRIVER_HINTS_LIGHTLY( driver ) ) || ( FT_IS_SFNT( face ) && ttface->num_locations && @@ -1185,6 +1189,8 @@ } #endif + face->internal->random_seed = -1; + if ( clazz->init_face ) error = clazz->init_face( *astream, face, @@ -2031,13 +2037,15 @@ { FT_TRACE3(( "Skip rule %d: darwin vfs resource fork" " is already checked and" - " no font is found\n", i )); + " no font is found\n", + i )); continue; } if ( errors[i] ) { - FT_TRACE3(( "Error[%d] has occurred in rule %d\n", errors[i], i )); + FT_TRACE3(( "Error 0x%x has occurred in rule %d\n", + errors[i], i )); continue; } @@ -2396,7 +2404,7 @@ if ( bsize->height < 0 || bsize->x_ppem < 0 || bsize->y_ppem < 0 ) { FT_TRACE0(( "FT_Open_Face:" - " Invalid bitmap dimensions for stroke %d," + " Invalid bitmap dimensions for strike %d," " now disabled\n", i )); bsize->width = 0; bsize->height = 0; @@ -2421,6 +2429,12 @@ internal->transform_delta.y = 0; internal->refcount = 1; + + internal->no_stem_darkening = -1; + +#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING + ft_memset( internal->lcd_weights, 0, FT_LCD_FILTER_FIVE_TAPS ); +#endif } if ( aface ) @@ -2440,15 +2454,17 @@ #ifdef FT_DEBUG_LEVEL_TRACE if ( !error && face_index < 0 ) { - FT_TRACE3(( "FT_Open_Face: The font has %ld faces\n" - " and %ld named instances for face %ld\n", + FT_TRACE3(( "FT_Open_Face: The font has %ld face%s\n" + " and %ld named instance%s for face %ld\n", face->num_faces, + face->num_faces == 1 ? "" : "s", face->style_flags >> 16, + ( face->style_flags >> 16 ) == 1 ? "" : "s", -face_index - 1 )); } #endif - FT_TRACE4(( "FT_Open_Face: Return %d\n", error )); + FT_TRACE4(( "FT_Open_Face: Return 0x%x\n", error )); return error; } @@ -2589,7 +2605,9 @@ FT_Size size = NULL; FT_ListNode node = NULL; + FT_Size_Internal internal = NULL; + if ( !face ) return FT_THROW( Invalid_Face_Handle ); @@ -2611,9 +2629,11 @@ size->face = face; - /* for now, do not use any internal fields in size objects */ - size->internal = NULL; + if ( FT_NEW( internal ) ) + goto Exit; + size->internal = internal; + if ( clazz->init_size ) error = clazz->init_size( size ); @@ -3040,6 +3060,10 @@ req->type >= FT_SIZE_REQUEST_TYPE_MAX ) return FT_THROW( Invalid_Argument ); + /* signal the auto-hinter to recompute its size metrics */ + /* (if requested) */ + face->size->internal->autohint_metrics.x_scale = 0; + clazz = face->driver->clazz; if ( clazz->request_size ) @@ -3586,6 +3610,90 @@ /* documentation is in freetype.h */ + FT_EXPORT_DEF( FT_Error ) + FT_Face_Properties( FT_Face face, + FT_UInt num_properties, + FT_Parameter* properties ) + { + FT_Error error = FT_Err_Ok; + + + if ( num_properties > 0 && !properties ) + { + error = FT_THROW( Invalid_Argument ); + goto Exit; + } + + for ( ; num_properties > 0; num_properties-- ) + { + if ( properties->tag == FT_PARAM_TAG_STEM_DARKENING ) + { + if ( properties->data ) + { + if ( *( (FT_Bool*)properties->data ) == TRUE ) + face->internal->no_stem_darkening = FALSE; + else + face->internal->no_stem_darkening = TRUE; + } + else + { + /* use module default */ + face->internal->no_stem_darkening = -1; + } + } + else if ( properties->tag == FT_PARAM_TAG_LCD_FILTER_WEIGHTS ) + { +#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING + if ( properties->data ) + ft_memcpy( face->internal->lcd_weights, + properties->data, + FT_LCD_FILTER_FIVE_TAPS ); + else + { + /* Value NULL indicates `no custom weights, use library */ + /* defaults', signaled by filling the weight field with zeros. */ + ft_memset( face->internal->lcd_weights, + 0, + FT_LCD_FILTER_FIVE_TAPS ); + } +#else + error = FT_THROW( Unimplemented_Feature ); + goto Exit; +#endif + } + else if ( properties->tag == FT_PARAM_TAG_RANDOM_SEED ) + { + if ( properties->data ) + { + face->internal->random_seed = *( (FT_Int32*)properties->data ); + if ( face->internal->random_seed < 0 ) + face->internal->random_seed = 0; + } + else + { + /* use module default */ + face->internal->random_seed = -1; + } + } + else + { + error = FT_THROW( Invalid_Argument ); + goto Exit; + } + + if ( error ) + break; + + properties++; + } + + Exit: + return error; + } + + + /* documentation is in freetype.h */ + FT_EXPORT_DEF( FT_UInt ) FT_Face_GetCharVariantIndex( FT_Face face, FT_ULong charcode, @@ -3609,12 +3717,14 @@ if ( charcode > 0xFFFFFFFFUL ) { - FT_TRACE1(( "FT_Get_Char_Index: too large charcode" )); + FT_TRACE1(( "FT_Face_GetCharVariantIndex:" + " too large charcode" )); FT_TRACE1(( " 0x%x is truncated\n", charcode )); } if ( variantSelector > 0xFFFFFFFFUL ) { - FT_TRACE1(( "FT_Get_Char_Index: too large variantSelector" )); + FT_TRACE1(( "FT_Face_GetCharVariantIndex:" + " too large variantSelector" )); FT_TRACE1(( " 0x%x is truncated\n", variantSelector )); } @@ -3650,12 +3760,14 @@ if ( charcode > 0xFFFFFFFFUL ) { - FT_TRACE1(( "FT_Get_Char_Index: too large charcode" )); + FT_TRACE1(( "FT_Face_GetCharVariantIsDefault:" + " too large charcode" )); FT_TRACE1(( " 0x%x is truncated\n", charcode )); } if ( variantSelector > 0xFFFFFFFFUL ) { - FT_TRACE1(( "FT_Get_Char_Index: too large variantSelector" )); + FT_TRACE1(( "FT_Face_GetCharVariantIsDefault:" + " too large variantSelector" )); FT_TRACE1(( " 0x%x is truncated\n", variantSelector )); } @@ -3718,7 +3830,7 @@ if ( charcode > 0xFFFFFFFFUL ) { - FT_TRACE1(( "FT_Get_Char_Index: too large charcode" )); + FT_TRACE1(( "FT_Face_GetVariantsOfChar: too large charcode" )); FT_TRACE1(( " 0x%x is truncated\n", charcode )); } Index: reactos/sdk/lib/3rdparty/freetype/src/base/ftotval.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/ftotval.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/ftotval.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType API for validating OpenType tables (body). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/base/ftoutln.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/ftoutln.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/ftoutln.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType outline management (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -287,7 +287,7 @@ return FT_Err_Ok; Exit: - FT_TRACE5(( "FT_Outline_Decompose: Error %d\n", error )); + FT_TRACE5(( "FT_Outline_Decompose: Error 0x%x\n", error )); return error; Invalid_Outline: Index: reactos/sdk/lib/3rdparty/freetype/src/base/ftpatent.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/ftpatent.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/ftpatent.c (working copy) @@ -3,9 +3,9 @@ /* ftpatent.c */ /* */ /* FreeType API for checking patented TrueType bytecode instructions */ -/* (body). Obsolete, retained for backwards compatibility. */ +/* (body). Obsolete, retained for backward compatibility. */ /* */ -/* Copyright 2007-2016 by */ +/* Copyright 2007-2017 by */ /* David Turner. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/base/ftpfr.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/ftpfr.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/ftpfr.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType API for accessing PFR-specific data (body). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/base/ftpic.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/ftpic.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/ftpic.c (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services (body). */ /* */ -/* Copyright 2009-2016 by */ +/* Copyright 2009-2017 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/base/ftrfork.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/ftrfork.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/ftrfork.c (working copy) @@ -4,7 +4,7 @@ /* */ /* Embedded resource forks accessor (body). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* Masatake YAMATO and Redhat K.K. */ /* */ /* FT_Raccess_Get_HeaderInfo() and raccess_guess_darwin_hfsplus() are */ Index: reactos/sdk/lib/3rdparty/freetype/src/base/ftsnames.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/ftsnames.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/ftsnames.c (working copy) @@ -7,7 +7,7 @@ /* */ /* This is _not_ used to retrieve glyph names! */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -20,6 +20,8 @@ #include <ft2build.h> +#include FT_INTERNAL_DEBUG_H + #include FT_SFNT_NAMES_H #include FT_INTERNAL_TRUETYPE_TYPES_H #include FT_INTERNAL_STREAM_H @@ -54,7 +56,7 @@ if ( idx < (FT_UInt)ttface->num_names ) { - TT_NameEntryRec* entry = ttface->name_table.names + idx; + TT_Name entry = ttface->name_table.names + idx; /* load name on demand */ @@ -88,6 +90,58 @@ } + /* documentation is in ftsnames.h */ + + FT_EXPORT_DEF( FT_Error ) + FT_Get_Sfnt_LangTag( FT_Face face, + FT_UInt langID, + FT_SfntLangTag *alangTag ) + { + FT_Error error = FT_ERR( Invalid_Argument ); + + + if ( alangTag && face && FT_IS_SFNT( face ) ) + { + TT_Face ttface = (TT_Face)face; + + + if ( ttface->name_table.format != 1 ) + return FT_THROW( Invalid_Table ); + + if ( langID > 0x8000U && + langID - 0x8000U < ttface->name_table.numLangTagRecords ) + { + TT_LangTag entry = ttface->name_table.langTags + + ( langID - 0x8000U ); + + + /* load name on demand */ + if ( entry->stringLength > 0 && !entry->string ) + { + FT_Memory memory = face->memory; + FT_Stream stream = face->stream; + + + if ( FT_NEW_ARRAY ( entry->string, entry->stringLength ) || + FT_STREAM_SEEK( entry->stringOffset ) || + FT_STREAM_READ( entry->string, entry->stringLength ) ) + { + FT_FREE( entry->string ); + entry->stringLength = 0; + } + } + + alangTag->string = (FT_Byte*)entry->string; + alangTag->string_len = entry->stringLength; + + error = FT_Err_Ok; + } + } + + return error; + } + + #endif /* TT_CONFIG_OPTION_SFNT_NAMES */ Index: reactos/sdk/lib/3rdparty/freetype/src/base/ftstream.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/ftstream.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/ftstream.c (working copy) @@ -4,7 +4,7 @@ /* */ /* I/O stream support (body). */ /* */ -/* Copyright 2000-2016 by */ +/* Copyright 2000-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/base/ftstroke.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/ftstroke.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/ftstroke.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType path stroker (body). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/base/ftsynth.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/ftsynth.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/ftsynth.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType synthesizing code for emboldening and slanting (body). */ /* */ -/* Copyright 2000-2016 by */ +/* Copyright 2000-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -130,7 +130,7 @@ if ( ( ystr >> 6 ) > FT_INT_MAX || ( ystr >> 6 ) < FT_INT_MIN ) { FT_TRACE1(( "FT_GlyphSlot_Embolden:" )); - FT_TRACE1(( "too strong embolding parameter ystr=%d\n", ystr )); + FT_TRACE1(( "too strong emboldening parameter ystr=%d\n", ystr )); return; } error = FT_GlyphSlot_Own_Bitmap( slot ); Index: reactos/sdk/lib/3rdparty/freetype/src/base/ftsystem.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/ftsystem.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/ftsystem.c (working copy) @@ -4,7 +4,7 @@ /* */ /* ANSI-specific FreeType low-level system interface (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/base/fttrigon.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/fttrigon.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/fttrigon.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType trigonometric functions (body). */ /* */ -/* Copyright 2001-2016 by */ +/* Copyright 2001-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/base/fttype1.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/fttype1.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/fttype1.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType utility file for PS names support (body). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/base/ftutil.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/ftutil.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/ftutil.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType utility file for memory and list management (body). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/base/ftwinfnt.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/base/ftwinfnt.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/base/ftwinfnt.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType API for accessing Windows FNT specific info (body). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/bdf/bdf.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/bdf/bdf.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/bdf/bdf.c (working copy) @@ -24,9 +24,10 @@ THE SOFTWARE. */ + #define FT_MAKE_OPTION_SINGLE_OBJECT +#include <ft2build.h> -#include <ft2build.h> #include "bdflib.c" #include "bdfdrivr.c" Index: reactos/sdk/lib/3rdparty/freetype/src/bzip2/ftbzip2.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/bzip2/ftbzip2.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/bzip2/ftbzip2.c (working copy) @@ -8,7 +8,7 @@ /* parse compressed PCF fonts, as found with many X11 server */ /* distributions. */ /* */ -/* Copyright 2010-2016 by */ +/* Copyright 2010-2017 by */ /* Joel Klinghed. */ /* */ /* based on `src/gzip/ftgzip.c' */ Index: reactos/sdk/lib/3rdparty/freetype/src/cache/ftcache.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cache/ftcache.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cache/ftcache.c (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType Caching sub-system (body only). */ /* */ -/* Copyright 2000-2016 by */ +/* Copyright 2000-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -17,15 +17,16 @@ #define FT_MAKE_OPTION_SINGLE_OBJECT +#include <ft2build.h> -#include <ft2build.h> -#include "ftcmru.c" -#include "ftcmanag.c" +#include "ftcbasic.c" #include "ftccache.c" #include "ftccmap.c" #include "ftcglyph.c" #include "ftcimage.c" +#include "ftcmanag.c" +#include "ftcmru.c" #include "ftcsbits.c" -#include "ftcbasic.c" + /* END */ Index: reactos/sdk/lib/3rdparty/freetype/src/cache/ftcbasic.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cache/ftcbasic.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cache/ftcbasic.c (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType basic cache interface (body). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/cache/ftccache.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cache/ftccache.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cache/ftccache.c (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType internal cache interface (body). */ /* */ -/* Copyright 2000-2016 by */ +/* Copyright 2000-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/cache/ftccache.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cache/ftccache.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cache/ftccache.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType internal cache interface (specification). */ /* */ -/* Copyright 2000-2016 by */ +/* Copyright 2000-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/cache/ftccback.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cache/ftccback.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cache/ftccback.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Callback functions of the caching sub-system (specification only). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/cache/ftccmap.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cache/ftccmap.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cache/ftccmap.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType CharMap cache (body) */ /* */ -/* Copyright 2000-2016 by */ +/* Copyright 2000-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/cache/ftcerror.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cache/ftcerror.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cache/ftcerror.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Caching sub-system error codes (specification only). */ /* */ -/* Copyright 2001-2016 by */ +/* Copyright 2001-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/cache/ftcglyph.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cache/ftcglyph.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cache/ftcglyph.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType Glyph Image (FT_Glyph) cache (body). */ /* */ -/* Copyright 2000-2016 by */ +/* Copyright 2000-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/cache/ftcglyph.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cache/ftcglyph.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cache/ftcglyph.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType abstract glyph cache (specification). */ /* */ -/* Copyright 2000-2016 by */ +/* Copyright 2000-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/cache/ftcimage.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cache/ftcimage.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cache/ftcimage.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType Image cache (body). */ /* */ -/* Copyright 2000-2016 by */ +/* Copyright 2000-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/cache/ftcimage.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cache/ftcimage.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cache/ftcimage.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType Generic Image cache (specification) */ /* */ -/* Copyright 2000-2016 by */ +/* Copyright 2000-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/cache/ftcmanag.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cache/ftcmanag.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cache/ftcmanag.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType Cache Manager (body). */ /* */ -/* Copyright 2000-2016 by */ +/* Copyright 2000-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/cache/ftcmanag.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cache/ftcmanag.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cache/ftcmanag.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType Cache Manager (specification). */ /* */ -/* Copyright 2000-2016 by */ +/* Copyright 2000-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/cache/ftcmru.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cache/ftcmru.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cache/ftcmru.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType MRU support (body). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/cache/ftcmru.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cache/ftcmru.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cache/ftcmru.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Simple MRU list-cache (specification). */ /* */ -/* Copyright 2000-2016 by */ +/* Copyright 2000-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/cache/ftcsbits.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cache/ftcsbits.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cache/ftcsbits.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType sbits manager (body). */ /* */ -/* Copyright 2000-2016 by */ +/* Copyright 2000-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/cache/ftcsbits.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cache/ftcsbits.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cache/ftcsbits.h (working copy) @@ -4,7 +4,7 @@ /* */ /* A small-bitmap cache (specification). */ /* */ -/* Copyright 2000-2016 by */ +/* Copyright 2000-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/cff/cf2error.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cff/cf2error.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cff/cf2error.h (working copy) @@ -66,7 +66,7 @@ * model our error mechanism on a Java-like exception mechanism. * When we assign an error code we are thus `throwing' an error. * - * The perservation of an error code is done by coding convention. + * The preservation of an error code is done by coding convention. * Upon a function call if the error code is anything other than * `FT_Err_Ok', which is guaranteed to be zero, we * will return without altering that error. This will allow the Index: reactos/sdk/lib/3rdparty/freetype/src/cff/cf2ft.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cff/cf2ft.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cff/cf2ft.c (working copy) @@ -340,6 +340,11 @@ CFF_Builder* builder = &decoder->builder; CFF_Driver driver = (CFF_Driver)FT_FACE_DRIVER( builder->face ); + FT_Bool no_stem_darkening_driver = + driver->no_stem_darkening; + FT_Char no_stem_darkening_font = + builder->face->root.internal->no_stem_darkening; + /* local error */ FT_Error error2 = FT_Err_Ok; CF2_BufferRec buf; @@ -368,12 +373,14 @@ &scaled ); /* copy isCFF2 boolean from TT_Face to CF2_Font */ - font->isCFF2 = builder->face->isCFF2; + font->isCFF2 = builder->face->is_cff2; font->renderingFlags = 0; if ( hinted ) font->renderingFlags |= CF2_FlagsHinted; - if ( scaled && !driver->no_stem_darkening ) + if ( scaled && ( !no_stem_darkening_font || + ( no_stem_darkening_font < 0 && + !no_stem_darkening_driver ) ) ) font->renderingFlags |= CF2_FlagsDarkened; font->darkenParams[0] = driver->darken_params[0]; @@ -450,7 +457,7 @@ FT_ASSERT( decoder && decoder->builder.face ); FT_ASSERT( vec && len ); - return cff_get_var_blend( decoder->builder.face, len, vec, NULL ); + return cff_get_var_blend( decoder->builder.face, len, NULL, vec, NULL ); } #endif Index: reactos/sdk/lib/3rdparty/freetype/src/cff/cf2intrp.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cff/cf2intrp.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cff/cf2intrp.c (working copy) @@ -60,12 +60,6 @@ #define FT_COMPONENT trace_cf2interp - /* some operators are not implemented yet */ -#define CF2_FIXME FT_TRACE4(( "cf2_interpT2CharString:" \ - " operator not implemented yet\n" )) - - - FT_LOCAL_DEF( void ) cf2_hintmask_init( CF2_HintMask hintmask, FT_Error* error ) @@ -339,7 +333,7 @@ FT_Bool doConditionalLastRead ) { CF2_Fixed vals[14]; - CF2_UInt index; + CF2_UInt idx; FT_Bool isHFlex; CF2_Int top, i, j; @@ -346,7 +340,7 @@ vals[0] = *curX; vals[1] = *curY; - index = 0; + idx = 0; isHFlex = FT_BOOL( readFromStack[9] == FALSE ); top = isHFlex ? 9 : 10; @@ -354,7 +348,7 @@ { vals[i + 2] = vals[i]; if ( readFromStack[i] ) - vals[i + 2] += cf2_stack_getReal( opStack, index++ ); + vals[i + 2] += cf2_stack_getReal( opStack, idx++ ); } if ( isHFlex ) @@ -364,7 +358,7 @@ { FT_Bool lastIsX = (FT_Bool)( cf2_fixedAbs( vals[10] - *curX ) > cf2_fixedAbs( vals[11] - *curY ) ); - CF2_Fixed lastVal = cf2_stack_getReal( opStack, index ); + CF2_Fixed lastVal = cf2_stack_getReal( opStack, idx ); if ( lastIsX ) @@ -381,12 +375,12 @@ else { if ( readFromStack[10] ) - vals[12] = vals[10] + cf2_stack_getReal( opStack, index++ ); + vals[12] = vals[10] + cf2_stack_getReal( opStack, idx++ ); else vals[12] = *curX; if ( readFromStack[11] ) - vals[13] = vals[11] + cf2_stack_getReal( opStack, index ); + vals[13] = vals[11] + cf2_stack_getReal( opStack, idx ); else vals[13] = *curY; } @@ -786,16 +780,16 @@ case cf2_cmdRLINETO: { - CF2_UInt index; + CF2_UInt idx; CF2_UInt count = cf2_stack_count( opStack ); FT_TRACE4(( " rlineto\n" )); - for ( index = 0; index < count; index += 2 ) + for ( idx = 0; idx < count; idx += 2 ) { - curX += cf2_stack_getReal( opStack, index + 0 ); - curY += cf2_stack_getReal( opStack, index + 1 ); + curX += cf2_stack_getReal( opStack, idx + 0 ); + curY += cf2_stack_getReal( opStack, idx + 1 ); cf2_glyphpath_lineTo( &glyphPath, curX, curY ); } @@ -807,7 +801,7 @@ case cf2_cmdHLINETO: case cf2_cmdVLINETO: { - CF2_UInt index; + CF2_UInt idx; CF2_UInt count = cf2_stack_count( opStack ); FT_Bool isX = FT_BOOL( op1 == cf2_cmdHLINETO ); @@ -815,9 +809,9 @@ FT_TRACE4(( isX ? " hlineto\n" : " vlineto\n" )); - for ( index = 0; index < count; index++ ) + for ( idx = 0; idx < count; idx++ ) { - CF2_Fixed v = cf2_stack_getReal( opStack, index ); + CF2_Fixed v = cf2_stack_getReal( opStack, idx ); if ( isX ) @@ -838,33 +832,33 @@ case cf2_cmdRRCURVETO: { CF2_UInt count = cf2_stack_count( opStack ); - CF2_UInt index = 0; + CF2_UInt idx = 0; FT_TRACE4(( op1 == cf2_cmdRCURVELINE ? " rcurveline\n" : " rrcurveto\n" )); - while ( index + 6 <= count ) + while ( idx + 6 <= count ) { - CF2_Fixed x1 = cf2_stack_getReal( opStack, index + 0 ) + curX; - CF2_Fixed y1 = cf2_stack_getReal( opStack, index + 1 ) + curY; - CF2_Fixed x2 = cf2_stack_getReal( opStack, index + 2 ) + x1; - CF2_Fixed y2 = cf2_stack_getReal( opStack, index + 3 ) + y1; - CF2_Fixed x3 = cf2_stack_getReal( opStack, index + 4 ) + x2; - CF2_Fixed y3 = cf2_stack_getReal( opStack, index + 5 ) + y2; + CF2_Fixed x1 = cf2_stack_getReal( opStack, idx + 0 ) + curX; + CF2_Fixed y1 = cf2_stack_getReal( opStack, idx + 1 ) + curY; + CF2_Fixed x2 = cf2_stack_getReal( opStack, idx + 2 ) + x1; + CF2_Fixed y2 = cf2_stack_getReal( opStack, idx + 3 ) + y1; + CF2_Fixed x3 = cf2_stack_getReal( opStack, idx + 4 ) + x2; + CF2_Fixed y3 = cf2_stack_getReal( opStack, idx + 5 ) + y2; cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 ); - curX = x3; - curY = y3; - index += 6; + curX = x3; + curY = y3; + idx += 6; } if ( op1 == cf2_cmdRCURVELINE ) { - curX += cf2_stack_getReal( opStack, index + 0 ); - curY += cf2_stack_getReal( opStack, index + 1 ); + curX += cf2_stack_getReal( opStack, idx + 0 ); + curY += cf2_stack_getReal( opStack, idx + 1 ); cf2_glyphpath_lineTo( &glyphPath, curX, curY ); } @@ -1273,11 +1267,24 @@ continue; /* do not clear the stack */ case cf2_escRANDOM: /* in spec */ - FT_TRACE4(( " random\n" )); + { + CF2_F16Dot16 r; - CF2_FIXME; - break; + FT_TRACE4(( " random\n" )); + + /* only use the lower 16 bits of `random' */ + /* to generate a number in the range (0;1] */ + r = (CF2_F16Dot16) + ( ( decoder->current_subfont->random & 0xFFFF ) + 1 ); + + decoder->current_subfont->random = + cff_random( decoder->current_subfont->random ); + + cf2_stack_pushFixed( opStack, r ); + } + continue; /* do not clear the stack */ + case cf2_escMUL: { CF2_F16Dot16 factor1; @@ -1607,35 +1614,35 @@ case cf2_cmdRLINECURVE: { CF2_UInt count = cf2_stack_count( opStack ); - CF2_UInt index = 0; + CF2_UInt idx = 0; FT_TRACE4(( " rlinecurve\n" )); - while ( index + 6 < count ) + while ( idx + 6 < count ) { - curX += cf2_stack_getReal( opStack, index + 0 ); - curY += cf2_stack_getReal( opStack, index + 1 ); + curX += cf2_stack_getReal( opStack, idx + 0 ); + curY += cf2_stack_getReal( opStack, idx + 1 ); cf2_glyphpath_lineTo( &glyphPath, curX, curY ); - index += 2; + idx += 2; } - while ( index < count ) + while ( idx < count ) { - CF2_Fixed x1 = cf2_stack_getReal( opStack, index + 0 ) + curX; - CF2_Fixed y1 = cf2_stack_getReal( opStack, index + 1 ) + curY; - CF2_Fixed x2 = cf2_stack_getReal( opStack, index + 2 ) + x1; - CF2_Fixed y2 = cf2_stack_getReal( opStack, index + 3 ) + y1; - CF2_Fixed x3 = cf2_stack_getReal( opStack, index + 4 ) + x2; - CF2_Fixed y3 = cf2_stack_getReal( opStack, index + 5 ) + y2; + CF2_Fixed x1 = cf2_stack_getReal( opStack, idx + 0 ) + curX; + CF2_Fixed y1 = cf2_stack_getReal( opStack, idx + 1 ) + curY; + CF2_Fixed x2 = cf2_stack_getReal( opStack, idx + 2 ) + x1; + CF2_Fixed y2 = cf2_stack_getReal( opStack, idx + 3 ) + y1; + CF2_Fixed x3 = cf2_stack_getReal( opStack, idx + 4 ) + x2; + CF2_Fixed y3 = cf2_stack_getReal( opStack, idx + 5 ) + y2; cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 ); - curX = x3; - curY = y3; - index += 6; + curX = x3; + curY = y3; + idx += 6; } cf2_stack_clear( opStack ); @@ -1645,42 +1652,42 @@ case cf2_cmdVVCURVETO: { CF2_UInt count, count1 = cf2_stack_count( opStack ); - CF2_UInt index = 0; + CF2_UInt idx = 0; /* if `cf2_stack_count' isn't of the form 4n or 4n+1, */ /* we enforce it by clearing the second bit */ /* (and sorting the stack indexing to suit) */ - count = count1 & ~2U; - index += count1 - count; + count = count1 & ~2U; + idx += count1 - count; FT_TRACE4(( " vvcurveto\n" )); - while ( index < count ) + while ( idx < count ) { CF2_Fixed x1, y1, x2, y2, x3, y3; - if ( ( count - index ) & 1 ) + if ( ( count - idx ) & 1 ) { - x1 = cf2_stack_getReal( opStack, index ) + curX; + x1 = cf2_stack_getReal( opStack, idx ) + curX; - index++; + idx++; } else x1 = curX; - y1 = cf2_stack_getReal( opStack, index + 0 ) + curY; - x2 = cf2_stack_getReal( opStack, index + 1 ) + x1; - y2 = cf2_stack_getReal( opStack, index + 2 ) + y1; + y1 = cf2_stack_getReal( opStack, idx + 0 ) + curY; + x2 = cf2_stack_getReal( opStack, idx + 1 ) + x1; + y2 = cf2_stack_getReal( opStack, idx + 2 ) + y1; x3 = x2; - y3 = cf2_stack_getReal( opStack, index + 3 ) + y2; + y3 = cf2_stack_getReal( opStack, idx + 3 ) + y2; cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 ); - curX = x3; - curY = y3; - index += 4; + curX = x3; + curY = y3; + idx += 4; } cf2_stack_clear( opStack ); @@ -1690,42 +1697,42 @@ case cf2_cmdHHCURVETO: { CF2_UInt count, count1 = cf2_stack_count( opStack ); - CF2_UInt index = 0; + CF2_UInt idx = 0; /* if `cf2_stack_count' isn't of the form 4n or 4n+1, */ /* we enforce it by clearing the second bit */ /* (and sorting the stack indexing to suit) */ - count = count1 & ~2U; - index += count1 - count; + count = count1 & ~2U; + idx += count1 - count; FT_TRACE4(( " hhcurveto\n" )); - while ( index < count ) + while ( idx < count ) { CF2_Fixed x1, y1, x2, y2, x3, y3; - if ( ( count - index ) & 1 ) + if ( ( count - idx ) & 1 ) { - y1 = cf2_stack_getReal( opStack, index ) + curY; + y1 = cf2_stack_getReal( opStack, idx ) + curY; - index++; + idx++; } else y1 = curY; - x1 = cf2_stack_getReal( opStack, index + 0 ) + curX; - x2 = cf2_stack_getReal( opStack, index + 1 ) + x1; - y2 = cf2_stack_getReal( opStack, index + 2 ) + y1; - x3 = cf2_stack_getReal( opStack, index + 3 ) + x2; + x1 = cf2_stack_getReal( opStack, idx + 0 ) + curX; + x2 = cf2_stack_getReal( opStack, idx + 1 ) + x1; + y2 = cf2_stack_getReal( opStack, idx + 2 ) + y1; + x3 = cf2_stack_getReal( opStack, idx + 3 ) + x2; y3 = y2; cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 ); - curX = x3; - curY = y3; - index += 4; + curX = x3; + curY = y3; + idx += 4; } cf2_stack_clear( opStack ); @@ -1736,7 +1743,7 @@ case cf2_cmdHVCURVETO: { CF2_UInt count, count1 = cf2_stack_count( opStack ); - CF2_UInt index = 0; + CF2_UInt idx = 0; FT_Bool alternate = FT_BOOL( op1 == cf2_cmdHVCURVETO ); @@ -1745,12 +1752,12 @@ /* 8n+4, or 8n+5, we enforce it by clearing the */ /* second bit */ /* (and sorting the stack indexing to suit) */ - count = count1 & ~2U; - index += count1 - count; + count = count1 & ~2U; + idx += count1 - count; FT_TRACE4(( alternate ? " hvcurveto\n" : " vhcurveto\n" )); - while ( index < count ) + while ( idx < count ) { CF2_Fixed x1, x2, x3, y1, y2, y3; @@ -1757,17 +1764,17 @@ if ( alternate ) { - x1 = cf2_stack_getReal( opStack, index + 0 ) + curX; + x1 = cf2_stack_getReal( opStack, idx + 0 ) + curX; y1 = curY; - x2 = cf2_stack_getReal( opStack, index + 1 ) + x1; - y2 = cf2_stack_getReal( opStack, index + 2 ) + y1; - y3 = cf2_stack_getReal( opStack, index + 3 ) + y2; + x2 = cf2_stack_getReal( opStack, idx + 1 ) + x1; + y2 = cf2_stack_getReal( opStack, idx + 2 ) + y1; + y3 = cf2_stack_getReal( opStack, idx + 3 ) + y2; - if ( count - index == 5 ) + if ( count - idx == 5 ) { - x3 = cf2_stack_getReal( opStack, index + 4 ) + x2; + x3 = cf2_stack_getReal( opStack, idx + 4 ) + x2; - index++; + idx++; } else x3 = x2; @@ -1777,16 +1784,16 @@ else { x1 = curX; - y1 = cf2_stack_getReal( opStack, index + 0 ) + curY; - x2 = cf2_stack_getReal( opStack, index + 1 ) + x1; - y2 = cf2_stack_getReal( opStack, index + 2 ) + y1; - x3 = cf2_stack_getReal( opStack, index + 3 ) + x2; + y1 = cf2_stack_getReal( opStack, idx + 0 ) + curY; + x2 = cf2_stack_getReal( opStack, idx + 1 ) + x1; + y2 = cf2_stack_getReal( opStack, idx + 2 ) + y1; + x3 = cf2_stack_getReal( opStack, idx + 3 ) + x2; - if ( count - index == 5 ) + if ( count - idx == 5 ) { - y3 = cf2_stack_getReal( opStack, index + 4 ) + y2; + y3 = cf2_stack_getReal( opStack, idx + 4 ) + y2; - index++; + idx++; } else y3 = y2; @@ -1796,9 +1803,9 @@ cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 ); - curX = x3; - curY = y3; - index += 4; + curX = x3; + curY = y3; + idx += 4; } cf2_stack_clear( opStack ); Index: reactos/sdk/lib/3rdparty/freetype/src/cff/cff.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cff/cff.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cff/cff.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType OpenType driver component (body only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -17,16 +17,15 @@ #define FT_MAKE_OPTION_SINGLE_OBJECT - #include <ft2build.h> -#include "cffpic.c" +#include "cffcmap.c" #include "cffdrivr.c" +#include "cffgload.c" #include "cffparse.c" +#include "cffpic.c" #include "cffload.c" #include "cffobjs.c" -#include "cffgload.c" -#include "cffcmap.c" #include "cf2arrst.c" #include "cf2blues.c" @@ -38,4 +37,5 @@ #include "cf2read.c" #include "cf2stack.c" + /* END */ Index: reactos/sdk/lib/3rdparty/freetype/src/cff/cffcmap.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cff/cffcmap.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cff/cffcmap.c (working copy) @@ -4,7 +4,7 @@ /* */ /* CFF character mapping table (cmap) support (body). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/cff/cffcmap.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cff/cffcmap.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cff/cffcmap.h (working copy) @@ -4,7 +4,7 @@ /* */ /* CFF character mapping table (cmap) support (specification). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/cff/cffdrivr.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cff/cffdrivr.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cff/cffdrivr.c (working copy) @@ -4,7 +4,7 @@ /* */ /* OpenType font driver implementation (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -34,6 +34,7 @@ #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT #include FT_SERVICE_MULTIPLE_MASTERS_H +#include FT_SERVICE_METRICS_VARIATIONS_H #endif #include "cfferrs.h" @@ -832,6 +833,7 @@ { FT_UInt* hinting_engine = (FT_UInt*)value; + if ( *hinting_engine == FT_CFF_HINTING_ADOBE #ifdef CFF_CONFIG_OPTION_OLD_ENGINE || *hinting_engine == FT_CFF_HINTING_FREETYPE @@ -853,12 +855,10 @@ long nsd = ft_strtol( s, NULL, 10 ); - if ( nsd == 0 ) - driver->no_stem_darkening = 0; - else if ( nsd == 1 ) - driver->no_stem_darkening = 1; + if ( !nsd ) + driver->no_stem_darkening = FALSE; else - return FT_THROW( Invalid_Argument ); + driver->no_stem_darkening = TRUE; } else #endif @@ -871,7 +871,31 @@ return error; } + else if ( !ft_strcmp( property_name, "random-seed" ) ) + { + FT_Int32 random_seed; + +#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES + if ( value_is_string ) + { + const char* s = (const char*)value; + + + random_seed = (FT_Int32)ft_strtol( s, NULL, 10 ); + } + else +#endif + random_seed = *(FT_Int32*)value; + + if ( random_seed < 0 ) + random_seed = 0; + + driver->random_seed = random_seed; + + return error; + } + FT_TRACE0(( "cff_property_set: missing property `%s'\n", property_name )); return FT_THROW( Missing_Property ); @@ -1018,6 +1042,49 @@ (FT_Get_Var_Blend_Func) cff_get_var_blend, /* get_var_blend */ (FT_Done_Blend_Func) cff_done_blend /* done_blend */ ) + + + /* + * METRICS VARIATIONS SERVICE + * + */ + + static FT_Error + cff_hadvance_adjust( CFF_Face face, + FT_UInt gindex, + FT_Int *avalue ) + { + FT_Service_MetricsVariations var = (FT_Service_MetricsVariations)face->var; + + + return var->hadvance_adjust( FT_FACE( face ), gindex, avalue ); + } + + + static void + cff_metrics_adjust( CFF_Face face ) + { + FT_Service_MetricsVariations var = (FT_Service_MetricsVariations)face->var; + + + var->metrics_adjust( FT_FACE( face ) ); + } + + + FT_DEFINE_SERVICE_METRICSVARIATIONSREC( + cff_service_metrics_variations, + + (FT_HAdvance_Adjust_Func)cff_hadvance_adjust, /* hadvance_adjust */ + (FT_LSB_Adjust_Func) NULL, /* lsb_adjust */ + (FT_RSB_Adjust_Func) NULL, /* rsb_adjust */ + + (FT_VAdvance_Adjust_Func)NULL, /* vadvance_adjust */ + (FT_TSB_Adjust_Func) NULL, /* tsb_adjust */ + (FT_BSB_Adjust_Func) NULL, /* bsb_adjust */ + (FT_VOrg_Adjust_Func) NULL, /* vorg_adjust */ + + (FT_Metrics_Adjust_Func) cff_metrics_adjust /* metrics_adjust */ + ) #endif @@ -1035,11 +1102,12 @@ #if !defined FT_CONFIG_OPTION_NO_GLYPH_NAMES && \ defined TT_CONFIG_OPTION_GX_VAR_SUPPORT - FT_DEFINE_SERVICEDESCREC8( + FT_DEFINE_SERVICEDESCREC9( cff_services, FT_SERVICE_ID_FONT_FORMAT, FT_FONT_FORMAT_CFF, FT_SERVICE_ID_MULTI_MASTERS, &CFF_SERVICE_MULTI_MASTERS_GET, + FT_SERVICE_ID_METRICS_VARIATIONS, &CFF_SERVICE_METRICS_VAR_GET, FT_SERVICE_ID_POSTSCRIPT_INFO, &CFF_SERVICE_PS_INFO_GET, FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &CFF_SERVICE_PS_NAME_GET, FT_SERVICE_ID_GLYPH_DICT, &CFF_SERVICE_GLYPH_DICT_GET, @@ -1060,11 +1128,12 @@ FT_SERVICE_ID_PROPERTIES, &CFF_SERVICE_PROPERTIES_GET ) #elif defined TT_CONFIG_OPTION_GX_VAR_SUPPORT - FT_DEFINE_SERVICEDESCREC7( + FT_DEFINE_SERVICEDESCREC8( cff_services, FT_SERVICE_ID_FONT_FORMAT, FT_FONT_FORMAT_CFF, FT_SERVICE_ID_MULTI_MASTERS, &CFF_SERVICE_MULTI_MASTERS_GET, + FT_SERVICE_ID_METRICS_VARIATIONS, &CFF_SERVICE_METRICS_VAR_GET, FT_SERVICE_ID_POSTSCRIPT_INFO, &CFF_SERVICE_PS_INFO_GET, FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &CFF_SERVICE_PS_NAME_GET, FT_SERVICE_ID_TT_CMAP, &CFF_SERVICE_GET_CMAP_INFO_GET, Index: reactos/sdk/lib/3rdparty/freetype/src/cff/cffdrivr.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cff/cffdrivr.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cff/cffdrivr.h (working copy) @@ -4,7 +4,7 @@ /* */ /* High-level OpenType driver interface (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/cff/cfferrs.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cff/cfferrs.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cff/cfferrs.h (working copy) @@ -4,7 +4,7 @@ /* */ /* CFF error codes (specification only). */ /* */ -/* Copyright 2001-2016 by */ +/* Copyright 2001-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/cff/cffgload.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cff/cffgload.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cff/cffgload.c (working copy) @@ -4,7 +4,7 @@ /* */ /* OpenType Glyph Loader (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -278,11 +278,15 @@ if ( hinting && size ) { - CFF_Internal internal = (CFF_Internal)size->root.internal; + FT_Size ftsize = FT_SIZE( size ); + CFF_Internal internal = (CFF_Internal)ftsize->internal->module_data; - builder->hints_globals = (void *)internal->topfont; - builder->hints_funcs = glyph->root.internal->glyph_hints; + if ( internal ) + { + builder->hints_globals = (void *)internal->topfont; + builder->hints_funcs = glyph->root.internal->glyph_hints; + } } } @@ -440,7 +444,8 @@ if ( builder->hints_funcs && size ) { - CFF_Internal internal = (CFF_Internal)size->root.internal; + FT_Size ftsize = FT_SIZE( size ); + CFF_Internal internal = (CFF_Internal)ftsize->internal->module_data; /* for CFFs without subfonts, this value has already been set */ @@ -457,7 +462,7 @@ decoder->glyph_width = sub->private_dict.default_width; decoder->nominal_width = sub->private_dict.nominal_width; - decoder->current_subfont = sub; /* for Adobe's CFF handler */ + decoder->current_subfont = sub; Exit: return error; @@ -913,7 +918,6 @@ FT_Byte* limit; CFF_Builder* builder = &decoder->builder; FT_Pos x, y; - FT_Fixed seed; FT_Fixed* stack; FT_Int charstring_type = decoder->cff->top_font.font_dict.charstring_type; @@ -929,15 +933,6 @@ decoder->num_hints = 0; decoder->read_width = 1; - /* compute random seed from stack address of parameter */ - seed = (FT_Fixed)( ( (FT_Offset)(char*)&seed ^ - (FT_Offset)(char*)&decoder ^ - (FT_Offset)(char*)&charstring_base ) & - FT_ULONG_MAX ); - seed = ( seed ^ ( seed >> 10 ) ^ ( seed >> 20 ) ) & 0xFFFFL; - if ( seed == 0 ) - seed = 0x7384; - /* initialize the decoder */ decoder->top = decoder->stack; decoder->zone = decoder->zones; @@ -2104,22 +2099,16 @@ break; case cff_op_random: - { - FT_Fixed Rand; + FT_TRACE4(( " random\n" )); + /* only use the lower 16 bits of `random' */ + /* to generate a number in the range (0;1] */ + args[0] = (FT_Fixed) + ( ( decoder->current_subfont->random & 0xFFFF ) + 1 ); + args++; - FT_TRACE4(( " rand\n" )); - - Rand = seed; - if ( Rand >= 0x8000L ) - Rand++; - - args[0] = Rand; - seed = FT_MulFix( seed, 0x10000L - seed ); - if ( seed == 0 ) - seed += 0x2873; - args++; - } + decoder->current_subfont->random = + cff_random( decoder->current_subfont->random ); break; case cff_op_mul: Index: reactos/sdk/lib/3rdparty/freetype/src/cff/cffgload.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cff/cffgload.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cff/cffgload.h (working copy) @@ -4,7 +4,7 @@ /* */ /* OpenType Glyph Loader (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/cff/cffload.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cff/cffload.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cff/cffload.c (working copy) @@ -4,7 +4,7 @@ /* */ /* OpenType and CFF data/program tables loader (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -1113,7 +1113,7 @@ /* convert 2.14 to Fixed */ - #define FT_fdot14ToFixed( x ) ( ( (FT_Fixed)( (FT_Int16)(x) ) ) << 2 ) + #define FT_fdot14ToFixed( x ) ( (FT_Fixed)( (FT_ULong)(x) << 2 ) ) static FT_Error @@ -1307,6 +1307,10 @@ size = 5 * numBlends; /* add 5 bytes per entry */ if ( subFont->blend_used + size > subFont->blend_alloc ) { + FT_Byte* blend_stack_old = subFont->blend_stack; + FT_Byte* blend_top_old = subFont->blend_top; + + /* increase or allocate `blend_stack' and reset `blend_top'; */ /* prepare to append `numBlends' values to the buffer */ if ( FT_REALLOC( subFont->blend_stack, @@ -1316,6 +1320,22 @@ subFont->blend_top = subFont->blend_stack + subFont->blend_used; subFont->blend_alloc += size; + + /* iterate over the parser stack and adjust pointers */ + /* if the reallocated buffer has a different address */ + if ( blend_stack_old && + subFont->blend_stack != blend_stack_old ) + { + FT_PtrDist offset = subFont->blend_stack - blend_stack_old; + FT_Byte** p; + + + for ( p = parser->stack; p < parser->top; p++ ) + { + if ( *p >= blend_stack_old && *p < blend_top_old ) + *p += offset; + } + } } subFont->blend_used += size; @@ -1329,24 +1349,25 @@ /* convert inputs to 16.16 fixed point */ - sum = cff_parse_num( parser, &parser->stack[i + base] ) << 16; + sum = cff_parse_num( parser, &parser->stack[i + base] ) * 65536; for ( j = 1; j < blend->lenBV; j++ ) sum += FT_MulFix( *weight++, cff_parse_num( parser, - &parser->stack[delta++] ) << 16 ); + &parser->stack[delta++] ) * 65536 ); /* point parser stack to new value on blend_stack */ parser->stack[i + base] = subFont->blend_top; - /* Push blended result as Type 2 5-byte fixed point number (except */ - /* that host byte order is used). This will not conflict with */ - /* actual DICTs because 255 is a reserved opcode in both CFF and */ - /* CFF2 DICTs. See `cff_parse_num' for decode of this, which rounds */ - /* to an integer. */ - *subFont->blend_top++ = 255; - *((FT_UInt32*)subFont->blend_top) = (FT_UInt32)sum; /* write 4 bytes */ - subFont->blend_top += 4; + /* Push blended result as Type 2 5-byte fixed point number. This */ + /* will not conflict with actual DICTs because 255 is a reserved */ + /* opcode in both CFF and CFF2 DICTs. See `cff_parse_num' for */ + /* decode of this, which rounds to an integer. */ + *subFont->blend_top++ = 255; + *subFont->blend_top++ = ( (FT_UInt32)sum & 0xFF000000U ) >> 24; + *subFont->blend_top++ = ( (FT_UInt32)sum & 0x00FF0000U ) >> 16; + *subFont->blend_top++ = ( (FT_UInt32)sum & 0x0000FF00U ) >> 8; + *subFont->blend_top++ = (FT_UInt32)sum & 0x000000FFU; } /* leave only numBlends results on parser stack */ @@ -1442,11 +1463,16 @@ /* Note: `lenNDV' could be zero. */ /* In that case, build default blend vector (1,0,0...). */ - /* In the normal case, initialize each component to 1 */ - /* before inner loop. */ - if ( lenNDV != 0 ) - blend->BV[master] = FT_FIXED_ONE; /* default */ + if ( !lenNDV ) + { + blend->BV[master] = 0; + continue; + } + /* In the normal case, initialize each component to 1 */ + /* before inner loop. */ + blend->BV[master] = FT_FIXED_ONE; /* default */ + /* inner loop steps through axes in this region */ for ( j = 0; j < lenNDV; j++ ) { @@ -1508,12 +1534,12 @@ lenNDV * sizeof ( *NDV ) ) ) goto Exit; - blend->lenNDV = lenNDV; FT_MEM_COPY( blend->lastNDV, NDV, lenNDV * sizeof ( *NDV ) ); } + blend->lenNDV = lenNDV; blend->builtBV = TRUE; Exit: @@ -1551,12 +1577,17 @@ cff_get_var_blend( CFF_Face face, FT_UInt *num_coords, FT_Fixed* *coords, + FT_Fixed* *normalizedcoords, FT_MM_Var* *mm_var ) { FT_Service_MultiMasters mm = (FT_Service_MultiMasters)face->mm; - return mm->get_var_blend( FT_FACE( face ), num_coords, coords, mm_var ); + return mm->get_var_blend( FT_FACE( face ), + num_coords, + coords, + normalizedcoords, + mm_var ); } @@ -1864,7 +1895,8 @@ subfont->lenNDV = lenNDV; subfont->NDV = NDV; - stackSize = font->cff2 ? font->top_font.font_dict.maxstack + /* add 1 for the operator */ + stackSize = font->cff2 ? font->top_font.font_dict.maxstack + 1 : CFF_MAX_STACK_DEPTH + 1; if ( cff_parser_init( &parser, @@ -1892,6 +1924,13 @@ /* ensure that `num_blue_values' is even */ priv->num_blue_values &= ~1; + /* sanitize `initialRandomSeed' to be a positive value, if necessary; */ + /* this is not mandated by the specification but by our implementation */ + if ( priv->initial_random_seed < 0 ) + priv->initial_random_seed = -priv->initial_random_seed; + else if ( priv->initial_random_seed == 0 ) + priv->initial_random_seed = 987654321; + Exit: /* clean up */ cff_blend_clear( subfont ); /* clear blend stack */ @@ -1903,6 +1942,18 @@ } + FT_LOCAL_DEF( FT_UInt32 ) + cff_random( FT_UInt32 r ) + { + /* a 32bit version of the `xorshift' algorithm */ + r ^= r << 13; + r ^= r >> 17; + r ^= r << 5; + + return r; + } + + /* There are 3 ways to call this function, distinguished by code. */ /* */ /* . CFF_CODE_TOPDICT for either a CFF Top DICT or a CFF Font DICT */ @@ -1916,7 +1967,8 @@ FT_Stream stream, FT_ULong base_offset, FT_UInt code, - CFF_Font font ) + CFF_Font font, + CFF_Face face ) { FT_Error error; CFF_ParserRec parser; @@ -2013,6 +2065,55 @@ if ( error ) goto Exit; + if ( !cff2 ) + { + /* + * Initialize the random number generator. + * + * . If we have a face-specific seed, use it. + * If non-zero, update it to a positive value. + * + * . Otherwise, use the seed from the CFF driver. + * If non-zero, update it to a positive value. + * + * . If the random value is zero, use the seed given by the subfont's + * `initialRandomSeed' value. + * + */ + if ( face->root.internal->random_seed == -1 ) + { + CFF_Driver driver = (CFF_Driver)FT_FACE_DRIVER( face ); + + + subfont->random = (FT_UInt32)driver->random_seed; + if ( driver->random_seed ) + { + do + { + driver->random_seed = + (FT_Int32)cff_random( (FT_UInt32)driver->random_seed ); + + } while ( driver->random_seed < 0 ); + } + } + else + { + subfont->random = (FT_UInt32)face->root.internal->random_seed; + if ( face->root.internal->random_seed ) + { + do + { + face->root.internal->random_seed = + (FT_Int32)cff_random( (FT_UInt32)face->root.internal->random_seed ); + + } while ( face->root.internal->random_seed < 0 ); + } + } + + if ( !subfont->random ) + subfont->random = (FT_UInt32)priv->initial_random_seed; + } + /* read the local subrs, if any */ if ( priv->local_subrs_offset ) { @@ -2058,6 +2159,7 @@ FT_Stream stream, FT_Int face_index, CFF_Font font, + CFF_Face face, FT_Bool pure_cff, FT_Bool cff2 ) { @@ -2178,6 +2280,18 @@ goto Exit; } + /* if we have an empty font name, */ + /* it must be the only font in the CFF */ + if ( font->name_index.count > 1 && + font->name_index.data_size < font->name_index.count ) + { + /* for pure CFFs, we still haven't checked enough bytes */ + /* to be sure that it is a CFF at all */ + error = pure_cff ? FT_THROW( Unknown_File_Format ) + : FT_THROW( Invalid_File_Format ); + goto Exit; + } + if ( FT_SET_ERROR( cff_index_init( &font->font_dict_index, stream, 0, cff2 ) ) || FT_SET_ERROR( cff_index_init( &string_index, @@ -2189,6 +2303,15 @@ &font->string_pool, &font->string_pool_size ) ) ) goto Exit; + + /* there must be a Top DICT index entry for each name index entry */ + if ( font->name_index.count > font->font_dict_index.count ) + { + FT_ERROR(( "cff_font_load:" + " not enough entries in Top DICT index\n" )); + error = FT_THROW( Invalid_File_Format ); + goto Exit; + } } font->num_strings = string_index.count; @@ -2236,7 +2359,8 @@ stream, base_offset, cff2 ? CFF2_CODE_TOPDICT : CFF_CODE_TOPDICT, - font ); + font, + face ); if ( error ) goto Exit; @@ -2303,7 +2427,8 @@ base_offset, cff2 ? CFF2_CODE_FONTDICT : CFF_CODE_TOPDICT, - font ); + font, + face ); if ( error ) goto Fail_CID; } Index: reactos/sdk/lib/3rdparty/freetype/src/cff/cffload.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cff/cffload.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cff/cffload.h (working copy) @@ -4,7 +4,7 @@ /* */ /* OpenType & CFF data/program tables loader (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -61,11 +61,15 @@ FT_UInt cid ); + FT_LOCAL( FT_UInt32 ) + cff_random( FT_UInt32 r ); + FT_LOCAL( FT_Error ) cff_font_load( FT_Library library, FT_Stream stream, FT_Int face_index, CFF_Font font, + CFF_Face face, FT_Bool pure_cff, FT_Bool cff2 ); @@ -108,6 +112,7 @@ cff_get_var_blend( CFF_Face face, FT_UInt *num_coords, FT_Fixed* *coords, + FT_Fixed* *normalizedcoords, FT_MM_Var* *mm_var ); FT_LOCAL( void ) Index: reactos/sdk/lib/3rdparty/freetype/src/cff/cffobjs.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cff/cffobjs.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cff/cffobjs.c (working copy) @@ -4,7 +4,7 @@ /* */ /* OpenType objects manager (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -27,6 +27,11 @@ #include FT_INTERNAL_SFNT_H #include FT_CFF_DRIVER_H +#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT +#include FT_MULTIPLE_MASTERS_H +#include FT_SERVICE_MULTIPLE_MASTERS_H +#endif + #include "cffobjs.h" #include "cffload.h" #include "cffcmap.h" @@ -49,9 +54,6 @@ /* */ /* SIZE FUNCTIONS */ /* */ - /* Note that we store the global hints in the size's `internal' root */ - /* field. */ - /* */ /*************************************************************************/ @@ -75,10 +77,11 @@ FT_LOCAL_DEF( void ) cff_size_done( FT_Size cffsize ) /* CFF_Size */ { + FT_Memory memory = cffsize->face->memory; CFF_Size size = (CFF_Size)cffsize; CFF_Face face = (CFF_Face)size->root.face; CFF_Font font = (CFF_Font)face->extra.data; - CFF_Internal internal = (CFF_Internal)cffsize->internal; + CFF_Internal internal = (CFF_Internal)cffsize->internal->module_data; if ( internal ) @@ -98,7 +101,7 @@ funcs->destroy( internal->subfonts[i - 1] ); } - /* `internal' is freed by destroy_size (in ftobjs.c) */ + FT_FREE( internal ); } } @@ -194,7 +197,7 @@ goto Exit; } - cffsize->internal = (FT_Size_Internal)(void*)internal; + cffsize->internal->module_data = internal; } size->strike_index = 0xFFFFFFFFUL; @@ -224,7 +227,7 @@ { CFF_Face face = (CFF_Face)size->face; CFF_Font font = (CFF_Font)face->extra.data; - CFF_Internal internal = (CFF_Internal)size->internal; + CFF_Internal internal = (CFF_Internal)size->internal->module_data; FT_Long top_upm = (FT_Long)font->top_font.font_dict.units_per_em; FT_UInt i; @@ -296,7 +299,7 @@ { CFF_Face cffface = (CFF_Face)size->face; CFF_Font font = (CFF_Font)cffface->extra.data; - CFF_Internal internal = (CFF_Internal)size->internal; + CFF_Internal internal = (CFF_Internal)size->internal->module_data; FT_Long top_upm = (FT_Long)font->top_font.font_dict.units_per_em; FT_UInt i; @@ -517,6 +520,7 @@ goto Exit; /* check whether we have a valid OpenType file */ + FT_TRACE2(( " " )); error = sfnt->init_face( stream, face, face_index, num_params, params ); if ( !error ) { @@ -559,8 +563,8 @@ error = face->goto_table( face, TTAG_CFF2, stream, 0 ); if ( !error ) { - cff2 = 1; - face->isCFF2 = cff2; + cff2 = 1; + face->is_cff2 = cff2; } if ( FT_ERR_EQ( error, Table_Missing ) ) @@ -594,6 +598,7 @@ stream, face_index, cff, + face, pure_cff, cff2 ); if ( error ) @@ -683,62 +688,56 @@ } #endif /* FT_DEBUG_LEVEL_TRACE */ - - #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT + { + FT_Service_MultiMasters mm = (FT_Service_MultiMasters)face->mm; - { - FT_Service_MultiMasters mm = (FT_Service_MultiMasters)face->mm; + FT_Int instance_index = face_index >> 16; - FT_Int instance_index = face_index >> 16; + if ( FT_HAS_MULTIPLE_MASTERS( cffface ) && + mm && + instance_index > 0 ) + { + FT_MM_Var* mm_var; - if ( FT_HAS_MULTIPLE_MASTERS( cffface ) && - mm && - instance_index > 0 ) - { - FT_MM_Var* mm_var; + error = mm->get_mm_var( cffface, NULL ); + if ( error ) + goto Exit; - error = mm->get_mm_var( cffface, NULL ); - if ( error ) - goto Exit; + mm->get_var_blend( cffface, NULL, NULL, NULL, &mm_var ); - mm->get_var_blend( cffface, NULL, NULL, &mm_var ); + if ( mm_var->namedstyle ) + { + FT_Var_Named_Style* named_style; + FT_String* style_name; - if ( mm_var->namedstyle ) - { - FT_Var_Named_Style* named_style; - FT_String* style_name; + /* in `face_index', the instance index starts with value 1 */ + named_style = mm_var->namedstyle + instance_index - 1; + error = sfnt->get_name( face, + (FT_UShort)named_style->strid, + &style_name ); + if ( error ) + goto Exit; - /* in `face_index', the instance index starts with value 1 */ - named_style = mm_var->namedstyle + instance_index - 1; - error = sfnt->get_name( face, - (FT_UShort)named_style->strid, - &style_name ); - if ( error ) - goto Exit; + /* set style name; if already set, replace it */ + if ( face->root.style_name ) + FT_FREE( face->root.style_name ); + face->root.style_name = style_name; - /* set style name; if already set, replace it */ - if ( face->root.style_name ) - FT_FREE( face->root.style_name ); - face->root.style_name = style_name; - - /* finally, select the named instance */ - error = mm->set_var_design( cffface, - mm_var->num_axis, - named_style->coords ); - if ( error ) - goto Exit; + /* finally, select the named instance */ + error = mm->set_var_design( cffface, + mm_var->num_axis, + named_style->coords ); + if ( error ) + goto Exit; + } } } - } - #endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */ - - if ( !dict->has_font_matrix ) dict->units_per_em = pure_cff ? 1000 : face->root.units_per_EM; @@ -1021,7 +1020,6 @@ cffface->style_flags = flags; } - #ifndef FT_CONFIG_OPTION_NO_GLYPH_NAMES /* CID-keyed CFF fonts don't have glyph names -- the SFNT loader */ /* has unset this flag because of the 3.0 `post' table. */ @@ -1032,7 +1030,6 @@ if ( dict->cid_registry != 0xFFFFU && pure_cff ) cffface->face_flags |= FT_FACE_FLAG_CID_KEYED; - /*******************************************************************/ /* */ /* Compute char maps. */ @@ -1164,7 +1161,9 @@ { CFF_Driver driver = (CFF_Driver)module; + FT_UInt32 seed; + /* set default property values, cf. `ftcffdrv.h' */ #ifdef CFF_CONFIG_OPTION_OLD_ENGINE driver->hinting_engine = FT_CFF_HINTING_FREETYPE; @@ -1183,6 +1182,18 @@ driver->darken_params[6] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4; driver->darken_params[7] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4; + /* compute random seed from some memory addresses */ + seed = (FT_UInt32)( (FT_Offset)(char*)&seed ^ + (FT_Offset)(char*)&module ^ + (FT_Offset)(char*)module->memory ); + seed = seed ^ ( seed >> 10 ) ^ ( seed >> 20 ); + + driver->random_seed = (FT_Int32)seed; + if ( driver->random_seed < 0 ) + driver->random_seed = -driver->random_seed; + else if ( driver->random_seed == 0 ) + driver->random_seed = 123456789; + return FT_Err_Ok; } Index: reactos/sdk/lib/3rdparty/freetype/src/cff/cffobjs.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cff/cffobjs.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cff/cffobjs.h (working copy) @@ -4,7 +4,7 @@ /* */ /* OpenType objects manager (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -118,11 +118,11 @@ { FT_DriverRec root; - FT_UInt hinting_engine; - FT_Bool no_stem_darkening; + FT_UInt hinting_engine; + FT_Bool no_stem_darkening; + FT_Int darken_params[8]; + FT_Int32 random_seed; - FT_Int darken_params[8]; - } CFF_DriverRec; Index: reactos/sdk/lib/3rdparty/freetype/src/cff/cffparse.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cff/cffparse.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cff/cffparse.c (working copy) @@ -4,7 +4,7 @@ /* */ /* CFF token stream parser (body) */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -448,9 +448,21 @@ /* 16.16 fixed point is used internally for CFF2 blend results. */ /* Since these are trusted values, a limit check is not needed. */ - /* After the 255, 4 bytes are in host order. */ - /* Blend result is rounded to integer. */ - return (FT_Long)( *( (FT_UInt32 *) ( d[0] + 1 ) ) + 0x8000U ) >> 16; + /* After the 255, 4 bytes give the number. */ + /* The blend value is converted to integer, with rounding; */ + /* due to the right-shift we don't need the lowest byte. */ +#if 0 + return (FT_Short)( + ( ( ( (FT_UInt32)*( d[0] + 1 ) << 24 ) | + ( (FT_UInt32)*( d[0] + 2 ) << 16 ) | + ( (FT_UInt32)*( d[0] + 3 ) << 8 ) | + (FT_UInt32)*( d[0] + 4 ) ) + 0x8000U ) >> 16 ); +#else + return (FT_Short)( + ( ( ( (FT_UInt32)*( d[0] + 1 ) << 16 ) | + ( (FT_UInt32)*( d[0] + 2 ) << 8 ) | + (FT_UInt32)*( d[0] + 3 ) ) + 0x80U ) >> 8 ); +#endif } else @@ -882,8 +894,6 @@ FT_Error error; - error = FT_ERR( Stack_Underflow ); - if ( !priv || !priv->subfont ) { error = FT_THROW( Invalid_File_Format ); @@ -1113,6 +1123,8 @@ #define CFF_FIELD_DELTA( code, name, max, id ) i++; #undef CFF_FIELD_CALLBACK #define CFF_FIELD_CALLBACK( code, name, id ) i++; +#undef CFF_FIELD_BLEND +#define CFF_FIELD_BLEND( code, id ) i++; #include "cfftoken.h" @@ -1160,6 +1172,17 @@ clazz[i].count_offset = FT_FIELD_OFFSET( num_ ## name_ ); \ i++; +#undef CFF_FIELD_BLEND +#define CFF_FIELD_BLEND( code_, id_ ) \ + clazz[i].kind = cff_kind_blend; \ + clazz[i].code = code_ | CFFCODE; \ + clazz[i].offset = 0; \ + clazz[i].size = 0; \ + clazz[i].reader = cff_parse_blend; \ + clazz[i].array_max = 0; \ + clazz[i].count_offset = 0; \ + i++; + #include "cfftoken.h" clazz[i].kind = 0; @@ -1210,6 +1233,18 @@ clazz[i].id = id_; \ i++; +#undef CFF_FIELD_BLEND +#define CFF_FIELD_BLEND( code_, id_ ) \ + clazz[i].kind = cff_kind_blend; \ + clazz[i].code = code_ | CFFCODE; \ + clazz[i].offset = 0; \ + clazz[i].size = 0; \ + clazz[i].reader = cff_parse_blend; \ + clazz[i].array_max = 0; \ + clazz[i].count_offset = 0; \ + clazz[i].id = id_; \ + i++; + #include "cfftoken.h" clazz[i].kind = 0; Index: reactos/sdk/lib/3rdparty/freetype/src/cff/cffparse.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cff/cffparse.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cff/cffparse.h (working copy) @@ -4,7 +4,7 @@ /* */ /* CFF token stream parser (specification) */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -31,8 +31,16 @@ /* CFF uses constant parser stack size; */ /* CFF2 can increase from default 193 */ #define CFF_MAX_STACK_DEPTH 96 + + /* + * There are plans to remove the `maxstack' operator in a forthcoming + * revision of the CFF2 specification, increasing the (then static) stack + * size to 513. By making the default stack size equal to the maximum + * stack size, the operator is essentially disabled, which has the + * desired effect in FreeType. + */ #define CFF2_MAX_STACK 513 -#define CFF2_DEFAULT_STACK 193 +#define CFF2_DEFAULT_STACK 513 #define CFF_CODE_TOPDICT 0x1000 #define CFF_CODE_PRIVATE 0x2000 Index: reactos/sdk/lib/3rdparty/freetype/src/cff/cffpic.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cff/cffpic.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cff/cffpic.c (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for cff module. */ /* */ -/* Copyright 2009-2016 by */ +/* Copyright 2009-2017 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/cff/cffpic.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cff/cffpic.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cff/cffpic.h (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for cff module. */ /* */ -/* Copyright 2009-2016 by */ +/* Copyright 2009-2017 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -33,6 +33,7 @@ #define CFF_SERVICE_PROPERTIES_GET cff_service_properties #define CFF_SERVICES_GET cff_services #define CFF_SERVICE_MULTI_MASTERS_GET cff_service_multi_masters +#define CFF_SERVICE_METRICS_VAR_GET cff_service_metrics_variations #define CFF_CMAP_ENCODING_CLASS_REC_GET cff_cmap_encoding_class_rec #define CFF_CMAP_UNICODE_CLASS_REC_GET cff_cmap_unicode_class_rec #define CFF_FIELD_HANDLERS_GET cff_field_handlers @@ -46,6 +47,8 @@ #include FT_SERVICE_TT_CMAP_H #include FT_SERVICE_CID_H #include FT_SERVICE_PROPERTIES_H +#include FT_SERVICE_MULTIPLE_MASTERS_H +#include FT_SERVICE_METRICS_VARIATIONS_H FT_BEGIN_HEADER @@ -52,16 +55,18 @@ typedef struct CffModulePIC_ { - FT_ServiceDescRec* cff_services; - CFF_Field_Handler* cff_field_handlers; - FT_Service_PsInfoRec cff_service_ps_info; - FT_Service_GlyphDictRec cff_service_glyph_dict; - FT_Service_PsFontNameRec cff_service_ps_name; - FT_Service_TTCMapsRec cff_service_get_cmap_info; - FT_Service_CIDRec cff_service_cid_info; - FT_Service_PropertiesRec cff_service_properties; - FT_CMap_ClassRec cff_cmap_encoding_class_rec; - FT_CMap_ClassRec cff_cmap_unicode_class_rec; + FT_ServiceDescRec* cff_services; + CFF_Field_Handler* cff_field_handlers; + FT_Service_PsInfoRec cff_service_ps_info; + FT_Service_GlyphDictRec cff_service_glyph_dict; + FT_Service_PsFontNameRec cff_service_ps_name; + FT_Service_TTCMapsRec cff_service_get_cmap_info; + FT_Service_CIDRec cff_service_cid_info; + FT_Service_PropertiesRec cff_service_properties; + FT_Service_MultiMastersRec cff_service_multi_masters; + FT_Service_MetricsVariationsRec cff_service_metrics_variations; + FT_CMap_ClassRec cff_cmap_encoding_class_rec; + FT_CMap_ClassRec cff_cmap_unicode_class_rec; } CffModulePIC; @@ -83,6 +88,10 @@ ( GET_PIC( library )->cff_service_properties ) #define CFF_SERVICES_GET \ ( GET_PIC( library )->cff_services ) +#define CFF_SERVICE_MULTI_MASTERS_GET \ + ( GET_PIC( library )->cff_service_multi_masters ) +#define CFF_SERVICE_METRICS_VAR_GET \ + ( GET_PIC( library )->cff_service_metrics_variations ) #define CFF_CMAP_ENCODING_CLASS_REC_GET \ ( GET_PIC( library )->cff_cmap_encoding_class_rec ) #define CFF_CMAP_UNICODE_CLASS_REC_GET \ Index: reactos/sdk/lib/3rdparty/freetype/src/cff/cfftoken.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cff/cfftoken.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cff/cfftoken.h (working copy) @@ -4,7 +4,7 @@ /* */ /* CFF token definitions (specification only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/cff/cfftypes.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cff/cfftypes.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cff/cfftypes.h (working copy) @@ -5,7 +5,7 @@ /* Basic OpenType/CFF type definitions and interface (specification */ /* only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -112,8 +112,8 @@ FT_UInt shortDeltaCount; /* not used; always zero */ #endif - FT_UInt regionIdxCount; /* number of regions in this var data */ - FT_UInt* regionIndices; /* array of `regionCount' indices; */ + FT_UInt regionIdxCount; /* number of region indexes */ + FT_UInt* regionIndices; /* array of `regionIdxCount' indices; */ /* these index `varRegionList' */ } CFF_VarData; @@ -321,6 +321,8 @@ FT_Byte** local_subrs; /* array of pointers */ /* into Local Subrs INDEX data */ + FT_UInt32 random; + } CFF_SubFontRec; @@ -389,6 +391,7 @@ /* since version 2.4.12 */ FT_Generic cf2_instance; + /* since version 2.7.1 */ CFF_VStoreRec vstore; /* parsed vstore structure */ } CFF_FontRec; Index: reactos/sdk/lib/3rdparty/freetype/src/cid/ciderrs.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cid/ciderrs.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cid/ciderrs.h (working copy) @@ -4,7 +4,7 @@ /* */ /* CID error codes (specification only). */ /* */ -/* Copyright 2001-2016 by */ +/* Copyright 2001-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/cid/cidgload.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cid/cidgload.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cid/cidgload.c (working copy) @@ -4,7 +4,7 @@ /* */ /* CID-keyed Type1 Glyph Loader (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/cid/cidgload.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cid/cidgload.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cid/cidgload.h (working copy) @@ -4,7 +4,7 @@ /* */ /* OpenType Glyph Loader (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/cid/cidload.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cid/cidload.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cid/cidload.c (working copy) @@ -4,7 +4,7 @@ /* */ /* CID-keyed Type1 font loader (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -461,6 +461,9 @@ FT_Byte* p; + if ( !num_subrs ) + continue; + /* reallocate offsets array if needed */ if ( num_subrs + 1 > max_offsets ) { Index: reactos/sdk/lib/3rdparty/freetype/src/cid/cidload.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cid/cidload.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cid/cidload.h (working copy) @@ -4,7 +4,7 @@ /* */ /* CID-keyed Type1 font loader (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/cid/cidobjs.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cid/cidobjs.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cid/cidobjs.c (working copy) @@ -4,7 +4,7 @@ /* */ /* CID objects manager (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -113,7 +113,7 @@ CID_Size size = (CID_Size)cidsize; - if ( cidsize->internal ) + if ( cidsize->internal->module_data ) { PSH_Globals_Funcs funcs; @@ -120,9 +120,9 @@ funcs = cid_size_get_globals_funcs( size ); if ( funcs ) - funcs->destroy( (PSH_Globals)cidsize->internal ); + funcs->destroy( (PSH_Globals)cidsize->internal->module_data ); - cidsize->internal = NULL; + cidsize->internal->module_data = NULL; } } @@ -145,7 +145,7 @@ error = funcs->create( cidsize->face->memory, priv, &globals ); if ( !error ) - cidsize->internal = (FT_Size_Internal)(void*)globals; + cidsize->internal->module_data = globals; } return error; @@ -164,7 +164,7 @@ funcs = cid_size_get_globals_funcs( (CID_Size)size ); if ( funcs ) - funcs->set_scale( (PSH_Globals)size->internal, + funcs->set_scale( (PSH_Globals)size->internal->module_data, size->metrics.x_scale, size->metrics.y_scale, 0, 0 ); Index: reactos/sdk/lib/3rdparty/freetype/src/cid/cidobjs.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cid/cidobjs.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cid/cidobjs.h (working copy) @@ -4,7 +4,7 @@ /* */ /* CID objects manager (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/cid/cidparse.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cid/cidparse.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cid/cidparse.c (working copy) @@ -4,7 +4,7 @@ /* */ /* CID-keyed Type1 parser (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/cid/cidparse.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cid/cidparse.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cid/cidparse.h (working copy) @@ -4,7 +4,7 @@ /* */ /* CID-keyed Type1 parser (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/cid/cidriver.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cid/cidriver.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cid/cidriver.c (working copy) @@ -4,7 +4,7 @@ /* */ /* CID driver interface (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/cid/cidriver.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cid/cidriver.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cid/cidriver.h (working copy) @@ -4,7 +4,7 @@ /* */ /* High-level CID driver interface (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/cid/cidtoken.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cid/cidtoken.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cid/cidtoken.h (working copy) @@ -4,7 +4,7 @@ /* */ /* CID token definitions (specification only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/cid/type1cid.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/cid/type1cid.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/cid/type1cid.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType OpenType driver component (body only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -17,13 +17,13 @@ #define FT_MAKE_OPTION_SINGLE_OBJECT +#include <ft2build.h> -#include <ft2build.h> -#include "cidparse.c" +#include "cidgload.c" #include "cidload.c" #include "cidobjs.c" +#include "cidparse.c" #include "cidriver.c" -#include "cidgload.c" /* END */ Index: reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvalid.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvalid.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvalid.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType validator for TrueTypeGX/AAT tables (body only). */ /* */ -/* Copyright 2005-2016 by */ +/* Copyright 2005-2017 by */ /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ @@ -16,15 +16,17 @@ /* */ /***************************************************************************/ + #define FT_MAKE_OPTION_SINGLE_OBJECT - #include <ft2build.h> +#include "gxvbsln.c" +#include "gxvcommn.c" #include "gxvfeat.c" -#include "gxvcommn.c" -#include "gxvbsln.c" -#include "gxvtrak.c" #include "gxvjust.c" +#include "gxvkern.c" +#include "gxvlcar.c" +#include "gxvmod.c" #include "gxvmort.c" #include "gxvmort0.c" #include "gxvmort1.c" @@ -37,11 +39,9 @@ #include "gxvmorx2.c" #include "gxvmorx4.c" #include "gxvmorx5.c" -#include "gxvkern.c" #include "gxvopbd.c" #include "gxvprop.c" -#include "gxvlcar.c" -#include "gxvmod.c" +#include "gxvtrak.c" /* END */ Index: reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvalid.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvalid.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvalid.h (working copy) @@ -2,9 +2,9 @@ /* */ /* gxvalid.h */ /* */ -/* TrueTyeeGX/AAT table validation (specification only). */ +/* TrueTypeGX/AAT table validation (specification only). */ /* */ -/* Copyright 2005-2016 by */ +/* Copyright 2005-2017 by */ /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ Index: reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvbsln.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvbsln.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvbsln.c (working copy) @@ -4,7 +4,7 @@ /* */ /* TrueTypeGX/AAT bsln table validation (body). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ Index: reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvcommn.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvcommn.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvcommn.c (working copy) @@ -4,7 +4,7 @@ /* */ /* TrueTypeGX/AAT common tables validation (body). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ @@ -454,7 +454,7 @@ } - /* ================= Segment Single Format 2 Loolup Table ============== */ + /* ================= Segment Single Format 2 Lookup Table ============== */ /* * Apple spec says: * Index: reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvcommn.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvcommn.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvcommn.h (working copy) @@ -4,7 +4,7 @@ /* */ /* TrueTypeGX/AAT common tables validation (specification). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ Index: reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxverror.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxverror.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxverror.h (working copy) @@ -4,7 +4,7 @@ /* */ /* TrueTypeGX/AAT validation module error codes (specification only). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ Index: reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvfeat.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvfeat.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvfeat.c (working copy) @@ -4,7 +4,7 @@ /* */ /* TrueTypeGX/AAT feat table validation (body). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ Index: reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvfeat.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvfeat.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvfeat.h (working copy) @@ -4,7 +4,7 @@ /* */ /* TrueTypeGX/AAT feat table validation (specification). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ Index: reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvfgen.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvfgen.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvfgen.c (working copy) @@ -5,7 +5,7 @@ /* Generate feature registry data for gxv `feat' validator. */ /* This program is derived from gxfeatreg.c in gxlayout. */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* Masatake YAMATO and Redhat K.K. */ /* */ /* This file may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvjust.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvjust.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvjust.c (working copy) @@ -4,7 +4,7 @@ /* */ /* TrueTypeGX/AAT just table validation (body). */ /* */ -/* Copyright 2005-2016 by */ +/* Copyright 2005-2017 by */ /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ Index: reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvkern.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvkern.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvkern.c (working copy) @@ -4,7 +4,7 @@ /* */ /* TrueTypeGX/AAT kern table validation (body). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ Index: reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvlcar.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvlcar.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvlcar.c (working copy) @@ -4,7 +4,7 @@ /* */ /* TrueTypeGX/AAT lcar table validation (body). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ Index: reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmod.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmod.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmod.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType's TrueTypeGX/AAT validation module implementation (body). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ Index: reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmod.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmod.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmod.h (working copy) @@ -5,7 +5,7 @@ /* FreeType's TrueTypeGX/AAT validation module implementation */ /* (specification). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ Index: reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmort.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmort.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmort.c (working copy) @@ -4,7 +4,7 @@ /* */ /* TrueTypeGX/AAT mort table validation (body). */ /* */ -/* Copyright 2005-2016 by */ +/* Copyright 2005-2017 by */ /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ Index: reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmort.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmort.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmort.h (working copy) @@ -4,7 +4,7 @@ /* */ /* TrueTypeGX/AAT common definition for mort table (specification). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ Index: reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmort0.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmort0.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmort0.c (working copy) @@ -5,7 +5,7 @@ /* TrueTypeGX/AAT mort table validation */ /* body for type0 (Indic Script Rearrangement) subtable. */ /* */ -/* Copyright 2005-2016 by */ +/* Copyright 2005-2017 by */ /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ Index: reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmort1.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmort1.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmort1.c (working copy) @@ -5,7 +5,7 @@ /* TrueTypeGX/AAT mort table validation */ /* body for type1 (Contextual Substitution) subtable. */ /* */ -/* Copyright 2005-2016 by */ +/* Copyright 2005-2017 by */ /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ Index: reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmort2.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmort2.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmort2.c (working copy) @@ -5,7 +5,7 @@ /* TrueTypeGX/AAT mort table validation */ /* body for type2 (Ligature Substitution) subtable. */ /* */ -/* Copyright 2005-2016 by */ +/* Copyright 2005-2017 by */ /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ Index: reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmort4.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmort4.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmort4.c (working copy) @@ -5,7 +5,7 @@ /* TrueTypeGX/AAT mort table validation */ /* body for type4 (Non-Contextual Glyph Substitution) subtable. */ /* */ -/* Copyright 2005-2016 by */ +/* Copyright 2005-2017 by */ /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ Index: reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmort5.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmort5.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmort5.c (working copy) @@ -5,7 +5,7 @@ /* TrueTypeGX/AAT mort table validation */ /* body for type5 (Contextual Glyph Insertion) subtable. */ /* */ -/* Copyright 2005-2016 by */ +/* Copyright 2005-2017 by */ /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ Index: reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmorx.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmorx.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmorx.c (working copy) @@ -4,7 +4,7 @@ /* */ /* TrueTypeGX/AAT morx table validation (body). */ /* */ -/* Copyright 2005-2016 by */ +/* Copyright 2005-2017 by */ /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ Index: reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmorx.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmorx.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmorx.h (working copy) @@ -4,7 +4,7 @@ /* */ /* TrueTypeGX/AAT common definition for morx table (specification). */ /* */ -/* Copyright 2005-2016 by */ +/* Copyright 2005-2017 by */ /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ Index: reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmorx0.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmorx0.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmorx0.c (working copy) @@ -5,7 +5,7 @@ /* TrueTypeGX/AAT morx table validation */ /* body for type0 (Indic Script Rearrangement) subtable. */ /* */ -/* Copyright 2005-2016 by */ +/* Copyright 2005-2017 by */ /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ Index: reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmorx1.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmorx1.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmorx1.c (working copy) @@ -5,7 +5,7 @@ /* TrueTypeGX/AAT morx table validation */ /* body for type1 (Contextual Substitution) subtable. */ /* */ -/* Copyright 2005-2016 by */ +/* Copyright 2005-2017 by */ /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ Index: reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmorx2.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmorx2.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmorx2.c (working copy) @@ -5,7 +5,7 @@ /* TrueTypeGX/AAT morx table validation */ /* body for type2 (Ligature Substitution) subtable. */ /* */ -/* Copyright 2005-2016 by */ +/* Copyright 2005-2017 by */ /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ Index: reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmorx4.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmorx4.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmorx4.c (working copy) @@ -5,7 +5,7 @@ /* TrueTypeGX/AAT morx table validation */ /* body for "morx" type4 (Non-Contextual Glyph Substitution) subtable. */ /* */ -/* Copyright 2005-2016 by */ +/* Copyright 2005-2017 by */ /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ Index: reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmorx5.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmorx5.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvmorx5.c (working copy) @@ -5,7 +5,7 @@ /* TrueTypeGX/AAT morx table validation */ /* body for type5 (Contextual Glyph Insertion) subtable. */ /* */ -/* Copyright 2005-2016 by */ +/* Copyright 2005-2017 by */ /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ Index: reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvopbd.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvopbd.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvopbd.c (working copy) @@ -4,7 +4,7 @@ /* */ /* TrueTypeGX/AAT opbd table validation (body). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ Index: reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvprop.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvprop.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvprop.c (working copy) @@ -4,7 +4,7 @@ /* */ /* TrueTypeGX/AAT prop table validation (body). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ Index: reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvtrak.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvtrak.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/gxvalid/gxvtrak.c (working copy) @@ -4,7 +4,7 @@ /* */ /* TrueTypeGX/AAT trak table validation (body). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ Index: reactos/sdk/lib/3rdparty/freetype/src/gxvalid/README =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/gxvalid/README (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/gxvalid/README (working copy) @@ -413,7 +413,7 @@ format assured for Windows and OS/2 support is only subtable format 0. The Microsoft TrueType specification also describes subtable format 2, but does not mention which platforms support - it. Aubtable formats 1, 3, and higher are documented as reserved + it. Subtable formats 1, 3, and higher are documented as reserved for future use. Therefore, the classic version can store subtable formats 0 and 2, at least. `ttfdump.exe', a font tool provided by Microsoft, ignores the subtable format written in the subtable @@ -518,7 +518,7 @@ ------------------------------------------------------------------------ -Copyright 2004-2016 by +Copyright 2004-2017 by suzuki toshiya, Masatake YAMATO, Red hat K.K., David Turner, Robert Wilhelm, and Werner Lemberg. Index: reactos/sdk/lib/3rdparty/freetype/src/gzip/ftgzip.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/gzip/ftgzip.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/gzip/ftgzip.c (working copy) @@ -8,7 +8,7 @@ /* parse compressed PCF fonts, as found with many X11 server */ /* distributions. */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/lzw/ftlzw.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/lzw/ftlzw.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/lzw/ftlzw.c (working copy) @@ -8,7 +8,7 @@ /* be used to parse compressed PCF fonts, as found with many X11 server */ /* distributions. */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* Albert Chin-A-Young. */ /* */ /* based on code in `src/gzip/ftgzip.c' */ Index: reactos/sdk/lib/3rdparty/freetype/src/lzw/ftzopen.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/lzw/ftzopen.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/lzw/ftzopen.c (working copy) @@ -8,7 +8,7 @@ /* be used to parse compressed PCF fonts, as found with many X11 server */ /* distributions. */ /* */ -/* Copyright 2005-2016 by */ +/* Copyright 2005-2017 by */ /* David Turner. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/lzw/ftzopen.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/lzw/ftzopen.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/lzw/ftzopen.h (working copy) @@ -8,7 +8,7 @@ /* be used to parse compressed PCF fonts, as found with many X11 server */ /* distributions. */ /* */ -/* Copyright 2005-2016 by */ +/* Copyright 2005-2017 by */ /* David Turner. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvalid.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvalid.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvalid.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType validator for OpenType tables (body only). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -15,8 +15,8 @@ /* */ /***************************************************************************/ + #define FT_MAKE_OPTION_SINGLE_OBJECT - #include <ft2build.h> #include "otvbase.c" @@ -28,4 +28,5 @@ #include "otvmath.c" #include "otvmod.c" + /* END */ Index: reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvalid.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvalid.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvalid.h (working copy) @@ -4,7 +4,7 @@ /* */ /* OpenType table validation (specification only). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvbase.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvbase.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvbase.c (working copy) @@ -4,7 +4,7 @@ /* */ /* OpenType BASE table validation (body). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvcommn.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvcommn.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvcommn.c (working copy) @@ -4,7 +4,7 @@ /* */ /* OpenType common tables validation (body). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvcommn.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvcommn.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvcommn.h (working copy) @@ -4,7 +4,7 @@ /* */ /* OpenType common tables validation (specification). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/otvalid/otverror.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/otvalid/otverror.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/otvalid/otverror.h (working copy) @@ -4,7 +4,7 @@ /* */ /* OpenType validation module error codes (specification only). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvgdef.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvgdef.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvgdef.c (working copy) @@ -4,7 +4,7 @@ /* */ /* OpenType GDEF table validation (body). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvgpos.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvgpos.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvgpos.c (working copy) @@ -4,7 +4,7 @@ /* */ /* OpenType GPOS table validation (body). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvgpos.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvgpos.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvgpos.h (working copy) @@ -4,7 +4,7 @@ /* */ /* OpenType GPOS table validator (specification). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvgsub.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvgsub.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvgsub.c (working copy) @@ -4,7 +4,7 @@ /* */ /* OpenType GSUB table validation (body). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvjstf.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvjstf.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvjstf.c (working copy) @@ -4,7 +4,7 @@ /* */ /* OpenType JSTF table validation (body). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvmath.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvmath.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvmath.c (working copy) @@ -4,7 +4,7 @@ /* */ /* OpenType MATH table validation (body). */ /* */ -/* Copyright 2007-2016 by */ +/* Copyright 2007-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* Written by George Williams. */ Index: reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvmod.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvmod.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvmod.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType's OpenType validation module implementation (body). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvmod.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvmod.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/otvalid/otvmod.h (working copy) @@ -5,7 +5,7 @@ /* FreeType's OpenType validation module implementation */ /* (specification). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/pcf/pcf.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/pcf/pcf.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/pcf/pcf.c (working copy) @@ -26,11 +26,11 @@ #define FT_MAKE_OPTION_SINGLE_OBJECT +#include <ft2build.h> - -#include <ft2build.h> +#include "pcfdrivr.c" +#include "pcfread.c" #include "pcfutil.c" -#include "pcfread.c" -#include "pcfdrivr.c" + /* END */ Index: reactos/sdk/lib/3rdparty/freetype/src/pcf/pcf.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/pcf/pcf.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/pcf/pcf.h (working copy) @@ -163,6 +163,15 @@ } PCF_FaceRec, *PCF_Face; + typedef struct PCF_DriverRec_ + { + FT_DriverRec root; + + FT_Bool no_long_family_names; + + } PCF_DriverRec, *PCF_Driver; + + /* macros for pcf font format */ #define LSBFirst 0 Index: reactos/sdk/lib/3rdparty/freetype/src/pcf/pcfdrivr.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/pcf/pcfdrivr.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/pcf/pcfdrivr.c (working copy) @@ -49,6 +49,8 @@ #include FT_SERVICE_BDF_H #include FT_SERVICE_FONT_FORMAT_H +#include FT_SERVICE_PROPERTIES_H +#include FT_PCF_DRIVER_H /*************************************************************************/ @@ -286,6 +288,7 @@ /* this didn't work, try gzip support! */ + FT_TRACE2(( " ... try gzip stream\n" )); error2 = FT_Stream_OpenGzip( &face->comp_stream, stream ); if ( FT_ERR_EQ( error2, Unimplemented_Feature ) ) goto Fail; @@ -301,6 +304,7 @@ /* this didn't work, try LZW support! */ + FT_TRACE2(( " ... try LZW stream\n" )); error3 = FT_Stream_OpenLZW( &face->comp_stream, stream ); if ( FT_ERR_EQ( error3, Unimplemented_Feature ) ) goto Fail; @@ -316,6 +320,7 @@ /* this didn't work, try Bzip2 support! */ + FT_TRACE2(( " ... try Bzip2 stream\n" )); error4 = FT_Stream_OpenBzip2( &face->comp_stream, stream ); if ( FT_ERR_EQ( error4, Unimplemented_Feature ) ) goto Fail; @@ -521,11 +526,6 @@ bitmap->num_grays = 1; bitmap->pixel_mode = FT_PIXEL_MODE_MONO; - FT_TRACE6(( "BIT_ORDER %d ; BYTE_ORDER %d ; GLYPH_PAD %d\n", - PCF_BIT_ORDER( face->bitmapsFormat ), - PCF_BYTE_ORDER( face->bitmapsFormat ), - PCF_GLYPH_PAD( face->bitmapsFormat ) )); - switch ( PCF_GLYPH_PAD( face->bitmapsFormat ) ) { case 1: @@ -627,19 +627,23 @@ } else { - if ( prop->value.l > 0x7FFFFFFFL || prop->value.l < ( -1 - 0x7FFFFFFFL ) ) + if ( prop->value.l > 0x7FFFFFFFL || + prop->value.l < ( -1 - 0x7FFFFFFFL ) ) { - FT_TRACE1(( "pcf_get_bdf_property: " )); - FT_TRACE1(( "too large integer 0x%x is truncated\n" )); + FT_TRACE1(( "pcf_get_bdf_property:" )); + FT_TRACE1(( " too large integer 0x%x is truncated\n" )); } - /* Apparently, the PCF driver loads all properties as signed integers! - * This really doesn't seem to be a problem, because this is - * sufficient for any meaningful values. + + /* + * The PCF driver loads all properties as signed integers. + * This really doesn't seem to be a problem, because this is + * sufficient for any meaningful values. */ aproperty->type = BDF_PROPERTY_TYPE_INTEGER; aproperty->u.integer = (FT_Int32)prop->value.l; } - return 0; + + return FT_Err_Ok; } return FT_THROW( Invalid_Argument ); @@ -654,7 +658,7 @@ *acharset_encoding = face->charset_encoding; *acharset_registry = face->charset_registry; - return 0; + return FT_Err_Ok; } @@ -665,6 +669,116 @@ }; + /* + * PROPERTY SERVICE + * + */ + static FT_Error + pcf_property_set( FT_Module module, /* PCF_Driver */ + const char* property_name, + const void* value, + FT_Bool value_is_string ) + { +#ifdef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES + + FT_Error error = FT_Err_Ok; + PCF_Driver driver = (PCF_Driver)module; + +#ifndef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES + FT_UNUSED( value_is_string ); +#endif + + + if ( !ft_strcmp( property_name, "no-long-family-names" ) ) + { +#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES + if ( value_is_string ) + { + const char* s = (const char*)value; + long lfn = ft_strtol( s, NULL, 10 ); + + + if ( lfn == 0 ) + driver->no_long_family_names = 0; + else if ( lfn == 1 ) + driver->no_long_family_names = 1; + else + return FT_THROW( Invalid_Argument ); + } + else +#endif + { + FT_Bool* no_long_family_names = (FT_Bool*)value; + + + driver->no_long_family_names = *no_long_family_names; + } + + return error; + } + +#else /* !PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */ + + FT_UNUSED( module ); + FT_UNUSED( value ); + FT_UNUSED( value_is_string ); +#ifndef FT_DEBUG_LEVEL_TRACE + FT_UNUSED( property_name ); +#endif + +#endif /* !PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */ + + FT_TRACE0(( "pcf_property_set: missing property `%s'\n", + property_name )); + return FT_THROW( Missing_Property ); + } + + + static FT_Error + pcf_property_get( FT_Module module, /* PCF_Driver */ + const char* property_name, + const void* value ) + { +#ifdef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES + + FT_Error error = FT_Err_Ok; + PCF_Driver driver = (PCF_Driver)module; + + + if ( !ft_strcmp( property_name, "no-long-family-names" ) ) + { + FT_Bool no_long_family_names = driver->no_long_family_names; + FT_Bool* val = (FT_Bool*)value; + + + *val = no_long_family_names; + + return error; + } + +#else /* !PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */ + + FT_UNUSED( module ); + FT_UNUSED( value ); +#ifndef FT_DEBUG_LEVEL_TRACE + FT_UNUSED( property_name ); +#endif + +#endif /* !PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */ + + FT_TRACE0(( "pcf_property_get: missing property `%s'\n", + property_name )); + return FT_THROW( Missing_Property ); + } + + + FT_DEFINE_SERVICE_PROPERTIESREC( + pcf_service_properties, + + (FT_Properties_SetFunc)pcf_property_set, /* set_property */ + (FT_Properties_GetFunc)pcf_property_get ) /* get_property */ + + /* * * SERVICE LIST @@ -675,6 +789,7 @@ { { FT_SERVICE_ID_BDF, &pcf_service_bdf }, { FT_SERVICE_ID_FONT_FORMAT, FT_FONT_FORMAT_PCF }, + { FT_SERVICE_ID_PROPERTIES, &pcf_service_properties }, { NULL, NULL } }; @@ -689,6 +804,29 @@ } + FT_CALLBACK_DEF( FT_Error ) + pcf_driver_init( FT_Module module ) /* PCF_Driver */ + { +#ifdef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES + PCF_Driver driver = (PCF_Driver)module; + + + driver->no_long_family_names = 0; +#else + FT_UNUSED( module ); +#endif + + return FT_Err_Ok; + } + + + FT_CALLBACK_DEF( void ) + pcf_driver_done( FT_Module module ) /* PCF_Driver */ + { + FT_UNUSED( module ); + } + + FT_CALLBACK_TABLE_DEF const FT_Driver_ClassRec pcf_driver_class = { @@ -695,16 +833,16 @@ { FT_MODULE_FONT_DRIVER | FT_MODULE_DRIVER_NO_OUTLINES, - sizeof ( FT_DriverRec ), + sizeof ( PCF_DriverRec ), "pcf", 0x10000L, 0x20000L, - NULL, /* module-specific interface */ + NULL, /* module-specific interface */ - NULL, /* FT_Module_Constructor module_init */ - NULL, /* FT_Module_Destructor module_done */ + pcf_driver_init, /* FT_Module_Constructor module_init */ + pcf_driver_done, /* FT_Module_Destructor module_done */ pcf_driver_requester /* FT_Module_Requester get_interface */ }, Index: reactos/sdk/lib/3rdparty/freetype/src/pcf/pcfread.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/pcf/pcfread.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/pcf/pcfread.c (working copy) @@ -50,8 +50,15 @@ #ifdef FT_DEBUG_LEVEL_TRACE static const char* const tableNames[] = { - "prop", "accl", "mtrcs", "bmps", "imtrcs", - "enc", "swidth", "names", "accel" + "properties", + "accelerators", + "metrics", + "bitmaps", + "ink metrics", + "encodings", + "swidths", + "glyph names", + "BDF accelerators" }; #endif @@ -109,22 +116,20 @@ if ( stream->size < 16 ) return FT_THROW( Invalid_File_Format ); - /* We need 16 bytes per TOC entry. Additionally, as a */ - /* heuristic protection against gzip bombs (i.e., very */ - /* small input files that expand to insanely large */ - /* files), we limit the number of TOC entries to 1024. */ - if ( toc->count > stream->size >> 4 || - toc->count > 1024 ) + /* we need 16 bytes per TOC entry, */ + /* and there can be most 9 tables */ + if ( toc->count > ( stream->size >> 4 ) || + toc->count > 9 ) { FT_TRACE0(( "pcf_read_TOC: adjusting number of tables" " (from %d to %d)\n", toc->count, - FT_MIN( stream->size >> 4, 1024 ) )); - toc->count = FT_MIN( stream->size >> 4, 1024 ); + FT_MIN( stream->size >> 4, 9 ) )); + toc->count = FT_MIN( stream->size >> 4, 9 ); } if ( FT_NEW_ARRAY( face->toc.tables, toc->count ) ) - return FT_THROW( Out_Of_Memory ); + return error; tables = face->toc.tables; for ( n = 0; n < toc->count; n++ ) @@ -237,8 +242,8 @@ if ( tables[i].type == (FT_UInt)( 1 << j ) ) name = tableNames[j]; - FT_TRACE4(( " %d: type=%s, format=0x%X, " - "size=%ld (0x%lX), offset=%ld (0x%lX)\n", + FT_TRACE4(( " %d: type=%s, format=0x%X," + " size=%ld (0x%lX), offset=%ld (0x%lX)\n", i, name, tables[i].format, tables[i].size, tables[i].size, @@ -348,6 +353,17 @@ metric->attributes = 0; } + FT_TRACE5(( " width=%d," + " lsb=%d, rsb=%d," + " ascent=%d, descent=%d," + " attributes=%d\n", + metric->characterWidth, + metric->leftSideBearing, + metric->rightSideBearing, + metric->ascent, + metric->descent, + metric->attributes )); + Exit: return error; } @@ -466,7 +482,7 @@ { PCF_ParseProperty props = NULL; PCF_Property properties = NULL; - FT_ULong nprops, i; + FT_ULong nprops, orig_nprops, i; FT_ULong format, size; FT_Error error; FT_Memory memory = FT_FACE( face )->memory; @@ -486,32 +502,43 @@ if ( FT_READ_ULONG_LE( format ) ) goto Bail; - FT_TRACE4(( "pcf_get_properties:\n" )); + FT_TRACE4(( "pcf_get_properties:\n" + " format: 0x%lX (%s)\n", + format, + PCF_BYTE_ORDER( format ) == MSBFirst ? "MSB" : "LSB" )); - FT_TRACE4(( " format = %ld\n", format )); - if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) ) goto Bail; if ( PCF_BYTE_ORDER( format ) == MSBFirst ) - (void)FT_READ_ULONG( nprops ); + (void)FT_READ_ULONG( orig_nprops ); else - (void)FT_READ_ULONG_LE( nprops ); + (void)FT_READ_ULONG_LE( orig_nprops ); if ( error ) goto Bail; - FT_TRACE4(( " nprop = %d (truncate %d props)\n", - (int)nprops, nprops - (FT_ULong)(int)nprops )); + FT_TRACE4(( " number of properties: %ld\n", orig_nprops )); - nprops = (FT_ULong)(int)nprops; - /* rough estimate */ - if ( nprops > size / PCF_PROPERTY_SIZE ) + if ( orig_nprops > size / PCF_PROPERTY_SIZE ) { error = FT_THROW( Invalid_Table ); goto Bail; } + /* as a heuristic limit to avoid excessive allocation in */ + /* gzip bombs (i.e., very small, invalid input data that */ + /* pretends to expand to an insanely large file) we only */ + /* load the first 256 properties */ + if ( orig_nprops > 256 ) + { + FT_TRACE0(( "pcf_get_properties:" + " only loading first 256 properties\n" )); + nprops = 256; + } + else + nprops = orig_nprops; + face->nprops = (int)nprops; if ( FT_NEW_ARRAY( props, nprops ) ) @@ -531,14 +558,23 @@ } } + /* this skip will only work if we really have an extremely large */ + /* number of properties; it will fail for fake data, avoiding an */ + /* unnecessarily large allocation later on */ + if ( FT_STREAM_SKIP( ( orig_nprops - nprops ) * PCF_PROPERTY_SIZE ) ) + { + error = FT_THROW( Invalid_Stream_Skip ); + goto Bail; + } + /* pad the property array */ /* */ /* clever here - nprops is the same as the number of odd-units read, */ /* as only isStringProp are odd length (Keith Packard) */ /* */ - if ( nprops & 3 ) + if ( orig_nprops & 3 ) { - i = 4 - ( nprops & 3 ); + i = 4 - ( orig_nprops & 3 ); if ( FT_STREAM_SKIP( i ) ) { error = FT_THROW( Invalid_Stream_Skip ); @@ -553,15 +589,24 @@ if ( error ) goto Bail; - FT_TRACE4(( " string_size = %ld\n", string_size )); + FT_TRACE4(( " string size: %ld\n", string_size )); /* rough estimate */ - if ( string_size > size - nprops * PCF_PROPERTY_SIZE ) + if ( string_size > size - orig_nprops * PCF_PROPERTY_SIZE ) { error = FT_THROW( Invalid_Table ); goto Bail; } + /* the strings in the `strings' array are PostScript strings, */ + /* which can have a maximum length of 65536 characters each */ + if ( string_size > 16777472 ) /* 256 * (65536 + 1) */ + { + FT_TRACE0(( "pcf_get_properties:" + " loading only 16777472 bytes of strings array\n" )); + string_size = 16777472; + } + /* allocate one more byte so that we have a final null byte */ if ( FT_NEW_ARRAY( strings, string_size + 1 ) ) goto Bail; @@ -575,6 +620,7 @@ face->properties = properties; + FT_TRACE4(( "\n" )); for ( i = 0; i < nprops; i++ ) { FT_Long name_offset = props[i].name; @@ -637,7 +683,7 @@ FT_Memory memory = FT_FACE( face )->memory; FT_ULong format, size; PCF_Metric metrics = NULL; - FT_ULong nmetrics, i; + FT_ULong nmetrics, orig_nmetrics, i; error = pcf_seek_to_table_type( stream, @@ -652,6 +698,13 @@ if ( FT_READ_ULONG_LE( format ) ) goto Bail; + FT_TRACE4(( "pcf_get_metrics:\n" + " format: 0x%lX (%s, %s)\n", + format, + PCF_BYTE_ORDER( format ) == MSBFirst ? "MSB" : "LSB", + PCF_FORMAT_MATCH( format, PCF_COMPRESSED_METRICS ) ? + "compressed" : "uncompressed" )); + if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) && !PCF_FORMAT_MATCH( format, PCF_COMPRESSED_METRICS ) ) return FT_THROW( Invalid_File_Format ); @@ -659,61 +712,70 @@ if ( PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) ) { if ( PCF_BYTE_ORDER( format ) == MSBFirst ) - (void)FT_READ_ULONG( nmetrics ); + (void)FT_READ_ULONG( orig_nmetrics ); else - (void)FT_READ_ULONG_LE( nmetrics ); + (void)FT_READ_ULONG_LE( orig_nmetrics ); } else { if ( PCF_BYTE_ORDER( format ) == MSBFirst ) - (void)FT_READ_USHORT( nmetrics ); + (void)FT_READ_USHORT( orig_nmetrics ); else - (void)FT_READ_USHORT_LE( nmetrics ); + (void)FT_READ_USHORT_LE( orig_nmetrics ); } if ( error ) return FT_THROW( Invalid_File_Format ); - face->nmetrics = nmetrics; + FT_TRACE4(( " number of metrics: %ld\n", orig_nmetrics )); - if ( !nmetrics ) - return FT_THROW( Invalid_Table ); - - FT_TRACE4(( "pcf_get_metrics:\n" )); - - FT_TRACE4(( " number of metrics: %d\n", nmetrics )); - /* rough estimate */ if ( PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) ) { - if ( nmetrics > size / PCF_METRIC_SIZE ) + if ( orig_nmetrics > size / PCF_METRIC_SIZE ) return FT_THROW( Invalid_Table ); } else { - if ( nmetrics > size / PCF_COMPRESSED_METRIC_SIZE ) + if ( orig_nmetrics > size / PCF_COMPRESSED_METRIC_SIZE ) return FT_THROW( Invalid_Table ); } + if ( !orig_nmetrics ) + return FT_THROW( Invalid_Table ); + + /* PCF is a format from ancient times; Unicode was in its */ + /* infancy, and widely used two-byte character sets for CJK */ + /* scripts (Big 5, GB 2312, JIS X 0208, etc.) did have at most */ + /* 15000 characters. Even the more exotic CNS 11643 and CCCII */ + /* standards, which were essentially three-byte character sets, */ + /* provided less then 65536 assigned characters. */ + /* */ + /* While technically possible to have a larger number of glyphs */ + /* in PCF files, we thus limit the number to 65536. */ + if ( orig_nmetrics > 65536 ) + { + FT_TRACE0(( "pcf_get_metrics:" + " only loading first 65536 metrics\n" )); + nmetrics = 65536; + } + else + nmetrics = orig_nmetrics; + + face->nmetrics = nmetrics; + if ( FT_NEW_ARRAY( face->metrics, nmetrics ) ) - return FT_THROW( Out_Of_Memory ); + return error; metrics = face->metrics; + + FT_TRACE4(( "\n" )); for ( i = 0; i < nmetrics; i++, metrics++ ) { + FT_TRACE5(( " idx %ld:", i )); error = pcf_get_metric( stream, format, metrics ); metrics->bits = 0; - FT_TRACE5(( " idx %d: width=%d, " - "lsb=%d, rsb=%d, ascent=%d, descent=%d, swidth=%d\n", - i, - metrics->characterWidth, - metrics->leftSideBearing, - metrics->rightSideBearing, - metrics->ascent, - metrics->descent, - metrics->attributes )); - if ( error ) break; @@ -721,7 +783,7 @@ /* compute a glyph's bitmap dimensions, thus setting them to zero in */ /* case of an error disables this particular glyph only */ if ( metrics->rightSideBearing < metrics->leftSideBearing || - metrics->ascent + metrics->descent < 0 ) + metrics->ascent < -metrics->descent ) { metrics->characterWidth = 0; metrics->leftSideBearing = 0; @@ -751,7 +813,7 @@ FT_Long* offsets = NULL; FT_Long bitmapSizes[GLYPHPADOPTIONS]; FT_ULong format, size; - FT_ULong nbitmaps, i, sizebitmaps = 0; + FT_ULong nbitmaps, orig_nbitmaps, i, sizebitmaps = 0; error = pcf_seek_to_table_type( stream, @@ -769,18 +831,40 @@ format = FT_GET_ULONG_LE(); if ( PCF_BYTE_ORDER( format ) == MSBFirst ) - nbitmaps = FT_GET_ULONG(); + orig_nbitmaps = FT_GET_ULONG(); else - nbitmaps = FT_GET_ULONG_LE(); + orig_nbitmaps = FT_GET_ULONG_LE(); FT_Stream_ExitFrame( stream ); + FT_TRACE4(( "pcf_get_bitmaps:\n" + " format: 0x%lX\n" + " (%s, %s,\n" + " padding=%d bits, scanning=%d bits)\n", + format, + PCF_BYTE_ORDER( format ) == MSBFirst + ? "most significant byte first" + : "least significant byte first", + PCF_BIT_ORDER( format ) == MSBFirst + ? "most significant bit first" + : "least significant bit first", + 8 << PCF_GLYPH_PAD_INDEX( format ), + 8 << PCF_SCAN_UNIT_INDEX( format ) )); + if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) ) return FT_THROW( Invalid_File_Format ); - FT_TRACE4(( "pcf_get_bitmaps:\n" )); + FT_TRACE4(( " number of bitmaps: %ld\n", orig_nbitmaps )); - FT_TRACE4(( " number of bitmaps: %d\n", nbitmaps )); + /* see comment in `pcf_get_metrics' */ + if ( orig_nbitmaps > 65536 ) + { + FT_TRACE0(( "pcf_get_bitmaps:" + " only loading first 65536 bitmaps\n" )); + nbitmaps = 65536; + } + else + nbitmaps = orig_nbitmaps; if ( nbitmaps != face->nmetrics ) return FT_THROW( Invalid_File_Format ); @@ -788,6 +872,7 @@ if ( FT_NEW_ARRAY( offsets, nbitmaps ) ) return error; + FT_TRACE5(( "\n" )); for ( i = 0; i < nbitmaps; i++ ) { if ( PCF_BYTE_ORDER( format ) == MSBFirst ) @@ -795,7 +880,7 @@ else (void)FT_READ_LONG_LE( offsets[i] ); - FT_TRACE5(( " bitmap %d: offset %ld (0x%lX)\n", + FT_TRACE5(( " bitmap %ld: offset %ld (0x%lX)\n", i, offsets[i], offsets[i] )); } if ( error ) @@ -812,17 +897,19 @@ sizebitmaps = (FT_ULong)bitmapSizes[PCF_GLYPH_PAD_INDEX( format )]; - FT_TRACE4(( " padding %d implies a size of %ld\n", - i, bitmapSizes[i] )); + FT_TRACE4(( " %ld-bit padding implies a size of %ld\n", + 8 << i, bitmapSizes[i] )); } - FT_TRACE4(( " %d bitmaps, padding index %ld\n", + FT_TRACE4(( " %ld bitmaps, using %ld-bit padding\n", nbitmaps, - PCF_GLYPH_PAD_INDEX( format ) )); - FT_TRACE4(( " bitmap size = %d\n", sizebitmaps )); + 8 << PCF_GLYPH_PAD_INDEX( format ) )); + FT_TRACE4(( " bitmap size: %ld\n", sizebitmaps )); FT_UNUSED( sizebitmaps ); /* only used for debugging */ + /* right now, we only check the bitmap offsets; */ + /* actual bitmaps are only loaded on demand */ for ( i = 0; i < nbitmaps; i++ ) { /* rough estimate */ @@ -830,7 +917,7 @@ ( (FT_ULong)offsets[i] > size ) ) { FT_TRACE0(( "pcf_get_bitmaps:" - " invalid offset to bitmap data of glyph %d\n", i )); + " invalid offset to bitmap data of glyph %ld\n", i )); } else face->metrics[i].bits = stream->pos + (FT_ULong)offsets[i]; @@ -894,10 +981,20 @@ FT_Stream_ExitFrame( stream ); + FT_TRACE4(( "pcf_get_encodings:\n" + " format: 0x%lX (%s)\n", + format, + PCF_BYTE_ORDER( format ) == MSBFirst ? "MSB" : "LSB" )); + if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) ) return FT_THROW( Invalid_File_Format ); - /* sanity checks */ + FT_TRACE4(( " firstCol 0x%X, lastCol 0x%X\n" + " firstRow 0x%X, lastRow 0x%X\n", + firstCol, lastCol, + firstRow, lastRow )); + + /* sanity checks; we limit numbers of rows and columns to 256 */ if ( firstCol < 0 || firstCol > lastCol || lastCol > 0xFF || @@ -906,21 +1003,18 @@ lastRow > 0xFF ) return FT_THROW( Invalid_Table ); - FT_TRACE4(( "pdf_get_encodings:\n" )); - - FT_TRACE4(( " firstCol %d, lastCol %d, firstRow %d, lastRow %d\n", - firstCol, lastCol, firstRow, lastRow )); - nencoding = (FT_ULong)( lastCol - firstCol + 1 ) * (FT_ULong)( lastRow - firstRow + 1 ); if ( FT_NEW_ARRAY( encoding, nencoding ) ) - return FT_THROW( Out_Of_Memory ); + return error; error = FT_Stream_EnterFrame( stream, 2 * nencoding ); if ( error ) goto Bail; + FT_TRACE5(( "\n" )); + k = 0; for ( i = firstRow; i <= lastRow; i++ ) { @@ -1029,6 +1123,15 @@ if ( FT_READ_ULONG_LE( format ) ) goto Bail; + FT_TRACE4(( "pcf_get_accel%s:\n" + " format: 0x%lX (%s, %s)\n", + type == PCF_BDF_ACCELERATORS ? " (getting BDF accelerators)" + : "", + format, + PCF_BYTE_ORDER( format ) == MSBFirst ? "MSB" : "LSB", + PCF_FORMAT_MATCH( format, PCF_ACCEL_W_INKBOUNDS ) ? + "accelerated" : "not accelerated" )); + if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) && !PCF_FORMAT_MATCH( format, PCF_ACCEL_W_INKBOUNDS ) ) goto Bail; @@ -1044,6 +1147,22 @@ goto Bail; } + FT_TRACE5(( " noOverlap=%s, constantMetrics=%s," + " terminalFont=%s, constantWidth=%s\n" + " inkInside=%s, inkMetrics=%s, drawDirection=%s\n" + " fontAscent=%ld, fontDescent=%ld, maxOverlap=%ld\n", + accel->noOverlap ? "yes" : "no", + accel->constantMetrics ? "yes" : "no", + accel->terminalFont ? "yes" : "no", + accel->constantWidth ? "yes" : "no", + accel->inkInside ? "yes" : "no", + accel->inkMetrics ? "yes" : "no", + accel->drawDirection ? "RTL" : "LTR", + accel->fontAscent, + accel->fontDescent, + accel->maxOverlap )); + + FT_TRACE5(( " minbounds:" )); error = pcf_get_metric( stream, format & ( ~PCF_FORMAT_MASK ), &(accel->minbounds) ); @@ -1050,6 +1169,7 @@ if ( error ) goto Bail; + FT_TRACE5(( " maxbounds:" )); error = pcf_get_metric( stream, format & ( ~PCF_FORMAT_MASK ), &(accel->maxbounds) ); @@ -1058,6 +1178,7 @@ if ( PCF_FORMAT_MATCH( format, PCF_ACCEL_W_INKBOUNDS ) ) { + FT_TRACE5(( " ink minbounds:" )); error = pcf_get_metric( stream, format & ( ~PCF_FORMAT_MASK ), &(accel->ink_minbounds) ); @@ -1064,6 +1185,7 @@ if ( error ) goto Bail; + FT_TRACE5(( " ink maxbounds:" )); error = pcf_get_metric( stream, format & ( ~PCF_FORMAT_MASK ), &(accel->ink_maxbounds) ); @@ -1072,7 +1194,7 @@ } else { - accel->ink_minbounds = accel->minbounds; /* I'm not sure about this */ + accel->ink_minbounds = accel->minbounds; accel->ink_maxbounds = accel->maxbounds; } @@ -1271,57 +1393,75 @@ prop = pcf_find_property( face, "FAMILY_NAME" ); if ( prop && prop->isString ) { - /* Prepend the foundry name plus a space to the family name. */ - /* There are many fonts just called `Fixed' which look completely */ - /* different, and which have nothing to do with each other. When */ - /* selecting `Fixed' in KDE or Gnome one gets results that appear */ - /* rather random, the style changes often if one changes the size */ - /* and one cannot select some fonts at all. */ - /* */ - /* We also check whether we have `wide' characters; all put */ - /* together, we get family names like `Sony Fixed' or `Misc Fixed */ - /* Wide'. */ - PCF_Property foundry_prop, point_size_prop, average_width_prop; - int l = ft_strlen( prop->value.atom ) + 1; - int wide = 0; +#ifdef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES + PCF_Driver driver = (PCF_Driver)FT_FACE_DRIVER( face ); - foundry_prop = pcf_find_property( face, "FOUNDRY" ); - point_size_prop = pcf_find_property( face, "POINT_SIZE" ); - average_width_prop = pcf_find_property( face, "AVERAGE_WIDTH" ); - if ( point_size_prop && average_width_prop ) + if ( !driver->no_long_family_names ) { - if ( average_width_prop->value.l >= point_size_prop->value.l ) + /* Prepend the foundry name plus a space to the family name. */ + /* There are many fonts just called `Fixed' which look */ + /* completely different, and which have nothing to do with each */ + /* other. When selecting `Fixed' in KDE or Gnome one gets */ + /* results that appear rather random, the style changes often if */ + /* one changes the size and one cannot select some fonts at all. */ + /* */ + /* We also check whether we have `wide' characters; all put */ + /* together, we get family names like `Sony Fixed' or `Misc */ + /* Fixed Wide'. */ + + PCF_Property foundry_prop, point_size_prop, average_width_prop; + + int l = ft_strlen( prop->value.atom ) + 1; + int wide = 0; + + + foundry_prop = pcf_find_property( face, "FOUNDRY" ); + point_size_prop = pcf_find_property( face, "POINT_SIZE" ); + average_width_prop = pcf_find_property( face, "AVERAGE_WIDTH" ); + + if ( point_size_prop && average_width_prop ) { - /* This font is at least square shaped or even wider */ - wide = 1; - l += ft_strlen( " Wide" ); + if ( average_width_prop->value.l >= point_size_prop->value.l ) + { + /* This font is at least square shaped or even wider */ + wide = 1; + l += ft_strlen( " Wide" ); + } } - } - if ( foundry_prop && foundry_prop->isString ) - { - l += ft_strlen( foundry_prop->value.atom ) + 1; + if ( foundry_prop && foundry_prop->isString ) + { + l += ft_strlen( foundry_prop->value.atom ) + 1; - if ( FT_NEW_ARRAY( root->family_name, l ) ) - goto Exit; + if ( FT_NEW_ARRAY( root->family_name, l ) ) + goto Exit; - ft_strcpy( root->family_name, foundry_prop->value.atom ); - ft_strcat( root->family_name, " " ); - ft_strcat( root->family_name, prop->value.atom ); + ft_strcpy( root->family_name, foundry_prop->value.atom ); + ft_strcat( root->family_name, " " ); + ft_strcat( root->family_name, prop->value.atom ); + } + else + { + if ( FT_NEW_ARRAY( root->family_name, l ) ) + goto Exit; + + ft_strcpy( root->family_name, prop->value.atom ); + } + + if ( wide ) + ft_strcat( root->family_name, " Wide" ); } else + +#endif /* PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */ + { - if ( FT_NEW_ARRAY( root->family_name, l ) ) + if ( FT_STRDUP( root->family_name, prop->value.atom ) ) goto Exit; - - ft_strcpy( root->family_name, prop->value.atom ); } - - if ( wide ) - ft_strcat( root->family_name, " Wide" ); } else root->family_name = NULL; Index: reactos/sdk/lib/3rdparty/freetype/src/pfr/pfr.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/pfr/pfr.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/pfr/pfr.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType PFR driver component. */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -15,15 +15,16 @@ /* */ /***************************************************************************/ + #define FT_MAKE_OPTION_SINGLE_OBJECT - #include <ft2build.h> +#include "pfrcmap.c" +#include "pfrdrivr.c" +#include "pfrgload.c" #include "pfrload.c" -#include "pfrgload.c" -#include "pfrcmap.c" #include "pfrobjs.c" -#include "pfrdrivr.c" #include "pfrsbit.c" + /* END */ Index: reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrcmap.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrcmap.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrcmap.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType PFR cmap handling (body). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrcmap.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrcmap.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrcmap.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType PFR cmap handling (specification). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrdrivr.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrdrivr.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrdrivr.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType PFR driver interface (body). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrdrivr.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrdrivr.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrdrivr.h (working copy) @@ -4,7 +4,7 @@ /* */ /* High-level Type PFR driver interface (specification). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrerror.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrerror.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrerror.h (working copy) @@ -4,7 +4,7 @@ /* */ /* PFR error codes (specification only). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrgload.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrgload.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrgload.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType PFR glyph loader (body). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrgload.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrgload.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrgload.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType PFR glyph loader (specification). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrload.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrload.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrload.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType PFR loader (body). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrload.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrload.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrload.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType PFR loader (specification). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrobjs.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrobjs.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrobjs.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType PFR object methods (body). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrobjs.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrobjs.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrobjs.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType PFR object methods (specification). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrsbit.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrsbit.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrsbit.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType PFR bitmap loader (body). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrsbit.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrsbit.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrsbit.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType PFR bitmap loader (specification). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrtypes.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrtypes.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/pfr/pfrtypes.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType PFR data structures (specification only). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/psaux/afmparse.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/psaux/afmparse.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/psaux/afmparse.c (working copy) @@ -4,7 +4,7 @@ /* */ /* AFM parser (body). */ /* */ -/* Copyright 2006-2016 by */ +/* Copyright 2006-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -20,6 +20,8 @@ #include FT_INTERNAL_DEBUG_H #include FT_INTERNAL_POSTSCRIPT_AUX_H +#ifndef T1_CONFIG_OPTION_NO_AFM + #include "afmparse.h" #include "psconv.h" @@ -973,5 +975,12 @@ return error; } +#else /* T1_CONFIG_OPTION_NO_AFM */ + /* ANSI C doesn't like empty source files */ + typedef int _afm_parse_dummy; + +#endif /* T1_CONFIG_OPTION_NO_AFM */ + + /* END */ Index: reactos/sdk/lib/3rdparty/freetype/src/psaux/afmparse.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/psaux/afmparse.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/psaux/afmparse.h (working copy) @@ -4,7 +4,7 @@ /* */ /* AFM parser (specification). */ /* */ -/* Copyright 2006-2016 by */ +/* Copyright 2006-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/psaux/psaux.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/psaux/psaux.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/psaux/psaux.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType auxiliary PostScript driver component (body only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -17,18 +17,14 @@ #define FT_MAKE_OPTION_SINGLE_OBJECT - #include <ft2build.h> -#include "psobjs.c" -#include "psauxmod.c" -#include "t1decode.c" -#include "t1cmap.c" -#ifndef T1_CONFIG_OPTION_NO_AFM #include "afmparse.c" -#endif - +#include "psauxmod.c" #include "psconv.c" +#include "psobjs.c" +#include "t1cmap.c" +#include "t1decode.c" /* END */ Index: reactos/sdk/lib/3rdparty/freetype/src/psaux/psauxerr.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/psaux/psauxerr.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/psaux/psauxerr.h (working copy) @@ -4,7 +4,7 @@ /* */ /* PS auxiliary module error codes (specification only). */ /* */ -/* Copyright 2001-2016 by */ +/* Copyright 2001-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/psaux/psauxmod.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/psaux/psauxmod.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/psaux/psauxmod.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType auxiliary PostScript module implementation (body). */ /* */ -/* Copyright 2000-2016 by */ +/* Copyright 2000-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/psaux/psauxmod.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/psaux/psauxmod.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/psaux/psauxmod.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType auxiliary PostScript module implementation (specification). */ /* */ -/* Copyright 2000-2016 by */ +/* Copyright 2000-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/psaux/psconv.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/psaux/psconv.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/psaux/psconv.c (working copy) @@ -4,7 +4,7 @@ /* */ /* Some convenience conversions (body). */ /* */ -/* Copyright 2006-2016 by */ +/* Copyright 2006-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/psaux/psconv.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/psaux/psconv.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/psaux/psconv.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Some convenience conversions (specification). */ /* */ -/* Copyright 2006-2016 by */ +/* Copyright 2006-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/psaux/psobjs.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/psaux/psobjs.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/psaux/psobjs.c (working copy) @@ -4,7 +4,7 @@ /* */ /* Auxiliary functions for PostScript fonts (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -1551,7 +1551,7 @@ builder->current = &loader->current.outline; FT_GlyphLoader_Rewind( loader ); - builder->hints_globals = size->internal; + builder->hints_globals = size->internal->module_data; builder->hints_funcs = NULL; if ( hinting ) @@ -1718,6 +1718,14 @@ first = outline->n_contours <= 1 ? 0 : outline->contours[outline->n_contours - 2] + 1; + /* in malformed fonts it can happen that a contour was started */ + /* but no points were added */ + if ( outline->n_contours && first == outline->n_points ) + { + outline->n_contours--; + return; + } + /* We must not include the last point in the path if it */ /* is located on the first point. */ if ( outline->n_points > 1 ) Index: reactos/sdk/lib/3rdparty/freetype/src/psaux/psobjs.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/psaux/psobjs.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/psaux/psobjs.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Auxiliary functions for PostScript fonts (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/psaux/t1cmap.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/psaux/t1cmap.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/psaux/t1cmap.c (working copy) @@ -4,7 +4,7 @@ /* */ /* Type 1 character map support (body). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/psaux/t1cmap.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/psaux/t1cmap.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/psaux/t1cmap.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Type 1 character map support (specification). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/psaux/t1decode.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/psaux/t1decode.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/psaux/t1decode.c (working copy) @@ -4,7 +4,7 @@ /* */ /* PostScript Type 1 decoding routines (body). */ /* */ -/* Copyright 2000-2016 by */ +/* Copyright 2000-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -666,9 +666,9 @@ #ifdef FT_DEBUG_LEVEL_TRACE if ( large_int ) - FT_TRACE4(( " %ld", value )); + FT_TRACE4(( " %d", value )); else - FT_TRACE4(( " %ld", value / 65536 )); + FT_TRACE4(( " %d", value / 65536 )); #endif *top++ = value; @@ -780,10 +780,19 @@ /* point without adding any point to the outline */ idx = decoder->num_flex_vectors++; if ( idx > 0 && idx < 7 ) + { + /* in malformed fonts it is possible to have other */ + /* opcodes in the middle of a flex (which don't */ + /* increase `num_flex_vectors'); we thus have to */ + /* check whether we can add a point */ + if ( FT_SET_ERROR( t1_builder_check_points( builder, 1 ) ) ) + goto Syntax_Error; + t1_builder_add_point( builder, x, y, (FT_Byte)( idx == 3 || idx == 6 ) ); + } } break; Index: reactos/sdk/lib/3rdparty/freetype/src/psaux/t1decode.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/psaux/t1decode.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/psaux/t1decode.h (working copy) @@ -4,7 +4,7 @@ /* */ /* PostScript Type 1 decoding routines (specification). */ /* */ -/* Copyright 2000-2016 by */ +/* Copyright 2000-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/pshinter/pshalgo.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/pshinter/pshalgo.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/pshinter/pshalgo.c (working copy) @@ -4,7 +4,7 @@ /* */ /* PostScript hinting algorithm (body). */ /* */ -/* Copyright 2001-2016 by */ +/* Copyright 2001-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used */ Index: reactos/sdk/lib/3rdparty/freetype/src/pshinter/pshalgo.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/pshinter/pshalgo.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/pshinter/pshalgo.h (working copy) @@ -4,7 +4,7 @@ /* */ /* PostScript hinting algorithm (specification). */ /* */ -/* Copyright 2001-2016 by */ +/* Copyright 2001-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/pshinter/pshglob.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/pshinter/pshglob.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/pshinter/pshglob.c (working copy) @@ -5,7 +5,7 @@ /* PostScript hinter global hinting management (body). */ /* Inspired by the new auto-hinter module. */ /* */ -/* Copyright 2001-2016 by */ +/* Copyright 2001-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used */ Index: reactos/sdk/lib/3rdparty/freetype/src/pshinter/pshglob.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/pshinter/pshglob.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/pshinter/pshglob.h (working copy) @@ -4,7 +4,7 @@ /* */ /* PostScript hinter global hinting management. */ /* */ -/* Copyright 2001-2016 by */ +/* Copyright 2001-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/pshinter/pshinter.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/pshinter/pshinter.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/pshinter/pshinter.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType PostScript Hinting module */ /* */ -/* Copyright 2001-2016 by */ +/* Copyright 2001-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -17,13 +17,13 @@ #define FT_MAKE_OPTION_SINGLE_OBJECT +#include <ft2build.h> -#include <ft2build.h> +#include "pshalgo.c" +#include "pshglob.c" +#include "pshmod.c" #include "pshpic.c" #include "pshrec.c" -#include "pshglob.c" -#include "pshalgo.c" -#include "pshmod.c" /* END */ Index: reactos/sdk/lib/3rdparty/freetype/src/pshinter/pshmod.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/pshinter/pshmod.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/pshinter/pshmod.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType PostScript hinter module implementation (body). */ /* */ -/* Copyright 2001-2016 by */ +/* Copyright 2001-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/pshinter/pshmod.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/pshinter/pshmod.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/pshinter/pshmod.h (working copy) @@ -4,7 +4,7 @@ /* */ /* PostScript hinter module interface (specification). */ /* */ -/* Copyright 2001-2016 by */ +/* Copyright 2001-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/pshinter/pshnterr.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/pshinter/pshnterr.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/pshinter/pshnterr.h (working copy) @@ -4,7 +4,7 @@ /* */ /* PS Hinter error codes (specification only). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/pshinter/pshpic.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/pshinter/pshpic.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/pshinter/pshpic.c (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for pshinter module. */ /* */ -/* Copyright 2009-2016 by */ +/* Copyright 2009-2017 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/pshinter/pshpic.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/pshinter/pshpic.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/pshinter/pshpic.h (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for pshinter module. */ /* */ -/* Copyright 2009-2016 by */ +/* Copyright 2009-2017 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/pshinter/pshrec.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/pshinter/pshrec.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/pshinter/pshrec.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType PostScript hints recorder (body). */ /* */ -/* Copyright 2001-2016 by */ +/* Copyright 2001-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/pshinter/pshrec.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/pshinter/pshrec.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/pshinter/pshrec.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Postscript (Type1/Type2) hints recorder (specification). */ /* */ -/* Copyright 2001-2016 by */ +/* Copyright 2001-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/psnames/psmodule.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/psnames/psmodule.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/psnames/psmodule.c (working copy) @@ -4,7 +4,7 @@ /* */ /* PSNames module implementation (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -23,6 +23,7 @@ #include "psmodule.h" +#include "pstables.h" #define DEFINE_PS_TABLES #include "pstables.h" Index: reactos/sdk/lib/3rdparty/freetype/src/psnames/psmodule.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/psnames/psmodule.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/psnames/psmodule.h (working copy) @@ -4,7 +4,7 @@ /* */ /* High-level PSNames module interface (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/psnames/psnamerr.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/psnames/psnamerr.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/psnames/psnamerr.h (working copy) @@ -4,7 +4,7 @@ /* */ /* PS names module error codes (specification only). */ /* */ -/* Copyright 2001-2016 by */ +/* Copyright 2001-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/psnames/psnames.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/psnames/psnames.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/psnames/psnames.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType PSNames module component (body only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -17,10 +17,10 @@ #define FT_MAKE_OPTION_SINGLE_OBJECT +#include <ft2build.h> -#include <ft2build.h> +#include "psmodule.c" #include "pspic.c" -#include "psmodule.c" /* END */ Index: reactos/sdk/lib/3rdparty/freetype/src/psnames/pspic.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/psnames/pspic.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/psnames/pspic.c (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for psnames module. */ /* */ -/* Copyright 2009-2016 by */ +/* Copyright 2009-2017 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/psnames/pspic.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/psnames/pspic.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/psnames/pspic.h (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for psnames module. */ /* */ -/* Copyright 2009-2016 by */ +/* Copyright 2009-2017 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/psnames/pstables.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/psnames/pstables.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/psnames/pstables.h (working copy) @@ -4,7 +4,7 @@ /* */ /* PostScript glyph names. */ /* */ -/* Copyright 2005-2016 by */ +/* Copyright 2005-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -4135,6 +4135,7 @@ ; +#ifdef DEFINE_PS_TABLES /* * This function searches the compressed table efficiently. */ @@ -4229,6 +4230,7 @@ NotFound: return 0; } +#endif /* DEFINE_PS_TABLES */ #endif /* FT_CONFIG_OPTION_ADOBE_GLYPH_LIST */ Index: reactos/sdk/lib/3rdparty/freetype/src/raster/ftmisc.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/raster/ftmisc.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/raster/ftmisc.h (working copy) @@ -5,7 +5,7 @@ /* Miscellaneous macros for stand-alone rasterizer (specification */ /* only). */ /* */ -/* Copyright 2005-2016 by */ +/* Copyright 2005-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used */ Index: reactos/sdk/lib/3rdparty/freetype/src/raster/ftraster.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/raster/ftraster.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/raster/ftraster.c (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType glyph rasterizer (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/raster/ftraster.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/raster/ftraster.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/raster/ftraster.h (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType glyph rasterizer (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used */ Index: reactos/sdk/lib/3rdparty/freetype/src/raster/ftrend1.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/raster/ftrend1.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/raster/ftrend1.c (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType glyph rasterizer interface (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/raster/ftrend1.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/raster/ftrend1.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/raster/ftrend1.h (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType glyph rasterizer interface (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/raster/raster.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/raster/raster.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/raster/raster.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType monochrome rasterer module component (body only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -17,11 +17,11 @@ #define FT_MAKE_OPTION_SINGLE_OBJECT +#include <ft2build.h> -#include <ft2build.h> -#include "rastpic.c" #include "ftraster.c" #include "ftrend1.c" +#include "rastpic.c" /* END */ Index: reactos/sdk/lib/3rdparty/freetype/src/raster/rasterrs.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/raster/rasterrs.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/raster/rasterrs.h (working copy) @@ -4,7 +4,7 @@ /* */ /* monochrome renderer error codes (specification only). */ /* */ -/* Copyright 2001-2016 by */ +/* Copyright 2001-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/raster/rastpic.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/raster/rastpic.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/raster/rastpic.c (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for raster module. */ /* */ -/* Copyright 2009-2016 by */ +/* Copyright 2009-2017 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/raster/rastpic.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/raster/rastpic.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/raster/rastpic.h (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for raster module. */ /* */ -/* Copyright 2009-2016 by */ +/* Copyright 2009-2017 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/sfnt/pngshim.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/sfnt/pngshim.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/sfnt/pngshim.c (working copy) @@ -4,7 +4,7 @@ /* */ /* PNG Bitmap glyph support. */ /* */ -/* Copyright 2013-2016 by */ +/* Copyright 2013-2017 by */ /* Google, Inc. */ /* Written by Stuart Gill and Behdad Esfahbod. */ /* */ @@ -24,9 +24,10 @@ #include FT_CONFIG_STANDARD_LIBRARY_H -#ifdef FT_CONFIG_OPTION_USE_PNG +#if defined( TT_CONFIG_OPTION_EMBEDDED_BITMAPS ) && \ + defined( FT_CONFIG_OPTION_USE_PNG ) - /* We always include <stjmp.h>, so make libpng shut up! */ + /* We always include <setjmp.h>, so make libpng shut up! */ #define PNG_SKIP_SETJMP_CHECK 1 #include <png.h> #include "pngshim.h" @@ -377,7 +378,12 @@ return error; } -#endif /* FT_CONFIG_OPTION_USE_PNG */ +#else /* !(TT_CONFIG_OPTION_EMBEDDED_BITMAPS && FT_CONFIG_OPTION_USE_PNG) */ + /* ANSI C doesn't like empty source files */ + typedef int _pngshim_dummy; +#endif /* !(TT_CONFIG_OPTION_EMBEDDED_BITMAPS && FT_CONFIG_OPTION_USE_PNG) */ + + /* END */ Index: reactos/sdk/lib/3rdparty/freetype/src/sfnt/pngshim.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/sfnt/pngshim.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/sfnt/pngshim.h (working copy) @@ -4,7 +4,7 @@ /* */ /* PNG Bitmap glyph support. */ /* */ -/* Copyright 2013-2016 by */ +/* Copyright 2013-2017 by */ /* Google, Inc. */ /* Written by Stuart Gill and Behdad Esfahbod. */ /* */ Index: reactos/sdk/lib/3rdparty/freetype/src/sfnt/sfdriver.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/sfnt/sfdriver.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/sfnt/sfdriver.c (working copy) @@ -4,7 +4,7 @@ /* */ /* High-level SFNT driver interface (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -20,6 +20,7 @@ #include FT_INTERNAL_DEBUG_H #include FT_INTERNAL_SFNT_H #include FT_INTERNAL_OBJECTS_H +#include FT_TRUETYPE_IDS_H #include "sfdriver.h" #include "ttload.h" @@ -50,7 +51,12 @@ #include FT_SERVICE_SFNT_H #include FT_SERVICE_TT_CMAP_H +#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT +#include FT_MULTIPLE_MASTERS_H +#include FT_SERVICE_MULTIPLE_MASTERS_H +#endif + /*************************************************************************/ /* */ /* The macro FT_COMPONENT is used in trace mode. It is an implicit */ @@ -220,113 +226,838 @@ * */ - static const char* - sfnt_get_ps_name( TT_Face face ) + /* an array representing allowed ASCII characters in a PS string */ + static const unsigned char sfnt_ps_map[16] = { - FT_Int n, found_win, found_apple; - const char* result = NULL; + /* 4 0 C 8 */ + 0x00, 0x00, /* 0x00: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 */ + 0x00, 0x00, /* 0x10: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 */ + 0xDE, 0x7C, /* 0x20: 1 1 0 1 1 1 1 0 0 1 1 1 1 1 0 0 */ + 0xFF, 0xAF, /* 0x30: 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 1 */ + 0xFF, 0xFF, /* 0x40: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 */ + 0xFF, 0xD7, /* 0x50: 1 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 */ + 0xFF, 0xFF, /* 0x60: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 */ + 0xFF, 0x57 /* 0x70: 1 1 1 1 1 1 1 1 0 1 0 1 0 1 1 1 */ + }; - /* shouldn't happen, but just in case to avoid memory leaks */ - if ( face->postscript_name ) - return face->postscript_name; + static int + sfnt_is_postscript( int c ) + { + unsigned int cc; - /* scan the name table to see whether we have a Postscript name here, */ - /* either in Macintosh or Windows platform encodings */ - found_win = -1; - found_apple = -1; + if ( c < 0 || c >= 0x80 ) + return 0; + + cc = (unsigned int)c; + + return sfnt_ps_map[cc >> 3] & ( 1 << ( cc & 0x07 ) ); + } + + +#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT + + /* Only ASCII letters and digits are taken for a variation font */ + /* instance's PostScript name. */ + /* */ + /* `ft_isalnum' is a macro, but we need a function here, thus */ + /* this definition. */ + static int + sfnt_is_alphanumeric( int c ) + { + return ft_isalnum( c ); + } + + + /* the implementation of MurmurHash3 is taken and adapted from */ + /* https://github.com/aappleby/smhasher/blob/master/src/MurmurHash3.cpp */ + +#define ROTL32( x, r ) ( x << r ) | ( x >> ( 32 - r ) ) + + + static FT_UInt32 + fmix32( FT_UInt32 h ) + { + h ^= h >> 16; + h *= 0x85ebca6b; + h ^= h >> 13; + h *= 0xc2b2ae35; + h ^= h >> 16; + + return h; + } + + + static void + murmur_hash_3_128( const void* key, + const unsigned int len, + FT_UInt32 seed, + void* out ) + { + const FT_Byte* data = (const FT_Byte*)key; + const int nblocks = (int)len / 16; + + FT_UInt32 h1 = seed; + FT_UInt32 h2 = seed; + FT_UInt32 h3 = seed; + FT_UInt32 h4 = seed; + + const FT_UInt32 c1 = 0x239b961b; + const FT_UInt32 c2 = 0xab0e9789; + const FT_UInt32 c3 = 0x38b34ae5; + const FT_UInt32 c4 = 0xa1e38b93; + + const FT_UInt32* blocks = (const FT_UInt32*)( data + nblocks * 16 ); + + int i; + + + for( i = -nblocks; i; i++ ) + { + FT_UInt32 k1 = blocks[i * 4 + 0]; + FT_UInt32 k2 = blocks[i * 4 + 1]; + FT_UInt32 k3 = blocks[i * 4 + 2]; + FT_UInt32 k4 = blocks[i * 4 + 3]; + + + k1 *= c1; + k1 = ROTL32( k1, 15 ); + k1 *= c2; + h1 ^= k1; + + h1 = ROTL32( h1, 19 ); + h1 += h2; + h1 = h1 * 5 + 0x561ccd1b; + + k2 *= c2; + k2 = ROTL32( k2, 16 ); + k2 *= c3; + h2 ^= k2; + + h2 = ROTL32( h2, 17 ); + h2 += h3; + h2 = h2 * 5 + 0x0bcaa747; + + k3 *= c3; + k3 = ROTL32( k3, 17 ); + k3 *= c4; + h3 ^= k3; + + h3 = ROTL32( h3, 15 ); + h3 += h4; + h3 = h3 * 5 + 0x96cd1c35; + + k4 *= c4; + k4 = ROTL32( k4, 18 ); + k4 *= c1; + h4 ^= k4; + + h4 = ROTL32( h4, 13 ); + h4 += h1; + h4 = h4 * 5 + 0x32ac3b17; + } + + { + const FT_Byte* tail = (const FT_Byte*)( data + nblocks * 16 ); + + FT_UInt32 k1 = 0; + FT_UInt32 k2 = 0; + FT_UInt32 k3 = 0; + FT_UInt32 k4 = 0; + + + switch ( len & 15 ) + { + case 15: + k4 ^= (FT_UInt32)tail[14] << 16; + case 14: + k4 ^= (FT_UInt32)tail[13] << 8; + case 13: + k4 ^= (FT_UInt32)tail[12]; + k4 *= c4; + k4 = ROTL32( k4, 18 ); + k4 *= c1; + h4 ^= k4; + + case 12: + k3 ^= (FT_UInt32)tail[11] << 24; + case 11: + k3 ^= (FT_UInt32)tail[10] << 16; + case 10: + k3 ^= (FT_UInt32)tail[9] << 8; + case 9: + k3 ^= (FT_UInt32)tail[8]; + k3 *= c3; + k3 = ROTL32( k3, 17 ); + k3 *= c4; + h3 ^= k3; + + case 8: + k2 ^= (FT_UInt32)tail[7] << 24; + case 7: + k2 ^= (FT_UInt32)tail[6] << 16; + case 6: + k2 ^= (FT_UInt32)tail[5] << 8; + case 5: + k2 ^= (FT_UInt32)tail[4]; + k2 *= c2; + k2 = ROTL32( k2, 16 ); + k2 *= c3; + h2 ^= k2; + + case 4: + k1 ^= (FT_UInt32)tail[3] << 24; + case 3: + k1 ^= (FT_UInt32)tail[2] << 16; + case 2: + k1 ^= (FT_UInt32)tail[1] << 8; + case 1: + k1 ^= (FT_UInt32)tail[0]; + k1 *= c1; + k1 = ROTL32( k1, 15 ); + k1 *= c2; + h1 ^= k1; + } + } + + h1 ^= len; + h2 ^= len; + h3 ^= len; + h4 ^= len; + + h1 += h2; + h1 += h3; + h1 += h4; + + h2 += h1; + h3 += h1; + h4 += h1; + + h1 = fmix32( h1 ); + h2 = fmix32( h2 ); + h3 = fmix32( h3 ); + h4 = fmix32( h4 ); + + h1 += h2; + h1 += h3; + h1 += h4; + + h2 += h1; + h3 += h1; + h4 += h1; + + ((FT_UInt32*)out)[0] = h1; + ((FT_UInt32*)out)[1] = h2; + ((FT_UInt32*)out)[2] = h3; + ((FT_UInt32*)out)[3] = h4; + } + + +#endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */ + + + typedef int (*char_type_func)( int c ); + + + /* handling of PID/EID 3/0 and 3/1 is the same */ +#define IS_WIN( n ) ( (n)->platformID == 3 && \ + ( (n)->encodingID == 1 || (n)->encodingID == 0 ) && \ + (n)->languageID == 0x409 ) + +#define IS_APPLE( n ) ( (n)->platformID == 1 && \ + (n)->encodingID == 0 && \ + (n)->languageID == 0 ) + + static char* + get_win_string( FT_Memory memory, + FT_Stream stream, + TT_Name entry, + char_type_func char_type, + FT_Bool report_invalid_characters ) + { + FT_Error error = FT_Err_Ok; + + char* result = NULL; + FT_String* r; + FT_Char* p; + FT_UInt len; + + FT_UNUSED( error ); + + + if ( FT_ALLOC( result, entry->stringLength / 2 + 1 ) ) + return NULL; + + if ( FT_STREAM_SEEK( entry->stringOffset ) || + FT_FRAME_ENTER( entry->stringLength ) ) + { + FT_FREE( result ); + entry->stringLength = 0; + entry->stringOffset = 0; + FT_FREE( entry->string ); + + return NULL; + } + + r = (FT_String*)result; + p = (FT_Char*)stream->cursor; + + for ( len = entry->stringLength / 2; len > 0; len--, p += 2 ) + { + if ( p[0] == 0 ) + { + if ( char_type( p[1] ) ) + *r++ = p[1]; + else + { + if ( report_invalid_characters ) + { + FT_TRACE0(( "get_win_string:" + " Character `%c' (0x%X) invalid in PS name string\n", + p[1], p[1] )); + /* it's not the job of FreeType to correct PS names... */ + *r++ = p[1]; + } + } + } + } + *r = '\0'; + + FT_FRAME_EXIT(); + + return result; + } + + + static char* + get_apple_string( FT_Memory memory, + FT_Stream stream, + TT_Name entry, + char_type_func char_type, + FT_Bool report_invalid_characters ) + { + FT_Error error = FT_Err_Ok; + + char* result = NULL; + FT_String* r; + FT_Char* p; + FT_UInt len; + + FT_UNUSED( error ); + + + if ( FT_ALLOC( result, entry->stringLength + 1 ) ) + return NULL; + + if ( FT_STREAM_SEEK( entry->stringOffset ) || + FT_FRAME_ENTER( entry->stringLength ) ) + { + FT_FREE( result ); + entry->stringOffset = 0; + entry->stringLength = 0; + FT_FREE( entry->string ); + + return NULL; + } + + r = (FT_String*)result; + p = (FT_Char*)stream->cursor; + + for ( len = entry->stringLength; len > 0; len--, p++ ) + { + if ( char_type( *p ) ) + *r++ = *p; + else + { + if ( report_invalid_characters ) + { + FT_TRACE0(( "get_apple_string:" + " Character `%c' (0x%X) invalid in PS name string\n", + *p, *p )); + /* it's not the job of FreeType to correct PS names... */ + *r++ = *p; + } + } + } + *r = '\0'; + + FT_FRAME_EXIT(); + + return result; + } + + + static FT_Bool + sfnt_get_name_id( TT_Face face, + FT_UShort id, + FT_Int *win, + FT_Int *apple ) + { + FT_Int n; + + + *win = -1; + *apple = -1; + for ( n = 0; n < face->num_names; n++ ) { - TT_NameEntryRec* name = face->name_table.names + n; + TT_Name name = face->name_table.names + n; - if ( name->nameID == 6 && name->stringLength > 0 ) + if ( name->nameID == id && name->stringLength > 0 ) { - if ( name->platformID == 3 && - name->encodingID == 1 && - name->languageID == 0x409 ) - found_win = n; + if ( IS_WIN( name ) ) + *win = n; - if ( name->platformID == 1 && - name->encodingID == 0 && - name->languageID == 0 ) - found_apple = n; + if ( IS_APPLE( name ) ) + *apple = n; } } - if ( found_win != -1 ) + return ( *win >= 0 ) || ( *apple >= 0 ); + } + + +#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT + + /* + The maximum length of an axis value descriptor. + + We need 65536 different values for the decimal fraction; this fits + nicely into five decimal places. Consequently, it consists of + + . the minus sign if the number is negative, + . up to five characters for the digits before the decimal point, + . the decimal point if there is a fractional part, and + . up to five characters for the digits after the decimal point. + + We also need one byte for the leading `_' character and up to four + bytes for the axis tag. + */ +#define MAX_VALUE_DESCRIPTOR_LEN ( 1 + 5 + 1 + 5 + 1 + 4 ) + + + /* the maximum length of PostScript font names */ +#define MAX_PS_NAME_LEN 127 + + + /* + * Find the shortest decimal representation of a 16.16 fixed point + * number. The function fills `buf' with the result, returning a pointer + * to the position after the representation's last byte. + */ + + static char* + fixed2float( FT_Int fixed, + char* buf ) + { + char* p; + char* q; + char tmp[5]; + + FT_Int int_part; + FT_Int frac_part; + + FT_Int i; + + + p = buf; + + if ( fixed == 0 ) { - FT_Memory memory = face->root.memory; - TT_NameEntryRec* name = face->name_table.names + found_win; - FT_UInt len = name->stringLength / 2; - FT_Error error = FT_Err_Ok; + *p++ = '0'; + return p; + } - FT_UNUSED( error ); + if ( fixed < 0 ) + { + *p++ = '-'; + fixed = -fixed; + } + int_part = ( fixed >> 16 ) & 0xFFFF; + frac_part = fixed & 0xFFFF; - if ( !FT_ALLOC( result, name->stringLength + 1 ) ) + /* get digits of integer part (in reverse order) */ + q = tmp; + while ( int_part > 0 ) + { + *q++ = '0' + int_part % 10; + int_part /= 10; + } + + /* copy digits in correct order to buffer */ + while ( q > tmp ) + *p++ = *--q; + + if ( !frac_part ) + return p; + + /* save position of point */ + q = p; + *p++ = '.'; + + /* apply rounding */ + frac_part = frac_part * 10 + 5; + + /* get digits of fractional part */ + for ( i = 0; i < 5; i++ ) + { + *p++ = '0' + (char)( frac_part / 0x10000L ); + + frac_part %= 0x10000L; + if ( !frac_part ) + break; + + frac_part *= 10; + } + + /* + If the remainder stored in `frac_part' (after the last FOR loop) is + smaller than 34480*10, the resulting decimal value minus 0.00001 is + an equivalent representation of `fixed'. + + The above FOR loop always finds the larger of the two values; I + verified this by iterating over all possible fixed point numbers. + + If the remainder is 17232*10, both values are equally good, and we + take the next even number (following IEEE 754's `round to nearest, + ties to even' rounding rule). + + If the remainder is smaller than 17232*10, the lower of the two + numbers is nearer to the exact result (values 17232 and 34480 were + also found by testing all possible fixed point values). + + We use this to find a shorter decimal representation. If not ending + with digit zero, we take the representation with less error. + */ + p--; + if ( p - q == 5 ) /* five digits? */ + { + /* take the representation that has zero as the last digit */ + if ( frac_part < 34480 * 10 && + *p == '1' ) + *p = '0'; + + /* otherwise use the one with less error */ + else if ( frac_part == 17232 * 10 && + *p & 1 ) + *p -= 1; + + else if ( frac_part < 17232 * 10 && + *p != '0' ) + *p -= 1; + } + + /* remove trailing zeros */ + while ( *p == '0' ) + *p-- = '\0'; + + return p + 1; + } + + + static const char hexdigits[16] = + { + '0', '1', '2', '3', '4', '5', '6', '7', + '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' + }; + + + static const char* + sfnt_get_var_ps_name( TT_Face face ) + { + FT_Error error; + FT_Memory memory = face->root.memory; + + FT_Service_MultiMasters mm = (FT_Service_MultiMasters)face->mm; + + FT_UInt num_coords; + FT_Fixed* coords; + FT_MM_Var* mm_var; + + FT_Int found, win, apple; + FT_UInt i, j; + + char* result = NULL; + char* p; + + + if ( !face->var_postscript_prefix ) + { + FT_UInt len; + + + /* check whether we have a Variations PostScript Name Prefix */ + found = sfnt_get_name_id( face, + TT_NAME_ID_VARIATIONS_PREFIX, + &win, + &apple ); + if ( !found ) { - FT_Stream stream = face->name_table.stream; - FT_String* r = (FT_String*)result; - FT_Char* p; + /* otherwise use the typographic family name */ + found = sfnt_get_name_id( face, + TT_NAME_ID_TYPOGRAPHIC_FAMILY, + &win, + &apple ); + } + if ( !found ) + { + /* as a last resort we try the family name; note that this is */ + /* not in the Adobe TechNote, but GX fonts (which predate the */ + /* TechNote) benefit from this behaviour */ + found = sfnt_get_name_id( face, + TT_NAME_ID_FONT_FAMILY, + &win, + &apple ); + } - if ( FT_STREAM_SEEK( name->stringOffset ) || - FT_FRAME_ENTER( name->stringLength ) ) + if ( !found ) + { + FT_TRACE0(( "sfnt_get_var_ps_name:" + " Can't construct PS name prefix for font instances\n" )); + return NULL; + } + + /* prefer Windows entries over Apple */ + if ( win != -1 ) + result = get_win_string( face->root.memory, + face->name_table.stream, + face->name_table.names + win, + sfnt_is_alphanumeric, + 0 ); + else + result = get_apple_string( face->root.memory, + face->name_table.stream, + face->name_table.names + apple, + sfnt_is_alphanumeric, + 0 ); + + len = ft_strlen( result ); + + /* sanitize if necessary; we reserve space for 36 bytes (a 128bit */ + /* checksum as a hex number, preceded by `-' and followed by three */ + /* ASCII dots, to be used if the constructed PS name would be too */ + /* long); this is also sufficient for a single instance */ + if ( len > MAX_PS_NAME_LEN - ( 1 + 32 + 3 ) ) + { + len = MAX_PS_NAME_LEN - ( 1 + 32 + 3 ); + result[len] = '\0'; + + FT_TRACE0(( "sfnt_get_var_ps_name:" + " Shortening variation PS name prefix\n" + " " + " to %d characters\n", len )); + } + + face->var_postscript_prefix = result; + face->var_postscript_prefix_len = len; + } + + mm->get_var_blend( FT_FACE( face ), + &num_coords, + &coords, + NULL, + &mm_var ); + + if ( FT_IS_NAMED_INSTANCE( FT_FACE( face ) ) ) + { + SFNT_Service sfnt = (SFNT_Service)face->sfnt; + + FT_Long instance = ( ( face->root.face_index & 0x7FFF0000L ) >> 16 ) - 1; + FT_UInt psid = mm_var->namedstyle[instance].psid; + + char* ps_name = NULL; + + + /* try first to load the name string with index `postScriptNameID' */ + if ( psid == 6 || + ( psid > 255 && psid < 32768 ) ) + (void)sfnt->get_name( face, (FT_UShort)psid, &ps_name ); + + if ( ps_name ) + { + result = ps_name; + p = result + ft_strlen( result ) + 1; + + goto check_length; + } + else + { + /* otherwise construct a name using `subfamilyNameID' */ + FT_UInt strid = mm_var->namedstyle[instance].strid; + + char* subfamily_name; + char* s; + + + (void)sfnt->get_name( face, (FT_UShort)strid, &subfamily_name ); + + if ( !subfamily_name ) { - FT_FREE( result ); - name->stringLength = 0; - name->stringOffset = 0; - FT_FREE( name->string ); - - goto Exit; + FT_TRACE1(( "sfnt_get_var_ps_name:" + " can't construct named instance PS name;\n" + " " + " trying to construct normal instance PS name\n" )); + goto construct_instance_name; } - p = (FT_Char*)stream->cursor; + /* after the prefix we have character `-' followed by the */ + /* subfamily name (using only characters a-z, A-Z, and 0-9) */ + if ( FT_ALLOC( result, face->var_postscript_prefix_len + + 1 + ft_strlen( subfamily_name ) + 1 ) ) + return NULL; - for ( ; len > 0; len--, p += 2 ) + ft_strcpy( result, face->var_postscript_prefix ); + + p = result + face->var_postscript_prefix_len; + *p++ = '-'; + + s = subfamily_name; + while ( *s ) { - if ( p[0] == 0 && p[1] >= 32 ) - *r++ = p[1]; + if ( ft_isalnum( *s ) ) + *p++ = *s; + s++; } - *r = '\0'; + *p++ = '\0'; - FT_FRAME_EXIT(); + FT_FREE( subfamily_name ); } - goto Exit; } + else + { + FT_Var_Axis* axis; - if ( found_apple != -1 ) + + construct_instance_name: + axis = mm_var->axis; + + if ( FT_ALLOC( result, + face->var_postscript_prefix_len + + num_coords * MAX_VALUE_DESCRIPTOR_LEN + 1 ) ) + return NULL; + + p = result; + + ft_strcpy( p, face->var_postscript_prefix ); + p += face->var_postscript_prefix_len; + + for ( i = 0; i < num_coords; i++, coords++, axis++ ) + { + char t; + + + /* omit axis value descriptor if it is identical */ + /* to the default axis value */ + if ( *coords == axis->def ) + continue; + + *p++ = '_'; + p = fixed2float( *coords, p ); + + t = (char)( axis->tag >> 24 ); + if ( t != ' ' && ft_isalnum( t ) ) + *p++ = t; + t = (char)( axis->tag >> 16 ); + if ( t != ' ' && ft_isalnum( t ) ) + *p++ = t; + t = (char)( axis->tag >> 8 ); + if ( t != ' ' && ft_isalnum( t ) ) + *p++ = t; + t = (char)axis->tag; + if ( t != ' ' && ft_isalnum( t ) ) + *p++ = t; + } + } + + check_length: + if ( p - result > MAX_PS_NAME_LEN ) { - FT_Memory memory = face->root.memory; - TT_NameEntryRec* name = face->name_table.names + found_apple; - FT_UInt len = name->stringLength; - FT_Error error = FT_Err_Ok; + /* the PS name is too long; replace the part after the prefix with */ + /* a checksum; we use MurmurHash 3 with a hash length of 128 bit */ - FT_UNUSED( error ); + FT_UInt32 seed = 123456789; + FT_UInt32 hash[4]; + FT_UInt32* h; - if ( !FT_ALLOC( result, len + 1 ) ) + + murmur_hash_3_128( result, p - result, seed, hash ); + + p = result + face->var_postscript_prefix_len; + *p++ = '-'; + + /* we convert the hash value to hex digits from back to front */ + p += 32 + 3; + h = hash + 3; + + *p-- = '\0'; + *p-- = '.'; + *p-- = '.'; + *p-- = '.'; + + for ( i = 0; i < 4; i++, h-- ) { - FT_Stream stream = face->name_table.stream; + FT_UInt32 v = *h; - if ( FT_STREAM_SEEK( name->stringOffset ) || - FT_STREAM_READ( result, len ) ) + for ( j = 0; j < 8; j++ ) { - name->stringOffset = 0; - name->stringLength = 0; - FT_FREE( name->string ); - FT_FREE( result ); - goto Exit; + *p-- = hexdigits[v & 0xF]; + v >>= 4; } - ((char*)result)[len] = '\0'; } } - Exit: + return result; + } + +#endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */ + + + static const char* + sfnt_get_ps_name( TT_Face face ) + { + FT_Int found, win, apple; + const char* result = NULL; + + + if ( face->postscript_name ) + return face->postscript_name; + +#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT + if ( face->blend ) + { + face->postscript_name = sfnt_get_var_ps_name( face ); + return face->postscript_name; + } +#endif + + /* scan the name table to see whether we have a Postscript name here, */ + /* either in Macintosh or Windows platform encodings */ + found = sfnt_get_name_id( face, TT_NAME_ID_PS_NAME, &win, &apple ); + if ( !found ) + return NULL; + + /* prefer Windows entries over Apple */ + if ( win != -1 ) + result = get_win_string( face->root.memory, + face->name_table.stream, + face->name_table.names + win, + sfnt_is_postscript, + 1 ); + else + result = get_apple_string( face->root.memory, + face->name_table.stream, + face->name_table.names + apple, + sfnt_is_postscript, + 1 ); + face->postscript_name = result; + return result; } @@ -528,7 +1259,8 @@ tt_face_get_metrics, /* TT_Get_Metrics_Func get_metrics */ - tt_face_get_name /* TT_Get_Name_Func get_name */ + tt_face_get_name, /* TT_Get_Name_Func get_name */ + sfnt_get_name_id /* TT_Get_Name_ID_Func get_name_id */ ) Index: reactos/sdk/lib/3rdparty/freetype/src/sfnt/sfdriver.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/sfnt/sfdriver.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/sfnt/sfdriver.h (working copy) @@ -4,7 +4,7 @@ /* */ /* High-level SFNT driver interface (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/sfnt/sferrors.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/sfnt/sferrors.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/sfnt/sferrors.h (working copy) @@ -4,7 +4,7 @@ /* */ /* SFNT error codes (specification only). */ /* */ -/* Copyright 2001-2016 by */ +/* Copyright 2001-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/sfnt/sfnt.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/sfnt/sfnt.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/sfnt/sfnt.c (working copy) @@ -4,7 +4,7 @@ /* */ /* Single object library component. */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -17,27 +17,19 @@ #define FT_MAKE_OPTION_SINGLE_OBJECT +#include <ft2build.h> -#include <ft2build.h> +#include "pngshim.c" +#include "sfdriver.c" #include "sfntpic.c" +#include "sfobjs.c" +#include "ttbdf.c" +#include "ttcmap.c" +#include "ttkern.c" #include "ttload.c" #include "ttmtx.c" -#include "ttcmap.c" -#include "ttkern.c" -#include "sfobjs.c" -#include "sfdriver.c" - -#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS -#include "pngshim.c" +#include "ttpost.c" #include "ttsbit.c" -#endif -#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES -#include "ttpost.c" -#endif -#ifdef TT_CONFIG_OPTION_BDF -#include "ttbdf.c" -#endif - /* END */ Index: reactos/sdk/lib/3rdparty/freetype/src/sfnt/sfntpic.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/sfnt/sfntpic.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/sfnt/sfntpic.c (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for sfnt module. */ /* */ -/* Copyright 2009-2016 by */ +/* Copyright 2009-2017 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/sfnt/sfntpic.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/sfnt/sfntpic.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/sfnt/sfntpic.h (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for sfnt module. */ /* */ -/* Copyright 2009-2016 by */ +/* Copyright 2009-2017 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/sfnt/sfobjs.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/sfnt/sfobjs.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/sfnt/sfobjs.c (working copy) @@ -4,7 +4,7 @@ /* */ /* SFNT object management (base). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -54,8 +54,8 @@ /* convert a UTF-16 name entry to ASCII */ static FT_String* - tt_name_entry_ascii_from_utf16( TT_NameEntry entry, - FT_Memory memory ) + tt_name_ascii_from_utf16( TT_Name entry, + FT_Memory memory ) { FT_String* string = NULL; FT_UInt len, code, n; @@ -89,8 +89,8 @@ /* convert an Apple Roman or symbol name entry to ASCII */ static FT_String* - tt_name_entry_ascii_from_other( TT_NameEntry entry, - FT_Memory memory ) + tt_name_ascii_from_other( TT_Name entry, + FT_Memory memory ) { FT_String* string = NULL; FT_UInt len, code, n; @@ -122,8 +122,8 @@ } - typedef FT_String* (*TT_NameEntry_ConvertFunc)( TT_NameEntry entry, - FT_Memory memory ); + typedef FT_String* (*TT_Name_ConvertFunc)( TT_Name entry, + FT_Memory memory ); /* documentation is in sfnt.h */ @@ -133,22 +133,23 @@ FT_UShort nameid, FT_String** name ) { - FT_Memory memory = face->root.memory; - FT_Error error = FT_Err_Ok; - FT_String* result = NULL; - FT_UShort n; - TT_NameEntryRec* rec; - FT_Int found_apple = -1; - FT_Int found_apple_roman = -1; - FT_Int found_apple_english = -1; - FT_Int found_win = -1; - FT_Int found_unicode = -1; + FT_Memory memory = face->root.memory; + FT_Error error = FT_Err_Ok; + FT_String* result = NULL; + FT_UShort n; + TT_Name rec; - FT_Bool is_english = 0; + FT_Int found_apple = -1; + FT_Int found_apple_roman = -1; + FT_Int found_apple_english = -1; + FT_Int found_win = -1; + FT_Int found_unicode = -1; - TT_NameEntry_ConvertFunc convert; + FT_Bool is_english = 0; + TT_Name_ConvertFunc convert; + FT_ASSERT( name ); rec = face->name_table.names; @@ -231,7 +232,7 @@ /* all Unicode strings are encoded using UTF-16BE */ case TT_MS_ID_UNICODE_CS: case TT_MS_ID_SYMBOL_CS: - convert = tt_name_entry_ascii_from_utf16; + convert = tt_name_ascii_from_utf16; break; case TT_MS_ID_UCS_4: @@ -240,7 +241,7 @@ /* MsGothic font shipped with Windows Vista shows that this really */ /* means UTF-16 encoded names (UCS-4 values are only used within */ /* charmaps). */ - convert = tt_name_entry_ascii_from_utf16; + convert = tt_name_ascii_from_utf16; break; default: @@ -250,12 +251,12 @@ else if ( found_apple >= 0 ) { rec = face->name_table.names + found_apple; - convert = tt_name_entry_ascii_from_other; + convert = tt_name_ascii_from_other; } else if ( found_unicode >= 0 ) { rec = face->name_table.names + found_unicode; - convert = tt_name_entry_ascii_from_utf16; + convert = tt_name_ascii_from_utf16; } if ( rec && convert ) @@ -310,7 +311,7 @@ { TT_PLATFORM_MICROSOFT, TT_MS_ID_UCS_4, FT_ENCODING_UNICODE }, { TT_PLATFORM_MICROSOFT, TT_MS_ID_UNICODE_CS, FT_ENCODING_UNICODE }, { TT_PLATFORM_MICROSOFT, TT_MS_ID_SJIS, FT_ENCODING_SJIS }, - { TT_PLATFORM_MICROSOFT, TT_MS_ID_GB2312, FT_ENCODING_GB2312 }, + { TT_PLATFORM_MICROSOFT, TT_MS_ID_PRC, FT_ENCODING_PRC }, { TT_PLATFORM_MICROSOFT, TT_MS_ID_BIG_5, FT_ENCODING_BIG5 }, { TT_PLATFORM_MICROSOFT, TT_MS_ID_WANSUNG, FT_ENCODING_WANSUNG }, { TT_PLATFORM_MICROSOFT, TT_MS_ID_JOHAB, FT_ENCODING_JOHAB } @@ -893,7 +894,17 @@ 0 ); } - FT_FACE_FIND_GLOBAL_SERVICE( face, face->var, METRICS_VARIATIONS ); + if ( !face->var ) + { + /* we want the metrics variations interface */ + /* from the `truetype' module only */ + FT_Module tt_module = FT_Get_Module( library, "truetype" ); + + + face->var = ft_module_get_service( tt_module, + FT_SERVICE_ID_METRICS_VARIATIONS, + 0 ); + } #endif FT_TRACE2(( "SFNT driver\n" )); @@ -909,6 +920,10 @@ face_index = FT_ABS( face_instance_index ) & 0xFFFF; + /* value -(N+1) requests information on index N */ + if ( face_instance_index < 0 ) + face_index--; + if ( face_index >= face->ttc_header.count ) { if ( face_instance_index >= 0 ) @@ -927,6 +942,8 @@ #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT { + FT_Memory memory = face->root.memory; + FT_ULong fvar_len; FT_ULong version; @@ -939,7 +956,10 @@ FT_Int instance_index; + FT_Byte* default_values = NULL; + FT_Byte* instance_values = NULL; + face->is_default_instance = 1; instance_index = FT_ABS( face_instance_index ) >> 16; @@ -949,7 +969,7 @@ fvar_len < 20 || FT_READ_ULONG( version ) || FT_READ_USHORT( offset ) || - FT_STREAM_SKIP( 2 ) /* count_size_pairs */ || + FT_STREAM_SKIP( 2 ) /* reserved */ || FT_READ_USHORT( num_axes ) || FT_READ_USHORT( axis_size ) || FT_READ_USHORT( num_instances ) || @@ -965,12 +985,6 @@ /* check that the data is bound by the table length */ if ( version != 0x00010000UL || -#if 0 - /* fonts like `JamRegular.ttf' have an incorrect value for */ - /* `count_size_pairs'; since value 2 is hard-coded in `fvar' */ - /* version 1.0, we simply ignore it */ - count_size_pairs != 2 || -#endif axis_size != 20 || num_axes == 0 || /* `num_axes' limit implied by 16-bit `instance_size' */ @@ -977,6 +991,7 @@ num_axes > 0x3FFE || !( instance_size == 4 + 4 * num_axes || instance_size == 6 + 4 * num_axes ) || + /* `num_instances' limit implied by limited range of name IDs */ num_instances > 0x7EFF || offset + axis_size * num_axes + @@ -985,19 +1000,73 @@ else face->variation_support |= TT_FACE_FLAG_VAR_FVAR; - /* we don't support Multiple Master CFFs yet */ - if ( !face->goto_table( face, TTAG_CFF, stream, 0 ) ) - num_instances = 0; + /* + * As documented in the OpenType specification, an entry for the + * default instance may be omitted in the named instance table. In + * particular this means that even if there is no named instance + * table in the font we actually do have a named instance, namely the + * default instance. + * + * For consistency, we always want the default instance in our list + * of named instances. If it is missing, we try to synthesize it + * later on. Here, we have to adjust `num_instances' accordingly. + */ - /* we support at most 2^15 - 1 instances */ - if ( num_instances >= ( 1U << 15 ) - 1 ) + if ( ( face->variation_support & TT_FACE_FLAG_VAR_FVAR ) && + !( FT_ALLOC( default_values, num_axes * 4 ) || + FT_ALLOC( instance_values, num_axes * 4 ) ) ) { - if ( face_instance_index >= 0 ) - return FT_THROW( Invalid_Argument ); - else - num_instances = 0; + /* the current stream position is 16 bytes after the table start */ + FT_ULong array_start = FT_STREAM_POS() - 16 + offset; + FT_ULong default_value_offset, instance_offset; + + FT_Byte* p; + FT_UInt i; + + + default_value_offset = array_start + 8; + p = default_values; + + for ( i = 0; i < num_axes; i++ ) + { + (void)FT_STREAM_READ_AT( default_value_offset, p, 4 ); + + default_value_offset += axis_size; + p += 4; + } + + instance_offset = array_start + axis_size * num_axes + 4; + + for ( i = 0; i < num_instances; i++ ) + { + (void)FT_STREAM_READ_AT( instance_offset, + instance_values, + num_axes * 4 ); + + if ( !ft_memcmp( default_values, instance_values, num_axes * 4 ) ) + break; + + instance_offset += instance_size; + } + + if ( i == num_instances ) + { + /* no default instance in named instance table; */ + /* we thus have to synthesize it */ + num_instances++; + } } + FT_FREE( default_values ); + FT_FREE( instance_values ); + + /* we don't support Multiple Master CFFs yet; */ + /* note that `glyf' or `CFF2' have precedence */ + if ( face->goto_table( face, TTAG_glyf, stream, 0 ) && + face->goto_table( face, TTAG_CFF2, stream, 0 ) && + !face->goto_table( face, TTAG_CFF, stream, 0 ) ) + num_instances = 0; + /* instance indices in `face_instance_index' start with index 1, */ /* thus `>' and not `>=' */ if ( instance_index > num_instances ) @@ -1075,8 +1144,8 @@ FT_Bool has_outline; FT_Bool is_apple_sbit; FT_Bool is_apple_sbix; - FT_Bool ignore_preferred_family = FALSE; - FT_Bool ignore_preferred_subfamily = FALSE; + FT_Bool ignore_typographic_family = FALSE; + FT_Bool ignore_typographic_subfamily = FALSE; SFNT_Service sfnt = (SFNT_Service)face->sfnt; @@ -1091,10 +1160,10 @@ for ( i = 0; i < num_params; i++ ) { - if ( params[i].tag == FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY ) - ignore_preferred_family = TRUE; - else if ( params[i].tag == FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY ) - ignore_preferred_subfamily = TRUE; + if ( params[i].tag == FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY ) + ignore_typographic_family = TRUE; + else if ( params[i].tag == FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY ) + ignore_typographic_subfamily = TRUE; } } @@ -1258,30 +1327,10 @@ /* embedded bitmap support */ if ( sfnt->load_eblc ) - { LOAD_( eblc ); - if ( error ) - { - /* a font which contains neither bitmaps nor outlines is */ - /* still valid (although rather useless in most cases); */ - /* however, you can find such stripped fonts in PDFs */ - if ( FT_ERR_EQ( error, Table_Missing ) ) - error = FT_Err_Ok; - else - goto Exit; - } - } + /* consider the pclt, kerning, and gasp tables as optional */ LOAD_( pclt ); - if ( error ) - { - if ( FT_ERR_NEQ( error, Table_Missing ) ) - goto Exit; - - face->pclt.Version = 0; - } - - /* consider the kerning and gasp tables as optional */ LOAD_( gasp ); LOAD_( kern ); @@ -1297,13 +1346,13 @@ face->root.style_name = NULL; if ( face->os2.version != 0xFFFFU && face->os2.fsSelection & 256 ) { - if ( !ignore_preferred_family ) - GET_NAME( PREFERRED_FAMILY, &face->root.family_name ); + if ( !ignore_typographic_family ) + GET_NAME( TYPOGRAPHIC_FAMILY, &face->root.family_name ); if ( !face->root.family_name ) GET_NAME( FONT_FAMILY, &face->root.family_name ); - if ( !ignore_preferred_subfamily ) - GET_NAME( PREFERRED_SUBFAMILY, &face->root.style_name ); + if ( !ignore_typographic_subfamily ) + GET_NAME( TYPOGRAPHIC_SUBFAMILY, &face->root.style_name ); if ( !face->root.style_name ) GET_NAME( FONT_SUBFAMILY, &face->root.style_name ); } @@ -1310,14 +1359,14 @@ else { GET_NAME( WWS_FAMILY, &face->root.family_name ); - if ( !face->root.family_name && !ignore_preferred_family ) - GET_NAME( PREFERRED_FAMILY, &face->root.family_name ); + if ( !face->root.family_name && !ignore_typographic_family ) + GET_NAME( TYPOGRAPHIC_FAMILY, &face->root.family_name ); if ( !face->root.family_name ) GET_NAME( FONT_FAMILY, &face->root.family_name ); GET_NAME( WWS_SUBFAMILY, &face->root.style_name ); - if ( !face->root.style_name && !ignore_preferred_subfamily ) - GET_NAME( PREFERRED_SUBFAMILY, &face->root.style_name ); + if ( !face->root.style_name && !ignore_typographic_subfamily ) + GET_NAME( TYPOGRAPHIC_SUBFAMILY, &face->root.style_name ); if ( !face->root.style_name ) GET_NAME( FONT_SUBFAMILY, &face->root.style_name ); } @@ -1707,7 +1756,10 @@ FT_FREE( face->sbit_strike_map ); face->root.num_fixed_sizes = 0; +#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT FT_FREE( face->postscript_name ); + FT_FREE( face->var_postscript_prefix ); +#endif face->sfnt = NULL; } Index: reactos/sdk/lib/3rdparty/freetype/src/sfnt/sfobjs.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/sfnt/sfobjs.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/sfnt/sfobjs.h (working copy) @@ -4,7 +4,7 @@ /* */ /* SFNT object management (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttbdf.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttbdf.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttbdf.c (working copy) @@ -4,7 +4,7 @@ /* */ /* TrueType and OpenType embedded BDF properties (body). */ /* */ -/* Copyright 2005-2016 by */ +/* Copyright 2005-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -246,7 +246,12 @@ return error; } -#endif /* TT_CONFIG_OPTION_BDF */ +#else /* !TT_CONFIG_OPTION_BDF */ + /* ANSI C doesn't like empty source files */ + typedef int _tt_bdf_dummy; +#endif /* !TT_CONFIG_OPTION_BDF */ + + /* END */ Index: reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttbdf.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttbdf.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttbdf.h (working copy) @@ -4,7 +4,7 @@ /* */ /* TrueType and OpenType embedded BDF properties (specification). */ /* */ -/* Copyright 2005-2016 by */ +/* Copyright 2005-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttcmap.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttcmap.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttcmap.c (working copy) @@ -4,7 +4,7 @@ /* */ /* TrueType character mapping table (cmap) support (body). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttcmap.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttcmap.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttcmap.h (working copy) @@ -4,7 +4,7 @@ /* */ /* TrueType character mapping table (cmap) support (specification). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttcmapc.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttcmapc.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttcmapc.h (working copy) @@ -4,7 +4,7 @@ /* */ /* TT CMAP classes definitions (specification only). */ /* */ -/* Copyright 2009-2016 by */ +/* Copyright 2009-2017 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttkern.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttkern.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttkern.c (working copy) @@ -5,7 +5,7 @@ /* Load the basic TrueType kerning table. This doesn't handle */ /* kerning data within the GPOS table at the moment. */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -108,8 +108,8 @@ p_next = p_limit; /* only use horizontal kerning tables */ - if ( ( coverage & ~8U ) != 0x0001 || - p + 8 > p_limit ) + if ( ( coverage & 3U ) != 0x0001 || + p + 8 > p_next ) goto NextTable; num_pairs = FT_NEXT_USHORT( p ); @@ -214,8 +214,7 @@ if ( ( face->kern_avail_bits & mask ) == 0 ) goto NextTable; - if ( p + 8 > next ) - goto NextTable; + FT_ASSERT( p + 8 <= next ); /* tested in tt_face_load_kern */ num_pairs = FT_NEXT_USHORT( p ); p += 6; Index: reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttkern.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttkern.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttkern.h (working copy) @@ -5,7 +5,7 @@ /* Load the basic TrueType kerning table. This doesn't handle */ /* kerning data within the GPOS table at the moment. */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttload.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttload.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttload.c (working copy) @@ -5,7 +5,7 @@ /* Load the basic TrueType tables, i.e., tables that can be either in */ /* TTF or OTF fonts (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -808,7 +808,6 @@ FT_Memory memory = stream->memory; FT_ULong table_pos, table_len; FT_ULong storage_start, storage_limit; - FT_UInt count; TT_NameTable table; static const FT_Frame_Field name_table_fields[] = @@ -826,7 +825,7 @@ static const FT_Frame_Field name_record_fields[] = { #undef FT_STRUCTURE -#define FT_STRUCTURE TT_NameEntryRec +#define FT_STRUCTURE TT_NameRec /* no FT_FRAME_START */ FT_FRAME_USHORT( platformID ), @@ -838,7 +837,18 @@ FT_FRAME_END }; + static const FT_Frame_Field langTag_record_fields[] = + { +#undef FT_STRUCTURE +#define FT_STRUCTURE TT_LangTagRec + /* no FT_FRAME_START */ + FT_FRAME_USHORT( stringLength ), + FT_FRAME_USHORT( stringOffset ), + FT_FRAME_END + }; + + table = &face->name_table; table->stream = stream; @@ -848,18 +858,17 @@ table_pos = FT_STREAM_POS(); - if ( FT_STREAM_READ_FIELDS( name_table_fields, table ) ) goto Exit; - /* Some popular Asian fonts have an invalid `storageOffset' value */ - /* (it should be at least "6 + 12*num_names"). However, the string */ - /* offsets, computed as "storageOffset + entry->stringOffset", are */ - /* valid pointers within the name table... */ - /* */ - /* We thus can't check `storageOffset' right now. */ - /* */ - storage_start = table_pos + 6 + 12*table->numNameRecords; + /* Some popular Asian fonts have an invalid `storageOffset' value (it */ + /* should be at least `6 + 12*numNameRecords'). However, the string */ + /* offsets, computed as `storageOffset + entry->stringOffset', are */ + /* valid pointers within the name table... */ + /* */ + /* We thus can't check `storageOffset' right now. */ + /* */ + storage_start = table_pos + 6 + 12 * table->numNameRecords; storage_limit = table_pos + table_len; if ( storage_start > storage_limit ) @@ -869,18 +878,56 @@ goto Exit; } - /* Allocate the array of name records. */ - count = table->numNameRecords; - table->numNameRecords = 0; + /* `name' format 1 contains additional language tag records, */ + /* which we load first */ + if ( table->format == 1 ) + { + if ( FT_STREAM_SEEK( storage_start ) || + FT_READ_USHORT( table->numLangTagRecords ) ) + goto Exit; - if ( FT_NEW_ARRAY( table->names, count ) || - FT_FRAME_ENTER( count * 12 ) ) + storage_start += 2 + 4 * table->numLangTagRecords; + + /* allocate language tag records array */ + if ( FT_NEW_ARRAY( table->langTags, table->numLangTagRecords ) || + FT_FRAME_ENTER( table->numLangTagRecords * 4 ) ) + goto Exit; + + /* load language tags */ + { + TT_LangTag entry = table->langTags; + TT_LangTag limit = entry + table->numLangTagRecords; + + + for ( ; entry < limit; entry++ ) + { + (void)FT_STREAM_READ_FIELDS( langTag_record_fields, entry ); + + /* check that the langTag string is within the table */ + entry->stringOffset += table_pos + table->storageOffset; + if ( entry->stringOffset < storage_start || + entry->stringOffset + entry->stringLength > storage_limit ) + { + /* invalid entry; ignore it */ + entry->stringLength = 0; + } + } + } + + FT_FRAME_EXIT(); + + (void)FT_STREAM_SEEK( table_pos + 6 ); + } + + /* allocate name records array */ + if ( FT_NEW_ARRAY( table->names, table->numNameRecords ) || + FT_FRAME_ENTER( table->numNameRecords * 12 ) ) goto Exit; - /* Load the name records and determine how much storage is needed */ - /* to hold the strings themselves. */ + /* load name records */ { - TT_NameEntryRec* entry = table->names; + TT_Name entry = table->names; + FT_UInt count = table->numNameRecords; for ( ; count > 0; count-- ) @@ -897,22 +944,37 @@ if ( entry->stringOffset < storage_start || entry->stringOffset + entry->stringLength > storage_limit ) { - /* invalid entry - ignore it */ - entry->stringOffset = 0; - entry->stringLength = 0; + /* invalid entry; ignore it */ continue; } + /* assure that we have a valid language tag ID, and */ + /* that the corresponding langTag entry is valid, too */ + if ( table->format == 1 && entry->languageID >= 0x8000U ) + { + if ( entry->languageID - 0x8000U >= table->numLangTagRecords || + !table->langTags[entry->languageID - 0x8000U].stringLength ) + { + /* invalid entry; ignore it */ + continue; + } + } + entry++; } - table->numNameRecords = (FT_UInt)( entry - table->names ); + /* reduce array size to the actually used elements */ + count = (FT_UInt)( entry - table->names ); + (void)FT_RENEW_ARRAY( table->names, + table->numNameRecords, + count ); + table->numNameRecords = count; } FT_FRAME_EXIT(); /* everything went well, update face->num_names */ - face->num_names = (FT_UShort) table->numNameRecords; + face->num_names = (FT_UShort)table->numNameRecords; Exit: return error; @@ -922,7 +984,7 @@ /*************************************************************************/ /* */ /* <Function> */ - /* tt_face_free_names */ + /* tt_face_free_name */ /* */ /* <Description> */ /* Frees the name records. */ @@ -935,25 +997,36 @@ { FT_Memory memory = face->root.driver->root.memory; TT_NameTable table = &face->name_table; - TT_NameEntry entry = table->names; - FT_UInt count = table->numNameRecords; if ( table->names ) { - for ( ; count > 0; count--, entry++ ) - { + TT_Name entry = table->names; + TT_Name limit = entry + table->numNameRecords; + + + for ( ; entry < limit; entry++ ) FT_FREE( entry->string ); - entry->stringLength = 0; - } - /* free strings table */ FT_FREE( table->names ); } - table->numNameRecords = 0; - table->format = 0; - table->storageOffset = 0; + if ( table->langTags ) + { + TT_LangTag entry = table->langTags; + TT_LangTag limit = entry + table->numLangTagRecords; + + + for ( ; entry < limit; entry++ ) + FT_FREE( entry->string ); + + FT_FREE( table->langTags ); + } + + table->numNameRecords = 0; + table->numLangTagRecords = 0; + table->format = 0; + table->storageOffset = 0; } Index: reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttload.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttload.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttload.h (working copy) @@ -5,7 +5,7 @@ /* Load the basic TrueType tables, i.e., tables that can be either in */ /* TTF or OTF fonts (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttmtx.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttmtx.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttmtx.c (working copy) @@ -4,7 +4,7 @@ /* */ /* Load the metrics tables common to TTF and OTF fonts (body). */ /* */ -/* Copyright 2006-2016 by */ +/* Copyright 2006-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -30,6 +30,14 @@ #include "sferrors.h" + /* IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should */ + /* be identical except for the names of their fields, */ + /* which are different. */ + /* */ + /* This ensures that `tt_face_load_hmtx' is able to read */ + /* both the horizontal and vertical headers. */ + + /*************************************************************************/ /* */ /* The macro FT_COMPONENT is used in trace mode. It is an implicit */ Index: reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttmtx.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttmtx.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttmtx.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Load the metrics tables common to TTF and OTF fonts (specification). */ /* */ -/* Copyright 2006-2016 by */ +/* Copyright 2006-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttpost.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttpost.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttpost.c (working copy) @@ -5,7 +5,7 @@ /* PostScript name table processing for TrueType and OpenType fonts */ /* (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -29,6 +29,10 @@ #include FT_INTERNAL_DEBUG_H #include FT_INTERNAL_STREAM_H #include FT_TRUETYPE_TAGS_H + + +#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES + #include "ttpost.h" #include "sferrors.h" @@ -561,5 +565,12 @@ return FT_Err_Ok; } +#else /* !TT_CONFIG_OPTION_POSTSCRIPT_NAMES */ + /* ANSI C doesn't like empty source files */ + typedef int _tt_post_dummy; + +#endif /* !TT_CONFIG_OPTION_POSTSCRIPT_NAMES */ + + /* END */ Index: reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttpost.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttpost.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttpost.h (working copy) @@ -5,7 +5,7 @@ /* PostScript name table processing for TrueType and OpenType fonts */ /* (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttsbit.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttsbit.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttsbit.c (working copy) @@ -4,7 +4,7 @@ /* */ /* TrueType and OpenType embedded bitmap support (body). */ /* */ -/* Copyright 2005-2016 by */ +/* Copyright 2005-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* Copyright 2013 by Google, Inc. */ @@ -24,6 +24,10 @@ #include FT_INTERNAL_STREAM_H #include FT_TRUETYPE_TAGS_H #include FT_BITMAP_H + + +#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS + #include "ttsbit.h" #include "sferrors.h" @@ -1460,6 +1464,9 @@ FT_Byte* p; FT_UNUSED( map ); +#ifndef FT_CONFIG_OPTION_USE_PNG + FT_UNUSED( metrics_only ); +#endif strike_index = face->sbit_strike_map[strike_index]; @@ -1647,5 +1654,12 @@ return error; } +#else /* !TT_CONFIG_OPTION_EMBEDDED_BITMAPS */ -/* EOF */ + /* ANSI C doesn't like empty source files */ + typedef int _tt_sbit_dummy; + +#endif /* !TT_CONFIG_OPTION_EMBEDDED_BITMAPS */ + + +/* END */ Index: reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttsbit.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttsbit.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/sfnt/ttsbit.h (working copy) @@ -4,7 +4,7 @@ /* */ /* TrueType and OpenType embedded bitmap support (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/smooth/ftgrays.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/smooth/ftgrays.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/smooth/ftgrays.c (working copy) @@ -4,7 +4,7 @@ /* */ /* A new `perfect' anti-aliasing renderer (body). */ /* */ -/* Copyright 2000-2016 by */ +/* Copyright 2000-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -341,7 +341,8 @@ /* Compute `dividend / divisor' and return both its quotient and */ /* remainder, cast to a specific type. This macro also ensures that */ - /* the remainder is always positive. */ + /* the remainder is always positive. We use the remainder to keep */ + /* track of accumulating errors and compensate for them. */ #define FT_DIV_MOD( type, dividend, divisor, quotient, remainder ) \ FT_BEGIN_STMNT \ (quotient) = (type)( (dividend) / (divisor) ); \ @@ -567,9 +568,6 @@ /* Note that if a cell is to the left of the clipping region, it is */ /* actually set to the (min_ex-1) horizontal position. */ - /* All cells that are on the left of the clipping region go to the */ - /* min_ex - 1 horizontal position. */ - if ( ex < ras.min_ex ) ex = ras.min_ex - 1; @@ -600,7 +598,7 @@ TPos x2, TCoord y2 ) { - TCoord ex1, ex2, fx1, fx2, first, delta, mod; + TCoord ex1, ex2, fx1, fx2, first, dy, delta, mod; TPos p, dx; int incr; @@ -617,31 +615,27 @@ fx1 = (TCoord)( x1 - SUBPIXELS( ex1 ) ); fx2 = (TCoord)( x2 - SUBPIXELS( ex2 ) ); - delta = y2 - y1; /* everything is located in a single cell. That is easy! */ /* */ if ( ex1 == ex2 ) - { - ras.area += (TArea)(( fx1 + fx2 ) * delta); - ras.cover += delta; - return; - } + goto End; /* ok, we'll have to render a run of adjacent cells on the same */ /* scanline... */ /* */ dx = x2 - x1; + dy = y2 - y1; if ( dx > 0 ) { - p = ( ONE_PIXEL - fx1 ) * delta; + p = ( ONE_PIXEL - fx1 ) * dy; first = ONE_PIXEL; incr = 1; } else { - p = fx1 * delta; + p = fx1 * dy; first = 0; incr = -1; dx = -dx; @@ -649,12 +643,11 @@ FT_DIV_MOD( TCoord, p, dx, delta, mod ); - ras.area += (TArea)(( fx1 + first ) * delta); + ras.area += (TArea)( ( fx1 + first ) * delta ); ras.cover += delta; - - ex1 += incr; + y1 += delta; + ex1 += incr; gray_set_cell( RAS_VAR_ ex1, ey ); - y1 += delta; if ( ex1 != ex2 ) { @@ -661,22 +654,20 @@ TCoord lift, rem; - p = ONE_PIXEL * ( y2 - y1 + delta ); + p = ONE_PIXEL * dy; FT_DIV_MOD( TCoord, p, dx, lift, rem ); - mod -= (int)dx; - do { delta = lift; mod += rem; - if ( mod >= 0 ) + if ( mod >= (TCoord)dx ) { mod -= (TCoord)dx; delta++; } - ras.area += (TArea)(ONE_PIXEL * delta); + ras.area += (TArea)( ONE_PIXEL * delta ); ras.cover += delta; y1 += delta; ex1 += incr; @@ -684,9 +675,13 @@ } while ( ex1 != ex2 ); } - delta = y2 - y1; - ras.area += (TArea)(( fx2 + ONE_PIXEL - first ) * delta); - ras.cover += delta; + fx1 = ONE_PIXEL - first; + + End: + dy = y2 - y1; + + ras.area += (TArea)( ( fx1 + fx2 ) * dy ); + ras.cover += dy; } @@ -798,13 +793,12 @@ p = ONE_PIXEL * dx; FT_DIV_MOD( TCoord, p, dy, lift, rem ); - mod -= (TCoord)dy; do { delta = lift; mod += rem; - if ( mod >= 0 ) + if ( mod >= (TCoord)dy ) { mod -= (TCoord)dy; delta++; @@ -1228,31 +1222,21 @@ static void gray_hline( RAS_ARG_ TCoord x, TCoord y, - TArea area, + TArea coverage, TCoord acount ) { - int coverage; - FT_Span span; - - - /* compute the coverage line's coverage, depending on the */ - /* outline fill rule */ - /* */ - /* the coverage percentage is area/(PIXEL_BITS*PIXEL_BITS*2) */ - /* */ - coverage = (int)( area >> ( PIXEL_BITS * 2 + 1 - 8 ) ); - /* use range 0..256 */ + /* scale the coverage from 0..(ONE_PIXEL*ONE_PIXEL*2) to 0..256 */ + coverage >>= PIXEL_BITS * 2 + 1 - 8; if ( coverage < 0 ) - coverage = -coverage; + coverage = -coverage - 1; + /* compute the line's coverage depending on the outline fill rule */ if ( ras.outline.flags & FT_OUTLINE_EVEN_ODD_FILL ) { coverage &= 511; - if ( coverage > 256 ) - coverage = 512 - coverage; - else if ( coverage == 256 ) - coverage = 255; + if ( coverage >= 256 ) + coverage = 511 - coverage; } else { @@ -1263,6 +1247,9 @@ if ( ras.render_span ) /* for FT_RASTER_FLAG_DIRECT only */ { + FT_Span span; + + span.x = (short)x; span.len = (unsigned short)acount; span.coverage = (unsigned char)coverage; @@ -1307,21 +1294,18 @@ for ( y = ras.min_ey; y < ras.max_ey; y++ ) { PCell cell = ras.ycells[y - ras.min_ey]; - TCoord cover = 0; TCoord x = ras.min_ex; + TArea cover = 0; + TArea area; for ( ; cell != NULL; cell = cell->next ) { - TArea area; - - if ( cover != 0 && cell->x > x ) - gray_hline( RAS_VAR_ x, y, (TArea)cover * ( ONE_PIXEL * 2 ), - cell->x - x ); + gray_hline( RAS_VAR_ x, y, cover, cell->x - x ); - cover += cell->cover; - area = (TArea)cover * ( ONE_PIXEL * 2 ) - cell->area; + cover += (TArea)cell->cover * ( ONE_PIXEL * 2 ); + area = cover - cell->area; if ( area != 0 && cell->x >= ras.min_ex ) gray_hline( RAS_VAR_ cell->x, y, area, 1 ); @@ -1330,8 +1314,7 @@ } if ( cover != 0 ) - gray_hline( RAS_VAR_ x, y, (TArea)cover * ( ONE_PIXEL * 2 ), - ras.max_ex - x ); + gray_hline( RAS_VAR_ x, y, cover, ras.max_ex - x ); } FT_TRACE7(( "gray_sweep: end\n" )); @@ -1613,7 +1596,7 @@ return 0; Exit: - FT_TRACE5(( "FT_Outline_Decompose: Error %d\n", error )); + FT_TRACE5(( "FT_Outline_Decompose: Error 0x%x\n", error )); return error; Invalid_Outline: Index: reactos/sdk/lib/3rdparty/freetype/src/smooth/ftgrays.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/smooth/ftgrays.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/smooth/ftgrays.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType smooth renderer declaration */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/smooth/ftsmerrs.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/smooth/ftsmerrs.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/smooth/ftsmerrs.h (working copy) @@ -4,7 +4,7 @@ /* */ /* smooth renderer error codes (specification only). */ /* */ -/* Copyright 2001-2016 by */ +/* Copyright 2001-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/smooth/ftsmooth.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/smooth/ftsmooth.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/smooth/ftsmooth.c (working copy) @@ -4,7 +4,7 @@ /* */ /* Anti-aliasing renderer interface (body). */ /* */ -/* Copyright 2000-2016 by */ +/* Copyright 2000-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -122,7 +122,61 @@ FT_Bool have_outline_shifted = FALSE; FT_Bool have_buffer = FALSE; +#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING + FT_Int lcd_extra = 0; + FT_LcdFiveTapFilter lcd_weights = { 0 }; + FT_Bool have_custom_weight = FALSE; + FT_Bitmap_LcdFilterFunc lcd_filter_func = NULL; + + + if ( slot->face ) + { + FT_Char i; + + + for ( i = 0; i < FT_LCD_FILTER_FIVE_TAPS; i++ ) + if ( slot->face->internal->lcd_weights[i] != 0 ) + { + have_custom_weight = TRUE; + break; + } + } + + /* + * The LCD filter can be set library-wide and per-face. Face overrides + * library. If the face filter weights are all zero (the default), it + * means that the library default should be used. + */ + if ( have_custom_weight ) + { + /* + * A per-font filter is set. It always uses the default 5-tap + * in-place FIR filter that needs 2 extra pixels. + */ + ft_memcpy( lcd_weights, + slot->face->internal->lcd_weights, + FT_LCD_FILTER_FIVE_TAPS ); + lcd_filter_func = ft_lcd_filter_fir; + lcd_extra = 2; + } + else + { + /* + * The face's lcd_weights is {0, 0, 0, 0, 0}, meaning `use library + * default'. If the library is set to use no LCD filtering + * (lcd_filter_func == NULL), `lcd_filter_func' here is also set to + * NULL and the tests further below pass over the filtering process. + */ + ft_memcpy( lcd_weights, + slot->library->lcd_weights, + FT_LCD_FILTER_FIVE_TAPS ); + lcd_filter_func = slot->library->lcd_filter_func; + lcd_extra = slot->library->lcd_extra; + } + +#endif /*FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ + /* check glyph image format */ if ( slot->format != render->glyph_format ) { @@ -177,28 +231,23 @@ height *= 3; #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING - - if ( slot->library->lcd_filter_func ) + if ( lcd_filter_func ) { - FT_Int extra = slot->library->lcd_extra; - - if ( hmul ) { - x_shift += 64 * ( extra >> 1 ); - x_left -= extra >> 1; - width += 3 * extra; + x_shift += 64 * ( lcd_extra >> 1 ); + x_left -= lcd_extra >> 1; + width += 3 * lcd_extra; pitch = FT_PAD_CEIL( width, 4 ); } if ( vmul ) { - y_shift += 64 * ( extra >> 1 ); - y_top += extra >> 1; - height += 3 * extra; + y_shift += 64 * ( lcd_extra >> 1 ); + y_top += lcd_extra >> 1; + height += 3 * lcd_extra; } } - #endif /* @@ -299,8 +348,8 @@ if ( error ) goto Exit; - if ( slot->library->lcd_filter_func ) - slot->library->lcd_filter_func( bitmap, mode, slot->library ); + if ( lcd_filter_func ) + lcd_filter_func( bitmap, mode, lcd_weights ); #else /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ Index: reactos/sdk/lib/3rdparty/freetype/src/smooth/ftsmooth.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/smooth/ftsmooth.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/smooth/ftsmooth.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Anti-aliasing renderer interface (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -27,20 +27,13 @@ FT_BEGIN_HEADER -#ifndef FT_CONFIG_OPTION_NO_STD_RASTER - FT_DECLARE_RENDERER( ft_std_renderer_class ) -#endif - -#ifndef FT_CONFIG_OPTION_NO_SMOOTH_RASTER FT_DECLARE_RENDERER( ft_smooth_renderer_class ) FT_DECLARE_RENDERER( ft_smooth_lcd_renderer_class ) - FT_DECLARE_RENDERER( ft_smooth_lcd_v_renderer_class ) -#endif + FT_DECLARE_RENDERER( ft_smooth_lcdv_renderer_class ) - FT_END_HEADER #endif /* FTSMOOTH_H_ */ Index: reactos/sdk/lib/3rdparty/freetype/src/smooth/ftspic.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/smooth/ftspic.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/smooth/ftspic.c (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for smooth module. */ /* */ -/* Copyright 2009-2016 by */ +/* Copyright 2009-2017 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/smooth/ftspic.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/smooth/ftspic.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/smooth/ftspic.h (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for smooth module. */ /* */ -/* Copyright 2009-2016 by */ +/* Copyright 2009-2017 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/smooth/smooth.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/smooth/smooth.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/smooth/smooth.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType anti-aliasing rasterer module component (body only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -17,11 +17,11 @@ #define FT_MAKE_OPTION_SINGLE_OBJECT +#include <ft2build.h> -#include <ft2build.h> -#include "ftspic.c" #include "ftgrays.c" #include "ftsmooth.c" +#include "ftspic.c" /* END */ Index: reactos/sdk/lib/3rdparty/freetype/src/tools/afblue.pl =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/tools/afblue.pl (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/tools/afblue.pl (working copy) @@ -5,7 +5,7 @@ # # Process a blue zone character data file. # -# Copyright 2013-2016 by +# Copyright 2013-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, Index: reactos/sdk/lib/3rdparty/freetype/src/tools/docmaker/content.py =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/tools/docmaker/content.py (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/tools/docmaker/content.py (working copy) @@ -3,7 +3,7 @@ # # Parse comment blocks to build content blocks (library file). # -# Copyright 2002-2016 by +# Copyright 2002-2017 by # David Turner. # # This file is part of the FreeType project, and may only be used, Index: reactos/sdk/lib/3rdparty/freetype/src/tools/docmaker/docmaker.py =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/tools/docmaker/docmaker.py (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/tools/docmaker/docmaker.py (working copy) @@ -4,7 +4,7 @@ # # Convert source code markup to HTML documentation. # -# Copyright 2002-2016 by +# Copyright 2002-2017 by # David Turner. # # This file is part of the FreeType project, and may only be used, Index: reactos/sdk/lib/3rdparty/freetype/src/tools/docmaker/formatter.py =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/tools/docmaker/formatter.py (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/tools/docmaker/formatter.py (working copy) @@ -3,7 +3,7 @@ # # Convert parsed content blocks to a structured document (library file). # -# Copyright 2002-2016 by +# Copyright 2002-2017 by # David Turner. # # This file is part of the FreeType project, and may only be used, Index: reactos/sdk/lib/3rdparty/freetype/src/tools/docmaker/sources.py =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/tools/docmaker/sources.py (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/tools/docmaker/sources.py (working copy) @@ -3,7 +3,7 @@ # # Convert source code comments to multi-line blocks (library file). # -# Copyright 2002-2016 by +# Copyright 2002-2017 by # David Turner. # # This file is part of the FreeType project, and may only be used, Index: reactos/sdk/lib/3rdparty/freetype/src/tools/docmaker/tohtml.py =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/tools/docmaker/tohtml.py (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/tools/docmaker/tohtml.py (working copy) @@ -3,7 +3,7 @@ # # A sub-class container of the `Formatter' class to produce HTML. # -# Copyright 2002-2016 by +# Copyright 2002-2017 by # David Turner. # # This file is part of the FreeType project, and may only be used, Index: reactos/sdk/lib/3rdparty/freetype/src/tools/docmaker/utils.py =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/tools/docmaker/utils.py (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/tools/docmaker/utils.py (working copy) @@ -3,7 +3,7 @@ # # Auxiliary functions for the `docmaker' tool (library file). # -# Copyright 2002-2016 by +# Copyright 2002-2017 by # David Turner. # # This file is part of the FreeType project, and may only be used, Index: reactos/sdk/lib/3rdparty/freetype/src/tools/glnames.py =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/tools/glnames.py (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/tools/glnames.py (working copy) @@ -6,7 +6,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -5318,7 +5318,7 @@ write( "/* */\n" ) write( "/* PostScript glyph names. */\n" ) write( "/* */\n" ) - write( "/* Copyright 2005-2016 by */\n" ) + write( "/* Copyright 2005-2017 by */\n" ) write( "/* David Turner, Robert Wilhelm, and Werner Lemberg. */\n" ) write( "/* */\n" ) write( "/* This file is part of the FreeType project, and may only be used, */\n" ) @@ -5378,6 +5378,7 @@ # write the lookup routine now # write( """\ +#ifdef DEFINE_PS_TABLES /* * This function searches the compressed table efficiently. */ @@ -5472,6 +5473,7 @@ NotFound: return 0; } +#endif /* DEFINE_PS_TABLES */ #endif /* FT_CONFIG_OPTION_ADOBE_GLYPH_LIST */ Index: reactos/sdk/lib/3rdparty/freetype/src/truetype/truetype.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/truetype/truetype.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/truetype/truetype.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType TrueType driver component (body only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -17,22 +17,16 @@ #define FT_MAKE_OPTION_SINGLE_OBJECT +#include <ft2build.h> -#include <ft2build.h> -#include "ttpic.c" #include "ttdriver.c" /* driver interface */ -#include "ttpload.c" /* tables loader */ #include "ttgload.c" /* glyph loader */ +#include "ttgxvar.c" /* gx distortable font */ +#include "ttinterp.c" #include "ttobjs.c" /* object manager */ - -#ifdef TT_USE_BYTECODE_INTERPRETER -#include "ttinterp.c" +#include "ttpic.c" +#include "ttpload.c" /* tables loader */ #include "ttsubpix.c" -#endif -#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT -#include "ttgxvar.c" /* gx distortable font */ -#endif - /* END */ Index: reactos/sdk/lib/3rdparty/freetype/src/truetype/ttdriver.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/truetype/ttdriver.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/truetype/ttdriver.c (working copy) @@ -4,7 +4,7 @@ /* */ /* TrueType font driver implementation (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -304,15 +304,17 @@ /* use the scaled metrics, even when tt_size_reset fails */ FT_Select_Metrics( size->face, strike_index ); - tt_size_reset( ttsize ); /* ignore return value */ + tt_size_reset( ttsize, 0 ); /* ignore return value */ } else { - SFNT_Service sfnt = (SFNT_Service)ttface->sfnt; - FT_Size_Metrics* metrics = &size->metrics; + SFNT_Service sfnt = (SFNT_Service)ttface->sfnt; + FT_Size_Metrics* size_metrics = &size->metrics; - error = sfnt->load_strike_metrics( ttface, strike_index, metrics ); + error = sfnt->load_strike_metrics( ttface, + strike_index, + size_metrics ); if ( error ) ttsize->strike_index = 0xFFFFFFFFUL; } @@ -354,15 +356,16 @@ if ( FT_IS_SCALABLE( size->face ) ) { - error = tt_size_reset( ttsize ); - ttsize->root.metrics = ttsize->metrics; + error = tt_size_reset( ttsize, 0 ); #ifdef TT_USE_BYTECODE_INTERPRETER /* for the `MPS' bytecode instruction we need the point size */ + if ( !error ) { - FT_UInt resolution = ttsize->metrics.x_ppem > ttsize->metrics.y_ppem - ? req->horiResolution - : req->vertResolution; + FT_UInt resolution = + ttsize->metrics->x_ppem > ttsize->metrics->y_ppem + ? req->horiResolution + : req->vertResolution; /* if we don't have a resolution value, assume 72dpi */ @@ -456,6 +459,11 @@ load_flags |= FT_LOAD_NO_HINTING; } + /* use hinted metrics only if we load a glyph with hinting */ + size->metrics = ( load_flags & FT_LOAD_NO_HINTING ) + ? &ttsize->metrics + : &size->hinted_metrics; + /* now load the glyph outline if necessary */ error = TT_Load_Glyph( size, slot, glyph_index, load_flags ); @@ -502,12 +510,12 @@ (FT_LSB_Adjust_Func) NULL, /* lsb_adjust */ (FT_RSB_Adjust_Func) NULL, /* rsb_adjust */ - (FT_VAdvance_Adjust_Func)NULL, /* vadvance_adjust */ + (FT_VAdvance_Adjust_Func)tt_vadvance_adjust, /* vadvance_adjust */ (FT_TSB_Adjust_Func) NULL, /* tsb_adjust */ (FT_BSB_Adjust_Func) NULL, /* bsb_adjust */ (FT_VOrg_Adjust_Func) NULL, /* vorg_adjust */ - (FT_Metrics_Adjust_Func) NULL /* metrics_adjust */ + (FT_Metrics_Adjust_Func) tt_apply_mvar /* metrics_adjust */ ) #endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */ Index: reactos/sdk/lib/3rdparty/freetype/src/truetype/ttdriver.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/truetype/ttdriver.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/truetype/ttdriver.h (working copy) @@ -4,7 +4,7 @@ /* */ /* High-level TrueType driver interface (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/truetype/tterrors.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/truetype/tterrors.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/truetype/tterrors.h (working copy) @@ -4,7 +4,7 @@ /* */ /* TrueType error codes (specification only). */ /* */ -/* Copyright 2001-2016 by */ +/* Copyright 2001-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/truetype/ttgload.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/truetype/ttgload.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/truetype/ttgload.c (working copy) @@ -4,7 +4,7 @@ /* */ /* TrueType Glyph Loader (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -18,6 +18,7 @@ #include <ft2build.h> #include FT_INTERNAL_DEBUG_H +#include FT_CONFIG_CONFIG_H #include FT_INTERNAL_CALC_H #include FT_INTERNAL_STREAM_H #include FT_INTERNAL_SFNT_H @@ -162,7 +163,7 @@ /* This may not be the right place for this, but it works... */ /* Note that we have to unconditionally load the tweaks since */ /* it is possible that glyphs individually switch ClearType's */ - /* backwards compatibility mode on and off. */ + /* backward compatibility mode on and off. */ sph_set_tweaks( loader, glyph_index ); } #endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */ @@ -194,39 +195,39 @@ if ( face->root.internal->incremental_interface && face->root.internal->incremental_interface->funcs->get_glyph_metrics ) { - FT_Incremental_MetricsRec metrics; + FT_Incremental_MetricsRec incr_metrics; FT_Error error; - metrics.bearing_x = loader->left_bearing; - metrics.bearing_y = 0; - metrics.advance = loader->advance; - metrics.advance_v = 0; + incr_metrics.bearing_x = loader->left_bearing; + incr_metrics.bearing_y = 0; + incr_metrics.advance = loader->advance; + incr_metrics.advance_v = 0; error = face->root.internal->incremental_interface->funcs->get_glyph_metrics( face->root.internal->incremental_interface->object, - glyph_index, FALSE, &metrics ); + glyph_index, FALSE, &incr_metrics ); if ( error ) goto Exit; - left_bearing = (FT_Short)metrics.bearing_x; - advance_width = (FT_UShort)metrics.advance; + left_bearing = (FT_Short)incr_metrics.bearing_x; + advance_width = (FT_UShort)incr_metrics.advance; #if 0 /* GWW: Do I do the same for vertical metrics? */ - metrics.bearing_x = 0; - metrics.bearing_y = loader->top_bearing; - metrics.advance = loader->vadvance; + incr_metrics.bearing_x = 0; + incr_metrics.bearing_y = loader->top_bearing; + incr_metrics.advance = loader->vadvance; error = face->root.internal->incremental_interface->funcs->get_glyph_metrics( face->root.internal->incremental_interface->object, - glyph_index, TRUE, &metrics ); + glyph_index, TRUE, &incr_metrics ); if ( error ) goto Exit; - top_bearing = (FT_Short)metrics.bearing_y; - advance_height = (FT_UShort)metrics.advance; + top_bearing = (FT_Short)incr_metrics.bearing_y; + advance_height = (FT_UShort)incr_metrics.advance; #endif /* 0 */ @@ -332,7 +333,6 @@ FT_Outline* outline; FT_UShort n_ins; FT_Int n_points; - FT_ULong tmp; FT_Byte *flag, *flag_limit; FT_Byte c, count; @@ -398,18 +398,21 @@ FT_TRACE5(( " Instructions size: %u\n", n_ins )); - /* check it */ - if ( ( limit - p ) < n_ins ) - { - FT_TRACE0(( "TT_Load_Simple_Glyph: instruction count mismatch\n" )); - error = FT_THROW( Too_Many_Hints ); - goto Fail; - } - #ifdef TT_USE_BYTECODE_INTERPRETER if ( IS_HINTED( load->load_flags ) ) { + FT_ULong tmp; + + + /* check instructions size */ + if ( ( limit - p ) < n_ins ) + { + FT_TRACE1(( "TT_Load_Simple_Glyph: instruction count mismatch\n" )); + error = FT_THROW( Too_Many_Hints ); + goto Fail; + } + /* we don't trust `maxSizeOfInstructions' in the `maxp' table */ /* and thus update the bytecode array size by ourselves */ @@ -775,8 +778,8 @@ } else { - loader->exec->metrics.x_scale = loader->size->metrics.x_scale; - loader->exec->metrics.y_scale = loader->size->metrics.y_scale; + loader->exec->metrics.x_scale = loader->size->metrics->x_scale; + loader->exec->metrics.y_scale = loader->size->metrics->y_scale; } #endif @@ -818,11 +821,11 @@ #endif #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL - /* Save possibly modified glyph phantom points unless in v40 backwards */ + /* Save possibly modified glyph phantom points unless in v40 backward */ /* compatibility mode, where no movement on the x axis means no reason */ /* to change bearings or advance widths. */ if ( !( driver->interpreter_version == TT_INTERPRETER_VERSION_40 && - !loader->exec->backwards_compatibility ) ) + !loader->exec->backward_compatibility ) ) { #endif loader->pp1 = zone->cur[zone->n_points - 4]; @@ -886,7 +889,7 @@ #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT - if ( loader->face->doblend && !loader->face->is_default_instance ) + if ( !loader->face->is_default_instance ) { /* Deltas apply to the unscaled data. */ error = TT_Vary_Apply_Glyph_Deltas( loader->face, @@ -923,7 +926,7 @@ TT_Driver driver = (TT_Driver)FT_FACE_DRIVER( face ); FT_String* family = face->root.family_name; - FT_UInt ppem = loader->size->metrics.x_ppem; + FT_UInt ppem = loader->size->metrics->x_ppem; FT_String* style = face->root.style_name; FT_UInt x_scale_factor = 1000; #endif @@ -952,9 +955,9 @@ if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 || x_scale_factor != 1000 ) { - x_scale = FT_MulDiv( loader->size->metrics.x_scale, + x_scale = FT_MulDiv( loader->size->metrics->x_scale, (FT_Long)x_scale_factor, 1000 ); - y_scale = loader->size->metrics.y_scale; + y_scale = loader->size->metrics->y_scale; /* compensate for any scaling by de/emboldening; */ /* the amount was determined via experimentation */ @@ -974,8 +977,8 @@ /* scale the glyph */ if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 ) { - x_scale = loader->size->metrics.x_scale; - y_scale = loader->size->metrics.y_scale; + x_scale = loader->size->metrics->x_scale; + y_scale = loader->size->metrics->y_scale; do_scale = TRUE; } @@ -1133,8 +1136,8 @@ if ( !( loader->load_flags & FT_LOAD_NO_SCALE ) ) { - FT_Fixed x_scale = loader->size->metrics.x_scale; - FT_Fixed y_scale = loader->size->metrics.y_scale; + FT_Fixed x_scale = loader->size->metrics->x_scale; + FT_Fixed y_scale = loader->size->metrics->y_scale; x = FT_MulFix( x, x_scale ); @@ -1392,7 +1395,7 @@ /* a utility function to retrieve i-th node from given FT_List */ static FT_ListNode ft_list_get_node_at( FT_List list, - FT_UInt index ) + FT_UInt idx ) { FT_ListNode cur; @@ -1402,10 +1405,10 @@ for ( cur = list->head; cur; cur = cur->next ) { - if ( !index ) + if ( !idx ) return cur; - index--; + idx--; } return NULL; @@ -1467,8 +1470,8 @@ if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 ) { - x_scale = loader->size->metrics.x_scale; - y_scale = loader->size->metrics.y_scale; + x_scale = loader->size->metrics->x_scale; + y_scale = loader->size->metrics->y_scale; } else { @@ -1574,7 +1577,7 @@ #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT - if ( loader->face->doblend && !loader->face->is_default_instance ) + if ( !loader->face->is_default_instance ) { /* a small outline structure with four elements for */ /* communication with `TT_Vary_Apply_Glyph_Deltas' */ @@ -1709,7 +1712,7 @@ /* check whether we already have a composite glyph with this index */ if ( FT_List_Find( &loader->composites, - (void*)(unsigned long)glyph_index ) ) + FT_UINT_TO_POINTER( glyph_index ) ) ) { FT_TRACE1(( "TT_Load_Composite_Glyph:" " infinite recursion detected\n" )); @@ -1718,13 +1721,13 @@ } else if ( node ) - node->data = (void*)(unsigned long)glyph_index; + node->data = FT_UINT_TO_POINTER( glyph_index ); else { if ( FT_NEW( node ) ) goto Exit; - node->data = (void*)(unsigned long)glyph_index; + node->data = FT_UINT_TO_POINTER( glyph_index ); FT_List_Add( &loader->composites, node ); } @@ -1745,7 +1748,7 @@ #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT - if ( face->doblend && !face->is_default_instance ) + if ( !face->is_default_instance ) { short i, limit; FT_SubGlyph subglyph; @@ -2035,7 +2038,7 @@ y_scale = 0x10000L; if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 ) - y_scale = size->root.metrics.y_scale; + y_scale = size->metrics->y_scale; if ( glyph->format != FT_GLYPH_FORMAT_COMPOSITE ) FT_Outline_Get_CBox( &glyph->outline, &bbox ); @@ -2050,24 +2053,24 @@ glyph->metrics.horiBearingY = bbox.yMax; glyph->metrics.horiAdvance = loader->pp2.x - loader->pp1.x; - /* Adjust advance width to the value contained in the hdmx table */ - /* unless FT_LOAD_COMPUTE_METRICS is set or backwards compatibility */ - /* mode of the v40 interpreter is active. See `ttinterp.h' for */ - /* details on backwards compatibility mode. */ + /* Adjust advance width to the value contained in the hdmx table */ + /* unless FT_LOAD_COMPUTE_METRICS is set or backward compatibility */ + /* mode of the v40 interpreter is active. See `ttinterp.h' for */ + /* details on backward compatibility mode. */ if ( #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL - !( driver->interpreter_version == TT_INTERPRETER_VERSION_40 && - ( loader->exec && loader->exec->backwards_compatibility ) ) && + !( driver->interpreter_version == TT_INTERPRETER_VERSION_40 && + ( loader->exec && loader->exec->backward_compatibility ) ) && #endif - !face->postscript.isFixedPitch && - IS_HINTED( loader->load_flags ) && - !( loader->load_flags & FT_LOAD_COMPUTE_METRICS ) ) + !face->postscript.isFixedPitch && + IS_HINTED( loader->load_flags ) && + !( loader->load_flags & FT_LOAD_COMPUTE_METRICS ) ) { FT_Byte* widthp; widthp = tt_face_get_device_metrics( face, - size->root.metrics.x_ppem, + size->metrics->x_ppem, glyph_index ); #ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY @@ -2149,7 +2152,7 @@ #ifdef FT_CONFIG_OPTION_INCREMENTAL { FT_Incremental_InterfaceRec* incr; - FT_Incremental_MetricsRec metrics; + FT_Incremental_MetricsRec incr_metrics; FT_Error error; @@ -2159,19 +2162,19 @@ /* overriding metrics for this glyph. */ if ( incr && incr->funcs->get_glyph_metrics ) { - metrics.bearing_x = 0; - metrics.bearing_y = top; - metrics.advance = advance; + incr_metrics.bearing_x = 0; + incr_metrics.bearing_y = top; + incr_metrics.advance = advance; error = incr->funcs->get_glyph_metrics( incr->object, glyph_index, TRUE, - &metrics ); + &incr_metrics ); if ( error ) return error; - top = metrics.bearing_y; - advance = metrics.advance; + top = incr_metrics.bearing_y; + advance = incr_metrics.advance; } } @@ -2213,7 +2216,7 @@ SFNT_Service sfnt; FT_Stream stream; FT_Error error; - TT_SBit_MetricsRec metrics; + TT_SBit_MetricsRec sbit_metrics; face = (TT_Face)glyph->face; @@ -2226,34 +2229,34 @@ (FT_UInt)load_flags, stream, &glyph->bitmap, - &metrics ); + &sbit_metrics ); if ( !error ) { glyph->outline.n_points = 0; glyph->outline.n_contours = 0; - glyph->metrics.width = (FT_Pos)metrics.width * 64; - glyph->metrics.height = (FT_Pos)metrics.height * 64; + glyph->metrics.width = (FT_Pos)sbit_metrics.width * 64; + glyph->metrics.height = (FT_Pos)sbit_metrics.height * 64; - glyph->metrics.horiBearingX = (FT_Pos)metrics.horiBearingX * 64; - glyph->metrics.horiBearingY = (FT_Pos)metrics.horiBearingY * 64; - glyph->metrics.horiAdvance = (FT_Pos)metrics.horiAdvance * 64; + glyph->metrics.horiBearingX = (FT_Pos)sbit_metrics.horiBearingX * 64; + glyph->metrics.horiBearingY = (FT_Pos)sbit_metrics.horiBearingY * 64; + glyph->metrics.horiAdvance = (FT_Pos)sbit_metrics.horiAdvance * 64; - glyph->metrics.vertBearingX = (FT_Pos)metrics.vertBearingX * 64; - glyph->metrics.vertBearingY = (FT_Pos)metrics.vertBearingY * 64; - glyph->metrics.vertAdvance = (FT_Pos)metrics.vertAdvance * 64; + glyph->metrics.vertBearingX = (FT_Pos)sbit_metrics.vertBearingX * 64; + glyph->metrics.vertBearingY = (FT_Pos)sbit_metrics.vertBearingY * 64; + glyph->metrics.vertAdvance = (FT_Pos)sbit_metrics.vertAdvance * 64; glyph->format = FT_GLYPH_FORMAT_BITMAP; if ( load_flags & FT_LOAD_VERTICAL_LAYOUT ) { - glyph->bitmap_left = metrics.vertBearingX; - glyph->bitmap_top = metrics.vertBearingY; + glyph->bitmap_left = sbit_metrics.vertBearingX; + glyph->bitmap_top = sbit_metrics.vertBearingY; } else { - glyph->bitmap_left = metrics.horiBearingX; - glyph->bitmap_top = metrics.horiBearingY; + glyph->bitmap_left = sbit_metrics.horiBearingX; + glyph->bitmap_top = sbit_metrics.horiBearingY; } } @@ -2270,17 +2273,17 @@ FT_Int32 load_flags, FT_Bool glyf_table_only ) { - FT_Error error; - TT_Face face; FT_Stream stream; + #ifdef TT_USE_BYTECODE_INTERPRETER + FT_Error error; FT_Bool pedantic = FT_BOOL( load_flags & FT_LOAD_PEDANTIC ); -#endif #if defined TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY || \ defined TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL TT_Driver driver = (TT_Driver)FT_FACE_DRIVER( (TT_Face)glyph->face ); #endif +#endif face = (TT_Face)glyph->face; @@ -2634,11 +2637,11 @@ if ( !glyph->metrics.horiAdvance && glyph->linearHoriAdvance ) glyph->metrics.horiAdvance = FT_MulFix( glyph->linearHoriAdvance, - size->root.metrics.x_scale ); + size->metrics->x_scale ); if ( !glyph->metrics.vertAdvance && glyph->linearVertAdvance ) glyph->metrics.vertAdvance = FT_MulFix( glyph->linearVertAdvance, - size->root.metrics.y_scale ); + size->metrics->y_scale ); } return FT_Err_Ok; @@ -2649,14 +2652,20 @@ /* if FT_LOAD_NO_SCALE is not set, `ttmetrics' must be valid */ if ( !( load_flags & FT_LOAD_NO_SCALE ) && !size->ttmetrics.valid ) - return FT_THROW( Invalid_Size_Handle ); + { + error = FT_THROW( Invalid_Size_Handle ); + goto Exit; + } if ( load_flags & FT_LOAD_SBITS_ONLY ) - return FT_THROW( Invalid_Argument ); + { + error = FT_THROW( Invalid_Argument ); + goto Exit; + } error = tt_loader_init( &loader, size, glyph, load_flags, FALSE ); if ( error ) - return error; + goto Exit; glyph->format = FT_GLYPH_FORMAT_OUTLINE; glyph->num_subglyphs = 0; @@ -2728,9 +2737,16 @@ /* TrueType glyphs at all sizes using the bytecode interpreter. */ /* */ if ( !( load_flags & FT_LOAD_NO_SCALE ) && - size->root.metrics.y_ppem < 24 ) + size->metrics->y_ppem < 24 ) glyph->outline.flags |= FT_OUTLINE_HIGH_PRECISION; + Exit: +#ifdef FT_DEBUG_LEVEL_TRACE + if ( error ) + FT_TRACE1(( " failed (error code 0x%x)\n", + error )); +#endif + return error; } Index: reactos/sdk/lib/3rdparty/freetype/src/truetype/ttgload.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/truetype/ttgload.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/truetype/ttgload.h (working copy) @@ -4,7 +4,7 @@ /* */ /* TrueType Glyph Loader (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/truetype/ttgxvar.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/truetype/ttgxvar.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/truetype/ttgxvar.c (working copy) @@ -4,7 +4,7 @@ /* */ /* TrueType GX Font Variation loader */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* David Turner, Robert Wilhelm, Werner Lemberg, and George Williams. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -22,10 +22,6 @@ /* */ /* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6[fgca]var.html */ /* */ - /* The documentation for `fvar' is inconsistent. At one point it says */ - /* that `countSizePairs' should be 3, at another point 2. It should */ - /* be 2. */ - /* */ /* The documentation for `gvar' is not intelligible; `cvar' refers you */ /* to `gvar' and is thus also incomprehensible. */ /* */ @@ -49,7 +45,9 @@ #include FT_INTERNAL_STREAM_H #include FT_INTERNAL_SFNT_H #include FT_TRUETYPE_TAGS_H +#include FT_TRUETYPE_IDS_H #include FT_MULTIPLE_MASTERS_H +#include FT_LIST_H #include "ttpload.h" #include "ttgxvar.h" @@ -322,7 +320,7 @@ FT_TRACE2(( "AVAR " )); - blend->avar_checked = TRUE; + blend->avar_loaded = TRUE; error = face->goto_table( face, TTAG_avar, stream, &table_len ); if ( error ) { @@ -346,7 +344,7 @@ if ( axisCount != (FT_Long)blend->mmvar->num_axis ) { - FT_TRACE2(( "ft_var_load_avar: number of axes in `avar' and `cvar'\n" + FT_TRACE2(( "ft_var_load_avar: number of axes in `avar' and `fvar'\n" " table are different\n" )); goto Exit; } @@ -396,359 +394,307 @@ /* some macros we need */ #define FT_FIXED_ONE ( (FT_Fixed)0x10000 ) - #define FT_fdot14ToFixed( x ) \ - ( ( (FT_Fixed)( (FT_Int16)(x) ) ) << 2 ) - #define FT_intToFixed( i ) \ - ( (FT_Fixed)( (FT_UInt32)(i) << 16 ) ) + #define FT_fdot14ToFixed( x ) \ + ( (FT_Fixed)( (FT_ULong)(x) << 2 ) ) + #define FT_intToFixed( i ) \ + ( (FT_Fixed)( (FT_ULong)(i) << 16 ) ) #define FT_fixedToInt( x ) \ ( (FT_Short)( ( (FT_UInt32)(x) + 0x8000U ) >> 16 ) ) - /*************************************************************************/ - /* */ - /* <Function> */ - /* ft_var_load_hvar */ - /* */ - /* <Description> */ - /* Parse the `HVAR' table and set `blend->hvar_loaded' to TRUE. */ - /* */ - /* On success, `blend->hvar_checked' is set to TRUE. */ - /* */ - /* Some memory may remain allocated on error; it is always freed in */ - /* `tt_done_blend', however. */ - /* */ - /* <InOut> */ - /* face :: The font face. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. */ - /* */ static FT_Error - ft_var_load_hvar( TT_Face face ) + ft_var_load_item_variation_store( TT_Face face, + FT_ULong offset, + GX_ItemVarStore itemStore ) { FT_Stream stream = FT_FACE_STREAM( face ); FT_Memory memory = stream->memory; - GX_Blend blend = face->blend; - FT_Error error; - FT_UShort majorVersion; - FT_ULong table_len; - FT_ULong table_offset; - FT_ULong store_offset; + FT_UShort format; + FT_ULong region_offset; + FT_UInt i, j, k; + FT_UInt shortDeltaCount; + GX_Blend blend = face->blend; + GX_ItemVarData varData; + FT_ULong* dataOffsetArray = NULL; - blend->hvar_loaded = TRUE; + if ( FT_STREAM_SEEK( offset ) || + FT_READ_USHORT( format ) ) + goto Exit; - FT_TRACE2(( "HVAR " )); - - error = face->goto_table( face, TTAG_HVAR, stream, &table_len ); - if ( error ) + if ( format != 1 ) { - FT_TRACE2(( "is missing\n" )); + FT_TRACE2(( "ft_var_load_item_variation_store: bad store format %d\n", + format )); + error = FT_THROW( Invalid_Table ); goto Exit; } - table_offset = FT_STREAM_POS(); + /* read top level fields */ + if ( FT_READ_ULONG( region_offset ) || + FT_READ_USHORT( itemStore->dataCount ) ) + goto Exit; - /* skip minor version */ - if ( FT_READ_USHORT( majorVersion ) || - FT_STREAM_SKIP( 2 ) ) - goto Exit; - if ( majorVersion != 1 ) + /* we need at least one entry in `itemStore->varData' */ + if ( !itemStore->dataCount ) { - FT_TRACE2(( "bad table version %d\n", majorVersion )); + FT_TRACE2(( "ft_var_load_item_variation_store: missing varData\n" )); error = FT_THROW( Invalid_Table ); goto Exit; } - /* skip map offset */ - if ( FT_READ_ULONG( store_offset ) || - FT_STREAM_SKIP( 4 ) ) + /* make temporary copy of item variation data offsets; */ + /* we will parse region list first, then come back */ + if ( FT_NEW_ARRAY( dataOffsetArray, itemStore->dataCount ) ) goto Exit; - /* parse item variation store */ + for ( i = 0; i < itemStore->dataCount; i++ ) { - FT_UShort format; - FT_ULong region_offset; - FT_UInt i, j, k; - FT_UInt shortDeltaCount; - - GX_HVStore itemStore; - GX_HVarTable hvarTable; - GX_HVarData hvarData; - - - if ( FT_STREAM_SEEK( table_offset + store_offset ) || - FT_READ_USHORT( format ) ) + if ( FT_READ_ULONG( dataOffsetArray[i] ) ) goto Exit; - if ( format != 1 ) - { - FT_TRACE2(( "bad store format %d\n", format )); - error = FT_THROW( Invalid_Table ); - goto Exit; - } + } - if ( FT_NEW( blend->hvar_table ) ) /* allocate table at top level */ - goto Exit; + /* parse array of region records (region list) */ + if ( FT_STREAM_SEEK( offset + region_offset ) ) + goto Exit; - hvarTable = blend->hvar_table; - itemStore = &hvarTable->itemStore; + if ( FT_READ_USHORT( itemStore->axisCount ) || + FT_READ_USHORT( itemStore->regionCount ) ) + goto Exit; - /* read top level fields */ - if ( FT_READ_ULONG( region_offset ) || - FT_READ_USHORT( itemStore->dataCount ) ) - goto Exit; + if ( itemStore->axisCount != (FT_Long)blend->mmvar->num_axis ) + { + FT_TRACE2(( "ft_var_load_item_variation_store:" + " number of axes in item variation store\n" + " " + " and `fvar' table are different\n" )); + error = FT_THROW( Invalid_Table ); + goto Exit; + } - /* make temporary copy of item variation data offsets; */ - /* we will parse region list first, then come back */ - if ( FT_NEW_ARRAY( dataOffsetArray, itemStore->dataCount ) ) - goto Exit; + if ( FT_NEW_ARRAY( itemStore->varRegionList, itemStore->regionCount ) ) + goto Exit; - for ( i = 0; i < itemStore->dataCount; i++ ) - { - if ( FT_READ_ULONG( dataOffsetArray[i] ) ) - goto Exit; - } + for ( i = 0; i < itemStore->regionCount; i++ ) + { + GX_AxisCoords axisCoords; - /* parse array of region records (region list) */ - if ( FT_STREAM_SEEK( table_offset + store_offset + region_offset ) ) - goto Exit; - if ( FT_READ_USHORT( itemStore->axisCount ) || - FT_READ_USHORT( itemStore->regionCount ) ) + if ( FT_NEW_ARRAY( itemStore->varRegionList[i].axisList, + itemStore->axisCount ) ) goto Exit; - if ( FT_NEW_ARRAY( itemStore->varRegionList, itemStore->regionCount ) ) - goto Exit; + axisCoords = itemStore->varRegionList[i].axisList; - for ( i = 0; i < itemStore->regionCount; i++ ) + for ( j = 0; j < itemStore->axisCount; j++ ) { - GX_AxisCoords axisCoords; + FT_Short start, peak, end; - if ( FT_NEW_ARRAY( itemStore->varRegionList[i].axisList, - itemStore->axisCount ) ) + if ( FT_READ_SHORT( start ) || + FT_READ_SHORT( peak ) || + FT_READ_SHORT( end ) ) goto Exit; - axisCoords = itemStore->varRegionList[i].axisList; + axisCoords[j].startCoord = FT_fdot14ToFixed( start ); + axisCoords[j].peakCoord = FT_fdot14ToFixed( peak ); + axisCoords[j].endCoord = FT_fdot14ToFixed( end ); + } + } - for ( j = 0; j < itemStore->axisCount; j++ ) - { - FT_Short start, peak, end; + /* end of region list parse */ + /* use dataOffsetArray now to parse varData items */ + if ( FT_NEW_ARRAY( itemStore->varData, itemStore->dataCount ) ) + goto Exit; - if ( FT_READ_SHORT( start ) || - FT_READ_SHORT( peak ) || - FT_READ_SHORT( end ) ) - goto Exit; + for ( i = 0; i < itemStore->dataCount; i++ ) + { + varData = &itemStore->varData[i]; - axisCoords[j].startCoord = FT_fdot14ToFixed( start ); - axisCoords[j].peakCoord = FT_fdot14ToFixed( peak ); - axisCoords[j].endCoord = FT_fdot14ToFixed( end ); - } - } + if ( FT_STREAM_SEEK( offset + dataOffsetArray[i] ) ) + goto Exit; - /* end of region list parse */ + if ( FT_READ_USHORT( varData->itemCount ) || + FT_READ_USHORT( shortDeltaCount ) || + FT_READ_USHORT( varData->regionIdxCount ) ) + goto Exit; - /* use dataOffsetArray now to parse varData items */ - if ( FT_NEW_ARRAY( itemStore->varData, itemStore->dataCount ) ) + /* check some data consistency */ + if ( shortDeltaCount > varData->regionIdxCount ) + { + FT_TRACE2(( "bad short count %d or region count %d\n", + shortDeltaCount, + varData->regionIdxCount )); + error = FT_THROW( Invalid_Table ); goto Exit; + } - for ( i = 0; i < itemStore->dataCount; i++ ) + if ( varData->regionIdxCount > itemStore->regionCount ) { - hvarData = &itemStore->varData[i]; + FT_TRACE2(( "inconsistent regionCount %d in varData[%d]\n", + varData->regionIdxCount, + i )); + error = FT_THROW( Invalid_Table ); + goto Exit; + } - if ( FT_STREAM_SEEK( table_offset + - store_offset + - dataOffsetArray[i] ) ) - goto Exit; + /* parse region indices */ + if ( FT_NEW_ARRAY( varData->regionIndices, + varData->regionIdxCount ) ) + goto Exit; - if ( FT_READ_USHORT( hvarData->itemCount ) || - FT_READ_USHORT( shortDeltaCount ) || - FT_READ_USHORT( hvarData->regionIdxCount ) ) + for ( j = 0; j < varData->regionIdxCount; j++ ) + { + if ( FT_READ_USHORT( varData->regionIndices[j] ) ) goto Exit; - /* check some data consistency */ - if ( shortDeltaCount > hvarData->regionIdxCount ) + if ( varData->regionIndices[j] >= itemStore->regionCount ) { - FT_TRACE2(( "bad short count %d or region count %d\n", - shortDeltaCount, - hvarData->regionIdxCount )); + FT_TRACE2(( "bad region index %d\n", + varData->regionIndices[j] )); error = FT_THROW( Invalid_Table ); goto Exit; } + } - if ( hvarData->regionIdxCount > itemStore->regionCount ) + /* Parse delta set. */ + /* */ + /* On input, deltas are (shortDeltaCount + regionIdxCount) bytes */ + /* each; on output, deltas are expanded to `regionIdxCount' shorts */ + /* each. */ + if ( FT_NEW_ARRAY( varData->deltaSet, + varData->regionIdxCount * varData->itemCount ) ) + goto Exit; + + /* the delta set is stored as a 2-dimensional array of shorts; */ + /* sign-extend signed bytes to signed shorts */ + for ( j = 0; j < varData->itemCount * varData->regionIdxCount; ) + { + for ( k = 0; k < shortDeltaCount; k++, j++ ) { - FT_TRACE2(( "inconsistent regionCount %d in varData[%d]\n", - hvarData->regionIdxCount, - i )); - error = FT_THROW( Invalid_Table ); - goto Exit; - } + /* read the short deltas */ + FT_Short delta; - /* parse region indices */ - if ( FT_NEW_ARRAY( hvarData->regionIndices, - hvarData->regionIdxCount ) ) - goto Exit; - for ( j = 0; j < hvarData->regionIdxCount; j++ ) - { - if ( FT_READ_USHORT( hvarData->regionIndices[j] ) ) + if ( FT_READ_SHORT( delta ) ) goto Exit; - if ( hvarData->regionIndices[j] >= itemStore->regionCount ) - { - FT_TRACE2(( "bad region index %d\n", - hvarData->regionIndices[j] )); - error = FT_THROW( Invalid_Table ); - goto Exit; - } + varData->deltaSet[j] = delta; } - /* Parse delta set. */ - /* */ - /* On input, deltas are ( shortDeltaCount + regionIdxCount ) bytes */ - /* each; on output, deltas are expanded to `regionIdxCount' shorts */ - /* each. */ - if ( FT_NEW_ARRAY( hvarData->deltaSet, - hvarData->regionIdxCount * hvarData->itemCount ) ) - goto Exit; - - /* the delta set is stored as a 2-dimensional array of shorts; */ - /* sign-extend signed bytes to signed shorts */ - for ( j = 0; j < hvarData->itemCount * hvarData->regionIdxCount; ) + for ( ; k < varData->regionIdxCount; k++, j++ ) { - for ( k = 0; k < shortDeltaCount; k++, j++ ) - { - /* read the short deltas */ - FT_Short delta; + /* read the (signed) byte deltas */ + FT_Char delta; - if ( FT_READ_SHORT( delta ) ) - goto Exit; + if ( FT_READ_CHAR( delta ) ) + goto Exit; - hvarData->deltaSet[j] = delta; - } - - for ( ; k < hvarData->regionIdxCount; k++, j++ ) - { - /* read the (signed) byte deltas */ - FT_Char delta; - - - if ( FT_READ_CHAR( delta ) ) - goto Exit; - - hvarData->deltaSet[j] = delta; - } + varData->deltaSet[j] = delta; } } } - /* end parse item variation store */ + Exit: + FT_FREE( dataOffsetArray ); - /* parse width map */ - { - GX_WidthMap widthMap; + return error; + } - FT_UShort format; - FT_UInt entrySize; - FT_UInt innerBitCount; - FT_UInt innerIndexMask; - FT_UInt i, j; + static FT_Error + ft_var_load_delta_set_index_mapping( TT_Face face, + FT_ULong offset, + GX_DeltaSetIdxMap map, + GX_ItemVarStore itemStore ) + { + FT_Stream stream = FT_FACE_STREAM( face ); + FT_Memory memory = stream->memory; - widthMap = &blend->hvar_table->widthMap; + FT_Error error; - if ( FT_READ_USHORT( format ) || - FT_READ_USHORT( widthMap->mapCount ) ) - goto Exit; + FT_UShort format; + FT_UInt entrySize; + FT_UInt innerBitCount; + FT_UInt innerIndexMask; + FT_UInt i, j; - if ( format & 0xFFC0 ) - { - FT_TRACE2(( "bad map format %d\n", format )); - error = FT_THROW( Invalid_Table ); - goto Exit; - } - /* bytes per entry: 1, 2, 3, or 4 */ - entrySize = ( ( format & 0x0030 ) >> 4 ) + 1; - innerBitCount = ( format & 0x000F ) + 1; - innerIndexMask = ( 1 << innerBitCount ) - 1; + if ( FT_STREAM_SEEK( offset ) || + FT_READ_USHORT( format ) || + FT_READ_USHORT( map->mapCount ) ) + goto Exit; - if ( FT_NEW_ARRAY( widthMap->innerIndex, widthMap->mapCount ) ) - goto Exit; + if ( format & 0xFFC0 ) + { + FT_TRACE2(( "bad map format %d\n", format )); + error = FT_THROW( Invalid_Table ); + goto Exit; + } - if ( FT_NEW_ARRAY( widthMap->outerIndex, widthMap->mapCount ) ) - goto Exit; + /* bytes per entry: 1, 2, 3, or 4 */ + entrySize = ( ( format & 0x0030 ) >> 4 ) + 1; + innerBitCount = ( format & 0x000F ) + 1; + innerIndexMask = ( 1 << innerBitCount ) - 1; - for ( i = 0; i < widthMap->mapCount; i++ ) - { - FT_UInt mapData = 0; - FT_UInt outerIndex, innerIndex; + if ( FT_NEW_ARRAY( map->innerIndex, map->mapCount ) ) + goto Exit; + if ( FT_NEW_ARRAY( map->outerIndex, map->mapCount ) ) + goto Exit; - /* read map data one unsigned byte at a time, big endian */ - for ( j = 0; j < entrySize; j++ ) - { - FT_Byte data; + for ( i = 0; i < map->mapCount; i++ ) + { + FT_UInt mapData = 0; + FT_UInt outerIndex, innerIndex; - if ( FT_READ_BYTE( data ) ) - goto Exit; + /* read map data one unsigned byte at a time, big endian */ + for ( j = 0; j < entrySize; j++ ) + { + FT_Byte data; - mapData = ( mapData << 8 ) | data; - } - outerIndex = mapData >> innerBitCount; - - if ( outerIndex >= blend->hvar_table->itemStore.dataCount ) - { - FT_TRACE2(( "outerIndex[%d] == %d out of range\n", - i, - outerIndex )); - error = FT_THROW( Invalid_Table ); + if ( FT_READ_BYTE( data ) ) goto Exit; - } - widthMap->outerIndex[i] = outerIndex; + mapData = ( mapData << 8 ) | data; + } - innerIndex = mapData & innerIndexMask; + outerIndex = mapData >> innerBitCount; - if ( innerIndex >= - blend->hvar_table->itemStore.varData[outerIndex].itemCount ) - { - FT_TRACE2(( "innerIndex[%d] == %d out of range\n", - i, - innerIndex )); - error = FT_THROW( Invalid_Table ); - goto Exit; - } - - widthMap->innerIndex[i] = innerIndex; + if ( outerIndex >= itemStore->dataCount ) + { + FT_TRACE2(( "outerIndex[%d] == %d out of range\n", + i, + outerIndex )); + error = FT_THROW( Invalid_Table ); + goto Exit; } - } - /* end parse width map */ + map->outerIndex[i] = outerIndex; - FT_TRACE2(( "loaded\n" )); - error = FT_Err_Ok; + innerIndex = mapData & innerIndexMask; - Exit: - FT_FREE( dataOffsetArray ); + if ( innerIndex >= itemStore->varData[outerIndex].itemCount ) + { + FT_TRACE2(( "innerIndex[%d] == %d out of range\n", + i, + innerIndex )); + error = FT_THROW( Invalid_Table ); + goto Exit; + } - if ( !error ) - { - blend->hvar_checked = TRUE; - - /* TODO: implement other HVAR stuff */ - face->variation_support |= TT_FACE_FLAG_VAR_HADVANCE; + map->innerIndex[i] = innerIndex; } + Exit: return error; } @@ -756,70 +702,170 @@ /*************************************************************************/ /* */ /* <Function> */ - /* tt_hadvance_adjust */ + /* ft_var_load_hvvar */ /* */ /* <Description> */ - /* Apply HVAR advance width adjustment of a given glyph. */ + /* If `vertical' is zero, parse the `HVAR' table and set */ + /* `blend->hvar_loaded' to TRUE. On success, `blend->hvar_checked' */ + /* is set to TRUE. */ /* */ - /* <Input> */ - /* gindex :: The glyph index. */ + /* If `vertical' is not zero, parse the `VVAR' table and set */ + /* `blend->vvar_loaded' to TRUE. On success, `blend->vvar_checked' */ + /* is set to TRUE. */ /* */ + /* Some memory may remain allocated on error; it is always freed in */ + /* `tt_done_blend', however. */ + /* */ /* <InOut> */ - /* face :: The font face. */ + /* face :: The font face. */ /* */ - /* adelta :: Points to width value that gets modified. */ + /* <Return> */ + /* FreeType error code. 0 means success. */ /* */ - FT_LOCAL_DEF( FT_Error ) - tt_hadvance_adjust( TT_Face face, - FT_UInt gindex, - FT_Int *avalue ) + static FT_Error + ft_var_load_hvvar( TT_Face face, + FT_Bool vertical ) { - FT_Error error = FT_Err_Ok; + FT_Stream stream = FT_FACE_STREAM( face ); + FT_Memory memory = stream->memory; - GX_HVarData varData; + GX_Blend blend = face->blend; - FT_UInt innerIndex, outerIndex; - FT_UInt master, j; - FT_Fixed netAdjustment = 0; /* accumulated adjustment */ - FT_Fixed scaledDelta; - FT_Short* deltaSet; - FT_Fixed delta; + GX_HVVarTable table; + FT_Error error; + FT_UShort majorVersion; + FT_ULong table_len; + FT_ULong table_offset; + FT_ULong store_offset; + FT_ULong widthMap_offset; - if ( !face->doblend || !face->blend ) - goto Exit; - if ( !face->blend->hvar_loaded ) + if ( vertical ) { - /* initialize hvar table */ - face->blend->hvar_error = ft_var_load_hvar( face ); + blend->vvar_loaded = TRUE; + + FT_TRACE2(( "VVAR " )); + + error = face->goto_table( face, TTAG_VVAR, stream, &table_len ); } + else + { + blend->hvar_loaded = TRUE; - if ( !face->blend->hvar_checked ) + FT_TRACE2(( "HVAR " )); + + error = face->goto_table( face, TTAG_HVAR, stream, &table_len ); + } + + if ( error ) { - error = face->blend->hvar_error; + FT_TRACE2(( "is missing\n" )); goto Exit; } - /* advance width adjustments are always present in an `HVAR' table, */ - /* so need to test for this capability */ + table_offset = FT_STREAM_POS(); - if ( gindex >= face->blend->hvar_table->widthMap.mapCount ) + /* skip minor version */ + if ( FT_READ_USHORT( majorVersion ) || + FT_STREAM_SKIP( 2 ) ) + goto Exit; + + if ( majorVersion != 1 ) { - FT_TRACE2(( "gindex %d out of range\n", gindex )); - error = FT_THROW( Invalid_Argument ); + FT_TRACE2(( "bad table version %d\n", majorVersion )); + error = FT_THROW( Invalid_Table ); goto Exit; } - /* trust that HVAR parser has checked indices */ - outerIndex = face->blend->hvar_table->widthMap.outerIndex[gindex]; - innerIndex = face->blend->hvar_table->widthMap.innerIndex[gindex]; - varData = &face->blend->hvar_table->itemStore.varData[outerIndex]; - deltaSet = &varData->deltaSet[varData->regionIdxCount * innerIndex]; + if ( FT_READ_ULONG( store_offset ) || + FT_READ_ULONG( widthMap_offset ) ) + goto Exit; + if ( vertical ) + { + if ( FT_NEW( blend->vvar_table ) ) + goto Exit; + table = blend->vvar_table; + } + else + { + if ( FT_NEW( blend->hvar_table ) ) + goto Exit; + table = blend->hvar_table; + } + + error = ft_var_load_item_variation_store( + face, + table_offset + store_offset, + &table->itemStore ); + if ( error ) + goto Exit; + + if ( widthMap_offset ) + { + error = ft_var_load_delta_set_index_mapping( + face, + table_offset + widthMap_offset, + &table->widthMap, + &table->itemStore ); + if ( error ) + goto Exit; + } + + FT_TRACE2(( "loaded\n" )); + error = FT_Err_Ok; + + Exit: + if ( !error ) + { + if ( vertical ) + { + blend->vvar_checked = TRUE; + + /* FreeType doesn't provide functions to quickly retrieve */ + /* TSB, BSB, or VORG values; we thus don't have to implement */ + /* support for those three item variation stores. */ + + face->variation_support |= TT_FACE_FLAG_VAR_VADVANCE; + } + else + { + blend->hvar_checked = TRUE; + + /* FreeType doesn't provide functions to quickly retrieve */ + /* LSB or RSB values; we thus don't have to implement */ + /* support for those two item variation stores. */ + + face->variation_support |= TT_FACE_FLAG_VAR_HADVANCE; + } + } + + return error; + } + + + static FT_Int + ft_var_get_item_delta( TT_Face face, + GX_ItemVarStore itemStore, + FT_UInt outerIndex, + FT_UInt innerIndex ) + { + GX_ItemVarData varData; + FT_Short* deltaSet; + + FT_UInt master, j; + FT_Fixed netAdjustment = 0; /* accumulated adjustment */ + FT_Fixed scaledDelta; + FT_Fixed delta; + + /* See pseudo code from `Font Variations Overview' */ /* in the OpenType specification. */ + varData = &itemStore->varData[outerIndex]; + deltaSet = &varData->deltaSet[varData->regionIdxCount * innerIndex]; + /* outer loop steps through master designs to be blended */ for ( master = 0; master < varData->regionIdxCount; master++ ) { @@ -826,16 +872,11 @@ FT_Fixed scalar = FT_FIXED_ONE; FT_UInt regionIndex = varData->regionIndices[master]; - GX_AxisCoords axis = face->blend - ->hvar_table - ->itemStore.varRegionList[regionIndex] - .axisList; + GX_AxisCoords axis = itemStore->varRegionList[regionIndex].axisList; /* inner loop steps through axes in this region */ - for ( j = 0; - j < face->blend->hvar_table->itemStore.axisCount; - j++, axis++ ) + for ( j = 0; j < itemStore->axisCount; j++, axis++ ) { FT_Fixed axisScalar; @@ -889,12 +930,123 @@ } /* per-region loop */ - /* apply the accumulated adjustment to derive the interpolated value */ - FT_TRACE5(( "horizontal width %d adjusted by %d units (HVAR)\n", + return FT_fixedToInt( netAdjustment ); + } + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* tt_hvadvance_adjust */ + /* */ + /* <Description> */ + /* Apply `HVAR' advance width or `VVAR' advance height adjustment of */ + /* a given glyph. */ + /* */ + /* <Input> */ + /* gindex :: The glyph index. */ + /* */ + /* vertical :: If set, handle `VVAR' table. */ + /* */ + /* <InOut> */ + /* face :: The font face. */ + /* */ + /* adelta :: Points to width or height value that gets modified. */ + /* */ + static FT_Error + tt_hvadvance_adjust( TT_Face face, + FT_UInt gindex, + FT_Int *avalue, + FT_Bool vertical ) + { + FT_Error error = FT_Err_Ok; + FT_UInt innerIndex, outerIndex; + FT_Int delta; + + GX_HVVarTable table; + + + if ( !face->doblend || !face->blend ) + goto Exit; + + if ( vertical ) + { + if ( !face->blend->vvar_loaded ) + { + /* initialize vvar table */ + face->blend->vvar_error = ft_var_load_hvvar( face, 1 ); + } + + if ( !face->blend->vvar_checked ) + { + error = face->blend->vvar_error; + goto Exit; + } + + table = face->blend->vvar_table; + } + else + { + if ( !face->blend->hvar_loaded ) + { + /* initialize hvar table */ + face->blend->hvar_error = ft_var_load_hvvar( face, 0 ); + } + + if ( !face->blend->hvar_checked ) + { + error = face->blend->hvar_error; + goto Exit; + } + + table = face->blend->hvar_table; + } + + /* advance width or height adjustments are always present in an */ + /* `HVAR' or `VVAR' table; no need to test for this capability */ + + if ( table->widthMap.innerIndex ) + { + FT_UInt idx = gindex; + + + if ( idx >= table->widthMap.mapCount ) + idx = table->widthMap.mapCount - 1; + + /* trust that HVAR parser has checked indices */ + outerIndex = table->widthMap.outerIndex[idx]; + innerIndex = table->widthMap.innerIndex[idx]; + } + else + { + GX_ItemVarData varData; + + + /* no widthMap data */ + outerIndex = 0; + innerIndex = gindex; + + varData = &table->itemStore.varData[outerIndex]; + if ( gindex >= varData->itemCount ) + { + FT_TRACE2(( "gindex %d out of range\n", gindex )); + error = FT_THROW( Invalid_Argument ); + goto Exit; + } + } + + delta = ft_var_get_item_delta( face, + &table->itemStore, + outerIndex, + innerIndex ); + + FT_TRACE5(( "%s value %d adjusted by %d units (%s)\n", + vertical ? "vertical height" : "horizontal width", *avalue, - FT_fixedToInt( netAdjustment ) )); + delta, + vertical ? "VVAR" : "HVAR" )); - *avalue += FT_fixedToInt( netAdjustment ); + *avalue += delta; Exit: return error; @@ -901,6 +1053,334 @@ } + FT_LOCAL_DEF( FT_Error ) + tt_hadvance_adjust( TT_Face face, + FT_UInt gindex, + FT_Int *avalue ) + { + return tt_hvadvance_adjust( face, gindex, avalue, 0 ); + } + + + FT_LOCAL_DEF( FT_Error ) + tt_vadvance_adjust( TT_Face face, + FT_UInt gindex, + FT_Int *avalue ) + { + return tt_hvadvance_adjust( face, gindex, avalue, 1 ); + } + + +#define GX_VALUE_SIZE 8 + + /* all values are FT_Short or FT_UShort entities; */ + /* we treat them consistently as FT_Short */ +#define GX_VALUE_CASE( tag, dflt ) \ + case MVAR_TAG_ ## tag : \ + p = (FT_Short*)&face->dflt; \ + break + +#define GX_GASP_CASE( idx ) \ + case MVAR_TAG_GASP_ ## idx : \ + if ( idx < face->gasp.numRanges - 1 ) \ + p = (FT_Short*)&face->gasp.gaspRanges[idx].maxPPEM; \ + else \ + p = NULL; \ + break + + + static FT_Short* + ft_var_get_value_pointer( TT_Face face, + FT_ULong mvar_tag ) + { + FT_Short* p; + + + switch ( mvar_tag ) + { + GX_GASP_CASE( 0 ); + GX_GASP_CASE( 1 ); + GX_GASP_CASE( 2 ); + GX_GASP_CASE( 3 ); + GX_GASP_CASE( 4 ); + GX_GASP_CASE( 5 ); + GX_GASP_CASE( 6 ); + GX_GASP_CASE( 7 ); + GX_GASP_CASE( 8 ); + GX_GASP_CASE( 9 ); + + GX_VALUE_CASE( CPHT, os2.sCapHeight ); + GX_VALUE_CASE( HASC, os2.sTypoAscender ); + GX_VALUE_CASE( HCLA, os2.usWinAscent ); + GX_VALUE_CASE( HCLD, os2.usWinDescent ); + GX_VALUE_CASE( HCOF, horizontal.caret_Offset ); + GX_VALUE_CASE( HCRN, horizontal.caret_Slope_Run ); + GX_VALUE_CASE( HCRS, horizontal.caret_Slope_Rise ); + GX_VALUE_CASE( HDSC, os2.sTypoDescender ); + GX_VALUE_CASE( HLGP, os2.sTypoLineGap ); + GX_VALUE_CASE( SBXO, os2.ySubscriptXOffset); + GX_VALUE_CASE( SBXS, os2.ySubscriptXSize ); + GX_VALUE_CASE( SBYO, os2.ySubscriptYOffset ); + GX_VALUE_CASE( SBYS, os2.ySubscriptYSize ); + GX_VALUE_CASE( SPXO, os2.ySuperscriptXOffset ); + GX_VALUE_CASE( SPXS, os2.ySuperscriptXSize ); + GX_VALUE_CASE( SPYO, os2.ySuperscriptYOffset ); + GX_VALUE_CASE( SPYS, os2.ySuperscriptYSize ); + GX_VALUE_CASE( STRO, os2.yStrikeoutPosition ); + GX_VALUE_CASE( STRS, os2.yStrikeoutSize ); + GX_VALUE_CASE( UNDO, postscript.underlinePosition ); + GX_VALUE_CASE( UNDS, postscript.underlineThickness ); + GX_VALUE_CASE( VASC, vertical.Ascender ); + GX_VALUE_CASE( VCOF, vertical.caret_Offset ); + GX_VALUE_CASE( VCRN, vertical.caret_Slope_Run ); + GX_VALUE_CASE( VCRS, vertical.caret_Slope_Rise ); + GX_VALUE_CASE( VDSC, vertical.Descender ); + GX_VALUE_CASE( VLGP, vertical.Line_Gap ); + GX_VALUE_CASE( XHGT, os2.sxHeight ); + + default: + /* ignore unknown tag */ + p = NULL; + } + + return p; + } + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* ft_var_load_mvar */ + /* */ + /* <Description> */ + /* Parse the `MVAR' table. */ + /* */ + /* Some memory may remain allocated on error; it is always freed in */ + /* `tt_done_blend', however. */ + /* */ + /* <InOut> */ + /* face :: The font face. */ + /* */ + static void + ft_var_load_mvar( TT_Face face ) + { + FT_Stream stream = FT_FACE_STREAM( face ); + FT_Memory memory = stream->memory; + + GX_Blend blend = face->blend; + GX_ItemVarStore itemStore; + GX_Value value, limit; + + FT_Error error; + FT_UShort majorVersion; + FT_ULong table_len; + FT_ULong table_offset; + FT_UShort store_offset; + FT_ULong records_offset; + + + FT_TRACE2(( "MVAR " )); + + error = face->goto_table( face, TTAG_MVAR, stream, &table_len ); + if ( error ) + { + FT_TRACE2(( "is missing\n" )); + return; + } + + table_offset = FT_STREAM_POS(); + + /* skip minor version */ + if ( FT_READ_USHORT( majorVersion ) || + FT_STREAM_SKIP( 2 ) ) + return; + + if ( majorVersion != 1 ) + { + FT_TRACE2(( "bad table version %d\n", majorVersion )); + return; + } + + if ( FT_NEW( blend->mvar_table ) ) + return; + + /* skip reserved entry and value record size */ + if ( FT_STREAM_SKIP( 4 ) || + FT_READ_USHORT( blend->mvar_table->valueCount ) || + FT_READ_USHORT( store_offset ) ) + return; + + records_offset = FT_STREAM_POS(); + + error = ft_var_load_item_variation_store( + face, + table_offset + store_offset, + &blend->mvar_table->itemStore ); + if ( error ) + return; + + if ( FT_NEW_ARRAY( blend->mvar_table->values, + blend->mvar_table->valueCount ) ) + return; + + if ( FT_STREAM_SEEK( records_offset ) || + FT_FRAME_ENTER( blend->mvar_table->valueCount * GX_VALUE_SIZE ) ) + return; + + value = blend->mvar_table->values; + limit = value + blend->mvar_table->valueCount; + itemStore = &blend->mvar_table->itemStore; + + for ( ; value < limit; value++ ) + { + value->tag = FT_GET_ULONG(); + value->outerIndex = FT_GET_USHORT(); + value->innerIndex = FT_GET_USHORT(); + + if ( value->outerIndex >= itemStore->dataCount || + value->innerIndex >= itemStore->varData[value->outerIndex] + .itemCount ) + { + error = FT_THROW( Invalid_Table ); + break; + } + } + + FT_FRAME_EXIT(); + + if ( error ) + return; + + FT_TRACE2(( "loaded\n" )); + + value = blend->mvar_table->values; + limit = value + blend->mvar_table->valueCount; + + /* save original values of the data MVAR is going to modify */ + for ( ; value < limit; value++ ) + { + FT_Short* p = ft_var_get_value_pointer( face, value->tag ); + + + if ( p ) + value->unmodified = *p; +#ifdef FT_DEBUG_LEVEL_TRACE + else + FT_TRACE1(( "ft_var_load_mvar: Ignoring unknown tag `%c%c%c%c'\n", + (FT_Char)( value->tag >> 24 ), + (FT_Char)( value->tag >> 16 ), + (FT_Char)( value->tag >> 8 ), + (FT_Char)( value->tag ) )); +#endif + } + + face->variation_support |= TT_FACE_FLAG_VAR_MVAR; + } + + + static FT_Error + tt_size_reset_iterator( FT_ListNode node, + void* user ) + { + TT_Size size = (TT_Size)node->data; + + FT_UNUSED( user ); + + + tt_size_reset( size, 1 ); + + return FT_Err_Ok; + } + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* tt_apply_mvar */ + /* */ + /* <Description> */ + /* Apply `MVAR' table adjustments. */ + /* */ + /* <InOut> */ + /* face :: The font face. */ + /* */ + FT_LOCAL_DEF( void ) + tt_apply_mvar( TT_Face face ) + { + GX_Blend blend = face->blend; + GX_Value value, limit; + + + if ( !( face->variation_support & TT_FACE_FLAG_VAR_MVAR ) ) + return; + + value = blend->mvar_table->values; + limit = value + blend->mvar_table->valueCount; + + for ( ; value < limit; value++ ) + { + FT_Short* p = ft_var_get_value_pointer( face, value->tag ); + FT_Int delta; + + + delta = ft_var_get_item_delta( face, + &blend->mvar_table->itemStore, + value->outerIndex, + value->innerIndex ); + + if ( p ) + { + FT_TRACE5(( "value %c%c%c%c (%d units) adjusted by %d units (MVAR)\n", + (FT_Char)( value->tag >> 24 ), + (FT_Char)( value->tag >> 16 ), + (FT_Char)( value->tag >> 8 ), + (FT_Char)( value->tag ), + value->unmodified, + delta )); + + /* since we handle both signed and unsigned values as FT_Short, */ + /* ensure proper overflow arithmetic */ + *p = (FT_Short)( value->unmodified + (FT_Short)delta ); + } + } + + /* adjust all derived values */ + { + FT_Face root = &face->root; + + + if ( face->os2.version != 0xFFFFU ) + { + if ( face->os2.sTypoAscender || face->os2.sTypoDescender ) + { + root->ascender = face->os2.sTypoAscender; + root->descender = face->os2.sTypoDescender; + + root->height = root->ascender - root->descender + + face->os2.sTypoLineGap; + } + else + { + root->ascender = (FT_Short)face->os2.usWinAscent; + root->descender = -(FT_Short)face->os2.usWinDescent; + + root->height = root->ascender - root->descender; + } + } + + root->underline_position = face->postscript.underlinePosition - + face->postscript.underlineThickness / 2; + root->underline_thickness = face->postscript.underlineThickness; + + /* iterate over all FT_Size objects and call `tt_size_reset' */ + /* to propagate the metrics changes */ + FT_List_Iterate( &root->sizes_list, + tt_size_reset_iterator, + NULL ); + } + } + + typedef struct GX_GVar_Head_ { FT_Long version; @@ -1000,10 +1480,9 @@ goto Exit; } - /* rough sanity check: offsets can be either 2 or 4 bytes, */ - /* and a single variation needs at least 4 bytes per glyph */ + /* rough sanity check: offsets can be either 2 or 4 bytes */ if ( (FT_ULong)gvar_head.glyphCount * - ( ( gvar_head.flags & 1 ) ? 8 : 6 ) > table_len ) + ( ( gvar_head.flags & 1 ) ? 4 : 2 ) > table_len ) { FT_TRACE1(( "ft_var_load_gvar: invalid number of glyphs\n" )); error = FT_THROW( Invalid_Table ); @@ -1216,6 +1695,190 @@ } + /* convert from design coordinates to normalized coordinates */ + + static void + ft_var_to_normalized( TT_Face face, + FT_UInt num_coords, + FT_Fixed* coords, + FT_Fixed* normalized ) + { + GX_Blend blend; + FT_MM_Var* mmvar; + FT_UInt i, j; + FT_Var_Axis* a; + GX_AVarSegment av; + + + blend = face->blend; + mmvar = blend->mmvar; + + if ( num_coords > mmvar->num_axis ) + { + FT_TRACE2(( "ft_var_to_normalized:" + " only using first %d of %d coordinates\n", + mmvar->num_axis, num_coords )); + num_coords = mmvar->num_axis; + } + + /* Axis normalization is a two-stage process. First we normalize */ + /* based on the [min,def,max] values for the axis to be [-1,0,1]. */ + /* Then, if there's an `avar' table, we renormalize this range. */ + + FT_TRACE5(( "design coordinates:\n" )); + + a = mmvar->axis; + for ( i = 0; i < num_coords; i++, a++ ) + { + FT_Fixed coord = coords[i]; + + + FT_TRACE5(( " %.5f\n", coord / 65536.0 )); + if ( coord > a->maximum || coord < a->minimum ) + { + FT_TRACE1(( + "ft_var_to_normalized: design coordinate %.5f\n" + " is out of range [%.5f;%.5f]; clamping\n", + coord / 65536.0, + a->minimum / 65536.0, + a->maximum / 65536.0 )); + + if ( coord > a->maximum) + coord = a->maximum; + else + coord = a->minimum; + } + + if ( coord < a->def ) + normalized[i] = -FT_DivFix( coords[i] - a->def, + a->minimum - a->def ); + else if ( coord > a->def ) + normalized[i] = FT_DivFix( coords[i] - a->def, + a->maximum - a->def ); + else + normalized[i] = 0; + } + + FT_TRACE5(( "\n" )); + + for ( ; i < mmvar->num_axis; i++ ) + normalized[i] = 0; + + if ( blend->avar_segment ) + { + FT_TRACE5(( "normalized design coordinates" + " before applying `avar' data:\n" )); + + av = blend->avar_segment; + for ( i = 0; i < mmvar->num_axis; i++, av++ ) + { + for ( j = 1; j < (FT_UInt)av->pairCount; j++ ) + { + if ( normalized[i] < av->correspondence[j].fromCoord ) + { + FT_TRACE5(( " %.5f\n", normalized[i] / 65536.0 )); + + normalized[i] = + FT_MulDiv( normalized[i] - av->correspondence[j - 1].fromCoord, + av->correspondence[j].toCoord - + av->correspondence[j - 1].toCoord, + av->correspondence[j].fromCoord - + av->correspondence[j - 1].fromCoord ) + + av->correspondence[j - 1].toCoord; + break; + } + } + } + } + } + + + /* convert from normalized coordinates to design coordinates */ + + static void + ft_var_to_design( TT_Face face, + FT_UInt num_coords, + FT_Fixed* coords, + FT_Fixed* design ) + { + GX_Blend blend; + FT_MM_Var* mmvar; + FT_Var_Axis* a; + + FT_UInt i, j, nc; + + + blend = face->blend; + + nc = num_coords; + if ( num_coords > blend->num_axis ) + { + FT_TRACE2(( "ft_var_to_design:" + " only using first %d of %d coordinates\n", + blend->num_axis, num_coords )); + nc = blend->num_axis; + } + + if ( face->doblend ) + { + for ( i = 0; i < nc; i++ ) + design[i] = coords[i]; + } + else + { + for ( i = 0; i < nc; i++ ) + design[i] = 0; + } + + for ( ; i < num_coords; i++ ) + design[i] = 0; + + if ( blend->avar_segment ) + { + GX_AVarSegment av = blend->avar_segment; + + + FT_TRACE5(( "design coordinates" + " after removing `avar' distortion:\n" )); + + for ( i = 0; i < nc; i++, av++ ) + { + for ( j = 1; j < (FT_UInt)av->pairCount; j++ ) + { + if ( design[i] < av->correspondence[j].toCoord ) + { + design[i] = + FT_MulDiv( design[i] - av->correspondence[j - 1].toCoord, + av->correspondence[j].fromCoord - + av->correspondence[j - 1].fromCoord, + av->correspondence[j].toCoord - + av->correspondence[j - 1].toCoord ) + + av->correspondence[j - 1].fromCoord; + + FT_TRACE5(( " %.5f\n", design[i] / 65536.0 )); + break; + } + } + } + } + + mmvar = blend->mmvar; + a = mmvar->axis; + + for ( i = 0; i < nc; i++, a++ ) + { + if ( design[i] < 0 ) + design[i] = a->def + FT_MulFix( design[i], + a->def - a->minimum ); + else if ( design[i] > 0 ) + design[i] = a->def + FT_MulFix( design[i], + a->maximum - a->def ); + else + design[i] = a->def; + } + } + + /*************************************************************************/ /*************************************************************************/ /***** *****/ @@ -1229,7 +1892,6 @@ { FT_Long version; FT_UShort offsetToData; - FT_UShort countSizePairs; FT_UShort axisCount; FT_UShort axisSize; FT_UShort instanceCount; @@ -1257,7 +1919,8 @@ /* */ /* <Description> */ /* Check that the font's `fvar' table is valid, parse it, and return */ - /* those data. */ + /* those data. It also loads (and parses) the `MVAR' table, if */ + /* possible. */ /* */ /* <InOut> */ /* face :: The font face. */ @@ -1279,14 +1942,17 @@ FT_ULong table_len; FT_Error error = FT_Err_Ok; FT_ULong fvar_start; - FT_Int i, j; + FT_UInt i, j; FT_MM_Var* mmvar = NULL; FT_Fixed* next_coords; + FT_Fixed* nsc; FT_String* next_name; FT_Var_Axis* a; + FT_Fixed* c; FT_Var_Named_Style* ns; GX_FVar_Head fvar_head; FT_Bool usePsName; + FT_UInt num_instances; static const FT_Frame_Field fvar_fields[] = { @@ -1295,13 +1961,13 @@ #define FT_STRUCTURE GX_FVar_Head FT_FRAME_START( 16 ), - FT_FRAME_LONG ( version ), - FT_FRAME_USHORT( offsetToData ), - FT_FRAME_USHORT( countSizePairs ), - FT_FRAME_USHORT( axisCount ), - FT_FRAME_USHORT( axisSize ), - FT_FRAME_USHORT( instanceCount ), - FT_FRAME_USHORT( instanceSize ), + FT_FRAME_LONG ( version ), + FT_FRAME_USHORT ( offsetToData ), + FT_FRAME_SKIP_SHORT, + FT_FRAME_USHORT ( axisCount ), + FT_FRAME_USHORT ( axisSize ), + FT_FRAME_USHORT ( instanceCount ), + FT_FRAME_USHORT ( instanceSize ), FT_FRAME_END }; @@ -1367,12 +2033,18 @@ if ( FT_NEW( face->blend ) ) goto Exit; - /* cannot overflow 32-bit arithmetic because of limits above */ + /* `num_instances' holds the number of all named instances, */ + /* including the default instance which might be missing */ + /* in fvar's table of named instances */ + num_instances = face->root.style_flags >> 16; + + /* cannot overflow 32-bit arithmetic because of the size limits */ + /* used in the `fvar' table validity check in `sfnt_init_face' */ face->blend->mmvar_len = sizeof ( FT_MM_Var ) + fvar_head.axisCount * sizeof ( FT_Var_Axis ) + - fvar_head.instanceCount * sizeof ( FT_Var_Named_Style ) + - fvar_head.instanceCount * fvar_head.axisCount * sizeof ( FT_Fixed ) + + num_instances * sizeof ( FT_Var_Named_Style ) + + num_instances * fvar_head.axisCount * sizeof ( FT_Fixed ) + 5 * fvar_head.axisCount; if ( FT_ALLOC( mmvar, face->blend->mmvar_len ) ) @@ -1389,7 +2061,7 @@ /* may have a different number of designs */ /* (or tuples, as called by Apple) */ mmvar->num_namedstyles = - fvar_head.instanceCount; + num_instances; mmvar->axis = (FT_Var_Axis*)&( mmvar[1] ); mmvar->namedstyle = @@ -1396,8 +2068,8 @@ (FT_Var_Named_Style*)&( mmvar->axis[fvar_head.axisCount] ); next_coords = - (FT_Fixed*)&( mmvar->namedstyle[fvar_head.instanceCount] ); - for ( i = 0; i < fvar_head.instanceCount; i++ ) + (FT_Fixed*)&( mmvar->namedstyle[num_instances] ); + for ( i = 0; i < num_instances; i++ ) { mmvar->namedstyle[i].coords = next_coords; next_coords += fvar_head.axisCount; @@ -1457,7 +2129,17 @@ FT_TRACE5(( "\n" )); - ns = mmvar->namedstyle; + /* named instance coordinates are stored as design coordinates; */ + /* we have to convert them to normalized coordinates also */ + if ( FT_NEW_ARRAY( face->blend->normalized_stylecoords, + fvar_head.axisCount * num_instances ) ) + goto Exit; + + if ( fvar_head.instanceCount && !face->blend->avar_loaded ) + ft_var_load_avar( face ); + + ns = mmvar->namedstyle; + nsc = face->blend->normalized_stylecoords; for ( i = 0; i < fvar_head.instanceCount; i++, ns++ ) { /* PostScript names add 2 bytes to the instance record size */ @@ -1468,14 +2150,73 @@ ns->strid = FT_GET_USHORT(); (void) /* flags = */ FT_GET_USHORT(); - for ( j = 0; j < fvar_head.axisCount; j++ ) - ns->coords[j] = FT_GET_LONG(); + c = ns->coords; + for ( j = 0; j < fvar_head.axisCount; j++, c++ ) + *c = FT_GET_LONG(); if ( usePsName ) ns->psid = FT_GET_USHORT(); + ft_var_to_normalized( face, + fvar_head.axisCount, + ns->coords, + nsc ); + nsc += fvar_head.axisCount; + FT_FRAME_EXIT(); } + + if ( num_instances != fvar_head.instanceCount ) + { + SFNT_Service sfnt = (SFNT_Service)face->sfnt; + + FT_Int found, dummy1, dummy2; + FT_UInt strid = 0xFFFFFFFFUL; + + + /* the default instance is missing in array the */ + /* of named instances; try to synthesize an entry */ + found = sfnt->get_name_id( face, + TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY, + &dummy1, + &dummy2 ); + if ( found ) + strid = TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY; + else + { + found = sfnt->get_name_id( face, + TT_NAME_ID_FONT_SUBFAMILY, + &dummy1, + &dummy2 ); + if ( found ) + strid = TT_NAME_ID_FONT_SUBFAMILY; + } + + if ( found ) + { + found = sfnt->get_name_id( face, + TT_NAME_ID_PS_NAME, + &dummy1, + &dummy2 ); + if ( found ) + { + FT_TRACE5(( "TT_Get_MM_Var:" + " Adding default instance to named instances\n" )); + + ns = &mmvar->namedstyle[fvar_head.instanceCount]; + + ns->strid = strid; + ns->psid = TT_NAME_ID_PS_NAME; + + a = mmvar->axis; + c = ns->coords; + for ( j = 0; j < fvar_head.axisCount; j++, a++, c++ ) + *c = a->def; + } + } + } + + ft_var_load_mvar( face ); } /* fill the output array if requested */ @@ -1530,40 +2271,16 @@ } - /*************************************************************************/ - /* */ - /* <Function> */ - /* TT_Set_MM_Blend */ - /* */ - /* <Description> */ - /* Set the blend (normalized) coordinates for this instance of the */ - /* font. Check that the `gvar' table is reasonable and does some */ - /* initial preparation. */ - /* */ - /* <InOut> */ - /* face :: The font. */ - /* Initialize the blend structure with `gvar' data. */ - /* */ - /* <Input> */ - /* num_coords :: The number of available coordinates. If it is */ - /* larger than the number of axes, ignore the excess */ - /* values. If it is smaller than the number of axes, */ - /* use the default value (0) for the remaining axes. */ - /* */ - /* coords :: An array of `num_coords', each between [-1,1]. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. */ - /* */ - FT_LOCAL_DEF( FT_Error ) - TT_Set_MM_Blend( TT_Face face, + static FT_Error + tt_set_mm_blend( TT_Face face, FT_UInt num_coords, - FT_Fixed* coords ) + FT_Fixed* coords, + FT_Bool set_design_coords ) { FT_Error error = FT_Err_Ok; GX_Blend blend; FT_MM_Var* mmvar; - FT_UInt i; + FT_UInt i, j; FT_Bool is_default_instance = 1; FT_Memory memory = face->root.memory; @@ -1589,7 +2306,8 @@ if ( num_coords > mmvar->num_axis ) { - FT_TRACE2(( "TT_Set_MM_Blend: only using first %d of %d coordinates\n", + FT_TRACE2(( "TT_Set_MM_Blend:" + " only using first %d of %d coordinates\n", mmvar->num_axis, num_coords )); num_coords = mmvar->num_axis; } @@ -1614,10 +2332,16 @@ FT_TRACE5(( "\n" )); - if ( !face->isCFF2 && !blend->glyphoffsets ) + if ( !face->is_cff2 && !blend->glyphoffsets ) if ( FT_SET_ERROR( ft_var_load_gvar( face ) ) ) goto Exit; + if ( !blend->coords ) + { + if ( FT_NEW_ARRAY( blend->coords, mmvar->num_axis ) ) + goto Exit; + } + if ( !blend->normalizedcoords ) { if ( FT_NEW_ARRAY( blend->normalizedcoords, mmvar->num_axis ) ) @@ -1662,6 +2386,12 @@ coords, num_coords * sizeof ( FT_Fixed ) ); + if ( set_design_coords ) + ft_var_to_design( face, + num_coords, + blend->normalizedcoords, + blend->coords ); + face->doblend = TRUE; if ( face->cvt ) @@ -1689,8 +2419,36 @@ } } + /* check whether the current variation tuple coincides */ + /* with a named instance */ + + for ( i = 0; i < blend->mmvar->num_namedstyles; i++ ) + { + FT_Fixed* nsc = blend->normalized_stylecoords + i * blend->num_axis; + FT_Fixed* ns = blend->normalizedcoords; + + + for ( j = 0; j < blend->num_axis; j++, nsc++, ns++ ) + { + if ( *nsc != *ns ) + break; + } + + if ( j == blend->num_axis ) + break; + } + + /* adjust named instance index */ + face->root.face_index &= 0xFFFF; + if ( i < blend->mmvar->num_namedstyles ) + face->root.face_index |= ( i + 1 ) << 16; + face->is_default_instance = is_default_instance; + /* enforce recomputation of the PostScript name; */ + FT_FREE( face->postscript_name ); + face->postscript_name = NULL; + Exit: return error; } @@ -1699,6 +2457,40 @@ /*************************************************************************/ /* */ /* <Function> */ + /* TT_Set_MM_Blend */ + /* */ + /* <Description> */ + /* Set the blend (normalized) coordinates for this instance of the */ + /* font. Check that the `gvar' table is reasonable and does some */ + /* initial preparation. */ + /* */ + /* <InOut> */ + /* face :: The font. */ + /* Initialize the blend structure with `gvar' data. */ + /* */ + /* <Input> */ + /* num_coords :: The number of available coordinates. If it is */ + /* larger than the number of axes, ignore the excess */ + /* values. If it is smaller than the number of axes, */ + /* use the default value (0) for the remaining axes. */ + /* */ + /* coords :: An array of `num_coords', each between [-1,1]. */ + /* */ + /* <Return> */ + /* FreeType error code. 0 means success. */ + /* */ + FT_LOCAL_DEF( FT_Error ) + TT_Set_MM_Blend( TT_Face face, + FT_UInt num_coords, + FT_Fixed* coords ) + { + return tt_set_mm_blend( face, num_coords, coords, 1 ); + } + + + /*************************************************************************/ + /* */ + /* <Function> */ /* TT_Get_MM_Blend */ /* */ /* <Description> */ @@ -1740,7 +2532,8 @@ nc = num_coords; if ( num_coords > blend->num_axis ) { - FT_TRACE2(( "TT_Get_MM_Blend: only using first %d of %d coordinates\n", + FT_TRACE2(( "TT_Get_MM_Blend:" + " only using first %d of %d coordinates\n", blend->num_axis, num_coords )); nc = blend->num_axis; } @@ -1793,16 +2586,18 @@ FT_UInt num_coords, FT_Fixed* coords ) { - FT_Error error = FT_Err_Ok; - FT_Fixed* normalized = NULL; - GX_Blend blend; - FT_MM_Var* mmvar; - FT_UInt i, j; - FT_Var_Axis* a; - GX_AVarSegment av; - FT_Memory memory = face->root.memory; + FT_Error error = FT_Err_Ok; + GX_Blend blend; + FT_MM_Var* mmvar; + FT_UInt i; + FT_Memory memory = face->root.memory; + FT_Var_Axis* a; + FT_Fixed* c; + FT_Fixed* normalized = NULL; + + if ( !face->blend ) { if ( FT_SET_ERROR( TT_Get_MM_Var( face, NULL ) ) ) @@ -1820,84 +2615,31 @@ num_coords = mmvar->num_axis; } - /* Axis normalization is a two-stage process. First we normalize */ - /* based on the [min,def,max] values for the axis to be [-1,0,1]. */ - /* Then, if there's an `avar' table, we renormalize this range. */ - - if ( FT_NEW_ARRAY( normalized, mmvar->num_axis ) ) - goto Exit; - - FT_TRACE5(( "design coordinates:\n" )); - - a = mmvar->axis; - for ( i = 0; i < num_coords; i++, a++ ) + if ( !blend->coords ) { - FT_Fixed coord = coords[i]; + if ( FT_NEW_ARRAY( blend->coords, mmvar->num_axis ) ) + goto Exit; + } + FT_MEM_COPY( blend->coords, + coords, + num_coords * sizeof ( FT_Fixed ) ); - FT_TRACE5(( " %.5f\n", coord / 65536.0 )); - if ( coord > a->maximum || coord < a->minimum ) - { - FT_TRACE1(( - "TT_Set_Var_Design: design coordinate %.5f\n" - " is out of range [%.5f;%.5f]; clamping\n", - coord / 65536.0, - a->minimum / 65536.0, - a->maximum / 65536.0 )); + a = mmvar->axis + num_coords; + c = coords + num_coords; + for ( i = num_coords; i < mmvar->num_axis; i++, a++, c++ ) + *c = a->def; - if ( coord > a->maximum) - coord = a->maximum; - else - coord = a->minimum; - } + if ( FT_NEW_ARRAY( normalized, mmvar->num_axis ) ) + goto Exit; - if ( coord < a->def ) - normalized[i] = -FT_DivFix( coords[i] - a->def, - a->minimum - a->def ); - else if ( coord > a->def ) - normalized[i] = FT_DivFix( coords[i] - a->def, - a->maximum - a->def ); - else - normalized[i] = 0; - } - - FT_TRACE5(( "\n" )); - - for ( ; i < mmvar->num_axis; i++ ) - normalized[i] = 0; - - if ( !blend->avar_checked ) + if ( !face->blend->avar_loaded ) ft_var_load_avar( face ); - if ( blend->avar_segment ) - { - FT_TRACE5(( "normalized design coordinates" - " before applying `avar' data:\n" )); + ft_var_to_normalized( face, num_coords, coords, normalized ); - av = blend->avar_segment; - for ( i = 0; i < mmvar->num_axis; i++, av++ ) - { - for ( j = 1; j < (FT_UInt)av->pairCount; j++ ) - { - if ( normalized[i] < av->correspondence[j].fromCoord ) - { - FT_TRACE5(( " %.5f\n", normalized[i] / 65536.0 )); + error = tt_set_mm_blend( face, mmvar->num_axis, normalized, 0 ); - normalized[i] = - FT_MulDiv( normalized[i] - av->correspondence[j - 1].fromCoord, - av->correspondence[j].toCoord - - av->correspondence[j - 1].toCoord, - av->correspondence[j].fromCoord - - av->correspondence[j - 1].fromCoord ) + - av->correspondence[j - 1].toCoord; - break; - } - } - } - } - - error = TT_Set_MM_Blend( face, mmvar->num_axis, normalized ); - Exit: FT_FREE( normalized ); return error; @@ -1932,14 +2674,10 @@ FT_Fixed* coords ) { FT_Error error = FT_Err_Ok; + GX_Blend blend; + FT_UInt i, nc; - GX_Blend blend; - FT_MM_Var* mmvar; - FT_Var_Axis* a; - FT_UInt i, j, nc; - - if ( !face->blend ) { if ( FT_SET_ERROR( TT_Get_MM_Var( face, NULL ) ) ) @@ -1951,7 +2689,8 @@ nc = num_coords; if ( num_coords > blend->num_axis ) { - FT_TRACE2(( "TT_Get_Var_Design: only using first %d of %d coordinates\n", + FT_TRACE2(( "TT_Get_Var_Design:" + " only using first %d of %d coordinates\n", blend->num_axis, num_coords )); nc = blend->num_axis; } @@ -1959,7 +2698,7 @@ if ( face->doblend ) { for ( i = 0; i < nc; i++ ) - coords[i] = blend->normalizedcoords[i]; + coords[i] = blend->coords[i]; } else { @@ -1970,53 +2709,6 @@ for ( ; i < num_coords; i++ ) coords[i] = 0; - if ( !blend->avar_checked ) - ft_var_load_avar( face ); - - if ( blend->avar_segment ) - { - GX_AVarSegment av = blend->avar_segment; - - - FT_TRACE5(( "design coordinates" - " after removing `avar' distortion:\n" )); - - for ( i = 0; i < nc; i++, av++ ) - { - for ( j = 1; j < (FT_UInt)av->pairCount; j++ ) - { - if ( coords[i] < av->correspondence[j].toCoord ) - { - coords[i] = - FT_MulDiv( coords[i] - av->correspondence[j - 1].toCoord, - av->correspondence[j].fromCoord - - av->correspondence[j - 1].fromCoord, - av->correspondence[j].toCoord - - av->correspondence[j - 1].toCoord ) + - av->correspondence[j - 1].fromCoord; - - FT_TRACE5(( " %.5f\n", coords[i] / 65536.0 )); - break; - } - } - } - } - - mmvar = blend->mmvar; - a = mmvar->axis; - - for ( i = 0; i < nc; i++, a++ ) - { - if ( coords[i] < 0 ) - coords[i] = a->def + FT_MulFix( coords[i], - a->def - a->minimum ); - else if ( coords[i] > 0 ) - coords[i] = a->def + FT_MulFix( coords[i], - a->maximum - a->def ); - else - coords[i] = a->def; - } - return FT_Err_Ok; } @@ -2389,27 +3081,14 @@ d1 = out1 - in1; d2 = out2 - in2; - if ( out1 == out2 || in1 == in2 ) + /* If the reference points have the same coordinate but different */ + /* delta, inferred delta is zero. Otherwise interpolate. */ + if ( in1 != in2 || out1 == out2 ) { - for ( p = p1; p <= p2; p++ ) - { - out = in_points[p].x; + FT_Fixed scale = in1 != in2 ? FT_DivFix( out2 - out1, in2 - in1 ) + : 0; - if ( out <= in1 ) - out += d1; - else if ( out >= in2 ) - out += d2; - else - out = out1; - out_points[p].x = out; - } - } - else - { - FT_Fixed scale = FT_DivFix( out2 - out1, in2 - in1 ); - - for ( p = p1; p <= p2; p++ ) { out = in_points[p].x; @@ -2902,16 +3581,19 @@ tt_get_var_blend( TT_Face face, FT_UInt *num_coords, FT_Fixed* *coords, + FT_Fixed* *normalizedcoords, FT_MM_Var* *mm_var ) { if ( face->blend ) { if ( num_coords ) - *num_coords = face->blend->num_axis; + *num_coords = face->blend->num_axis; if ( coords ) - *coords = face->blend->normalizedcoords; + *coords = face->blend->coords; + if ( normalizedcoords ) + *normalizedcoords = face->blend->normalizedcoords; if ( mm_var ) - *mm_var = face->blend->mmvar; + *mm_var = face->blend->mmvar; } else { @@ -2927,6 +3609,35 @@ } + static void + ft_var_done_item_variation_store( TT_Face face, + GX_ItemVarStore itemStore ) + { + FT_Memory memory = FT_FACE_MEMORY( face ); + FT_UInt i; + + + if ( itemStore->varData ) + { + for ( i = 0; i < itemStore->dataCount; i++ ) + { + FT_FREE( itemStore->varData[i].regionIndices ); + FT_FREE( itemStore->varData[i].deltaSet ); + } + + FT_FREE( itemStore->varData ); + } + + if ( itemStore->varRegionList ) + { + for ( i = 0; i < itemStore->regionCount; i++ ) + FT_FREE( itemStore->varRegionList[i].axisList ); + + FT_FREE( itemStore->varRegionList ); + } + } + + /*************************************************************************/ /* */ /* <Function> */ @@ -2950,7 +3661,9 @@ /* blend->num_axis might not be set up yet */ num_axes = blend->mmvar->num_axis; + FT_FREE( blend->coords ); FT_FREE( blend->normalizedcoords ); + FT_FREE( blend->normalized_stylecoords ); FT_FREE( blend->mmvar ); if ( blend->avar_segment ) @@ -2962,28 +3675,33 @@ if ( blend->hvar_table ) { - if ( blend->hvar_table->itemStore.varData ) - { - for ( i = 0; i < blend->hvar_table->itemStore.dataCount; i++ ) - { - FT_FREE( blend->hvar_table->itemStore.varData[i].regionIndices ); - FT_FREE( blend->hvar_table->itemStore.varData[i].deltaSet ); - } - FT_FREE( blend->hvar_table->itemStore.varData ); - } + ft_var_done_item_variation_store( face, + &blend->hvar_table->itemStore ); - if ( blend->hvar_table->itemStore.varRegionList ) - { - for ( i = 0; i < blend->hvar_table->itemStore.regionCount; i++ ) - FT_FREE( blend->hvar_table->itemStore.varRegionList[i].axisList ); - FT_FREE( blend->hvar_table->itemStore.varRegionList ); - } - FT_FREE( blend->hvar_table->widthMap.innerIndex ); FT_FREE( blend->hvar_table->widthMap.outerIndex ); FT_FREE( blend->hvar_table ); } + if ( blend->vvar_table ) + { + ft_var_done_item_variation_store( face, + &blend->vvar_table->itemStore ); + + FT_FREE( blend->vvar_table->widthMap.innerIndex ); + FT_FREE( blend->vvar_table->widthMap.outerIndex ); + FT_FREE( blend->vvar_table ); + } + + if ( blend->mvar_table ) + { + ft_var_done_item_variation_store( face, + &blend->mvar_table->itemStore ); + + FT_FREE( blend->mvar_table->values ); + FT_FREE( blend->mvar_table ); + } + FT_FREE( blend->tuplecoords ); FT_FREE( blend->glyphoffsets ); FT_FREE( blend ); @@ -2990,7 +3708,12 @@ } } -#endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */ +#else /* !TT_CONFIG_OPTION_GX_VAR_SUPPORT */ + /* ANSI C doesn't like empty source files */ + typedef int _tt_gxvar_dummy; +#endif /* !TT_CONFIG_OPTION_GX_VAR_SUPPORT */ + + /* END */ Index: reactos/sdk/lib/3rdparty/freetype/src/truetype/ttgxvar.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/truetype/ttgxvar.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/truetype/ttgxvar.h (working copy) @@ -4,7 +4,7 @@ /* */ /* TrueType GX Font Variation loader (specification) */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* David Turner, Robert Wilhelm, Werner Lemberg and George Williams. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -61,7 +61,7 @@ } GX_AVarSegmentRec, *GX_AVarSegment; - typedef struct GX_HVarDataRec_ + typedef struct GX_ItemVarDataRec_ { FT_UInt itemCount; /* number of delta sets per item */ FT_UInt regionIdxCount; /* number of region indices in this data */ @@ -70,7 +70,7 @@ FT_Short* deltaSet; /* array of `itemCount' deltas */ /* use `innerIndex' for this array */ - } GX_HVarDataRec, *GX_HVarData; + } GX_ItemVarDataRec, *GX_ItemVarData; /* contribution of one axis to a region */ @@ -83,93 +83,251 @@ } GX_AxisCoordsRec, *GX_AxisCoords; - typedef struct GX_HVarRegionRec_ + typedef struct GX_VarRegionRec_ { GX_AxisCoords axisList; /* array of axisCount records */ - } GX_HVarRegionRec, *GX_HVarRegion; + } GX_VarRegionRec, *GX_VarRegion; - /* HVAR item variation store */ - typedef struct GX_HVStoreRec_ + /* item variation store */ + typedef struct GX_ItemVarStoreRec_ { - FT_UInt dataCount; - GX_HVarData varData; /* array of dataCount records; */ - /* use `outerIndex' for this array */ - FT_UShort axisCount; - FT_UInt regionCount; /* total number of regions defined */ - GX_HVarRegion varRegionList; + FT_UInt dataCount; + GX_ItemVarData varData; /* array of dataCount records; */ + /* use `outerIndex' for this array */ + FT_UShort axisCount; + FT_UInt regionCount; /* total number of regions defined */ + GX_VarRegion varRegionList; - } GX_HVStoreRec, *GX_HVStore; + } GX_ItemVarStoreRec, *GX_ItemVarStore; - typedef struct GX_WidthMapRec_ + typedef struct GX_DeltaSetIdxMapRec_ { FT_UInt mapCount; FT_UInt* outerIndex; /* indices to item var data */ FT_UInt* innerIndex; /* indices to delta set */ - } GX_WidthMapRec, *GX_WidthMap; + } GX_DeltaSetIdxMapRec, *GX_DeltaSetIdxMap; /*************************************************************************/ /* */ /* <Struct> */ - /* GX_HVarTableRec */ + /* GX_HVVarTableRec */ /* */ /* <Description> */ - /* Data from the `HVAR' table. */ + /* Data from either the `HVAR' or `VVAR' table. */ /* */ - typedef struct GX_HVarTableRec_ + typedef struct GX_HVVarTableRec_ { - GX_HVStoreRec itemStore; /* Item Variation Store */ - GX_WidthMapRec widthMap; /* Advance Width Mapping */ + GX_ItemVarStoreRec itemStore; /* Item Variation Store */ + GX_DeltaSetIdxMapRec widthMap; /* Advance Width Mapping */ + #if 0 - GX_LSBMap LsbMap; /* not implemented */ - GX_RSBMap RsbMap; /* not implemented */ + GX_DeltaSetIdxMapRec lsbMap; /* not implemented */ + GX_DeltaSetIdxMapRec rsbMap; /* not implemented */ + + GX_DeltaSetIdxMapRec tsbMap; /* not implemented */ + GX_DeltaSetIdxMapRec bsbMap; /* not implemented */ + GX_DeltaSetIdxMapRec vorgMap; /* not implemented */ #endif - } GX_HVarTableRec, *GX_HVarTable; + } GX_HVVarTableRec, *GX_HVVarTable; +#define MVAR_TAG_GASP_0 FT_MAKE_TAG( 'g', 's', 'p', '0' ) +#define MVAR_TAG_GASP_1 FT_MAKE_TAG( 'g', 's', 'p', '1' ) +#define MVAR_TAG_GASP_2 FT_MAKE_TAG( 'g', 's', 'p', '2' ) +#define MVAR_TAG_GASP_3 FT_MAKE_TAG( 'g', 's', 'p', '3' ) +#define MVAR_TAG_GASP_4 FT_MAKE_TAG( 'g', 's', 'p', '4' ) +#define MVAR_TAG_GASP_5 FT_MAKE_TAG( 'g', 's', 'p', '5' ) +#define MVAR_TAG_GASP_6 FT_MAKE_TAG( 'g', 's', 'p', '6' ) +#define MVAR_TAG_GASP_7 FT_MAKE_TAG( 'g', 's', 'p', '7' ) +#define MVAR_TAG_GASP_8 FT_MAKE_TAG( 'g', 's', 'p', '8' ) +#define MVAR_TAG_GASP_9 FT_MAKE_TAG( 'g', 's', 'p', '9' ) + +#define MVAR_TAG_CPHT FT_MAKE_TAG( 'c', 'p', 'h', 't' ) +#define MVAR_TAG_HASC FT_MAKE_TAG( 'h', 'a', 's', 'c' ) +#define MVAR_TAG_HCLA FT_MAKE_TAG( 'h', 'c', 'l', 'a' ) +#define MVAR_TAG_HCLD FT_MAKE_TAG( 'h', 'c', 'l', 'd' ) +#define MVAR_TAG_HCOF FT_MAKE_TAG( 'h', 'c', 'o', 'f' ) +#define MVAR_TAG_HCRN FT_MAKE_TAG( 'h', 'c', 'r', 'n' ) +#define MVAR_TAG_HCRS FT_MAKE_TAG( 'h', 'c', 'r', 's' ) +#define MVAR_TAG_HDSC FT_MAKE_TAG( 'h', 'd', 's', 'c' ) +#define MVAR_TAG_HLGP FT_MAKE_TAG( 'h', 'l', 'g', 'p' ) +#define MVAR_TAG_SBXO FT_MAKE_TAG( 's', 'b', 'x', 'o' ) +#define MVAR_TAG_SBXS FT_MAKE_TAG( 's', 'b', 'x', 's' ) +#define MVAR_TAG_SBYO FT_MAKE_TAG( 's', 'b', 'y', 'o' ) +#define MVAR_TAG_SBYS FT_MAKE_TAG( 's', 'b', 'y', 's' ) +#define MVAR_TAG_SPXO FT_MAKE_TAG( 's', 'p', 'x', 'o' ) +#define MVAR_TAG_SPXS FT_MAKE_TAG( 's', 'p', 'x', 's' ) +#define MVAR_TAG_SPYO FT_MAKE_TAG( 's', 'p', 'y', 'o' ) +#define MVAR_TAG_SPYS FT_MAKE_TAG( 's', 'p', 'y', 's' ) +#define MVAR_TAG_STRO FT_MAKE_TAG( 's', 't', 'r', 'o' ) +#define MVAR_TAG_STRS FT_MAKE_TAG( 's', 't', 'r', 's' ) +#define MVAR_TAG_UNDO FT_MAKE_TAG( 'u', 'n', 'd', 'o' ) +#define MVAR_TAG_UNDS FT_MAKE_TAG( 'u', 'n', 'd', 's' ) +#define MVAR_TAG_VASC FT_MAKE_TAG( 'v', 'a', 's', 'c' ) +#define MVAR_TAG_VCOF FT_MAKE_TAG( 'v', 'c', 'o', 'f' ) +#define MVAR_TAG_VCRN FT_MAKE_TAG( 'v', 'c', 'r', 'n' ) +#define MVAR_TAG_VCRS FT_MAKE_TAG( 'v', 'c', 'r', 's' ) +#define MVAR_TAG_VDSC FT_MAKE_TAG( 'v', 'd', 's', 'c' ) +#define MVAR_TAG_VLGP FT_MAKE_TAG( 'v', 'l', 'g', 'p' ) +#define MVAR_TAG_XHGT FT_MAKE_TAG( 'x', 'h', 'g', 't' ) + + + typedef struct GX_ValueRec_ + { + FT_ULong tag; + FT_UShort outerIndex; + FT_UShort innerIndex; + + FT_Short unmodified; /* values are either FT_Short or FT_UShort */ + + } GX_ValueRec, *GX_Value; + + /*************************************************************************/ /* */ /* <Struct> */ + /* GX_MVarTableRec */ + /* */ + /* <Description> */ + /* Data from the `MVAR' table. */ + /* */ + typedef struct GX_MVarTableRec_ + { + FT_UShort valueCount; + + GX_ItemVarStoreRec itemStore; /* Item Variation Store */ + GX_Value values; /* Value Records */ + + } GX_MVarTableRec, *GX_MVarTable; + + + /*************************************************************************/ + /* */ + /* <Struct> */ /* GX_BlendRec */ /* */ /* <Description> */ /* Data for interpolating a font from a distortable font specified */ - /* by the GX *var tables ([fgca]var). */ + /* by the GX *var tables ([fgcahvm]var). */ /* */ /* <Fields> */ - /* num_axis :: The number of axes along which interpolation */ - /* may happen */ + /* num_axis :: */ + /* The number of axes along which interpolation may happen. */ /* */ - /* normalizedcoords :: A normalized value (between [-1,1]) indicating */ - /* the contribution along each axis to the final */ - /* interpolated font. */ + /* coords :: */ + /* An array of design coordinates (in user space) indicating the */ + /* contribution along each axis to the final interpolated font. */ + /* `normalizedcoords' holds the same values. */ /* */ + /* normalizedcoords :: */ + /* An array of normalized values (between [-1,1]) indicating the */ + /* contribution along each axis to the final interpolated font. */ + /* `coords' holds the same values. */ + /* */ + /* mmvar :: */ + /* Data from the `fvar' table. */ + /* */ + /* mmvar_len :: */ + /* The length of the `mmvar' structure. */ + /* */ + /* normalized_stylecoords :: */ + /* A two-dimensional array that holds the named instance data from */ + /* `mmvar' as normalized values. */ + /* */ + /* avar_loaded :: */ + /* A Boolean; if set, FreeType tried to load (and parse) the `avar' */ + /* table. */ + /* */ + /* avar_segment :: */ + /* Data from the `avar' table. */ + /* */ + /* hvar_loaded :: */ + /* A Boolean; if set, FreeType tried to load (and parse) the `hvar' */ + /* table. */ + /* */ + /* hvar_checked :: */ + /* A Boolean; if set, FreeType successfully loaded and parsed the */ + /* `hvar' table. */ + /* */ + /* hvar_error :: */ + /* If loading and parsing of the `hvar' table failed, this field */ + /* holds the corresponding error code. */ + /* */ + /* hvar_table :: */ + /* Data from the `hvar' table. */ + /* */ + /* vvar_loaded :: */ + /* A Boolean; if set, FreeType tried to load (and parse) the `vvar' */ + /* table. */ + /* */ + /* vvar_checked :: */ + /* A Boolean; if set, FreeType successfully loaded and parsed the */ + /* `vvar' table. */ + /* */ + /* vvar_error :: */ + /* If loading and parsing of the `vvar' table failed, this field */ + /* holds the corresponding error code. */ + /* */ + /* vvar_table :: */ + /* Data from the `vvar' table. */ + /* */ + /* mvar_table :: */ + /* Data from the `mvar' table. */ + /* */ + /* tuplecount :: */ + /* The number of shared tuples in the `gvar' table. */ + /* */ + /* tuplecoords :: */ + /* A two-dimensional array that holds the shared tuple coordinates */ + /* in the `gvar' table. */ + /* */ + /* gv_glyphcnt :: */ + /* The number of glyphs handled in the `gvar' table. */ + /* */ + /* glyphoffsets :: */ + /* Offsets into the glyph variation data array. */ + /* */ + /* gvar_size :: */ + /* The size of the `gvar' table. */ + /* */ typedef struct GX_BlendRec_ { FT_UInt num_axis; + FT_Fixed* coords; FT_Fixed* normalizedcoords; FT_MM_Var* mmvar; FT_Offset mmvar_len; - FT_Bool avar_checked; - GX_AVarSegment avar_segment; + FT_Fixed* normalized_stylecoords; + /* normalized_stylecoords[num_namedstyles][num_axis] */ + FT_Bool avar_loaded; + GX_AVarSegment avar_segment; /* avar_segment[num_axis] */ + FT_Bool hvar_loaded; FT_Bool hvar_checked; FT_Error hvar_error; - GX_HVarTable hvar_table; + GX_HVVarTable hvar_table; - FT_UInt tuplecount; /* shared tuples in `gvar' */ - FT_Fixed* tuplecoords; /* tuplecoords[tuplecount][num_axis] */ + FT_Bool vvar_loaded; + FT_Bool vvar_checked; + FT_Error vvar_error; + GX_HVVarTable vvar_table; + GX_MVarTable mvar_table; + + FT_UInt tuplecount; + FT_Fixed* tuplecoords; /* tuplecoords[tuplecount][num_axis] */ + FT_UInt gv_glyphcnt; - FT_ULong* glyphoffsets; + FT_ULong* glyphoffsets; /* glyphoffsets[gv_glyphcnt + 1] */ FT_ULong gvar_size; @@ -260,9 +418,18 @@ FT_Int *adelta ); FT_LOCAL( FT_Error ) + tt_vadvance_adjust( TT_Face face, + FT_UInt gindex, + FT_Int *adelta ); + + FT_LOCAL( void ) + tt_apply_mvar( TT_Face face ); + + FT_LOCAL( FT_Error ) tt_get_var_blend( TT_Face face, FT_UInt *num_coords, FT_Fixed* *coords, + FT_Fixed* *normalizedcoords, FT_MM_Var* *mm_var ); FT_LOCAL( void ) Index: reactos/sdk/lib/3rdparty/freetype/src/truetype/ttinterp.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/truetype/ttinterp.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/truetype/ttinterp.c (working copy) @@ -4,7 +4,7 @@ /* */ /* TrueType bytecode interpreter (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -402,7 +402,7 @@ exec->IDefs = size->instruction_defs; exec->pointSize = size->point_size; exec->tt_metrics = size->ttmetrics; - exec->metrics = size->metrics; + exec->metrics = *size->metrics; exec->maxFunc = size->max_func; exec->maxIns = size->max_ins; @@ -1656,7 +1656,7 @@ /* zone :: The affected glyph zone. */ /* */ /* <Note> */ - /* See `ttinterp.h' for details on backwards compatibility mode. */ + /* See `ttinterp.h' for details on backward compatibility mode. */ /* `Touches' the point. */ /* */ static void @@ -1684,7 +1684,7 @@ /* Exception to the post-IUP curfew: Allow the x component of */ /* diagonal moves, but only post-IUP. DejaVu tries to adjust */ /* diagonal stems like on `Z' and `z' post-IUP. */ - if ( SUBPIXEL_HINTING_MINIMAL && !exc->backwards_compatibility ) + if ( SUBPIXEL_HINTING_MINIMAL && !exc->backward_compatibility ) zone->cur[point].x += FT_MulDiv( distance, v, exc->F_dot_P ); else #endif @@ -1700,10 +1700,10 @@ if ( v != 0 ) { #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL - if ( !( SUBPIXEL_HINTING_MINIMAL && - exc->backwards_compatibility && - exc->iupx_called && - exc->iupy_called ) ) + if ( !( SUBPIXEL_HINTING_MINIMAL && + exc->backward_compatibility && + exc->iupx_called && + exc->iupy_called ) ) #endif zone->cur[point].y += FT_MulDiv( distance, v, exc->F_dot_P ); @@ -1756,7 +1756,7 @@ /* */ /* The following versions are used whenever both vectors are both */ /* along one of the coordinate unit vectors, i.e. in 90% of the cases. */ - /* See `ttinterp.h' for details on backwards compatibility mode. */ + /* See `ttinterp.h' for details on backward compatibility mode. */ /* */ /*************************************************************************/ @@ -1774,7 +1774,7 @@ #endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */ #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL - if ( SUBPIXEL_HINTING_MINIMAL && !exc->backwards_compatibility ) + if ( SUBPIXEL_HINTING_MINIMAL && !exc->backward_compatibility ) zone->cur[point].x += distance; else #endif @@ -1796,7 +1796,7 @@ #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL if ( !( SUBPIXEL_HINTING_MINIMAL && - exc->backwards_compatibility && + exc->backward_compatibility && exc->iupx_called && exc->iupy_called ) ) #endif zone->cur[point].y += distance; @@ -3564,6 +3564,13 @@ #endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */ + /* FDEF is only allowed in `prep' or `fpgm' */ + if ( exc->curRange == tt_coderange_glyph ) + { + exc->error = FT_THROW( DEF_In_Glyf_Bytecode ); + return; + } + /* some font programs are broken enough to redefine functions! */ /* We will then parse the current table. */ @@ -3990,6 +3997,13 @@ TT_DefRecord* limit; + /* we enable IDEF only in `prep' or `fpgm' */ + if ( exc->curRange == tt_coderange_glyph ) + { + exc->error = FT_THROW( DEF_In_Glyf_Bytecode ); + return; + } + /* First of all, look for the same function in our table */ def = exc->IDefs; @@ -5112,11 +5126,11 @@ #endif #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL - /* Native ClearType fonts sign a waiver that turns off all backwards */ + /* Native ClearType fonts sign a waiver that turns off all backward */ /* compatibility hacks and lets them program points to the grid like */ /* it's 1996. They might sign a waiver for just one glyph, though. */ if ( SUBPIXEL_HINTING_MINIMAL ) - exc->backwards_compatibility = !FT_BOOL( L == 4 ); + exc->backward_compatibility = !FT_BOOL( L == 4 ); #endif } } @@ -5204,11 +5218,11 @@ #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL - /* See `ttinterp.h' for details on backwards compatibility mode. */ - if ( SUBPIXEL_HINTING_MINIMAL && - exc->backwards_compatibility && - exc->iupx_called && - exc->iupy_called ) + /* See `ttinterp.h' for details on backward compatibility mode. */ + if ( SUBPIXEL_HINTING_MINIMAL && + exc->backward_compatibility && + exc->iupx_called && + exc->iupy_called ) goto Fail; #endif @@ -5259,11 +5273,11 @@ #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL - /* See `ttinterp.h' for details on backwards compatibility mode. */ - if ( SUBPIXEL_HINTING_MINIMAL && - exc->backwards_compatibility && - exc->iupx_called && - exc->iupy_called ) + /* See `ttinterp.h' for details on backward compatibility mode. */ + if ( SUBPIXEL_HINTING_MINIMAL && + exc->backward_compatibility && + exc->iupx_called && + exc->iupy_called ) return; #endif @@ -5297,11 +5311,11 @@ #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL - /* See `ttinterp.h' for details on backwards compatibility mode. */ - if ( SUBPIXEL_HINTING_MINIMAL && - exc->backwards_compatibility && - exc->iupx_called && - exc->iupy_called ) + /* See `ttinterp.h' for details on backward compatibility mode. */ + if ( SUBPIXEL_HINTING_MINIMAL && + exc->backward_compatibility && + exc->iupx_called && + exc->iupy_called ) return; #endif @@ -5364,7 +5378,7 @@ } - /* See `ttinterp.h' for details on backwards compatibility mode. */ + /* See `ttinterp.h' for details on backward compatibility mode. */ static void Move_Zp2_Point( TT_ExecContext exc, FT_UShort point, @@ -5375,8 +5389,8 @@ if ( exc->GS.freeVector.x != 0 ) { #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL - if ( !( SUBPIXEL_HINTING_MINIMAL && - exc->backwards_compatibility ) ) + if ( !( SUBPIXEL_HINTING_MINIMAL && + exc->backward_compatibility ) ) #endif exc->zp2.cur[point].x += dx; @@ -5387,10 +5401,10 @@ if ( exc->GS.freeVector.y != 0 ) { #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL - if ( !( SUBPIXEL_HINTING_MINIMAL && - exc->backwards_compatibility && - exc->iupx_called && - exc->iupy_called ) ) + if ( !( SUBPIXEL_HINTING_MINIMAL && + exc->backward_compatibility && + exc->iupx_called && + exc->iupy_called ) ) #endif exc->zp2.cur[point].y += dy; @@ -5687,14 +5701,14 @@ else #endif #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL - if ( SUBPIXEL_HINTING_MINIMAL && - exc->backwards_compatibility ) + if ( SUBPIXEL_HINTING_MINIMAL && + exc->backward_compatibility ) { /* Special case: allow SHPIX to move points in the twilight zone. */ /* Otherwise, treat SHPIX the same as DELTAP. Unbreaks various */ /* fonts such as older versions of Rokkitt and DTL Argo T Light */ - /* that would glitch severly after calling ALIGNRP after a blocked */ - /* SHPIX. */ + /* that would glitch severely after calling ALIGNRP after a */ + /* blocked SHPIX. */ if ( in_twilight || ( !( exc->iupx_called && exc->iupy_called ) && ( ( exc->is_composite && exc->GS.freeVector.y != 0 ) || @@ -6452,7 +6466,7 @@ R.x = FT_MulDiv( val, dax, discriminant ); R.y = FT_MulDiv( val, day, discriminant ); - /* XXX: Block in backwards_compatibility and/or post-IUP? */ + /* XXX: Block in backward_compatibility and/or post-IUP? */ exc->zp2.cur[point].x = exc->zp1.cur[a0].x + R.x; exc->zp2.cur[point].y = exc->zp1.cur[a0].y + R.y; } @@ -6460,7 +6474,7 @@ { /* else, take the middle of the middles of A and B */ - /* XXX: Block in backwards_compatibility and/or post-IUP? */ + /* XXX: Block in backward_compatibility and/or post-IUP? */ exc->zp2.cur[point].x = ( exc->zp1.cur[a0].x + exc->zp1.cur[a1].x + exc->zp0.cur[b0].x + @@ -6852,11 +6866,11 @@ #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL - /* See `ttinterp.h' for details on backwards compatibility mode. */ + /* See `ttinterp.h' for details on backward compatibility mode. */ /* Allow IUP until it has been called on both axes. Immediately */ /* return on subsequent ones. */ - if ( SUBPIXEL_HINTING_MINIMAL && - exc->backwards_compatibility ) + if ( SUBPIXEL_HINTING_MINIMAL && + exc->backward_compatibility ) { if ( exc->iupx_called && exc->iupy_called ) return; @@ -7098,10 +7112,10 @@ { #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL - /* See `ttinterp.h' for details on backwards compatibility */ - /* mode. */ - if ( SUBPIXEL_HINTING_MINIMAL && - exc->backwards_compatibility ) + /* See `ttinterp.h' for details on backward compatibility */ + /* mode. */ + if ( SUBPIXEL_HINTING_MINIMAL && + exc->backward_compatibility ) { if ( !( exc->iupx_called && exc->iupy_called ) && ( ( exc->is_composite && exc->GS.freeVector.y != 0 ) || @@ -7245,7 +7259,7 @@ { if ( exc->ignore_x_mode ) { - /* if in ClearType backwards compatibility mode, */ + /* if in ClearType backward compatibility mode, */ /* we sometimes change the TrueType version dynamically */ K = exc->rasterizer_version; FT_TRACE6(( "Setting rasterizer version %d\n", @@ -7575,15 +7589,15 @@ #endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */ #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL - /* Toggle backwards compatibility according to what font says, except */ + /* Toggle backward compatibility according to what font says, except */ /* when it's a `tricky' font that heavily relies on the interpreter to */ - /* render glyphs correctly, e.g. DFKai-SB. Backwards compatibility */ + /* render glyphs correctly, e.g. DFKai-SB. Backward compatibility */ /* hacks may break it. */ if ( SUBPIXEL_HINTING_MINIMAL && !FT_IS_TRICKY( &exc->face->root ) ) - exc->backwards_compatibility = !( exc->GS.instruct_control & 4 ); + exc->backward_compatibility = !( exc->GS.instruct_control & 4 ); else - exc->backwards_compatibility = FALSE; + exc->backward_compatibility = FALSE; exc->iupx_called = FALSE; exc->iupy_called = FALSE; @@ -7605,21 +7619,35 @@ exc->twilight.n_points = (FT_UShort)num_twilight_points; } - /* Set up loop detectors. We restrict the number of LOOPCALL loops */ - /* and the number of JMPR, JROT, and JROF calls with a negative */ - /* argument to values that depend on the size of the CVT table and */ - /* the number of points in the current glyph (if applicable). */ - /* */ - /* The idea is that in real-world bytecode you either iterate over */ - /* all CVT entries, or over all points (or contours) of a glyph, and */ - /* such iterations don't happen very often. */ + /* Set up loop detectors. We restrict the number of LOOPCALL loops */ + /* and the number of JMPR, JROT, and JROF calls with a negative */ + /* argument to values that depend on various parameters like the */ + /* size of the CVT table or the number of points in the current */ + /* glyph (if applicable). */ + /* */ + /* The idea is that in real-world bytecode you either iterate over */ + /* all CVT entries (in the `prep' table), or over all points (or */ + /* contours, in the `glyf' table) of a glyph, and such iterations */ + /* don't happen very often. */ exc->loopcall_counter = 0; exc->neg_jump_counter = 0; /* The maximum values are heuristic. */ - exc->loopcall_counter_max = FT_MAX( 100, - 10 * ( exc->pts.n_points + - exc->cvtSize ) ); + if ( exc->pts.n_points ) + exc->loopcall_counter_max = FT_MAX( 50, + 10 * exc->pts.n_points ) + + FT_MAX( 50, + exc->cvtSize / 10 ); + else + exc->loopcall_counter_max = FT_MAX( 100, + 10 * exc->cvtSize ); + + /* as a protection against an unreasonable number of CVT entries */ + /* we assume at most 100 control values per glyph for the counter */ + if ( exc->loopcall_counter_max > + 100 * (FT_ULong)exc->face->root.num_glyphs ) + exc->loopcall_counter_max = 100 * (FT_ULong)exc->face->root.num_glyphs; + FT_TRACE5(( "TT_RunIns: Limiting total number of loops in LOOPCALL" " to %d\n", exc->loopcall_counter_max )); @@ -8394,23 +8422,18 @@ exc->error = FT_THROW( Code_Overflow ); LErrorLabel_: - /* If any errors have occurred, function tables may be broken. */ - /* Force a re-execution of `prep' and `fpgm' tables if no */ - /* bytecode debugger is run. */ - if ( exc->error && - !exc->instruction_trap && - exc->curRange == tt_coderange_glyph ) - { + if ( exc->error && !exc->instruction_trap ) FT_TRACE1(( " The interpreter returned error 0x%x\n", exc->error )); - exc->size->bytecode_ready = -1; - exc->size->cvt_ready = -1; - } return exc->error; } +#else /* !TT_USE_BYTECODE_INTERPRETER */ -#endif /* TT_USE_BYTECODE_INTERPRETER */ + /* ANSI C doesn't like empty source files */ + typedef int _tt_interp_dummy; +#endif /* !TT_USE_BYTECODE_INTERPRETER */ + /* END */ Index: reactos/sdk/lib/3rdparty/freetype/src/truetype/ttinterp.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/truetype/ttinterp.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/truetype/ttinterp.h (working copy) @@ -4,7 +4,7 @@ /* */ /* TrueType bytecode interpreter (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -256,7 +256,7 @@ * Modern TrueType fonts are usually rendered through Microsoft's * collection of rendering techniques called ClearType (e.g., subpixel * rendering and subpixel hinting). When ClearType was introduced, most - * fonts were not ready. Microsoft decided to implement a backwards + * fonts were not ready. Microsoft decided to implement a backward * compatibility mode that employed several simple to complicated * assumptions and tricks that modified the interpretation of the * bytecode contained in these fonts to make them look ClearType-y @@ -316,12 +316,12 @@ * very specific patterns (`superhinting') for pre-ClearType-displays, * the worse the results. * - * Microsoft defines a way to turn off backwards compatibility and + * Microsoft defines a way to turn off backward compatibility and * interpret instructions as before (called `native ClearType')[2][3]. * The font designer then regains full control and is responsible for * making the font work correctly with ClearType without any * hand-holding by the interpreter or rasterizer[4]. The v40 - * interpreter assumes backwards compatibility by default, which can be + * interpreter assumes backward compatibility by default, which can be * turned off the same way by executing the following in the control * program (cf. `Ins_INSTCTRL'). * @@ -331,7 +331,7 @@ * [1] Tricky fonts as FreeType defines them rely on the bytecode * interpreter to display correctly. Hacks can interfere with them, * so they get treated like native ClearType fonts (v40 with - * backwards compatibility turned off). Cf. `TT_RunIns'. + * backward compatibility turned off). Cf. `TT_RunIns'. * * [2] Proposed by Microsoft's Greg Hitchcock in * https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx @@ -357,10 +357,10 @@ /* is managed differently. */ FT_Bool vertical_lcd_lean; - /* Default to backwards compatibility mode in v40 interpreter. If */ + /* Default to backward compatibility mode in v40 interpreter. If */ /* this is false, it implies the interpreter is in v35 or in native */ /* ClearType mode. */ - FT_Bool backwards_compatibility; + FT_Bool backward_compatibility; /* Useful for detecting and denying post-IUP trickery that is usually */ /* used to fix pixel patterns (`superhinting'). */ Index: reactos/sdk/lib/3rdparty/freetype/src/truetype/ttobjs.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/truetype/ttobjs.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/truetype/ttobjs.c (working copy) @@ -4,7 +4,7 @@ /* */ /* Objects manager (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -147,20 +147,43 @@ { #define TRICK_NAMES_MAX_CHARACTERS 19 -#define TRICK_NAMES_COUNT 9 +#define TRICK_NAMES_COUNT 18 static const char trick_names[TRICK_NAMES_COUNT] [TRICK_NAMES_MAX_CHARACTERS + 1] = { + /* + PostScript names are given in brackets if they differ from the + family name. The version numbers, together with the copyright or + release year data, are taken from fonts available to the + developers. + + Note that later versions of the fonts might be no longer tricky; + for example, `MingLiU' version 7.00 (file `mingliu.ttc' from + Windows 7) is an ordinary TTC with non-tricky subfonts. + */ + + "cpop", /* dftt-p7.ttf; version 1.00, 1992 [DLJGyShoMedium] */ + "DFGirl-W6-WIN-BF", /* dftt-h6.ttf; version 1.00, 1993 */ "DFKaiSho-SB", /* dfkaisb.ttf */ "DFKaiShu", - "DFKai-SB", /* kaiu.ttf */ + "DFKai-SB", /* kaiu.ttf; version 3.00, 1998 [DFKaiShu-SB-Estd-BF] */ + "DLC", /* dftt-m7.ttf; version 1.00, 1993 [DLCMingBold] */ + /* dftt-f5.ttf; version 1.00, 1993 [DLCFongSung] */ + "DLCHayMedium", /* dftt-b5.ttf; version 1.00, 1993 */ + "DLCHayBold", /* dftt-b7.ttf; version 1.00, 1993 */ + "DLCKaiMedium", /* dftt-k5.ttf; version 1.00, 1992 */ + "DLCLiShu", /* dftt-l5.ttf; version 1.00, 1992 */ + "DLCRoundBold", /* dftt-r7.ttf; version 1.00, 1993 */ "HuaTianKaiTi?", /* htkt2.ttf */ "HuaTianSongTi?", /* htst3.ttf */ - "Ming(for ISO10646)", /* hkscsiic.ttf & iicore.ttf */ - "MingLiU", /* mingliu.ttf & mingliu.ttc */ - "PMingLiU", /* mingliu.ttc */ - "MingLi43", /* mingli.ttf */ + "Ming(for ISO10646)", /* hkscsiic.ttf; version 0.12, 2007 [Ming] */ + /* iicore.ttf; version 0.07, 2007 [Ming] */ + "MingLiU", /* mingliu.ttf */ + /* mingliu.ttc; version 3.21, 2001 */ + "MingMedium", /* dftt-m5.ttf; version 1.00, 1993 [DLCMingMedium] */ + "PMingLiU", /* mingliu.ttc; version 3.21, 2001 */ + "MingLi43", /* mingli.ttf; version 1.00, 1992 */ }; int nn; @@ -242,7 +265,7 @@ tt_check_trickyness_sfnt_ids( TT_Face face ) { #define TRICK_SFNT_IDS_PER_FACE 3 -#define TRICK_SFNT_IDS_NUM_FACES 18 +#define TRICK_SFNT_IDS_NUM_FACES 19 static const tt_sfnt_id_rec sfnt_id[TRICK_SFNT_IDS_NUM_FACES] [TRICK_SFNT_IDS_PER_FACE] = { @@ -266,7 +289,7 @@ { 0x5A30CA3BUL, 0x00009063UL }, /* fpgm */ { 0x13A42602UL, 0x0000007EUL } /* prep */ }, - { /* DFKaiShu2 */ + { /* DFKaiShu, variant */ { 0x11E5EAD4UL, 0x00000350UL }, /* cvt */ { 0xA6E78C01UL, 0x00008998UL }, /* fpgm */ { 0x13A42602UL, 0x0000007EUL } /* prep */ @@ -340,6 +363,11 @@ { 0x00000000UL, 0x00000000UL }, /* cvt */ { 0xF055FC48UL, 0x000001C2UL }, /* fpgm */ { 0x3900DED3UL, 0x00001E18UL } /* prep */ + }, + { /* MINGLI.TTF, 1992 */ + { 0x00170003UL, 0x00000060UL }, /* cvt */ + { 0xDBB4306EUL, 0x000058AAUL }, /* fpgm */ + { 0xD643482AUL, 0x00000035UL } /* prep */ } }; @@ -536,6 +564,7 @@ goto Exit; /* check that we have a valid TrueType file */ + FT_TRACE2(( " " )); error = sfnt->init_face( stream, face, face_index, num_params, params ); /* Stream may have changed. */ @@ -663,6 +692,8 @@ named_style->coords ); if ( error ) goto Exit; + + tt_apply_mvar( face ); } } } @@ -789,14 +820,14 @@ exec->pedantic_hinting = pedantic; { - FT_Size_Metrics* metrics = &exec->metrics; - TT_Size_Metrics* tt_metrics = &exec->tt_metrics; + FT_Size_Metrics* size_metrics = &exec->metrics; + TT_Size_Metrics* tt_metrics = &exec->tt_metrics; - metrics->x_ppem = 0; - metrics->y_ppem = 0; - metrics->x_scale = 0; - metrics->y_scale = 0; + size_metrics->x_ppem = 0; + size_metrics->y_ppem = 0; + size_metrics->x_scale = 0; + size_metrics->y_scale = 0; tt_metrics->ppem = 0; tt_metrics->scale = 0; @@ -819,6 +850,11 @@ FT_TRACE4(( "Executing `fpgm' table.\n" )); error = face->interpreter( exec ); +#ifdef FT_DEBUG_LEVEL_TRACE + if ( error ) + FT_TRACE4(( " interpretation failed with error code 0x%x\n", + error )); +#endif } else error = FT_Err_Ok; @@ -882,8 +918,12 @@ TT_Goto_CodeRange( exec, tt_coderange_cvt, 0 ); FT_TRACE4(( "Executing `prep' table.\n" )); - error = face->interpreter( exec ); +#ifdef FT_DEBUG_LEVEL_TRACE + if ( error ) + FT_TRACE4(( " interpretation failed with error code 0x%x\n", + error )); +#endif } else error = FT_Err_Ok; @@ -1002,17 +1042,17 @@ /* Set default metrics */ { - TT_Size_Metrics* metrics = &size->ttmetrics; + TT_Size_Metrics* tt_metrics = &size->ttmetrics; - metrics->rotated = FALSE; - metrics->stretched = FALSE; + tt_metrics->rotated = FALSE; + tt_metrics->stretched = FALSE; /* set default engine compensation */ - metrics->compensations[0] = 0; /* gray */ - metrics->compensations[1] = 0; /* black */ - metrics->compensations[2] = 0; /* white */ - metrics->compensations[3] = 0; /* reserved */ + tt_metrics->compensations[0] = 0; /* gray */ + tt_metrics->compensations[1] = 0; /* black */ + tt_metrics->compensations[2] = 0; /* white */ + tt_metrics->compensations[3] = 0; /* reserved */ } /* allocate function defs, instruction defs, cvt, and storage area */ @@ -1075,8 +1115,10 @@ if ( size->bytecode_ready < 0 ) error = tt_size_init_bytecode( (FT_Size)size, pedantic ); + else + error = size->bytecode_ready; - if ( error || size->bytecode_ready ) + if ( error ) goto Exit; /* rescale CVT when needed */ @@ -1108,6 +1150,8 @@ error = tt_size_run_prep( size, pedantic ); } + else + error = size->cvt_ready; Exit: return error; @@ -1184,26 +1228,32 @@ /* have been changed. */ /* */ /* <Input> */ - /* size :: A handle to the target size object. */ + /* size :: A handle to the target size object. */ /* */ + /* only_height :: Only recompute ascender, descender, and height. */ + /* */ FT_LOCAL_DEF( FT_Error ) - tt_size_reset( TT_Size size ) + tt_size_reset( TT_Size size, + FT_Bool only_height ) { TT_Face face; - FT_Error error = FT_Err_Ok; - FT_Size_Metrics* metrics; + FT_Size_Metrics* size_metrics; + face = (TT_Face)size->root.face; + + /* nothing to do for CFF2 */ + if ( face->is_cff2 ) + return FT_Err_Ok; + size->ttmetrics.valid = FALSE; - face = (TT_Face)size->root.face; + size_metrics = &size->hinted_metrics; - metrics = &size->metrics; - /* copy the result from base layer */ - *metrics = size->root.metrics; + *size_metrics = size->root.metrics; - if ( metrics->x_ppem < 1 || metrics->y_ppem < 1 ) + if ( size_metrics->x_ppem < 1 || size_metrics->y_ppem < 1 ) return FT_THROW( Invalid_PPem ); /* This bit flag, if set, indicates that the ppems must be */ @@ -1212,48 +1262,62 @@ /* */ if ( face->header.Flags & 8 ) { - metrics->x_scale = FT_DivFix( metrics->x_ppem << 6, - face->root.units_per_EM ); - metrics->y_scale = FT_DivFix( metrics->y_ppem << 6, - face->root.units_per_EM ); + /* the TT spec always asks for ROUND, not FLOOR or CEIL */ + size_metrics->ascender = FT_PIX_ROUND( + FT_MulFix( face->root.ascender, + size_metrics->y_scale ) ); + size_metrics->descender = FT_PIX_ROUND( + FT_MulFix( face->root.descender, + size_metrics->y_scale ) ); + size_metrics->height = FT_PIX_ROUND( + FT_MulFix( face->root.height, + size_metrics->y_scale ) ); + } - metrics->ascender = - FT_PIX_ROUND( FT_MulFix( face->root.ascender, metrics->y_scale ) ); - metrics->descender = - FT_PIX_ROUND( FT_MulFix( face->root.descender, metrics->y_scale ) ); - metrics->height = - FT_PIX_ROUND( FT_MulFix( face->root.height, metrics->y_scale ) ); - metrics->max_advance = - FT_PIX_ROUND( FT_MulFix( face->root.max_advance_width, - metrics->x_scale ) ); + size->ttmetrics.valid = TRUE; + + if ( only_height ) + return FT_Err_Ok; + + if ( face->header.Flags & 8 ) + { + /* base scaling values on integer ppem values, */ + /* as mandated by the TrueType specification */ + size_metrics->x_scale = FT_DivFix( size_metrics->x_ppem << 6, + face->root.units_per_EM ); + size_metrics->y_scale = FT_DivFix( size_metrics->y_ppem << 6, + face->root.units_per_EM ); + + size_metrics->max_advance = FT_PIX_ROUND( + FT_MulFix( face->root.max_advance_width, + size_metrics->x_scale ) ); } /* compute new transformation */ - if ( metrics->x_ppem >= metrics->y_ppem ) + if ( size_metrics->x_ppem >= size_metrics->y_ppem ) { - size->ttmetrics.scale = metrics->x_scale; - size->ttmetrics.ppem = metrics->x_ppem; + size->ttmetrics.scale = size_metrics->x_scale; + size->ttmetrics.ppem = size_metrics->x_ppem; size->ttmetrics.x_ratio = 0x10000L; - size->ttmetrics.y_ratio = FT_DivFix( metrics->y_ppem, - metrics->x_ppem ); + size->ttmetrics.y_ratio = FT_DivFix( size_metrics->y_ppem, + size_metrics->x_ppem ); } else { - size->ttmetrics.scale = metrics->y_scale; - size->ttmetrics.ppem = metrics->y_ppem; - size->ttmetrics.x_ratio = FT_DivFix( metrics->x_ppem, - metrics->y_ppem ); + size->ttmetrics.scale = size_metrics->y_scale; + size->ttmetrics.ppem = size_metrics->y_ppem; + size->ttmetrics.x_ratio = FT_DivFix( size_metrics->x_ppem, + size_metrics->y_ppem ); size->ttmetrics.y_ratio = 0x10000L; } + size->metrics = size_metrics; + #ifdef TT_USE_BYTECODE_INTERPRETER size->cvt_ready = -1; #endif /* TT_USE_BYTECODE_INTERPRETER */ - if ( !error ) - size->ttmetrics.valid = TRUE; - - return error; + return FT_Err_Ok; } Index: reactos/sdk/lib/3rdparty/freetype/src/truetype/ttobjs.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/truetype/ttobjs.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/truetype/ttobjs.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Objects manager (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -278,7 +278,8 @@ /* we have our own copy of metrics so that we can modify */ /* it without affecting auto-hinting (when used) */ - FT_Size_Metrics metrics; + FT_Size_Metrics* metrics; /* for the current rendering mode */ + FT_Size_Metrics hinted_metrics; /* for the hinted rendering mode */ TT_Size_Metrics ttmetrics; @@ -389,7 +390,8 @@ #endif /* TT_USE_BYTECODE_INTERPRETER */ FT_LOCAL( FT_Error ) - tt_size_reset( TT_Size size ); + tt_size_reset( TT_Size size, + FT_Bool only_height ); /*************************************************************************/ Index: reactos/sdk/lib/3rdparty/freetype/src/truetype/ttpic.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/truetype/ttpic.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/truetype/ttpic.c (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for truetype module. */ /* */ -/* Copyright 2009-2016 by */ +/* Copyright 2009-2017 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/truetype/ttpic.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/truetype/ttpic.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/truetype/ttpic.h (working copy) @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for truetype module. */ /* */ -/* Copyright 2009-2016 by */ +/* Copyright 2009-2017 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/truetype/ttpload.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/truetype/ttpload.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/truetype/ttpload.c (working copy) @@ -4,7 +4,7 @@ /* */ /* TrueType-specific tables loader (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/truetype/ttpload.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/truetype/ttpload.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/truetype/ttpload.h (working copy) @@ -4,7 +4,7 @@ /* */ /* TrueType-specific tables loader (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/truetype/ttsubpix.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/truetype/ttsubpix.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/truetype/ttsubpix.c (working copy) @@ -4,7 +4,7 @@ /* */ /* TrueType Subpixel Hinting. */ /* */ -/* Copyright 2010-2016 by */ +/* Copyright 2010-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -27,7 +27,8 @@ #include "ttsubpix.h" -#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY +#if defined( TT_USE_BYTECODE_INTERPRETER ) && \ + defined( TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY ) /*************************************************************************/ /* */ @@ -905,7 +906,7 @@ { TT_Face face = loader->face; FT_String* family = face->root.family_name; - FT_UInt ppem = loader->size->metrics.x_ppem; + FT_UInt ppem = loader->size->metrics->x_ppem; FT_String* style = face->root.style_name; @@ -1000,12 +1001,14 @@ } } -#else /* !TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */ +#else /* !(TT_USE_BYTECODE_INTERPRETER && */ + /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY) */ /* ANSI C doesn't like empty source files */ typedef int _tt_subpix_dummy; -#endif /* !TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */ +#endif /* !(TT_USE_BYTECODE_INTERPRETER && */ + /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY) */ /* END */ Index: reactos/sdk/lib/3rdparty/freetype/src/truetype/ttsubpix.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/truetype/ttsubpix.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/truetype/ttsubpix.h (working copy) @@ -4,7 +4,7 @@ /* */ /* TrueType Subpixel Hinting. */ /* */ -/* Copyright 2010-2016 by */ +/* Copyright 2010-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/type1/t1afm.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/type1/t1afm.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/type1/t1afm.c (working copy) @@ -4,7 +4,7 @@ /* */ /* AFM support for Type 1 fonts (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -24,6 +24,8 @@ #include "t1errors.h" +#ifndef T1_CONFIG_OPTION_NO_AFM + /*************************************************************************/ /* */ /* The macro FT_COMPONENT is used in trace mode. It is an implicit */ @@ -402,5 +404,12 @@ return FT_Err_Ok; } +#else /* T1_CONFIG_OPTION_NO_AFM */ + /* ANSI C doesn't like empty source files */ + typedef int _t1_afm_dummy; + +#endif /* T1_CONFIG_OPTION_NO_AFM */ + + /* END */ Index: reactos/sdk/lib/3rdparty/freetype/src/type1/t1afm.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/type1/t1afm.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/type1/t1afm.h (working copy) @@ -4,7 +4,7 @@ /* */ /* AFM support for Type 1 fonts (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/type1/t1driver.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/type1/t1driver.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/type1/t1driver.c (working copy) @@ -4,7 +4,7 @@ /* */ /* Type 1 driver interface (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/type1/t1driver.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/type1/t1driver.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/type1/t1driver.h (working copy) @@ -4,7 +4,7 @@ /* */ /* High-level Type 1 driver interface (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/type1/t1errors.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/type1/t1errors.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/type1/t1errors.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Type 1 error codes (specification only). */ /* */ -/* Copyright 2001-2016 by */ +/* Copyright 2001-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/type1/t1gload.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/type1/t1gload.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/type1/t1gload.c (working copy) @@ -4,7 +4,7 @@ /* */ /* Type 1 Glyph Loader (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/type1/t1gload.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/type1/t1gload.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/type1/t1gload.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Type 1 Glyph Loader (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/type1/t1load.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/type1/t1load.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/type1/t1load.c (working copy) @@ -4,7 +4,7 @@ /* */ /* Type 1 font loader (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/type1/t1load.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/type1/t1load.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/type1/t1load.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Type 1 font loader (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/type1/t1objs.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/type1/t1objs.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/type1/t1objs.c (working copy) @@ -4,7 +4,7 @@ /* */ /* Type 1 objects manager (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -49,9 +49,6 @@ /* */ /* SIZE FUNCTIONS */ /* */ - /* note that we store the global hints in the size's "internal" root */ - /* field */ - /* */ /*************************************************************************/ @@ -77,7 +74,7 @@ T1_Size size = (T1_Size)t1size; - if ( size->root.internal ) + if ( t1size->internal->module_data ) { PSH_Globals_Funcs funcs; @@ -84,9 +81,9 @@ funcs = T1_Size_Get_Globals_Funcs( size ); if ( funcs ) - funcs->destroy( (PSH_Globals)size->root.internal ); + funcs->destroy( (PSH_Globals)t1size->internal->module_data ); - size->root.internal = NULL; + t1size->internal->module_data = NULL; } } @@ -108,7 +105,7 @@ error = funcs->create( size->root.face->memory, &face->type1.private_dict, &globals ); if ( !error ) - size->root.internal = (FT_Size_Internal)(void*)globals; + t1size->internal->module_data = globals; } return error; @@ -126,7 +123,7 @@ FT_Request_Metrics( size->root.face, req ); if ( funcs ) - funcs->set_scale( (PSH_Globals)size->root.internal, + funcs->set_scale( (PSH_Globals)t1size->internal->module_data, size->root.metrics.x_scale, size->root.metrics.y_scale, 0, 0 ); Index: reactos/sdk/lib/3rdparty/freetype/src/type1/t1objs.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/type1/t1objs.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/type1/t1objs.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Type 1 objects manager (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/type1/t1parse.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/type1/t1parse.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/type1/t1parse.c (working copy) @@ -4,7 +4,7 @@ /* */ /* Type 1 parser (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/type1/t1parse.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/type1/t1parse.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/type1/t1parse.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Type 1 parser (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/type1/t1tokens.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/type1/t1tokens.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/type1/t1tokens.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Type 1 tokenizer (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/type1/type1.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/type1/type1.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/type1/type1.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType Type 1 driver component (body only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -17,17 +17,14 @@ #define FT_MAKE_OPTION_SINGLE_OBJECT +#include <ft2build.h> -#include <ft2build.h> -#include "t1parse.c" +#include "t1afm.c" +#include "t1driver.c" +#include "t1gload.c" #include "t1load.c" #include "t1objs.c" -#include "t1driver.c" -#include "t1gload.c" +#include "t1parse.c" -#ifndef T1_CONFIG_OPTION_NO_AFM -#include "t1afm.c" -#endif - /* END */ Index: reactos/sdk/lib/3rdparty/freetype/src/type42/t42drivr.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/type42/t42drivr.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/type42/t42drivr.c (working copy) @@ -4,7 +4,7 @@ /* */ /* High-level Type 42 driver interface (body). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* Roberto Alameda. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/type42/t42drivr.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/type42/t42drivr.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/type42/t42drivr.h (working copy) @@ -4,7 +4,7 @@ /* */ /* High-level Type 42 driver interface (specification). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* Roberto Alameda. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/type42/t42error.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/type42/t42error.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/type42/t42error.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Type 42 error codes (specification only). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/type42/t42objs.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/type42/t42objs.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/type42/t42objs.c (working copy) @@ -4,7 +4,7 @@ /* */ /* Type 42 objects manager (body). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* Roberto Alameda. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/type42/t42objs.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/type42/t42objs.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/type42/t42objs.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Type 42 objects manager (specification). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* Roberto Alameda. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/type42/t42parse.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/type42/t42parse.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/type42/t42parse.c (working copy) @@ -4,7 +4,7 @@ /* */ /* Type 42 font parser (body). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* Roberto Alameda. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/type42/t42parse.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/type42/t42parse.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/type42/t42parse.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Type 42 font parser (specification). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* Roberto Alameda. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/type42/t42types.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/type42/t42types.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/type42/t42types.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Type 42 font data types (specification only). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* Roberto Alameda. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/type42/type42.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/type42/type42.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/type42/type42.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType Type 42 driver component. */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -15,11 +15,13 @@ /* */ /***************************************************************************/ + #define FT_MAKE_OPTION_SINGLE_OBJECT +#include <ft2build.h> -#include <ft2build.h> +#include "t42drivr.c" #include "t42objs.c" #include "t42parse.c" -#include "t42drivr.c" + /* END */ Index: reactos/sdk/lib/3rdparty/freetype/src/winfonts/fnterrs.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/winfonts/fnterrs.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/winfonts/fnterrs.h (working copy) @@ -4,7 +4,7 @@ /* */ /* Win FNT/FON error codes (specification only). */ /* */ -/* Copyright 2001-2016 by */ +/* Copyright 2001-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ Index: reactos/sdk/lib/3rdparty/freetype/src/winfonts/winfnt.c =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/winfonts/winfnt.c (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/winfonts/winfnt.c (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType font driver for Windows FNT/FON files */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* Copyright 2003 Huw D M Davies for Codeweavers */ /* Copyright 2007 Dmitry Timoshkov for Codeweavers */ @@ -561,7 +561,7 @@ error = fnt_font_load( face->font, stream ); if ( error ) { - FT_TRACE2(( "font #%lu load error %d\n", + FT_TRACE2(( "font #%lu load error 0x%x\n", dir_entry2.name, error )); goto Fail; } Index: reactos/sdk/lib/3rdparty/freetype/src/winfonts/winfnt.h =================================================================== --- reactos/sdk/lib/3rdparty/freetype/src/winfonts/winfnt.h (revision 74662) +++ reactos/sdk/lib/3rdparty/freetype/src/winfonts/winfnt.h (working copy) @@ -4,7 +4,7 @@ /* */ /* FreeType font driver for Windows FNT/FON files */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* Copyright 2007 Dmitry Timoshkov for Codeweavers */ /* */