1 2016-12-30 Werner Lemberg <wl@gnu.org>
3 * Version 2.7.1 released.
4 =========================
7 Tag sources with `VER-2-7-1'.
9 * docs/VERSION.TXT: Add entry for version 2.7.1.
11 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
12 builds/windows/vc2005/index.html,
13 builds/windows/vc2008/freetype.vcproj,
14 builds/windows/vc2008/index.html,
15 builds/windows/vc2010/freetype.vcxproj,
16 builds/windows/vc2010/index.html,
17 builds/windows/visualc/freetype.dsp,
18 builds/windows/visualc/freetype.vcproj,
19 builds/windows/visualc/index.html,
20 builds/windows/visualce/freetype.dsp,
21 builds/windows/visualce/freetype.vcproj,
22 builds/windows/visualce/index.html,
23 builds/wince/vc2005-ce/freetype.vcproj,
24 builds/wince/vc2005-ce/index.html,
25 builds/wince/vc2008-ce/freetype.vcproj,
26 builds/wince/vc2008-ce/index.html: s/2.7/2.7.1/, s/27/271/.
28 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
30 * builds/unix/configure.raw (version_info): Set to 19:0:13.
31 * CMakeLists.txt (VERSION_PATCH): Set to 1.
33 2016-12-30 Werner Lemberg <wl@gnu.org>
35 [ftfuzzer] Replace `rand' with an xorshift algorithm.
37 * src/tools/ftfuzzer/ftfuzzer.cc: Don't include `stdlib.h'.
38 (Random): Implement and use a 32bit `xorshift' algorithm.
40 2016-12-30 Werner Lemberg <wl@gnu.org>
42 [ftfuzzer] Restrict number of tested bitmap strikes.
44 Malformed fonts often have large values for the number of bitmap
45 strikes, and FreeType doesn't check the validity of all bitmap
50 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=353
52 * src/tools/ftfuzzer/ftfuzzer.cc: Include `stdlib.h' for `rand'.
53 (Random): Small class to provide n randomly selected numbers
54 (without repetition) out of the value set [1,N].
55 (LLVMFuzzerTestOneInput): Use it to test only up to 10 bitmap
58 2016-12-29 Werner Lemberg <wl@gnu.org>
60 [truetype] Variation font API stability issues.
62 Make some functions work before a call to `TT_Set_MM_Blend'.
64 * src/truetype/ttgxvar.c (tt_hadvance_adjust): Exit immediately if
66 (TT_Get_MM_Blend, TT_Get_Var_Design): Return default values if we
69 2016-12-29 Werner Lemberg <wl@gnu.org>
71 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Check axis data.
75 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=348
77 2016-12-29 Werner Lemberg <wl@gnu.org>
79 [truetype] Tracing fixes.
81 * src/truetype/ttgxvar.c (tt_hadvance_adjust): Emit correct
83 (TT_Set_Var_Design): Fix typo.
84 (TT_Get_Var_Design): Fix typos.
86 2016-12-29 Werner Lemberg <wl@gnu.org>
88 */*: Use `0.5f' for tracing 16.16 numbers.
90 2016-12-29 Werner Lemberg <wl@gnu.org>
92 [pcf] Protect against gzip bombs.
94 Fix suggested by Kostya; reported as
96 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=345
98 * src/pcf/pcfread.c (pcf_read_TOC): Limit number of TOC entries to
101 2016-12-28 Werner Lemberg <wl@gnu.org>
103 [psnames] Only declare, not define, data in `pstables.h' (#49949).
105 Pdfium includes `pstables.h' a second time; moving the definition
106 from `pstables.h' to `psmodule.c' saves more than 60kByte data
107 segment space for this case.
109 * src/tools/glnames.py (StringTable::dump,
110 StringTable::dump_sublist, dump_encoding, dump_array): Emit
111 additional code to only define tables if `DEFINE_PS_TABLES' is set.
113 * src/psnames/pstables.h: Regenerated.
114 * src/psnames/psmodule.c (DEFINE_PS_TABLES): Define.
116 2016-12-28 Werner Lemberg <wl@gnu.org>
118 [cff] Catch `blend' op in non-variant fonts.
122 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=334
124 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdBLEND>: Don't
125 allow `blend' op for non-variant fonts.
127 2016-12-28 Werner Lemberg <wl@gnu.org>
129 [cff] Better check of number of blends.
131 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdBLEND>,
132 src/cff/cffparse.c (cff_parse_blend): Compare number of blends with
135 2016-12-27 Werner Lemberg <wl@gnu.org>
137 Documentation updates.
139 * docs/CHANGES: Add missing information.
141 * docs/formats.txt: Rewritten and updated.
143 2016-12-27 Werner Lemberg <wl@gnu.org>
145 [truetype, type1] Implement `FT_Get_Var_Design_Coordinates'.
147 * src/truetype/ttgxvar.c (TT_Get_Var_Design): Implement.
148 (TT_Set_Var_Design): Fix tracing.
150 * src/type1/t1load.c (T1_Get_Var_Design): Implement.
152 2016-12-24 Werner Lemberg <wl@gnu.org>
154 * src/truetype/ttpload.c (tt_face_load_hdmx): Ignore `version'.
156 Problem reported by 張俊芝 <418092625@qq.com>.
158 2016-12-24 Werner Lemberg <wl@gnu.org>
160 * src/sfnt/ttsbit.c (tt_face_load_sbit): Allow more version values.
162 Some fonts seem to have the `version' field in the wrong byte order.
164 Problem reported by 張俊芝 <418092625@qq.com>.
166 2016-12-24 Werner Lemberg <wl@gnu.org>
168 * src/truetype/ttpload.c (tt_face_load_loca): Sanitize table length.
170 This trivial fix allows us to accept more fonts.
172 Problem reported by 張俊芝 <418092625@qq.com>.
174 2016-12-24 Werner Lemberg <wl@gnu.org>
176 * src/sfnt/sfobjs.c (sfnt_init_face): Fix tracing.
178 2016-12-22 Werner Lemberg <wl@gnu.org>
180 * CMakeLists.txt: Make it work with cmake 2.8.11.2 (#49909).
182 2016-12-22 Werner Lemberg <wl@gnu.org>
184 Ensure used preprocessor symbols are defined (#49790).
186 * builds/unix/ftconfig.in, builds/vms/ftconfig.h,
187 include/freetype/config/ftconfig.h: Check `__GNUC__', `__IBMC__',
188 and `__SUNPRO_C' correctly.
190 2016-12-22 Werner Lemberg <wl@gnu.org>
192 * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Check `count'.
196 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=308
198 2016-12-22 Werner Lemberg <wl@gnu.org>
200 [cff] Protect against invalid `vsindex' and `blend' values.
204 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=305
206 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdVSINDEX,
207 cf2_cmdBLEND>: Implement it.
209 2016-12-22 Werner Lemberg <wl@gnu.org>
211 [ftfuzzer] Always use Adobe CFF engine.
213 * src/tools/ftfuzzer/ftfuzzer.cc (FT_Global::FT_Global): Implement
216 2016-12-21 Werner Lemberg <wl@gnu.org>
218 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Thinko.
220 I should really stop coding late in the evening...
222 Thanks again to Ben for checking.
224 2016-12-21 Werner Lemberg <wl@gnu.org>
226 [autofit] Support variation fonts.
228 (This ChangeLog entry was added later on.)
230 * src/autofit/afglobal.c (af_face_globals_free): Remove useless
233 * src/base/ftmm.c (FT_Set_MM_Design_Coordinates,
234 * FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates,
235 FT_Set_Var_Blend_Coordinates): Finalize
236 auto-hinter data to enforce recomputation. Note that this is a
237 brute-force method which should be improved.
239 2016-12-21 Werner Lemberg <wl@gnu.org>
241 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Thinko.
243 Don't apply deltas twice for non-phantom points.
245 Spotted by Ben Wagner.
247 2016-12-21 Werner Lemberg <wl@gnu.org>
249 [cff, truetype] Another try for #49829.
251 * src/cff/cffdrivr.c: Don't include
252 `FT_SERVICE_METRICS_VARIATIONS_H'.
253 (cff_get_advances): Use `ttface->variation_support'.
255 * src/truetype/ttdriver.c (tt_get_advances): Use
256 `ttface->variation_support'.
258 * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
259 load_truetype_glyph): Use `ttface->variation_support'.
261 2016-12-21 Werner Lemberg <wl@gnu.org>
263 [truetype, sfnt] Introduce font variation flags to `TT_Face'.
265 * include/freetype/internal/tttypes.h (TT_FACE_FLAG_VAR_XXX):
266 New macros describing available functionality of various OpenType
267 tables related to font variation.
268 (TT_Face): New fields `variation_support' and `mvar_support',
269 replacing and extending `use_fvar'.
271 * src/sfnt/sfobjs.c (sfnt_init_face, sfnt_load_face): Use
274 * src/truetype/ttgxvar.c (ft_var_load_hvar): Set `variation_support'
276 (TT_Vary_Apply_Glyph_Deltas): Updated.
278 2016-12-21 Werner Lemberg <wl@gnu.org>
280 [base] Improve sanity check for Mac resources (#49888).
282 * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Abort if `rlen' is not
285 2016-12-20 Werner Lemberg <wl@gnu.org>
287 [base] More sanity checks for Mac resources.
291 https://github.com/kreativekorp/ksfl/wiki/Macintosh-Resource-File-Format
295 https://developer.apple.com/legacy/library/documentation/mac/pdf/MoreMacintoshToolbox.pdf#page=151
299 * include/freetype/internal/ftrfork.h (FT_RFork_Ref): Use FT_Short
302 * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Extract map length
303 and use it to improve sanity checks.
304 Follow the specification more closely;in particular, all data types
305 are signed, not unsigned.
306 (FT_Raccess_Get_DataOffsets): Follow the specification more closely;
307 in particular, all data types are signed, not unsigned.
308 Add some sanity checks.
310 2016-12-20 Werner Lemberg <wl@gnu.org>
312 [truetype] Improve logic for getting fast advance widths.
314 * src/cff/cffdrivr.c (cff_get_advances), src/truetype/ttdriver.c
315 (tt_get_advances): Use `is_default_instance' for test; this gets
316 recomputed after changing blend coordinates.
318 2016-12-20 Ben Wagner <bungeman@google.com>
319 Werner Lemberg <wl@gnu.org>
321 [truetype] Fix linear metrics of GX variation fonts (#49829).
323 When asking for an unhinted non-default variations,
324 `linearVertAdvance' is currently the value from the `hmtx' table
325 instead of the actual value after applying the variation. `HVAR'
326 support fixes this, but fonts will exist without that table and will
329 Problem also reported as
331 https://bugs.chromium.org/p/skia/issues/detail?id=5917
333 * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
334 load_truetype_glyph): Implement linear advance adjustments if `HVAR'
335 or `VVAR' tables are missing.
337 2016-12-20 Werner Lemberg <wl@gnu.org>
339 [cff, truetype] Fast advance width retrieval for fonts with HVAR.
341 Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
343 * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Don't handle MM.
345 * src/cff/cffdrivr.c: Include FT_SERVICE_METRICS_VARIATIONS_H.
346 (cff_get_advances): Test for HVAR and VVAR.
348 * src/truetype/ttdriver.c (tt_get_advances): Test for HVAR and VVAR.
350 2016-12-18 Werner Lemberg <wl@gnu.org>
352 [base] Fix invalid mac font recursion.
356 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=304
358 * src/base/ftobjs.c (FT_Open_Face): Code moved to...
359 (ft_open_face_internal): ... this function.
360 Add a parameter to control whether we try special Mac font handling
362 (FT_Open_Face, FT_New_Face, FT_New_Memory_Face,
363 open_face_from_buffer): Use `ft_open_face_internal'.
365 2016-12-18 Werner Lemberg <wl@gnu.org>
367 * src/cff/cffobjs.c (cff_face_init): Make named instances work.
369 2016-12-18 Werner Lemberg <wl@gnu.org>
371 [truetype, cff] Extend `get_var_blend' function of MM service.
373 In particular, we need access to named instance data.
375 * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func):
376 Add argument for `FT_MM_Var'.
378 * src/cff/cffload.c (cff_get_var_blend): Updated.
379 * src/cff/cffload.h: Updated.
381 * src/cff/cf2ft.c (cf2_getNormalizedVector): Updated.
383 * src/truetype/ttgxvar.c (tt_get_var_blend): Updated.
384 Accept value `NULL' for arguments.
385 * src/truetype/ttgxvar.h: Updated.
387 2016-12-18 Werner Lemberg <wl@gnu.org>
389 [sfnt] Handle `fvar' with zero axes as a non-MM font.
391 This is better behaviour than exiting with an error.
393 * include/freetype/internal/tttypes.h (TT_Face): Add `use_fvar'
396 * src/sfnt/sfobjs.c (sfnt_init_face): Compute `use_fvar', also
397 updating the validation code.
398 Use `use_fvar' to compute FT_FACE_FLAG_MULTIPLE_MASTERS.
400 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Remove `fvar' validation
403 2016-12-18 Werner Lemberg <wl@gnu.org>
405 Minor GX code shuffling.
407 * include/freetype/internal/tttypes.h (TT_Face): Move
408 `is_default_instance' into TT_CONFIG_OPTION_GX_VAR_SUPPORT
411 * src/sfnt/sfobjs.c (sfnt_init_face): Updated.
412 * src/truetype/ttgload.c (IS_DEFAULT_INSTANCE): New macro.
413 (TT_Load_Glyph): Use it.
415 2016-12-18 Werner Lemberg <wl@gnu.org>
417 [cff] Better handling of non-CFF font formats.
419 * src/cff/cffload.c (cff_font_load): Pure CFFs don't have a
420 signature, so return `FT_Err_Unknown_File_Format' more often.
422 2016-12-17 Werner Lemberg <wl@gnu.org>
424 * src/cff/cffload.c (cff_build_blend_vector): Remove redundant code.
426 2016-12-17 Werner Lemberg <wl@gnu.org>
428 * src/truetype/ttobjs.c (tt_face_init): Simplify conditional code.
430 2016-12-17 Werner Lemberg <wl@gnu.org>
432 [sfnt, truetype] Various sanitizing fixes.
434 * src/sfnt/sfobjs.c (sfnt_init_face): If the axis count in `fvar' is
435 zero, set `num_instances' to zero.
437 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Handle `fvar' table with
438 zero axes as invalid.
440 * src/truetype/ttobjs.c (tt_face_init): Improve logic of loading
441 `loca', `cvt', `fpgm', and `prep' table.
443 2016-12-17 Werner Lemberg <wl@gnu.org>
445 Improve tracing of `FT_Open_Face'.
447 * src/base/ftobjs.c (FT_Open_Face): Return info on number of
448 available faces and numbered instances, or the indices of the
449 requested face and numbered instance.
451 * src/sfnt/sfobjs. (sfnt_open_font): Trace number of subfonts.
453 2016-12-17 Werner Lemberg <wl@gnu.org>
455 * src/cff/cffload.c (cff_load_private_dict): Always init `blend'.
459 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=295
461 2016-12-16 Werner Lemberg <wl@gnu.org>
463 [truetype] Fix `cvar' sanity test.
465 Reported by Dave Arnold.
467 * src/truetype/ttgxvar.c (tt_face_vary_cvt): Use tuple count mask.
469 2016-12-16 Werner Lemberg <wl@gnu.org>
471 [cff, truetype] Remove compiler warnings; fix `make multi'.
473 * src/cff/cf2font.h: Include `cffload.h'.
475 * src/cff/cffload.c: Include FT_MULTIPLE_MASTERS_H and
476 FT_SERVICE_MULTIPLE_MASTERS_H.
477 (cff_vstore_load): Eliminate `vsSize'.
478 (cff_load_private_dict): Tag as `FT_LOCAL_DEF'.
480 * src/cff/cffload.h: Include `cffobjs.h'.
481 Provide declaration for `cff_load_private_dict'.
483 * src/truetype/ttgxvar.c (ft_var_load_hvar): Eliminate
484 `minorVersion' and `map_offset'.
486 2016-12-16 Werner Lemberg <wl@gnu.org>
488 [cff] Fix heap buffer overflow (#49858).
490 * src/cff/cffparse.c (cff_parser_run): Add one more stack size
493 2016-12-15 Werner Lemberg <wl@gnu.org>
497 * src/cff/cffload.c (cff_blend_doBlend): Add cast.
498 (cff_subfont_load): Set `error' correctly.
500 * src/sfnt/ttmtx.c (tt_face_get_metrics): Typo.
502 2016-12-15 Dave Arnold <darnold@adobe.com>
503 Werner Lemberg <wl@gnu.org>
505 [cff] Implement CFF2 support (2/2).
507 The font variation code. All parts dependent on the GX code in the
508 `truetype' module are guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
509 In other words, you can still compile the `cff' module without
510 defining TT_CONFIG_OPTION_GX_VAR_SUPPORT (which brings you CFF2
511 support without font variation).
513 * src/cff/cf2font.c (cf2_font_setup): Add support for font
515 * src/cff/cf2font.h (CF2_Font): Add fields for variation data.
517 * src/cff/cf2ft.c (cf2_free_instance): Free blend data.
518 (cf2_getVStore, cf2_getNormalizedVector): New functions.
519 * src/cff/cf2ft.h: Updated.
521 * src/cff/cf2intrp.c: Include `cffload.h'.
522 (cf2_cmdRESERVED_15, cf2_cmdRESERVED_16): Replace with...
523 (cf2_cmdVSINDEX, cf2_cmdBLEND): ... this new enum values.
524 (cf2_doBlend): New function.
525 (cf2_interpT2CharString): Handle `vsindex' and `blend' opcodes.
527 * src/cff/cffload.c (FT_fdot14ToFixed): New macro.
528 (cff_vstore_done, cff_vstore_load): New functions.
529 (cff_blend_clear, cff_blend_doBlend, cff_blend_build_vector,
530 cff_blend_check_vector): New functions.
531 (cff_load_private_dict): Add arguments for blend vector.
533 (cff_subfont_load, cff_subfont_done): Updated.
534 (cff_font_load): Handle CFF2 variation store data.
535 (cff_font_done): Updated.
536 * src/cff/cffload.h: Include `cffparse.h'.
539 * src/cff/cffobjs.c (cff_face_done): Updated.
541 * src/cff/cffparse.c: Include `cffload.h'.
542 (cff_parse_num): Handle internal value 255.
543 (cff_parse_vsindex, cff_parse_blend): New functions.
544 (CFF_FIELD_BLEND): New macro.
545 (cff_parser_run): Updated.
546 * src/cff/cffparse.h (cff_kind_blend): New enum value.
548 * src/cff/cfftoken.h: Handle `vstore', `vsindex', and `blend'
551 * src/cff/cfftypes.h (CFF_VarData, CFF_AxisCoords, CFF_VarRegion,
552 CFF_VStore, CFF_Blend): New structures.
553 (CFF_FontRecDict): Add `vstore_offset' field.
554 (CFF_Private): Add `vsindex' field.
555 (CFF_SubFont): Add fields for blend data.
556 (CFF_Font): Add `vstore' field.
558 * src/truetype/ttgxvar.c (TT_Get_MM_Var): `CFF2' is equal to `gvar',
559 since glyph variation data is directly embedded.
560 (TT_Set_MM_Blend): Don't load `gvar' table for CFF2 fonts.
562 2016-12-15 Dave Arnold <darnold@adobe.com>
563 Werner Lemberg <wl@gnu.org>
565 [cff] Implement CFF2 support (1/2).
567 This commit does not contain the blend code for font variation
568 support, which follows in another commit.
570 You should ignore whitespace while inspecting this commit.
572 * include/freetype/internal/tttypes.h (TT_Face): Add `isCFF2'
575 * src/cff/cf2font.h (CF2_Font): Add `isCFF2' member.
577 * src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Handle `isCFF2'
579 (cf2_getMaxstack): New function.
580 * src/cff/cf2ft.h: Updated.
582 * src/cff/cf2intrp.c (cf2_escRESERVED_38): New enum.
583 (cf2_interpT2CharString): Handle CFF2 differences.
584 Add tracing message for errors.
586 * src/cff/cffdrivr.c (cff_get_glyph_name, cff_get_name_index):
589 * src/cff/cffload.c (FT_FIXED_ONE): New macro.
590 (cff_index_init, cff_index_load_offsets, cff_index_access_element,
591 cff_index_get_name, cff_ft_select_get, cff_load_private_dict,
592 cff_subfont_load, cff_font_load): Handle CFF2.
593 * src/cff/cffload.h: Updated.
595 * src/cff/cffobjs.c (cff_face_init): Handle CFF2.
597 * src/cff/cffparse.c (cff_parse_maxstack): New function.
598 (CFFCODE_TOPDICT, CFFCODE_PRIVATE): Removed
599 * src/cff/cffparse.h (CFF2_MAX_STACK, CFF2_DEFAULT_STACK): New
601 (CFF2_CODE_TOPDICT, CFF2_CODE_FONTDICT, CFF2_CODE_PRIVATE): New
604 * src/cff/cfftoken.h: Add fields for CFF2 dictionaries (but no blend
607 * src/cff/cfftypes.h (CFF_Index): Add `hdr_size' field.
608 (CFF_FontRecDict): Add `maxstack' field.
609 (CFF_Private): Add `subfont' field.
610 (CFF_Font): Add `top_dict_length' and `cff2' fields.
612 * src/sfnt/sfobjs.c (sfnt_load_face): Handle `CFF2' table.
614 2016-12-15 Werner Lemberg <wl@gnu.org>
615 Dave Arnold <darnold@adobe.com>
617 [truetype] Provide HVAR advance width variation as a service.
619 Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
621 * src/truetype/ttdriver.c (tt_service_metrics_variations): Updated.
623 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Prevent
624 double adjustment of advance width.
626 * src/sfnt/ttmtx.c: Include FT_SERVICE_METRICS_VARIATIONS_H.
627 (tt_face_get_metrics): Apply metrics variations.
629 2016-12-15 Dave Arnold <darnold@adobe.com>
630 Werner Lemberg <wl@gnu.org>
632 [truetype] Provide function to apply `HVAR' advance width variation.
634 Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
636 * src/truetype/ttgxvar.c (tt_hadvance_adjust): New function.
637 * src/truetype/ttgxvar.h: Updated.
639 2016-12-15 Dave Arnold <darnold@adobe.com>
640 Werner Lemberg <wl@gnu.org>
642 [truetype] Add `HVAR' table parsing.
644 Note that this is not complete yet; it only handles advance width
647 Activation of the code follows in another commit.
649 Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
651 * include/freetype/ftmm.h (FT_Var_Named_Style): Add `psid' member.
653 * src/truetype/ttgxvar.h (GX_HVarData, GX_AxisCoords, GX_HVarRegion,
654 GX_HVStore, GX_WidthMap): New auxiliary structures for...
655 (GX_HVarTable): ... HVAR main structure.
656 (GX_BlendRec): Add data for HVAR loading.
658 * src/truetype/ttgxvar.c (FT_FIXED_ONE, FT_fdot14ToFixed,
659 FT_intToFixed, FT_fixedToInt): New macros.
660 (ft_var_load_hvar): New function.
661 (TT_Get_MM_Var): Updated.
662 (tt_done_blend): Deallocate HVAR data.
664 2016-12-15 Dave Arnold <darnold@adobe.com>
666 [cff] Extend number parsing.
668 The forthcoming CFF2 support needs a dynamic parsing limit.
670 * src/cff/cffparse.c (cff_parse_num, do_fixed, cff_parse_fixed,
671 cff_parse_fixed_scaled, cff_parse_fixed_dynamic): Add argument for
673 (cff_parse_font_matrix, cff_parse_font_bbox, cff_parse_private_dict,
674 cff_parse_multiple_master, cff_parse_cid_ros, cff_parser_run): Updated.
676 * src/cff/cffparse.h (cff_parse_num): Export locally.
678 2016-12-15 Dave Arnold <darnold@adobe.com>
680 [cff] Implement dynamic stack size for Adobe engine.
682 This also adds `cf2_stack_setReal' and `cf2_stack_pop', needed for
683 the forthcoming CFF2 support.
685 * src/cff/cf2stack.c (cf2_stack_init): Add argument for stack size.
686 (cf2_stack_free): Deallocate stack.
687 (cf2_stack_count, cf2_stack_pushInt, cf2_stack_pushFixed,
688 cf2_stack_popInt, cf2_stack_popFixed, cf2_stack_getReal,
689 cf2_stack_clear): Updated.
690 (cf2_stack_setReal, cf2_stack_pop): New functions.
692 * src/cff/cf2stack.h (CF2_Stack): Add `stackSize' member.
693 Update function declarations.
695 * src/cff/cf2intrp.c (cf2_interpT2CharString): Updated.
697 * src/cff/cffparse.c (cff_parser_init): Add parameter for stack
698 size; return error code.
699 (cff_parser_done): New function.
700 (cff_parser_run): Updated.
702 * src/cff/cffparse.h (CFF_Parser): Add `stackSize' member and make
704 Update function declarations.
706 * src/cff/cffload.c (cff_load_private_dict, cff_subfont_load):
709 2016-12-15 Dave Arnold <darnold@adobe.com>
710 Werner Lemberg <wl@gnu.org>
712 [cff] Code shuffling.
714 * src/cff/cfftypes.h (CFF_Font): Add `library' and `base_offset'
717 * src/cff/cffload.c (cff_subfont_load): Change last argument to
719 Split off parsing of private dictionary into...
720 (cff_load_private_dict): ...this new function.
721 (cff_font_load): Updated.
723 2016-12-14 Werner Lemberg <wl@gnu.org>
725 [sfnt, truetype] Add framework for Metrics Variations service.
727 No effect yet; service functions will be implemented later on.
729 Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
731 * include/freetype/internal/services/svmetric.h: New file.
733 * include/freetype/internal/ftserv.h
734 (FT_SERVICE_METRICS_VARIATIONS_H): New macro.
736 * include/freetype/internal/tttypes.h (TT_Face): New field `var'.
738 * src/sfnt/sfobjs.c: Include FT_SERVICE_METRICS_VARIATIONS_H.
739 (sfnt_init_face): Initialize `face->var'.
741 * src/truetype/ttdriver.c: Include FT_SERVICE_METRICS_VARIATIONS_H.
742 (tt_service_metrics_variations): New service.
743 (tt_services): Updated.
745 * src/truetype/ttpic.h: Updated.
747 2016-12-14 Werner Lemberg <wl@gnu.org>
749 [cff] Add Multiple Masters service.
751 The code simply uses the MM functions from the `truetype' module.
753 Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
755 * include/freetype/internal/tttypes.h (TT_Face): New field `mm'.
757 * src/cff/cffdrivr.c: Include FT_SERVICE_MULTIPLE_MASTERS_H.
758 (cff_set_mm_blend, cff_get_mm_blend, cff_get_mm_var,
759 cff_set_var_design, cff_get_var_design): New functions.
760 (cff_service_multi_masters): New service.
761 (cff_services): Updated.
763 * src/cff/cffload.c (cff_get_var_blend, cff_done_blend): New
765 * src/cff/cffload.h: Updated.
767 * src/cff/cffpic.h (CFF_SERVICE_MULTI_MASTERS_GET): New macro.
769 * src/sfnt/sfobjs.c: Include FT_SERVICE_MULTIPLE_MASTERS_H.
770 (sfnt_init_face): Initialize `face->mm'.
772 2016-12-14 Werner Lemberg <wl@gnu.org>
774 Extend functionality of `ft_module_get_service'.
776 It can now differentiate between local and global searches.
778 * src/base/ftobjs.c (ft_module_get_service): Add `global' argument.
779 (FT_Get_TrueType_Engine_Type): Updated.
781 * src/cff/cffdrivr.c (cff_get_ps_name, cff_get_cmap_info): Updated.
783 * include/freetype/internal/ftobjs.h: Updated.
784 * include/freetype/internal/ftserv.h (FT_FACE_FIND_GLOBAL_SERVICE):
787 2016-12-14 Werner Lemberg <wl@gnu.org>
789 * src/truetype/ttgxvar.c (tt_get_var_blend): Fix compiler warning.
791 2016-12-14 Dave Arnold <darnold@adobe.com>
792 Werner Lemberg <wl@gnu.org>
794 [sfnt, cff] Minor preparations.
796 * include/freetype/tttags.h (TTAG_CFF2, TTAG_HVAR, TTAG_MVAR,
797 TTAG_VVAR): New SFNT table tags.
799 * src/cff/cf2fixed.h (CF2_FIXED_ONE, CF2_FIXED_EPSILON): Add cast.
801 2016-12-10 Werner Lemberg <wl@gnu.org>
803 [truetype, type1] Add `get_var_blend' to MM service.
805 For internal use; we want to share code between the forthcoming CFF2
806 support and TrueType.
808 * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func):
810 (MultiMasters): Add `get_var_blend'.
811 (FT_Service_MultiMasters): Updated.
813 * src/truetype/ttgxvar.c (tt_get_var_blend): New function.
814 * src/truetype/ttgxvar.h: Updated.
816 * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated.
817 * src/type1/t1driver.c (t1_service_multi_masters): Updated.
819 2016-12-10 Werner Lemberg <wl@gnu.org>
821 [truetype, type1] Add `done_blend' to MM service.
823 For internal use; we want to share code between the forthcoming CFF2
824 support and TrueType.
826 * include/freetype/internal/services/svmm.h (FT_Done_Blend_Func):
828 (MultiMasters): Add `done_blend'.
829 (FT_Service_MultiMasters): Updated.
831 * src/truetype/ttgxvar.c (tt_done_blend): Use `TT_Face' as argument.
832 * src/truetype/ttgxvar.h: Updated.
834 * src/truetype/ttobjs.c (TT_Face_Done): Updated.
836 * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated.
837 * src/type1/t1driver.c (t1_service_multi_masters): Updated.
839 2016-12-09 Werner Lemberg <wl@gnu.org>
841 [sfnt] Revert change from 2016-12-08.
843 I missed the functionality of `ft_module_get_service', which makes
844 the change unnecessary.
846 2016-12-08 Werner Lemberg <wl@gnu.org>
848 Add framework to support services with 8 functions.
850 We will need this for CFF variation font support.
852 * include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC8):
855 2016-12-08 Werner Lemberg <wl@gnu.org>
857 [sfnt] Add `get_glyph_name' and `get_name_index' to SFNT interface.
859 CFF2 fonts will need access to those two functions.
861 * include/freetype/internal/sfnt.h: Include FT_SERVICE_GLYPH_DICT_H.
862 (SFNT_Interface): Add `get_glyph_name' and `get_name_index' members.
863 (FT_DEFINE_SFNT_INTERFACE): Updated.
865 * src/sfnt/sfdriver.c (sfnt_get_glyph_name, sfnt_get_name_index):
866 Fix signatures to exactly correspond to the glyph dict service
868 (sfnt_interface): Updated.
870 2016-12-06 Dave Arnold <darnold@adobe.com>
872 Add `FT_Get_Var_Design_Coordinates' function.
874 Note that the low-level functions aren't implemented yet.
876 * include/freetype/ftmm.h: Declare.
878 * include/freetype/internal/services/svmm.h
879 (FT_Get_Var_Design_Func): New typedef.
880 (MultiMasters): New MM service function `get_var_design'.
881 (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated.
884 * src/base/ftmm.c (FT_Get_Var_Design_Coordinates): Implement.
886 * src/truetype/ttdriver.c: Updated.
888 * src/truetype/ttgxvar.c (TT_Get_Var_Design): New dummy function to
889 handle `get_var_design' service.
890 * src/truetype/ttgxvar.h: Updated.
892 * src/type1/t1driver.c: Updated.
894 * src/type1/t1load.c (T1_Get_Var_Design): New dump function to
895 handle `get_var_design' service.
896 * src/type1/t1load.h: Updated.
898 2016-12-06 Werner Lemberg <wl@gnu.org>
900 * src/type1/t1load.c (parse_subrs): Fix memory leak.
902 The `subrs' keyword might erroneously occur multiple times.
906 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=231
908 2016-12-01 Werner Lemberg <wl@gnu.org>
910 [gzip] Improve building with external zlib (#49673).
912 Building FreeType with external zlib 1.2.8 makes msvc 14 stop with
916 zlib-1.2.8\zlib.h(86): error C2061:
917 syntax error: identifier 'z_const'
918 zlib-1.2.8\zlib.h(94): error C2054:
919 expected '(' to follow 'z_const'
920 zlib-1.2.8\zlib.h(94): error C2085:
921 'msg': not in formal parameter list
923 zlib-1.2.8\zlib.h(877): fatal error C1003:
924 error count exceeds 100; stopping compilation
926 The error happens because FreeType keeps an own copy of zlib-1.1.4
927 under `src/gzip'. When building `src/gzip/ftgzip.c' with
928 FT_CONFIG_OPTION_SYSTEM_ZLIB defined, it uses
932 which correctly finds an external `zlib.h', but `zlib.h' itself has
937 which makes Visual Studio 2015 find `src/gzip/zconf.h' while
938 compiling the files in `src/gzip'.
940 * src/gzip/zconf.h: Rename to...
941 * src/gzip/ftzconf.h: ... this.
942 * src/gzip/zlib.h, src/gzip/rules.mk (GZIP_DRV_SRCS): Updated.
944 2016-12-01 Oleksandr Chekhovskyi <oleksandr.chekhovskyi@gmail.com>
946 [autofit] Fix Emscripten crash (patch #9180).
948 Function calls through pointers must use a matching signature to
949 work on Emscripten, since such calls are dispatched through lookup
950 tables grouped by signature.
952 * src/autofit/aftypes.h (AF_WritingSystem_ApplyHintsFunc): Fix
955 2016-11-29 Werner Lemberg <wl@gnu.org>
957 [smooth] Revert previous commit. Already fixed with 6ca54c64.
959 2016-11-29 Werner Lemberg <wl@gnu.org>
961 [smooth] Avoid conditional jump on uninitialized value (#49711).
963 * src/smooth/ftgrays.c (gray_raster_render): Initialize `worker'.
965 2016-11-27 Nikolaus Waxweiler <madigens@gmail.com>
967 [autofit] Code shuffling.
969 Also improve some comments and remove unused code.
971 No functional change.
973 * src/autofit/afloader.c (af_loader_load_g): Merged with...
974 (af_loader_load_glyph): ...this function.
975 Split off emboldening code into...
976 (af_loader_embolden_glyph_in_slot): ... this function.
978 2016-11-17 Werner Lemberg <wl@gnu.org>
980 Better support of LLP64 systems with gcc (and clang).
982 * builds/unix/configure.raw: Call `AC_TYPE_LONG_LONG_INT'.
984 * builds/unix/ftconfig.in (FT_LONG64): Enable for LLP64 systems (and
985 suppress warnings) even without `FT_CONFIG_OPTION_FORCE_INT64'.
987 2016-11-10 Werner Lemberg <wl@gnu.org>
989 Fix `lcd_weights' array size.
991 * include/freetype/internal/ftobjs.h (FT_LibraryRec): Do it.
993 Reported by Nikolaus.
995 2016-11-06 Werner Lemberg <wl@gnu.org>
997 * src/base/ftobjs.c (FT_Render_Glyph_Internal): Fix tracing.
999 2016-11-06 Werner Lemberg <wl@gnu.org>
1001 [sfnt] Improve FT_LOAD_BITMAP_METRICS_ONLY for `sbix' format.
1003 It's unavoidable to call the PNG engine, but to get the metrics it
1004 is sufficient to read the PNG image's header only.
1006 * src/sfnt/pngshim.c (Load_SBit_Png): Add argument to control the
1007 allocation of the glyph slot.
1008 * src/sfnt/pngshim.h: Updated.
1009 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_png,
1010 tt_face_load_sbix_image, tt_face_load_sbit_image): Updated.
1012 2016-11-06 Werner Lemberg <wl@gnu.org>
1014 [sfnt] Speed up `sbix' lookup.
1016 This also fixes a bug introduced in 2016-10-01 which prevents
1017 display of embedded bitmap fonts that use the `sbix' format.
1019 * src/sfnt/ttsbit.c (tt_face_load_sbit): Store `sbix' size and
1020 offset also in `ebdt_size' and `ebdt_start', respectively. This
1021 makes the test for an embedded bitmap data table succeed for this
1024 (tt_face_load_strike_metrics) <TT_SBIT_TABLE_TYPE_SBIX>: Use
1025 `ebdt_size' and `ebdt_start'
1026 (tt_face_load_sbix_image): Ditto.
1028 2016-11-06 Seigo Nonaka <nona@google.com>
1029 Werner Lemberg <wl@gnu.org>
1031 Introduce a way of quickly retrieving (embedded) bitmap metrics.
1033 `FT_Load_Glyph' doesn't generate a bitmap for a non-bitmap glyph
1034 until the user calls `FT_Render_Glyph'. However, it always
1035 allocates memory for bitmaps and copies or decodes the contents of a
1036 bitmap glyph, which can be quite slow for PNG data.
1038 * include/freetype/freetype.h (FT_LOAD_BITMAP_METRICS_ONLY): New
1041 * src/base/ftobjs.c (FT_Load_Glyph): Unset FT_LOAD_RENDER if
1042 FT_LOAD_BITMAP_METRICS_ONLY is used.
1044 * src/sfnt/ttsbit.c (tt_sbit_decoder_alloc_bitmap,
1045 tt_sbit_decoder_load_bitmap): Add argument to control allocation of
1047 (tt_sbit_decoder_load_image, tt_sbit_decoder_load_compound,
1048 tt_face_load_sbit_image): Updated.
1050 * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Quickly exit if
1051 `FT_LOAD_BITMAP_METRICS_ONLY' is set.
1053 * src/pfr/pfrsbit.c, src/pfr/pfrsbit.h (pfr_slot_load_bitmap): Add
1054 argument to control allocation of the glyph slot.
1055 * src/pfr/pfrobjs (pfr_slot_load): Updated.
1057 * src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto.
1059 * docs/CHANGES: Updated.
1061 2016-11-06 Werner Lemberg <wl@gnu.org>
1063 Synchronize with gnulib (#49448).
1065 * include/freetype/config/ftconfig.h, builds/unix/ftconfig.in,
1066 builds/vms/ftconfig.h (FT_TYPEOF): Update code to use definition in
1067 current version of `intprops.h'.
1068 Other minor synchronization to reduce code differences between the
1071 2016-11-03 Behdad Esfahbod <behdad@behdad.org>
1073 [truetype] Clamp variation requests to valid range.
1075 This is required by OpenType 1.8; it also avoids rounding surprises.
1077 * src/truetype/ttgxvar.c (TT_Set_Var_Design): Clamp design coordinates
1078 outside of the allowed range to always stay within the range instead
1079 of producing an error.
1081 2016-10-29 Werner Lemberg <wl@gnu.org>
1083 [truetype] Remove clang warnings.
1085 * src/truetype/ttinterp.h (TT_ExecContextRec): Using `FT_ULong' for
1086 loop counter handling.
1088 * src/truetype/ttinterp.c: Updated.
1089 (Ins_SCANTYPE): Use signed constant.
1090 (TT_RunIns): Ensure `num_twilight_points' is 16bit.
1092 2016-10-27 Werner Lemberg <wl@gnu.org>
1094 [truetype] Fix commit from 2014-11-24.
1096 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
1098 * src/truetype/ttpload.c (tt_face_load_hdmx): Fix file checking
1101 2016-10-26 Werner Lemberg <wl@gnu.org>
1103 Add `FT_Get_{MM,Var}_Blend_Coordinates' functions.
1105 * include/freetype/ftmm.h: Declare.
1107 * include/freetype/internal/services/svmm.h (FT_Get_MM_Blend_Func):
1109 (MultiMasters): New MM service function `get_mm_blend'.
1110 (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated.
1113 * src/base/ftmm.c (FT_Get_MM_Blend_Coordinates,
1114 FT_Get_Var_Blend_Coordinates): Implement.
1116 * src/truetype/ttdriver.c: Updated.
1118 * src/truetype/ttgxvar.c (TT_Get_MM_Blend): New function to handle
1119 `get_mm_blend' service.
1120 * src/truetype/ttgxvar.h: Updated.
1122 * src/type1/t1driver.c: Updated.
1124 * src/type1/t1load.c (T1_Get_MM_Blend): New function to handle
1125 `get_mm_blend' service.
1126 * src/type1/t1load.h: Updated.
1128 * docs/CHANGES: Document.
1130 2016-10-26 Werner Lemberg <wl@gnu.org>
1132 * src/type1/t1load.c (parse_subrs): Fix limit check.
1136 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=81
1138 2016-10-25 Alexei Podtelezhnikov <apodtele@gmail.com>
1140 [cff] Correct cmap format reporting (#24819).
1142 * src/cff/cffdrivr.c (cff_get_cmap_info): Throw an error on synthetic
1143 charmap instead of guessing its format and language.
1145 2016-10-22 Werner Lemberg <wl@gnu.org>
1147 [truetype] Fix SCANTYPE instruction (#49394).
1149 * src/truetype/ttinterp.c (Ins_SCANTYPE): Only use lower 16bits.
1151 2016-10-22 Werner Lemberg <wl@gnu.org>
1153 [sfnt] Improve handling of invalid post 2.5 tables [#49393].
1155 * src/sfnt/ttpost.c (load_format_25): We need at least a single
1158 2016-10-14 Werner Lemberg <wl@gnu.org>
1160 [truetype] Fix handling of `cvar' table data.
1164 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53
1166 * src/truetype/ttgxvar.c (tt_face_vary_cvt): Ignore invalid CVT
1169 2016-10-11 Werner Lemberg <wl@gnu.org>
1171 [psaux] Fix handling of invalid flex subrs.
1175 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52
1177 * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
1178 <op_callothersubr>: Set `flex_state' after error checking.
1180 2016-10-11 Werner Lemberg <wl@gnu.org>
1182 * src/truetype/ttgxvar.c (tt_done_blend): Fix deallocation.
1184 2016-10-08 Werner Lemberg <wl@gnu.org>
1186 * src/cid/cidload.c (cid_face_open): Properly propagate `error'.
1188 2016-10-08 Werner Lemberg <wl@gnu.org>
1190 [cid] Fix parsing of subr offsets.
1192 Bug introduced 2016-05-16.
1194 * src/cid/cidparse.c (cid_parser_new): Fix off-by-one error.
1196 2016-10-01 Werner Lemberg <wl@gnu.org>
1198 [sfnt] Disable bitmap strikes if we don't have a bitmap data table.
1200 * src/sfnt/ttsbit.c (tt_face_load_sbit): Check whether we have
1201 a bitmap data table.
1203 2016-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
1205 [smooth] Remove impossibility.
1207 * src/smooth/ftgrays.c (TWorker): Rearrange fields.
1208 (gray_convert_glyph): Remove impossible condition and clean up.
1210 2016-09-29 Werner Lemberg <wl@gnu.org>
1212 [pcf] Enrich family name with foundry name and glyph width info.
1214 This is a very old patch from openSuSE (from 2006, submitted to
1215 FreeType in 2011) that I forgot to apply.
1217 https://build.opensuse.org/package/view_file/openSUSE:Factory/freetype2/freetype2-bitmap-foundry.patch
1219 Prepend the foundry name plus a space to the family name. There are
1220 many fonts just called `Fixed' which look completely different, and
1221 which have nothing to do with each other. When selecting `Fixed' in
1222 KDE or Gnome one gets results that appear rather random, the style
1223 changes often if one changes the size and one cannot select some
1226 We also check whether we have `wide' characters; all put together,
1227 we get family names like `Sony Fixed' or `Misc Fixed Wide'.
1229 * src/pcf/pcfread.c (pcf_load_font): Implement it.
1231 * docs/CHANGES: Document it.
1233 2016-09-29 Werner Lemberg <wl@gnu.org>
1235 [ftfuzzer] Speed up.
1237 * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Don't
1238 check for embedded bitmaps if we have a non-default instance.
1240 2016-09-29 Werner Lemberg <wl@gnu.org>
1242 [truetype] Disallow bitmap strikes for non-default instances.
1244 Also speed up access of default instances if GX variations are
1247 * include/freetype/internal/tttypes.h (TT_FaceRec): Add
1248 `is_default_instance' member.
1250 * src/sfnt/sfobjs.c (sfnt_init_face): Initialize
1251 `is_default_instance'.
1253 * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
1254 load_truetype_glyph): Add test for default instance.
1255 (TT_Load_Glyph): Load embedded bitmaps for default instance only.
1257 * src/truetype/ttgxvar.c (TT_Set_MM_Blend): Compute
1258 `is_default_instance'.
1260 2016-09-29 Werner Lemberg <wl@gnu.org>
1262 [truetype] Clean up `TT_Face' structure.
1264 * include/freetype/internal/tttypes.h (TT_FaceRec): Remove unused
1265 fields `horz_metrics' and `vert_metrics'.
1266 Update documentation.
1268 * src/sfnt/sfobjs.c (sfnt_done_face): Updated.
1270 2016-09-28 Werner Lemberg <wl@gnu.org>
1274 * src/gxvalid/gxvcommn.c (gxv_ClassTable_validate):
1275 s/ft_memset/FT_MEM_ZERO/.
1277 * src/psaux/t1decode.c (t1_decoder_parse_charstrings):
1278 s/ft_memset/FT_ARRAY_ZERO/.
1280 * src/raster/ftraster.c (FT_ZERO): Define.
1281 (ft_black_new): Use it.
1282 * src/raster/ftrend1.c (ft_raster1_get_cbox):
1283 s/FT_MEM_ZERO/FT_ZERO/.
1285 * src/smooth/ftgrays.c (FT_ZERO): Define.
1286 (gray_raster_new): Use it.
1287 * src/smooth/ftsmooth.c (ft_smooth_get_cbox):
1288 s/FT_MEM_ZERO/FT_ZERO/.
1290 2016-09-28 Werner Lemberg <wl@gnu.org>
1292 */*: s/FT_MEM_ZERO/FT_ZERO/ where appropriate.
1294 2016-09-27 Werner Lemberg <wl@gnu.org>
1296 [truetype] Trace number of executed opcodes.
1298 * src/truetype/ttinterp.c (TT_RunIns): Implement it.
1300 2016-09-27 Werner Lemberg <wl@gnu.org>
1302 [truetype] Speed up `TT_Load_Glyph'.
1304 This avoids additional calls to `tt_face_lookup_table' for the
1305 `glyf' table, which can be expensive.
1307 * include/freetype/internal/tttypes.h (TT_LoaderRec): Move
1308 `glyf_offset' field to ...
1309 (TT_FaceRec): ... this structure.
1310 * src/truetype/ttgload.c (load_truetype_glyph): Updated.
1311 (tt_loader_init): Move initialization of `glyf_offset' to ...
1312 * src/truetype/ttpload.c (tt_face_load_loca): ... this function.
1314 2016-09-27 Werner Lemberg <wl@gnu.org>
1316 [truetype] Introduce dynamic limits for some bytecode opcodes.
1318 This speeds up FreeType's handling of malformed fonts.
1320 * src/truetype/ttinterp.c (TT_RunIns): Set up limits for the number
1321 of twilight points, the total number of negative jumps, and the
1322 total number of loops in LOOPCALL opcodes. The values are based on
1323 the number of points and entries in the CVT table.
1324 (Ins_JMPR): Test negative jump counter.
1325 (Ins_LOOPCALL): Test loopcall counter.
1327 * src/truetype/ttinterp.h (TT_ExecContext): Updated.
1329 * docs/CHANGES: Updated.
1331 2016-09-25 Werner Lemberg <wl@gnu.org>
1333 [truetype] Sanitize only last entry of `loca' table.
1335 Without this patch, a loca sequence like `0 100000 0 100000 ...',
1336 where value 100000 is larger than the `glyf' table size, makes
1337 FreeType handle the whole `glyf' table as a single glyph again and
1338 again, which is certainly invalid (and can be very slow, too).
1340 * src/truetype/ttpload.c (tt_face_get_location): Implement.
1341 Improve tracing messages.
1343 2016-09-25 Werner Lemberg <wl@gnu.org>
1345 * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Fix typo.
1347 2016-09-24 Werner Lemberg <wl@gnu.org>
1349 [autofit] Tracing fixes.
1351 * src/autofit/afmodule.c (af_autofitter_load_glyph): Call dumping
1352 functions only if we actually do tracing.
1354 2016-09-22 Alexei Podtelezhnikov <apodtele@gmail.com>
1356 [smooth] Reduce divisions in the line renderer.
1358 We don't need some divisions if a line segments stays within a single
1359 row or a single column of pixels.
1361 * src/smooth/ftgrays.c (gray_render_line) [FT_LONG64]: Make divisions
1364 2016-09-15 Alexei Podtelezhnikov <apodtele@gmail.com>
1366 * src/smooth/ftgrays.c (gray_sweep): Remove check for empty table.
1368 2016-09-14 Alexei Podtelezhnikov <apodtele@gmail.com>
1370 [smooth] Another tiny speed-up.
1372 * src/smooth/ftgrays.c (gray_find_cell): Merge into...
1373 (gray_record_cell): ... this function.
1375 2016-09-11 Alexei Podtelezhnikov <apodtele@gmail.com>
1377 * src/smooth/ftgrays.c (gray_{find,set}_cell): Remove dubious code.
1379 2016-09-11 Alexei Podtelezhnikov <apodtele@gmail.com>
1381 [smooth] Fix valgrind warning and reoptimize.
1383 The algorithm calls `gray_set_cell' at the start of each new contour
1384 or when the contours cross the cell boundaries. Double-checking for
1387 * src/smooth/ftgrays.c (gray_set_cell): Remove check for a new cell.
1388 (gray_convert_glyph): Remove initialization introduced by 44b172e88.
1390 2016-09-10 Werner Lemberg <wl@gnu.org>
1392 [sfnt] Fix previous commit.
1394 Problems reported as
1396 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40
1398 We now map the strike index right before accessing the physical
1401 * src/sfnt/sfobjs.c (sfnt_load_face): Set `face->sbit_strike_map'
1402 after creating the map so that...
1404 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): ... this function
1405 can be used before and after setting up `sbit_strike_map'.
1406 (tt_face_set_sbit_strike): Revert change.
1407 (tt_sbit_decoder_init, tt_face_load_sbix_image): Map strike index.
1409 * src/truetype/ttdriver.c (tt_size_select): Revert change.
1411 2016-09-09 Werner Lemberg <wl@gnu.org>
1413 [ftfuzzer] Minor improvements.
1415 * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Ignore
1417 Use better values for call to `FT_Set_Char_Size'.
1419 2016-09-09 Werner Lemberg <wl@gnu.org>
1421 [sfnt] Don't provide (completely) broken strike data.
1423 FreeType tries to sanitize strike header data; we now reject
1424 completely broken ones.
1426 * include/freetype/internal/tttypes.h (TT_FaceRec): New
1427 `sbit_strike_map' array pointer.
1429 * src/base/ftobjs.c (FT_Match_Size): Reject matches where either
1430 width or height would be zero.
1431 Add tracing message in case of error.
1433 * src/sfnt/sfobjs.c (sfnt_load_face): Populate `sbit_strike_map',
1434 only using (more or less) valid strike header data for
1435 FT_Face's `available_sizes' array.
1436 (sfnt_done_face): Updated.
1438 * src/sfnt/ttsbit.c (tt_face_set_sbit_strike): Use
1440 (tt_face_load_strike_metrics): Improve tracing.
1442 * src/truetype/ttdriver.c (tt_size_select): Use `sbit_strike_map'.
1444 2016-09-08 Werner Lemberg <wl@gnu.org>
1446 * Version 2.7 released.
1447 =======================
1450 Tag sources with `VER-2-7'.
1452 * docs/VERSION.TXT: Add entry for version 2.7.
1454 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
1455 builds/windows/vc2005/index.html,
1456 builds/windows/vc2008/freetype.vcproj,
1457 builds/windows/vc2008/index.html,
1458 builds/windows/vc2010/freetype.vcxproj,
1459 builds/windows/vc2010/index.html,
1460 builds/windows/visualc/freetype.dsp,
1461 builds/windows/visualc/freetype.vcproj,
1462 builds/windows/visualc/index.html,
1463 builds/windows/visualce/freetype.dsp,
1464 builds/windows/visualce/freetype.vcproj,
1465 builds/windows/visualce/index.html,
1466 builds/wince/vc2005-ce/freetype.vcproj,
1467 builds/wince/vc2005-ce/index.html,
1468 builds/wince/vc2008-ce/freetype.vcproj,
1469 builds/wince/vc2008-ce/index.html: s/2.6.5/2.7/, s/265/27/.
1471 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 7.
1472 (FREETYPE_PATCH): Set to 0.
1474 * builds/unix/configure.raw (version_info): Set to 18:6:12.
1475 * CMakeLists.txt (VERSION_MINOR): Set to 7.
1476 (VERSION_PATCH): Set to 0.
1478 * docs/CHANGES: Updated.
1480 2016-09-08 Werner Lemberg <wl@gnu.org>
1482 * src/truetype/ttinterp.c: Include `ttgxvar.h'.
1484 This fixes the `multi' build.
1486 2016-09-08 Werner Lemberg <wl@gnu.org>
1488 [autofit] Another improvement to Armenian support.
1490 Suggested by Hrant H Papazian <hpapazian@gmail.com>.
1492 * src/autofit/afscript.h: Use better suited characters to derive
1493 default stem widths.
1495 2016-09-07 Alexei Podtelezhnikov <apodtele@gmail.com>
1497 * src/smooth/ftgrays.c (gray_hline): Micro-optimize.
1499 2016-09-06 Alexei Podtelezhnikov <apodtele@gmail.com>
1501 [smooth] Operate in absolute bitmap coordinates.
1503 Simpler bitmap addressing improves performance by 1.5%.
1505 * src/smooth/ftgrays.c (gray_TWorker): Remove count fields.
1506 (gray_dump_cells, gray_find_cell, gray_set_cell, gray_hline,
1507 gray_sweep, gray_convert_glyph, gray_raster_render): Updated.
1509 2016-09-06 Alexei Podtelezhnikov <apodtele@gmail.com>
1511 [smooth] Improve contour start (take 2).
1513 * src/smooth/ftgrays.c (gray_move_to): Call `gray_set_cell' directly
1515 (gray_start_cell): ... this function, which is removed.
1516 (gray_convert_glyph): Make initial y-coordinate invalid.
1518 2016-09-06 Werner Lemberg <wl@gnu.org>
1520 [type1] MM fonts support exactly zero named instances (#48748).
1522 * src/type1/t1load.c (T1_Get_MM_Var): Set `num_namedstyles' to zero.
1524 2016-09-06 Jonathan Kew <jfkthame@gmail.com>
1526 [cff] Fix uninitialized memory.
1530 https://bugzilla.mozilla.org/show_bug.cgi?id=1270288
1532 * src/cff/cf2intrp.c (cf2_interpT2CharString): Initialize `storage'
1533 array to handle a `get' opcode without a previous `put'.
1535 2016-09-05 Alexei Podtelezhnikov <apodtele@gmail.com>
1537 * src/smooth/ftgrays.c (gray_move_to, gray_start_cell): Revert.
1539 2016-09-05 Alexei Podtelezhnikov <apodtele@gmail.com>
1541 [smooth] Improve contour start.
1543 * src/smooth/ftgrays.c (gray_move_to): Call `gray_set_cell' directly
1545 (gray_start_cell): ... this function, which is removed.
1547 2016-09-05 Werner Lemberg <wl@gnu.org>
1549 [cff] Fix memory initialization.
1551 * src/cff/cf2stack.c (cf2_stack_init): Use `FT_NEW'. The `Q'
1552 variants of FreeType's memory allocation macros don't do zeroing.
1554 2016-09-05 Werner Lemberg <wl@gnu.org>
1556 [ftrandom] Minor improvements.
1558 * src/tools/ftrandom/ftrandom.c (_XOPEN_SOURCE): New macro, set to
1561 * src/tools/ftrandom/Makefile (CFLAGS): Split off include
1563 (INCLUDES): ... this new variable.
1564 (LDFLAGS): New variable.
1565 (ftrandom.o, ftrandom): Updated.
1567 2016-09-05 Werner Lemberg <wl@gnu.org>
1569 [autofit] Improve Armenian support.
1571 Thanks to Hrant H Papazian <hpapazian@gmail.com> for help.
1573 * src/autofit/afblue.dat (AF_BLUE_STRING_ARMENIAN_*): Improve
1574 selection of characters.
1576 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1578 2016-09-04 Werner Lemberg <wl@gnu.org>
1580 [ftrandom] Improve Makefile.
1582 It now supports both a normal build (`./configure && make') and a
1583 development build (`make devel').
1585 * src/tools/ftrandom/Makefile (VPATH): Set it so that
1586 `libfreetype.a' gets searched in both `objs' (for the development
1587 build) and `objs/.libs' (for a normal build which uses libtool).
1588 (LIBS): Add missing libraries.
1589 (ftrandom.o): New rule.
1590 (ftrandom): Use automatic variables.
1592 2016-09-03 Werner Lemberg <wl@gnu.org>
1594 [truetype] More fixes for handling of GX deltas.
1596 Problems reported by Bob Taylor <Bob.Taylor@monotype.com>.
1598 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix rough
1599 sanity test for glyph variation array header size.
1600 Always set stream position before reading packed x and y deltas.
1601 Fix thinko w.r.t. `localpoints' array.
1603 2016-09-03 Werner Lemberg <wl@gnu.org>
1605 [ftrandom] Various fixes.
1607 * src/tools/ftrandom/ftrandom.c (GOOD_FONTS_DIR): Provide better
1609 (error_fraction): Make it of type `double' to work as advertized –
1610 this was completely broken.
1611 Update all related code.
1612 (error_count, fcnt): Make it unsigned to fix compiler warnings.
1613 Update all related code.
1614 (fontlist): Change `len' member to `long' to fix compiler warnings.
1615 (FT_MoveTo, FT_LineTo, FT_ConicTo, FT_CubicTo, abort_test): Tag
1617 (TestFace, FindFonts, copyfont, do_test): Fix compiler warnings.
1618 (ExecuteTest): Ditto.
1619 Call `FT_Done_FreeType'.
1620 (getErrorCnt): Replace `ceil' with an ordinary cast to `unsigned
1622 (usage): Improve output.
1623 (main): Fix compiler warnings.
1625 * src/tools/ftrandom/README: Updated.
1627 2016-09-03 Werner Lemberg <wl@gnu.org>
1629 [base] Avoid negative bitmap strike dimensions (#48985).
1631 * src/base/ftobjs.c (FT_Open_Face): Check whether negation was
1632 actually successful. For example, this can fail for value
1633 -32768 if the type is `signed short'. If there are problems,
1636 2016-09-03 Werner Lemberg <wl@gnu.org>
1638 [cff] Avoid null pointer passed to FT_MEM_COPY (#48984).
1640 * src/cff/cffload.c (cff_index_get_name): Check `byte_len'.
1642 2016-09-02 Werner Lemberg <wl@gnu.org>
1644 [unix] Enable 64bit support in file system access (#48962).
1646 * builds/unix/configure.raw: Call `AC_SYS_LARGEFILE'.
1648 2016-09-02 Werner Lemberg <wl@gnu.org>
1650 [sfnt] Avoid left shift of negative value (#48980).
1652 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bit_aligned): Use unsigned
1655 2016-09-02 Werner Lemberg <wl@gnu.org>
1657 * src/smooth/ftgrays.c (gray_hline): Fix clang compiler warnings.
1659 2016-09-02 Werner Lemberg <wl@gnu.org>
1661 Some preparations for the next release.
1663 * include/freetype/config/ftoption.h
1664 (TT_CONFIG_OPTION_SUBPIXEL_HINTING): Enable.
1666 * docs/CHANGES: Updated.
1668 2016-09-01 Alexei Podtelezhnikov <apodtele@gmail.com>
1670 [smooth] Simplify span rendering more.
1672 It turns out that there is significant cost associated with `FT_Span'
1673 creation and calls to `gray_render_span' because it happens so
1674 frequently. This removes these steps from our internal use but leaves
1675 it alone for `FT_RASTER_FLAG_DIRECT" to preserve API. The speed gain
1678 * src/smooth/ftgrays.c (gray_render_span): Removed. The code is
1680 (gray_hline): ... here.
1682 2016-08-30 Alexei Podtelezhnikov <apodtele@gmail.com>
1684 [smooth] Streamline pixmap drawing a bit more.
1686 Zero coverage is unlikely (1 out of 256) to warrant checking. This
1687 gives 0.5% speed improvement in rendering simple glyphs.
1689 * src/smooth/ftgrays.c (gray_hline, gray_render_span): Remove checks.
1691 2016-08-29 Alexei Podtelezhnikov <apodtele@gmail.com>
1693 [smooth] Streamline pixmap drawing.
1695 This gives 2% speed improvement in rendering simple glyphs.
1697 * src/smooth/ftgrays.c (TPixmap): Reduced pixmap descriptor with a
1698 pointer to its bottom-left and pitch to be used in...
1699 (gray_TWorker): ... here.
1700 (gray_render_span): Move pixmap flow check from here...
1701 (gray_raster_render): .. to here.
1703 2016-08-27 Alexei Podtelezhnikov <apodtele@gmail.com>
1705 [smooth] Reduce stack of band boundaries.
1707 * src/smooth/ftgrays.c (gray_TBand): Removed.
1708 (gray_convert_glyph): Updated to stack band boundaries concisely.
1710 2016-08-26 Werner Lemberg <wl@gnu.org>
1712 * src/cid/cidload.c (cid_face_open): Improve handling of `SDBytes'.
1714 2016-08-26 Werner Lemberg <wl@gnu.org>
1716 [cid] Fix commit from 2016-05-16.
1718 * src/cid/cidparse.c (cid_parser_new): Fix off-by-one errors.
1720 2016-08-26 Werner Lemberg <wl@gnu.org>
1722 [sfnt] Cache offset and size to bitmap data table.
1724 This commit avoids `EBDT' and friends being looked up again and
1725 again while loading a single embedded bitmap.
1727 * include/freetype/internal/tttypes.h (TT_FaceRec)
1728 [TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: New fields `ebdt_start' and
1731 * src/sfnt/ttsbit.c (tt_sbit_decoder_init): Move table lookup to ...
1732 (tt_face_load_sbit): ... this function; also store the table size
1735 2016-08-26 Alexei Podtelezhnikov <apodtele@gmail.com>
1737 * src/smooth/ftgrays.c (gray_raster_render): Minor tweaks.
1739 2016-08-26 Werner Lemberg <wl@gnu.org>
1741 [type1] Fix heap buffer overflow.
1745 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36
1747 * src/type1/t1load.c (parse_charstrings): Reject fonts that don't
1748 contain glyph names.
1750 2016-08-25 Werner Lemberg <wl@gnu.org>
1752 [sfnt] Fix previous commit (#48901).
1754 * src/sfnt/ttcmap.c (tt_cmap4_char_map_binary): Thinkos.
1756 2016-08-25 Werner Lemberg <wl@gnu.org>
1758 [sfnt] Speed up handling of invalid format 4 cmaps.
1760 * src/sfnt/ttcmap.c (tt_cmap4_next, tt_cmap4_char_map_binary): Add
1761 tests for `num_glyph' from `tt_cmap4_char_map_linear'.
1763 2016-08-25 Werner Lemberg <wl@gnu.org>
1765 * include/freetype/internal/ftdriver.h: Remove unused typedefs.
1767 2016-08-22 Alexei Podtelezhnikov <apodtele@gmail.com>
1769 [smooth] Simplify span rendering.
1771 This removes unnecessary complexity of span merging and buffering.
1772 Instead, the spans are rendered as they come, speeding up the
1773 rendering by about 5% as a result.
1775 * src/smooth/ftgrays.c [FT_MAX_GRAY_SPANS]: Macro removed.
1776 (gray_TWorker): Remove span buffer and related fields.
1777 (gray_sweep, gray_hline): Updated.
1779 * include/freetype/ftimage.h: Remove documentation note about
1780 `FT_MAX_GRAY_SPANS', which was never in `ftoption.h' and is now gone.
1782 2016-08-16 Werner Lemberg <wl@gnu.org>
1784 [truetype] Fix `MPS' instruction.
1786 According to Greg Hitchcock, MPS in DWrite really returns the point
1789 * src/truetype/ttobjs.h (TT_SizeRec): Add `point_size' member.
1791 * src/truetype/ttdriver.c (tt_size_request): Set `point_size'.
1793 * src/truetype/ttinterp.h (TT_ExecContextRec): Add `pointSize'
1796 * src/truetype/ttinterp.c (TT_Load_Context): Updated.
1797 (Ins_MPS): Fix instruction.
1799 2016-08-16 Werner Lemberg <wl@gnu.org>
1801 [lzw] Optimize last commit.
1803 * src/lzw/ftzopen.c (ft_lzwstate_get_code): Move check into
1806 2016-08-16 Werner Lemberg <wl@gnu.org>
1808 [lzw] Avoid invalid left shift.
1812 https://bugzilla.mozilla.org/show_bug.cgi?id=1295366
1814 * src/lzw/ftzopen.c (ft_lzwstate_get_code): Limit `num_bits'.
1816 2016-08-16 Werner Lemberg <wl@gnu.org>
1818 [lzw] Avoid buffer overrun.
1822 https://bugzilla.mozilla.org/show_bug.cgi?id=1273283
1824 * src/lzw/ftzopen.c (ft_lzwstate_refill): Ensure `buf_size' doesn't
1827 2016-08-16 Werner Lemberg <wl@gnu.org>
1829 [truetype] Fix compiler warning.
1831 * src/truetype/ttgload.c (load_truetype_glyph): Add cast.
1833 2016-08-13 Werner Lemberg <wl@gnu.org>
1835 [winfonts] Avoid zero bitmap width and height.
1839 https://bugzilla.mozilla.org/show_bug.cgi?id=1272173
1841 * src/winfonts/winfnt.c (FNT_Face_Init): Check zero pixel height.
1842 (FNT_Load_Glyph): Check for zero pitch.
1844 2016-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
1846 * src/truetype/ttinterp.c (Pop_Push_Count): Revert changes.
1848 2016-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
1850 * src/truetype/ttinterp.c (TT_RunIns): Minor and formatting.
1852 2016-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
1854 * src/truetype/ttinterp.c (Pop_Push_Count): Fix some entries.
1856 2016-08-10 Peter Klotz <Peter.Klotz@ith-icoserve.com>
1858 * src/smooth/ftgrays.c (gray_hline): Fix uninitialized access.
1860 2016-08-10 Werner Lemberg <wl@gnu.org>
1862 [sfnt] Use correct type for `italicAngle' field (#48732).
1864 * src/sfnt/ttload.c (tt_face_load_post): Fix types.
1866 2016-08-06 Jon Spencer <jon@jonspencer.ca>
1868 [sfnt] Fix `FT_Get_Advance' for bitmap strikes.
1870 `FT_Get_Advance' returns 0 for bitmap fonts. It first gets the
1871 advance value from the font table and then scales it by the
1872 `font->size->metrics->x_scale' field. But `FT_Select_Size' doesn't
1873 set that value for bitmap fonts and the advance gets scaled to zero.
1877 https://github.com/behdad/harfbuzz/issues/252
1879 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
1880 <TT_SBIT_TABLE_TYPE_EBLC>: Set scale values.
1882 2016-08-06 Behdad Esfahbod <behdad@behdad.org>
1884 [truetype] Fix GX variation handling of composites.
1886 * src/truetype/ttgload.c (load_truetype_glyph)
1887 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check `ARGS_ARE_XY_VALUES' flag.
1889 2016-08-05 Alexei Podtelezhnikov <apodtele@gmail.com>
1891 [smooth] Minor refactoring.
1893 * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line):
1896 2016-07-29 Werner Lemberg <wl@gnu.org>
1898 [sfnt, truetype] Don't abort on invalid `maxComponentDepth'.
1900 Since 2016-05-16 we detect infinite recursion directly.
1902 * src/sfnt/ttload.c (tt_face_load_maxp): Don't adjust
1903 `maxComponentDepth'.
1904 * src/truetype/ttgload.c (load_truetype_glyph): Don't abort if
1905 `maxComponentDepth' is not valid. Instead, simply adjust its value
1906 and emit a tracing message.
1908 2016-07-26 Werner Lemberg <wl@gnu.org>
1910 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Minor.
1912 No functional change.
1914 2016-07-22 Hin-Tak Leung <htl10@users.sourceforge.net>
1916 [truetype] Record the end of IDEFs.
1918 To match the logic in FDEF. The value of the end is only used for
1919 bound-checking in `Ins_JMPR', so it may not have been obvious that
1920 it was not recorded. Tested (as part of Font Validator 2.0) all the
1921 fonts on Fedora and did not see any change.
1923 * src/truetype/ttinterp.c (Ins_IDEF): Updated.
1925 2016-07-19 Werner Lemberg <wl@gnu.org>
1927 [truetype] Sanitizer fix, second try.
1929 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary
1930 tests and use only one slot more.
1932 2016-07-19 Werner Lemberg <wl@gnu.org>
1934 [truetype] Sanitizer fix.
1936 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Increase array
1937 to fix nested loops.
1939 2016-07-18 Werner Lemberg <wl@gnu.org>
1941 [truetype] Make GETDATA work only for GX fonts.
1943 * src/truetype/ttinterp.c (opcode_name): Updated.
1944 (Ins_GETDATA): Only define for `TT_CONFIG_OPTION_GX_VAR_SUPPORT'.
1945 (TT_RunIns): Updated.
1947 2016-07-17 Werner Lemberg <wl@gnu.org>
1949 [truetype] Add support for Apple's
1951 GETDATA[], opcode 0x92
1953 bytecode instruction. It always returns 17, and we have absolutely
1954 no idea what it is good for...
1956 * src/truetype/ttinterp.c (Pop_Push_Count, opcode_name): Updated.
1957 (Ins_GETDATA): New function.
1958 (TT_RunIns): Add it.
1960 2016-07-16 Werner Lemberg <wl@gnu.org>
1962 [truetype] Add bytecode support for GX variation fonts.
1964 This commit implements undocumented (but confirmed) stuff from
1965 Apple's old bytecode engine.
1967 GETVARIATION[], opcode 0x91
1968 This opcode pushes normalized variation coordinates for all axes
1969 onto the stack (in 2.14 format). Coordinate of first axis gets
1972 GETINFO[], selector bit 3
1973 If GX variation support is enabled, bit 10 of the result is set
1976 * src/truetype/ttinterp.c: Include FT_MULTIPLE_MASTERS_H.
1977 (opcode_name) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Updated.
1978 (Ins_GETINFO) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Handle selector
1979 bit 3, checking support for variation glyph hinting.
1980 (Ins_GETVARIATION) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New function
1981 to implement opcode 0x91.
1982 (TT_RunIns) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Handle opcode 0x91.
1984 2016-07-16 Werner Lemberg <wl@gnu.org>
1986 [truetype] Fix GETINFO bytecode instruction.
1988 * src/truetype/ttinterp.c (Ins_GETINFO): Fix return value for
1989 stretching information.
1991 2016-07-16 Behdad Esfahbod <behdad@behdad.org>
1993 [truetype] Make all glyphs in `Zycon' GX font work.
1995 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary
1998 2016-07-16 Werner Lemberg <wl@gnu.org>
2000 [truetype] Fix GX delta tracing.
2002 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Trace
2003 relative point movements.
2005 2016-07-16 Behdad Esfahbod <behdad@behdad.org>
2007 [truetype] More fixes for GX.
2009 This finally fixes the rendering of the cyclist and the lizard in
2012 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): `first' point
2013 index is always cumulative.
2015 (tt_handle_deltas): Rename to...
2016 (tt_interpolate_deltas): ... This.
2017 Add new parameter for output point array.
2020 (TT_Vary_Apply_Glyph_Deltas): Add `points_out' array; it now holds
2021 the intermediate results of `tt_interpolate_deltas' that are to be
2022 added to `outline->points'.
2024 2016-07-15 Werner Lemberg <wl@gnu.org>
2026 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Thinko.
2028 `max_pos' is always larger than `min_pos' so `FT_ABS' is not needed.
2032 2016-07-16 Nikolaus Waxweiler <madigens@gmail.com>
2034 * src/truetype/ttinterp.c (Ins_MIRP): Fix copy-and-paste error.
2036 Problem reported by Hin-Tak Leung.
2038 2016-07-15 Werner Lemberg <wl@gnu.org>
2040 [autofit] Update and improve segment and edge tracing.
2042 * src/autofit/afhints.c (af_glyph_hints_dump_segments): Trace
2044 Don't show first point of segment as a replacement for `pos'; this
2045 is (a) misleading, since the difference to `pos' can be almost
2046 arbitrarily large in corner cases, and (b) it is better to have all
2047 segment data in font units instead of a single value given in output
2050 (af_glyph_hints_dump_edges): Show px->units and units->px conversion
2051 values for convenience.
2054 2016-07-15 Werner Lemberg <wl@gnu.org>
2056 [autofit] For edges, reject segments wider than 1px (#41334).
2058 * src/autofit/afhints.h (AF_SegmentRec): New member `delta'.
2060 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Compute
2062 (af_latin_hints_compute_edges): Reject segments with a delta larger
2065 2016-07-14 Werner Lemberg <wl@gnu.org>
2067 * include/freetype/freetype.h (FT_IS_NAMED_INSTANCE): New macro.
2069 2016-07-14 Werner Lemberg <wl@gnu.org>
2071 [sfnt] Fix `face_index' value in `FT_Face' for named instances.
2073 * src/sfnt/sfobjs.c (sfnt_init_face): Don't strip off higher 16bits.
2075 2016-07-14 Werner Lemberg <wl@gnu.org>
2077 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix tracing.
2079 2016-07-14 Behdad Esfahbod <behdad@behdad.org>
2081 [truetype] Fix gxvar delta interpolation.
2083 The coordinates of the base font should be used for interpolation
2084 purposes, NOT the current points (i.e., the result of accumulation
2085 of previous deltas).
2087 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Initialize
2088 `points_org' before looping over all tuples.
2091 ----------------------------------------------------------------------------
2093 Copyright (C) 2016-2023 by
2094 David Turner, Robert Wilhelm, and Werner Lemberg.
2096 This file is part of the FreeType project, and may only be used, modified,
2097 and distributed under the terms of the FreeType project license,
2098 LICENSE.TXT. By continuing to use, modify, or distribute this file you
2099 indicate that you have read the license and understand and accept it
2104 version-control: never