1 2017-09-16 Werner Lemberg <wl@gnu.org>
3 * Version 2.8.1 released.
4 =========================
7 Tag sources with `VER-2-8-1'.
9 * docs/VERSION.TXT: Add entry for version 2.8.1.
10 * docs/CHANGES: Updated.
12 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
13 builds/windows/vc2005/index.html,
14 builds/windows/vc2008/freetype.vcproj,
15 builds/windows/vc2008/index.html,
16 builds/windows/vc2010/freetype.vcxproj,
17 builds/windows/vc2010/index.html,
18 builds/windows/visualc/freetype.dsp,
19 builds/windows/visualc/freetype.vcproj,
20 builds/windows/visualc/index.html,
21 builds/windows/visualce/freetype.dsp,
22 builds/windows/visualce/freetype.vcproj,
23 builds/windows/visualce/index.html,
24 builds/wince/vc2005-ce/freetype.vcproj,
25 builds/wince/vc2005-ce/index.html,
26 builds/wince/vc2008-ce/freetype.vcproj,
27 builds/wince/vc2008-ce/index.html: s/2.8/2.8.1/, s/28/281/.
29 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
31 * builds/unix/configure.raw (version_info): Set to 21:0:15.
32 * CMakeLists.txt (VERSION_PATCH): Set to 1.
34 2017-09-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
36 [sfnt] lowest gcc for vectors (e1d0249e) is changed to 4.7.
38 __builtin_shuffle() was introduced in gcc-4.7. The lowest
39 gcc to enable vector operation is delayed from 4.6 to 4.7.
41 * src/sfnt/pngshim.c (premultiply_data): Fix cpp-macro to
42 enable the vector operation, to change the lowest gcc version
45 2017-09-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
47 [cache] Fix a possible overflow by signed integer comparison.
49 Improve the code by 5d3ff05615dda6d1325ed612381a17a0df04c975 ,
50 issues are found by Behdad Esfahbod and Werner Lemberg.
52 * src/cache/ftcbasic.c (FTC_ImageCache_Lookup): Replace
53 a subtraction to check higher bit by a bit operation,
54 and cpp-conditionalize for appropriate systems. Add better
55 documentation to the comment.
56 (FTC_ImageCache_LookupScaler): Ditto.
57 (FTC_SBitCache_Lookup): Ditto.
58 (FTC_SBitCache_LookupScaler): Ditto.
60 2017-09-13 Werner Lemberg <wl@gnu.org>
62 [autofit] Really fix #41334 (#52000).
64 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Set
65 `segment->delta' everywhere.
67 2017-09-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
69 [autofit, sfnt] Fix for `make multi'.
71 * src/autofit/afshaper.c: Include FT_ADVANCE_H, to use
72 FT_Get_Advance() in it.
73 * src/sfnt/ttcmap.c: Include FT_SERVICE_POSTSCRIPT_CMAPS_H
74 to use PS_Unicodes in it, also include `ttpost.h' to use
75 tt_face_get_ps_name() in it.
77 2017-09-11 Azzuro <azzuro@team-mediaportal.com>
79 [build] Improve builds with different MS Visual Studio versions.
81 * builds/windows/vc2010/freetype.vcxproj: Switch platform toolset
82 according to the Visual Studio version.
84 2017-09-11 Werner Lemberg <wl@gnu.org>
86 * src/sfnt/ttkern.c (tt_face_load_kern): Reject format 2 tables.
90 2017-09-09 Werner Lemberg <wl@gnu.org>
92 [autofit] Improve communication with ftgrid.
94 * src/autofit/afhints.c (af_glyph_hints_get_segment_offset):
95 Provide values in font units.
97 2017-09-08 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
99 [base] Remove a check for resource ID in the resource fork driver.
101 LastResort.dfont has a marginal resource ID 0xFFFF for sfnt
102 resource. Inside Macintosh: More Macintosh Toolbox, `Resource IDs'
103 (1-46), tells that some IDs are reserved and should not be used.
104 FreeType2 just uses resource ID to sort the fragmented resource.
105 To accept the marginal fonts, the checking is removed.
107 * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Remove res_id
108 validity check, fix a trace message format.
110 2017-09-08 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
112 [sfnt, truetype] Register the tags for marginal fonts.
114 The first 32bit of standard TrueType variants is 0x00010000,
115 `OTTO', `ttcf', `true' or `typ1'. 2 marginal dfonts on legacy Mac
116 OS X, Keyboard.dfont and LastResort.dfont, have the sfnt resources
117 starting 0xA5 followed by `kbd' or `lst'. Considering the following
118 data could be parsed as conventional TrueType fonts, the header
119 checking is updated to allow these tags. It seems that recent Mac
120 OS X has already switched to normal TTF for these fonts.
122 See the discussion at
123 http://u88.n24.queensu.ca/exiftool/forum/index.php?topic=3931.0
125 * include/freetype/tttags.h (TTAG_0xA5kbd, TTAG_0xA5lst): New header
126 tags for Keyboard.dfont and LastResort.dfont.
127 * src/sfnt/sfobjs.c (sfnt_open_font): Accept the sfnt resource
128 starts with TTAG_0xA5kbd or TTAG_0xA5lst.
129 * src/truetype/ttobjs.c (tt_face_init): Accept the face with the
130 format tag is TTAG_0xA5kbd or TTAG_0xA5lst.
132 2017-09-05 Werner Lemberg <wl@gnu.org>
134 Fix multiple calls of `FT_Bitmap_Convert'.
136 The documentation of `FT_Bitmap_Convert' says that multiple calls do
137 proper reallocation of the target FT_Bitmap object. However, this
138 failed for the sequence
144 Reason was that `FT_Bitmap_Convert' only reallocated the bitmap
145 buffer if it became too small; it didn't make the buffer smaller.
146 For an empty bitmap following a non-empty one, only the buffer
147 dimension got set to zero, without deallocation. If the next call
148 was a non-empty buffer again, an assertion in `ft_mem_qrealloc' was
151 * src/base/ftbitmap.c (FT_Bitmap_Convert): Always reallocate target
152 buffer to the correct size.
154 * docs/CHANGES: Document it.
156 2017-09-05 Werner Lemberg <wl@gnu.org>
158 [bdf] Fix size and resolution handling.
160 * src/bdf/bdfdrivr.c (BDF_Face_Init): Use `SIZE' values if
161 `POINT_SIZE', `RESOLUTION_X', or `RESOLUTION_Y' properties are
164 * docs/CHANGES: Document it.
166 2017-08-25 Alexei Podtelezhnikov <apodtele@gmail.com>
168 Swap `ALLOC_MULT' arguments (#51833).
170 * src/base/ftbitmap.c (ft_bitmap_assure_buffer): Updated.
171 * src/winfonts/winfnt.c (FNT_Load_Glyph): Updated.
172 * src/raster/ftrend1.c (ft_raster1_render): Updated.
174 2017-08-23 Werner Lemberg <wl@gnu.org>
176 [sfnt] Fix clang compilation (#51788).
178 * src/sfnt/pngshim.c (premultiply_data): Use vectors instead of
180 (vector_shuffle): New macro to take care of a different built-in
181 function name on clang.
183 2017-08-22 Werner Lemberg <wl@gnu.org>
185 [base] Don't zero out allocated memory twice (#51816).
187 Patch applied from bug report.
189 * src/base/ftutil.c (ft_mem_qrealloc): Use low-level allocation to
190 avoid unnecessary overhead.
192 2017-08-22 Werner Lemberg <wl@gnu.org>
194 [truetype] Integer overflow.
198 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3107
200 * src/truetype/ttinterp.c (Ins_MDRP, Ins_MIRP, Ins_ALIGNPTS): Use
203 2017-08-17 Alexei Podtelezhnikov <apodtele@gmail.com>
205 [sfnt] Avoid synthetic unicode for symbol fonts with PUA.
209 https://bugs.chromium.org/p/chromium/issues/detail?id=754574
211 * src/sfnt/sfobjs.c (sfnt_load_face): Check for FT_ENCODING_MS_SYMBOL.
213 2017-08-16 Werner Lemberg <wl@gnu.org>
215 * src/sfnt/pngshim.c (premultiply_data): Fix compiler warnings.
217 2017-08-15 Behdad Esfahbod <behdad@behdad.org>
219 [sfnt] Speed up PNG image loading.
221 This reduces the overhead of `premultiply_data' by 60%.
223 * src/sfnt/pngshim.c (premultiply_data): Provide code which uses
224 gcc's (and clang's) `vector_byte' attribute to process 4 pixels at a
227 2017-08-11 Werner Lemberg <wl@gnu.org>
229 [sfnt, truetype] Improve handling of missing sbits.
233 Modern bitmap-only SFNTs like `NotoColorEmoji.ttf' don't contain
234 entries in the bitmap strike(s) for empty glyphs. Instead, they
235 rely that a space glyph gets created from the font's metrics data.
236 This commit makes FreeType behave accordingly.
238 * include/freetype/fterrdef.h (FT_Err_Missing_Bitmap): New error
241 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_image): Change error codes
242 to make a distinction between a missing bitmap in a composite and a
243 simple missing bitmap.
245 * src/truetype/ttgload.c (TT_Load_Glyph): For a missing bitmap (in a
246 bitmap-only font), synthesize an empty bitmap glyph if metrics are
249 2017-08-10 Werner Lemberg <wl@gnu.org>
251 [base] Minor API improvement for default variation axis setting.
253 * src/base/ftmm.c (FT_Set_MM_Design_Coordinates,
254 FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates,
255 FT_Set_Var_Blend_Coordinates): Allow coords==NULL if num_coords==0.
257 * docs/CHANGES: Updated.
259 2017-08-08 Werner Lemberg <wl@gnu.org>
261 [psnames] Really fix issue #49949.
263 We now use a separate preprocessor macro to handle both definition
264 and declaration of the glyph name arrays.
266 * src/psnames/psmodule.c (DEFINE_PS_TABLE_DATA): New macro.
268 * src/tools/glnames.py (StringTable::dump,
269 StringTable::dump_sublist): Use `DEFINE_PS_TABLE_DATA'.
270 (dump_encoding): Ditto.
271 (main): Use `wb' mode for writing the output file, which works on
274 * src/psnames/pstables.h: Regenerated.
276 2017-08-08 Alexei Podtelezhnikov <apodtele@gmail.com>
278 [smooth] Harmony LCD rendering.
280 This is a new technology for LCD-optimized rendering. It capitalizes
281 on the fact that each color channel grid is shifted by a third of a
282 pixel. Therefore it is logical to render 3 separate monochrome
283 bitmaps shifting the outline by 1/3 pixel, and then combine them.
284 Importantly, the resulting output does not require additional LCD
287 * src/smooth/ftsmooth.c (ft_smooth_render_generic)
288 [!FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Implement new LCD-optimized
291 * include/freetype/ftlcdfil.h, include/freetype/freetype.h,
292 include/freetype/config/ftoption.h, devel/ftoption.h: Updated
295 2017-08-08 Alexei Podtelezhnikov <apodtele@gmail.com>
297 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Clean up.
299 2017-08-08 Alexei Podtelezhnikov <apodtele@gmail.com>
301 * src/sfnt/ttpost.c (format): Use otspec-compliant versions.
303 2017-08-05 Werner Lemberg <wl@gnu.org>
305 [truetype] Integer overflow.
309 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2868
311 * src/truetype/ttinterp.c (Ins_ALIGNRP): Use NEG_LONG.
313 2017-08-05 Werner Lemberg <wl@gnu.org>
315 [base, truetype] New function `FT_Get_Var_Axis_Flags'.
317 The reserved `flags' field got a value in OpenType version 1.8.2;
318 unfortunately, the public `FT_Var_Axis' structure misses the
319 corresponding element. Since we can't add a new field, we add an
322 * src/base/ftmm.c (FT_Get_Var_Axis_Flags): New function.
324 * include/freetype/ftmm.h (FT_VAR_AXIS_FLAG_HIDDEN): New macro.
327 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Increase allocated memory
328 of `mmvar' to hold axis flags.
329 Fill the axis flags array.
331 * docs/CHANGES: Updated.
333 2017-08-03 Nikolaus Waxweiler <madigens@gmail.com>
335 [truetype] Fix metrics of B/W hinting in v40 mode.
337 Phantom points are now saved outside v40 backwards compatibility
338 mode. This fixes the jumping glyphs when switching between v35 and
341 * src/truetype/ttgload.c (TT_Hint_Glyph): Fix inversed bool logic.
343 2017-08-03 Nikolaus Waxweiler <madigens@gmail.com>
345 [truetype] Do not set any ClearType flags in v40 monochrome mode.
347 This fixes weird behavior of instructions that resulted in rendering
348 differences between v35 and v40 in monochrome mode, e.g., in
351 * src/truetype/ttinterp.c (Ins_GETINFO)
352 [TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL]: Check
353 `subpixel_hinting_lean'.
355 2017-08-01 Werner Lemberg <wl@gnu.org>
357 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Fix thinko.
359 2017-08-01 Behdad Esfahbod <behdad@behdad.org>
361 [truetype] Fix loading of named instances.
363 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Preserve file position
364 while loading the `avar' table.
366 2017-08-01 Werner Lemberg <wl@gnu.org>
368 [sfnt, truetype] Minor adjustments for OpenType 1.8.2.
370 * src/sfnt/sfobjs.c (sfnt_load_face): The units per EM value has now
373 * src/truetype/ttgload.c (load_truetype_glyph): The new OpenType
374 version explicitly allows all negative values for the number of
375 contours if we have a composite glyph (this is for better backwards
376 compatibility I guess), but it still recommends value -1.
378 2017-07-26 Werner Lemberg <wl@gnu.org>
380 [cff] Integer overflow.
384 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2738
386 * src/cff/cf2hints.c (cf2_glyphpath_computeOffset,
387 cf2_glyphpath_curveTo): Use ADD_INT32.
389 2017-07-13 Werner Lemberg <wl@gnu.org>
391 [base] Fix memory leak.
395 https://bugs.chromium.org/p/chromium/issues/detail?id=738362
397 * src/base/ftglyph.c (FT_Get_Glyph): Do proper deallocation in case
400 2017-07-12 Werner Lemberg <wl@gnu.org>
402 [base] Integer overflow.
406 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2573
408 * src/base/ftobjs.c (ft_glyphslot_grid_fit_metrics): Use
409 FT_PIX_CEIL_LONG and FT_PIX_ROUND_LONG.
411 2017-07-12 Werner Lemberg <wl@gnu.org>
413 * src/truetype/ttpload.c (tt_face_get_location): Off-by-one typo.
415 Also improve tracing message.
419 https://bugs.chromium.org/p/chromium/issues/detail?id=738919
421 2017-07-07 Werner Lemberg <wl@gnu.org>
423 [cff] Integer overflow.
427 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2517
429 * src/cff/cf2blues.c (cf2_blues_capture): Use SUB_INT32.
431 2017-07-05 Werner Lemberg <wl@gnu.org>
433 * src/sfnt/ttcmap.c (tt_cmap_unicode_class_rec): Fix warning.
435 2017-07-05 Werner Lemberg <wl@gnu.org>
437 * src/truetype/ttgxvar.c (FT_Stream_SeekSet): Fix warning (#51395).
439 2017-07-04 Werner Lemberg <wl@gnu.org>
441 [truetype] Prevent address overflow (#51365).
443 * src/truetype/ttgxvar.c (FT_Stream_SeekSet): Add guard.
445 2017-07-03 Alexei Podtelezhnikov <apodtele@gmail.com>
447 * src/base/ftlcdfil.c (ft_lcd_filter_fir): Improve code.
449 2017-07-03 Werner Lemberg <wl@gnu.org>
451 [truetype] Integer overflow.
455 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2455
457 * src/truetype/ttinterp.c (Ins_SCFS): Use SUB_LONG.
459 2017-07-01 Alexei Podtelezhnikov <apodtele@gmail.com>
461 * src/sfnt/sfobjs.c (sfnt_load_face): Ignore No_Unicode_Glyph_Name.
463 2017-06-28 Ben Wagner <bungeman@google.com>
465 Avoid Microsoft compiler warnings (#51331).
467 While clang's sanitizer recommends a cast to unsigned for safe
468 negation (to handle -INT_MIN), both MSVC and Visualc emit warning
469 C4146 if an unsigned value gets negated.
471 * include/freetype/internal/ftcalc.h (NEG_LONG, NEG_INT32),
472 src/base/ftcalc.c (FT_MOVE_SIGN): Replace negation with a
475 2017-06-27 Werner Lemberg <wl@gnu.org>
477 * src/cff/cffparse.c (do_fixed): Fix typo.
479 Spotted by chris <chris@gcjd.org>.
481 2017-06-27 Werner Lemberg <wl@gnu.org>
483 [truetype] Integer overflows.
487 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2384
488 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2391
490 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round, FT_DivFix): Use
493 * src/truetype/ttinterp.c (Ins_SxVTL): Use NEG_LONG.
495 2017-06-24 Werner Lemberg <wl@gnu.org>
497 [truetype] Integer overflows.
501 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2364
503 * src/truetype/ttinterp.c (Ins_ISECT): Use NEG_LONG.
505 2017-06-22 Werner Lemberg <wl@gnu.org>
507 [cff, truetype] Integer overflows.
511 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2323
512 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2328
514 * src/cff/cf2blues.c (cf2_blues_capture): Use ADD_INT32 and
517 * src/truetype/ttinterp.c (Ins_SDPVTL): Use SUB_LONG and NEG_LONG.
519 2017-06-21 Alexei Podtelezhnikov <apodtele@gmail.com>
521 [sfnt] Synthesize a Unicode charmap if one is missing.
523 * src/sfnt/ttcmap.h (tt_cmap_unicode_class_rec): Declare it.
524 * src/sfnt/ttcmap.c (tt_get_glyph_name, tt_cmap_unicode_init,
525 tt_cmap_unicode_done, tt_cmap_unicode_char_index,
526 tt_cmap_unicode_char_next, tt_cmap_unicode_class_rec): Implement
527 synthetic Unicode charmap class.
528 (tt_get_cmap_info): Make sure the callback is available.
530 * src/sfnt/sfobjs.c (sfnt_load_face)
531 [FT_CONFIG_OPTION_POSTSCRIPT_NAMES]: If Unicode charmap is missing,
534 * include/freetype/config/ftoption.h: Document it.
535 * devel/ftoption.h: Ditto.
537 2017-06-20 Tony Theodore <tonyt@logyst.com>
539 Fix pkg-config in freetype-config for cross-compiling (#51274).
541 * builds/unix/unix-def.in (PKG_CONFIG): New variable.
542 (freetype-config): Use it in sed expression.
544 * builds/unix/freetype-config.in: s/pkg-config/%PKG_CONFIG%/.
546 2017-06-20 Werner Lemberg <wl@gnu.org>
548 [cff, truetype] Integer overflows.
552 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2300
553 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2313
555 * src/cff/cf2hints.c (cf2_hintmap_adjustHints): Use ADD_INT32.
557 * src/truetype/ttinterp.c (Ins_ABS): Avoid FT_ABS.
559 2017-06-17 Alexei Podtelezhnikov <apodtele@gmail.com>
561 [base, smooth] LCD filtering cleanups.
563 * src/base/ftlcdfil.c (ft_lcd_filter_fir, _ft_lcd_filter_legacy):
564 Clean up, start filtering from the bottom-left origin.
566 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Updated.
568 2017-06-16 Werner Lemberg <wl@gnu.org>
570 [truetype] Integer overflows.
574 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2270
575 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2276
577 * src/truetype/ttinterp.c (Ins_MDRP, _iup_worker_interpolate): Use
578 ADD_LONG and SUB_LONG.
580 2017-06-15 Werner Lemberg <wl@gnu.org>
582 [bdf, cff] Integer overflows.
586 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2244
587 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2261
589 * src/bdf/bdfdrivr.c (BDF_Face_Init): Replace calls to FT_ABS with
590 direct code to avoid value negation.
592 * src/cff/cf2blues.c (cf2_blues_capture): Use SUB_INT32 and
595 2017-06-13 Werner Lemberg <wl@gnu.org>
597 * src/winfonts/winfnt.c (FNT_Face_Init): Don't set active encoding.
599 FreeType only sets a default active encoding for Unicode.
601 2017-06-13 Werner Lemberg <wl@gnu.org>
603 [cff, truetype] Integer overflows.
607 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2216
608 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2218
610 * src/cff/cf2fixed.h (cf2_fixedAbs): Use NEG_INT32.
612 * src/truetype/ttinterp.c (Ins_IP): Use SUB_LONG.
614 2017-06-11 Werner Lemberg <wl@gnu.org>
616 [cff] Integer overflows.
620 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2200
621 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2210
623 * src/cff/cf2hints.c (cf2_hintmap_insertHint): Use SUB_INT32 and
626 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdVMOVETO>: Use
629 2017-06-10 Werner Lemberg <wl@gnu.org>
631 [truetype] Fix TT_Set_Var_Design.
633 Reported by Nikolaus Waxweiler <madigens@gmail.com>.
635 * src/truetype/ttgxvar.c (TT_Set_Var_Design): Correctly handle the
636 case where we have less input coordinates than axes.
638 2017-06-10 Werner Lemberg <wl@gnu.org>
640 * src/base/ftcalc.c (FT_DivFix): Fix embarrassing typo.
642 Bug introduced 2017-05-28.
644 2017-06-09 Werner Lemberg <wl@gnu.org>
646 [cff, truetype] Integer overflows.
650 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2144
651 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2151
652 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2153
653 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2173
654 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2186
656 * src/cff/cf2blues.c (cf2_blues_init): Use SUB_INT32.
658 * src/truetype/ttinterp.c (Round_None, Round_To_Grid,
659 Round_To_Half_Grid, Round_Down_To_Grid, Round_Up_To_Grid,
660 Round_To_Double_Grid, Round_Super, Round_Super_45): Use ADD_LONG,
661 SUB_LONG, NEG_LONG, FT_PIX_ROUND_LONG, FT_PIX_CEIL_LONG,
663 (Ins_SxVTL, Ins_MIRP): Use SUB_LONG.
664 (_iup_worker_shift): Use SUB_LONG and ADD_LONG.
666 2017-06-09 Werner Lemberg <wl@gnu.org>
668 Provide more macros for flooring, ceiling, and rounding.
670 These versions don't produce run-time errors due to integer
673 * include/freetype/internal/ftobjs.h: Include FT_INTERNAL_CALC_H.
674 (FT_PAD_ROUND_LONG, FT_PAD_CEIL_LONG, FT_PIX_ROUND_LONG,
675 FT_PIX_CEIL_LONG): New macros.
676 (FT_PAD_ROUND_INT32, FT_PAD_CEIL_INT32, FT_PIX_ROUND_INT32,
677 FT_PIX_CEIL_INT32): New macros.
679 2017-06-09 Werner Lemberg <wl@gnu.org>
681 Remove unused macros.
683 * include/freetype/internal/ftcalc.h (ADD_INT, SUB_INT, MUL_INT,
686 2017-06-09 Werner Lemberg <wl@gnu.org>
688 */*: Remove `OVERFLOW_' prefix.
690 This increases readability.
692 2017-06-07 Werner Lemberg <wl@gnu.org>
694 [cff, truetype] Integer overflows.
698 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2133
699 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2137
701 * src/cff/cf2hints.c (cf2_hint_init): Use OVERFLOW_SUB_INT32.
703 * src/truetype/ttinterp.c (PROJECT, DUALPROJ): Use
706 2017-06-06 Werner Lemberg <wl@gnu.org>
708 [cff] Integer overflows.
712 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2109
713 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2110
714 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2122
716 * src/cff/cf2blues.c (cf2_blues_init): Use OVERFLOW_SUB_INT32.
718 * src/cff/cf2hints.c (cf2_hintmap_map): Synchronize if-else
721 2017-06-05 Werner Lemberg <wl@gnu.org>
723 [cff] Integer overflow.
727 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2089
729 * src/cff/cffload.c (cff_blend_doBlend): User OVERFLOW_ADD_INT32.
731 2017-06-04 Werner Lemberg <wl@gnu.org>
733 [cff, truetype] Integer overflows.
737 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2075
738 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2088
740 * src/cff/cf2font.c (cf2_font_setup): Use OVERFLOW_MUL_INT32.
742 * src/truetype/ttinterp.c (Ins_ISECT): Use OVERFLOW_MUL_LONG,
743 OVERFLOW_ADD_LONG, and OVERFLOW_SUB_LONG.
745 2017-06-03 Werner Lemberg <wl@gnu.org>
747 [base, cff, truetype] Integer overflows.
751 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2060
752 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2062
753 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2063
754 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2068
756 * src/base/ftobjs.c (ft_glyphslot_grid_fit_metrics): Use
757 OVERFLOW_ADD_LONG and OVERFLOW_SUB_LONG.
759 * src/cff/cf2blues.c (cf2_blues_capture), src/cff/cf2hints.c
760 (cf2_hintmap_adjustHints): Use OVERFLOW_SUB_INT32.
762 * src/truetype/ttgload.c (compute_glyph_metrics): User
765 * src/truetype/ttinterp.c (Direct_Move, Direct_Move_Orig,
766 Direct_Move_X, Direct_Move_Y, Direct_Move_Orig_X,
767 Direct_Move_Orig_Y, Move_Zp2_Point, Ins_MSIRP): Use
768 OVERFLOW_ADD_LONG and OVERFLOW_SUB_LONG.
770 2017-06-03 Werner Lemberg <wl@gnu.org>
772 * builds/unix/freetype-config.in: Fix pkg-config test (#51162).
774 Patch directly taken from bug report.
776 2017-06-03 Werner Lemberg <wl@gnu.org>
778 [bdf] Synchronize sanity checks with pcf driver.
782 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2054
783 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2058
785 * src/bdf/bdfdrivr.c (BDF_Face_Init): Check font ascent and descent.
786 Check AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE, RESOLUTION_X, and
787 RESOLUTION_Y properties.
789 2017-06-03 Werner Lemberg <wl@gnu.org>
791 [cff, truetype] Integer overflows.
795 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2047
796 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2057
798 * src/cff/cf2hints.c (cf2_hintmap_map): Use OVERFLOW_SUB_INT32.
800 * src/truetype/ttinterp.c (Ins_ADD): Use OVERFLOW_ADD_LONG.
801 (Ins_SUB): Use OVERFLOW_SUB_LONG.
802 (Ins_NEG): Use NEG_LONG.
804 2017-06-03 Werner Lemberg <wl@gnu.org>
806 ftcalc.h: Avoid left-shift of negative numbers.
810 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2055
812 * include/freetype/internal/ftcalc.h (INT_TO_F26DOT6,
813 INT_TO_F2DOT14, INT_TO_FIXED, F2DOT14_TO_FIXED): Use multiplication.
815 2017-06-02 Werner Lemberg <wl@gnu.org>
817 [cff] Even more integer overflows.
821 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2046
823 * src/cff/cf2intrp.c (cf2_doStems, cf2_interpT2CharString): Use
826 2017-06-02 Werner Lemberg <wl@gnu.org>
828 [cff] More integer overflows.
832 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2032
834 * src/cff/cf2blues.c (cf2_blues_init): Use OVERFLOW_SUB_INT32.
836 2017-06-02 Werner Lemberg <wl@gnu.org>
838 [bdf] Don't left-shift negative numbers.
842 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2031
844 * src/bdf/bdfdrivr.c (BDF_Face_Init): Use multiplication.
846 2017-06-02 Werner Lemberg <wl@gnu.org>
848 [bdf] Fix integer scanning routines.
852 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2029
854 * src/bdf/bdflib.c (_bdf_atoul, _bdf_atol, _bdf_atous, _bdf_atos):
855 Stop scanning if result would overflow.
857 2017-06-02 Werner Lemberg <wl@gnu.org>
859 [cff] Fix integer overflows.
863 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2027
864 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2028
866 * src/cff/cf2hints.c (cf2_hintmap_insertHint), src/cff/cf2intrp.c
867 (cf2_doFlex): Use OVERFLOW_ADD_INT32 and OVERFLOW_SUB_INT32.
869 2017-06-01 Werner Lemberg <wl@gnu.org>
871 [smooth] Some 32bit integer overflow run-time errors.
873 * src/smooth/ftgrays.c [STANDALONE] (OVERFLOW_ADD_LONG,
874 OVERFLOW_SUB_LONG, OVERFLOW_MUL_LONG, NEG_LONG): New macros.
875 [!STANDALONE]: Include FT_INTERNAL_CALC_H.
876 (gray_render_cubic): Use those macros where appropriate.
878 2017-06-01 Werner Lemberg <wl@gnu.org>
880 * src/base/ftglyph.c (FT_Get_Glyph): Check `slot->advance'.
882 2017-06-01 Werner Lemberg <wl@gnu.org>
884 [psaux] 32bit integer overflow tun-time errors (#46149).
886 * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Use
887 OVERFLOW_ADD_LONG and OVERFLOW_SUB_LONG where appropriate.
889 2017-06-01 Werner Lemberg <wl@gnu.org>
891 * src/truetype/ttinterp.c (TT_RunIns): Adjust loop counter again.
893 Problem reported by Marek Kašík <mkasik@redhat.com>.
895 The problematic font that exceeds the old limit is Padauk-Bold,
896 version 3.002, containing bytecode generated by a buggy version of
899 2017-05-31 Werner Lemberg <wl@gnu.org>
901 [cff] 32bit integer overflow run-time errors 2/2 (#46149).
903 This commit handles the new engine.
905 * include/freetype/internal/ftcalc.h (OVERFLOW_ADD_INT32,
906 OVERFLOW_SUB_INT32, OVERFLOW_MUL_INT32, NEG_INT, NEG_LONG,
907 NEG_INT32): New macros.
909 * src/cff/cf2ft.c (cf2_getScaleAndHintFlag): Use OVERFLOW_ADD_INT32.
911 * src/cff/cf2hints.c (cf2_getWindingMomentum, cf2_hint_init,
912 cf2_hintmap_map, cf2_glyphpath_hintPoint,
913 cf2_glyphpath_computeIntersection, cf2_glyphpath_computeOffset,
914 cf2_glyphpath_lineTo, cf2_glyphpath_curveTo): Use
915 OVERFLOW_ADD_INT32, OVERFLOW_SUB_INT32, OVERFLOW_MUL_INT32, and
916 NEG_INT32 where appropriate.
918 * src/cff/cf2intrp.c (cf2_doFlex, cf2_doBlend,
919 cf2_interpT2CharString): Ditto.
920 Also add some other code where needed to avoid overflow.
922 2017-05-30 Werner Lemberg <wl@gnu.org>
924 [cff] 32bit integer overflow run-time errors 1/2 (#46149).
926 This commit handles the old engine.
928 * src/cff/cffgload.c: Include FT_INTERNAL_CALC_H.
929 (cff_decoder_parse_charstrings): Use OVERFLOW_ADD_LONG and
930 OVERFLOW_SUB_LONG where needed.
932 * src/cff/cffparse.c: Include FT_INTERNAL_CALC_H.
933 (power_ten_limits): New static array.
934 (do_fixed): Use it to prevent multiplication overflow.
935 (cff_parser_run): Use OVERFLOW_ADD_LONG.
937 2017-05-30 Werner Lemberg <wl@gnu.org>
939 [psaux] Correctly handle sequences of multiple number signs.
941 * src/psaux/psconv.c (PS_Conv_Strtol, PS_Conv_ToFixed): Return zero
942 if we encounter more than a single sign.
944 2017-05-29 Werner Lemberg <wl@gnu.org>
946 [pcf] 32bit integer overflow run-time errors (#46149).
948 * src/pcf/pcfread.c (pcf_get_accel): Add sanity checks for
949 `fontAscent' and `fontDescent'.
950 (pcf_load_font): Add sanity checks for global height.
951 Add sanity checks for AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE,
952 RESOLUTION_X, and RESOLUTION_Y properties.
954 2017-05-29 Werner Lemberg <wl@gnu.org>
956 Handle some integer overflow run-time errors (#46149, #48979).
958 This commit (mainly for 32bit CPUs) is the first of a series of
959 similar commits to handle known integer overflows. Basically, all
960 of them are harmless, since they affect rendering of glyphs only,
961 not posing security threats. It is expected that fuzzying will show
962 up more overflows, to be fixed in due course.
964 The idea is to mark places where overflows can occur, using macros
965 that simply cast to unsigned integers, because overflow arithmetic
966 is well defined in this case. Doing so suppresses run-time errors
967 of sanitizers without adding computational overhead.
969 * include/freetype/internal/ftcalc.h (OVERFLOW_ADD_INT,
970 OVERFLOW_SUB_INT, OVERFLOW_MUL_INT, OVERFLOW_ADD_LONG,
971 OVERFLOW_SUB_LONG, OVERFLOW_MUL_LONG): New macros.
973 * src/base/ftcalc.c (FT_RoundFix, FT_CeilFix, FT_Matrix_Multiply,
974 FT_Matrix_Multiply_Scaled, FT_Vector_Transform_Scaled,
975 ft_corner_orientation): Use new macros.
977 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Use new macros.
979 2017-05-28 Werner Lemberg <wl@gnu.org>
981 * include/freetype/internal/ftcalc.h (FLOAT_TO_FIXED): Remove.
983 This macro is not used.
985 2017-05-28 Werner Lemberg <wl@gnu.org>
987 [cff] s/cf2_floatToFixed/cf2_doubleToFixed/.
989 The new name better describes what the macro actually does;
990 additionally, we don't need a trailing `f' for literals (there was
991 only a single such instance in the code, but this caused a clang
992 warning because the macro itself uses `double' literals).
994 * src/cff/cf2blues.c, src/cff/cf2blues.h, src/cff/cf2fixed.h,
995 src/cff/cf2font.c, src/cff/cf2hints.c: Updated.
997 2017-05-28 Werner Lemberg <wl@gnu.org>
999 Fix negation of INT_MIN and LONG_MIN (#46149).
1001 * src/base/ftcalc.c (FT_MOVE_SIGN): Add argument to pass unsigned
1002 value, to be used as the result.
1003 (FT_MulDiv, FT_MulDiv_No_Round, FT_DivFix, FT_MulFix,
1004 FT_Vector_NormLen): Updated.
1006 2017-05-27 Werner Lemberg <wl@gnu.org>
1008 [truetype] Fix handling of design coordinates (#51127).
1010 * src/truetype/ttgxvar.c (tt_set_mm_blend): Compute all design
1011 coordinates if we have to create the `blends->coord' array.
1012 (TT_Get_MM_Blend, TT_Get_Var_Design): Select default instance
1013 coordinates if no instance is selected yet.
1015 2017-05-24 Werner Lemberg <wl@gnu.org>
1017 [bdf, pcf] Support ISO646.1991-IRV character encoding (aka ASCII).
1019 Problem reported by Marek Kašík <mkasik@redhat.com>, cf.
1021 https://bugzilla.redhat.com/show_bug.cgi?id=1451795
1023 * src/bdf/bdfdrivr.c (BDF_Face_Init), src/pcf/pcfdrivr.c
1024 (PCF_Face_Init): Implement it.
1026 2017-05-20 Nikolaus Waxweiler <madigens@gmail.com>
1028 [truetype] Always use interpreter v35 for B/W rendering (#51051).
1030 * src/truetype/ttgload.c (tt_loader_init)
1031 [TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL]: Adjust
1032 `subpixel_hinting_lean', `grayscale_cleartype', and
1033 `vertical_lcd_lean' accordingly.
1035 * src/truetype/ttinterp.c (Ins_GETINFO): Updated.
1036 (TT_RunIns): Update `backward_compatibility' flag.
1038 2017-05-20 Alexei Podtelezhnikov <apodtele@gmail.com>
1040 [smooth] Implement minimal dynamic padding for LCD filtering.
1042 Extra bitmap padding for LCD filtering depends on the filter. The
1043 default 5-tap filter needs 2 extra subpixels. The light 3-tap filter
1044 needs only 1 extra subpixel. This space could be already available
1045 due to rounding. In order to optimize the padding, we now expand
1046 CBox for the given filter weights before rounding.
1048 This change breaks current Skia (and Firefox).
1050 * include/freetype/internal/ftobjs.h (FT_LibraryRec)
1051 [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Remove `lcd_extra' field.
1053 * src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights,
1054 FT_Library_SetLcdFilter): Remove `lcd_extra' initializations.
1056 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Implement dymanic
1059 2017-05-15 Werner Lemberg <wl@gnu.org>
1061 [sfnt] Return proper scaling values for SBIX bitmaps.
1063 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
1065 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Implement it.
1067 2017-05-15 Werner Lemberg <wl@gnu.org>
1069 [truetype] Fix error handling for embedded bitmaps.
1071 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
1073 * src/truetype/ttgload.c (TT_Load_Glyph)
1074 [TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: Handle error if font is not
1077 2017-05-15 Alexei Podtelezhnikov <apodtele@gmail.com>
1079 [autofit] Make autohint warping NORMAL option.
1081 This moves warping option from LIGHT to NORMAL mode. This makes LIGHT
1082 truly void of hinting in x-direction, with left side bearing never
1083 changed and right side bearing only altered by advance rounding.
1084 Therefore, LIGHT is now ready to return fractional advance. As a
1085 NORMAL option, warping substitutes normal hinting.
1087 * src/autofit/afcjk.c (af_cjk_hints_apply): Updated.
1088 * src/autofit/aflatin.c (af_latin_hints_apply): Updated.
1089 * src/autofit/aflatin2.c (af_latin2_hints_apply): Updated.
1091 * src/autofit/afloader.c (af_loader_load_glyph): Handle warping
1092 phantom points as normal.
1094 2017-05-14 Werner Lemberg <wl@gnu.org>
1096 Remove remnants of raster pool.
1098 * include/freetype/internal/ftobjs.h (FT_LibraryRec): Remove
1099 `raster_pool' and `raster_pool_size' fields.
1101 * src/base/ftobjs.c (FT_New_Library), src/raster/ftrend1.c
1102 (ft_raster1_init), src/smooth/ftsmooth.c (ft_smooth_init): Updated.
1104 2017-05-13 Werner Lemberg <wl@gnu.org>
1106 * Version 2.8 released.
1107 =======================
1110 Tag sources with `VER-2-8'.
1112 * docs/VERSION.TXT: Add entry for version 2.8.
1113 * docs/CHANGES: Updated.
1115 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
1116 builds/windows/vc2005/index.html,
1117 builds/windows/vc2008/freetype.vcproj,
1118 builds/windows/vc2008/index.html,
1119 builds/windows/vc2010/freetype.vcxproj,
1120 builds/windows/vc2010/index.html,
1121 builds/windows/visualc/freetype.dsp,
1122 builds/windows/visualc/freetype.vcproj,
1123 builds/windows/visualc/index.html,
1124 builds/windows/visualce/freetype.dsp,
1125 builds/windows/visualce/freetype.vcproj,
1126 builds/windows/visualce/index.html,
1127 builds/wince/vc2005-ce/freetype.vcproj,
1128 builds/wince/vc2005-ce/index.html,
1129 builds/wince/vc2008-ce/freetype.vcproj,
1130 builds/wince/vc2008-ce/index.html: s/2.7.1/2.8/, s/271/28/.
1132 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 8.
1133 (FREETYPE_PATCH): Set to 0.
1135 * builds/unix/configure.raw (version_info): Set to 20:0:14.
1136 * CMakeLists.txt (VERSION_MINOR): Set to 8.
1137 (VERSION_PATCH): Set to 0.
1139 2017-05-12 Hin-Tak Leung <htl10@users.sourceforge.net>
1141 Fix `FT_UINT_TO_POINTER' macro for Windows.
1143 * builds/unix/ftconfig.in, builds/vms/ftconfig.h,
1144 include/freetype/config/ftconfig.h (FT_UINT_TO_POINTER) [_WIN64]:
1147 2017-05-11 Sascha Brawer <sascha@google.com>
1148 Werner Lemberg <wl@gnu.org
1150 [autofit] Add support for Chakma script.
1152 * src/autofit/afblue.dat: Add blue zone data for Chakma.
1153 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1155 * src/autofit/afscript.h: Add Chakma standard character.
1157 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Chakma data.
1159 2017-05-10 Sascha Brawer <sascha@google.com>
1160 Werner Lemberg <wl@gnu.org
1162 [autofit] Add support for Kayah Li script.
1164 * src/autofit/afblue.dat: Add blue zone data for Kayah Li.
1165 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1167 * src/autofit/afscript.h: Add Kayah Li standard character.
1169 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Kayah Li data.
1171 2017-05-10 Sascha Brawer <sascha@google.com>
1172 Werner Lemberg <wl@gnu.org
1174 [autofit] Add support for Bamum script.
1176 * src/autofit/afblue.dat: Add blue zone data for Bamum.
1177 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1179 * src/autofit/afscript.h: Add Bamum standard character.
1181 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Bamum data.
1183 2017-05-10 Sascha Brawer <sascha@google.com>
1184 Werner Lemberg <wl@gnu.org
1186 [autofit] Add support for Saurashtra script.
1188 * src/autofit/afblue.dat: Add blue zone data for Saurashtra.
1189 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1191 * src/autofit/afscript.h: Add Saurashtra standard character.
1193 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Saurashtra
1196 2017-05-10 Sascha Brawer <sascha@google.com>
1197 Werner Lemberg <wl@gnu.org
1199 [autofit] Add support for Buhid script.
1201 * src/autofit/afblue.dat: Add blue zone data for Buhid.
1202 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1204 * src/autofit/afscript.h: Add Buhid standard character.
1206 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Buhid data.
1208 2017-05-08 Sascha Brawer <sascha@google.com>
1209 Werner Lemberg <wl@gnu.org
1211 [autofit] Add support for Shavian script.
1213 * src/autofit/afblue.dat: Add blue zone data for Shavian.
1214 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1216 * src/autofit/afscript.h: Add Shavian standard character.
1218 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Shavian data.
1220 2017-05-08 Sascha Brawer <sascha@google.com>
1221 Werner Lemberg <wl@gnu.org
1223 [autofit] Add support for Vai script.
1225 * src/autofit/afblue.dat: Add blue zone data for Vai.
1226 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1228 * src/autofit/afscript.h: Add Vai standard character.
1230 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Vai data.
1232 2017-05-08 Sascha Brawer <sascha@google.com>
1233 Werner Lemberg <wl@gnu.org
1235 [autofit] Add support for Osmanya script.
1237 * src/autofit/afblue.dat: Add blue zone data for Osmanya.
1238 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1240 * src/autofit/afscript.h: Add Osmanya standard character.
1242 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Osmanya data.
1244 2017-05-08 Sascha Brawer <sascha@google.com>
1245 Werner Lemberg <wl@gnu.org
1247 [autofit] Add support for Coptic script.
1249 * src/autofit/afblue.dat: Add blue zone data for Coptic.
1250 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1252 * src/autofit/afscript.h: Add Coptic standard character.
1254 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Coptic data.
1256 2017-05-08 Sascha Brawer <sascha@google.com>
1257 Werner Lemberg <wl@gnu.org
1259 [autofit] Add support for Carian script.
1261 * src/autofit/afblue.dat: Add blue zone data for Carian.
1262 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1264 * src/autofit/afscript.h: Add Carian standard character.
1266 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Carian data.
1268 2017-05-07 Werner Lemberg <wl@gnu.org>
1270 [truetype] Add tricky font `DFGirl-W6-WIN-BF' (from Dynalab).
1272 Reported by Roy Tam <roytam@gmail.com>.
1274 * src/truetype/ttobjs.c (tt_check_trickyness_family): Implement it.
1276 2017-05-07 Roy Tam <roytam@gmail.com>
1277 Werner Lemberg <wl@gnu.org>
1279 [truetype] More tricky fonts (mainly from Dynalab).
1281 * src/truetype/ttobjs.c (tt_check_trickyness_family,
1282 tt_check_trickyness_sfnt_ids): Add them.
1284 2017-05-07 Werner Lemberg <wl@gnu.org>
1286 [truetype] Add tricky font `DLCHayMedium' (from Dynalab).
1288 Reported by Roy Tam <roytam@gmail.com>.
1290 * src/truetype/ttobjs.c (tt_check_trickyness_family): Implement it.
1292 2017-05-03 Werner Lemberg <wl@gnu.org>
1294 */*: s/backwards compatibility/backward compatibility/.
1296 2017-05-03 Sascha Brawer <sascha@google.com>
1297 Werner Lemberg <wl@gnu.org
1299 [autofit] Add support for Unified Canadian Syllabics script.
1301 * src/autofit/afblue.dat: Add blue zone data for Unified Canadian
1303 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1305 * src/autofit/afscript.h: Add Unified Canadian Syllabics standard
1308 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Unified
1309 Canadian Syllabics data.
1311 2017-05-03 Sascha Brawer <sascha@google.com>
1312 Werner Lemberg <wl@gnu.org>
1314 [autofit] Add blue-zone support for Sundanese script.
1316 This essentially moves the Sundanese script from the `Indic' hinter
1317 to the `Latin' hinter.
1319 * src/autofit/afblue.dat: Add blue zone data for Sundanese.
1321 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1323 * src/autofit/afscript.h: Add Sundanese standard character and move
1324 data out of AF_CONFIG_OPTION_INDIC block.
1326 * src/autofit/afranges.c: Move Sundanese data out of
1327 AF_CONFIG_OPTION_INDIC block.
1329 * src/autofit/afstyles.h: Update Sundanese data; in particular, use
1330 AF_WRITING_SYSTEM_LATIN.
1332 2017-05-03 Sascha Brawer <sascha@google.com>
1333 Werner Lemberg <wl@gnu.org
1335 [autofit] Add support for Avestan script.
1337 * src/autofit/afblue.dat: Add blue zone data for Avestan.
1338 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1340 * src/autofit/afscript.h: Add Avestan standard character.
1342 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Avestan data.
1344 2017-05-02 Behdad Esfahbod <behdad@behdad.org>
1346 [truetype] Make `IUP' gvar deltas do the same as Apple (#50832).
1348 When points are not touched by gvar interpolation deltas, FreeType
1349 gave a slightly different result than Apple's CoreText.
1351 The OpenType working group will update the specification to document
1352 the following behaviour: If the two points with deltas to the `left'
1353 and `right' of the untouched point have the same coordinate, then
1354 the inferred delta for the untouched point should be zero.
1356 * src/truetype/ttgxvar.c (tt_delta_interpolate): Implement new
1359 2017-05-02 Werner Lemberg <wl@gnu.org>
1361 [autofit] Remove `slight' auto-hint mode again.
1363 A poll on freetype-devel favoured changes directly applied to
1366 * include/freetype/freetype.h (FT_LOAD_TARGET_SLIGHT,
1367 FT_RENDER_MODE_SLIGHT): Removed.
1369 * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c
1370 (af_latin_hints_init), src/autofit/aflatin2.c
1371 (af_latin2_hints_init): Revert change from 2017-04-22.
1373 * src/autofit/afloader.c (af_loader_load_glyph) Remove references to
1374 FT_RENDER_MODE_SLIGHT.
1375 [AF_CONFIG_OPTION_TT_SIZE_METRICS]: Enable TrueType-like metrics
1378 * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Revert change from
1381 * src/base/ftobjs.c (FT_Load_Glyph): Revert change from 2017-04-22.
1383 * src/pshinter/pshalgo.c (ps_hints_apply): Revert change from
1386 * src/smooth/ftsmooth.c (ft_smooth_render): Revert change from
1389 * docs/CHANGES: Updated.
1391 2017-04-30 Werner Lemberg <wl@gnu.org>
1393 [autofit] Fix metrics computation.
1395 Problem reported by Markus Trippelsdorf <markus@trippelsdorf.de> and
1396 Nikolaus Waxweiler <madigens@gmail.com>.
1398 * src/base/ftobjs.c (FT_Request_Size): Trigger recomputation of
1399 auto-hinter metrics. Without this change, multiple size changing
1400 calls for a single face fail.
1402 2017-04-29 Werner Lemberg <wl@gnu.org>
1404 * src/truetype/ttdriver.c (tt_size_request): Properly check `error'.
1406 Reported by Earnestly <zibeon@googlemail.com> in
1408 https://lists.nongnu.org/archive/html/freetype/2017-04/msg00031.html
1410 2017-04-27 Werner Lemberg <wl@gnu.org>
1412 Introduce AF_CONFIG_OPTION_TT_SIZE_METRICS configuration option.
1414 * include/freetype/config/ftoption.h
1415 (AF_CONFIG_OPTION_TT_SIZE_METRICS): New option, commented out by
1418 * src/autofit/afloader.c (af_loader_load_glyph): Use
1419 AF_CONFIG_OPTION_TT_SIZE_METRICS to guard the corresponding code.
1421 2017-04-26 Werner Lemberg <wl@gnu.org>
1423 * include/freetype/freetype.h (FT_Render_Mode): Fix order.
1425 This retains backward compatibility.
1429 2017-04-22 Werner Lemberg <wl@gnu.org>
1431 [truetype] Do linear scaling for FT_LOAD_NO_HINTING (#50470).
1433 * src/truetype/ttobjs.h (TT_SizeRec): Add field `hinted_metrics' to
1434 hold hinted metrics.
1435 Make `metrics' a pointer so that `tt_glyph_load' can easily switch
1438 * src/truetype/ttdriver.c (tt_size_request): Updated.
1439 (tt_glyph_load): Use top-level metrics if FT_LOAD_NO_HINTING is
1442 * src/truetype/ttgload.c (TT_Hint_Glyph, TT_Process_Simple_Glyph,
1443 TT_Process_Composite_Component, load_truetype_glyph,
1444 compute_glyph_metrics, TT_Load_Glyph): Updated.
1446 * src/truetype/ttinterp.c (TT_Load_Context): Updated.
1448 * src/truetype/ttobjs.c (tt_size_reset): Updated.
1450 * src/truetype/ttsubpix.c (sph_set_tweaks): Updated.
1452 2017-04-22 Werner Lemberg <wl@gnu.org>
1454 Add new `slight' auto-hinting mode.
1456 This mode uses fractional advance widths and doesn't scale glyphs
1457 horizontally, only applying vertical scaling and hinting.
1459 At the same time, the behaviour of the `light' auto-hinter gets
1460 restored for backward compatibility: Both vertical and horizontal
1461 scaling is again based on rounded metrics values (this was changed
1462 in a commit from 2017-03-30 as a side effect). To be more precise,
1463 the behaviour is restored for TrueType fonts only; for other font
1464 formats like Type 1, this is a new feature of the `light' hinting
1467 * include/freetype/freetype.h (FT_LOAD_TARGET_SLIGHT): New macro.
1468 (FT_RENDER_MODE_SLIGHT): New render mode.
1470 * include/freetype/internal/ftobjs.h (FT_Size_InternalRec): Add
1471 `autohint_mode' and `autohint_metrics' fields.
1473 * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c
1474 (af_latin_hints_init), src/autofit/aflatin2 (af_latin2_hints_init):
1477 * src/autofit/afloader.c (af_loader_embolden_glyph_in_slot): Use
1479 (af_loader_load_glyph): s/internal/slot_internal/.
1480 Initialize `autohint_metrics' and `autohint_mode' depending on
1481 current auto-hint mode.
1482 Use `autohint_metrics'.
1485 * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Updated.
1487 * src/base/ftobjs.c (FT_Load_Glyph): Updated.
1488 (FT_New_Size): Allocate `internal' object.
1490 * src/pshinter/pshalgo.c (ps_hints_apply): Updated.
1492 * src/smooth/ftsmooth.c (ft_smooth_render): Updated.
1494 2017-04-22 Werner Lemberg <wl@gnu.org>
1496 Introduce `FT_Size_InternalRec' structure.
1498 We are going to extend this later on.
1500 * include/freetype/internal/ftobjs.h (FT_Size_InternalRec): New
1501 structure with a single field `module_data'.
1503 * src/base/ftobjs.c (FT_New_Size): Allocate `internal' field of
1504 `FT_Size' structure.
1506 * src/cff/cffgload.c (cff_builder_init, cff_decoder_prepare): Use
1507 `size->internal->module_data' instead of `size->internal'.
1509 * src/cff/cffobjs.c (cff_size_done): Deallocate `module_data'.
1510 (cff_size_init, cff_size_select, cff_size_request): Use
1511 `size->internal->module_data' instead of `size->internal'.
1513 * src/cif/cidobjs.c (cid_size_done, cid_size_init,
1514 cid_size_request): Use `size->internal->module_data' instead of
1517 * src/psaux/psobjs.c (t1_builder_ini): Use
1518 `size->internal->module_data' instead of `size->internal'.
1520 * src/type1/t1objs.c (T1_Size_Done, T1_Size_Init, T1_Size_Request):
1521 Use `size->internal->module_data' instead of `size->internal'.
1523 2017-04-21 Alexei Podtelezhnikov <apodtele@gmail.com>
1525 * src/smooth/ftsmooth.h: Remove unused guards and declaration.
1527 2017-04-16 Hin-Tak Leung <htl10@users.sourceforge.net>
1529 Fix tracing messages.
1531 * src/base/ftobjs.c (FT_Face_GetCharVariantIndex,
1532 FT_Face_GetCharVariantIsDefault, FT_Face_GetVariantsOfChar): Print
1533 correct function name.
1535 2017-04-08 Sascha Brawer <sascha@google.com>
1536 Werner Lemberg <wl@gnu.org
1538 [autofit] Add support for Old Turkic script.
1540 * src/autofit/afblue.dat: Add blue zone data for Old Turkic.
1541 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1543 * src/autofit/afscript.h: Add Old Turkic standard characters.
1545 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Old Turkic data.
1547 2017-04-08 Sascha Brawer <sascha@google.com>
1548 Werner Lemberg <wl@gnu.org
1550 [autofit] Add support for Gothic script.
1552 * src/autofit/afblue.dat: Add blue zone data for Gothic.
1553 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1555 * src/autofit/afscript.h: Add Gothic standard characters.
1557 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Gothic data.
1559 2017-04-08 Sascha Brawer <sascha@google.com>
1560 Werner Lemberg <wl@gnu.org
1562 [autofit] Add support for Cypriot script.
1564 * src/autofit/afblue.dat: Add blue zone data for Cypriot.
1565 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1567 * src/autofit/afscript.h: Add Cypriot standard characters.
1569 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Cypriot data.
1571 2017-04-08 Sascha Brawer <sascha@google.com>
1572 Werner Lemberg <wl@gnu.org
1574 [autofit] Add support for Deseret script.
1576 * src/autofit/afblue.dat: Add blue zone data for Deseret.
1577 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1579 * src/autofit/afscript.h: Add Deseret standard characters.
1581 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Deseret data.
1583 2017-04-07 Werner Lemberg <wl@gnu.org>
1585 [autofit] Fix invalid character range description (#50745).
1589 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1034
1591 * src/autofit/afranges.c (af_glag_nonbase_uniranges): Fix typo in
1594 2017-04-07 Werner Lemberg <wl@gnu.org>
1596 [ftfuzzer] Fix clang warnings.
1598 * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Add
1601 2017-04-06 Sascha Brawer <sascha@google.com>
1602 Werner Lemberg <wl@gnu.org
1604 [autofit] Add support for Lisu script.
1606 * src/autofit/afblue.dat: Add blue zone data for Lisu.
1607 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1609 * src/autofit/afscript.h: Add Lisu standard characters.
1611 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Lisu data.
1613 2017-04-06 Sascha Brawer <sascha@google.com>
1614 Werner Lemberg <wl@gnu.org
1616 [autofit] Add support for Osage script.
1618 * src/autofit/afblue.dat: Add blue zone data for Osage.
1619 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1621 * src/autofit/afscript.h: Add Osage standard characters.
1623 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Osage data.
1625 2017-04-06 Sascha Brawer <sascha@google.com>
1626 Werner Lemberg <wl@gnu.org
1628 [autofit] Add support for Glagolitic script.
1630 * src/autofit/afblue.dat: Add blue zone data for Glagolitic.
1631 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1633 * src/autofit/afscript.h: Add Glagolitic standard characters.
1635 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Glagolitic data.
1637 2017-04-06 Sascha Brawer <sascha@google.com>
1638 Werner Lemberg <wl@gnu.org
1640 [autofit] Add support for Tai Viet script.
1642 * src/autofit/afblue.dat: Add blue zone data for Tai Viet.
1643 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1645 * src/autofit/afscript.h: Add Tai Viet standard characters.
1647 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Tai Viet data.
1649 2017-04-06 Sascha Brawer <sascha@google.com>
1650 Werner Lemberg <wl@gnu.org
1652 [autofit] Add support for Tifinagh script.
1654 * src/autofit/afblue.dat: Add blue zone data for Tifinagh.
1655 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1657 * src/autofit/afscript.h: Add Tifinagh standard characters.
1659 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Tifinagh data.
1661 2017-04-06 Sascha Brawer <sascha@google.com>
1662 Werner Lemberg <wl@gnu.org
1664 [autofit] Add support for N'Ko script.
1666 * src/autofit/afblue.dat: Add blue zone data for N'Ko.
1667 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1669 * src/autofit/afscript.h: Add N'Ko standard characters.
1671 * src/autofit/afranges.c, src/autofit/afstyles.h: Add N'Ko data.
1673 2017-04-06 Sascha Brawer <sascha@google.com>
1675 [autofit] Add support for Adlam script.
1677 * src/autofit/afblue.dat: Add blue zone data for Adlam.
1678 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1680 * src/autofit/afscript.h: Add Adlam standard characters.
1682 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Adlam data.
1684 2017-04-06 Sascha Brawer <sascha@google.com>
1686 [autofit] Add support for Ol Chiki script.
1688 * src/autofit/afblue.dat: Add blue zone data for Ol Chiki.
1689 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1691 * src/autofit/afscript.h: Add Ol Chiki standard character.
1693 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Ol Chiki data.
1695 2017-04-03 Werner Lemberg <wl@gnu.org>
1697 [truetype] Avoid reexecution of `fpgm' and `prep' in case of error.
1701 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=981
1703 * include/freetype/fterrdef.h (FT_Err_DEF_In_Glyf_Bytecode): New
1706 * src/truetype/ttinterp.c (Ins_FDEF, Ins_IDEF): Prohibit execution
1707 of these two opcodes in `glyf' bytecode.
1708 (TT_RunIns): Don't enforce reexecution of `fpgm' and `prep' bytecode
1709 in case of error since function tables can no longer be modified
1710 (due to the changes in `Ins_FDEF' and `Ins_IDEF'). This change can
1711 enormously speed up handling of broken fonts.
1713 2017-04-02 Alexei Podtelezhnikov <apodtele@gmail.com>
1715 [autofit] Disable metrics adjustment for `FT_LOAD_TARGET_LCD'.
1717 * src/autofit/aflatin.c (af_latin_hints_init): Updated.
1718 * src/autofit/aflatin2.c (af_latin2_hints_init): Ditto.
1720 2017-04-01 Werner Lemberg <wl@gnu.org>
1722 * src/truetype/ttgload.c: Include FT_CONFIG_CONFIG_H.
1724 Otherwise FT_UINT_TO_POINTER might not be defined.
1726 Problem reported by Alexei.
1728 2017-03-31 Alexei Podtelezhnikov <apodtele@gmail.com>
1730 [autofit] Disable stem adjustment for `FT_LOAD_TARGET_LCD'.
1732 * include/freetype/freetype.h (FT_LOAD_TARGET_LCD): Document it.
1733 * src/autofit/afcjk.c (af_cjk_hints_init): Updated.
1734 * src/autofit/aflatin.c (af_latin_hints_init): Ditto.
1735 * src/autofit/aflatin2.c (af_latin2_hints_init): Ditto.
1737 2017-03-31 Werner Lemberg <wl@gnu.org>
1739 * src/cff/cffload.c (cff_font_load): Improve fix from 2017-01-04.
1741 Allow CFFs containing a single font to have an empty font name.
1743 Problem reported by 張俊芝 <418092625@qq.com> in
1745 https://lists.nongnu.org/archive/html/freetype-devel/2017-03/msg00074.html
1747 2017-03-30 Werner Lemberg <wl@gnu.org>
1749 * src/cff/cffparse.h (CFF2_DEFAULT_STACK): Set to 513 also.
1751 Requested by Dave Arnold.
1753 2017-03-30 Werner Lemberg <wl@gnu.org>
1755 [truetype] Fix HVAR and VVAR handling (#50678).
1757 * src/truetype/ttgxvar.c (tt_hvadvance_adjust): Handle
1758 glyph indices larger than `mapCount' as described in the
1761 2017-03-30 Werner Lemberg <wl@gnu.org>
1763 [truetype] Allow linear scaling for unhinted rendering (#50470).
1765 * src/truetype/ttdriver.c (tt_size_request): Revert change from
1766 2011-07-16; the intended metrics fix seems now to be implemented in
1767 a different way, making the patch unnecessary. Note that this
1768 change was usually patched out by all major GNU/Linux distributions
1769 due to heavy side effects.
1771 * src/truetype/ttgload.c (compute_glyph_metrics, TT_Load_Glyph):
1772 Refer to the metrics of the `TT_Size' object.
1774 2017-03-29 Werner Lemberg <wl@gnu.org>
1776 [truetype] Fix thinko related to PS name of default named instance.
1778 * src/truetype/ttgxvar.c (TT_Get_MM_Var): `strid' and `psid' are
1779 name ID values, not indices into the array of name entries.
1781 2017-03-27 Werner Lemberg <wl@gnu.org>
1783 [cid, truetype] Don't use `index' as a variable name.
1785 At least on FreeBSD there is a global declaration of `index' in file
1786 `/usr/include/strings.h'.
1788 * src/cff/cf2intrp.c, src/truetype/ttgload.c: s/index/idx/ where
1791 2017-03-27 Wojciech Mamrak <wmamrak@gmail.com>
1793 [sfnt] Minor improvement for handling kern tables.
1795 * src/sfnt/ttkern.c (tt_face_load_kern): Don't check for
1796 cross-stream kerning tables since we reject format 2 tables later
1798 Modify code for limit test...
1799 (tt_face_get_kerning): ... to avoid a limit test here.
1801 2017-03-27 Werner Lemberg <wl@gnu.org>
1803 [pcf] Fix compiler warnings.
1805 Reported by Alexander Hedges <ahedges@student.ethz.ch>.
1807 * src/pcf/pcfdrivr.c (pcf_property_set, pcf_property_get): Tag
1808 `property_name' with `FT_UNUSED' where necessary.
1810 2017-03-26 Werner Lemberg <wl@gnu.org>
1812 * src/psaux/psobjs.c (t1_builder_close_contour): Add safety guard.
1816 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=941
1818 2017-03-23 Werner Lemberg <wl@gnu.org>
1820 [psaux] Better protect `flex' handling.
1824 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=935
1826 * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
1827 <callothersubr>: Since there is not a single flex operator but a
1828 series of subroutine calls, malformed fonts can call arbitrary other
1829 operators after the start of a flex, possibly adding points. For
1830 this reason we have to check the available number of points before
1833 2017-03-23 Werner Lemberg <wl@gnu.org>
1835 [sfnt] Fix check for default named instance.
1837 * src/sfnt/sfobjs.c (sfnt_init_face): A `fixed' number needs four
1840 2017-03-23 Werner Lemberg <wl@gnu.org>
1842 Make MM fonts work (again).
1844 * src/base/ftmm.c (FT_Set_Var_Design_Coordinates,
1845 FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Ignore
1846 return value of `ft_face_get_mvar_service'; instead, check whether a
1847 service is actually returned.
1849 2017-03-20 Werner Lemberg <wl@gnu.org>
1851 [truetype] Some variable renamings.
1853 Too much local variables holding different structures were called
1856 * src/truetype/ttdriver.c (tt_size_select): s/metrics/size_metrics/.
1858 * src/truetype/ttgload.c (tt_get_metrics_incr_overrides,
1859 compute_glyph_metrics): s/metrics/incr_metrics/.
1860 (load_sbit_image): s/metrics/sbit_metrics/.
1862 * src/truetype/ttobjs.c (tt_size_run_fpgm): s/metrics/size_metrics/.
1863 (tt_size_init_bytecode): s/metrics/tt_metrics/.
1864 (tt_size_reset): s/metrics/size_metrics/.
1866 2017-03-20 Werner Lemberg <wl@gnu.org>
1868 [sfnt] Don't add instances to non-variation fonts.
1870 * src/sfnt/sfobjs.c (sfnt_init_face): Fix it.
1872 2017-03-20 Werner Lemberg <wl@gnu.org>
1874 * src/cff/cffgload.c (cff_builder_init): Add safety guard (#50578).
1876 2017-03-18 Werner Lemberg <wl@gnu.org>
1878 Introduce FT_UINT_TO_POINTER macro (#50560).
1880 We have to make a separate case for Windows 64's LLP64 data model.
1882 * builds/unix/ftconfig.in, builds/vms/ftconfig.h,
1883 include/freetype/config/ftconfig.h (FT_UINT_TO_POINTER): New macro.
1885 * src/truetype/ttgload.c (load_truetype_glyph): Use it.
1887 2017-03-18 Werner Lemberg <wl@gnu.org>
1889 * src/truetype/ttinterp.c (TT_RunIns): Adjust loop counter (#50573).
1891 The problematic font that exceeds the old limit is Lato-Regular,
1892 version 2.007, containing bytecode generated by a buggy version of
1895 2017-03-18 Werner Lemberg <wl@gnu.org>
1897 [truetype] Another limitation for bytecode loop count maximum.
1901 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=900
1903 * src/truetype/ttinterp.c (TT_RunIns): Limit `loopcall_counter_max'
1904 by number of glyphs also.
1906 2017-03-18 Werner Lemberg <wl@gnu.org>
1908 [ftfuzzer] Minor improvement.
1910 * src/tools/ftfuzzer/ftfuzzer.cc: Don't set intermediate axis if
1911 bitmap strikes are active.
1913 2017-03-18 Werner Lemberg <wl@gnu.org>
1915 Improve `make multi'.
1917 * src/autofit/aflatin2.c: Guard file with FT_OPTION_AUTOFIT2.
1919 * src/base/ftmac.c: Guard more parts of the file with FT_MACINTOSH.
1921 * src/psaux/afmparse.c: Guard file with T1_CONFIG_OPTION_NO_AFM.
1923 * src/sfnt/pngshim.c: Guard file with
1924 TT_CONFIG_OPTION_EMBEDDED_BITMAPS also.
1926 * src/sfnt/ttbdf.c: Avoid empty source file.
1927 * src/sfnt/ttpost.c: Guard file with
1928 TT_CONFIG_OPTION_POSTSCRIPT_NAMES.
1929 * src/sfnt/ttsbit.c: Guard file with
1930 TT_CONFIG_OPTION_EMBEDDED_BITMAPS.
1932 * src/truetype/ttgxvar.c, src/truetype/ttinterp.c: Avoid empty
1935 * src/truetype/ttsubpix.c: Guard file with
1936 TT_USE_BYTECODE_INTERPRETER also.
1938 * src/type1/t1afm.c: Guard file with T1_CONFIG_OPTION_NO_AFM.
1940 * src/autofit/autofit.c, src/base/ftbase.c, src/cache/ftcache.c,
1941 src/cff/cff.c, src/cid/type1cid.c, src/gxvalid/gxvalid.c,
1942 src/pcf/pcf.c, src/pfr/pfr.c, src/psaux/psaux.c,
1943 src/pshinter/pshinter.c, src/psnames/psnames.c, src/raster/raster.c,
1944 src/sfnt/sfnt.c, src/smooth/smooth.c, src/truetype/truetype.c,
1945 src/type1/type1.c, src/type42/type42.c: Remove conditionals; sort
1948 2017-03-17 Werner Lemberg <wl@gnu.org>
1950 Fixes for conditional compilation.
1952 * src/autofit/afcjk.c, src/autofit/afindic.c: Include `afcjk.h'
1955 * src/sfnt/sfobjs.c (sfnt_init_face): Put `memory' variable into
1956 TT_CONFIG_OPTION_GX_VAR_SUPPORT block.
1957 (sfnt_done_face): Protect some code with
1958 TT_CONFIG_OPTION_GX_VAR_SUPPORT.
1960 * src/sfnt/ttsbit.c (tt_face_load_sbix_image): Remove compiler
1963 * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Put `tmp' variable
1964 into TT_USE_BYTECODE_INTERPRETER block.
1966 (tt_loader_init): Put `error' variable into
1967 TT_USE_BYTECODE_INTERPRETER block.
1969 2017-03-17 Werner Lemberg <wl@gnu.org>
1971 Fix preprocessor warning.
1973 * devel/ftoption.h, include/freetype/config/ftoption.h: Test whether
1974 TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined before checking its
1977 2017-03-17 Werner Lemberg <wl@gnu.org>
1979 `make multi' fixes; compiler warnings.
1981 * src/base/ftsnames.c: Include FT_INTERNAL_DEBUG_H.
1983 * src/cff/cffobjs.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
1984 FT_MULTIPLE_MASTERS_H and FT_SERVICE_MULTIPLE_MASTERS_H.
1986 * src/sfnt/sfdriver.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
1987 FT_MULTIPLE_MASTERS_H and FT_SERVICE_MULTIPLE_MASTERS_H.
1988 (get_win_string, get_apple_string): Initialize `result'.
1990 2017-03-17 Dave Arnold <darnold@adobe.com>
1992 [cff] Fix potential bugs in default NDV for CFF2.
1994 * src/cff/cffload.c (cff_blend_build_vector): Explicitly build blend
1995 vector when `lenNDV' is zero; don't rely on zero-init.
1996 Save `lenNDV' as part of cache key even when `lenNDV' is zero.
1998 2017-03-17 Dave Arnold <darnold@adobe.com>
2000 [cff] Fix CFF2 stack allocation.
2002 * src/cff/cffparse.c (cff_parser_init) add 1 for operator.
2004 2017-03-16 Werner Lemberg <wl@gnu.org>
2006 * src/truetype/ttgxvar.c (tt_done_blend): Free `vvar_table'.
2010 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=883
2012 2017-03-15 Werner Lemberg <wl@gnu.org>
2014 Remove clang compiler warnings (#50548).
2016 * include/freetype/internal/tttypes.h (TT_FaceRec): Make
2017 `var_postscript_prefix_len' unsigned.
2019 * src/autofit/afwarp.c (af_warper_compute_line_best): Remove
2020 redundant assignment.
2022 * src/cff/cffload.c (cff_subfont_load): Add casts.
2024 * src/cff/cffparse.c (cff_parse_blend): Remove redundant assignment.
2026 * src/sfnt/sfdriver.c (fmix32, murmur_hash_3_128): Add `static'
2029 (fixed2float): Add cast.
2030 (sfnt_get_var_ps_name): Make `p' always initialized.
2033 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Add casts.
2035 2017-03-15 Werner Lemberg <wl@gnu.org>
2037 [ftfuzzer] Limit number of tested faces and instances.
2039 This is inspired by the discussion in and analysis of
2041 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=859
2043 * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Use only
2044 up to 20 face indices.
2045 Use only up to 20 instance indices.
2047 2017-03-15 Werner Lemberg <wl@gnu.org>
2049 * src/tools/ftfuzzer/ftfuzzer.cc: Improve readability; formatting.
2051 2017-03-14 Werner Lemberg <wl@gnu.org>
2053 [sfnt] Implement PS names for font instances [3/3].
2055 Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
2057 * include/freetype/internal/tttypes.h (TT_FaceRec): New fields
2058 `var_postscript_prefix' and `var_postscript_prefix_len'.
2060 * src/sfnt/sfdriver.c: Include FT_TRUETYPE_IDS_H.
2061 (sfnt_is_alphanumeric): New wrapperfunction for `ft_isalnum'.
2062 (get_win_string, get_apple_string): Remove `const' from return
2064 (MAX_VALUE_DESCRIPTOR_LEN, MAX_PS_NAME_LEN): New macros.
2065 (hexdigits): New array.
2066 (sfnt_get_var_ps_name): New function, implementing Adobe TechNote
2067 5902 to construct a PS name for a variation font instance.
2068 (sfnt_get_ps_name): Call `sfnt_get_var_ps_name' for font instances.
2070 * src/sfnt/sfobjs.c (sfnt_done_face): Updated.
2072 * src/truetype/ttgxvar.c (tt_set_mm_blend): Reset
2073 `face->postscript_name' to trigger recalculation for new instance
2076 2017-03-14 Werner Lemberg <wl@gnu.org>
2078 [sfnt] Implement PS names for font instances [2/3].
2080 * src/sfnt/sfdriver.c (fix2float) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]:
2081 New function to find the shortest representation of a 16.16
2084 2017-03-14 Werner Lemberg <wl@gnu.org>
2086 [sfnt] Implement PS names for font instances [1/3].
2088 Add 128bit MurmurHash 3 function.
2090 Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
2092 * src/sfnt/sfdriver.c (ROTL32): New macro.
2093 (fmix32, murmur_hash_3_128): New functions.
2095 2017-03-13 Werner Lemberg <wl@gnu.org>
2097 [truetype] Ignore invalid MVAR tags.
2101 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=838
2103 * src/truetype/ttgxvar.c (ft_var_load_mvar): Ignore value and emit
2104 warning for invalid tags.
2105 (tt_apply_mvar): Ignore invalid tags.
2107 2017-03-12 Werner Lemberg <wl@gnu.org>
2109 [truetype] Store and use design coordinates also.
2111 * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func):
2112 Add `normalizedcoords' argument.
2114 * src/truetype/ttgxvar.h (GX_BlendRec): Add `coords' field to store
2115 the design coordinates of the current instance.
2118 * src/truetype/ttgxvar.c (TT_Set_MM_Blend): Move functionality to...
2119 (tt_set_mm_blend): ... New function.
2120 Convert data in `normalizedcoords' array to `coords' array on
2122 (TT_Set_Var_Design): Store argument data in `coords' array.
2123 (TT_Get_Var_Design): Get data from `coords' array.
2124 (tt_get_var_blend): Updated.
2125 (tt_done_blend): Updated.
2127 * src/cff/cffload.c, src/cff/cffload.h (cff_get_var_blend): Updated.
2129 * src/cff/cf2ft.c (cf2_getNormalizedVector): Updated.
2131 * src/cff/cffobjs.c (cff_face_init): Updated.
2133 2017-03-12 Werner Lemberg <wl@gnu.org>
2135 src/truetype/ttgxvar.[ch]: s/avar_checked/avar_loaded/.
2137 2017-03-08 Werner Lemberg <wl@gnu.org>
2139 [sfnt] Another fix for buggy variation fonts.
2143 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=759
2145 * src/sfnt/sfobjs.c (sfnt_init_face): While setting number of
2146 instances to zero for `CFF' fonts table, ensure that there is no
2147 `CFF2' present also (which gets priority).
2149 2017-03-07 Werner Lemberg <wl@gnu.org>
2151 [sfnt] Improve handling for buggy variation fonts.
2155 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=738
2157 * src/sfnt/sfobjs.c (sfnt_init_face): While setting number of
2158 instances to zero for `CFF' fonts table, ensure that there is no
2159 `glyf' table present also (which gets priority).
2161 2017-03-06 Werner Lemberg <wl@gnu.org>
2163 [sfnt, truetype] Always provide default instance.
2165 As documented in the OpenType specification, an entry for the
2166 default instance may be omitted in the named instance table. In
2167 particular this means that even if there is no named instance table
2168 in the font we actually do have a named instance, namely the default
2171 For consistency, we always want the default instance in our list of
2172 named instances. If it is missing, we try to synthesize it.
2174 * src/sfnt/sfobjs.c (sfnt_init_face): Check whether the default
2175 instance is in the table of named instances. Otherwise adjust
2176 number of instances.
2178 * src/truetype/ttgxvar.c: Include FT_TRUETYPE_IDS_H.
2179 (TT_Get_MM_Var): Use `face->root.style_flags' as the number of named
2181 Sythesize a named instance entry if necessary.
2182 (tt_done_blend): Free `normalized_stylecoords'.
2184 2017-03-05 Werner Lemberg <wl@gnu.org>
2186 [sfnt] Remove redundant code.
2188 * src/sfnt/sfobjs.c (sfnt_init_face): Remove second test for
2189 `num_instances', which will always succeed.
2191 2017-03-04 Werner Lemberg <wl@gnu.org>
2193 [sfnt] Add `get_name_id' service.
2195 * include/freetype/internal/sfnt.h (TT_Get_Name_ID_Func): New
2197 (SFNT_Interface): Add `get_name_id' field.
2198 (FT_DEFINE_SFNT_INTERFACE): Updated.
2200 * src/sfnt/sfdriver.c (search_name_id): Rename to...
2201 (sfnt_get_name_id): ... this.
2202 (sfnt_get_ps_name, sfnt_interface): Updated.
2204 2017-03-04 Werner Lemberg <wl@gnu.org>
2206 [truetype] Make `TT_Set_MM_Blend' set named instance index.
2208 * src/truetype/ttgxvar.h (GX_Blend): New array
2209 `normalized_stylecoords'.
2211 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Allocate and fill
2212 `normalized_stylecoords'.
2213 (TT_Set_MM_Blend): Check instance tuple and adjust `face_index'
2216 2017-03-02 Werner Lemberg <wl@gnu.org>
2218 [truetype] Split off designer/normalized conversion routines.
2220 * src/truetype/ttgxvar.c (TT_Set_Var_Design): Split off conversion
2221 code designer->normalized coordinates to...
2222 (ft_var_to_normalized): ... New function.
2223 (TT_Get_Var_Design): Split off conversion code normalized->designer
2225 (ft_var_to_design): ... New function.
2227 2017-02-28 Werner Lemberg <wl@gnu.org>
2229 [sfnt] Further generalize `sfnt_get_ps_name'; report invalid data.
2231 * src/sfnt/sfdriver.c (sfnt_ps_map): New array.
2232 (sfnt_is_postscript): New function.
2233 (char_type_func): New typedef.
2234 (get_win_string, get_apple_string): Add argument to specify
2235 character checking function.
2236 Add argument whether argument checking failures should be reported.
2238 (search_name_id): Fix return value.
2240 2017-02-23 Werner Lemberg <wl@gnu.org>
2242 [sfnt] Split off another bit of `sfnt_get_ps_name'.
2244 * src/sfnt/sfdriver.c (sfnt_get_ps_name): Split off some
2245 functionality into...
2246 (search_name_id): ... New function.
2248 2017-02-23 Werner Lemberg <wl@gnu.org>
2250 [sfnt] Modularize `sfnt_get_ps_name'.
2252 * src/sfnt/sfdriver.c (sfnt_get_ps_name): Split off some
2253 functionality into...
2254 (IS_WIN, IS_APPLE): ... New macros.
2255 (get_win_string, get_apple_string): ... New functions.
2257 2017-02-23 Werner Lemberg <wl@gnu.org>
2259 [truetype] Minor improvement.
2261 * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
2262 load_truetype_glyph): Remove unnecessary tests.
2264 2017-02-23 Werner Lemberg <wl@gnu.org>
2266 * include/freetype/internal/tttypes.h (TT_Face): s/isCFF2/is_cff2/.
2268 For orthogonality with other structure field names.
2272 2017-02-22 Alexei Podtelezhnikov <apodtele@gmail.com>
2274 * src/smooth/ftgrays.c (gray_hline): Improve code.
2276 2017-02-20 Dominik Röttsches <drott@google.com>
2278 Fix some `ttnameid.h' entries (#50313).
2280 * include/freetype/ttnameid.h:
2281 s/TT_MS_LANGID_SPANISH_INTERNATIONAL_SORT/TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT/,
2282 s/TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIA/TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN/.
2284 2017-02-20 Werner Lemberg <wl@gnu.org>
2286 [cff] Finish support for `random' operator.
2288 * src/cff/cfftypes.h (CFF_SubFontRec): Add `random' field.
2290 * src/cff/cffobjs.c: Updated.
2291 (cff_driver_init): Initialize random seed value.
2293 * src/cff/cffload.c (cff_random): New function.
2294 (cff_subfont_load): Add `face' argument.
2296 Initialize random number generator with a proper seed value.
2297 (cff_font_load): Add `face' argument.
2300 * src/cff/cffload.h: Updated.
2302 * src/cff/cf2intrp.c (CF2_FIXME): Removed.
2303 (cf2_interpT2CharString) <cf2_escRANDOM>: Implement opcode.
2305 * src/cff/cffgload.c (cff_decoder_parse_charstrings): Don't
2306 initialize random seed value.
2307 <cff_op_random>: Use new random seed framework.
2309 2017-02-20 Werner Lemberg <wl@gnu.org>
2311 [cff] Sanitize `initialRandomSeed'.
2313 * src/cff/cffload.c (cff_load_private_dict): Make
2314 `initial_random_seed' value always positive.
2316 2017-02-20 Werner Lemberg <wl@gnu.org>
2318 [cff] Introduce `random-seed' property (2/2).
2320 * src/base/ftobjs.c: Include `FT_CFF_DRIVER_H'.
2321 (open_face): Initialize `face->internal->random_seed'.
2322 (FT_Face_Properties): Handle `FT_PARAM_TAG_RANDOM_SEED'.
2324 * src/cff/cffdrivr.c (cff_property_set): Handle `random-seed'
2327 2017-02-20 Werner Lemberg <wl@gnu.org>
2329 [cff] Introduce `random-seed' property (1/2).
2331 We need this for support of the `random' operator.
2333 * include/freetype/ftcffdrv.h (FT_PARAM_TAG_RANDOM_SEED): New macro.
2335 * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): New
2336 field `random_seed'.
2338 * src/cff/cffobjs.h (CFF_DriverRec): New field `random_seed'.
2340 2017-02-17 Werner Lemberg <wl@gnu.org>
2342 Remove clang warnings.
2344 * src/autofit/aflatin.c (af_latin_sort_blue): Add missing `static'
2347 * src/base/ftmm.c (FT_Set_Var_Design_Coordinates,
2348 FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates):
2349 Initialize some variables.
2351 2017-02-16 Nikolaus Waxweiler <madigens@gmail.com>
2352 Werner Lemberg <wl@gnu.org>
2354 Add face property for stem darkening.
2356 * include/freetype/ftautoh.h (FT_PARAM_TAG_STEM_DARKENING): New
2359 * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Add
2360 `no_stem_darkening' field.
2362 * src/autofit/afloader.c (af_loader_load_glyph),
2363 src/autofit/afmodule.c (af_property_set): Updated.
2365 * src/base/ftobjs.c: Include FT_AUTOHINTER_H.
2366 (ft_open_face_internal): Updated.
2367 (FT_Face_Properties): Handle FT_PARAM_TAG_STEM_DARKENING.
2369 * src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Updated.
2371 * src/cff/cffdrivr.c (cff_property_set): Updated.
2373 2017-02-16 Nikolaus Waxweiler <madigens@gmail.com>
2374 Werner Lemberg <wl@gnu.org>
2376 Add face property for LCD filter weights.
2378 * include/freetype/ftlcdfil.h (FT_PARAM_TAG_LCD_FILTER_WEIGHTS,
2379 FT_LCD_FILTER_FIVE_TAPS): New macros.
2380 (FT_LcdFiveTapFilter): New typedef.
2382 * include/freetype/ftobjs.h (FT_Face_InternalRec)
2383 [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Add `lcd_weights' field.
2384 (FT_Bitmap_LcdFilterFunc): Change third argument to weights array.
2385 (ft_lcd_filter_fir): New prototype.
2386 (FT_LibraryRec): Updated.
2388 * src/base/ftlcdfil.c (_ft_lcd_filter_fir): Renamed to...
2389 (ft_lcd_filter_fir): ... this base function.
2391 (_ft_lcd_filter_legacy): Updated.
2392 (FT_Library_SetLcdFilterWeights, FT_Library_SetLcdFilter): Updated.
2394 * src/base/ftobjs.c (ft_open_face_internal): Updated.
2395 (FT_Face_Properties): Handle FT_PARAM_TAG_LCD_FILTER_WEIGHTS.
2397 * src/smooth/ftsmooth.c (ft_smooth_render_generic)
2398 [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Handle LCD weights from
2401 2017-02-14 Nikolaus Waxweiler <madigens@gmail.com>
2402 Werner Lemberg <wl@gnu.org>
2404 Add new function `FT_Face_Properties'.
2406 This commit provides the framework, to be filled with something
2407 useful in the next commits.
2409 * include/freetype/freetype.h (FT_Face_Properties): Declare.
2411 * src/base/ftobjs.c (FT_Face_Properties): New function.
2413 2017-02-13 Werner Lemberg <wl@gnu.org>
2415 [autofit] Prevent overlapping blue zones.
2419 https://github.com/google/fonts/issues/632
2421 The font in question (Nunito) has values 705 and 713 for the
2422 reference and overshoot values, respectively, of the first blue
2423 zone. Blue zone 2, however, has value 710 for both the reference
2424 and overshoot. At 12ppem, reference and overshoot of blue zone 0
2425 becomes 8px, while blue zone 2 becomes 9px.
2427 A peculiarity of this font is that the tops of isolated vertical
2428 stems like `N' have a slight overshoot also. The auto-hinter tries
2429 to find the nearest blue zone using the *original* coordinates. For
2430 vertical stems, this is value 713. For normal horizontal tops like
2431 in character `E', this is value 710. Since value 713 is mapped to
2432 8px but value 710 to 9px, `N' and similar characters are one pixel
2433 higher than `E', which looks very bad.
2435 This commit sanitizes blue zones to avoid such a behaviour.
2437 * src/autofit/aflatin.c (af_latin_sort_blue): New function.
2438 (af_latin_metrics_init_blues): Sort blue values and remove overlaps.
2440 2017-02-12 Alexei Podtelezhnikov <apodtele@gmail.com>
2442 * src/smooth/ftgrays.c (gray_sweep): Improve code.
2444 2017-02-06 Werner Lemberg <wl@gnu.org>
2446 [truetype] Implement `VVAR' table support.
2448 * src/truetype/ttgxvar.h (GX_HVarTable): Renamed to...
2449 (GX_HVVarTable): ...This.
2450 (GX_Blend): Add fields for `VVAR' table handling.
2451 Other minor updates.
2453 * src/truetype/ttgxvar.c (ft_var_load_hvar): Renamed to...
2454 (ft_var_load_hvvar): ...This.
2455 Handle VVAR loading also (controlled by an additional parameter).
2456 (tt_hadvance_adjust): Renamed to...
2457 (tt_hvadvance_adjust): ...This.
2458 Handle application of advance height also (controlled by an
2459 additional parameter).
2460 (tt_hadvance_adjust, tt_vadvance_adjust): Wrappers for
2461 `tt_hvadvance_adjust'.
2463 * src/truetype/ttdriver.c (tt_service_metrics_variations): Updated.
2465 2017-02-05 Werner Lemberg <wl@gnu.org>
2467 [autofit] Use better blue zone characters for lowercase latin.
2469 The number of lowercase characters for computing the top flat blue
2470 zone value was too small (in most cases only `x' and `z'). If one
2471 of the two characters has a large serif, say, it can happen that
2472 FreeType must select between two different values, having a 50%
2473 chance to use the wrong one. As a result, rendering at larger PPEM
2474 values could yield uneven lowercase glyph heights.
2476 Problem reported by Christoph Koeberlin <christoph@koe.berlin>.
2478 * src/autofit/afblue.dat (AF_BLUE_STRING_LATIN_SMALL): Replaced
2480 (AF_BLUE_STRING_LATIN_SMALL_TOP, AF_BLUE_STRING_LATIN_SMALL_BOTTOM):
2481 ... New, extended sets.
2482 (AF_BLUE_STRINGSET_LATN): Updated.
2484 * src/autofit/afblue.c, scr/autofit/afblue.h: Regenerated.
2486 2017-02-04 Werner Lemberg <wl@gnu.org>
2488 Make `freetype-config' a wrapper of `pkg-config' if possible.
2490 Based on ideas taken from
2492 https://pkgs.fedoraproject.org/cgit/rpms/freetype.git/tree/freetype-multilib.patch
2493 https://pkgs.fedoraproject.org/cgit/rpms/freetype.git/tree/freetype-2.5.3-freetype-config-prefix.patch
2495 * builds/unix/freetype-config.in: Rewritten. Use `pkg-config' to
2496 set output variables if program is available.
2498 * docs/CHANGES, docs/freetype-config.1: Updated.
2500 2017-02-04 Werner Lemberg <wl@gnu.org>
2502 * builds/unix/unix-def.in (freetype-config): Fix permissions.
2504 2017-02-03 Werner Lemberg <wl@gnu.org>
2506 * src/autofit/afglobal.c (af_face_globals_free): Erase useless code.
2508 2017-02-03 Werner Lemberg <wl@gnu.org>
2510 * include/freetype/ftgasp.h (FT_GASP_SYMMETRIC_GRIDFIT): Fix value.
2514 2017-02-02 Werner Lemberg <wl@gnu.org>
2516 [truetype] Fix MVAR post-action handling.
2520 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=509
2522 * src/truetype/ttobjs.c (tt_size_reset): Do nothing for CFF2. This
2523 is important to make `tt_size_reset_iterator' (called in
2524 `tt_apply_mvar') always work.
2526 2017-02-02 Werner Lemberg <wl@gnu.org>
2528 Make compilation with FT_CONFIG_OPTION_PIC work again.
2530 All code committed here is guarded with `FT_CONFIG_OPTION_PIC'.
2532 * include/freetype/internal/services/svmetric.h
2533 (FT_DEFINE_SERVICE_METRICSVARIATIONSREC): Remove trailing semicolon.
2535 * src/autofit/aflatin.c (af_latin_hints_compute_edges,
2536 af_latin_hint_edges): Provide `globals' variable.
2538 * src/autofit/afloader.c (af_loader_load_glyph): Remove shadowing
2541 * src/autofit/afmodule.c (AF_SCRIPT_CLASSES_GET,
2542 AF_STYLE_CLASSES_GET): Redefine.
2544 * src/autofit/aftypes.h (AF_DEFINE_WRITING_SYSTEM_CLASS): Fix typo.
2546 * src/cff/cffparse.c (CFF_FIELD_BLEND): Provide it.
2548 * src/cff/cffpic.h (CffModulePIC): Fix typo.
2550 2017-01-31 Alexei Podtelezhnikov <apodtele@gmail.com>
2552 * src/smooth/ftgrays.c (gray_render_scanline): Improve code.
2554 2017-01-31 Werner Lemberg <wl@gnu.org>
2556 [cff] Provide metrics variation service interface (#50196).
2558 Only now I've got an OTF with an HVAR table for testing...
2560 The code in `ftmm.c' uses `FT_FACE_LOOKUP_SERVICE' to get the
2561 metrics variations interface. However, this didn't work with
2562 `FT_FACE_FIND_GLOBAL_SERVICE' used in `sfnt_init_face'.
2564 * src/cff/cffdrivr.c: Include FT_SERVICE_METRICS_VARIATIONS_H.
2565 (cff_hadvance_adjust, cff_metrics_adjust): Wrapper functions for
2566 metric service functions from the `truetype' module.
2567 (cff_service_metrics_variations): New service.
2568 (cff_services): Updated.
2570 * src/cff/cffpic.h (CFF_SERVICE_METRICS_VAR_GET): New macro.
2571 [FT_CONFIG_OPTION_PIC]: Synchronize code.
2573 * src/sfnt/sfobjs.c (sfnt_init_face): Replace call to
2574 FT_FACE_FIND_GLOBAL_SERVICE with `ft_module_get_service' to always
2575 load the service from the `truetype' module.
2577 2017-01-31 Werner Lemberg <wl@gnu.org>
2579 Add framework to support services with 9 functions.
2581 * include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC9):
2584 2017-01-31 Werner Lemberg <wl@gnu.org>
2586 [base] Fix error handing in MM functions.
2588 * src/base/ftmm.c (FT_Set_Var_Design_Coordinates,
2589 FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates):
2592 2017-01-31 Werner Lemberg <wl@gnu.org>
2594 [truetype] Fix sanity check for `gvar' table (#50184).
2596 * src/truetype/ttgxvar.c (ft_var_load_gvar): There might be missing
2597 variation data for some glyphs.
2599 2017-01-31 Werner Lemberg <wl@gnu.org>
2601 [autofit] Avoid uninitialized jumps (#50191).
2603 * src/autofit/afcjk.c (af_cjk_metrics_check_digits),
2604 src/autofit/aflatin.c (af_latin_metrics_check_digits): Initialize
2607 2017-01-27 Werner Lemberg <wl@gnu.org>
2611 * include/freetype/freetype.h (FT_ENCODING_PRC): New enum value.
2612 (FT_ENCODING_GB2312): Deprecated.
2614 * include/freetype/ttnameid.h (TT_MS_ID_PRC): New macro.
2615 (TT_MS_ID_GB2312): Deprecated.
2617 * src/sfnt/sfobjs.c (sfnt_find_encoding): Updated.
2619 * docs/CHANGES: Updated.
2621 2017-01-26 Werner Lemberg <wl@gnu.org>
2623 [base] Add `FT_Get_Sfnt_LangTag' function.
2625 * include/freetype/ftsnames.h (FT_SfntLangTag): New structure.
2626 (FT_Get_Sfnt_LangTag): New declaration.
2628 * src/base/ftsnames.c (FT_Get_Sfnt_LangTag): New function.
2630 * docs/CHANGES: Updated.
2632 2017-01-26 Werner Lemberg <wl@gnu.org>
2634 [sfnt] Support `name' table format 1.
2636 * include/freetype/internal/tttypes.h (TT_LangTagRec): New
2638 (TT_NameTableRec): Add fields `numLangTagRecords' and `langTags'.
2640 * src/sfnt/ttload.c (tt_face_load_name): Add support for language
2642 Reduce array size of name strings in case of invalid entries.
2643 (tt_face_free_name): Updated.
2645 * docs/CHANGES: Updated.
2647 2017-01-25 Werner Lemberg <wl@gnu.org>
2649 [sfnt] s/TT_NameEntry/TT_Name/.
2651 * include/freetype/internal/tttypes.h (TT_NameEntryRec): Renamed
2654 (TT_NameTableRec): Updated.
2656 * src/base/ftsnames.c (FT_Get_Sfnt_Name): Updated.
2658 * src/sfnt/sfdriver.c (sfnt_get_ps_name): Updated.
2660 * src/sfnt/sfobjs.c (tt_name_entry_ascii_from_utf16,
2661 tt_name_entry_ascii_from_other): Renamed to...
2662 (tt_name_ascii_from_utf16, tt_name_entry_ascii_from_other): This,
2664 (TT_NameEntry_ConvertFunc): Renamed to...
2665 (TT_Name_ConvertFunc): This.
2666 (tt_face_get_name): Updated.
2668 * src/sfnt/ttload.c (tt_face_load_name, tt_face_free_name):
2671 2017-01-24 Werner Lemberg <wl@gnu.org>
2673 [sfnt] Fix Postscript name service for symbol fonts.
2675 * src/sfnt/sfdriver.c (sfnt_get_ps_name): Accept PID/EID=3/0
2678 2017-01-24 Werner Lemberg <wl@gnu.org>
2680 [truetype] For OpenType 1.7: s/preferred/typographic/ (sub)family.
2682 * include/freetype/ftsnames.h
2683 (FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY,
2684 FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY): New macros.
2685 (FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY,
2686 FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY): Deprecated.
2688 * include/freetype/ttnameid.h (TT_NAME_ID_TYPOGRAPHIC_FAMILY,
2689 TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY): New macros.
2690 (TT_NAME_ID_PREFERRED_FAMILY, TT_NAME_ID_PREFERRED_SUBFAMILY):
2693 * src/sfnt/sfobjs.c (sfnt_load_face): Updated.
2695 * docs/CHANGES: Updated.
2697 2017-01-23 Werner Lemberg <wl@gnu.org>
2699 [base] Add `FT_Set_Default_Properties' (#49187).
2701 * include/freetype/ftmodapi.h: Add declaration.
2703 * src/base/ftinit.c (ft_set_default_properties): Renamed to...
2704 (FT_Set_Default_Properties): ... this.
2705 (FT_Init_FreeType): Updated.
2707 * docs/CHANGES: Updated.
2709 2017-01-23 Werner Lemberg <wl@gnu.org>
2711 [truetype] Minor updates for OpenType 1.8.1.
2713 * src/truetype/ttgxvar.h (GX_MVarTable): `axisCount' has been
2714 removed from the specification; it is now reserved.
2716 * src/truetype/ttgxvar.c (ft_var_load_mvar): Updated.
2717 (GX_FVar_Head): Remove `countSizePairs'; the corresponding data
2718 field in the `MVAR' table is now reserved.
2719 (fvar_fields): Updated.
2721 2017-01-23 Werner Lemberg <wl@gnu.org>
2723 [truetype] Avoid segfault for invalid variation data.
2725 * src/truetype/ttgxvar.c (ft_var_load_item_variation_store): Assure
2726 `itemCount' is not zero.
2730 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=441
2732 2017-01-20 Werner Lemberg <wl@gnu.org>
2734 * src/truetype/ttinterp.c (TT_RunIns): Adjust loop detector limits.
2736 2017-01-17 Werner Lemberg <wl@gnu.org>
2738 * include/freetype/ttnameid.h: Updated to OpenType 1.8.1.
2740 (TT_APPLE_ID_FULL_UNICODE): New macro.
2742 (TT_MS_LANGID_BOSNIAN_BOSNIA_HERZ_CYRILLIC,
2743 TT_MS_LANGID_UPPER_SORBIAN_GERMANY,
2744 TT_MS_LANGID_LOWER_SORBIAN_GERMANY, TT_MS_LANGID_IRISH_IRELAND,
2745 TT_MS_LANGID_INUKTITUT_CANADA_LATIN, TT_MS_LANGID_BASHKIR_RUSSIA,
2746 TT_MS_LANGID_LUXEMBOURGISH_LUXEMBOURG,
2747 TT_MS_LANGID_GREENLANDIC_GREENLAND, TT_MS_LANGID_MAPUDUNGUN_CHILE,
2748 TT_MS_LANGID_MOHAWK_MOHAWK, TT_MS_LANGID_BRETON_FRANCE,
2749 TT_MS_LANGID_OCCITAN_FRANCE, TT_MS_LANGID_CORSICAN_FRANCE,
2750 TT_MS_LANGID_ALSATIAN_FRANCE, TT_MS_LANGID_YAKUT_RUSSIA,
2751 TT_MS_LANGID_KICHE_GUATEMALA, TT_MS_LANGID_KINYARWANDA_RWANDA,
2752 TT_MS_LANGID_WOLOF_SENEGAL, TT_MS_LANGID_DARI_AFGHANISTAN): New
2755 (TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC): Fix value.
2757 (TT_MS_LANGID_GERMAN_LIECHTENSTEIN, TT_MS_LANGID_CATALAN_CATALAN,
2758 TT_MS_LANGID_CHINESE_MACAO, TT_MS_LANGID_SPANISH_SPAIN_MODERN_SORT,
2759 TT_MS_LANGID_KOREAN_KOREA, TT_MS_LANGID_ROMANSH_SWITZERLAND,
2760 TT_MS_LANGID_SLOVENIAN_SLOVENIA, TT_MS_LANGID_BASQUE_BASQUE,
2761 TT_MS_LANGID_SETSWANA_SOUTH_AFRICA,
2762 TT_MS_LANGID_ISIXHOSA_SOUTH_AFRICA,
2763 TT_MS_LANGID_ISIZULU_SOUTH_AFRICA, TT_MS_LANGID_KAZAKH_KAZAKHSTAN,
2764 TT_MS_LANGID_KYRGYZ_KYRGYZSTAN, TT_MS_LANGID_KISWAHILI_KENYA,
2765 TT_MS_LANGID_TATAR_RUSSIA, TT_MS_LANGID_ODIA_INDIA,
2766 TT_MS_LANGID_MONGOLIAN_PRC, TT_MS_LANGID_TIBETAN_PRC,
2767 TT_MS_LANGID_WELSH_UNITED_KINGDOM, TT_MS_LANGID_GALICIAN_GALICIAN,
2768 TT_MS_LANGID_SINHALA_SRI_LANKA, TT_MS_LANGID_TAMAZIGHT_ALGERIA,
2769 TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA, TT_MS_LANGID_YI_PRC,
2770 TT_MS_LANGID_UIGHUR_PRC): New aliases.
2772 Remove commented out code.
2774 (TT_NAME_ID_LIGHT_BACKGROUND, TT_NAME_ID_DARK_BACKGROUND,
2775 TT_NAME_ID_VARIATIONS_PREFIX): New macros.
2777 (HAVE_LIMIT_ON_IDENTS): Remove macro (which was useless since many
2778 years), use guarded long macros by default and define short versions
2779 as aliases for the long ones.
2781 2017-01-15 Werner Lemberg <wl@gnu.org>
2783 * src/truetype/ttgxvar.c (tt_apply_var): Handle underline parameters
2786 2017-01-11 Werner Lemberg <wl@gnu.org>
2788 * src/base/ftobjs.c (ft_open_face_internal): Improve tracing.
2790 2017-01-11 Werner Lemberg <wl@gnu.org>
2792 [truetype] Actually use metrics variation service.
2794 * src/base/ftmm.c: Include FT_SERVICE_METRICS_VARIATIONS_H.
2795 (ft_face_get_mvar_service): New auxiliary function to look up
2796 metrics variation service.
2797 (FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates,
2798 FT_Set_Var_Blend_Coordinates): Call metrics variation service.
2800 * src/truetype/ttobjs.c (tt_face_init): Use metrics variations for
2803 2017-01-11 Werner Lemberg <wl@gnu.org>
2805 [truetype] Provide metrics variation service.
2807 * include/freetype/internal/services/svmetric.h
2808 (FT_Metrics_Adjust_Func): Reduce number of necessary parameters.
2810 * src/truetype/ttgxvar.c: Include FT_LIST_H.
2811 (tt_size_reset_iterator): New auxiliary function for...
2812 (tt_apply_var): New function.
2814 * src/truetype/ttgxvar.h: Updated.
2816 * src/truetype/ttdriver.c (tt_service_metrics_variations): Add
2819 * include/freetype/internal/ftserv.h (FT_ServiceCache): Add metrics
2822 2017-01-11 Werner Lemberg <wl@gnu.org>
2824 [truetype] Parse `MVAR' table.
2826 * src/truetype/ttgxvar.h (MVAR_TAG_XXX): New macros for MVAR tags.
2827 (GX_Value, GX_MVarTable): New structures.
2830 * src/truetype/ttgxvar.c (GX_VALUE_SIZE, GX_VALUE_CASE,
2831 GX_GASP_CASE): New macros.
2832 (ft_var_get_value_pointer): New auxiliary function to get a pointer
2833 to a value from various SFNT tables already stored in `TT_Face'.
2834 (ft_var_load_mvar): New function.
2835 (TT_Get_MM_Var): Call it.
2836 (tt_done_blend): Updated.
2838 2017-01-11 Werner Lemberg <wl@gnu.org>
2840 [truetype] More preparations for MVAR support.
2842 * src/truetype/ttobjs.c (tt_size_reset): Add argument to make
2843 function only recompute ascender, descender, and height.
2845 * src/truetype/ttobjs.h: Updated.
2847 * src/truetype/ttdriver.c (tt_size_select, tt_size_request):
2850 2017-01-09 Werner Lemberg <wl@gnu.org>
2852 [pcf] Disable long family names by default.
2854 * include/freetype/config/ftoption.h
2855 (PCF_CONFIG_OPTION_LONG_FAMILY_NAMES): Comment out.
2857 2017-01-09 Werner Lemberg <wl@gnu.org>
2859 [pcf] Make long family names configurable.
2861 The change from 2016-09-29 was too radical (except for people using
2862 the openSuSE GNU/Linux distribution). To ameliorate the situation,
2863 PCF_CONFIG_OPTION_LONG_FAMILY_NAMES gets introduced which controls
2864 the feature; if set, a new PCF property option
2865 `no-long-family-names' can be used to switch this feature off.
2867 * include/freetype/config/ftoption.h, devel/ftoption.h
2868 (PCF_CONFIG_OPTION_LONG_FAMILY_NAMES): New option.
2870 * include/freetype/ftpcfdrv.h: New header file (only containing
2871 comments currently, used for building the documentation).
2873 * include/freetype/config/ftheader.h (FT_PCF_DRIVER_H): New macro.
2875 * src/pcf/pcf.h (PCF_Driver): Add `no_long_family_names' field.
2877 * src/pcf/pcfdrivr.c: Include FT_SERVICE_PROPERTIES_H and
2879 (pcf_property_set, pcf_property_get): New functions.
2880 (pcf_service_properties): New service.
2881 (pcf_services): Updated.
2882 (pcf_driver_init) [PCF_CONFIG_OPTION_LONG_FAMILY_NAMES]: Handle
2883 `no_long_family_names'.
2885 * src/pcf/pcfread.c (pcf_load_font): Handle `no_long_family_names'
2886 and PCF_CONFIG_OPTION_LONG_FAMILY_NAMES.
2888 * docs/CHANGES: Updated.
2890 2017-01-09 Werner Lemberg <wl@gnu.org>
2892 [pcf] Introduce a driver structure.
2894 To be filled later on with something useful.
2896 * src/pcf/pcf.h (PCF_Driver): New structure.
2898 * src/pcf/pcfdrivr.c (pcf_driver_init, pcf_driver_done): New dummy
2900 (pcf_driver_class): Updated.
2902 2017-01-08 Werner Lemberg <wl@gnu.org>
2904 [truetype] Again some GX code shuffling.
2906 We need this later on for MVAR also.
2908 * src/truetype/ttgxvar.c (tt_hadvance_adjust): Split off computing
2909 an item store variation delta into...
2910 (ft_var_get_item_delta): ...new function.
2912 2017-01-08 Werner Lemberg <wl@gnu.org>
2914 [truetype] Adjust font variation flags for MVAR.
2916 * include/freetype/internal/tttypes.h (TT_FACE_FLAG_VAR_XXX):
2917 Remove all flags related to MVAR; replace it with...
2918 (TT_FACE_FLAG_VAR_MVAR): ...this new macro.
2919 (TT_Face): Remove `mvar_support' field (which was still unused).
2921 2017-01-06 Werner Lemberg <wl@gnu.org>
2923 [truetype] More GX code shuffling.
2925 We need this later on for MVAR also.
2927 * src/truetype/ttgxvar.c (tt_done_blend): Split off handling of item
2928 variation store into...
2929 (ft_var_done_item_variation_store): ...new function.
2931 2017-01-06 Werner Lemberg <wl@gnu.org>
2933 [truetype] More generalization of GX stuff.
2935 We need this later on for MVAR also.
2937 * src/truetype/ttgxvar.c (ft_var_load_delta_set_index_mapping): Add
2938 parameters for delta-set index mapping and item variation store.
2939 (ft_var_load_item_variation_store): Add parameter for item variation
2941 s/hvarData/varData/.
2942 Move allocation of `hvar_table' to...
2943 (ft_var_load_hvar): ...this function.
2946 2017-01-06 Werner Lemberg <wl@gnu.org>
2948 [truetype] Some GX structure renames for generalization.
2950 We need this later on for MVAR also.
2952 * src/truetype/ttgxvar.h (GX_HVarData): Renamed to...
2953 (GX_ItemVarData): ...this.
2954 (GX_HVarRegion): Renamed to...
2955 (GX_VarRegion): ...this.
2956 (GX_HVStore): Renamed to...
2957 (GX_ItemVarStore): ...this.
2958 (GX_WidthMap): Renamed to...
2959 (GX_DeltaSetIdxMap): ...this.
2961 (GX_HVarTable): Updated.
2963 * src/truetype/ttgxvar.c: Updated.
2965 2017-01-06 Werner Lemberg <wl@gnu.org>
2967 [truetype] Code shuffling.
2969 * src/truetype/ttgxvar.c (ft_var_load_hvar): Split off loading of
2970 item variation store and delta set index mapping into...
2971 (ft_var_load_item_variation_store,
2972 ft_var_load_delta_set_index_mapping): ...new functions.
2974 2017-01-06 Werner Lemberg <wl@gnu.org>
2976 [truetype] Add HVAR access without advance width map.
2978 * src/truetype/ttgxvar.c (ft_var_load_hvar): Handle case where
2979 `offsetToAdvanceWidthMapping' is zero.
2980 (tt_hadvance_adjust): Implement direct deltaSet access by glyph
2983 2017-01-06 Werner Lemberg <wl@gnu.org>
2985 [pcf] Revise driver.
2987 This commit improves tracing and handling of malformed fonts. In
2988 particular, the changes to `pcf_get_properties' fix
2990 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=379
2992 * src/pcf/pcfread.c (tableNames): Use long names for better
2994 (pcf_read_TOC): Allow at most 9 tables.
2995 (pcf_get_properties): Allow at most 256 properties.
2996 Limit strings array length to 256 * (65536 + 1) bytes.
2998 (pcf_get_metric): Trace metric data.
2999 (pcf_get_metrics): Allow at most 65536 metrics.
3000 Fix comparison of `metrics->ascent' and `metrics->descent' to avoid
3003 (pcf_get_bitmaps): Allow at most 65536 bitmaps.
3005 (pcf_get_encodings, pcf_get_accel): Better tracing.
3007 * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Don't trace `format' details.
3008 These are now shown by `pcf_get_bitmaps'.
3010 2017-01-04 Werner Lemberg <wl@gnu.org>
3012 * src/pcf/pcfdrivr.c (PCF_Face_Init): Trace compression format.
3014 2017-01-04 Werner Lemberg <wl@gnu.org>
3016 [cff] More consistency checks for pure CFFs.
3020 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=378
3022 * src/cff/cffload.c (cff_font_load): Check element number and size
3023 of Name and Top DICT indices.
3025 2017-01-04 Werner Lemberg <wl@gnu.org>
3027 [cff, truetype] Minor tracing improvement.
3029 * src/cff/cffobjs.c (cff_face_init), src/truetype/ttobjs.c
3030 (tt_face_init): Indent first tracing message from SFNT driver.
3032 2017-01-03 Werner Lemberg <wl@gnu.org>
3034 [truetype] Various minor fixes.
3036 * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Check instruction
3037 size only if we do native hinting.
3038 (TT_Load_Glyph): Trace returned error code.
3040 * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Trace
3041 returned error code.
3042 (tt_size_ready_bytecode): Don't run `prep' table if `fpgm' table is
3045 2017-01-03 Werner Lemberg <wl@gnu.org>
3047 [sfnt] Don't fail if PCLT, EBLC (and similar tables) are invalid.
3049 These tables are optional.
3051 * src/sfnt/sfobjs.c (sfnt_load_face): Implement it.
3053 2017-01-03 Werner Lemberg <wl@gnu.org>
3055 * src/cff/cffparse.c (cff_parse_num): Simplify.
3057 2017-01-03 Werner Lemberg <wl@gnu.org>
3059 Various fixes for clang's undefined behaviour sanitizer.
3061 * src/cff/cffload.c (FT_fdot14ToFixed): Fix casting.
3062 (cff_blend_doBlend): Don't left-shift negative numbers.
3063 Handle 5-byte numbers byte by byte to avoid alignment issues.
3065 * src/cff/cffparse.c (cff_parse_num): Handle 5-byte numbers byte by
3066 byte to avoid alignment issues.
3068 * src/cid/cidload (cid_read_subrs): Do nothing if we don't have any
3071 * src/psaux/t1decode.c (t1_decode_parse_charstring): Fix tracing.
3073 * src/tools/glnames.py (main): Put `DEFINE_PSTABLES' guard around
3074 definition of `ft_get_adobe_glyph_index'.
3076 * src/psnames/pstables.h: Regenerated.
3078 * src/psnames/psmodule.c: Include `pstables.h' twice to get both
3079 declaration and definition.
3081 * src/truetype/ttgxvar.c (FT_fdot14ToFixed, FT_intToFixed): Fix
3084 2017-01-01 Werner Lemberg <wl@gnu.org>
3086 [cff] Handle multiple `blend' operators in a row correctly.
3090 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=368
3092 * src/cff/cffload.c (cff_blend_doBlend): Adjust `parser->stack'
3093 pointers into `subFont->blend_stack' after reallocation.
3095 2017-01-01 Werner Lemberg <wl@gnu.org>
3097 [sfnt] Return correct number of named instances for TTCs.
3099 Without this patch, requesting information for face index N returned
3100 the data for face index N+1 (or index 0).
3102 * src/sfnt/sfobjs.c (sfnt_init_face): Correctly adjust `face_index'
3103 for negative `face_instance_index' values.
3105 2016-12-31 Werner Lemberg <wl@gnu.org>
3107 */*: Use hex numbers for errors in tracing messages.
3109 2016-12-31 Werner Lemberg <wl@gnu.org>
3111 [truetype] Check axis count in HVAR table.
3115 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=362
3117 * src/truetype/ttgxvar.c (ft_var_load_hvar): Check axis count.
3118 (ft_var_load_avar): Fix tracing message.
3121 ----------------------------------------------------------------------------
3123 Copyright (C) 2016-2020 by
3124 David Turner, Robert Wilhelm, and Werner Lemberg.
3126 This file is part of the FreeType project, and may only be used, modified,
3127 and distributed under the terms of the FreeType project license,
3128 LICENSE.TXT. By continuing to use, modify, or distribute this file you
3129 indicate that you have read the license and understand and accept it
3134 version-control: never