[CRT] spawn: define a unicode environment when needed
[reactos.git] / sdk / lib / 3rdparty / freetype / ChangeLog
1 2018-01-08 Werner Lemberg <wl@gnu.org>
2
3 * Version 2.9 released.
4 =======================
5
6
7 Tag sources with `VER-2-9'.
8
9 * docs/VERSION.TXT: Add entry for version 2.9.
10
11 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
12 builds/windows/vc2005/index.html,
13 builds/windows/vc2008/freetype.vcproj,
14 builds/windows/vc2008/index.html,
15 builds/windows/vc2010/freetype.vcxproj,
16 builds/windows/vc2010/index.html,
17 builds/windows/visualc/freetype.dsp,
18 builds/windows/visualc/freetype.vcproj,
19 builds/windows/visualc/index.html,
20 builds/windows/visualce/freetype.dsp,
21 builds/windows/visualce/freetype.vcproj,
22 builds/windows/visualce/index.html,
23 builds/windows/ftver.rc,
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.1/2.9/, s/281/29/.
28
29 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 9.
30 (FREETYPE_PATCH): Set to 0.
31
32 * builds/unix/configure.raw (version_info): Set to 22:0:16.
33 * CMakeLists.txt (VERSION_PATCH): Set to 1.
34
35 2018-01-07 Werner Lemberg <wl@gnu.org>
36
37 Add check for librt, needed for `ftbench' (#52824).
38
39 * builds/unix/configure.raw (LIB_CLOCK_GETTIME): Define; this will
40 hold `-lrt' if necessary.
41
42 * builds/unix/unix-cc.in (LIB_CLOCK_GETTIME): New variable.
43
44 2018-01-07 Ewald Hew <ewaldhew@gmail.com>
45
46 [psaux] Fix Type 1 glyphs with too many stem hints.
47
48 According to the CFF specification, charstrings can have up to 96 stem
49 hints. Due to hint replacement routines in Type 1 charstrings, some
50 glyphs are rejected by the Adobe engine, which implements the above
51 limit. This fix turns off hinting for such glyphs.
52
53 * src/psaux/pshints.c (cf2_hintmap_build): Reset the error from calling
54 `cf2_hintmask_setAll' on a problematic Type 1 charstring and turn off
55 hinting.
56
57 2018-01-06 Werner Lemberg <wl@gnu.org>
58
59 Add `FT_Done_MM_Var'.
60
61 This is necessary in case the application's memory routines differ
62 from FreeType. A typical example is a Python application on Windows
63 that calls FreeType compiled as a DLL via the `ctypes' interface.
64
65 * include/freetype/ftmm.h, src/base/ftmm.c (FT_Done_MM_Var): Declare
66 and define.
67
68 * docs/CHANGES: Updated.
69
70 2018-01-03 Werner Lemberg <wl@gnu.org>
71
72 [truetype] Round offsets of glyph components only if hinting is on.
73
74 * src/truetype/ttgload.c (TT_Process_Composite_Component): Implement
75 it.
76
77 2018-01-03 Werner Lemberg <wl@gnu.org>
78
79 * src/truetype/ttgxvar.c (ft_var_to_design): Remove dead code.
80
81 This is a better fix than the previous commit, which is now
82 reverted.
83
84 2018-01-03 Alexei Podtelezhnikov <apodtele@gmail.com>
85
86 Move internal LCD-related declarations.
87
88 * include/freetype/ftlcdfil.h (ft_lcd_padding, ft_lcd_filter_fir):
89 Move from here...
90 * include/freetype/internal/ftobjs.h: ... to here.
91
92 2018-01-03 Alexei Podtelezhnikov <apodtele@gmail.com>
93
94 * include/freetype/config/ftconfig.h (FT_EXPORT, FT_EXPORT_DEF)
95 [_MSC_VER]: Limit Visual C++ attributes.
96
97 2018-01-03 Werner Lemberg <wl@gnu.org>
98
99 [truetype] Make blend/design coordinate round-tripping work.
100
101 Behdad reported that setting blend coordinates, then getting design
102 coordinates did incorrectly return the default instance's
103 coordinates.
104
105 * src/truetype/ttgxvar.c (tt_set_mm_blend): Fix it.
106
107 2017-12-31 Werner Lemberg <wl@gnu.org>
108
109 * src/sfnt/ttcmap.c (tt_cmap2_char_next): Fix endless loop.
110
111 Reported as
112
113 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4838
114
115 2017-12-31 Werner Lemberg <wl@gnu.org>
116
117 Synchronize other Windows project files.
118
119 * builds/windows/*: Add missing files.
120
121 2017-12-31 Werner Lemberg <wl@gnu.org>
122
123 Update Visual C 2010 project files.
124
125 Problem reported by Hin-Tak.
126
127 * builds/windows/vc2010/freetype.vcxproj: Add files `ftbdf.c' and
128 `ftcid.c'.
129 Sort entries.
130 * builds/windows/vc2010/freetype.vcxproj.filter: Ditto.
131 Fix members of `FT_MODULE' group.
132
133 2017-12-30 Werner Lemberg <wl@gnu.org>
134
135 * builds/vms/ftconfig.h: Synchronize with unix `ftconfig.in' file.
136
137 2017-12-28 Werner Lemberg <wl@gnu.org>
138
139 * builds/unix/ftconfig.in: Synchronize with main `ftconfig.h' file.
140
141 Reported by Nikolaus.
142
143 2017-12-27 Werner Lemberg <wl@gnu.org>
144
145 Fix compiler warnings.
146
147 * src/base/ftbitmap.c (ft_bitmap_assure_buffer): Make `pitch' and
148 `new_pitch' unsigned.
149
150 * src/base/ftpsprop.c: Include FT_INTERNAL_POSTSCRIPT_PROPS_H.
151
152 2017-12-27 Werner Lemberg <wl@gnu.org>
153
154 Fixes for `make multi'.
155
156 * include/freetype/internal/ftpsprop.h: Use `FT_BASE_CALLBACK'.
157 (ps_property_get): Harmonize declaration with corresponding
158 function typedef.
159
160 * include/freety[e/internal/fttrace.h: Add `trace_psprops'.
161
162 * src/base/ftpsprop.c: Include necessary header files.
163 (FT_COMPONENT): Define.
164 (ps_property_set): Tag with `FT_BASE_CALLBACK_DEF'.
165 (ps_property_get): Tag with `FT_BASE_CALLBACK_DEF'.
166 Harmonize declaration with corresponding function typedef.
167
168 2017-12-27 Werner Lemberg <wl@gnu.org>
169
170 Provide support for intra-module callback functions.
171
172 This is needed especially for `make multi' with C++.
173
174 * include/freetype/config/ftconfig.h (FT_BASE_CALLBACK,
175 FT_BASE_CALLBACK_DEF): New macros.
176
177 2017-12-25 Ewald Hew <ewaldhew@gmail.com>
178
179 Move PostScript drivers' property handlers to `base'.
180
181 This reduces the amount of duplicated code across PostScript
182 drivers.
183
184 * src/cff/cffdrivr.c, src/cid/cidriver.c, src/type1/t1driver.c
185 ({cff,cid,t1}_property_{get,set}): Moved to...
186 * include/freetype/internal/ftpsprop.h: ...this new file.
187 (ps_property_{get,set}): New functions to replace moved ones.
188
189 * src/base/ftpsprop.c: New file that implements above functions.
190
191 * include/freetype/internal/internal.h
192 (FT_INTERNAL_POSTSCRIPT_PROPS_H): New macro.
193
194 * src/cff/cffdrivr.c, src/cid/cidriver.c, src/type1/t1driver.c:
195 Updated.
196
197 * src/base/Jamfile, src/base/rules.mk (BASE_SRC), src/base/ftbase.c:
198 Updated.
199
200 2017-12-20 Werner Lemberg <wl@gnu.org>
201
202 Speed up FT_Set_Var_{Design,Blend}_Coordinates if curr == new.
203
204 We exit early if the current design or blend coordinates are
205 identical to the new ones.
206
207 * src/truetype/ttgxvar.c (tt_set_mm_blend, TT_Set_Var_Design):
208 Implement it, returning internal error code -1 if there will be no
209 variation change.
210
211 * src/type1/t1load.c (t1_set_mm_blend): Ditto.
212
213 * src/base/ftmm.c (FT_Set_Var_Design_Coordinates,
214 FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Updated.
215
216 2017-12-18 Werner Lemberg <wl@gnu.org>
217
218 [sfnt] Fix charmap type 2 iterator (#52646).
219
220 The subsetted demo font of the report that exhibits the bug has a
221 very unusual type 2 cmap for Unicode(!): It contains only two
222 sub-headers, one for one-byte characters (covering the range 0x20 to
223 0xFA), and a second one for higher byte 0x01 (just for character
224 code U+0131).
225
226 Before this commit, the iterator wasn't able to correctly handle a
227 sub-header for higher byte 0x01.
228
229 * src/sfnt/ttcmap.c (tt_cmap2_char_next): Fix character increment
230 for outer loop.
231
232 2017-12-18 Matthias Clasen <matthias.clasen@gmail.com>
233
234 [truetype] Fix clamping, minor tracing code beautification.
235
236 * src/truetype/ttgxvar.c (ft_var_to_normalized): Trace number of
237 design coordinates.
238 Use clamped value.
239
240 2017-12-18 Werner Lemberg <wl@gnu.org>
241
242 * src/*/*: Only use `ft_' and `FT_' variants of stdc library stuff.
243
244 2017-12-18 Werner Lemberg <wl@gnu.org>
245
246 * src/truetype/ttgxvar.c (tt_face_vary_cvt): Add size guard (#52688).
247
248 2017-12-18 Werner Lemberg <wl@gnu.org>
249
250 [truetype] Fix previous commit.
251
252 * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Correctly handle
253 unhinted phantom points, which must be properly scaled.
254
255 2017-12-18 Werner Lemberg <wl@gnu.org>
256
257 [truetype] Don't apply HVAR and VVAR deltas twice (#52683).
258
259 * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Always adjust
260 `pp1' to `pp4', except if we have an HVAR and/or VVAR table.
261
262 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Handle
263 alternative code branch identically w.r.t. presence of an HVAR
264 and/or VVAR table.
265
266 2017-12-17 Jonathan Kew <jfkthame@gmail.com>
267
268 [truetype] Correctly handle variation font phantom points (#52683).
269
270 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix phantom
271 point indices.
272
273 2017-12-17 Jonathan Kew <jfkthame@gmail.com>
274
275 Fix incorrect advance width scaling (#52683).
276
277 * src/base/ftadvance.c (FT_Get_Advances): Always respect the
278 FT_LOAD_NO_SCALE flag if present.
279
280 2017-12-16 Alexei Podtelezhnikov <apodtele@gmail.com>
281
282 * builds/windows/vc2010/freetype.vcxproj: AfterBuild copy.
283 * objs/.gitignore: Ignore almost everything.
284
285 2017-12-11 Werner Lemberg <wl@gnu.org>
286
287 Fix compiler warning (#52640).
288
289 * src/base/ftbitmap.c (ft_bitmap_assure_buffer): Remove unused
290 variable.
291
292 2017-12-08 Azzuro <azzuro@team-mediaportal.com>
293
294 * builds/windows/vc2010/freetype.vcxproj: Adjust output directory.
295
296 This allows builds with different configurations in parallel.
297
298 2017-12-08 Werner Lemberg <wl@gnu.org>
299
300 Fix `make setup dos', second try (#52622).
301
302 * builds/detect.mk (dos_setup): Don't use literal `>' character at
303 all. Mixing the different escaping rules from make, dos, and
304 windows is too fragile.
305
306 2017-12-08 Werner Lemberg <wl@gnu.org>
307
308 [docmaker] Fix code section parsing.
309
310 Stuff like
311
312 {
313 <bla>
314 }
315
316 confused the parser, which incorrectly treated `<bla>' as a markup
317 tag.
318
319 * src/tools/docmaker/content.py (ContentProcessor::process_content):
320 Apply `re_markup_tags' only outside of code sections.
321
322 2017-12-08 Werner Lemberg <wl@gnu.org>
323
324 New `ftdriver.h' file, covering all driver modules.
325
326 This reduces redundancy and increases synergy; it also reduces the
327 number of header files.
328
329 * include/freetype/config/ftheader.h (FT_DRIVER_H): New macro.
330 (FT_AUTOHINTER_H, FT_CFF_DRIVER_H, FT_TRUETYPE_DRIVER_H,
331 FT_PCF_DRIVER_H, FT_TYPE1_DRIVER_H): Make them aliases to
332 FT_DRIVER_H.
333
334 * include/freetype/ftautoh.h, include/freetype/ftcffdrv.h,
335 include/freetype/ftpcfdrv.h, include/freetype/ftt1drv.h,
336 include/freetype/ftttdrv.h: Replaced with...
337 * include/freetype/ftdriver.h: ...this new file.
338 (FT_CFF_HINTING_ADOBE, FT_T1_HINTING_ADOBE): Renamed to...
339 (FT_HINTING_ADOBE): ... this new macro.
340 (FT_CFF_HINTING_FREETYPE, FT_T1_HINTING_FREETYPE): Renamed to...
341 (FT_HINTING_FREETYPE): ... this new macro.
342
343 * src/*/*: Updated accordingly.
344
345 2017-12-08 Werner Lemberg <wl@gnu.org>
346
347 Move `ftdriver.h' to `ftdrv.h'.
348
349 * include/freetype/internal/ftdriver.h: Renamed to...
350 * include/freetype/internal/ftdrv.h: ... this name.
351
352 * include/freetype/internal/internal.h (FT_INTERNAL_DRIVER_H):
353 Updated.
354
355 2017-12-08 Werner Lemberg <wl@gnu.org>
356
357 Fix access to uninitalized memory (#52613).
358
359 Also reported as
360
361 https://bugs.chromium.org/p/chromium/issues/detail?id=791317
362
363 * src/base/ftbitmap.c (ft_bitmap_assure_buffer): If increasing the
364 bitmap size needs a larger bitmap buffer, assure that the new memory
365 areas are initialized also.
366
367 2017-12-08 Werner Lemberg <wl@gnu.org>
368
369 Fix `make setup dos' (#52622).
370
371 * builds/detect.mk (dos_setup): Properly escape literal `>'
372 character.
373
374 2017-12-07 Werner Lemberg <wl@gnu.org>
375
376 Fix C++ compilation.
377
378 * src/psaux/psauxmod.h: Use FT_CALLBACK_TABLE macro where necessary.
379
380 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Fix warning.
381
382 2017-12-07 Werner Lemberg <wl@gnu.org>
383
384 Fix `make multi'.
385
386 * include/freetype/internal/fttrace.h: Remove unused tracing macros.
387 s/pshalgo2/pshalgo/.
388 Add `trace_cffdecode'.
389 * src/pshinter/pshalgo.c (FT_COMPONENT): Updated.
390
391 * src/cff/cffload.c: Include FT_INTERNAL_POSTSCRIPT_AUX_H.
392 * src/cff/cffobjs.c: Include FT_SERVICE_METRICS_VARIATIONS_H and
393 FT_SERVICE_CFF_TABLE_LOAD_H.
394
395 * src/cid/cidriver.c: Include FT_INTERNAL_POSTSCRIPT_AUX_H.
396
397 * src/psaux/cffdecode.c: Include FT_FREETYPE_H and
398 FT_INTERNAL_DEBUG_H.
399 (FT_COMPONENT): Define.
400 * src/psaux/cffdecode.h: Include FT_INTERNAL_POSTSCRIPT_AUX_H.
401 * src/psaux/psauxmod.h: Include FT_INTERNAL_POSTSCRIPT_AUX_H.
402 Declare `cff_builder_funcs' and `ps_builder_funcs'.
403 * src/psaux/psft.c: Include `psobjs.h' and `cffdecode.h'.
404 * src/psaux/psobjs.c : Include `psauxmod.h'.
405
406 2017-12-07 Werner Lemberg <wl@gnu.org>
407
408 * include/freetype/config/ftheader.h: Some clean-up.
409
410 This commit removes documentation of deprecated macros and does some
411 minor streamlining.
412
413 2017-12-06 Werner Lemberg <wl@gnu.org>
414
415 * builds/symbian/bld.inf: Updated.
416
417 2017-12-06 Werner Lemberg <wl@gnu.org>
418
419 New header file `ftparams.h' that collects all parameter tags.
420
421 * include/freetype/config/ftheader.h (FT_PARAMETER_TAGS_H): New
422 macro.
423 (FT_TRUETYPE_UNPATENTED_H, FT_UNPATENTED_HINTING_H): Define it to
424 `ftparams.h'.
425
426 * include/freetype/ftautoh.h, include/freetype/ftcffdrv.h,
427 include/freetype/ftincrem.h, include/freetype/ftlcdfil.h,
428 include/freetype/ftsnames.h, include/freetype/ftt1drv.h: Include
429 FT_PARAMETER_TAGS_H.
430 Move FT_PARAM_TAG_XXX definitions to...
431 * include/freetype/ftparams.h: ...this new file.
432
433 * include/freetype/ttunpat.h: Remove. No longer needed.
434
435 2017-12-05 Werner Lemberg <wl@gnu.org>
436
437 Improve tracing messages by using singular and plural forms.
438
439 * src/*/*.c: Implement it.
440
441 2017-12-04 Werner Lemberg <wl@gnu.org>
442
443 [truetype] Allow shared points in `cvar' table (#52532).
444
445 * src/truetype/ttgxvar.c (tt_face_vary_cvt): Implement it by copying
446 and adjusting the corresponding code from
447 `TT_Vary_Apply_Glyph_Deltas'.
448
449 2017-11-28 Werner Lemberg <wl@gnu.org>
450
451 [truetype] Improving tracing of composite glyphs.
452
453 * src/truetype/ttgload.c (TT_Load_Composite_Glyph)
454 [FT_DEBUG_LEVEL_TRACE]: Show composite glyph information.
455
456 2017-11-27 Werner Lemberg <wl@gnu.org>
457
458 [type1] Allow (again) `/Encoding' with >256 elements (#52464).
459
460 In version 2.6.1, this has been disallowed to better reject
461 malformed fonts; however, this restriction was too strong. This
462 time, we only take the first 256 elements into account, since
463 encoding arrays are always accessed with a 8bit integer, according
464 to the PostScript Language Reference.
465
466 * src/type1/t1load.c (parse_encoding): Implement it.
467
468 2017-11-27 Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
469
470 Fix last commit (#52522).
471
472 * builds/freetype.mk: Set `FT_OPTION_H' and `FTOPTION_FLAG'
473 properly if we have `ftoption.h' in `BUILD_DIR'.
474
475 2017-11-24 Werner Lemberg <wl@gnu.org>
476
477 [unix] Install a massaged `ftoption.h' file (#51780).
478
479 * builds/unix/configure.raw (ftoption_set, ftoption_unset): New
480 auxiliary functions to construct...
481 (FTOPTION_H_SED): ... this new variable.
482 Apply it as a sed argument while copying `ftoption.h' to the
483 `builds/unix' directory (using `AC_CONFIG_FILES').
484 Simplify code of test that checks cpp's computation of bit length
485 (the test previously created an empty `ftoption.h' file and deleted
486 it immediately afterwards); without this change, it can happen on my
487 GNU/Linux box that `configure's execution of `config.status' doesn't
488 create `ftoption.h' (no idea why this happens).
489
490 * builds/unix/install.mk (install): Install
491 `builds/unix/ftoption.h'.
492
493 * builds/unix/unix-def.in (DISTCLEAN): Updated.
494
495 * builds/unix/.gitignore: Updated.
496
497 2017-11-23 Tor Andersson <tor.andersson@artifex.com>
498
499 Silence unused function warnings (#52465).
500
501 Some static function declarations cause unused function warnings if
502 certain config options are turned off via `ftoption.h'.
503
504 * src/base/ftbase.h, src/base/ftrfork.c, src/sfnt/ttbdf.h,
505 src/truetype/ttgxvar.h: Add #ifdef guards around these sections.
506
507 2017-11-22 Ewald Hew <ewaldhew@gmail.com>
508
509 * src/psaux/psft.c (cf2_setGlyphWidth): Check format before setting.
510
511 Reported as
512
513 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4377
514
515 2017-11-22 Ewald Hew <ewaldhew@gmail.com>
516
517 [psaux] Fix CFF advance widths. (#52466)
518
519 Glyph advance widths were being written to the new `PS_Decoder' but not
520 saved to the underlying format specific decoder. This caused pure CFF
521 fonts to have bad advance width.
522
523 * include/freetype/internal/psaux.h (PS_Decoder): Change `glyph_width'
524 field to pointer.
525 Remove unused fields.
526 * src/psaux/psobjs.c (ps_decoder_init): Change `glyph_width' from copy
527 to reference.
528 Remove unused.
529 * src/psaux/psft.c (cf2_setGlyphWidth): Update code.
530
531 2017-11-15 Vlad Tsyrklevich <vtsyrklevich@google.com>
532
533 * include/freetype/ftrender.h: Fix `FT_Renderer_RenderFunc' type.
534
535 2017-11-14 Nikolaus Waxweiler <madigens@gmail.com>
536
537 Use Adobe hinting engine for `light' hinting of both CFF and Type 1.
538
539 Since Ewald Hew factored the Adobe hinting engine out of the CFF
540 driver code, we can now use it on Type 1 (and CID) font formats, as
541 both have the same hinting philosophy.
542
543 This change activates the Adobe hinter when in LIGHT mode, and
544 therefore always unless explicitly asking for the auto-hinter. This
545 makes LIGHT behavior consistent with CFF fonts. As of this commit,
546 the hinting engine table looks as follows.
547
548 LIGHT NORMAL
549 -------------------------
550 TrueType Auto v40
551 CFF Adobe Adobe
552 Type 1 Adobe Adobe
553
554 2017-11-10 Yuri Levchenko <yuri_levchenko@boolat.com>
555
556 * CMakeLists.txt: Add `DISABLE_FORCE_DEBUG_PREFIX' option.
557
558 2017-11-06 Alexei Podtelezhnikov <apodtele@gmail.com>
559
560 * src/base/ftobjs.c (FT_Load_Glyph): Relocate condition.
561
562 2017-11-06 Alexei Podtelezhnikov <apodtele@gmail.com>
563
564 * src/smooth/ftgrays.c (gray_set_cell): Fix uninitialized variables.
565
566 2017-11-03 Ewald Hew <ewaldhew@gmail.com>
567
568 [psaux] Fix PostScript interpreter rewinding in Type 1 mode. (#52251)
569
570 The interpreter in Type 1 mode rewinds the charstring after collecting
571 all hints for building the initial hintmap (commit d52dd7f). However,
572 some charstrings use `endchar' in a final subroutine call, rewinding to
573 the start of that subroutine, and only a small section of the actual
574 glyph is drawn.
575
576 * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_cmdENDCHAR>:
577 Ensure we are on the top level charstring before rewinding.
578
579 2017-11-03 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
580
581 [truetype] Add more tricky fonts.
582
583 See the report by Yang Yinsen.
584 https://lists.gnu.org/archive/html/freetype-devel/2017-11/msg00000.html
585
586 * src/truetype/ttobjs.c (trick_names): Add `DFGothic-EB',
587 `DFGyoSho-Lt', `DFHSGothic-W5', `DFHSMincho-W3' and `DFHSMincho-W7'.
588 (tt_check_trickyness_sfnt_ids): Add checksums for DFGothic-EB,
589 DFGyoSho-Lt, DFHSGothic-W5, DFHSMincho-W3 and DFHSMincho-W7. Also
590 add checksums for DLCLiShu and DLCHayBold which their family names
591 were already listed but their checksums were previously unknown.
592
593 2017-11-01 Alexei Podtelezhnikov <apodtele@gmail.com>
594
595 [smooth] Fix complex rendering at high ppem.
596
597 We used to split large glyphs into horizontal bands and continue
598 bisecting them still horizontally if that was not enough. This is
599 guaranteed to fail when a single scanline cannot fit into the
600 rendering memory pool. Now we bisect the bands vertically so that
601 the smallest unit is a column of the band height, which is guranteed
602 to fit into memory.
603
604 * src/smooth/ftgrays.c (gray_convert_glyph): Implement it.
605
606 2017-10-20 Alexei Podtelezhnikov <apodtele@gmail.com>
607
608 [smooth] Improve complex rendering at high ppem.
609
610 At large sizes almost but not exactly horizontal segments can quickly
611 drain the rendering pool. This patch at least avoids filling the pool
612 with trivial cells. Beyond this, we can only increase the pool size.
613
614 Reported, analyzed, and tested by Colin Fahey.
615
616 * src/smooth/ftgrays.c (gray_set_cell): Do not record trivial cells.
617
618 2017-10-20 Alexei Podtelezhnikov <apodtele@gmail.com>
619
620 [base] Improve tracing in FT_Load_Glyph, FT_*_Size.
621
622 * src/base/ftobjs.c (FT_Load_Glyph): Tag tracing messages with
623 function name, glyph index, and load flags.
624 (FT_Select_Metrics, FT_Request_Metrics): Remove all tracing.
625 (FT_Select_Size, FT_Request_Size): Improve tracing.
626
627 2017-10-18 Alexei Podtelezhnikov <apodtele@gmail.com>
628
629 [base] Improve tracing in FT_Render_Glyph.
630
631 * src/base/ftobjs.c (FT_Render_Glyph_Internal): Add total coverage
632 calculations and downgrade Netpbm dump to bitmap:7.
633
634 2017-10-15 Ewald Hew <ewaldhew@gmail.com>
635
636 [cff] Fix segfault on missing `psaux' (#52218)
637
638 * src/cff/cffload.c (cff_done_blend): Add a check for possible nullptr.
639
640 * modules.cfg: Update dependency list.
641
642 2017-10-15 Alexei Podtelezhnikov <apodtele@gmail.com>
643
644 [base, cff] Fix MSVC warnings.
645
646 * src/base/ftobjs.c (FT_New_Library): C4702: unreachable code.
647 (ft_glyphslot_preset_bitmap): C4244: possible loss of data.
648 * src/cff/cffload.c (cff_blend_doBlend): C4244: possible loss of data.
649 Turn `sum' into unsigned.
650
651 2017-10-14 Alexei Podtelezhnikov <apodtele@gmail.com>
652
653 [base] Netpbm image tracing.
654
655 * src/base/ftobjs.c (FT_Load_Glyph): Trace bitmap size.
656 (FT_Render_Glyph_Internal): Trace bitmap in Netpbm format.
657
658 * src/smooth/ftgrays.c (gray_sweep): Sweep remnants of span tracing.
659
660 2017-10-14 Alexei Podtelezhnikov <apodtele@gmail.com>
661
662 * builds/windows/ftdebug.c (FT_Message): Print to stderr.
663 * builds/wince/ftdebug.c (FT_Message): Ditto.
664
665 2017-10-14 Behdad Esfahbod <behdad@behdad.org>
666
667 [afshaper] Delay creating `hb_set' objects until needed.
668
669 In runs on Noto Naskh Arabic, this results in 89 sets created
670 instead of 340 before. Makes auto-hinter setup with HarfBuzz
671 enabled 20% to 30% faster.
672
673 * src/autofit/afshaper.c (af_shaper_get_coverage): Implement it.
674
675 2017-10-12 Ewald Hew <ewaldhew@gmail.com>
676
677 [type1, cid] Add hinting engine switch.
678
679 Implement property service in `type1' and `cid' drivers to allow
680 switching between FreeType or Adobe hinting engine when both are
681 available.
682
683 * src/cid/cidriver.c (cid_property_{set,get}, cid_services),
684 src/type1/t1driver.c (t1_property_{set,get}, t1_services): Add
685 Properties service.
686
687 * src/cid/cidobjs.c (cid_driver_init), src/type1/t1objs.c
688 (T1_Driver_Init): Add default property values.
689
690 2017-10-12 Ewald Hew <ewaldhew@gmail.com>
691
692 Add T1_CONFIG_OPTION_OLD_ENGINE configuration option.
693
694 This controls whether the old Type 1 engine gets compiled into FreeType.
695 It is disabled by default.
696
697 * devel/ftoption.h, include/freetype/config/ftoption.h
698 (T1_CONFIG_OPTION_OLD_ENGINE): New macro.
699
700 * include/freetype/internal/psaux.h (PS_Decoder): Remove unused field.
701 * include/freetype/internal/psaux.h, src/cid/cidgload.c
702 (cid_load_glyph), src/psaux/psauxmod.c, src/psaux/psobjs.c
703 (ps_builder_add_point), src/psaux/t1decode.c
704 (t1_lookup_glyph_by_stdcharcode, t1_decoder_parse_glyph,
705 t1operator_seac, t1_decoder_parse_charstrings), src/psaux/t1decode.h,
706 src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Surround
707 relevant code with macro.
708 Minor code changes.
709
710 2017-10-12 Ewald Hew <ewaldhew@gmail.com>
711
712 Extract width parsing from Type 1 parser.
713
714 Duplicate the fast advance width calculations from the old parser.
715 This is to facilitate adding options for compiling out the old parser.
716
717 * src/psaux/t1decode.{c,h} (t1_decoder_parse_metrics): New function.
718 * include/freetype/internal/psaux.h (T1_Decoder_Funcs): New entry
719 `parse_metrics'.
720 * src/psaux/psauxmod.c: Set the new entry.
721
722 * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String),
723 src/cid/cidgload.c (cid_load_glyph): Separate
724 conditional for selecting engine.
725
726 2017-10-09 Werner Lemberg <wl@gnu.org>
727
728 * src/base/ftoutln.c (FT_Outline_Translate): Fix integer overflow.
729
730 Reported as
731
732 https://bugs.chromium.org/p/chromium/issues/detail?id=772775
733
734 2017-10-08 Werner Lemberg <wl@gnu.org>
735
736 * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Integer overflows.
737
738 Reported as
739
740 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3579
741
742 2017-10-07 Werner Lemberg <wl@gnu.org>
743
744 [sfnt] Adjust behaviour of PS font names for variation fonts.
745
746 * src/sfnt/sfdriver.c (sfnt_get_var_ps_name): Use a named instance's
747 PS name only if no variation is applied.
748
749 2017-10-07 Werner Lemberg <wl@gnu.org>
750
751 [cff, truetype] Adjust behaviour of named instances.
752
753 This commit completely separates the interaction between named
754 instances and variation functions. In particular, resetting the
755 variation returns to the current named instance (if set) and not to
756 the base font.
757
758 As a side effect, variation functions no longer change the named
759 instance index.
760
761 * src/cff/cffobjs.c (cff_face_init): Use MM service's `set_instance'
762 function.
763 Also apply `MVAR' table to named instances.
764
765 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Add cast.
766 (tt_set_mm_blend): No longer check whether requested variation
767 coincides with a named instance.
768 (TT_Set_Var_Design): Use current named instance for default
769 coordinates.
770 * src/truetype/ttobjs.c (tt_face_init): Use `TT_Set_Named_Instance'.
771
772 2017-10-07 Werner Lemberg <wl@gnu.org>
773
774 Make `FT_Set_Named_Instance' work.
775
776 * src/cff/cffdrivr.c (cff_set_instance): New function.
777 (cff_service_multi_masters): Register it.
778
779 * src/truetype/ttgxvar.c (TT_Set_Named_Instance): New function.
780 * src/truetype/ttgxvar.h: Updated.
781 * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Register
782 it.
783
784 * src/type1/t1load.c (T1_Reset_MM_Blend): New function.
785 * src/type1/t1load.h: Updated.
786 * src/type1/t1driver.c (t1_service_multi_masters): Register it.
787
788 2017-10-07 Werner Lemberg <wl@gnu.org>
789
790 Make `FT_FACE_FLAG_VARIATION' work.
791
792 * include/freetype/internal/tttypes.h (TT_Face): Remove
793 `is_default_instance'; this can be replaced with a combination of
794 `FT_IS_VARIATION' and `FT_IS_INSTANCE'.
795
796 * src/cff/cffdrivr.c (cff_get_advances): Updated.
797
798 * src/sfnt/sfdriver.c (sfnt_get_ps_name), src/sfnt/sfobjs.c
799 (sfnt_init_face): Updated.
800
801 * src/truetype/ttdriver.c (tt_get_advances), src/truetype/ttgload.c
802 (TT_Process_Simple_Glyph, load_truetype_glyph, IS_DEFAULT_INSTANCE),
803 src/truetype/ttgxvar.c (tt_set_mm_blend): Updated.
804 * src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design):
805 Handle `FT_FACE_FLAG_VARIATION'.
806
807 * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design): Handle
808 `FT_FACE_FLAG_VARIATION'.
809
810 2017-10-07 Werner Lemberg <wl@gnu.org>
811
812 New function `FT_Set_Named_Instance'.
813
814 No effect yet.
815
816 * src/base/ftmm.c (FT_Set_Named_Instance): New function.
817
818 * include/freetype/ftmm.h: Updated.
819
820 2017-10-07 Werner Lemberg <wl@gnu.org>
821
822 Add macros for checking whether a font variation is active.
823
824 * include/freetype/freetype.h (FT_FACE_FLAG_VARIATION,
825 FT_IS_VARIATION): New macros.
826 No effect yet.
827
828 2017-10-07 Werner Lemberg <wl@gnu.org>
829
830 Add framework for setting named instance in MM service.
831
832 * include/freetype/internal/services/svmm.h (FT_Set_Instance_Func):
833 New function typedef.
834 (MultiMasters): Add `set_instance' member.
835 (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated.
836
837 * src/cff/cffdrivr.c (cff_service_multi_masters),
838 src/truetype/ttdriver (tt_service_gx_multi_masters),
839 src/type1/t1driver.c (t1_service_multi_masters): Updated.
840
841 2017-10-07 Werner Lemberg <wl@gnu.org>
842
843 [type1] Minor code shuffling.
844
845 * src/type1/t1load.c (T1_Set_MM_Blend): Make it a wrapper of...
846 (t1_set_mm_blend): ...this new function.
847 (T1_Set_MM_Design): Use `t1_set_mm_blend'.
848
849 2017-10-05 Werner Lemberg <wl@gnu.org>
850
851 * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Fix integer
852 overflow.
853
854 Reported as
855
856 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3539
857
858 2017-10-05 Werner Lemberg <wl@gnu.org>
859
860 Fix compiler warnings.
861
862 * src/cff/cffdrivr.c (cff_ps_get_font_extra): Avoid code that relies
863 on numeric overflow.
864 Add cast.
865
866 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Fix variable
867 types, add cast.
868
869 2017-10-04 John Tytgat <John.Tytgat@esko.com>
870
871 [cff] Add support for `FSType'.
872
873 * include/freetype/internal/cfftypes.h (CFF_FontRec): Add
874 `font_extra' entry.
875
876 * src/cff/cffdrivr.c (cff_ps_get_font_extra): New function to
877 retrieve FSType info from the embedded PostScript data.
878 (cff_service_ps_info): Register function.
879
880 * src/cff/cffload.c (cff_font_done): Free `font_extra'.
881
882 2017-09-30 Alexei Podtelezhnikov <apodtele@gmail.com>
883
884 Signedness fixes in bitmap presetting.
885
886 Reported as
887
888 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3514.
889
890 * src/raster/ftrend1.c (ft_raster1_render): Exlicitly signed height.
891 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Ditto.
892 * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Explicitly unsigned
893 subtraction.
894
895 2017-09-29 Alexei Podtelezhnikov <apodtele@gmail.com>
896
897 Bitmap metrics presetting [2/2].
898
899 * src/base/ftobjs.c (FT_Load_Glyph): Preset the bitmap metrics when
900 appropriate but `FT_Render_Glyph' is not called.
901 * include/freetype/freetype.h (FT_GlyphSlotRec): Document the change.
902
903 2017-09-28 Alexei Podtelezhnikov <apodtele@gmail.com>
904
905 [smooth, raster] Miscellaneous cleanups.
906
907 * src/raster/ftrend1.c (ft_raster1_render): Clean up the exit.
908 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Reduce
909 translations and clean up the exit.
910 (ft_smooth_render_lcd, ft_smooth_render_lcd): Remove unused `error'.
911
912 2017-09-28 Ben Wagner <bungeman@google.com>
913
914 [truetype] Really, really fix #52082.
915
916 * src/truetype/ttinterp.c (Ins_MDRP): Correct conditional.
917
918 2017-09-28 Werner Lemberg <wl@gnu.org>
919
920 * src/psaux/psintrp.c (cf2_doStems): Fix integer overflow.
921
922 Reported as
923
924 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3510
925
926 2017-09-28 Ewald Hew <ewaldhew@gmail.com>
927
928 * src/cid/cidgload.c (cid_slot_load_glyph): Fix memory leak.
929
930 Reported as
931
932 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3489
933
934 2017-09-28 Alexei Podtelezhnikov <apodtele@gmail.com>
935
936 Bitmap metrics presetting [1/2].
937
938 This mainly just extracts the code for presetting the bitmap metrics
939 from the monochrome, grayscale, and LCD renderers into a separate
940 function.
941
942 * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): New function that
943 calculates prospective bitmap metrics for the given rendering mode.
944 * include/freetype/internal/ftobjs.h (ft_glyphslot_preset_bitmap):
945 Declare it.
946
947 * src/base/ftlcdfil.c (ft_lcd_padding): New helper function that adds
948 padding to CBox taking into account pecularities of LCD rendering.
949 * include/freetype/ftlcdfil.h (ft_lcd_padding): Declare it.
950
951 * src/raster/ftrend1.c (ft_raster1_render): Reworked to use
952 `ft_glyphslot_preset_bitmap'.
953 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Ditto.
954 (ft_smooth_render_lcd, ft_smooth_render_lcd): The pixel_mode setting
955 is moved to `ft_glyphslot_preset_bitmap'.
956
957 2017-09-28 Ewald Hew <ewaldhew@gmail.com>
958
959 [psaux] Fix compiler warning.
960
961 * src/psaux/pshints.c (cf2_hintmap_dump): Add switch for tracing
962 code.
963
964 2017-09-27 Werner Lemberg <wl@gnu.org>
965
966 * src/sfnt/ttload.c (tt_face_load_font_dir): Fix compiler warning.
967
968 2017-09-25 Werner Lemberg <wl@gnu.org>
969
970 [psaux] Fix compiler warnings.
971
972 * src/psaux/psft.c (cf2_initLocalRegionBuffer): Remove redundant
973 test.
974
975 * src/psaux/psintrp.c (cf2_interpT2CharString)
976 <cf2_escCALLOTHERSUBR>: Add casts.
977
978 * src/psaux/psobjs.c (ps_decoder_init): Add cast.
979
980 2017-09-25 Ewald Hew <ewaldhew@gmail.com>
981
982 [psaux] Minor fixes.
983
984 * include/freetype/internal/psaux.h, src/psaux/psobjs.{c,h}:
985 Rearrange `ps_builder_init' arguments to conventional order.
986
987 * src/psaux/psft.c (cf2_decoder_parse_charstrings): Add a check and
988 notice for `SubFont' in Type 1 mode.
989
990 2017-09-25 Ewald Hew <ewaldhew@gmail.com>
991
992 [psaux] Move `psdecode' into `psobjs'.
993
994 As the former only contains a single procedure, move it into
995 `psobjs' for simplicity. Also change the parameter order to the
996 conventional one.
997
998 * src/psaux/psdecode.c (ps_decoder_init): Moved to...
999 * src/psaux/psobjs.c: ...Here.
1000 * src/psaux/psdecode.h, src/psaux/psobjs.h: Ditto.
1001
1002 * include/freetype/internal/psaux.h (PSAux_ServiceRec): Update
1003 `ps_decoder_init' function signature.
1004
1005 * src/cff/cffgload.c, src/cid/cidgload.c, src/type1/t1gload.c:
1006 Update calls.
1007
1008 * src/psaux/psaux.c, src/psaux/psauxmod.c: Update includes.
1009
1010 * src/psaux/Jamfile (_sources), src/psaux/rules.mk (PSAUX_DRV_SRC):
1011 Update file references.
1012
1013 2017-09-25 Ewald Hew <ewaldhew@gmail.com>
1014
1015 [psaux] Fix Type 1 hinting.
1016
1017 Type 1 hinting breaks sometimes when mid-charstring hints should
1018 have been in the initial hintmap. This fix adds a preprocessing
1019 pass that reads all hints and builds the correct initial hintmap
1020 first, before proceeding to build the glyph outline.
1021
1022 * src/psaux/psintrp.c (cf2_interpT2CharString): New
1023 `initial_map_ready' boolean flag.
1024 Ignore outline commands and hint changes on first pass.
1025 <cf2_cmdENDCHAR>: Add section to build hintmap and rewind.
1026
1027 2017-09-25 Ewald Hew <ewaldhew@gmail.com>
1028
1029 [psaux] Add tracing for hints.
1030
1031 * src/psaux/pshints.c (cf2_hintmap_dump): New function.
1032 (cf2_hintmap_insertHint): Trace incoming and inserted hints.
1033 (cf2_hintmap_build): Dump hintmap before and after hint adjustment.
1034
1035 2017-09-25 Ewald Hew <ewaldhew@gmail.com>
1036
1037 [psaux] Minor fixes.
1038
1039 * src/psaux/psintrp.c (cf2_interpT2CharString): Fix check for pop
1040 results.
1041 s/font->decoder/decoder/ where necessary.
1042 <cf2_cmdHSTEM, cf2_cmdVSTEM, cf2_escHSTEM3, cf2_escVSTEM3>: Use
1043 offset parameter in `cf2_doStems' instead of doing correction for
1044 left-sidebearing.
1045
1046 2017-09-25 Ewald Hew <ewaldhew@gmail.com>
1047
1048 [cid] Use the new engine.
1049
1050 * src/cid/cidgload.c: Update includes.
1051 (cid_load_glyph, cid_slot_load_glyph): Implement changes to glyph
1052 loading code as with `type1' module.
1053
1054 2017-09-25 Ewald Hew <ewaldhew@gmail.com>
1055
1056 [cid] Add Adobe engine configuration.
1057
1058 This is similar to what was done in the `type1' module.
1059
1060 * src/cid/cidriver.c (t1cid_driver_class): Update declaration.
1061 * src/cid/cidobjs.c: Include FT_TYPE1_DRIVER_H.
1062 (cid_driver_init): Update code.
1063
1064 2017-09-25 Ewald Hew <ewaldhew@gmail.com>
1065
1066 [psaux] Change subfont synthesis for CID fonts.
1067
1068 Change `t1_make_subfont' to take in the Private dict record as an
1069 argument. This is because Type 1 and CID font records in FreeType
1070 have this in different places.
1071
1072 * src/psaux/psobjs.c (t1_make_subfont): Change `T1_Face' to
1073 `FT_Face' so that CID is also accepted.
1074 Take `PS_Private' as an argument and let caller figure out where the
1075 Private dict actually is.
1076 Update references.
1077
1078 * include/freetype/internal/psaux.h, src/psaux/psobjs.h: Update
1079 declaration.
1080
1081 * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Update
1082 call.
1083
1084 2017-09-25 Ewald Hew <ewaldhew@gmail.com>
1085
1086 [type1] Switch to Adobe engine.
1087
1088 * src/type1/t1objs.c (T1_Driver_Init): Set default to Adobe engine.
1089
1090 2017-09-25 Ewald Hew <ewaldhew@gmail.com>
1091
1092 [psaux] Extend Adobe interpreter (seac).
1093
1094 This concludes the changes needed to add Type 1 support.
1095
1096 * src/psaux/psintrp.c: Update includes.
1097 (cf2_interpT2CharString) <cf2_escSEAC>: Implement this similarly to
1098 implied seac for CFF.
1099
1100 * src/psaux/t1decode.c (t1_lookup_glyph_by_stdcharcode_ps): New
1101 function to look up the glyph index.
1102
1103 * src/psaux/psft.c (cf2_getT1SeacComponent,
1104 cf2_freeT1SeacComponent): New functions to get the charstrings for
1105 seac components.
1106
1107 * src/psaux/t1decode.h, src/psaux/psft.h: Update declarations.
1108
1109 2017-09-25 Ewald Hew <ewaldhew@gmail.com>
1110
1111 [psaux] Extend Adobe interpreter (flex in callothersubr).
1112
1113 * src/psaux/psintrp.c (cf2_interpT2CharString)
1114 <cf2_escCALLOTHERSUBR>: Fix Flex feature handling (OtherSubrs 0, 1,
1115 2).
1116 <cf2_cmdRMOVETO>: Do not actually move the `glyphPath' while doing
1117 flex. This is to avoid closing the current contour.
1118
1119 2017-09-25 Ewald Hew <ewaldhew@gmail.com>
1120
1121 [psaux] Extend Adobe interpreter (callothersubr).
1122
1123 * src/psaux/psintrp.c (cf2_interpT2CharString)
1124 <cf2_escCALLOTHERSUBR>: Copy code from
1125 `t1_decoder_parse_charstrings' (in `t1decode.c').
1126 OtherSubr 3 (change hints) should reset the hintmask, so that the
1127 new hints are applied.
1128 Fix function calls and stack access.
1129
1130 2017-09-25 Ewald Hew <ewaldhew@gmail.com>
1131
1132 [psaux] Extend Adobe interpreter (pop).
1133
1134 * src/psaux/psintrp.c (cf2_interpT2CharString): Change how unhandled
1135 OtherSubr results are stored. Implement the PostScript stack using
1136 an array.
1137 <cf2_escPOP>: Ensure that the stack is not cleared after getting
1138 `OtherSubr' results.
1139 Fix stack access.
1140
1141 2017-09-25 Ewald Hew <ewaldhew@gmail.com>
1142
1143 [psaux] Extend Adobe interpreter (callsubr).
1144
1145 * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_cmdCALLSUBR>:
1146 Type 1 mode.
1147
1148 * src/psaux/psft.c (cf2_initLocalRegionBuffer): Add Type 1 mode.
1149
1150 2017-09-25 Ewald Hew <ewaldhew@gmail.com>
1151
1152 [psaux] Extend Adobe interpreter (div, four-byte numbers).
1153
1154 * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_escDIV>: Add
1155 Type 1 mode. Type 1 requires large integers to be followed by
1156 `div'; cf. `Adobe Type 1 Font Format', section 6.2.
1157 <op == 255>: Push Type 1 four-byte numbers as `Int' always. This is
1158 to ensure `div' and `callsubr' get values they can use.
1159
1160 2017-09-25 Ewald Hew <ewaldhew@gmail.com>
1161
1162 [psaux] Extend Adobe interpreter (hints).
1163
1164 * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_cmdHSTEM,
1165 cf2_cmdVSTEM>: Add correction for left sidebearing in Type 1 mode.
1166 Allow adding hints mid-charstring.
1167 <cf2_escVSTEM3, cf2_escHSTEM3>: Translate into equivalent commands
1168 for three normal stem hints. This requires some recalculation of
1169 stem positions.
1170 Correction for left sidebearing.
1171
1172 2017-09-25 Ewald Hew <ewaldhew@gmail.com>
1173
1174 [psaux] Extend Adobe interpreter (hsbw, sbw).
1175
1176 * src/psaux/psintrp.c (cf2_doStems): `hsbw' or `sbw' must be the
1177 first operation in a Type 1 charstring.
1178 (cf2_interpT2CharString): Remove unused variables.
1179 <cf2_cmdHMOVETO, cf2_cmdVMOVETO, cf2_cmdRMOVETO>: `hsbw' or `sbw'
1180 must be the first operation in a Type 1 charstring.
1181 <cf2_cmdHSBW, cf2_escSBW>: Fix data access and add correction for
1182 left sidebearing.
1183
1184 2017-09-25 Ewald Hew <ewaldhew@gmail.com>
1185
1186 [psaux] Extend Adobe interpreter (setcurrentpoint).
1187
1188 * src/psaux/psintrp.c (cf2_interpT2CharString)
1189 <cf2_escSETCURRENTPT>: Fix stack access.
1190
1191 2017-09-25 Ewald Hew <ewaldhew@gmail.com>
1192
1193 [psaux] Extend Adobe interpreter (closepath).
1194
1195 * src/psaux/psintrp.c (cf2_interpT2CharString) <c2f_cmdCLOSEPATH>:
1196 Use the right builder function. We can use the `haveWidth' boolean
1197 already present, instead of implementing `parse_state'.
1198
1199 2017-09-25 Ewald Hew <ewaldhew@gmail.com>
1200
1201 [psaux] Add Type 1 operations to Adobe CFF interpreter.
1202
1203 The following Type 1 specific ops have been added (copied from
1204 `t1decode'):
1205
1206 closepath
1207 vstem3
1208 hstem3
1209 seac
1210 sbw
1211 callothersubr
1212 pop
1213 setcurrentpoint
1214 hsbw
1215
1216 The following require a Type 1 mode, because of differences in
1217 specification:
1218
1219 hstem
1220 vstem
1221 vmoveto
1222 callsubr
1223 div
1224 rmoveto
1225 hmoveto
1226 Numbers
1227
1228 The subsequent commits will implement these changes and adapt
1229 accesses of data and objects to the new interpreter.
1230
1231 NOTE: Will not compile in the meantime!
1232
1233 * src/psaux/psintrp.c: Add opcodes to enum.
1234 (cf2_interpT2CharString): Copy relevant code over from
1235 `t1_decoder_parse_charstrings' (in `t1decode.c').
1236
1237 2017-09-25 Ewald Hew <ewaldhew@gmail.com>
1238
1239 [type1] Fixes for rendering.
1240
1241 The Type 1 advance width calculation passes null for glyph slot,
1242 etc, which can cause null pointer access in the new interpreter.
1243 Fall back to the old one for now.
1244
1245 Fix the large glyph retry code and ensure hinting and scaling flags
1246 are set properly.
1247
1248 * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Add a
1249 check for metrics_only.
1250 Set the `force_scaling' flag.
1251 (T1_Parse_Glyph): Updated.
1252 (T1_Load_Glyph): Add `hinting' and `scaled' flags.
1253
1254 2017-09-25 Ewald Hew <ewaldhew@gmail.com>
1255
1256 [psaux] Add missing objects (2/2).
1257
1258 Synthesize a `SubFont' object for Type 1 fonts. This is used in the
1259 interpreter to access Private dict data, which are stored in
1260 different places for Type 1 and CFF. This allows the same data to
1261 be used in either mode.
1262
1263 * src/psaux/psobjs.c (t1_make_subfont): New procedure to copy
1264 required values to a dummy `CFF_SubFont' object. This is similar to
1265 `cff_make_private_dict'.
1266 * src/psaux/psobjs.h: Add the new declaration.
1267
1268 * include/freetype/internal/psaux.h, src/psaux/psauxmod.c: Ditto.
1269 Add this to the PSAux Service for future use with CID fonts.
1270
1271 * src/type1/t1gload.c: Include FT_INTERNAL_CFF_TYPES_H.
1272 (T1_Parse_Glyph_And_Get_Char_String): Add the call.
1273
1274 2017-09-25 Ewald Hew <ewaldhew@gmail.com>
1275
1276 [psaux] Add missing objects for Type 1 (1/2).
1277
1278 Move `CF2_Font' instance to `PS_Decoder'. This is the context for
1279 the interpreter and since it is currently stored in `CFF_Font', is
1280 unavailable in Type 1 mode.
1281
1282 * include/freetype/internal/psaux.h (T1_Decoder, PS_Decoder): New
1283 `cf2_instance' field.
1284
1285 * src/psaux/psdecode.c (ps_decoder_init): Copy `cf2_instance' to
1286 `PS_Decoder'.
1287
1288 * src/psaux/t1decode.c (t1_decoder_done): Add finalization code.
1289
1290 * src/psaux/psft.c (cf2_decoder_parse_charstrings): Update accesses.
1291
1292 2017-09-25 Ewald Hew <ewaldhew@gmail.com>
1293
1294 Allow `type1' module to use the Adobe engine.
1295
1296 Add the callback and some conditionals to switch between the two
1297 engines.
1298
1299 * include/freetype/internal/psaux.h (T1_Decoder_FuncsRec): Change
1300 function declarations.
1301 * src/psaux/psauxmod.c (T1_Decoder_FuncsRec): Register the
1302 callbacks.
1303
1304 * src/psaux/psobjs.c (ps_builder_add_point): Add conditionals for
1305 number conversion.
1306
1307 * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Add code
1308 to choose which renderer to use.
1309
1310 * src/cid/cidgload.c (cid_load_glyph): Update call.
1311 * src/base/ftobjs.c, src/psaux/psobjs.c, src/type1/t1gload.c: Update
1312 includes.
1313
1314 2017-09-25 Ewald Hew <ewaldhew@gmail.com>
1315
1316 [type1] Add Adobe engine configuration.
1317
1318 Use the previously changed PS_Driver in type1 module to store
1319 hinting engine configuration.
1320
1321 * include/freetype/ftt1drv.h: New file.
1322 Duplicate and rename config options from CFF.
1323 * include/freetype/config/ftheader.h (FT_TYPE1_DRIVER_H): New macro.
1324
1325 * src/type1/t1driver.c (t1_driver_class): Update declaration.
1326 * src/type1/t1objs.c: Include FT_TYPE1_DRIVER_H.
1327 (T1_Driver_Init): Update code.
1328
1329 2017-09-25 Ewald Hew <ewaldhew@gmail.com>
1330
1331 [cff] Move and rename `CFF_Driver'.
1332
1333 This is so that we can use the same hinting engine parameters for
1334 Type 1.
1335
1336 * include/freetype/internal/cffotypes.h (CFF_Driver): Rename and
1337 move to...
1338 * include/freetype/internal/psaux.h (PS_Driver): ...here.
1339
1340 * src/cff/cffdrivr.c, src/cff/cffgload.c, src/cff/cffload.c,
1341 src/cff/cffobjs.c, src/cff/cffobjs.h, src/psaux/psft.c,
1342 src/psaux/psobjs.c: Update references.
1343
1344 2017-09-25 Ewald Hew <ewaldhew@gmail.com>
1345
1346 [psaux, type1] Reorganize object fields.
1347
1348 Make some fields more generic, so that we can access them the same
1349 way regardless of Type 1 or CFF.
1350
1351 * include/freetype/internal/psaux.h (PS_Builder): Change `TT_Face'
1352 to `FT_Face'.
1353 Remove unused fields.
1354
1355 * src/psaux/psft.c: Update all accesses of `PS_Builder.face'.
1356 Add some asserts to guard against casting `T1_Face' as `TT_Face'.
1357
1358 * src/type1/t1objs.h (T1_GlyphSlot): Reorder fields to follow
1359 `CFF_GlyphSlot', so that we can pretend they are the same in the
1360 interpreter.
1361
1362 * src/psaux/psobjs.c (ps_builder_init, ps_builder_add_point):
1363 Updated with above changes.
1364
1365 2017-09-25 Ewald Hew <ewaldhew@gmail.com>
1366
1367 [psaux] Prepare for Type 1 mode.
1368
1369 Add some checks for Type 1 data passing through.
1370
1371 * src/psaux/psfont.h (CF2_Font): Add `isT1' flag.
1372 * src/psaux/psfont.c (cf2_font_setup): Skip the variations and blend
1373 code which is not applicable for Type 1.
1374
1375 * src/psaux/psft.c (cf2_decoder_parse_charstrings): Avoid accessing
1376 `decoder->cff' in Type 1 mode.
1377 Copy `is_t1' flag to `CF2_Font'.
1378
1379 2017-09-25 Ewald Hew <ewaldhew@gmail.com>
1380
1381 [psaux, cff] Use the new objects.
1382
1383 * include/freetype/internal/psaux.h, src/psaux/psauxmod.c: Fix
1384 switching between new and old engines.
1385
1386 * src/cff/cffgload.c, src/cff/cffparse.c: Update calls.
1387
1388 * src/psaux/psblues.c, src/psaux/psfont.c, src/psaux/psfont.h,
1389 src/psaux/psft.c, src/psaux/psft.h, src/psaux/psintrp.c: Update all
1390 to use new objects.
1391
1392 2017-09-24 Ewald Hew <ewaldhew@gmail.com>
1393
1394 [psaux] Objects for new interpreter (part 2).
1395
1396 Make the new objects copy over values. They are essentially wrapper
1397 types for the different decoders/builders.
1398
1399 * include/freetype/internal/psaux.h: Update declarations.
1400 (PS_Builder): Add `is_t1' flag.
1401 (PS_Decoder_{Get,Free}_Glyph_Callback): Renamed to...
1402 (CFF_Decoder_{Get,Free}_Glyph_Callback: ... this.
1403 (PS_Decoder): Updated.
1404 Add `t1_parse_callback' member.
1405 (PSAux_ServiceRec): Add `ps_decoder_init' member.
1406
1407 * src/psaux/psdecode.h, src/psaux/psobjs.h: Update declarations.
1408
1409 * src/psaux/psdecode.c, src/psaux/psobjs.c: Implement copy with two
1410 modes.
1411
1412 * src/psaux/psauxmod.c: Add builder and decoder functions to `PSAux'
1413 service.
1414
1415 2017-09-24 Ewald Hew <ewaldhew@gmail.com>
1416
1417 [psaux] Add objects for new interpreter.
1418
1419 Introduce `PS_Decoder' and `PS_Builder' which include all fields
1420 from either Type 1 or CFF decoders/builders.
1421
1422 * include/freetype/internal/psaux.h (PS_Builder, PS_Decoder): New
1423 structs.
1424
1425 * src/psaux/psobjs.c, src/psaux/psobjs.h: Add `PS_Builder'
1426 functions.
1427
1428 * src/psaux/psdecode.c, src/psaux/psdecode.h: New files to hold
1429 `PS_Decoder' initialization functions.
1430
1431 * src/psaux/psaux.c, src/psaux/Jamfile (_sources),
1432 src/psaux/rules.mk (PSAUX_DRV_SRC): Updated.
1433
1434 2017-09-24 Ewald Hew <ewaldhew@gmail.com>
1435
1436 [psaux] Rename files.
1437
1438 Replace the `cf2' file name prefix with `ps' as the Adobe engine
1439 will be used for both PostScript Types 1 and 2 (CFF) instead of just
1440 CFF.
1441
1442 s/cf2/ps/ for all following.
1443
1444 * src/psaux/cf2*: Rename files.
1445 * src/psaux/*: Update includes.
1446
1447 * src/psaux/Jamfile (_sources), src/psaux/rules.mk (PSAUX_DRC_SRC,
1448 PSAUX_DRV_H): Update file references.
1449
1450 2017-09-24 Ewald Hew <ewaldhew@gmail.com>
1451
1452 [psaux] Minor fix.
1453
1454 Use `MultiMasters' service in `psaux' instead of a call to `cff'.
1455 The project builds if CFF_CONFIG_OPTION_OLD_ENGINE is not defined.
1456
1457 * src/psaux/cf2ft.c: Update includes.
1458 (cf2_getNormalizedVector): Use `mm->get_var_blend' instead of
1459 `cff_get_var_blend'.
1460
1461 2017-09-24 Ewald Hew <ewaldhew@gmail.com>
1462
1463 [psaux, cff] Move `cff_random' into `psaux' service.
1464
1465 NOTE: Does not compile!
1466
1467 Minor fix to allow both `cff' and `psaux' to use `cff_random'.
1468
1469 * src/cff/cffload.c (cff_random): Move to...
1470 * src/psaux/psobjs.c: Here.
1471 * src/cff/cffload.h: Move corresponding declaration to
1472 `src/psaux/psobjs.h'.
1473
1474 * include/freetype/internal/psaux.h (PSAux_ServiceRec): Register the
1475 function here...
1476 * src/psaux/psauxmod.c: And here.
1477
1478 * src/cff/cffload.c, src/psaux/cf2intrp.c: Update code.
1479
1480 2017-09-24 Ewald Hew <ewaldhew@gmail.com>
1481
1482 [cff] Move struct declarations to `freetype/internal'.
1483
1484 NOTE: Does not compile!
1485
1486 This is so that the CFF functions moved to `psaux' can access the
1487 same structs that they need.
1488
1489 * src/cff/cfftypes.h: Moved to...
1490 * include/freetype/internal/cfftypes.h: ...Here.
1491
1492 * src/cff/cffobjs.h: Moved the struct declarations to...
1493 * include/freetype/internal/cffotypes.h: ... this new file.
1494
1495 * include/freetype/internal/internal.h (FT_INTERNAL_CFF_TYPES_H,
1496 FT_INTERNAL_CFF_OBJECT_TYPES_H): New macros.
1497
1498 * src/cff/cffcmap.h, src/cff/cffdrivr.c, src/cff/cffgload.c,
1499 src/cff/cffgload.h, src/cff/cffload.h, src/cff/cffobjs.c,
1500 src/cff/cffobjs.h, src/cff/cffparse.h, src/psaux/psobjs.h,
1501 include/freetype/internal/psaux.h,
1502 include/freetype/internal/services/svcfftl.h: Update includes.
1503
1504 * src/cff/rules.mk (CFF_DRV_H): Updated.
1505
1506 2017-09-24 Ewald Hew <ewaldhew@gmail.com>
1507
1508 [psaux, cff] Add new service for inter-module calls.
1509
1510 NOTE: Does not compile!
1511
1512 This is to allow CFF functions moved to `psaux' to call functions
1513 declared in `src/cff/cffload.h'.
1514
1515 * include/freetype/internal/services/svcfftl.h: New file, setting up
1516 a `CFFLoad' service.
1517
1518 * include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC10,
1519 FT_DEFINE_SERVICEDESCREC): New macros.
1520 (FT_SERVICE_CFF_TABLE_LOAD_H): New macro.
1521
1522 * src/cff/cffdrivr.c, src/cff/cffpic.h: Register the new service.
1523
1524 * src/cff/cfftypes.h (CFF_FontRec), src/psaux/cf2font.h
1525 (CF2_FontRec): Add service interface.
1526
1527 * src/cff/cffobjs.c, src/psaux/cf2font.c, src/psaux/cf2ft.c,
1528 src/psaux/cf2intrp.c, src/psaux/cffdecode.c: Use the new service.
1529
1530 2017-09-24 Ewald Hew <ewaldhew@gmail.com>
1531
1532 [psaux, cff] Add callbacks for inter-module calls.
1533
1534 NOTE: Does not compile!
1535
1536 * include/freetype/internal/psaux.h: Add function pointer
1537 declarations.
1538
1539 * src/psaux/cffdecode.c (cff_decoder_init): Update to take in
1540 callbacks.
1541 * src/psaux/cffdecode.h: Ditto.
1542
1543 * src/cff/cffgload.c (cff_compute_max_advance, cff_slot_load):
1544 Update calls to pass in callbacks.
1545 * src/psaux/cf2ft.c, src/psaux/cffdecode.c: Use them.
1546
1547 2017-09-24 Ewald Hew <ewaldhew@gmail.com>
1548
1549 [psaux, cff] Create new `PSAux' service interface entries.
1550
1551 NOTE: Does not compile!
1552
1553 * include/freetype/internal/psaux.h: Include
1554 FT_INTERNAL_TRUETYPE_TYPES_H.
1555 (CFF_Builder_FuncsRec, CFF_Decocer_FuncsRec): New function tables.
1556 (CFF_Builder): Updated.
1557 Fix for forward declaration.
1558 (PSAux_ServiceRec): New field `cff_decoder_funcs'.
1559
1560 * src/psaux/psauxmod.c (cff_builder_funcs, cff_decoder_funcs): New
1561 function tables.
1562 (PSAux_Interface): Updated.
1563
1564 * include/freetype/internal/tttypes.h (TT_FaceRec): Add `psaux'
1565 service interface.
1566
1567 * src/cff/cffgload.c, src/cff/cffobjs.c, src/cff/cffparse.c: Update
1568 function calls to use psaux service.
1569
1570 2017-09-24 Ewald Hew <ewaldhew@gmail.com>
1571
1572 [psaux, cff] Move CFF builder components into `psaux' module.
1573
1574 NOTE: Does not compile!
1575
1576 * src/cff/cffgload.c
1577 (cff_builder_{init,done,add_point,add_point1,add_contour,start_point,close_contour},
1578 cff_check_points): Move to...
1579 * src/psaux/psobjs.c: Here.
1580
1581 * src/cff/cffgload.h: Move corresponding declarations to
1582 `src/psaux/psobjs.h'.
1583
1584 * src/cff/cffgload.h (CFF_Builder): Move struct declaration to...
1585 * include/freetype/internal/psaux.h: Here.
1586
1587 2017-09-24 Ewald Hew <ewaldhew@gmail.com>
1588
1589 [psaux, cff] Move CFF decoder components into `psaux' module.
1590
1591 NOTE: Does not compile!
1592
1593 * src/cff/cffgload.c (CFF_Operator,
1594 CFF_COUNT_{CHECK_WIDTH,EXACT,CLEAR_STACK}, cff_argument_counts,
1595 cff_operator_seac, cff_compute_bias,
1596 cff_lookup_glyph_by_stdcharcode,
1597 cff_decoder_{parse_charstrings,init,prepare}): Move to...
1598 * src/psaux/cffdecode.c: This new file.
1599
1600 * src/cff/cffgload.h: Move corresponding declarations to...
1601 * src/psaux/cffdecode.h: This new file.
1602
1603 * src/cff/cffgload.h (CFF_MAX_{OPERANDS,SUBRS_CALLS,TRANS_ELEMENTS},
1604 CFF_Decoder_Zone, CFF_Decoder): Move declarations to...
1605 * include/freetype/internal/psaux.h: Here.
1606
1607 * src/psaux/cf2ft.h: Update include.
1608
1609 * src/psaux/psaux.c, src/psaux/rules.mk (PSAUX_DRV_SRC): Update with
1610 the new file.
1611
1612 2017-09-24 Ewald Hew <ewaldhew@gmail.com>
1613
1614 [psaux, cff] Move Adobe's engine components into `psaux' module.
1615
1616 This is the first patch of a sequence to move the Type 2 charstring
1617 processing capability from the `cff' module to the `psaux' module.
1618
1619 NOTE: Does not compile!
1620
1621 * src/cff/cf2*: Move these files to...
1622 * src/psaux/cf2*: Here.
1623
1624 * src/cff/Jamfile (_sources), src/cff/rules.mk (CFF_DRV_SRC,
1625 CFF_DRV_H), src/cff/cff.c, src/cff/cffgload.c: Remove file
1626 references.
1627
1628 * src/psaux/Jamfile (_sources), src/psaux/rules.mk, src/psaux/psaux.c
1629 (PSAUX_DRV_SRC, PSAUX_DRV_H): Add file references.
1630
1631 2017-09-24 Alexei Podtelezhnikov <apodtele@gmail.com>
1632
1633 Tweak per-face LCD filtering controls.
1634
1635 Thing are simpler with a NULL-function pointer.
1636
1637 * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): New
1638 pointer to the filter function.
1639 (FT_LibraryRec): Remove unused `lcd_filter'.
1640 (FT_Bitmap_LcdFilterFunc, ft_lcd_filter_fir): Move from here...
1641 * include/freetype/ftlcdfil.h (FT_Bitmap_LcdFilterFunc,
1642 ft_lcd_filter_fir): ... to here.
1643
1644 * src/base/ftobjs.c (ft_open_face_internal): NULL-initialize the
1645 per-face filter.
1646 (FT_Face_Properties): Set it.
1647 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Simplify.
1648
1649 * src/base/ftlcdfil.c (ft_lcd_filter_fir, FT_Libary_SetLcdFilter):
1650 Minor.
1651
1652 2017-09-24 Jonathan Kew <jfkthame@gmail.com>
1653
1654 [sfnt] Fix `premultiply_data' (#52092).
1655
1656 * src/sfnt/pngshim.c (premultiply_data): Don't use vector extension
1657 if we have less than 16 bytes of data.
1658
1659 2017-09-24 Werner Lemberg <wl@gnu.org>
1660
1661 [otvalid] Fix handling of ValueRecords.
1662
1663 For GPOS pair positioning format 1 the description of ValueRecords
1664 in the OpenType specification (1.8.2, from today) is wrong – the
1665 offset has to be taken from the parent structure; in this case the
1666 `PairSet' table.
1667
1668 * src/otvalid/otvgpos.c (otv_PairSet_validate): Set `extra3'.
1669 (otv_PairPos_validate): Adjust.
1670
1671 2017-09-23 Werner Lemberg <wl@gnu.org>
1672
1673 [otvalid] Handle `GSUB' and `GPOS' v1.1 tables.
1674
1675 * src/otvalid/otvgsub.c (otv_GSUB_validate), src/otvalid/otvgpos.c
1676 (otv_GPOS_validate): Implement it.
1677
1678 2017-09-23 Werner Lemberg <wl@gnu.org>
1679
1680 [otvalid] Update common table handling to OpenType 1.8.2.
1681
1682 * src/otvalid/otvcommn.c (otv_Device_validate): Handle
1683 VariationIndex subtable.
1684 (otv_Lookup_validate): Handle MarkFilteringSet.
1685
1686 2017-09-23 Alexei Podtelezhnikov <apodtele@gmail.com>
1687
1688 [build] Windows-style DLL versioning.
1689
1690 * build/windows/ftver.rc: New VERSIONINFO resource.
1691 * build/windows/vc2010/freetype.vcxproj: Further improvements.
1692
1693 2017-09-23 Ben Wagner <bungeman@google.com>
1694
1695 [truetype] Really fix #52082.
1696
1697 * src/truetype/ttinterp.c (Ins_MDRP): Correct conditional.
1698
1699 2017-09-23 Werner Lemberg <wl@gnu.org>
1700
1701 [otvalid] Handle `GDEF' v1.2 and v1.3 tables.
1702
1703 No validation of variation stuff yet.
1704
1705 * src/otvalid/otvgdef.c (otv_MarkGlyphSets_validate): New function.
1706 (otv_GDEF_validate): Implement it.
1707
1708 2017-09-22 Werner Lemberg <wl@gnu.org>
1709
1710 [otvalid] Handle `BASE' v1.1 table.
1711
1712 No validation of variation stuff yet.
1713
1714 * src/otvalid/otvbase.c (otv_BASE_validate): Implement it.
1715
1716 2017-09-22 Werner Lemberg <wl@gnu.org>
1717
1718 [otvalid] Macros for 32bit offset support.
1719
1720 * src/otvalid/otvcommn.h (OTV_OPTIONAL_TABLE32,
1721 OTV_OPTIONAL_OFFSET32, OTV_SIZE_CHECK32): New macros.
1722
1723 2017-09-21 Alexei Podtelezhnikov <apodtele@gmail.com>
1724
1725 [build] Simplify Visual C++ 2010 project.
1726
1727 * build/windows/vc2010/freetype.vcxproj: Remove fake singlethreaded
1728 configurations and tweak.
1729
1730 2017-09-21 Werner Lemberg <wl@gnu.org>
1731
1732 [truetype] Integer overflow (#52082).
1733
1734 * src/truetype/ttinterp.c (Ins_MDRP): Avoid FT_ABS.
1735
1736 2017-09-21 Werner Lemberg <wl@gnu.org>
1737
1738 [sfnt] Fix postscript name for default instance of variation fonts.
1739
1740 Problem reported by Behdad.
1741
1742 * src/sfnt/sfdriver.c (sfnt_get_ps_name): Test
1743 `is_default_instance'.
1744
1745 2017-09-21 Werner Lemberg <wl@gnu.org>
1746
1747 [truetype] Fix `mmvar' array pointers, part 2.
1748
1749 The previous commit was incomplete.
1750
1751 * src/truetype/ttgxvar.c: Properly initialize sub-array offsets for
1752 `master' also.
1753
1754 2017-09-21 Werner Lemberg <wl@gnu.org>
1755
1756 [truetype] Fix `mmvar' array pointers.
1757
1758 Without this change, clang's AddressSanitizer reports many runtime
1759 errors due to misaligned addresses.
1760
1761 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Use multiples of pointer
1762 size for sub-array offsets into `mmvar'.
1763
1764 2017-09-20 Werner Lemberg <wl@gnu.org>
1765
1766 [truetype] Integer overflows.
1767
1768 Changes triggered by
1769
1770 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3429
1771
1772 * src/truetype/ttinterp.c (Ins_SHPIX, Ins_DELTAP): Use NEG_LONG.
1773 (Ins_MIAP): Use SUB_LONG.
1774
1775 2017-09-19 Alexei Podtelezhnikov <apodtele@gmail.com>
1776
1777 [build] Fix DLL builds in Visual C++ project.
1778
1779 * build/windows/vc2010/freetype.vcxproj: Use DynamicLibrary in Debug
1780 and Release configurations.
1781 * include/freetype/config/ftconfig.h (FT_EXPORT, FT_EXPORT_DEF)
1782 [_DLL]: Use Visual C++ extensions.
1783
1784 2017-09-19 John Tytgat <John.Tytgat@esko.com>
1785
1786 [cff] Fix family name logic of pure CFF fontdata (#52056).
1787
1788 1. If `FamilyName' is present in the CFF font, use this for
1789 FT_Face's `family_name'.
1790 2. Otherwise, use the face name and chop off any subset prefix.
1791 3. If at this point FT_Face's `family_name' is set, use this
1792 together with the full name to determine the style.
1793 4. Otherwise, use `CIDFontName' as FT_Face's `family_name'.
1794 5. If we don't have a valid style, use "Regular".
1795
1796 Previously, FT_Face's `family_name' entry for pure CFF fontdata
1797 nearly always was the fontname itself, instead of the `FamilyName'
1798 entry in the CFF font (assuming there is one).
1799
1800 * src/cff/cffobjs.c (cff_face_init) [pure_cff]: Implement it.
1801
1802 2017-09-18 Alexei Podtelezhnikov <apodtele@gmail.com>
1803
1804 [build] Declutter Visual C++ 2010-2017 project.
1805
1806 * build/windows/vc2010/freetype.vcxproj: Use MaxSpeed (/02)
1807 optimization for Release configuration throughout the project.
1808
1809 2017-09-16 Werner Lemberg <wl@gnu.org>
1810
1811 * Version 2.8.1 released.
1812 =========================
1813
1814
1815 Tag sources with `VER-2-8-1'.
1816
1817 * docs/VERSION.TXT: Add entry for version 2.8.1.
1818 * docs/CHANGES: Updated.
1819
1820 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
1821 builds/windows/vc2005/index.html,
1822 builds/windows/vc2008/freetype.vcproj,
1823 builds/windows/vc2008/index.html,
1824 builds/windows/vc2010/freetype.vcxproj,
1825 builds/windows/vc2010/index.html,
1826 builds/windows/visualc/freetype.dsp,
1827 builds/windows/visualc/freetype.vcproj,
1828 builds/windows/visualc/index.html,
1829 builds/windows/visualce/freetype.dsp,
1830 builds/windows/visualce/freetype.vcproj,
1831 builds/windows/visualce/index.html,
1832 builds/wince/vc2005-ce/freetype.vcproj,
1833 builds/wince/vc2005-ce/index.html,
1834 builds/wince/vc2008-ce/freetype.vcproj,
1835 builds/wince/vc2008-ce/index.html: s/2.8/2.8.1/, s/28/281/.
1836
1837 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
1838
1839 * builds/unix/configure.raw (version_info): Set to 21:0:15.
1840 * CMakeLists.txt (VERSION_PATCH): Set to 1.
1841
1842 2017-09-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1843
1844 [sfnt] lowest gcc for vectors (e1d0249e) is changed to 4.7.
1845
1846 __builtin_shuffle() was introduced in gcc-4.7. The lowest
1847 gcc to enable vector operation is delayed from 4.6 to 4.7.
1848
1849 * src/sfnt/pngshim.c (premultiply_data): Fix cpp-macro to
1850 enable the vector operation, to change the lowest gcc version
1851 from 4.6 to 4.7.
1852
1853 2017-09-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1854
1855 [cache] Fix a possible overflow by signed integer comparison.
1856
1857 Improve the code by 5d3ff05615dda6d1325ed612381a17a0df04c975 ,
1858 issues are found by Behdad Esfahbod and Werner Lemberg.
1859
1860 * src/cache/ftcbasic.c (FTC_ImageCache_Lookup): Replace
1861 a subtraction to check higher bit by a bit operation,
1862 and cpp-conditionalize for appropriate systems. Add better
1863 documentation to the comment.
1864 (FTC_ImageCache_LookupScaler): Ditto.
1865 (FTC_SBitCache_Lookup): Ditto.
1866 (FTC_SBitCache_LookupScaler): Ditto.
1867
1868 2017-09-13 Werner Lemberg <wl@gnu.org>
1869
1870 [autofit] Really fix #41334 (#52000).
1871
1872 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Set
1873 `segment->delta' everywhere.
1874
1875 2017-09-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1876
1877 [autofit, sfnt] Fix for `make multi'.
1878
1879 * src/autofit/afshaper.c: Include FT_ADVANCE_H, to use
1880 FT_Get_Advance() in it.
1881 * src/sfnt/ttcmap.c: Include FT_SERVICE_POSTSCRIPT_CMAPS_H
1882 to use PS_Unicodes in it, also include `ttpost.h' to use
1883 tt_face_get_ps_name() in it.
1884
1885 2017-09-11 Azzuro <azzuro@team-mediaportal.com>
1886
1887 [build] Improve builds with different MS Visual Studio versions.
1888
1889 * builds/windows/vc2010/freetype.vcxproj: Switch platform toolset
1890 according to the Visual Studio version.
1891
1892 2017-09-11 Werner Lemberg <wl@gnu.org>
1893
1894 * src/sfnt/ttkern.c (tt_face_load_kern): Reject format 2 tables.
1895
1896 Reported by Behdad.
1897
1898 2017-09-09 Werner Lemberg <wl@gnu.org>
1899
1900 [autofit] Improve communication with ftgrid.
1901
1902 * src/autofit/afhints.c (af_glyph_hints_get_segment_offset):
1903 Provide values in font units.
1904
1905 2017-09-08 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1906
1907 [base] Remove a check for resource ID in the resource fork driver.
1908
1909 LastResort.dfont has a marginal resource ID 0xFFFF for sfnt
1910 resource. Inside Macintosh: More Macintosh Toolbox, `Resource IDs'
1911 (1-46), tells that some IDs are reserved and should not be used.
1912 FreeType2 just uses resource ID to sort the fragmented resource.
1913 To accept the marginal fonts, the checking is removed.
1914
1915 * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Remove res_id
1916 validity check, fix a trace message format.
1917
1918 2017-09-08 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1919
1920 [sfnt, truetype] Register the tags for marginal fonts.
1921
1922 The first 32bit of standard TrueType variants is 0x00010000,
1923 `OTTO', `ttcf', `true' or `typ1'. 2 marginal dfonts on legacy Mac
1924 OS X, Keyboard.dfont and LastResort.dfont, have the sfnt resources
1925 starting 0xA5 followed by `kbd' or `lst'. Considering the following
1926 data could be parsed as conventional TrueType fonts, the header
1927 checking is updated to allow these tags. It seems that recent Mac
1928 OS X has already switched to normal TTF for these fonts.
1929
1930 See the discussion at
1931 http://u88.n24.queensu.ca/exiftool/forum/index.php?topic=3931.0
1932
1933 * include/freetype/tttags.h (TTAG_0xA5kbd, TTAG_0xA5lst): New header
1934 tags for Keyboard.dfont and LastResort.dfont.
1935 * src/sfnt/sfobjs.c (sfnt_open_font): Accept the sfnt resource
1936 starts with TTAG_0xA5kbd or TTAG_0xA5lst.
1937 * src/truetype/ttobjs.c (tt_face_init): Accept the face with the
1938 format tag is TTAG_0xA5kbd or TTAG_0xA5lst.
1939
1940 2017-09-05 Werner Lemberg <wl@gnu.org>
1941
1942 Fix multiple calls of `FT_Bitmap_Convert'.
1943
1944 The documentation of `FT_Bitmap_Convert' says that multiple calls do
1945 proper reallocation of the target FT_Bitmap object. However, this
1946 failed for the sequence
1947
1948 non-empty bitmap
1949 empty bitmap
1950 non-empty bitmap
1951
1952 Reason was that `FT_Bitmap_Convert' only reallocated the bitmap
1953 buffer if it became too small; it didn't make the buffer smaller.
1954 For an empty bitmap following a non-empty one, only the buffer
1955 dimension got set to zero, without deallocation. If the next call
1956 was a non-empty buffer again, an assertion in `ft_mem_qrealloc' was
1957 triggered.
1958
1959 * src/base/ftbitmap.c (FT_Bitmap_Convert): Always reallocate target
1960 buffer to the correct size.
1961
1962 * docs/CHANGES: Document it.
1963
1964 2017-09-05 Werner Lemberg <wl@gnu.org>
1965
1966 [bdf] Fix size and resolution handling.
1967
1968 * src/bdf/bdfdrivr.c (BDF_Face_Init): Use `SIZE' values if
1969 `POINT_SIZE', `RESOLUTION_X', or `RESOLUTION_Y' properties are
1970 missing.
1971
1972 * docs/CHANGES: Document it.
1973
1974 2017-08-25 Alexei Podtelezhnikov <apodtele@gmail.com>
1975
1976 Swap `ALLOC_MULT' arguments (#51833).
1977
1978 * src/base/ftbitmap.c (ft_bitmap_assure_buffer): Updated.
1979 * src/winfonts/winfnt.c (FNT_Load_Glyph): Updated.
1980 * src/raster/ftrend1.c (ft_raster1_render): Updated.
1981
1982 2017-08-23 Werner Lemberg <wl@gnu.org>
1983
1984 [sfnt] Fix clang compilation (#51788).
1985
1986 * src/sfnt/pngshim.c (premultiply_data): Use vectors instead of
1987 scalars.
1988 (vector_shuffle): New macro to take care of a different built-in
1989 function name on clang.
1990
1991 2017-08-22 Werner Lemberg <wl@gnu.org>
1992
1993 [base] Don't zero out allocated memory twice (#51816).
1994
1995 Patch applied from bug report.
1996
1997 * src/base/ftutil.c (ft_mem_qrealloc): Use low-level allocation to
1998 avoid unnecessary overhead.
1999
2000 2017-08-22 Werner Lemberg <wl@gnu.org>
2001
2002 [truetype] Integer overflow.
2003
2004 Changes triggered by
2005
2006 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3107
2007
2008 * src/truetype/ttinterp.c (Ins_MDRP, Ins_MIRP, Ins_ALIGNPTS): Use
2009 NEG_LONG.
2010
2011 2017-08-17 Alexei Podtelezhnikov <apodtele@gmail.com>
2012
2013 [sfnt] Avoid synthetic unicode for symbol fonts with PUA.
2014
2015 Reported as
2016
2017 https://bugs.chromium.org/p/chromium/issues/detail?id=754574
2018
2019 * src/sfnt/sfobjs.c (sfnt_load_face): Check for FT_ENCODING_MS_SYMBOL.
2020
2021 2017-08-16 Werner Lemberg <wl@gnu.org>
2022
2023 * src/sfnt/pngshim.c (premultiply_data): Fix compiler warnings.
2024
2025 2017-08-15 Behdad Esfahbod <behdad@behdad.org>
2026
2027 [sfnt] Speed up PNG image loading.
2028
2029 This reduces the overhead of `premultiply_data' by 60%.
2030
2031 * src/sfnt/pngshim.c (premultiply_data): Provide code which uses
2032 gcc's (and clang's) `vector_byte' attribute to process 4 pixels at a
2033 time.
2034
2035 2017-08-11 Werner Lemberg <wl@gnu.org>
2036
2037 [sfnt, truetype] Improve handling of missing sbits.
2038
2039 Requested by Behdad.
2040
2041 Modern bitmap-only SFNTs like `NotoColorEmoji.ttf' don't contain
2042 entries in the bitmap strike(s) for empty glyphs. Instead, they
2043 rely that a space glyph gets created from the font's metrics data.
2044 This commit makes FreeType behave accordingly.
2045
2046 * include/freetype/fterrdef.h (FT_Err_Missing_Bitmap): New error
2047 code.
2048
2049 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_image): Change error codes
2050 to make a distinction between a missing bitmap in a composite and a
2051 simple missing bitmap.
2052
2053 * src/truetype/ttgload.c (TT_Load_Glyph): For a missing bitmap (in a
2054 bitmap-only font), synthesize an empty bitmap glyph if metrics are
2055 available.
2056
2057 2017-08-10 Werner Lemberg <wl@gnu.org>
2058
2059 [base] Minor API improvement for default variation axis setting.
2060
2061 * src/base/ftmm.c (FT_Set_MM_Design_Coordinates,
2062 FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates,
2063 FT_Set_Var_Blend_Coordinates): Allow coords==NULL if num_coords==0.
2064
2065 * docs/CHANGES: Updated.
2066
2067 2017-08-08 Werner Lemberg <wl@gnu.org>
2068
2069 [psnames] Really fix issue #49949.
2070
2071 We now use a separate preprocessor macro to handle both definition
2072 and declaration of the glyph name arrays.
2073
2074 * src/psnames/psmodule.c (DEFINE_PS_TABLE_DATA): New macro.
2075
2076 * src/tools/glnames.py (StringTable::dump,
2077 StringTable::dump_sublist): Use `DEFINE_PS_TABLE_DATA'.
2078 (dump_encoding): Ditto.
2079 (main): Use `wb' mode for writing the output file, which works on
2080 Windows also.
2081
2082 * src/psnames/pstables.h: Regenerated.
2083
2084 2017-08-08 Alexei Podtelezhnikov <apodtele@gmail.com>
2085
2086 [smooth] Harmony LCD rendering.
2087
2088 This is a new technology for LCD-optimized rendering. It capitalizes
2089 on the fact that each color channel grid is shifted by a third of a
2090 pixel. Therefore it is logical to render 3 separate monochrome
2091 bitmaps shifting the outline by 1/3 pixel, and then combine them.
2092 Importantly, the resulting output does not require additional LCD
2093 filtering.
2094
2095 * src/smooth/ftsmooth.c (ft_smooth_render_generic)
2096 [!FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Implement new LCD-optimized
2097 rendering.
2098
2099 * include/freetype/ftlcdfil.h, include/freetype/freetype.h,
2100 include/freetype/config/ftoption.h, devel/ftoption.h: Updated
2101 documentation.
2102
2103 2017-08-08 Alexei Podtelezhnikov <apodtele@gmail.com>
2104
2105 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Clean up.
2106
2107 2017-08-08 Alexei Podtelezhnikov <apodtele@gmail.com>
2108
2109 * src/sfnt/ttpost.c (format): Use otspec-compliant versions.
2110
2111 2017-08-05 Werner Lemberg <wl@gnu.org>
2112
2113 [truetype] Integer overflow.
2114
2115 Reported as
2116
2117 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2868
2118
2119 * src/truetype/ttinterp.c (Ins_ALIGNRP): Use NEG_LONG.
2120
2121 2017-08-05 Werner Lemberg <wl@gnu.org>
2122
2123 [base, truetype] New function `FT_Get_Var_Axis_Flags'.
2124
2125 The reserved `flags' field got a value in OpenType version 1.8.2;
2126 unfortunately, the public `FT_Var_Axis' structure misses the
2127 corresponding element. Since we can't add a new field, we add an
2128 access function.
2129
2130 * src/base/ftmm.c (FT_Get_Var_Axis_Flags): New function.
2131
2132 * include/freetype/ftmm.h (FT_VAR_AXIS_FLAG_HIDDEN): New macro.
2133 Updated.
2134
2135 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Increase allocated memory
2136 of `mmvar' to hold axis flags.
2137 Fill the axis flags array.
2138
2139 * docs/CHANGES: Updated.
2140
2141 2017-08-03 Nikolaus Waxweiler <madigens@gmail.com>
2142
2143 [truetype] Fix metrics of B/W hinting in v40 mode.
2144
2145 Phantom points are now saved outside v40 backwards compatibility
2146 mode. This fixes the jumping glyphs when switching between v35 and
2147 v40 monochrome mode.
2148
2149 * src/truetype/ttgload.c (TT_Hint_Glyph): Fix inversed bool logic.
2150
2151 2017-08-03 Nikolaus Waxweiler <madigens@gmail.com>
2152
2153 [truetype] Do not set any ClearType flags in v40 monochrome mode.
2154
2155 This fixes weird behavior of instructions that resulted in rendering
2156 differences between v35 and v40 in monochrome mode, e.g., in
2157 `timesbi.ttf'.
2158
2159 * src/truetype/ttinterp.c (Ins_GETINFO)
2160 [TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL]: Check
2161 `subpixel_hinting_lean'.
2162
2163 2017-08-01 Werner Lemberg <wl@gnu.org>
2164
2165 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Fix thinko.
2166
2167 2017-08-01 Behdad Esfahbod <behdad@behdad.org>
2168
2169 [truetype] Fix loading of named instances.
2170
2171 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Preserve file position
2172 while loading the `avar' table.
2173
2174 2017-08-01 Werner Lemberg <wl@gnu.org>
2175
2176 [sfnt, truetype] Minor adjustments for OpenType 1.8.2.
2177
2178 * src/sfnt/sfobjs.c (sfnt_load_face): The units per EM value has now
2179 (tighter) limits.
2180
2181 * src/truetype/ttgload.c (load_truetype_glyph): The new OpenType
2182 version explicitly allows all negative values for the number of
2183 contours if we have a composite glyph (this is for better backwards
2184 compatibility I guess), but it still recommends value -1.
2185
2186 2017-07-26 Werner Lemberg <wl@gnu.org>
2187
2188 [cff] Integer overflow.
2189
2190 Reported as
2191
2192 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2738
2193
2194 * src/cff/cf2hints.c (cf2_glyphpath_computeOffset,
2195 cf2_glyphpath_curveTo): Use ADD_INT32.
2196
2197 2017-07-13 Werner Lemberg <wl@gnu.org>
2198
2199 [base] Fix memory leak.
2200
2201 Reported as
2202
2203 https://bugs.chromium.org/p/chromium/issues/detail?id=738362
2204
2205 * src/base/ftglyph.c (FT_Get_Glyph): Do proper deallocation in case
2206 of error.
2207
2208 2017-07-12 Werner Lemberg <wl@gnu.org>
2209
2210 [base] Integer overflow.
2211
2212 Reported as
2213
2214 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2573
2215
2216 * src/base/ftobjs.c (ft_glyphslot_grid_fit_metrics): Use
2217 FT_PIX_CEIL_LONG and FT_PIX_ROUND_LONG.
2218
2219 2017-07-12 Werner Lemberg <wl@gnu.org>
2220
2221 * src/truetype/ttpload.c (tt_face_get_location): Off-by-one typo.
2222
2223 Also improve tracing message.
2224
2225 Problem reported as
2226
2227 https://bugs.chromium.org/p/chromium/issues/detail?id=738919
2228
2229 2017-07-07 Werner Lemberg <wl@gnu.org>
2230
2231 [cff] Integer overflow.
2232
2233 Reported as
2234
2235 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2517
2236
2237 * src/cff/cf2blues.c (cf2_blues_capture): Use SUB_INT32.
2238
2239 2017-07-05 Werner Lemberg <wl@gnu.org>
2240
2241 * src/sfnt/ttcmap.c (tt_cmap_unicode_class_rec): Fix warning.
2242
2243 2017-07-05 Werner Lemberg <wl@gnu.org>
2244
2245 * src/truetype/ttgxvar.c (FT_Stream_SeekSet): Fix warning (#51395).
2246
2247 2017-07-04 Werner Lemberg <wl@gnu.org>
2248
2249 [truetype] Prevent address overflow (#51365).
2250
2251 * src/truetype/ttgxvar.c (FT_Stream_SeekSet): Add guard.
2252
2253 2017-07-03 Alexei Podtelezhnikov <apodtele@gmail.com>
2254
2255 * src/base/ftlcdfil.c (ft_lcd_filter_fir): Improve code.
2256
2257 2017-07-03 Werner Lemberg <wl@gnu.org>
2258
2259 [truetype] Integer overflow.
2260
2261 Reported as
2262
2263 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2455
2264
2265 * src/truetype/ttinterp.c (Ins_SCFS): Use SUB_LONG.
2266
2267 2017-07-01 Alexei Podtelezhnikov <apodtele@gmail.com>
2268
2269 * src/sfnt/sfobjs.c (sfnt_load_face): Ignore No_Unicode_Glyph_Name.
2270
2271 2017-06-28 Ben Wagner <bungeman@google.com>
2272
2273 Avoid Microsoft compiler warnings (#51331).
2274
2275 While clang's sanitizer recommends a cast to unsigned for safe
2276 negation (to handle -INT_MIN), both MSVC and Visualc emit warning
2277 C4146 if an unsigned value gets negated.
2278
2279 * include/freetype/internal/ftcalc.h (NEG_LONG, NEG_INT32),
2280 src/base/ftcalc.c (FT_MOVE_SIGN): Replace negation with a
2281 subtraction.
2282
2283 2017-06-27 Werner Lemberg <wl@gnu.org>
2284
2285 * src/cff/cffparse.c (do_fixed): Fix typo.
2286
2287 Spotted by chris <chris@gcjd.org>.
2288
2289 2017-06-27 Werner Lemberg <wl@gnu.org>
2290
2291 [truetype] Integer overflows.
2292
2293 Reported as
2294
2295 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2384
2296 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2391
2297
2298 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round, FT_DivFix): Use
2299 NEG_LONG.
2300
2301 * src/truetype/ttinterp.c (Ins_SxVTL): Use NEG_LONG.
2302
2303 2017-06-24 Werner Lemberg <wl@gnu.org>
2304
2305 [truetype] Integer overflows.
2306
2307 Reported as
2308
2309 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2364
2310
2311 * src/truetype/ttinterp.c (Ins_ISECT): Use NEG_LONG.
2312
2313 2017-06-22 Werner Lemberg <wl@gnu.org>
2314
2315 [cff, truetype] Integer overflows.
2316
2317 Reported as
2318
2319 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2323
2320 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2328
2321
2322 * src/cff/cf2blues.c (cf2_blues_capture): Use ADD_INT32 and
2323 SUB_INT32.
2324
2325 * src/truetype/ttinterp.c (Ins_SDPVTL): Use SUB_LONG and NEG_LONG.
2326
2327 2017-06-21 Alexei Podtelezhnikov <apodtele@gmail.com>
2328
2329 [sfnt] Synthesize a Unicode charmap if one is missing.
2330
2331 * src/sfnt/ttcmap.h (tt_cmap_unicode_class_rec): Declare it.
2332 * src/sfnt/ttcmap.c (tt_get_glyph_name, tt_cmap_unicode_init,
2333 tt_cmap_unicode_done, tt_cmap_unicode_char_index,
2334 tt_cmap_unicode_char_next, tt_cmap_unicode_class_rec): Implement
2335 synthetic Unicode charmap class.
2336 (tt_get_cmap_info): Make sure the callback is available.
2337
2338 * src/sfnt/sfobjs.c (sfnt_load_face)
2339 [FT_CONFIG_OPTION_POSTSCRIPT_NAMES]: If Unicode charmap is missing,
2340 synthesize one.
2341
2342 * include/freetype/config/ftoption.h: Document it.
2343 * devel/ftoption.h: Ditto.
2344
2345 2017-06-20 Tony Theodore <tonyt@logyst.com>
2346
2347 Fix pkg-config in freetype-config for cross-compiling (#51274).
2348
2349 * builds/unix/unix-def.in (PKG_CONFIG): New variable.
2350 (freetype-config): Use it in sed expression.
2351
2352 * builds/unix/freetype-config.in: s/pkg-config/%PKG_CONFIG%/.
2353
2354 2017-06-20 Werner Lemberg <wl@gnu.org>
2355
2356 [cff, truetype] Integer overflows.
2357
2358 Reported as
2359
2360 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2300
2361 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2313
2362
2363 * src/cff/cf2hints.c (cf2_hintmap_adjustHints): Use ADD_INT32.
2364
2365 * src/truetype/ttinterp.c (Ins_ABS): Avoid FT_ABS.
2366
2367 2017-06-17 Alexei Podtelezhnikov <apodtele@gmail.com>
2368
2369 [base, smooth] LCD filtering cleanups.
2370
2371 * src/base/ftlcdfil.c (ft_lcd_filter_fir, _ft_lcd_filter_legacy):
2372 Clean up, start filtering from the bottom-left origin.
2373
2374 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Updated.
2375
2376 2017-06-16 Werner Lemberg <wl@gnu.org>
2377
2378 [truetype] Integer overflows.
2379
2380 Reported as
2381
2382 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2270
2383 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2276
2384
2385 * src/truetype/ttinterp.c (Ins_MDRP, _iup_worker_interpolate): Use
2386 ADD_LONG and SUB_LONG.
2387
2388 2017-06-15 Werner Lemberg <wl@gnu.org>
2389
2390 [bdf, cff] Integer overflows.
2391
2392 Reported as
2393
2394 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2244
2395 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2261
2396
2397 * src/bdf/bdfdrivr.c (BDF_Face_Init): Replace calls to FT_ABS with
2398 direct code to avoid value negation.
2399
2400 * src/cff/cf2blues.c (cf2_blues_capture): Use SUB_INT32 and
2401 ADD_INT32.
2402
2403 2017-06-13 Werner Lemberg <wl@gnu.org>
2404
2405 * src/winfonts/winfnt.c (FNT_Face_Init): Don't set active encoding.
2406
2407 FreeType only sets a default active encoding for Unicode.
2408
2409 2017-06-13 Werner Lemberg <wl@gnu.org>
2410
2411 [cff, truetype] Integer overflows.
2412
2413 Reported as
2414
2415 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2216
2416 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2218
2417
2418 * src/cff/cf2fixed.h (cf2_fixedAbs): Use NEG_INT32.
2419
2420 * src/truetype/ttinterp.c (Ins_IP): Use SUB_LONG.
2421
2422 2017-06-11 Werner Lemberg <wl@gnu.org>
2423
2424 [cff] Integer overflows.
2425
2426 Reported as
2427
2428 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2200
2429 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2210
2430
2431 * src/cff/cf2hints.c (cf2_hintmap_insertHint): Use SUB_INT32 and
2432 ADD_INT32.
2433
2434 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdVMOVETO>: Use
2435 ADD_INT32.
2436
2437 2017-06-10 Werner Lemberg <wl@gnu.org>
2438
2439 [truetype] Fix TT_Set_Var_Design.
2440
2441 Reported by Nikolaus Waxweiler <madigens@gmail.com>.
2442
2443 * src/truetype/ttgxvar.c (TT_Set_Var_Design): Correctly handle the
2444 case where we have less input coordinates than axes.
2445
2446 2017-06-10 Werner Lemberg <wl@gnu.org>
2447
2448 * src/base/ftcalc.c (FT_DivFix): Fix embarrassing typo.
2449
2450 Bug introduced 2017-05-28.
2451
2452 2017-06-09 Werner Lemberg <wl@gnu.org>
2453
2454 [cff, truetype] Integer overflows.
2455
2456 Reported as
2457
2458 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2144
2459 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2151
2460 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2153
2461 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2173
2462 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2186
2463
2464 * src/cff/cf2blues.c (cf2_blues_init): Use SUB_INT32.
2465
2466 * src/truetype/ttinterp.c (Round_None, Round_To_Grid,
2467 Round_To_Half_Grid, Round_Down_To_Grid, Round_Up_To_Grid,
2468 Round_To_Double_Grid, Round_Super, Round_Super_45): Use ADD_LONG,
2469 SUB_LONG, NEG_LONG, FT_PIX_ROUND_LONG, FT_PIX_CEIL_LONG,
2470 FT_PAD_ROUND_LONG
2471 (Ins_SxVTL, Ins_MIRP): Use SUB_LONG.
2472 (_iup_worker_shift): Use SUB_LONG and ADD_LONG.
2473
2474 2017-06-09 Werner Lemberg <wl@gnu.org>
2475
2476 Provide more macros for flooring, ceiling, and rounding.
2477
2478 These versions don't produce run-time errors due to integer
2479 overflow.
2480
2481 * include/freetype/internal/ftobjs.h: Include FT_INTERNAL_CALC_H.
2482 (FT_PAD_ROUND_LONG, FT_PAD_CEIL_LONG, FT_PIX_ROUND_LONG,
2483 FT_PIX_CEIL_LONG): New macros.
2484 (FT_PAD_ROUND_INT32, FT_PAD_CEIL_INT32, FT_PIX_ROUND_INT32,
2485 FT_PIX_CEIL_INT32): New macros.
2486
2487 2017-06-09 Werner Lemberg <wl@gnu.org>
2488
2489 Remove unused macros.
2490
2491 * include/freetype/internal/ftcalc.h (ADD_INT, SUB_INT, MUL_INT,
2492 NEG_INT): Deleted.
2493
2494 2017-06-09 Werner Lemberg <wl@gnu.org>
2495
2496 */*: Remove `OVERFLOW_' prefix.
2497
2498 This increases readability.
2499
2500 2017-06-07 Werner Lemberg <wl@gnu.org>
2501
2502 [cff, truetype] Integer overflows.
2503
2504 Reported as
2505
2506 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2133
2507 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2137
2508
2509 * src/cff/cf2hints.c (cf2_hint_init): Use OVERFLOW_SUB_INT32.
2510
2511 * src/truetype/ttinterp.c (PROJECT, DUALPROJ): Use
2512 OVERFLOW_SUB_LONG.
2513
2514 2017-06-06 Werner Lemberg <wl@gnu.org>
2515
2516 [cff] Integer overflows.
2517
2518 Reported as
2519
2520 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2109
2521 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2110
2522 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2122
2523
2524 * src/cff/cf2blues.c (cf2_blues_init): Use OVERFLOW_SUB_INT32.
2525
2526 * src/cff/cf2hints.c (cf2_hintmap_map): Synchronize if-else
2527 branches.
2528
2529 2017-06-05 Werner Lemberg <wl@gnu.org>
2530
2531 [cff] Integer overflow.
2532
2533 Reported as
2534
2535 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2089
2536
2537 * src/cff/cffload.c (cff_blend_doBlend): User OVERFLOW_ADD_INT32.
2538
2539 2017-06-04 Werner Lemberg <wl@gnu.org>
2540
2541 [cff, truetype] Integer overflows.
2542
2543 Reported as
2544
2545 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2075
2546 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2088
2547
2548 * src/cff/cf2font.c (cf2_font_setup): Use OVERFLOW_MUL_INT32.
2549
2550 * src/truetype/ttinterp.c (Ins_ISECT): Use OVERFLOW_MUL_LONG,
2551 OVERFLOW_ADD_LONG, and OVERFLOW_SUB_LONG.
2552
2553 2017-06-03 Werner Lemberg <wl@gnu.org>
2554
2555 [base, cff, truetype] Integer overflows.
2556
2557 Reported as
2558
2559 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2060
2560 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2062
2561 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2063
2562 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2068
2563
2564 * src/base/ftobjs.c (ft_glyphslot_grid_fit_metrics): Use
2565 OVERFLOW_ADD_LONG and OVERFLOW_SUB_LONG.
2566
2567 * src/cff/cf2blues.c (cf2_blues_capture), src/cff/cf2hints.c
2568 (cf2_hintmap_adjustHints): Use OVERFLOW_SUB_INT32.
2569
2570 * src/truetype/ttgload.c (compute_glyph_metrics): User
2571 OVERFLOW_SUB_LONG.
2572
2573 * src/truetype/ttinterp.c (Direct_Move, Direct_Move_Orig,
2574 Direct_Move_X, Direct_Move_Y, Direct_Move_Orig_X,
2575 Direct_Move_Orig_Y, Move_Zp2_Point, Ins_MSIRP): Use
2576 OVERFLOW_ADD_LONG and OVERFLOW_SUB_LONG.
2577
2578 2017-06-03 Werner Lemberg <wl@gnu.org>
2579
2580 * builds/unix/freetype-config.in: Fix pkg-config test (#51162).
2581
2582 Patch directly taken from bug report.
2583
2584 2017-06-03 Werner Lemberg <wl@gnu.org>
2585
2586 [bdf] Synchronize sanity checks with pcf driver.
2587
2588 Reported as
2589
2590 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2054
2591 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2058
2592
2593 * src/bdf/bdfdrivr.c (BDF_Face_Init): Check font ascent and descent.
2594 Check AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE, RESOLUTION_X, and
2595 RESOLUTION_Y properties.
2596
2597 2017-06-03 Werner Lemberg <wl@gnu.org>
2598
2599 [cff, truetype] Integer overflows.
2600
2601 Reported as
2602
2603 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2047
2604 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2057
2605
2606 * src/cff/cf2hints.c (cf2_hintmap_map): Use OVERFLOW_SUB_INT32.
2607
2608 * src/truetype/ttinterp.c (Ins_ADD): Use OVERFLOW_ADD_LONG.
2609 (Ins_SUB): Use OVERFLOW_SUB_LONG.
2610 (Ins_NEG): Use NEG_LONG.
2611
2612 2017-06-03 Werner Lemberg <wl@gnu.org>
2613
2614 ftcalc.h: Avoid left-shift of negative numbers.
2615
2616 Reported as
2617
2618 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2055
2619
2620 * include/freetype/internal/ftcalc.h (INT_TO_F26DOT6,
2621 INT_TO_F2DOT14, INT_TO_FIXED, F2DOT14_TO_FIXED): Use multiplication.
2622
2623 2017-06-02 Werner Lemberg <wl@gnu.org>
2624
2625 [cff] Even more integer overflows.
2626
2627 Reported as
2628
2629 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2046
2630
2631 * src/cff/cf2intrp.c (cf2_doStems, cf2_interpT2CharString): Use
2632 OVERFLOW_ADD_INT32.
2633
2634 2017-06-02 Werner Lemberg <wl@gnu.org>
2635
2636 [cff] More integer overflows.
2637
2638 Reported as
2639
2640 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2032
2641
2642 * src/cff/cf2blues.c (cf2_blues_init): Use OVERFLOW_SUB_INT32.
2643
2644 2017-06-02 Werner Lemberg <wl@gnu.org>
2645
2646 [bdf] Don't left-shift negative numbers.
2647
2648 Reported as
2649
2650 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2031
2651
2652 * src/bdf/bdfdrivr.c (BDF_Face_Init): Use multiplication.
2653
2654 2017-06-02 Werner Lemberg <wl@gnu.org>
2655
2656 [bdf] Fix integer scanning routines.
2657
2658 Reported as
2659
2660 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2029
2661
2662 * src/bdf/bdflib.c (_bdf_atoul, _bdf_atol, _bdf_atous, _bdf_atos):
2663 Stop scanning if result would overflow.
2664
2665 2017-06-02 Werner Lemberg <wl@gnu.org>
2666
2667 [cff] Fix integer overflows.
2668
2669 Reported as
2670
2671 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2027
2672 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2028
2673
2674 * src/cff/cf2hints.c (cf2_hintmap_insertHint), src/cff/cf2intrp.c
2675 (cf2_doFlex): Use OVERFLOW_ADD_INT32 and OVERFLOW_SUB_INT32.
2676
2677 2017-06-01 Werner Lemberg <wl@gnu.org>
2678
2679 [smooth] Some 32bit integer overflow run-time errors.
2680
2681 * src/smooth/ftgrays.c [STANDALONE] (OVERFLOW_ADD_LONG,
2682 OVERFLOW_SUB_LONG, OVERFLOW_MUL_LONG, NEG_LONG): New macros.
2683 [!STANDALONE]: Include FT_INTERNAL_CALC_H.
2684 (gray_render_cubic): Use those macros where appropriate.
2685
2686 2017-06-01 Werner Lemberg <wl@gnu.org>
2687
2688 * src/base/ftglyph.c (FT_Get_Glyph): Check `slot->advance'.
2689
2690 2017-06-01 Werner Lemberg <wl@gnu.org>
2691
2692 [psaux] 32bit integer overflow tun-time errors (#46149).
2693
2694 * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Use
2695 OVERFLOW_ADD_LONG and OVERFLOW_SUB_LONG where appropriate.
2696
2697 2017-06-01 Werner Lemberg <wl@gnu.org>
2698
2699 * src/truetype/ttinterp.c (TT_RunIns): Adjust loop counter again.
2700
2701 Problem reported by Marek Kašík <mkasik@redhat.com>.
2702
2703 The problematic font that exceeds the old limit is Padauk-Bold,
2704 version 3.002, containing bytecode generated by a buggy version of
2705 ttfautohint.
2706
2707 2017-05-31 Werner Lemberg <wl@gnu.org>
2708
2709 [cff] 32bit integer overflow run-time errors 2/2 (#46149).
2710
2711 This commit handles the new engine.
2712
2713 * include/freetype/internal/ftcalc.h (OVERFLOW_ADD_INT32,
2714 OVERFLOW_SUB_INT32, OVERFLOW_MUL_INT32, NEG_INT, NEG_LONG,
2715 NEG_INT32): New macros.
2716
2717 * src/cff/cf2ft.c (cf2_getScaleAndHintFlag): Use OVERFLOW_ADD_INT32.
2718
2719 * src/cff/cf2hints.c (cf2_getWindingMomentum, cf2_hint_init,
2720 cf2_hintmap_map, cf2_glyphpath_hintPoint,
2721 cf2_glyphpath_computeIntersection, cf2_glyphpath_computeOffset,
2722 cf2_glyphpath_lineTo, cf2_glyphpath_curveTo): Use
2723 OVERFLOW_ADD_INT32, OVERFLOW_SUB_INT32, OVERFLOW_MUL_INT32, and
2724 NEG_INT32 where appropriate.
2725
2726 * src/cff/cf2intrp.c (cf2_doFlex, cf2_doBlend,
2727 cf2_interpT2CharString): Ditto.
2728 Also add some other code where needed to avoid overflow.
2729
2730 2017-05-30 Werner Lemberg <wl@gnu.org>
2731
2732 [cff] 32bit integer overflow run-time errors 1/2 (#46149).
2733
2734 This commit handles the old engine.
2735
2736 * src/cff/cffgload.c: Include FT_INTERNAL_CALC_H.
2737 (cff_decoder_parse_charstrings): Use OVERFLOW_ADD_LONG and
2738 OVERFLOW_SUB_LONG where needed.
2739
2740 * src/cff/cffparse.c: Include FT_INTERNAL_CALC_H.
2741 (power_ten_limits): New static array.
2742 (do_fixed): Use it to prevent multiplication overflow.
2743 (cff_parser_run): Use OVERFLOW_ADD_LONG.
2744
2745 2017-05-30 Werner Lemberg <wl@gnu.org>
2746
2747 [psaux] Correctly handle sequences of multiple number signs.
2748
2749 * src/psaux/psconv.c (PS_Conv_Strtol, PS_Conv_ToFixed): Return zero
2750 if we encounter more than a single sign.
2751
2752 2017-05-29 Werner Lemberg <wl@gnu.org>
2753
2754 [pcf] 32bit integer overflow run-time errors (#46149).
2755
2756 * src/pcf/pcfread.c (pcf_get_accel): Add sanity checks for
2757 `fontAscent' and `fontDescent'.
2758 (pcf_load_font): Add sanity checks for global height.
2759 Add sanity checks for AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE,
2760 RESOLUTION_X, and RESOLUTION_Y properties.
2761
2762 2017-05-29 Werner Lemberg <wl@gnu.org>
2763
2764 Handle some integer overflow run-time errors (#46149, #48979).
2765
2766 This commit (mainly for 32bit CPUs) is the first of a series of
2767 similar commits to handle known integer overflows. Basically, all
2768 of them are harmless, since they affect rendering of glyphs only,
2769 not posing security threats. It is expected that fuzzying will show
2770 up more overflows, to be fixed in due course.
2771
2772 The idea is to mark places where overflows can occur, using macros
2773 that simply cast to unsigned integers, because overflow arithmetic
2774 is well defined in this case. Doing so suppresses run-time errors
2775 of sanitizers without adding computational overhead.
2776
2777 * include/freetype/internal/ftcalc.h (OVERFLOW_ADD_INT,
2778 OVERFLOW_SUB_INT, OVERFLOW_MUL_INT, OVERFLOW_ADD_LONG,
2779 OVERFLOW_SUB_LONG, OVERFLOW_MUL_LONG): New macros.
2780
2781 * src/base/ftcalc.c (FT_RoundFix, FT_CeilFix, FT_Matrix_Multiply,
2782 FT_Matrix_Multiply_Scaled, FT_Vector_Transform_Scaled,
2783 ft_corner_orientation): Use new macros.
2784
2785 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Use new macros.
2786
2787 2017-05-28 Werner Lemberg <wl@gnu.org>
2788
2789 * include/freetype/internal/ftcalc.h (FLOAT_TO_FIXED): Remove.
2790
2791 This macro is not used.
2792
2793 2017-05-28 Werner Lemberg <wl@gnu.org>
2794
2795 [cff] s/cf2_floatToFixed/cf2_doubleToFixed/.
2796
2797 The new name better describes what the macro actually does;
2798 additionally, we don't need a trailing `f' for literals (there was
2799 only a single such instance in the code, but this caused a clang
2800 warning because the macro itself uses `double' literals).
2801
2802 * src/cff/cf2blues.c, src/cff/cf2blues.h, src/cff/cf2fixed.h,
2803 src/cff/cf2font.c, src/cff/cf2hints.c: Updated.
2804
2805 2017-05-28 Werner Lemberg <wl@gnu.org>
2806
2807 Fix negation of INT_MIN and LONG_MIN (#46149).
2808
2809 * src/base/ftcalc.c (FT_MOVE_SIGN): Add argument to pass unsigned
2810 value, to be used as the result.
2811 (FT_MulDiv, FT_MulDiv_No_Round, FT_DivFix, FT_MulFix,
2812 FT_Vector_NormLen): Updated.
2813
2814 2017-05-27 Werner Lemberg <wl@gnu.org>
2815
2816 [truetype] Fix handling of design coordinates (#51127).
2817
2818 * src/truetype/ttgxvar.c (tt_set_mm_blend): Compute all design
2819 coordinates if we have to create the `blends->coord' array.
2820 (TT_Get_MM_Blend, TT_Get_Var_Design): Select default instance
2821 coordinates if no instance is selected yet.
2822
2823 2017-05-24 Werner Lemberg <wl@gnu.org>
2824
2825 [bdf, pcf] Support ISO646.1991-IRV character encoding (aka ASCII).
2826
2827 Problem reported by Marek Kašík <mkasik@redhat.com>, cf.
2828
2829 https://bugzilla.redhat.com/show_bug.cgi?id=1451795
2830
2831 * src/bdf/bdfdrivr.c (BDF_Face_Init), src/pcf/pcfdrivr.c
2832 (PCF_Face_Init): Implement it.
2833
2834 2017-05-20 Nikolaus Waxweiler <madigens@gmail.com>
2835
2836 [truetype] Always use interpreter v35 for B/W rendering (#51051).
2837
2838 * src/truetype/ttgload.c (tt_loader_init)
2839 [TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL]: Adjust
2840 `subpixel_hinting_lean', `grayscale_cleartype', and
2841 `vertical_lcd_lean' accordingly.
2842
2843 * src/truetype/ttinterp.c (Ins_GETINFO): Updated.
2844 (TT_RunIns): Update `backward_compatibility' flag.
2845
2846 2017-05-20 Alexei Podtelezhnikov <apodtele@gmail.com>
2847
2848 [smooth] Implement minimal dynamic padding for LCD filtering.
2849
2850 Extra bitmap padding for LCD filtering depends on the filter. The
2851 default 5-tap filter needs 2 extra subpixels. The light 3-tap filter
2852 needs only 1 extra subpixel. This space could be already available
2853 due to rounding. In order to optimize the padding, we now expand
2854 CBox for the given filter weights before rounding.
2855
2856 This change breaks current Skia (and Firefox).
2857
2858 * include/freetype/internal/ftobjs.h (FT_LibraryRec)
2859 [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Remove `lcd_extra' field.
2860
2861 * src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights,
2862 FT_Library_SetLcdFilter): Remove `lcd_extra' initializations.
2863
2864 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Implement dymanic
2865 LCD padding.
2866
2867 2017-05-15 Werner Lemberg <wl@gnu.org>
2868
2869 [sfnt] Return proper scaling values for SBIX bitmaps.
2870
2871 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
2872
2873 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Implement it.
2874
2875 2017-05-15 Werner Lemberg <wl@gnu.org>
2876
2877 [truetype] Fix error handling for embedded bitmaps.
2878
2879 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
2880
2881 * src/truetype/ttgload.c (TT_Load_Glyph)
2882 [TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: Handle error if font is not
2883 scalable.
2884
2885 2017-05-15 Alexei Podtelezhnikov <apodtele@gmail.com>
2886
2887 [autofit] Make autohint warping NORMAL option.
2888
2889 This moves warping option from LIGHT to NORMAL mode. This makes LIGHT
2890 truly void of hinting in x-direction, with left side bearing never
2891 changed and right side bearing only altered by advance rounding.
2892 Therefore, LIGHT is now ready to return fractional advance. As a
2893 NORMAL option, warping substitutes normal hinting.
2894
2895 * src/autofit/afcjk.c (af_cjk_hints_apply): Updated.
2896 * src/autofit/aflatin.c (af_latin_hints_apply): Updated.
2897 * src/autofit/aflatin2.c (af_latin2_hints_apply): Updated.
2898
2899 * src/autofit/afloader.c (af_loader_load_glyph): Handle warping
2900 phantom points as normal.
2901
2902 2017-05-14 Werner Lemberg <wl@gnu.org>
2903
2904 Remove remnants of raster pool.
2905
2906 * include/freetype/internal/ftobjs.h (FT_LibraryRec): Remove
2907 `raster_pool' and `raster_pool_size' fields.
2908
2909 * src/base/ftobjs.c (FT_New_Library), src/raster/ftrend1.c
2910 (ft_raster1_init), src/smooth/ftsmooth.c (ft_smooth_init): Updated.
2911
2912 2017-05-13 Werner Lemberg <wl@gnu.org>
2913
2914 * Version 2.8 released.
2915 =======================
2916
2917
2918 Tag sources with `VER-2-8'.
2919
2920 * docs/VERSION.TXT: Add entry for version 2.8.
2921 * docs/CHANGES: Updated.
2922
2923 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
2924 builds/windows/vc2005/index.html,
2925 builds/windows/vc2008/freetype.vcproj,
2926 builds/windows/vc2008/index.html,
2927 builds/windows/vc2010/freetype.vcxproj,
2928 builds/windows/vc2010/index.html,
2929 builds/windows/visualc/freetype.dsp,
2930 builds/windows/visualc/freetype.vcproj,
2931 builds/windows/visualc/index.html,
2932 builds/windows/visualce/freetype.dsp,
2933 builds/windows/visualce/freetype.vcproj,
2934 builds/windows/visualce/index.html,
2935 builds/wince/vc2005-ce/freetype.vcproj,
2936 builds/wince/vc2005-ce/index.html,
2937 builds/wince/vc2008-ce/freetype.vcproj,
2938 builds/wince/vc2008-ce/index.html: s/2.7.1/2.8/, s/271/28/.
2939
2940 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 8.
2941 (FREETYPE_PATCH): Set to 0.
2942
2943 * builds/unix/configure.raw (version_info): Set to 20:0:14.
2944 * CMakeLists.txt (VERSION_MINOR): Set to 8.
2945 (VERSION_PATCH): Set to 0.
2946
2947 2017-05-12 Hin-Tak Leung <htl10@users.sourceforge.net>
2948
2949 Fix `FT_UINT_TO_POINTER' macro for Windows.
2950
2951 * builds/unix/ftconfig.in, builds/vms/ftconfig.h,
2952 include/freetype/config/ftconfig.h (FT_UINT_TO_POINTER) [_WIN64]:
2953 Fix definition.
2954
2955 2017-05-11 Sascha Brawer <sascha@google.com>
2956 Werner Lemberg <wl@gnu.org
2957
2958 [autofit] Add support for Chakma script.
2959
2960 * src/autofit/afblue.dat: Add blue zone data for Chakma.
2961 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2962
2963 * src/autofit/afscript.h: Add Chakma standard character.
2964
2965 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Chakma data.
2966
2967 2017-05-10 Sascha Brawer <sascha@google.com>
2968 Werner Lemberg <wl@gnu.org
2969
2970 [autofit] Add support for Kayah Li script.
2971
2972 * src/autofit/afblue.dat: Add blue zone data for Kayah Li.
2973 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2974
2975 * src/autofit/afscript.h: Add Kayah Li standard character.
2976
2977 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Kayah Li data.
2978
2979 2017-05-10 Sascha Brawer <sascha@google.com>
2980 Werner Lemberg <wl@gnu.org
2981
2982 [autofit] Add support for Bamum script.
2983
2984 * src/autofit/afblue.dat: Add blue zone data for Bamum.
2985 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2986
2987 * src/autofit/afscript.h: Add Bamum standard character.
2988
2989 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Bamum data.
2990
2991 2017-05-10 Sascha Brawer <sascha@google.com>
2992 Werner Lemberg <wl@gnu.org
2993
2994 [autofit] Add support for Saurashtra script.
2995
2996 * src/autofit/afblue.dat: Add blue zone data for Saurashtra.
2997 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2998
2999 * src/autofit/afscript.h: Add Saurashtra standard character.
3000
3001 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Saurashtra
3002 data.
3003
3004 2017-05-10 Sascha Brawer <sascha@google.com>
3005 Werner Lemberg <wl@gnu.org
3006
3007 [autofit] Add support for Buhid script.
3008
3009 * src/autofit/afblue.dat: Add blue zone data for Buhid.
3010 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3011
3012 * src/autofit/afscript.h: Add Buhid standard character.
3013
3014 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Buhid data.
3015
3016 2017-05-08 Sascha Brawer <sascha@google.com>
3017 Werner Lemberg <wl@gnu.org
3018
3019 [autofit] Add support for Shavian script.
3020
3021 * src/autofit/afblue.dat: Add blue zone data for Shavian.
3022 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3023
3024 * src/autofit/afscript.h: Add Shavian standard character.
3025
3026 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Shavian data.
3027
3028 2017-05-08 Sascha Brawer <sascha@google.com>
3029 Werner Lemberg <wl@gnu.org
3030
3031 [autofit] Add support for Vai script.
3032
3033 * src/autofit/afblue.dat: Add blue zone data for Vai.
3034 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3035
3036 * src/autofit/afscript.h: Add Vai standard character.
3037
3038 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Vai data.
3039
3040 2017-05-08 Sascha Brawer <sascha@google.com>
3041 Werner Lemberg <wl@gnu.org
3042
3043 [autofit] Add support for Osmanya script.
3044
3045 * src/autofit/afblue.dat: Add blue zone data for Osmanya.
3046 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3047
3048 * src/autofit/afscript.h: Add Osmanya standard character.
3049
3050 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Osmanya data.
3051
3052 2017-05-08 Sascha Brawer <sascha@google.com>
3053 Werner Lemberg <wl@gnu.org
3054
3055 [autofit] Add support for Coptic script.
3056
3057 * src/autofit/afblue.dat: Add blue zone data for Coptic.
3058 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3059
3060 * src/autofit/afscript.h: Add Coptic standard character.
3061
3062 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Coptic data.
3063
3064 2017-05-08 Sascha Brawer <sascha@google.com>
3065 Werner Lemberg <wl@gnu.org
3066
3067 [autofit] Add support for Carian script.
3068
3069 * src/autofit/afblue.dat: Add blue zone data for Carian.
3070 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3071
3072 * src/autofit/afscript.h: Add Carian standard character.
3073
3074 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Carian data.
3075
3076 2017-05-07 Werner Lemberg <wl@gnu.org>
3077
3078 [truetype] Add tricky font `DFGirl-W6-WIN-BF' (from Dynalab).
3079
3080 Reported by Roy Tam <roytam@gmail.com>.
3081
3082 * src/truetype/ttobjs.c (tt_check_trickyness_family): Implement it.
3083
3084 2017-05-07 Roy Tam <roytam@gmail.com>
3085 Werner Lemberg <wl@gnu.org>
3086
3087 [truetype] More tricky fonts (mainly from Dynalab).
3088
3089 * src/truetype/ttobjs.c (tt_check_trickyness_family,
3090 tt_check_trickyness_sfnt_ids): Add them.
3091
3092 2017-05-07 Werner Lemberg <wl@gnu.org>
3093
3094 [truetype] Add tricky font `DLCHayMedium' (from Dynalab).
3095
3096 Reported by Roy Tam <roytam@gmail.com>.
3097
3098 * src/truetype/ttobjs.c (tt_check_trickyness_family): Implement it.
3099
3100 2017-05-03 Werner Lemberg <wl@gnu.org>
3101
3102 */*: s/backwards compatibility/backward compatibility/.
3103
3104 2017-05-03 Sascha Brawer <sascha@google.com>
3105 Werner Lemberg <wl@gnu.org
3106
3107 [autofit] Add support for Unified Canadian Syllabics script.
3108
3109 * src/autofit/afblue.dat: Add blue zone data for Unified Canadian
3110 Syllabics.
3111 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3112
3113 * src/autofit/afscript.h: Add Unified Canadian Syllabics standard
3114 character.
3115
3116 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Unified
3117 Canadian Syllabics data.
3118
3119 2017-05-03 Sascha Brawer <sascha@google.com>
3120 Werner Lemberg <wl@gnu.org>
3121
3122 [autofit] Add blue-zone support for Sundanese script.
3123
3124 This essentially moves the Sundanese script from the `Indic' hinter
3125 to the `Latin' hinter.
3126
3127 * src/autofit/afblue.dat: Add blue zone data for Sundanese.
3128
3129 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3130
3131 * src/autofit/afscript.h: Add Sundanese standard character and move
3132 data out of AF_CONFIG_OPTION_INDIC block.
3133
3134 * src/autofit/afranges.c: Move Sundanese data out of
3135 AF_CONFIG_OPTION_INDIC block.
3136
3137 * src/autofit/afstyles.h: Update Sundanese data; in particular, use
3138 AF_WRITING_SYSTEM_LATIN.
3139
3140 2017-05-03 Sascha Brawer <sascha@google.com>
3141 Werner Lemberg <wl@gnu.org
3142
3143 [autofit] Add support for Avestan script.
3144
3145 * src/autofit/afblue.dat: Add blue zone data for Avestan.
3146 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3147
3148 * src/autofit/afscript.h: Add Avestan standard character.
3149
3150 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Avestan data.
3151
3152 2017-05-02 Behdad Esfahbod <behdad@behdad.org>
3153
3154 [truetype] Make `IUP' gvar deltas do the same as Apple (#50832).
3155
3156 When points are not touched by gvar interpolation deltas, FreeType
3157 gave a slightly different result than Apple's CoreText.
3158
3159 The OpenType working group will update the specification to document
3160 the following behaviour: If the two points with deltas to the `left'
3161 and `right' of the untouched point have the same coordinate, then
3162 the inferred delta for the untouched point should be zero.
3163
3164 * src/truetype/ttgxvar.c (tt_delta_interpolate): Implement new
3165 behaviour.
3166
3167 2017-05-02 Werner Lemberg <wl@gnu.org>
3168
3169 [autofit] Remove `slight' auto-hint mode again.
3170
3171 A poll on freetype-devel favoured changes directly applied to
3172 `light'.
3173
3174 * include/freetype/freetype.h (FT_LOAD_TARGET_SLIGHT,
3175 FT_RENDER_MODE_SLIGHT): Removed.
3176
3177 * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c
3178 (af_latin_hints_init), src/autofit/aflatin2.c
3179 (af_latin2_hints_init): Revert change from 2017-04-22.
3180
3181 * src/autofit/afloader.c (af_loader_load_glyph) Remove references to
3182 FT_RENDER_MODE_SLIGHT.
3183 [AF_CONFIG_OPTION_TT_SIZE_METRICS]: Enable TrueType-like metrics
3184 unconditionally.
3185
3186 * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Revert change from
3187 2017-04-22.
3188
3189 * src/base/ftobjs.c (FT_Load_Glyph): Revert change from 2017-04-22.
3190
3191 * src/pshinter/pshalgo.c (ps_hints_apply): Revert change from
3192 2017-04-22.
3193
3194 * src/smooth/ftsmooth.c (ft_smooth_render): Revert change from
3195 2017-04-22.
3196
3197 * docs/CHANGES: Updated.
3198
3199 2017-04-30 Werner Lemberg <wl@gnu.org>
3200
3201 [autofit] Fix metrics computation.
3202
3203 Problem reported by Markus Trippelsdorf <markus@trippelsdorf.de> and
3204 Nikolaus Waxweiler <madigens@gmail.com>.
3205
3206 * src/base/ftobjs.c (FT_Request_Size): Trigger recomputation of
3207 auto-hinter metrics. Without this change, multiple size changing
3208 calls for a single face fail.
3209
3210 2017-04-29 Werner Lemberg <wl@gnu.org>
3211
3212 * src/truetype/ttdriver.c (tt_size_request): Properly check `error'.
3213
3214 Reported by Earnestly <zibeon@googlemail.com> in
3215
3216 https://lists.nongnu.org/archive/html/freetype/2017-04/msg00031.html
3217
3218 2017-04-27 Werner Lemberg <wl@gnu.org>
3219
3220 Introduce AF_CONFIG_OPTION_TT_SIZE_METRICS configuration option.
3221
3222 * include/freetype/config/ftoption.h
3223 (AF_CONFIG_OPTION_TT_SIZE_METRICS): New option, commented out by
3224 default.
3225
3226 * src/autofit/afloader.c (af_loader_load_glyph): Use
3227 AF_CONFIG_OPTION_TT_SIZE_METRICS to guard the corresponding code.
3228
3229 2017-04-26 Werner Lemberg <wl@gnu.org>
3230
3231 * include/freetype/freetype.h (FT_Render_Mode): Fix order.
3232
3233 This retains backward compatibility.
3234
3235 Noted by Alexei.
3236
3237 2017-04-22 Werner Lemberg <wl@gnu.org>
3238
3239 [truetype] Do linear scaling for FT_LOAD_NO_HINTING (#50470).
3240
3241 * src/truetype/ttobjs.h (TT_SizeRec): Add field `hinted_metrics' to
3242 hold hinted metrics.
3243 Make `metrics' a pointer so that `tt_glyph_load' can easily switch
3244 between metrics.
3245
3246 * src/truetype/ttdriver.c (tt_size_request): Updated.
3247 (tt_glyph_load): Use top-level metrics if FT_LOAD_NO_HINTING is
3248 used.
3249
3250 * src/truetype/ttgload.c (TT_Hint_Glyph, TT_Process_Simple_Glyph,
3251 TT_Process_Composite_Component, load_truetype_glyph,
3252 compute_glyph_metrics, TT_Load_Glyph): Updated.
3253
3254 * src/truetype/ttinterp.c (TT_Load_Context): Updated.
3255
3256 * src/truetype/ttobjs.c (tt_size_reset): Updated.
3257
3258 * src/truetype/ttsubpix.c (sph_set_tweaks): Updated.
3259
3260 2017-04-22 Werner Lemberg <wl@gnu.org>
3261
3262 Add new `slight' auto-hinting mode.
3263
3264 This mode uses fractional advance widths and doesn't scale glyphs
3265 horizontally, only applying vertical scaling and hinting.
3266
3267 At the same time, the behaviour of the `light' auto-hinter gets
3268 restored for backward compatibility: Both vertical and horizontal
3269 scaling is again based on rounded metrics values (this was changed
3270 in a commit from 2017-03-30 as a side effect). To be more precise,
3271 the behaviour is restored for TrueType fonts only; for other font
3272 formats like Type 1, this is a new feature of the `light' hinting
3273 mode.
3274
3275 * include/freetype/freetype.h (FT_LOAD_TARGET_SLIGHT): New macro.
3276 (FT_RENDER_MODE_SLIGHT): New render mode.
3277
3278 * include/freetype/internal/ftobjs.h (FT_Size_InternalRec): Add
3279 `autohint_mode' and `autohint_metrics' fields.
3280
3281 * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c
3282 (af_latin_hints_init), src/autofit/aflatin2 (af_latin2_hints_init):
3283 Updated.
3284
3285 * src/autofit/afloader.c (af_loader_embolden_glyph_in_slot): Use
3286 `autohint_metrics'.
3287 (af_loader_load_glyph): s/internal/slot_internal/.
3288 Initialize `autohint_metrics' and `autohint_mode' depending on
3289 current auto-hint mode.
3290 Use `autohint_metrics'.
3291 Updated.
3292
3293 * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Updated.
3294
3295 * src/base/ftobjs.c (FT_Load_Glyph): Updated.
3296 (FT_New_Size): Allocate `internal' object.
3297
3298 * src/pshinter/pshalgo.c (ps_hints_apply): Updated.
3299
3300 * src/smooth/ftsmooth.c (ft_smooth_render): Updated.
3301
3302 2017-04-22 Werner Lemberg <wl@gnu.org>
3303
3304 Introduce `FT_Size_InternalRec' structure.
3305
3306 We are going to extend this later on.
3307
3308 * include/freetype/internal/ftobjs.h (FT_Size_InternalRec): New
3309 structure with a single field `module_data'.
3310
3311 * src/base/ftobjs.c (FT_New_Size): Allocate `internal' field of
3312 `FT_Size' structure.
3313
3314 * src/cff/cffgload.c (cff_builder_init, cff_decoder_prepare): Use
3315 `size->internal->module_data' instead of `size->internal'.
3316
3317 * src/cff/cffobjs.c (cff_size_done): Deallocate `module_data'.
3318 (cff_size_init, cff_size_select, cff_size_request): Use
3319 `size->internal->module_data' instead of `size->internal'.
3320
3321 * src/cif/cidobjs.c (cid_size_done, cid_size_init,
3322 cid_size_request): Use `size->internal->module_data' instead of
3323 `size->internal'.
3324
3325 * src/psaux/psobjs.c (t1_builder_ini): Use
3326 `size->internal->module_data' instead of `size->internal'.
3327
3328 * src/type1/t1objs.c (T1_Size_Done, T1_Size_Init, T1_Size_Request):
3329 Use `size->internal->module_data' instead of `size->internal'.
3330
3331 2017-04-21 Alexei Podtelezhnikov <apodtele@gmail.com>
3332
3333 * src/smooth/ftsmooth.h: Remove unused guards and declaration.
3334
3335 2017-04-16 Hin-Tak Leung <htl10@users.sourceforge.net>
3336
3337 Fix tracing messages.
3338
3339 * src/base/ftobjs.c (FT_Face_GetCharVariantIndex,
3340 FT_Face_GetCharVariantIsDefault, FT_Face_GetVariantsOfChar): Print
3341 correct function name.
3342
3343 2017-04-08 Sascha Brawer <sascha@google.com>
3344 Werner Lemberg <wl@gnu.org
3345
3346 [autofit] Add support for Old Turkic script.
3347
3348 * src/autofit/afblue.dat: Add blue zone data for Old Turkic.
3349 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3350
3351 * src/autofit/afscript.h: Add Old Turkic standard characters.
3352
3353 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Old Turkic data.
3354
3355 2017-04-08 Sascha Brawer <sascha@google.com>
3356 Werner Lemberg <wl@gnu.org
3357
3358 [autofit] Add support for Gothic script.
3359
3360 * src/autofit/afblue.dat: Add blue zone data for Gothic.
3361 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3362
3363 * src/autofit/afscript.h: Add Gothic standard characters.
3364
3365 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Gothic data.
3366
3367 2017-04-08 Sascha Brawer <sascha@google.com>
3368 Werner Lemberg <wl@gnu.org
3369
3370 [autofit] Add support for Cypriot script.
3371
3372 * src/autofit/afblue.dat: Add blue zone data for Cypriot.
3373 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3374
3375 * src/autofit/afscript.h: Add Cypriot standard characters.
3376
3377 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Cypriot data.
3378
3379 2017-04-08 Sascha Brawer <sascha@google.com>
3380 Werner Lemberg <wl@gnu.org
3381
3382 [autofit] Add support for Deseret script.
3383
3384 * src/autofit/afblue.dat: Add blue zone data for Deseret.
3385 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3386
3387 * src/autofit/afscript.h: Add Deseret standard characters.
3388
3389 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Deseret data.
3390
3391 2017-04-07 Werner Lemberg <wl@gnu.org>
3392
3393 [autofit] Fix invalid character range description (#50745).
3394
3395 Also reported as
3396
3397 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1034
3398
3399 * src/autofit/afranges.c (af_glag_nonbase_uniranges): Fix typo in
3400 recent commit.
3401
3402 2017-04-07 Werner Lemberg <wl@gnu.org>
3403
3404 [ftfuzzer] Fix clang warnings.
3405
3406 * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Add
3407 casts.
3408
3409 2017-04-06 Sascha Brawer <sascha@google.com>
3410 Werner Lemberg <wl@gnu.org
3411
3412 [autofit] Add support for Lisu script.
3413
3414 * src/autofit/afblue.dat: Add blue zone data for Lisu.
3415 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3416
3417 * src/autofit/afscript.h: Add Lisu standard characters.
3418
3419 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Lisu data.
3420
3421 2017-04-06 Sascha Brawer <sascha@google.com>
3422 Werner Lemberg <wl@gnu.org
3423
3424 [autofit] Add support for Osage script.
3425
3426 * src/autofit/afblue.dat: Add blue zone data for Osage.
3427 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3428
3429 * src/autofit/afscript.h: Add Osage standard characters.
3430
3431 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Osage data.
3432
3433 2017-04-06 Sascha Brawer <sascha@google.com>
3434 Werner Lemberg <wl@gnu.org
3435
3436 [autofit] Add support for Glagolitic script.
3437
3438 * src/autofit/afblue.dat: Add blue zone data for Glagolitic.
3439 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3440
3441 * src/autofit/afscript.h: Add Glagolitic standard characters.
3442
3443 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Glagolitic data.
3444
3445 2017-04-06 Sascha Brawer <sascha@google.com>
3446 Werner Lemberg <wl@gnu.org
3447
3448 [autofit] Add support for Tai Viet script.
3449
3450 * src/autofit/afblue.dat: Add blue zone data for Tai Viet.
3451 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3452
3453 * src/autofit/afscript.h: Add Tai Viet standard characters.
3454
3455 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Tai Viet data.
3456
3457 2017-04-06 Sascha Brawer <sascha@google.com>
3458 Werner Lemberg <wl@gnu.org
3459
3460 [autofit] Add support for Tifinagh script.
3461
3462 * src/autofit/afblue.dat: Add blue zone data for Tifinagh.
3463 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3464
3465 * src/autofit/afscript.h: Add Tifinagh standard characters.
3466
3467 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Tifinagh data.
3468
3469 2017-04-06 Sascha Brawer <sascha@google.com>
3470 Werner Lemberg <wl@gnu.org
3471
3472 [autofit] Add support for N'Ko script.
3473
3474 * src/autofit/afblue.dat: Add blue zone data for N'Ko.
3475 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3476
3477 * src/autofit/afscript.h: Add N'Ko standard characters.
3478
3479 * src/autofit/afranges.c, src/autofit/afstyles.h: Add N'Ko data.
3480
3481 2017-04-06 Sascha Brawer <sascha@google.com>
3482
3483 [autofit] Add support for Adlam script.
3484
3485 * src/autofit/afblue.dat: Add blue zone data for Adlam.
3486 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3487
3488 * src/autofit/afscript.h: Add Adlam standard characters.
3489
3490 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Adlam data.
3491
3492 2017-04-06 Sascha Brawer <sascha@google.com>
3493
3494 [autofit] Add support for Ol Chiki script.
3495
3496 * src/autofit/afblue.dat: Add blue zone data for Ol Chiki.
3497 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3498
3499 * src/autofit/afscript.h: Add Ol Chiki standard character.
3500
3501 * src/autofit/afranges.c, src/autofit/afstyles.h: Add Ol Chiki data.
3502
3503 2017-04-03 Werner Lemberg <wl@gnu.org>
3504
3505 [truetype] Avoid reexecution of `fpgm' and `prep' in case of error.
3506
3507 Reported as
3508
3509 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=981
3510
3511 * include/freetype/fterrdef.h (FT_Err_DEF_In_Glyf_Bytecode): New
3512 error code.
3513
3514 * src/truetype/ttinterp.c (Ins_FDEF, Ins_IDEF): Prohibit execution
3515 of these two opcodes in `glyf' bytecode.
3516 (TT_RunIns): Don't enforce reexecution of `fpgm' and `prep' bytecode
3517 in case of error since function tables can no longer be modified
3518 (due to the changes in `Ins_FDEF' and `Ins_IDEF'). This change can
3519 enormously speed up handling of broken fonts.
3520
3521 2017-04-02 Alexei Podtelezhnikov <apodtele@gmail.com>
3522
3523 [autofit] Disable metrics adjustment for `FT_LOAD_TARGET_LCD'.
3524
3525 * src/autofit/aflatin.c (af_latin_hints_init): Updated.
3526 * src/autofit/aflatin2.c (af_latin2_hints_init): Ditto.
3527
3528 2017-04-01 Werner Lemberg <wl@gnu.org>
3529
3530 * src/truetype/ttgload.c: Include FT_CONFIG_CONFIG_H.
3531
3532 Otherwise FT_UINT_TO_POINTER might not be defined.
3533
3534 Problem reported by Alexei.
3535
3536 2017-03-31 Alexei Podtelezhnikov <apodtele@gmail.com>
3537
3538 [autofit] Disable stem adjustment for `FT_LOAD_TARGET_LCD'.
3539
3540 * include/freetype/freetype.h (FT_LOAD_TARGET_LCD): Document it.
3541 * src/autofit/afcjk.c (af_cjk_hints_init): Updated.
3542 * src/autofit/aflatin.c (af_latin_hints_init): Ditto.
3543 * src/autofit/aflatin2.c (af_latin2_hints_init): Ditto.
3544
3545 2017-03-31 Werner Lemberg <wl@gnu.org>
3546
3547 * src/cff/cffload.c (cff_font_load): Improve fix from 2017-01-04.
3548
3549 Allow CFFs containing a single font to have an empty font name.
3550
3551 Problem reported by 張俊芝 <418092625@qq.com> in
3552
3553 https://lists.nongnu.org/archive/html/freetype-devel/2017-03/msg00074.html
3554
3555 2017-03-30 Werner Lemberg <wl@gnu.org>
3556
3557 * src/cff/cffparse.h (CFF2_DEFAULT_STACK): Set to 513 also.
3558
3559 Requested by Dave Arnold.
3560
3561 2017-03-30 Werner Lemberg <wl@gnu.org>
3562
3563 [truetype] Fix HVAR and VVAR handling (#50678).
3564
3565 * src/truetype/ttgxvar.c (tt_hvadvance_adjust): Handle
3566 glyph indices larger than `mapCount' as described in the
3567 specification.
3568
3569 2017-03-30 Werner Lemberg <wl@gnu.org>
3570
3571 [truetype] Allow linear scaling for unhinted rendering (#50470).
3572
3573 * src/truetype/ttdriver.c (tt_size_request): Revert change from
3574 2011-07-16; the intended metrics fix seems now to be implemented in
3575 a different way, making the patch unnecessary. Note that this
3576 change was usually patched out by all major GNU/Linux distributions
3577 due to heavy side effects.
3578
3579 * src/truetype/ttgload.c (compute_glyph_metrics, TT_Load_Glyph):
3580 Refer to the metrics of the `TT_Size' object.
3581
3582 2017-03-29 Werner Lemberg <wl@gnu.org>
3583
3584 [truetype] Fix thinko related to PS name of default named instance.
3585
3586 * src/truetype/ttgxvar.c (TT_Get_MM_Var): `strid' and `psid' are
3587 name ID values, not indices into the array of name entries.
3588
3589 2017-03-27 Werner Lemberg <wl@gnu.org>
3590
3591 [cid, truetype] Don't use `index' as a variable name.
3592
3593 At least on FreeBSD there is a global declaration of `index' in file
3594 `/usr/include/strings.h'.
3595
3596 * src/cff/cf2intrp.c, src/truetype/ttgload.c: s/index/idx/ where
3597 appropriate.
3598
3599 2017-03-27 Wojciech Mamrak <wmamrak@gmail.com>
3600
3601 [sfnt] Minor improvement for handling kern tables.
3602
3603 * src/sfnt/ttkern.c (tt_face_load_kern): Don't check for
3604 cross-stream kerning tables since we reject format 2 tables later
3605 on anyways.
3606 Modify code for limit test...
3607 (tt_face_get_kerning): ... to avoid a limit test here.
3608
3609 2017-03-27 Werner Lemberg <wl@gnu.org>
3610
3611 [pcf] Fix compiler warnings.
3612
3613 Reported by Alexander Hedges <ahedges@student.ethz.ch>.
3614
3615 * src/pcf/pcfdrivr.c (pcf_property_set, pcf_property_get): Tag
3616 `property_name' with `FT_UNUSED' where necessary.
3617
3618 2017-03-26 Werner Lemberg <wl@gnu.org>
3619
3620 * src/psaux/psobjs.c (t1_builder_close_contour): Add safety guard.
3621
3622 Reported as
3623
3624 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=941
3625
3626 2017-03-23 Werner Lemberg <wl@gnu.org>
3627
3628 [psaux] Better protect `flex' handling.
3629
3630 Reported as
3631
3632 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=935
3633
3634 * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
3635 <callothersubr>: Since there is not a single flex operator but a
3636 series of subroutine calls, malformed fonts can call arbitrary other
3637 operators after the start of a flex, possibly adding points. For
3638 this reason we have to check the available number of points before
3639 inserting a point.
3640
3641 2017-03-23 Werner Lemberg <wl@gnu.org>
3642
3643 [sfnt] Fix check for default named instance.
3644
3645 * src/sfnt/sfobjs.c (sfnt_init_face): A `fixed' number needs four
3646 bytes, not two...
3647
3648 2017-03-23 Werner Lemberg <wl@gnu.org>
3649
3650 Make MM fonts work (again).
3651
3652 * src/base/ftmm.c (FT_Set_Var_Design_Coordinates,
3653 FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Ignore
3654 return value of `ft_face_get_mvar_service'; instead, check whether a
3655 service is actually returned.
3656
3657 2017-03-20 Werner Lemberg <wl@gnu.org>
3658
3659 [truetype] Some variable renamings.
3660
3661 Too much local variables holding different structures were called
3662 `metrics'.
3663
3664 * src/truetype/ttdriver.c (tt_size_select): s/metrics/size_metrics/.
3665
3666 * src/truetype/ttgload.c (tt_get_metrics_incr_overrides,
3667 compute_glyph_metrics): s/metrics/incr_metrics/.
3668 (load_sbit_image): s/metrics/sbit_metrics/.
3669
3670 * src/truetype/ttobjs.c (tt_size_run_fpgm): s/metrics/size_metrics/.
3671 (tt_size_init_bytecode): s/metrics/tt_metrics/.
3672 (tt_size_reset): s/metrics/size_metrics/.
3673
3674 2017-03-20 Werner Lemberg <wl@gnu.org>
3675
3676 [sfnt] Don't add instances to non-variation fonts.
3677
3678 * src/sfnt/sfobjs.c (sfnt_init_face): Fix it.
3679
3680 2017-03-20 Werner Lemberg <wl@gnu.org>
3681
3682 * src/cff/cffgload.c (cff_builder_init): Add safety guard (#50578).
3683
3684 2017-03-18 Werner Lemberg <wl@gnu.org>
3685
3686 Introduce FT_UINT_TO_POINTER macro (#50560).
3687
3688 We have to make a separate case for Windows 64's LLP64 data model.
3689
3690 * builds/unix/ftconfig.in, builds/vms/ftconfig.h,
3691 include/freetype/config/ftconfig.h (FT_UINT_TO_POINTER): New macro.
3692
3693 * src/truetype/ttgload.c (load_truetype_glyph): Use it.
3694
3695 2017-03-18 Werner Lemberg <wl@gnu.org>
3696
3697 * src/truetype/ttinterp.c (TT_RunIns): Adjust loop counter (#50573).
3698
3699 The problematic font that exceeds the old limit is Lato-Regular,
3700 version 2.007, containing bytecode generated by a buggy version of
3701 ttfautohint.
3702
3703 2017-03-18 Werner Lemberg <wl@gnu.org>
3704
3705 [truetype] Another limitation for bytecode loop count maximum.
3706
3707 Reported as
3708
3709 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=900
3710
3711 * src/truetype/ttinterp.c (TT_RunIns): Limit `loopcall_counter_max'
3712 by number of glyphs also.
3713
3714 2017-03-18 Werner Lemberg <wl@gnu.org>
3715
3716 [ftfuzzer] Minor improvement.
3717
3718 * src/tools/ftfuzzer/ftfuzzer.cc: Don't set intermediate axis if
3719 bitmap strikes are active.
3720
3721 2017-03-18 Werner Lemberg <wl@gnu.org>
3722
3723 Improve `make multi'.
3724
3725 * src/autofit/aflatin2.c: Guard file with FT_OPTION_AUTOFIT2.
3726
3727 * src/base/ftmac.c: Guard more parts of the file with FT_MACINTOSH.
3728
3729 * src/psaux/afmparse.c: Guard file with T1_CONFIG_OPTION_NO_AFM.
3730
3731 * src/sfnt/pngshim.c: Guard file with
3732 TT_CONFIG_OPTION_EMBEDDED_BITMAPS also.
3733
3734 * src/sfnt/ttbdf.c: Avoid empty source file.
3735 * src/sfnt/ttpost.c: Guard file with
3736 TT_CONFIG_OPTION_POSTSCRIPT_NAMES.
3737 * src/sfnt/ttsbit.c: Guard file with
3738 TT_CONFIG_OPTION_EMBEDDED_BITMAPS.
3739
3740 * src/truetype/ttgxvar.c, src/truetype/ttinterp.c: Avoid empty
3741 source file.
3742
3743 * src/truetype/ttsubpix.c: Guard file with
3744 TT_USE_BYTECODE_INTERPRETER also.
3745
3746 * src/type1/t1afm.c: Guard file with T1_CONFIG_OPTION_NO_AFM.
3747
3748 * src/autofit/autofit.c, src/base/ftbase.c, src/cache/ftcache.c,
3749 src/cff/cff.c, src/cid/type1cid.c, src/gxvalid/gxvalid.c,
3750 src/pcf/pcf.c, src/pfr/pfr.c, src/psaux/psaux.c,
3751 src/pshinter/pshinter.c, src/psnames/psnames.c, src/raster/raster.c,
3752 src/sfnt/sfnt.c, src/smooth/smooth.c, src/truetype/truetype.c,
3753 src/type1/type1.c, src/type42/type42.c: Remove conditionals; sort
3754 entries.
3755
3756 2017-03-17 Werner Lemberg <wl@gnu.org>
3757
3758 Fixes for conditional compilation.
3759
3760 * src/autofit/afcjk.c, src/autofit/afindic.c: Include `afcjk.h'
3761 earlier.
3762
3763 * src/sfnt/sfobjs.c (sfnt_init_face): Put `memory' variable into
3764 TT_CONFIG_OPTION_GX_VAR_SUPPORT block.
3765 (sfnt_done_face): Protect some code with
3766 TT_CONFIG_OPTION_GX_VAR_SUPPORT.
3767
3768 * src/sfnt/ttsbit.c (tt_face_load_sbix_image): Remove compiler
3769 warning.
3770
3771 * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Put `tmp' variable
3772 into TT_USE_BYTECODE_INTERPRETER block.
3773
3774 (tt_loader_init): Put `error' variable into
3775 TT_USE_BYTECODE_INTERPRETER block.
3776
3777 2017-03-17 Werner Lemberg <wl@gnu.org>
3778
3779 Fix preprocessor warning.
3780
3781 * devel/ftoption.h, include/freetype/config/ftoption.h: Test whether
3782 TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined before checking its
3783 value.
3784
3785 2017-03-17 Werner Lemberg <wl@gnu.org>
3786
3787 `make multi' fixes; compiler warnings.
3788
3789 * src/base/ftsnames.c: Include FT_INTERNAL_DEBUG_H.
3790
3791 * src/cff/cffobjs.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
3792 FT_MULTIPLE_MASTERS_H and FT_SERVICE_MULTIPLE_MASTERS_H.
3793
3794 * src/sfnt/sfdriver.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
3795 FT_MULTIPLE_MASTERS_H and FT_SERVICE_MULTIPLE_MASTERS_H.
3796 (get_win_string, get_apple_string): Initialize `result'.
3797
3798 2017-03-17 Dave Arnold <darnold@adobe.com>
3799
3800 [cff] Fix potential bugs in default NDV for CFF2.
3801
3802 * src/cff/cffload.c (cff_blend_build_vector): Explicitly build blend
3803 vector when `lenNDV' is zero; don't rely on zero-init.
3804 Save `lenNDV' as part of cache key even when `lenNDV' is zero.
3805
3806 2017-03-17 Dave Arnold <darnold@adobe.com>
3807
3808 [cff] Fix CFF2 stack allocation.
3809
3810 * src/cff/cffparse.c (cff_parser_init) add 1 for operator.
3811
3812 2017-03-16 Werner Lemberg <wl@gnu.org>
3813
3814 * src/truetype/ttgxvar.c (tt_done_blend): Free `vvar_table'.
3815
3816 Reported as
3817
3818 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=883
3819
3820 2017-03-15 Werner Lemberg <wl@gnu.org>
3821
3822 Remove clang compiler warnings (#50548).
3823
3824 * include/freetype/internal/tttypes.h (TT_FaceRec): Make
3825 `var_postscript_prefix_len' unsigned.
3826
3827 * src/autofit/afwarp.c (af_warper_compute_line_best): Remove
3828 redundant assignment.
3829
3830 * src/cff/cffload.c (cff_subfont_load): Add casts.
3831
3832 * src/cff/cffparse.c (cff_parse_blend): Remove redundant assignment.
3833
3834 * src/sfnt/sfdriver.c (fmix32, murmur_hash_3_128): Add `static'
3835 keyword.
3836 Add casts.
3837 (fixed2float): Add cast.
3838 (sfnt_get_var_ps_name): Make `p' always initialized.
3839 Add casts.
3840
3841 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Add casts.
3842
3843 2017-03-15 Werner Lemberg <wl@gnu.org>
3844
3845 [ftfuzzer] Limit number of tested faces and instances.
3846
3847 This is inspired by the discussion in and analysis of
3848
3849 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=859
3850
3851 * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Use only
3852 up to 20 face indices.
3853 Use only up to 20 instance indices.
3854
3855 2017-03-15 Werner Lemberg <wl@gnu.org>
3856
3857 * src/tools/ftfuzzer/ftfuzzer.cc: Improve readability; formatting.
3858
3859 2017-03-14 Werner Lemberg <wl@gnu.org>
3860
3861 [sfnt] Implement PS names for font instances [3/3].
3862
3863 Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
3864
3865 * include/freetype/internal/tttypes.h (TT_FaceRec): New fields
3866 `var_postscript_prefix' and `var_postscript_prefix_len'.
3867
3868 * src/sfnt/sfdriver.c: Include FT_TRUETYPE_IDS_H.
3869 (sfnt_is_alphanumeric): New wrapperfunction for `ft_isalnum'.
3870 (get_win_string, get_apple_string): Remove `const' from return
3871 value.
3872 (MAX_VALUE_DESCRIPTOR_LEN, MAX_PS_NAME_LEN): New macros.
3873 (hexdigits): New array.
3874 (sfnt_get_var_ps_name): New function, implementing Adobe TechNote
3875 5902 to construct a PS name for a variation font instance.
3876 (sfnt_get_ps_name): Call `sfnt_get_var_ps_name' for font instances.
3877
3878 * src/sfnt/sfobjs.c (sfnt_done_face): Updated.
3879
3880 * src/truetype/ttgxvar.c (tt_set_mm_blend): Reset
3881 `face->postscript_name' to trigger recalculation for new instance
3882 parameters.
3883
3884 2017-03-14 Werner Lemberg <wl@gnu.org>
3885
3886 [sfnt] Implement PS names for font instances [2/3].
3887
3888 * src/sfnt/sfdriver.c (fix2float) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]:
3889 New function to find the shortest representation of a 16.16
3890 fractional number.
3891
3892 2017-03-14 Werner Lemberg <wl@gnu.org>
3893
3894 [sfnt] Implement PS names for font instances [1/3].
3895
3896 Add 128bit MurmurHash 3 function.
3897
3898 Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
3899
3900 * src/sfnt/sfdriver.c (ROTL32): New macro.
3901 (fmix32, murmur_hash_3_128): New functions.
3902
3903 2017-03-13 Werner Lemberg <wl@gnu.org>
3904
3905 [truetype] Ignore invalid MVAR tags.
3906
3907 Reported as
3908
3909 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=838
3910
3911 * src/truetype/ttgxvar.c (ft_var_load_mvar): Ignore value and emit
3912 warning for invalid tags.
3913 (tt_apply_mvar): Ignore invalid tags.
3914
3915 2017-03-12 Werner Lemberg <wl@gnu.org>
3916
3917 [truetype] Store and use design coordinates also.
3918
3919 * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func):
3920 Add `normalizedcoords' argument.
3921
3922 * src/truetype/ttgxvar.h (GX_BlendRec): Add `coords' field to store
3923 the design coordinates of the current instance.
3924 Updated.
3925
3926 * src/truetype/ttgxvar.c (TT_Set_MM_Blend): Move functionality to...
3927 (tt_set_mm_blend): ... New function.
3928 Convert data in `normalizedcoords' array to `coords' array on
3929 demand.
3930 (TT_Set_Var_Design): Store argument data in `coords' array.
3931 (TT_Get_Var_Design): Get data from `coords' array.
3932 (tt_get_var_blend): Updated.
3933 (tt_done_blend): Updated.
3934
3935 * src/cff/cffload.c, src/cff/cffload.h (cff_get_var_blend): Updated.
3936
3937 * src/cff/cf2ft.c (cf2_getNormalizedVector): Updated.
3938
3939 * src/cff/cffobjs.c (cff_face_init): Updated.
3940
3941 2017-03-12 Werner Lemberg <wl@gnu.org>
3942
3943 src/truetype/ttgxvar.[ch]: s/avar_checked/avar_loaded/.
3944
3945 2017-03-08 Werner Lemberg <wl@gnu.org>
3946
3947 [sfnt] Another fix for buggy variation fonts.
3948
3949 Reported as
3950
3951 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=759
3952
3953 * src/sfnt/sfobjs.c (sfnt_init_face): While setting number of
3954 instances to zero for `CFF' fonts table, ensure that there is no
3955 `CFF2' present also (which gets priority).
3956
3957 2017-03-07 Werner Lemberg <wl@gnu.org>
3958
3959 [sfnt] Improve handling for buggy variation fonts.
3960
3961 Reported as
3962
3963 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=738
3964
3965 * src/sfnt/sfobjs.c (sfnt_init_face): While setting number of
3966 instances to zero for `CFF' fonts table, ensure that there is no
3967 `glyf' table present also (which gets priority).
3968
3969 2017-03-06 Werner Lemberg <wl@gnu.org>
3970
3971 [sfnt, truetype] Always provide default instance.
3972
3973 As documented in the OpenType specification, an entry for the
3974 default instance may be omitted in the named instance table. In
3975 particular this means that even if there is no named instance table
3976 in the font we actually do have a named instance, namely the default
3977 instance.
3978
3979 For consistency, we always want the default instance in our list of
3980 named instances. If it is missing, we try to synthesize it.
3981
3982 * src/sfnt/sfobjs.c (sfnt_init_face): Check whether the default
3983 instance is in the table of named instances. Otherwise adjust
3984 number of instances.
3985
3986 * src/truetype/ttgxvar.c: Include FT_TRUETYPE_IDS_H.
3987 (TT_Get_MM_Var): Use `face->root.style_flags' as the number of named
3988 instances.
3989 Sythesize a named instance entry if necessary.
3990 (tt_done_blend): Free `normalized_stylecoords'.
3991
3992 2017-03-05 Werner Lemberg <wl@gnu.org>
3993
3994 [sfnt] Remove redundant code.
3995
3996 * src/sfnt/sfobjs.c (sfnt_init_face): Remove second test for
3997 `num_instances', which will always succeed.
3998
3999 2017-03-04 Werner Lemberg <wl@gnu.org>
4000
4001 [sfnt] Add `get_name_id' service.
4002
4003 * include/freetype/internal/sfnt.h (TT_Get_Name_ID_Func): New
4004 typedef.
4005 (SFNT_Interface): Add `get_name_id' field.
4006 (FT_DEFINE_SFNT_INTERFACE): Updated.
4007
4008 * src/sfnt/sfdriver.c (search_name_id): Rename to...
4009 (sfnt_get_name_id): ... this.
4010 (sfnt_get_ps_name, sfnt_interface): Updated.
4011
4012 2017-03-04 Werner Lemberg <wl@gnu.org>
4013
4014 [truetype] Make `TT_Set_MM_Blend' set named instance index.
4015
4016 * src/truetype/ttgxvar.h (GX_Blend): New array
4017 `normalized_stylecoords'.
4018
4019 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Allocate and fill
4020 `normalized_stylecoords'.
4021 (TT_Set_MM_Blend): Check instance tuple and adjust `face_index'
4022 accordingly.
4023
4024 2017-03-02 Werner Lemberg <wl@gnu.org>
4025
4026 [truetype] Split off designer/normalized conversion routines.
4027
4028 * src/truetype/ttgxvar.c (TT_Set_Var_Design): Split off conversion
4029 code designer->normalized coordinates to...
4030 (ft_var_to_normalized): ... New function.
4031 (TT_Get_Var_Design): Split off conversion code normalized->designer
4032 coordinates to...
4033 (ft_var_to_design): ... New function.
4034
4035 2017-02-28 Werner Lemberg <wl@gnu.org>
4036
4037 [sfnt] Further generalize `sfnt_get_ps_name'; report invalid data.
4038
4039 * src/sfnt/sfdriver.c (sfnt_ps_map): New array.
4040 (sfnt_is_postscript): New function.
4041 (char_type_func): New typedef.
4042 (get_win_string, get_apple_string): Add argument to specify
4043 character checking function.
4044 Add argument whether argument checking failures should be reported.
4045 Update callers.
4046 (search_name_id): Fix return value.
4047
4048 2017-02-23 Werner Lemberg <wl@gnu.org>
4049
4050 [sfnt] Split off another bit of `sfnt_get_ps_name'.
4051
4052 * src/sfnt/sfdriver.c (sfnt_get_ps_name): Split off some