blob: 97e8b08c74d2b3ef3622f186ad0b6d5ec1702be7 [file] [log] [blame]
StudioEtrange5cf83a52015-10-20 07:19:44 +020012015-10-20 StudioEtrange <nomorgan@gmail.com>
2
3 * CMakeLists.txt: Enable shared library builds on MinGW (#46233).
4
Werner Lemberg3c582062015-10-20 06:57:28 +020052015-10-20 Werner Lemberg <wl@gnu.org>
6
7 * src/type1/t1afm.c (T1_Read_Metrics): Fix memory leak (#46229).
8
92015-10-19 Bungeman <bungeman@gmail.com>
Bungemanba8a5282015-10-19 23:27:06 +020010
11 [cid] Better handle invalid glyph stream offsets (#46221).
12
13 * src/cid/cidgload.c (cid_load_glyph): Check minimum size of glyph
14 length.
15
Werner Lembergdcfc4d92015-10-18 16:47:06 +0200162015-10-18 Werner Lemberg <wl@gnu.org>
17
Werner Lemberg24cee3a2015-10-19 23:00:28 +020018 [psaux] Fix tracing of negative numbers.
19
20 Due to incorrect casting negative numbers were shown as very large
21 (positive) integers on 64bit systems.
22
23 * src/psaux/t1decode.c (t1_decoder_parse_charstrings) <op_none>:
24 Use division instead of shift.
25
262015-10-18 Werner Lemberg <wl@gnu.org>
27
Werner Lemberg14213b52015-10-18 18:15:04 +020028 [truetype] Improve TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46223).
29
30 * devel/ftoption.h, include/freetype/config/ftoption.h: Surround it
31 with #ifndef ... #endif, as suggested in the tracker issue.
32
332015-10-18 Werner Lemberg <wl@gnu.org>
34
Werner Lembergdcfc4d92015-10-18 16:47:06 +020035 [truetype] Better protection against malformed `fpgm' (#46223).
36
37 * src/truetype/ttobjs.c (tt_size_init_bytecode): Don't execute a
38 malformed `fpgm' table more than once.
39
Werner Lemberg8edfcbe2015-10-17 08:11:16 +0200402015-10-17 Werner Lemberg <wl@gnu.org>
41
Werner Lemberg7643b582015-10-17 15:51:29 +020042 * src/cid/cidgload.c (cid_load_glyph): Fix memory leak.
43
44 Reported by Kostya Serebryany <kcc@google.com>.
45
462015-10-17 Werner Lemberg <wl@gnu.org>
47
Werner Lembergb1857472015-10-17 14:21:41 +020048 [bdf] Prevent memory leak (#46217).
49
50 * src/bdf/bdflib.c (_bdf_parse_glyphs) <STARTCHAR>: Check
51 _BDF_GLYPH_BITS.
52
532015-10-17 Werner Lemberg <wl@gnu.org>
54
Werner Lemberge1ca18d2015-10-17 11:51:27 +020055 [bdf] Use stream size to adjust number of glyphs.
56
57 * src/bdf/bdflib.c (ACMSG17): New message macro.
58 (_bdf_parse_t): Add member `size'.
59 (bdf_load_font): Set `size'.
60 (_bdf_parse_glyphs): Adjust `cnt' if necessary.
61
622015-10-17 Werner Lemberg <wl@gnu.org>
63
Werner Lemberg0af21dc2015-10-17 09:29:52 +020064 * src/cid/cidload.c (cid_parse_dict): Check `[FG]DBytes' size.
65
662015-10-17 Werner Lemberg <wl@gnu.org>
67
Werner Lemberg0ba98da2015-10-17 09:11:02 +020068 * src/cid/cidgload.c (cid_glyph_load): Check file offsets (#46222).
69
702015-10-17 Werner Lemberg <wl@gnu.org>
71
Werner Lemberg8edfcbe2015-10-17 08:11:16 +020072 [psaux] Fix heap buffer overflow (#46221).
73
74 * src/psaux/t1decode.c (t1_decoder_parse_charstring) <operator 12>:
75 Fix limit check.
76
772015-10-17 Werner Lemberg <wl@gnu.org>
Werner Lemberga5ecfb42015-10-17 06:15:55 +020078
79 * src/cid/cidload.c (cid_parse_dict): Handle invalid input (#46220).
80
812015-10-15 Kostya Serebryany <kcc@google.com>
Kostya Serebryany266976b2015-10-15 22:15:53 -070082
83 [ftfuzzer] Add README.
84
85 * src/tools/ftfuzzer/README: New file.
86
Bungeman65d89802015-10-15 23:50:16 +0200872015-10-15 Bungeman <bungeman@gmail.com>
88
89 [bdf] Fix memory leak (#46213).
90
91 * src/bdf/bdflib.c (bdf_load_font): Always go to label `Fail' in
92 case of error.
93
Werner Lemberg837ad9d2015-10-15 21:15:45 +0200942015-10-15 Werner Lemberg <wl@gnu.org>
95
Werner Lemberg24a1fcd2015-10-15 21:50:15 +020096 [truetype] Add TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46208).
97
98 * devel/ftoption.h, include/freetype/config/ftoption.h
99 (TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES): New configuration macro.
100
101 * src/truetype/ttinterp.c (MAX_RUNNABLE_OPCODES): Removed.
102 (TT_RunIns): Updated.
103
1042015-10-15 Werner Lemberg <wl@gnu.org>
105
Werner Lemberg837ad9d2015-10-15 21:15:45 +0200106 * src/truetype/ttinterp.c (TT_RunIns): Fix bytecode stack tracing.
107
108 The used indices were off by 1.
109
Werner Lemberg8b76eaf2015-10-15 18:28:43 +02001102015-10-15 Bungeman <bungeman@gmail.com>
111 Werner Lemberg <wl@gnu.org>
112
113 * src/tools/ftfuzzer/ftfuzzer.cc: Handle fixed sizes (#46211).
114
Werner Lemberge03214e2015-10-15 16:58:13 +02001152015-10-15 Werner Lemberg <wl@gnu.org>
116
117 [base] Compute MD5 checksums only if explicitly requested.
118
119 This improves profiling accuracy.
120
121 * src/base/ftobjs.c (FT_Render_Glyph_Internal): Implement it.
122
Werner Lemberg2a20c922015-10-14 15:23:15 +02001232015-10-14 Werner Lemberg <wl@gnu.org>
124
125 [base] Use `FT_' namespace for MD5 functions (#42366).
126
127 * src/base/ftobjs.c (MD5_*): Define as `FT_MD5_*'.
128 Undefine HAVE_OPENSSL.
129
Werner Lembergf96094e2015-10-13 07:13:56 +02001302015-10-13 Werner Lemberg <wl@gnu.org>
131
Werner Lemberg85399152015-10-13 20:43:19 +0200132 [type1] Correctly handle missing MM axis names (#46202).
133
134 * src/type1/t1load.c (T1_Get_MM_Var): Implement it.
135
1362015-10-13 Werner Lemberg <wl@gnu.org>
137
Werner Lemberg58b61b62015-10-13 18:26:18 +0200138 [pcf] Quickly exit if font index < 0.
139
140 Similar to other font formats, this commit makes the parser no
141 longer check the whole PCF file but only the header and the TOC if
142 we just want to get the number of available faces (and a proper
143 recognition of the font format).
144
145 * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated.
146 Exit quickly if face_index < 0.
147
148 * src/pcfread.c (pcf_load_font): Add `face_index' argument.
149 Exit quickly if face_index < 0.
150
151 * src/pcf/pcf.h: Updated.
152
1532015-10-13 Werner Lemberg <wl@gnu.org>
154
Werner Lembergbdb56bb2015-10-13 11:51:13 +0200155 [ftfuzzer] Handle TTCs and MM/GX variations.
156
157 This patch also contains various other improvements.
158
159 * src/tools/ftfuzzer/ftfuzzer.cc: Add preprocessor guard to reject
160 pre-C++11 compilers.
161 (FT_Global): New class. Use it to provide a global constructor and
162 destructor for the `FT_Library' object.
163 (setIntermediateAxis): New function to select an (arbitrary)
164 instance.
165 (LLVMFuzzerTestOneInput): Loop over all faces and named instances.
166 Also call `FT_Set_Char_Size'.
167
1682015-10-13 Werner Lemberg <wl@gnu.org>
169
Werner Lemberg43a96eb2015-10-13 11:18:55 +0200170 [truetype] Refine some GX sanity tests.
171
172 Use the `gvar' table size instead of the remaining bytes in the
173 stream.
174
175 * src/truetype/ttgxvar.h (GX_BlendRec): New field `gvar_size'.
176
177 * src/truetype/ttgxvar.c (ft_var_load_gvar): Set `gvar_size'.
178 (ft_var_readpackedpoints, ft_var_readpackeddeltas: New argument
179 `size'.
180 (tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Updated.
181
1822015-10-13 Werner Lemberg <wl@gnu.org>
183
Werner Lemberg052f6c52015-10-13 08:24:32 +0200184 [truetype] Another GX sanity test.
185
186 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Check
187 `tupleCount'.
188 Add tracing message.
189
1902015-10-13 Werner Lemberg <wl@gnu.org>
191
Werner Lemberg7ef0d862015-10-13 08:14:20 +0200192 [truetype] Fix memory leak for broken GX fonts (#46188).
193
194 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix scope of
195 deallocation.
196
1972015-10-13 Werner Lemberg <wl@gnu.org>
198
Werner Lembergf96094e2015-10-13 07:13:56 +0200199 [truetype] Fix commit from 2015-10-10.
200
201 * src/truetype/ttgxvar.c (ft_var_load_gvar): Add missing error
202 handling body to condition.
203
Werner Lembergb9880aa2015-10-12 10:13:26 +02002042015-10-12 Werner Lemberg <wl@gnu.org>
205
206 [unix] Make MKDIR_P actually work.
207
208 * builds/unix/configure.raw: Fix underquoting of `INSTALL' and
209 `MKDIR_P'.
210
211 Problem reported by Dan Liddell <lddll@yahoo.com>.
212
Werner Lemberg4f7f6f62015-10-11 07:55:25 +02002132015-10-11 Werner Lemberg <wl@gnu.org>
214
215 [sfnt] Improve extraction of number of named instances.
216
217 * src/sfnt/sfobjs.c (sfnt_init_face)
218 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check number of instances against
219 `fvar' table size.
220
Alexei Podtelezhnikovc14ae9c2015-10-10 22:28:26 -04002212015-10-10 Alexei Podtelezhnikov <apodtele@gmail.com>
222
223 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Fix overflow
224 (#46149).
225
Werner Lembergd353f6e2015-10-10 06:54:46 +02002262015-10-10 Werner Lemberg <wl@gnu.org>
227
Werner Lemberg8de39a72015-10-10 13:34:11 +0200228 [sfnt] Fix infinite loops with broken cmaps (#46167).
229
230 * src/sfnt/ttcmap.c (tt_cmap8_char_next, tt_cmap12_next): Take care
Werner Lemberga724dcf2015-10-11 05:50:07 +0200231 of border conditions (i.e., if the loops exit naturally).
Werner Lemberg8de39a72015-10-10 13:34:11 +0200232
2332015-10-10 Werner Lemberg <wl@gnu.org>
234
Werner Lembergda346732015-10-10 10:21:27 +0200235 [truetype] More sanity tests for GX handling.
236
237 These tests should mainly help avoid unnecessarily large memory
238 allocations in case of malformed fonts.
239
240 * src/truetype/ttgxvar.c (ft_var_readpackedpoints,
241 ft_var_readpackeddeltas): Check number of points against stream
242 size.
243 (ft_var_load_avar): Check `pairCount' against table length.
244 (ft_var_load_gvar): Check `globalCoordCount' and `glyphCount'
245 against table length.
246 (tt_face_vary_cvt): Check `tupleCount' and `offsetToData'.
247 Fix trace.
248 (TT_Vary_Apply_Glyph_Deltas): Fix trace.
249 Free `sharedpoints' to avoid memory leak.
250
2512015-10-10 Werner Lemberg <wl@gnu.org>
252
Werner Lembergc220d8b2015-10-10 08:13:04 +0200253 [truetype] Better protection against malformed GX data (#46166).
254
255 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Correctly
256 handle empty `localpoints' array.
257
2582015-10-10 Werner Lemberg <wl@gnu.org>
259
Werner Lembergd353f6e2015-10-10 06:54:46 +0200260 * src/pcf/pcfread.c (pcf_read_TOC): Check stream size (#46162).
261
Werner Lembergc12956e2015-10-09 09:38:32 +02002622015-10-09 Werner Lemberg <wl@gnu.org>
263
264 * src/gzip/ftgzip.c (FT_Stream_OpenGzip): Use real stream size.
265
Werner Lemberg12112242015-10-08 08:55:15 +02002662015-10-08 Werner Lemberg <wl@gnu.org>
267
Werner Lembergd98053c2015-10-08 23:17:41 +0200268 [pcf] Protect against invalid number of TOC entries (#46159).
269
270 * src/pcf/pcfread.c (pcf_read_TOC): Check number of TOC entries
271 against size of data stream.
272
2732015-10-08 Werner Lemberg <wl@gnu.org>
274
Werner Lemberg06c2d332015-10-08 21:31:57 +0200275 [type42] Protect against invalid number of glyphs (#46159).
276
277 * src/type42/t42parse.c (t42_parse_charstrings): Check number of
278 `CharStrings' dictionary entries against size of data stream.
279
2802015-10-08 Werner Lemberg <wl@gnu.org>
281
Werner Lemberg983b00e2015-10-08 18:44:45 +0200282 [sfnt] Fix some signed overflows (#46149).
283
284 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
285 <TT_SBIT_TABLE_TYPE_SBIX>: Use `FT_MulDiv'.
286
2872015-10-08 Werner Lemberg <wl@gnu.org>
288
Werner Lemberg12112242015-10-08 08:55:15 +0200289 [type1] Protect against invalid number of subroutines (#46150).
290
291 * src/type1/t1load.c (parse_subrs): Check number of
292 `Subrs' dictionary entries against size of data stream.
293
Kostya Serebryanydde84f22015-10-07 22:18:22 +02002942015-10-07 Kostya Serebryany <kcc@google.com>
295
296 [ftfuzzer] Add support for LLVM's LibFuzzer.
297
298 * src/tools/ftfuzzer/ftfuzzer.cc, src/tools/runinput.cc: New files.
299
Alexei Podtelezhnikovc14ae9c2015-10-10 22:28:26 -04003002015-10-06 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov6eb61582015-10-06 22:39:54 -0400301
302 [smooth] Faster alternative line renderer.
303
304 This implementation renders the entire line segment at once without
305 subdividing it into scanlines. The main speed improvement comes from
306 reducing the number of divisions to just two per line segment, which
307 is a bare minimum to calculate cell coverage in a smooth rasterizer.
308 Notably, the progression from cell to cell does not itself require any
309 divisions at all. The speed improvement is more noticeable at larger
310 sizes.
311
312 * src/smooth/ftgrays.c (gray_render_line): New implementation.
313
Werner Lemberg066a4912015-10-06 07:55:32 +02003142015-10-06 Werner Lemberg <wl@gnu.org>
315
316 [cff] Return correct PS names from pure CFF (#46130).
317
318 * src/cff/cffdrivr.c (cff_get_ps_name): Use SFNT service only for
319 SFNT.
320
Werner Lemberg8cabd912015-10-04 08:18:01 +02003212015-10-04 Werner Lemberg <wl@gnu.org>
322
Werner Lemberg30fe5e72015-10-04 13:08:08 +0200323 [base] Replace left shifts with multiplication (#46118).
324
325 * src/base/ftglyph.c (ft_bitmap_glyph_bbox, FT_Get_Glyph): Do it.
326
3272015-10-04 Werner Lemberg <wl@gnu.org>
328
Werner Lemberg8cabd912015-10-04 08:18:01 +0200329 * Version 2.6.1 released.
330 =========================
331
332
333 Tag sources with `VER-2-6-1'.
334
335 * docs/VERSION.DLL: Update documentation and bump version number to
336 2.6.1.
337
338 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
339 builds/windows/vc2005/index.html,
340 builds/windows/vc2008/freetype.vcproj,
341 builds/windows/vc2008/index.html,
342 builds/windows/vc2010/freetype.vcxproj,
343 builds/windows/vc2010/index.html,
344 builds/windows/visualc/freetype.dsp,
345 builds/windows/visualc/freetype.vcproj,
346 builds/windows/visualc/index.html,
347 builds/windows/visualce/freetype.dsp,
348 builds/windows/visualce/freetype.vcproj,
349 builds/windows/visualce/index.html,
350 builds/wince/vc2005-ce/freetype.vcproj,
351 builds/wince/vc2005-ce/index.html,
352 builds/wince/vc2008-ce/freetype.vcproj,
353 builds/wince/vc2008-ce/index.html: s/2.6/2.6.1/, s/26/261/.
354
355 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
356
357 * builds/unix/configure.raw (version_info): Set to 18:1:12.
358 * CMakeLists.txt (VERSION_PATCH): Set to 1.
359
360 * src/autofit/afmodule.c [AF_DEBUG_AUTOFIT]: Ensure C linking for
361 dumping functions.
362
3632015-10-04 Werner Lemberg <wl@gnu.org>
Werner Lemberg53838ce2015-10-03 21:12:25 +0200364
365 [bzip2, gzip] Avoid access of unitialized memory (#46109).
366
Werner Lembergb260dc92015-10-04 07:39:22 +0200367 * src/bzip2/ftbzip2.c (ft_bzip2_file_fill_input), src/gzip/ftgzip.c
368 (ft_gzip_file_fill_input): In case of an error, adjust the limit to
369 avoid copying uninitialized memory.
370
3712015-10-03 Werner Lemberg <wl@gnu.org>
372
373 [bzip2, gzip] Avoid access of unitialized memory (#46109).
374
Werner Lemberg53838ce2015-10-03 21:12:25 +0200375 * src/bzip2/ftbzip2.c (ft_bzip2_file_fill_output), src/gzip/ftgzip.c
376 (ft_gzip_file_fill_output): In case of an error, adjust the limit to
377 avoid copying uninitialized memory.
378
Alexei Podtelezhnikove2dae8f2015-10-01 22:03:34 -04003792015-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
380
381 [smooth] Clean up worker.
382
383 * src/smooth/ftgrays.c (gray_TWorker): Remove never used fields.
384
Werner Lemberg5f8f44d2015-10-01 14:16:03 +02003852015-10-01 Werner Lemberg <wl@gnu.org>
386
Werner Lemberg90e437e2015-10-01 20:00:27 +0200387 [sfnt] Make `tt_cmap4_char_map_linear' more robust (#46078).
388
389 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Take care of
390 border conditions (i.e., if the loop exits naturally).
391
3922015-10-01 Werner Lemberg <wl@gnu.org>
393
Werner Lembergfab67b82015-10-01 16:47:05 +0200394 * src/autofit/afranges.c (af_deva_nonbase_uniranges): Fix ranges.
395 They should be a subset of `af_deva_uniranges'.
396
3972015-10-01 Werner Lemberg <wl@gnu.org>
398
Werner Lemberg5f8f44d2015-10-01 14:16:03 +0200399 [sfnt] Make `tt_cmap4_char_map_linear' faster (#46078).
400
401 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Use inner loop to
402 reject too large glyph indices.
403
Alexei Podtelezhnikov8bbcfb22015-09-30 23:08:53 -04004042015-09-30 Alexei Podtelezhnikov <apodtele@gmail.com>
405
406 [smooth] Clean up worker.
407
408 * src/smooth/ftgrays.c (gray_TWorker): Remove lightly used `last_ey'.
409 (gray_start_cell, gray_render_line): Update.
410
Werner Lemberg8651f372015-09-30 10:26:10 +02004112015-09-30 Werner Lemberg <wl@gnu.org>
412
Werner Lembergdbd04262015-09-30 17:52:42 +0200413 [autofit] Replace `no-base' with `non-base'.
414
415 * src/autofit/*: Do it.
416
4172015-09-30 Werner Lemberg <wl@gnu.org>
418
Werner Lemberg2ff83a52015-09-30 14:44:29 +0200419 [sfnt] Rewrite `tt_cmap4_char_map_linear' (#46078).
420
421 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Add code to better
422 skip invalid segments.
423 If searching the next character, provide a more efficient logic to
424 speed up the code.
425
4262015-09-30 Werner Lemberg <wl@gnu.org>
427
Werner Lemberg8651f372015-09-30 10:26:10 +0200428 [truetype] Adjust number of glyphs for malformed `loca' tables.
429
430 * src/truetype/ttpload.c (tt_face_load_loca): Implement it.
431
Werner Lemberg483007f2015-09-29 11:22:15 +02004322015-09-29 Werner Lemberg <wl@gnu.org>
433
434 [pshinter] Avoid harmless overflow (#45984).
435
436 * src/pshinter/pshglob.c (psh_blues_set_zones): Fix it.
437
Werner Lemberga3046562015-09-28 09:45:56 +02004382015-09-28 Werner Lemberg <wl@gnu.org>
439
440 [autofit] Add support for Lao script.
441
442 Thanks to Danh Hong <danhhong@gmail.com> for guidance with blue zone
443 characters!
444
445 * src/autofit/afblue.dat: Add blue zone data for Lao.
446
447 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
448
449 * src/autofit/afscript.h: Add Lao standard characters.
450
451 * src/autofit/afranges.c: Add Lao data.
452
453 * src/autofit/afstyles.h: Add Lao data.
454
suzuki toshiya8a05d252015-09-28 01:40:21 +09004552015-09-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
suzuki toshiyafb5268c2015-09-28 02:01:43 +0900456
457 [base] Fix a leak by broken sfnt-PS or resource fork (#46028).
458
459 open_face_from_buffer() frees passed buffer if valid font
460 is not found. But if copying to the buffer is failed,
461 the allocated buffer should be freed within the caller.
462
463 * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Free
464 the buffer `sfnt_ps' if an error caused before calling
465 open_face_from_buffer().
466 (Mac_Read_sfnt_Resource): Free the buffer `sfnt_data' if
467 an error caused before calling open_face_from_buffer();
468
4692015-09-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
suzuki toshiya8a05d252015-09-28 01:40:21 +0900470
471 [mac] Fix buffer size calculation for LWFN font.
472
473 * src/base/ftmac.c (read_lwfn): Cast post_size to FT_ULong
474 to prevent confused copy by too large chunk size.
475
Alexei Podtelezhnikov3dffe8e2015-09-27 11:30:17 -04004762015-09-26 Alexei Podtelezhnikov <apodtele@gmail.com>
477
478 * src/smooth/ftgrays.c (PIXEL_MASK): Remove unused macro.
479
Werner Lemberg41877532015-09-26 15:19:54 +02004802015-09-26 Werner Lemberg <wl@gnu.org>
481
Werner Lemberg19188a92015-09-26 16:57:17 +0200482 [autofit] Minor tracing improvement.
483
484 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Don't emit
485 blue zones header line if there are no blue zones.
486
4872015-09-26 Werner Lemberg <wl@gnu.org>
488
Werner Lemberg41877532015-09-26 15:19:54 +0200489 [bzip2, gzip, lzw] Harmonize function signatures with prototype.
490
491 Suggested by Hin-Tak Leung.
492
493 * src/bzip2/ftbzip2.c (ft_bzip2_stream_io), src/gzip/ftgzip.c
494 (ft_gzip_stream_io), src/lzw/ftlzw.c (ft_lzw_stream_io): Do it.
495
Hin-Tak Leung265ade82015-09-26 14:51:30 +02004962015-09-26 Hin-Tak Leung <htl10@users.sourceforge.net>
497
498 Add new FT_LOAD_COMPUTE_METRICS load flag.
499
500 * include/freetype/freetype.h (FT_LOAD_COMPUTE_METRICS): New macro.
501 * src/truetype/ttgload.c (compute_glyph_metrics): Usage.
502
Werner Lembergd57f2272015-09-26 08:44:26 +02005032015-09-26 Werner Lemberg <wl@gnu.org>
504
505 * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Add cast.
506
Werner Lemberg2439c512015-09-25 16:54:28 +02005072015-09-25 Werner Lemberg <wl@gnu.org>
508
509 [type1] Protect against invalid number of glyphs (#46029).
510
511 * src/type1/t1load.c (parse_charstrings): Check number of
512 `CharStrings' dictionary entries against size of data stream.
513
Werner Lembergc409eb12015-09-24 12:39:38 +02005142015-09-23 Werner Lemberg <wl@gnu.org>
515
Werner Lemberg5339c752015-09-24 13:39:44 +0200516 [sfnt] Better checks for invalid cmaps (2/2) (#46019).
517
518 While the current code in `FT_Get_Next_Char' correctly rejects
519 out-of-bounds glyph indices, it can be extremely slow for malformed
520 cmaps that use 32bit values. This commit tries to improve that.
521
522 * src/sfnt/ttcmap.c (tt_cmap8_char_next, tt_cmap12_next,
523 tt_cmap12_char_map_binary, tt_cmap13_next,
524 tt_cmap13_char_map_binary): Reject glyph indices larger than or
525 equal to the number of glyphs.
526
5272015-09-23 Werner Lemberg <wl@gnu.org>
528
Werner Lembergc409eb12015-09-24 12:39:38 +0200529 [base, sfnt] Better checks for invalid cmaps (1/2).
530
531 * src/base/ftobjs.c (FT_Get_Char_Index): Don't return out-of-bounds
532 glyph indices.
533 (FT_Get_First_Char): Updated.
534
535 * src/sfnt/ttcmap.c (tt_cmap6_char_next): Don't return character
536 codes greater than 0xFFFF.
537
538 (tt_cmap8_char_index): Avoid integer overflow in computation of
539 glyph index.
540 (tt_cmap8_char_next): Avoid integer overflows in computation of
541 both next character code and glyph index.
542
543 (tt_cmap10_char_index): Fix unsigned integer logic.
544 (tt_cmap10_char_next): Avoid integer overflow in computation of
545 next character code.
546
547 (tt_cmap12_next): Avoid integer overflows in computation of both
548 next character code and glyph index.
549 (tt_cmap12_char_map_binary): Ditto.
550 (tt_cmap12_char_next): Simplify.
551
552 (tt_cmap13_char_map_binary): Avoid integer overflow in computation
553 of next character code.
554 (tt_cmap13_char_next): Simplify.
555
suzuki toshiyae982f5b2015-09-21 23:07:22 +09005562015-09-21 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
557
Werner Lembergd7f456e2015-09-26 08:37:14 +0200558 [base] Check too long POST and sfnt resource (#45919).
suzuki toshiyae982f5b2015-09-21 23:07:22 +0900559
Werner Lembergd7f456e2015-09-26 08:37:14 +0200560 * src/base/ftbase.h (FT_MAC_RFORK_MAX_LEN): Maximum length of the
561 resource fork for Mac OS. Resource forks larger than 16 MB can be
562 written but can't be handled correctly, at least in Carbon routine.
563 See https://support.microsoft.com/en-us/kb/130437.
suzuki toshiyae982f5b2015-09-21 23:07:22 +0900564
Werner Lembergd7f456e2015-09-26 08:37:14 +0200565 * src/base/ftobjs.c (Mac_Read_POST_Resource): No need to use `0x'
566 prefix for `%p' formatter.
suzuki toshiyae982f5b2015-09-21 23:07:22 +0900567
Werner Lembergd7f456e2015-09-26 08:37:14 +0200568 * src/base/ftbase.c (Mac_Read_POST_Resource): Check the fragment and
569 total size of the concatenated POST resource before buffer
570 allocation.
571 (Mac_Read_sfnt_Resource): Check the declared size of sfnt resource
suzuki toshiyae982f5b2015-09-21 23:07:22 +0900572 before buffer allocation.
suzuki toshiyae982f5b2015-09-21 23:07:22 +0900573
Werner Lembergd7f456e2015-09-26 08:37:14 +0200574 * src/base/ftmac.c (read_lwfn, FT_New_Face_From_SFNT): Check the
575 total resource size before buffer allocation.
suzuki toshiyae982f5b2015-09-21 23:07:22 +0900576
Werner Lembergcb7a5122015-09-19 07:58:03 +02005772015-09-19 Werner Lemberg <wl@gnu.org>
578
Werner Lemberg730b6d72015-09-19 12:41:12 +0200579 [sfnt] Improve handling of invalid SFNT table entries (#45987).
580
581 This patch fixes weaknesses in function `tt_face_load_font_dir'.
582
583 - It incorrectly assumed that valid tables are always at the
584 beginning. As a consequence, some valid tables after invalid
585 entries (which are ignored) were never seen.
586
587 - Duplicate table entries (this is, having the same tag) were not
588 rejected.
589
590 - The number of valid tables was sometimes too large, leading to
591 access of invalid tables.
592
593 * src/sfnt/ttload.c (check_table_dir): Add argument to return number
594 of valid tables.
595 Add another tracing message.
596 (tt_face_load_font_dir): Only allocate table array for valid
597 entries as returned by `check_table_dir'.
598 Reject duplicate tables and adjust number of valid tables
599 accordingly.
600
6012015-09-19 Werner Lemberg <wl@gnu.org>
602
Werner Lembergcb7a5122015-09-19 07:58:03 +0200603 [pcf] Improve `FT_ABS' fix from 2015-09-17 (#45999).
604
605 * src/pcf/pcfread.c (pcf_load_font): Do first the cast to FT_Short,
606 then take the absolute value.
607 Also apply FT_ABS to `height'.
608
Werner Lemberg9db9add2015-09-17 13:42:59 +02006092015-09-17 Werner Lemberg <wl@gnu.org>
610
Werner Lembergf28c95c2015-09-17 19:30:26 +0200611 [type42] Fix memory leak (#45989).
612
613 * src/type42/t42parse.c (t42_parse_charstrings): Allow only a single
614 `CharStrings' array.
615
6162015-09-17 Werner Lemberg <wl@gnu.org>
617
Werner Lemberg4942c2b2015-09-17 17:56:53 +0200618 [psaux] Fix memory leak (#45986).
619
620 * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
621 Free `temp' in case of error.
622
6232015-09-17 Werner Lemberg <wl@gnu.org>
624
Werner Lemberg7d364b72015-09-17 16:31:58 +0200625 [psaux] Improve tracing message.
626
627 * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
628 Handle plural correctly.
629
6302015-09-17 Werner Lemberg <wl@gnu.org>
631
Werner Lembergc838c4f2015-09-17 16:22:40 +0200632 [pcf] Fix integer overflows (#45985).
633
634 * src/pcf/pcfread.c (pcf_load_font): Use FT_MulDiv.
635
6362015-09-17 Werner Lemberg <wl@gnu.org>
637
Werner Lemberg9db9add2015-09-17 13:42:59 +0200638 [pcf] Use FT_ABS for some property values (#45893).
639
640 * src/pcf/pcfread.c (pcf_load_font): Take absolute values for
641 AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE, RESOLUTION_X, and
642 RESOLUTION_Y. In tracing mode, add warnings.
643
Werner Lembergbd0438a2015-09-16 18:05:43 +02006442015-09-16 Werner Lemberg <wl@gnu.org>
645
646 Minor fixes for some clang warnings.
647
648 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Cast, possible missing
649 initialization.
650
651 * src/truetype/ttgload.c (TT_Process_Composite_Component): Cast.
652
Werner Lemberg581c7e22015-09-15 06:49:06 +02006532015-09-15 Werner Lemberg <wl@gnu.org>
654
Werner Lemberg19cb1122015-09-15 08:52:36 +0200655 [type1, type42] Fix memory leaks (#45966).
656
657 * src/type1/t1load.c (parse_blend_axis_types): Handle multiple axis
658 names.
659 (parse_blend_design_map): Allow only a single design map.
660 (parse_encoding): Handle multiple encoding vectors.
661
662 * src/type42/t42parse.c (t42_parse_encoding): Handle multiple
663 encoding vectors.
664
6652015-09-15 Werner Lemberg <wl@gnu.org>
666
Werner Lemberg7f0f4012015-09-15 07:23:53 +0200667 [truetype] Fix integer type (#45965).
668
669 * src/truetype/ttobjs.c (tt_synth_sfnt_checksum): Implement it.
670
6712015-09-15 Werner Lemberg <wl@gnu.org>
672
Werner Lemberg577daf12015-09-15 07:10:16 +0200673 * src/pcf/pcfread.c (pcf_load_font): Fix integer overflow (#45964).
674
6752015-09-15 Werner Lemberg <wl@gnu.org>
676
Werner Lemberg581c7e22015-09-15 06:49:06 +0200677 [type1, type42] Check encoding array size (#45961).
678
679 * src/type1/t1load.c (parse_encoding), src/type42/t42parse.c
680 (t42_parse_encoding): Do it.
681
Alexei Podtelezhnikov3ea0d2c2015-09-13 23:19:34 -04006822015-09-14 Alexei Podtelezhnikov <apodtele@gmail.com>
683
684 * src/base/ftcalc.c (FT_MulFix) [FT_LONG64]: Improve.
685
Werner Lemberg7962a152015-09-14 00:38:26 +02006862015-09-14 Werner Lemberg <wl@gnu.org>
687
688 [type1] Fix another potential buffer overflow (#45955).
689
690 * src/type1/t1parse (T1_Get_Private_Dict): Assure that check for
691 `eexec' doesn't exceed `limit'.
692
Werner Lemberge40e8b32015-09-13 08:05:50 +02006932015-09-13 Werner Lemberg <wl@gnu.org>
694
Werner Lembergff7d6402015-09-13 23:53:16 +0200695 Replace `mkinstalldirs' with AC_PROG_MKDIR_P.
696
697 * builds/unix/mkinstalldirs: Removed, no longer needed.
698
699 * builds/unix/configure.raw: Call `AC_PROG_MKDIR_P'.
700 Update pwd call for `$INSTALL'.
701
702 * builds/unix/unix-def.in (MKINSTALLDIRS): Use `@MKDIR_P@'.
703
704 * autogen.sh: Updated.
705
7062015-09-13 Werner Lemberg <wl@gnu.org>
707
Werner Lemberg3df92aa2015-09-13 09:21:52 +0200708 [winfonts] Check alignment shift count for resource data (#45938).
709
710 * src/winfonts/winfnt.c (fnt_face_get_dll_font): Implement it.
711
7122015-09-13 Werner Lemberg <wl@gnu.org>
713
Werner Lemberge3058612015-09-13 08:41:43 +0200714 [type1] Fix potential buffer overflow (#45923).
715
716 * src/type1/t1parse.c (T1_Get_Private_Dict): Assure `cur' doesn't
717 point to end of file buffer.
718
7192015-09-13 Werner Lemberg <wl@gnu.org>
720
Werner Lemberge40e8b32015-09-13 08:05:50 +0200721 [gzip] Fix access of small compressed files (#45937).
722
723 * src/gzip/ftgzip.c (ft_gzip_stream_close): Avoid memory leak.
724
725 (ft_gzip_get_uncompressed_file): Correct byte order while reading
726 unsigned long value. Without this change, the whole optimization of
727 accessing small files in `FT_Stream_OpenGzip' is never executed! As
728 a consequence, access to PCF files in general (which are normally
729 small files) should be much improved now as originally intended.
730
Werner Lemberg23423bc2015-09-11 08:28:27 +02007312015-09-11 Werner Lemberg <wl@gnu.org>
732
Werner Lembergdb5a4a92015-09-12 08:32:55 +0200733 [psaux] Fix potential buffer overflow (#45922).
734
735 * src/psaux/psobjs.c (ps_parser_skip_PS_token): If a token is
736 enclosed in balanced expressions, ensure that the cursor position
737 doesn't get larger than the current limit.
738
7392015-09-11 Werner Lemberg <wl@gnu.org>
740
Werner Lemberg19b82cf2015-09-11 20:25:32 +0200741 [base] Avoid crash while tracing `load_mac_face'.
742
743 Reported in Savannah bug #45919.
744
745 * src/base/ftobjs.c (load_mac_face): Honour FT_OPEN_MEMORY while
746 tracing.
747
7482015-09-11 Werner Lemberg <wl@gnu.org>
749
Werner Lemberg23423bc2015-09-11 08:28:27 +0200750 [type42] Fix endless loop (#45920).
751
752 * src/type42/t42parse.c (t42_parse_encoding): Synchronize with
753 type1's `parse_encoding'.
754
Werner Lemberge5a27a72015-09-10 07:44:11 +02007552015-09-10 Werner Lemberg <wl@gnu.org>
756
757 [docmaker] Allow `-' in bold and italic markup.
758
759 * src/tools/docmaker/sources.py (re_italic, re_bold): Adjust
760 accordingly.
761
Alexei Podtelezhnikov09948e42015-09-09 21:30:15 -04007622015-09-09 Alexei Podtelezhnikov <apodtele@gmail.com>
763
764 * src/base/ftcalc.c (FT_RoundFix): Improve.
765
Wojciech Mamrak822acb02015-09-09 07:59:10 +02007662015-09-09 Wojciech Mamrak <wmamrak@gmail.com>
767
768 * src/base/ftcalc.c (FT_CeilFix, FT_FloorFix): Normalize.
769
770 This commit makes the functions behave as expected, this is,
771 rounding towards plus or minus infinity.
772
Alexei Podtelezhnikovb002f682015-09-07 13:47:36 -04007732015-09-07 Alexei Podtelezhnikov <apodtele@gmail.com>
774
775 * src/smooth/ftgrays.c (gray_render_line): Simplify clipping.
776
Alexei Podtelezhnikov5a6dc872015-09-04 23:14:46 -04007772015-09-04 Alexei Podtelezhnikov <apodtele@gmail.com>
778
779 [raster,smooth] Microoptimizations.
780
781 * src/raster/ftraster.c (Insert_Y_Turn, Finalize_Profile_Table,
782 Beziier_Up, ): Use do-while loops.
783
784 * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line,
785 gray_convert_glyph): Ditto.
786
Werner Lemberg696b7122015-09-04 10:10:59 +02007872015-09-04 Werner Lemberg <wl@gnu.org>
788
Werner Lembergd3cba0e2015-09-04 10:28:53 +0200789 [autofit] Redesign code ranges (2/2).
790
791 This commit adds two fallback scripts (`latb', `latp') and
792 implements support for the no-base character ranges introduced in
793 the previous commit.
794
795 * src/autofit/aftypes.h (AF_ScriptClassRec): Add
796 `script_uni_nobase_ranges' field.
797 (AF_DEFINE_SCRIPT_CLASS): Updated.
798
799 * src/autofit/afscript.h, src/autofit/afstyles.h: Add `latb' and
800 `latp' fallback scripts.
801
802 * src/autofit/afblue.dat: Add blue zones for Latin subscript and
803 superscript fallback scripts.
804
805 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
806
807 * src/autofit/afglobal.h (AF_NOBASE): New style flag for no-base
808 characters.
809 (AF_STYLE_MASK): Updated.
810
811 * src/autofit/afglobal.c (SCRIPT): Updated.
812 (af_face_globals_compute_style_coverage): Handle new style flag.
813
814 * src/autofit/aflatin.c (af_latin_hints_apply): Handle new style
815 flag.
816
817 * src/autofit/afranges.h (SCRIPT): Use it to export no-base ranges.
818
8192015-09-04 Werner Lemberg <wl@gnu.org>
820
Werner Lemberg696b7122015-09-04 10:10:59 +0200821 [autofit] Redesign code ranges (1/2).
822
823 This patch introduces auxiliary code ranges that identify no-base
824 characters; they refer to glyphs of a script that should be hinted
825 without alignments to blue zones (mostly diacritics).
826
827 It also splits off ranges for fallback scripts that handle subscript
828 and superscript characters not covered by OpenType features. For
829 example, this greatly helps improve the hinting of various phonetic
830 alphabets, which contain a large amount characters that look like
831 superscript glyphs.
832
833 Finally, code ranges are updated to Unicode 8.0, and enclosed
834 characters are removed in general since they normally look better if
835 they stay unhinted.
836
837 * src/autofit/afranges.c (af_latn_uniranges): Updated to Unicode
838 8.0.
839 Split off superscript-like and subscript-like glyphs into...
840
841 (af_latb_uniranges, af_latp_uniranges): ... these two new arrays.
842
843 (af_xxxx_nobase_uniranges): New arrays that hold no-base characters
844 of the corresponding character ranges.
845
Werner Lemberg8cbbcf62015-09-03 06:47:30 +02008462015-09-03 Werner Lemberg <wl@gnu.org>
847
848 [autofit] Pass glyph index to hinting function.
849
850 No functionality change yet.
851
852 * src/autofit/aftypes.h (AF_WritingSystem_ApplyHintsFunc): Pass
853 glyph index.
854
855 * src/autofit/afcjk.c, src/autofit/afcjk.h (af_cjk_hints_apply),
856 src/autofit/afdummy.c (af_dummy_hints_apply), src/autofit/afindic.c
857 (af_indic_hints_apply), src/autofit/aflatin.c
858 (af_latin_hints_apply), src/autofit/aflatin2.c
859 (af_latin2_hints_apply), src/autofit/afloader.c (af_loader_load_g):
860 Updated.
861
Werner Lemberg87c81f02015-08-30 10:35:21 +02008622015-08-30 Werner Lemberg <wl@gnu.org>
863
Werner Lemberg40103a32015-08-31 08:51:52 +0200864 [autofit] Code clean-up.
865
866 * src/autofit/afglobal.h (AF_STYLE_MASK): New macro.
867 (AF_STYLE_UNASSIGNED): Use AF_STYLE_MASK for definition.
868
869 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
870 Updated.
871
8722015-08-30 Werner Lemberg <wl@gnu.org>
873
Werner Lemberg87c81f02015-08-30 10:35:21 +0200874 [autofit] Make glyph style array use 16bit values.
875
876 * include/freetype/ftautoh.h (FT_Prop_GlyphToScriptMap): Use
877 `FT_UShort' for `map' field.
878
879 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage,
880 af_face_globals_new), src/autofit/hbshim.c, src/autofit/hbshim.h
881 (af_get_coverage): Use FT_UShort for `glyph_styles' array.
882
883 * src/autofit/afglobal.h (AF_STYLE_UNASSIGNED, AF_DIGIT): Extend to
884 16 bits.
885 (AF_FaceGlobalsRec): Use `FT_UShort' for `glyph_styles' field.
886
Werner Lemberg633d8ed2015-08-26 06:18:47 +02008872015-08-26 Werner Lemberg <wl@gnu.org>
888
889 * builds/unix/configure.raw: Need harfbuzz >= 0.9.21 (#45828).
890
Werner Lemberg78b01402015-08-25 07:23:01 +02008912015-08-25 Werner Lemberg <wl@gnu.org>
892
893 [base] Improve kerning tracing and documentation.
894
895 * src/base/ftobjs.c (FT_Get_Kerning): Emit tracing message if
896 scaled-down kerning values differ.
897
Werner Lemberg91d59162015-08-18 06:04:36 +02008982015-08-18 Werner Lemberg <wl@gnu.org>
899
900 [raster] Remove last remnants of `raster5' driver.
901
902 * src/raster/ftrend1.h (ft_raster5_renderer_class): Removed.
903
904 * src/raster/rastpic.c, src/raster/rastpic.h
905 (ft_raster5_renderer_class_pic_init,
906 ft_raster5_renderer_class_pic_free): Removed.
907
Alexei Podtelezhnikova0172d12015-08-17 22:58:59 -04009082015-08-17 Alexei Podtelezhnikov <apodtele@gmail.com>
909
910 [base] Improve emboldener (#45596).
911
912 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Correct displacement
913 of zero-lenght segments.
914
Alexei Podtelezhnikov00d89952015-08-16 22:57:34 -04009152015-08-16 Alexei Podtelezhnikov <apodtele@gmail.com>
916
Alexei Podtelezhnikov815c3242015-08-17 21:48:46 -0400917 [base] Reoptimize arithmetic.
Alexei Podtelezhnikov00d89952015-08-16 22:57:34 -0400918
919 * src/base/ftcalc.c (FT_MulDiv, FT_MulFix) [!FT_LONG64]: Remove
920 special cases that slow down the general use.
921
pazerf0ed30e2015-08-15 06:53:09 +02009222015-08-15 pazer <ibemad@gmail.com>
923
924 Fix C++ compilation (#45762).
925
926 * src/base/ftstroke.c (ft_outline_glyph_class): Use
927 FT_CALLBACK_TABLE.
928
Alexei Podtelezhnikovae258aa2015-08-14 23:23:18 -04009292015-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
930
931 [truetype] Clean up.
932
933 * src/truetype/ttgload.c (TT_Process_Composite_Component): Use
934 `FT_Outline_Transform' and `FT_Outline_Translate'.
935 (translate_array): Dropped.
936
Werner Lembergd0d7ee02015-08-14 14:30:58 +02009372015-08-14 Andreas Enge <andreas.enge@inria.fr>
938
939 * builds/unix/detect.mk (CONFIG_SHELL): Don't handle it (#44261).
940
Werner Lemberg14d6b5d2015-08-13 15:22:17 +02009412015-08-13 Werner Lemberg <wl@gnu.org>
942
943 [truetype] Introduce named instance access to GX fonts.
944
945 For functions querying a face, bits 16-30 of the face index can hold
946 the named instance index if we have a GX font. The indices start
947 with value 1; value 0 indicates font access without GX variation
948 data.
949
950 * include/freetype/freetype.h (FT_FaceRec): Update documentation.
951 * include/freetype/internal/sfnt.h: Ditto.
952
953 * src/sfnt/sfobjs.c (sfnt_init_face)
954 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Get number of named instances and
955 do argument checks.
956 (sfnt_load_face): Updated.
957
958 * src/truetype/ttobjs.c (tt_face_init)
959 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Use named instance, overwriting
960 the style name.
961
962 * src/base/ftobjs.c (open_face_from_buffer,
963 open_face_PS_from_sfnt_stream): Updated.
964 * src/bdf/bdfdrivr.c (BDF_Face_Init): Updated.
965 * src/cff/cffload.c (cff_font_load): Updated.
966
967 * src/cff/cffobjs.c (cff_face_init): Make function exit early for
968 pure CFF fonts if `font_index < 0'.
969 Updated.
970
971 * src/cid/cidobjs.c (cid_face_init): Updated.
972 * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated.
973 * src/pfr/pfrobjs.c (pfr_face_init): Updated.
974 * src/type1/t1objs.c (T1_Face_Init): Updated.
975 * src/type42/t42objs.c (T42_Face_Init): Updated.
976 * src/winfonts/winfnt.c (fnt_face_get_dll_font, FNT_Face_Init):
977 Updated.
978
979 * docs/CHANGES: Updated.
980
Alexei Podtelezhnikov4a466862015-08-12 23:45:40 -04009812015-08-12 Alexei Podtelezhnikov <apodtele@gmail.com>
982
983 [type1,cff,cid] Streamline font matrix application.
984
985 * src/type1/t1gload.c (T1_Load_Glyph): Directly modify advances only
986 if font matrix is not trivial.
987 * src/cff/cffgload.c (cff_slot_load): Ditto.
988 * sff/cid/cidgload.c (cid_slot_load_glyph): Ditto for advances and the
989 entire outline.
990
Werner Lemberg7ebe6ac2015-08-11 06:47:25 +02009912015-08-11 Werner Lemberg <wl@gnu.org>
992
993 [builds/unix] Minor.
994
995 * builds/unix/configure.raw:
996 s/lib{priv,staticconf}/libs{priv,staticconf}/ for orthogonality with
997 similarly named uppercase variables.
998
Alexei Podtelezhnikova37da212015-08-10 23:05:02 -04009992015-08-10 Alexei Podtelezhnikov <apodtele@gmail.com>
1000
1001 [type1,cid,type42] Minor improvements.
1002
1003 * src/type1/t1load.c (t1_parse_font_matrix): Scale units per EM only
1004 when necessary. Refresh comments.
1005 * src/cid/cidload.c (cid_parse_font_matrix): Ditto.
1006 * src/type42/t42parse.c (t42_parse_font_matrix): Refresh comments.
1007
Werner Lemberge5f44692015-08-08 07:45:03 +020010082015-08-08 Werner Lemberg <wl@gnu.org>
1009
Werner Lembergbd75a512015-08-08 08:39:45 +02001010 [type42] Fix glyph access.
1011
1012 This is a severe bug: We've missed one level of indirection, as
1013 described in the Type 42 specification. As a result, ftview
1014 sometimes showed incorrect glyphs for given glyph names, and even
1015 displayed `error 0x0006' (invalid argument!) in case the number of
1016 glyph indices differed between the Type 42 font and the embedded
1017 TTF.
1018
1019 Apparently, noone ever noticed it; this shows how much Type 42 fonts
1020 are in use...
1021
1022 * src/type42/t42objs.c (T42_GlyphSlot_Load): Map Type 42 glyph index
1023 to embedded TTF's glyph index.
1024
10252015-08-08 Werner Lemberg <wl@gnu.org>
1026
Werner Lemberge5f44692015-08-08 07:45:03 +02001027 [type42] Minor clean-up.
1028
1029 * src/type42/t42parse.c (t42_parse_font_matrix): Remove unused
1030 variable.
1031
Alexei Podtelezhnikovfd705122015-08-06 21:49:08 -040010322015-08-06 Alexei Podtelezhnikov <apodtele@gmail.com>
1033
1034 [type42] Parse FontMatrix according to specifications.
1035
1036 * src/type42/t42parse.c (t42_parse_font_matrix): Type 42 FontMatrix
1037 does not need scaling by 1000. Units_per_EM are taken from the
1038 embedded TrueType.
1039
Werner Lembergff406e22015-08-06 07:34:50 +020010402015-08-06 Werner Lemberg <wl@gnu.org>
1041
1042 [autofit] Improve Arabic hinting.
1043
1044 Problem reported by Titus Nemeth <tn@tntypography.eu> (by using
1045 ttfautohint).
1046
1047 * src/autofit/afblue.dat: Add neutral blue zone for the tatweel
1048 character.
1049
1050 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1051
Alexei Podtelezhnikov98e8e992015-08-06 00:06:14 -040010522015-08-05 Alexei Podtelezhnikov <apodtele@gmail.com>
1053
1054 [truetype] Clean up types.
1055
1056 * src/truetype/ttobjs.c (TT_Size): Move declaration from here.
1057 * include/freetype/internal/tttypes.h (TT_Size): ... to here.
1058 (TT_LoaderRec): Switch to appropriate types for `face' and `size'.
1059 * src/truetype/ttgload.c: Remove corresponding type casts.
1060 * src/truetype/ttsubpix.c: Ditto.
1061
Werner Lemberg15e2a4f2015-08-05 21:53:50 +020010622015-08-05 Werner Lemberg <wl@gnu.org>
1063
1064 [autofit] Improve recognition of flat vs. rounded segments.
1065
1066 Lower the flatness threshold from upem/8 to upem/14, making the
1067 auto-hinter accept shorter elements.
1068
1069 Synchronize flat/round stem selection algorithm with blue zone code.
1070
1071 * src/autofit/aflatin.c (FLAT_THRESHOLD): New macro.
1072 (af_latin_metrics_init_blues): Use it.
1073 (af_latin_hints_compute_segments): Collect information on maximum
1074 and minimum coordinates of `on' points; use this to add a constraint
1075 for the flat/round decision similar to
1076 `af_latin_metrics_init_blues'.
1077
Werner Lembergeb22ef22015-08-04 06:50:04 +020010782015-08-04 Werner Lemberg <wl@gnu.org>
1079
1080 Another left-shift bug (#45681).
1081
1082 * src/base/ftobjs.c (IsMacBinary): Only accept positive values for
1083 `dlen'.
1084
Alexei Podtelezhnikov7e6c3212015-08-03 23:26:13 -040010852015-08-03 Alexei Podtelezhnikov <apodtele@gmail.com>
1086
1087 [base] Fix `ft_corner_orientation'.
1088
1089 Remove casting from `FT_Long' to `FT_Int' that might change the sign
1090 of the return value and make it faster too.
1091
1092 * src/base/ftcalc.c (ft_corner_orientation): On 32-bit systems, stay
1093 with 32-bit arithmetic when safe. Use plain math on 64-bit systems.
1094 * src/pshinter/pshalgo.c: Remove old unused code.
1095
Werner Lembergca6a5cf2015-08-03 08:51:18 +020010962015-08-03 Werner Lemberg <wl@gnu.org>
1097
Werner Lemberg8dfc7602015-08-03 12:23:30 +02001098 * src/truetype/ttgload.c (load_truetype_glyph)
1099 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Fix crash for composite glyphs
1100 having a depth greater than 1.
1101
11022015-08-03 Werner Lemberg <wl@gnu.org>
1103
Werner Lembergca6a5cf2015-08-03 08:51:18 +02001104 Fix typo in clang bug from 2015-07-31 (#45678).
1105
1106 * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Fix inequality.
1107
Werner Lemberg70e9d812015-08-02 09:42:12 +020011082015-08-02 Werner Lemberg <wl@gnu.org>
1109
Werner Lemberga82c45d2015-08-02 18:35:49 +02001110 * CMakeLists.txt: Improve shared library support.
1111
1112 Based on a patch from John Cary <cary@txcorp.com>.
1113
11142015-08-02 Werner Lemberg <wl@gnu.org>
1115
Werner Lemberg682c2712015-08-02 15:46:26 +02001116 * builds/unix/freetype-config.in (enable_shared): Remove. Unused.
1117
11182015-08-02 Werner Lemberg <wl@gnu.org>
1119
Werner Lemberg70e9d812015-08-02 09:42:12 +02001120 Fix more invalid left-shifts.
1121
1122 * src/pfr/pfrgload.c (pfr_glyph_load_compound): Use multiplication,
1123 not left-shift.
1124
1125 * src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar,
1126 tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Use multiplication,
1127 not left-shift.
1128
Werner Lemberg5d1b8ab2015-07-31 21:49:07 +020011292015-07-31 Werner Lemberg <wl@gnu.org>
1130
Werner Lemberg6343ba22015-08-01 07:53:48 +02001131 Fix some bugs found by clang's `-fsanitize=undefined' (#45661).
1132
1133 * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Only accept
1134 positive values from header.
1135 Check overflow.
1136
1137 * src/base/ftoutln.c (SCALED): Correctly handle left-shift of
1138 negative values.
1139
1140 * src/bdf/bdf.h (_bdf_glyph_modified, _bdf_set_glyph_modified,
1141 _bdf_clear_glyph_modified): Use unsigned long constant.
1142
1143 * src/bdf/bdfdrivr.c (BDF_Size_Select, BDF_Glyph_Load): Don't
1144 left-shift values that can be negative.
1145
1146 * src/pcf/pcfdrivr.c (PCF_Size_Select, PCF_Glyph_Load): Don't
1147 left-shift values that can be negative.
1148
1149 * src/raster/ftraster.c (SCALED): Correctly handle left-shift of
1150 negative values.
1151
1152 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Don't left-shift
1153 values that can be negative.
1154
1155 * src/truetype/ttgload.c (TT_Load_Composite_Glyph,
1156 compute_glyph_metrics, load_sbit_image): Don't left-shift values
1157 that can be negative.
1158
11592015-07-31 Werner Lemberg <wl@gnu.org>
1160
Werner Lemberg5d1b8ab2015-07-31 21:49:07 +02001161 Define FT_LONG_MAX.
1162
1163 * include/freetype/config/ftstdlib.h (FT_LONG_MAX): New macro.
1164 * src/cff/cf2arrst.c (cf2_arrstack_setNumElements): Use it.
1165
11662015-07-28 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov2b07a5a2015-07-28 23:14:30 -04001167
1168 * src/base/ftcalc.c (FT_Vector_NormLen): Clarify.
1169
Werner Lemberg5d1b8ab2015-07-31 21:49:07 +020011702015-07-27 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikove8b186e2015-07-27 23:22:34 -04001171
1172 * src/base/ftcalc.c (FT_Vector_NormLen): Explicate type conversions.
1173
Matthias Clasenb650dfb2015-07-26 21:08:34 +020011742015-07-26 Matthias Clasen <matthias.clasen@gmail.com>
1175
1176 [cff] Don't use `hmtx' table for LSB (#45520).
1177
1178 * src/cff/cffgload.c (cff_slot_load): Use `htmx' table for advance
1179 width only. Bug introduced 2015-04-10.
1180
Werner Lembergf9be5672015-07-09 15:10:31 +020011812015-07-09 Werner Lemberg <wl@gnu.org>
1182
1183 Better support of user-supplied C++ namespaces.
1184
1185 See
1186
1187 http://lists.nongnu.org/archive/html/freetype-devel/2015-07/msg00008.html
1188
1189 for a rationale.
1190
1191 * src/autofit/afpic.h, src/base/basepic.h, src/cff/cffpic.h,
1192 src/pshinter/pshpic.h, src/psnames/pspic.h, src/raster/rastpic.h,
1193 src/sfnt/sfntpic.h, src/smooth/ftspic.h, src/truetype/ttpic.h
1194 (FT_BEGIN_HEADER, FT_END_HEADER): Move macro calls to not enclose
1195 header files that contain FT_{BEGIN,END}_HEADER macros by
1196 themselves.
1197
1198 * src/autofit/aftypes.h [FT_DEBUG_AUTOFIT]: Include
1199 FT_CONFIG_STANDARD_LIBRARY_H earlier.
1200
1201 * src/truetype/ttpic.h: Include FT_INTERNL_PIC_H.
1202
Werner Lemberg1cdac102015-07-07 14:04:44 +020012032015-07-07 Werner Lemberg <wl@gnu.org>
1204
1205 [sfnt] Make `tt_face_get_name' member of the SFNT interface.
1206
1207 * include/freetype/internal/sfnt.h (TT_Get_Name_Func): New
1208 prototype.
1209 (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): New member `get_name'.
1210
1211 * src/sfnt/sfdriver.c (sfnt_interface): Updated.
1212
1213 * src/sfnt/sfobjs.c (tt_face_get_name): Tag it with `LOCAL_DEF'.
1214 * src/sfnt/sfobjs.h: Add prototype for it.
1215
Werner Lembergeb1bba92015-06-30 09:46:39 +020012162015-06-30 Werner Lemberg <wl@gnu.org>
1217
1218 Fix some clang compiler warnings.
1219
1220 * src/base/ftoutln.c (FT_Outline_EmboldenXY), src/cff/cf2intrp.c
1221 (cf2_interpT2CharString), src/truetype/ttgload.c
1222 (load_truetype_glyph), src/truetype/ttgxvar.c (tt_handle_deltas),
1223 src/truetype/ttinterp.c (Ins_INSTCTRL): Fix signedness issues.
1224
Alexei Podtelezhnikov884e4e62015-06-29 22:32:05 -040012252015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
1226
Alexei Podtelezhnikov5aaabb42015-06-29 22:46:54 -04001227 [truetype] Speed up bytecode interpreter.
1228
1229 * src/truetype/ttinterp.c (Normalize): Use `FT_Vector_NormLen'.
1230
12312015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
1232
Alexei Podtelezhnikov9ef02bd2015-06-29 22:39:10 -04001233 [base] Speed up emboldening.
1234
Werner Lembergeb1bba92015-06-30 09:46:39 +02001235 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Use
1236 `FT_Vector_NormLen'.
Alexei Podtelezhnikov9ef02bd2015-06-29 22:39:10 -04001237
12382015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
1239
Alexei Podtelezhnikov884e4e62015-06-29 22:32:05 -04001240 [base] Implement fast vector normalization.
1241
1242 The function uses Newton's iterations instead of dividing vector
1243 components by its length, which needs a square root. This is,
1244 literally, a bit less accurate but a lot faster.
1245
1246 * src/base/ftcalc.c (FT_Vector_NormLen): New function.
1247
Werner Lemberg22479ca2015-06-28 10:26:33 +020012482015-06-28 Werner Lemberg <wl@gnu.org>
1249
Werner Lemberg7cdc77f2015-06-28 11:40:02 +02001250 * CMakeLists.txt: Always create `ftconfig.h'.
1251
1252 For non-UNIX builds, the file stays unmodified. However, it's
1253 better to have the main configuration files at the same place
1254 regardless of the OS.
1255
12562015-06-28 Werner Lemberg <wl@gnu.org>
1257
Werner Lemberg2c89e2c2015-06-28 11:06:47 +02001258 * CMakeLists.txt: Improve MSVC support (#43737).
1259
12602015-06-28 Werner Lemberg <wl@gnu.org>
1261
Werner Lemberg52c9b1a2015-06-28 11:03:10 +02001262 [cmake] Check for libraries and create `ftoption.h'.
1263
1264 * builds/FindHarfBuzz.cmake: New file, taken from
1265
1266 https://trac.webkit.org/browser/trunk/Source/cmake/FindHarfBuzz.cmake
1267
1268 * CMakeLists.Txt: Add path to local cmake modules.
1269 Find dependencies for zlib, bzip2, libpng, and harfbuzz.
1270 Create `ftoption.h' file.
1271 Set up include and linker stuff for libraries.
1272
12732015-06-28 Werner Lemberg <wl@gnu.org>
1274
Werner Lemberg97b757d2015-06-28 10:42:47 +02001275 * CMakeLists.txt: Fix creation of `ftconfig.h'.
1276 Check for UNIX header files using `check_include_file'.
1277 Set up correct header include directories.
1278
12792015-06-28 Werner Lemberg <wl@gnu.org>
1280
Werner Lemberg22479ca2015-06-28 10:26:33 +02001281 * CMakeLists.txt: Disallow in-source builds.
1282
Werner Lemberg802f6a92015-06-27 07:12:42 +020012832015-06-27 Werner Lemberg <wl@gnu.org>
1284
1285 * src/tools/docmaker/utils.py (check_output): Add missing `\n'.
1286
Werner Lemberg94c79c22015-06-26 06:46:59 +020012872015-06-26 Werner Lemberg <wl@gnu.org>
1288
Werner Lemberg802f6a92015-06-27 07:12:42 +02001289 * CMakeLists.txt: Select platform-dependent `ftdebug.c'.
Werner Lemberg94c79c22015-06-26 06:46:59 +02001290
Werner Lemberg392cf222015-06-25 13:04:57 +020012912015-06-25 Werner Lemberg <wl@gnu.org>
1292
Werner Lemberg68222dd2015-06-25 16:38:11 +02001293 * CMakeLists.txt: Use cmake functions for generating `ftconfig.h'.
1294 Additionally, do this for UNIX only.
1295
12962015-06-25 Werner Lemberg <wl@gnu.org>
1297
Werner Lemberg5ef5a4f2015-06-25 15:45:13 +02001298 * CMakeLists.txt (BASE_SRCS): Use `ftbase.c' and `psnames.c'.
1299
13002015-06-25 Werner Lemberg <wl@gnu.org>
1301
Werner Lemberg392cf222015-06-25 13:04:57 +02001302 Another adjustment to header locations.
1303
1304 This change is a result of a discussion thread on freetype-devel
1305
1306 http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html
1307
1308 Re-introduce the `freetype2' subdirectory for all FreeType header
1309 files after installation, and rename the `freetype2' subdirectory in
1310 the git repository to `freetype'.
1311
1312 * include/freetype2: Renamed to...
1313 * include/freetype: This.
1314
1315 * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
1316 PRIVATE_HEADERS): Updated.
1317 Update creation of `ftconfig.h'.
1318 Install generated `ftconfig.h'.
1319
1320 * Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
1321
1322 * builds/amiga/include/config/ftconfig.h, builds/freetype.mk
1323 (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
1324 builds/unix/freetype2.in: Updated.
1325
1326 * builds/unix/freetype-config.in: Updated.
1327 * builds/unix/configure.raw: Don't check for `rmdir'.
1328 * builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable
1329 according to the autoconf info manual.
1330 * builds/unix/install.mk (install, uninstall,
1331 distclean_project_unix): Update and simplify.
1332
1333 * builds/wince/*, builds/windows/*: Updated.
1334
1335 * devel/ft2build.h, include/ft2build.h: Updated.
1336
1337 * include/freetype2/config/ftheader.h,
1338 include/freetype2/internal/ftserv.h,
1339 include/freetype2/internal/internal.h: Update all header file
1340 macros.
1341
1342 * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
1343
1344 * docs/*: Updated.
1345
Werner Lemberg1982a882015-06-26 06:52:34 +020013462015-06-24 Alexei Podtelezhnikov <apodtele@gmail.com>
1347
1348 * src/bdf/bdflib.c (_bdf_parse_start): Disallow 0 bpp.
1349
13502015-06-24 Alexei Podtelezhnikov <apodtele@gmail.com>
1351
1352 * src/bdf/bdflib.c (_bdf_parse_start): Simplify bpp parsing.
1353
Werner Lemberg59312682015-06-23 09:24:48 +020013542015-06-23 Werner Lemberg <wl@gnu.org>
1355
1356 s/TYPEOF/FT_TYPEOF/ (#45376).
1357
1358 * builds/unix/ftconfig.in, builds/vms/ftconfig.in,
1359 include/freetype2/config/ftconfig.h,
1360 include/freetype2/internal/ftobjs.h, src/autofit/afwarp.h: Do it.
1361
Werner Lemberg8502c982015-06-22 06:35:23 +020013622015-06-22 Werner Lemberg <wl@gnu.org>
1363
1364 Fix Savannah bug #45097.
1365
1366 We no longer `pollute' the namespace of possible header file names;
1367 instead we move `ft2build.h' up by one level so that it gets
1368 installed in the default include directory (e.g.,
1369 /usr/local/include). After this commit, only `ft2build.h' stays in
1370 the compiler's include path.
1371
1372 No visible changes for the user who follows the standard FreeType
1373 header inclusion rules.
1374
1375 * include/*: Move to ...
1376 * include/freetype2/*: This directory, except `ft2build.h'.
1377
1378 * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
1379 PRIVATE_HEADERS), Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
1380
1381 * builds/amiga/include/config/ftconfig.h, builds/freetype.mk
1382 (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
1383 builds/unix/install.mk (install, uninstall),
1384 builds/unix/freetype2.in: Updated.
1385
1386 * builds/unix/freetype-config.in: Updated.
1387 Emit -I directory only if it is not `/usr/include'.
1388
1389 * builds/wince/*, builds/windows/*: Updated.
1390
1391 * devel/ft2build.h, include/ft2build.h: Updated.
1392
1393 * include/freetype2/config/ftheader.h,
1394 include/freetype2/internal/ftserv.h,
1395 include/freetype2/internal/internal.h: Update all header file
1396 macros.
1397
1398 * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
1399
Werner Lemberg31d97df2015-06-21 19:12:12 +020014002015-06-21 Werner Lemberg <wl@gnu.org>
1401
1402 Make Jam support work again.
1403
1404 This is just very basic stuff and just a little bit tested on
1405 GNU/Linux only. I won't delve into this since I'm not a Jam user.
1406
1407 * Jamfile: Call `HDRMACRO' for `ftserv.h' also.
1408 (DEFINES): Replace with...
1409 (CCFLAGS): ... this.
1410
1411 * src/Jamfile: Don't call `HDRMACRO' for `internal.h'; this is
1412 already handled in the top-level Jamfile.
1413
1414 * src/autofit/Jamfile (DEFINES): Replace with...
1415 (CCFLAGS): ... this.
1416 (_sources): Add missing files.
1417
1418 * src/cache/Jamfile: Don't call `HDRMACRO' for `ftcache.h'; it no
1419 longer contains macro header definitions.
1420
1421 * src/base/Jamfile, src/cff/Jamfile, src/sfnt/Jamfile,
1422 src/truetype/Jamfile (_sources): Add missing files.
1423
Werner Lemberg1a147ac2015-06-16 10:20:07 +020014242015-06-16 Werner Lemberg <wl@gnu.org>
1425
1426 Fix Savannah bug #45326.
1427
1428 * src/sfnt/sfntpic.h (SFNT_SERVICES_GET): Remove duplicate
1429 definitions.
1430
Werner Lemberge1862302015-06-07 16:11:18 +020014312015-06-07 Werner Lemberg <wl@gnu.org>
1432
1433 * Version 2.6 released.
1434 =======================
1435
1436
1437 Tag sources with `VER-2-6'.
1438
1439 * docs/VERSION.DLL: Update documentation and bump version number to
1440 2.6.
1441
1442 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
1443 builds/windows/vc2005/index.html,
1444 builds/windows/vc2008/freetype.vcproj,
1445 builds/windows/vc2008/index.html,
1446 builds/windows/vc2010/freetype.vcxproj,
1447 builds/windows/vc2010/index.html,
1448 builds/windows/visualc/freetype.dsp,
1449 builds/windows/visualc/freetype.vcproj,
1450 builds/windows/visualc/index.html,
1451 builds/windows/visualce/freetype.dsp,
1452 builds/windows/visualce/freetype.vcproj,
1453 builds/windows/visualce/index.html,
1454 builds/wince/vc2005-ce/freetype.vcproj,
1455 builds/wince/vc2005-ce/index.html,
1456 builds/wince/vc2008-ce/freetype.vcproj,
1457 builds/wince/vc2008-ce/index.html: s/2.5.5/2.6/, s/255/26/.
1458
1459 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 6.
1460 (FREETYPE_PATCH): Set to 0.
1461
1462 * builds/unix/configure.raw (version_info): Set to 18:0:12.
Werner Lemberg8cabd912015-10-04 08:18:01 +02001463 * CMakeLists.txt (VERSION_MINOR): Set to 6.
1464 (VERSION_PATCH): Set to 0.
Werner Lemberge1862302015-06-07 16:11:18 +02001465
1466 * src/autofit/afmodule.c [!FT_MAKE_OPTION_SINGLE_OBJECT]: Add
1467 declarations for dumping functions.
1468
1469 * src/truetype/ttinterp.c (TT_New_Context): Pacify compiler.
1470
1471 * builds/toplevel.mk: Use `freetype.mk's code to compute the version
1472 string.
1473 Don't include a zero patch level in version string.
1474 * builds/freetype.mk: Remove code for computing the version string.
1475
Ashish Azad472119a2015-06-06 05:45:17 +020014762015-06-06 Ashish Azad <ashish.azad@samsung.com>
1477
1478 Fix Savannah bug #45260.
1479
1480 * src/pfr/pfrdrivr.c (pfr_get_kerning): Fix typo.
1481
Werner Lemberg75534a02015-06-03 00:54:09 +020014822015-06-03 Werner Lemberg <wl@gnu.org>
1483
1484 [truetype] Fix memory leak.
1485
1486 Problem reported by Grissiom <chaos.proton@gmail.com>; in
1487
1488 http://lists.nongnu.org/archive/html/freetype/2015-05/msg00013.html
1489
1490 there is an example code to trigger the bug.
1491
1492 * src/truetype/ttobjs.c (tt_size_init_bytecode): Free old `size'
1493 data before allocating again. Bug most probably introduced four
1494 years ago in version 2.4.3.
1495
14962015-06-02 Werner Lemberg <wl@gnu.org>
Werner Lemberg54d04282015-06-01 12:12:06 +02001497
Werner Lembergd1ade6d2015-06-02 11:44:52 +02001498 [raster] Add more tracing.
1499
1500 * src/raster/ftraster.c (FT_TRACE7) [_STANDALONE_]: Define.
1501 (Vertical_Sweep_Span, Vertical_Sweep_Drop, Horizontal_Sweep_Span,
1502 Horizontal_Sweep_Drop, Render_Glyph): Add tracing calls.
1503
15042015-06-01 Werner Lemberg <wl@gnu.org>
1505
Werner Lemberg54d04282015-06-01 12:12:06 +02001506 [truetype] While tracing opcodes, show code position and stack.
1507
1508 * src/truetype/ttinterp.c: Change all existing TRACE7 calls to
1509 TRACE6.
1510 (opcode_name): Add string lengths.
1511 (TT_RunIns): Implement display of code position and stack.
1512
Werner Lembergcdee7d12015-05-31 11:54:42 +020015132015-05-31 Werner Lemberg <wl@gnu.org>
1514
Werner Lemberge9df4e42015-05-31 12:21:34 +02001515 [truetype] In GX, make private point numbers work correctly.
1516
1517 This is completely missing in Apple's documentation: If a `gvar'
1518 tuple uses private point numbers (this is, deltas are specified for
1519 some points only), the uncovered points must be interpolated for
1520 this tuple similar to the IUP bytecode instruction. Examples that
1521 need this functionality are glyphs `Oslash' and `Q' in Skia.ttf.
1522
1523 * src/truetype/ttgxvar.c (tt_delta_shift, tt_delta_interpolate,
1524 tt_handle_deltas): New functions.
1525 (TT_Vary_Get_Glyph_Deltas): Renamed to...
1526 (TT_Vary_Apply_Glyph_Deltas): ... this; it directly processes the
1527 points and does no longer return an array of deltas.
1528 Add tracing information.
1529 Call `tt_handle_deltas' to interpolate missing deltas.
1530 Also fix a minor memory leak in case of error.
1531
1532 * src/truetype/ttgxvar.h: Updated.
1533
1534 * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
1535 load_truetype_glyph): Updated.
1536
15372015-05-31 Werner Lemberg <wl@gnu.org>
1538
Werner Lemberg9845c1d2015-05-31 11:57:31 +02001539 [truetype] In GX, make intermediate tuplets work at extrema.
1540
1541 * src/truetype/ttgxvar.c (ft_var_apply_tuple): Fix range condition.
1542
15432015-05-31 Werner Lemberg <wl@gnu.org>
1544
Werner Lembergcdee7d12015-05-31 11:54:42 +02001545 [truetype] Add tracing information to GX code.
1546
1547 * src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar,
1548 ft_var_apply_tuple, TT_Get_MM_Var, TT_Set_MM_Blend,
1549 TT_Set_Var_Design, tt_face_vary_cvt): Do it.
1550
Werner Lemberg366b2ea2015-05-28 10:58:40 +020015512015-05-28 Werner Lemberg <wl@gnu.org>
1552
1553 * src/tools/apinames.c (names_dump): Fix invalid reference.
1554
1555 Problem reported by Guzman Mosqueda, Jose R
1556 <jose.r.guzman.mosqueda@intel.com>.
1557
Werner Lemberga5e1f6f2015-05-24 23:29:23 +020015582015-05-24 Werner Lemberg <wl@gnu.org>
1559
1560 [truetype] Fix commit from 2015-05-22.
1561
1562 * src/truetype/ttgload.c, src/truetype/ttinterp.c: Guard new code
1563 with `TT_CONFIG_OPTION_SUBPIXEL_HINTING'.
1564
1565 Problem reported by Nikolaus Waxweiler <madigens@gmail.com>.
1566
Werner Lembergbb435da2015-05-23 07:21:25 +020015672015-05-23 Werner Lemberg <wl@gnu.org>
1568
Werner Lemberg7f099482015-05-24 09:50:24 +02001569 [truetype] Fix return values of GETINFO bytecode instruction.
1570
1571 * src/truetype/ttinterp.h (TT_ExecContextRec): New fields
1572 `vertical_lcd' and `gray_cleartype'.
1573
1574 * src/truetype/ttgload.c (tt_loader_init): Initialize new fields.
1575 Change `symmetrical smoothing' to TRUE, since FreeType produces
1576 exactly this.
1577
1578 * src/truetype/ttinterp.c (Ins_GETINFO): Fix selector/return bit
1579 values for symmetrical smoothing, namely 11/18.
1580 Handle bits for vertical LCD subpixels (8/15) and Gray ClearType
1581 (12/19).
1582
15832015-05-23 Werner Lemberg <wl@gnu.org>
1584
Werner Lembergbb435da2015-05-23 07:21:25 +02001585 [truetype] Minor.
1586
1587 * src/truetype/ttinterp.h (TT_ExecContext):
1588 s/subpixel/subpixel_hinting.
1589
1590 * src/truetype/ttgload.c, src/truetype/ttgload.h: Updated.
1591
15922015-05-22 Werner Lemberg <wl@gnu.org>
Werner Lemberg790b8df2015-05-20 12:33:40 +02001593
Werner Lembergc61cad82015-05-22 22:02:15 +02001594 [truetype] Support selector index 3 of the INSTCTRL instruction.
1595
1596 This flag activates `native ClearType hinting', disabling backwards
1597 compatibility mode as described in Greg Hitchcocks whitepaper. In
1598 other words, it enables unrestricted functionality of all TrueType
1599 instructions in ClearType.
1600
1601 * src/truetype/ttgload.c (tt_get_metrics): Call `sph_set_tweaks'
1602 unconditionally.
1603 (tt_loader_init): Unset `ignore_x_mode' flag if bit 2 of
1604 `GS.instruct_control' is active.
1605
1606 * src/truetype/ttinterp.c (Ins_INSTCTRL): Handle selector index 3.
1607 (Ins_GETINFO): Updated.
1608
1609 * docs/CHANGES: Document it.
1610
16112015-05-20 Werner Lemberg <wl@gnu.org>
1612
Werner Lemberg790b8df2015-05-20 12:33:40 +02001613 [truetype] Minor.
1614
1615 * src/truetype/ttinterp.h (SetSuperRound): Fix type of `GridPeriod'
1616 argument.
1617
Werner Lemberg0a6b6ff2015-05-17 22:54:48 +020016182015-05-17 Werner Lemberg <wl@gnu.org>
1619
1620 [truetype] Fix loading of composite glyphs.
1621
1622 * src/truetype/ttgload.c (TT_Load_Composite_Glyph): If the
1623 ARGS_ARE_XY_VALUES flag is not set, handle argument values as
1624 unsigned. I trust `ttx' (which has exactly such code) that it does
1625 the right thing here...
1626
1627 The reason that noone has ever noticed this bug is probably the fact
1628 that point-aligned subglyphs are rare, as are subglyphs with a
1629 number of points in the range [128;255], which is quite large (or
1630 even in the range [32768;65535], which is extremely unlikely).
1631
Chris Liddelld65bf722015-05-12 07:16:46 +020016322015-05-12 Chris Liddell <chris.liddell@artifex.com>
1633
Chris Liddella87fb8c2015-05-12 07:27:35 +02001634 [cff] Make the `*curveto' operators more tolerant.
1635
1636 * src/cff/cf2intrp.c (cf2_interpT2CharString): The opcodes
1637 `vvcurveto', `hhcurveto', `vhcurveto', and `hvcurveto' all iterate,
1638 pulling values off the stack until the stack is exhausted.
1639 Implicitly the stack must be a multiple (or for subtly different
1640 behaviour) a multiple plus a specific number of extra values deep.
1641 If that's not the case, enforce it (as the old code did).
1642
16432015-05-12 Chris Liddell <chris.liddell@artifex.com>
1644
Chris Liddelld65bf722015-05-12 07:16:46 +02001645 [cff] fix incremental interface with new cff code.
1646
1647 * src/cff/cf2ft.c (cf2_getSeacComponent): When using the incremental
1648 interface to retrieve glyph data for a SEAC, it be left to the
1649 incremental interface callback to apply the encoding to raw
1650 character index (as it was in the previous code).
1651
Alexei Podtelezhnikov40914952015-04-29 21:57:30 -040016522015-04-29 Alexei Podtelezhnikov <apodtele@gmail.com>
1653
1654 [autofit] Speed up IUP.
1655
1656 * src/autofit/afhints.c (af_iup_interp): Separate trivial snapping to
1657 the same position from true interpolation, use `scale' to reduce
1658 divisions.
1659
Werner Lemberg3cc076d2015-04-28 09:16:27 +020016602015-04-28 Werner Lemberg <wl@gnu.org>
1661
1662 [cff] Use `name' table for PS name if we have a SFNT-CFF.
1663
1664 This follows the OpenType 1.7 specification. See
1665
1666 http://tug.org/pipermail/tex-live/2015-April/036634.html
1667
1668 for a discussion.
1669
1670 * src/cff/cffdrivr.c (cff_get_ps_name): Use the `sfnt' service if we
1671 have an SFNT.
1672
Alexei Podtelezhnikov40623a12015-04-27 22:27:00 -040016732015-04-27 Alexei Podtelezhnikov <apodtele@gmail.com>
1674
1675 [truetype] Speed up IUP.
1676
1677 * src/truetype/ttinterp.c (_iup_worker_interpolate): Separate trivial
1678 snapping to the same position from true interpolation.
1679
Werner Lemberg12661a52015-04-21 07:13:59 +020016802015-04-21 Werner Lemberg <wl@gnu.org>
1681
Werner Lemberg14df6b12015-04-22 11:14:35 +02001682 [autofit] By default, enable warping code but switch off warping.
1683
1684 Suggested by Behdad.
1685
1686 * include/config/ftoption.h: Define AF_CONFIG_OPTION_USE_WARPER.
1687
1688 * src/autofit/afmodule.c (af_autofitter_init): Initialize `warping'
1689 with `false'.
1690
16912015-04-21 Werner Lemberg <wl@gnu.org>
1692
Werner Lembergd164f702015-04-21 07:51:41 +02001693 * docs/CHANGES: Updated.
1694
16952015-04-21 Werner Lemberg <wl@gnu.org>
1696
Werner Lemberg12661a52015-04-21 07:13:59 +02001697 [autofit] Introduce `warping' property.
1698
1699 This code replaces the debugging hook from the previous commit with
1700 a better, more generic solution.
1701
1702 * include/ftautoh.h: Document it.
1703
1704 * src/autofit/afmodule.h (AF_ModuleRec)
1705 [AF_CONFIG_OPTION_USE_WARPER]: Add `warping' field.
1706
1707 * src/autofit/afmodule.c (_af_debug_disable_warper): Remove.
1708 (af_property_set, af_property_get, af_autofitter_init)
1709 [AF_CONFIG_OPTION_USE_WARPER]: Handle `warping' option.
1710
1711 * src/autofit/afhints.h (AF_HINTS_DO_WARP): Remove use of the no
1712 longer existing `_af_debug_disable_warper'.
1713
1714 * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c
1715 (af_latin_hints_init), src/autofit/aflatin2.c (af_latin2_hints_init)
1716 [AF_CONFIG_OPTION_USE_WARPER]: Add `AF_SCALER_FLAG_NO_WARPER' to the
1717 scaler flags if warping is off.
1718
1719 * src/autofit/aftypes.h: Updated.
1720
Werner Lemberg58f48f02015-04-16 20:11:49 +020017212015-04-16 Werner Lemberg <wl@gnu.org>
1722
1723 [autofit] Add debugging hook to disable warper.
1724
1725 * src/autofit/afmodule.c (_af_debug_disable_warper)
1726 [FT_DEBUG_AUTOFIT]: New global variable.
1727
1728 * src/autofit/aftypes.h: Updated.
1729 (AF_SCALER_FLAG_NO_WARPER): New macro (not actively used yet).
1730
1731 * src/autofit/afhints.h (AF_HINTS_DO_WARP): New macro.
1732
1733 * src/autofi/aflatin.c (af_latin_hints_apply)
1734 [AF_CONFIG_OPTION_USE_WARPER]: Use `AF_HINTS_DO_WARP' to control use
1735 of warper.
1736
1737 * src/autofit/afcjk.c (af_cjk_hints_init, af_cjk_hints_apply)
1738 [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'.
1739
1740 * src/autofit/aflatin2.c (af_latin2_hints_apply)
1741 [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'.
1742
Werner Lemberg5cd21552015-04-10 07:01:01 +020017432015-04-10 Werner Lemberg <wl@gnu.org>
1744
1745 [cff] Update advance width handling to OpenType 1.7.
1746
1747 Problem reported by Behdad.
1748
1749 * src/cff/cffdrivr.c (cff_get_advances): Handle SFNT case
1750 separately.
1751
1752 * src/cff/cffgload.c (cff_slot_load): Use advance width and side
1753 bearing values from `hmtx' table if present.
1754
Alexei Podtelezhnikov67b912d2015-04-03 22:38:11 -040017552015-04-03 Alexei Podtelezhnikov <apodtele@gmail.com>
1756
1757 * src/autofit/afhints.c (af_glyph_hints_reload): Use do-while loop.
1758
Alexei Podtelezhnikov770b5d02015-04-02 23:15:36 -040017592015-04-02 Alexei Podtelezhnikov <apodtele@gmail.com>
1760
1761 * src/autofit/aflatin.c (af_latin_hint_edges): Reduce logic.
1762
17632015-04-01 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov886f4d02015-04-01 22:57:43 -04001764
1765 [autofit] Finish the thought.
1766
1767 * src/autofit/afhints.c (af_direction_compute): make sure the long arm
1768 is never negative so that its `FT_ABS' is not necessary.
1769
Werner Lemberg16217e52015-04-01 13:13:56 +020017702015-04-01 Werner Lemberg <wl@gnu.org>
1771
Werner Lemberga2fa6572015-04-01 15:55:41 +02001772 [autofit] Call dumper functions for tracing.
1773
1774 * src/autofit/afcjk.c (af_cjk_hints_apply): Remove dead code.
1775 * src/autofit/afhints.c (af_glyph_hints_dump_points): Minor
1776 improvement.
1777 * src/autofit/afmodule.c (af_autofitter_load_glyph): Implement it.
1778
17792015-04-01 Werner Lemberg <wl@gnu.org>
1780
Werner Lembergdb8df792015-04-01 13:30:55 +02001781 [autofit] Make debugging stuff work again.
1782
1783 The interface to ftgrid was broken in the series of commits starting
1784 with
1785
1786 [autofit] Allocate AF_Loader on the stack instead of AF_Module.
1787
1788 from 2015-01-14.
1789
1790 * src/autofit/afmodule.c (_af_debug_hints_rec) [FT_DEBUG_AUTOFIT]:
1791 Use a global AF_GlyphHintsRec object for debugging.
1792 (af_autofitter_done, af_autofitter_load_glyph): Updated.
1793
1794 * src/autofit/afloader.c (af_loader_init, af_loader_done): Updated.
1795
17962015-04-01 Werner Lemberg <wl@gnu.org>
1797
Werner Lemberg16217e52015-04-01 13:13:56 +02001798 * src/autofit/afhints.c (af_glyph_hints_done): Fix minor thinko.
1799
Werner Lemberg10e2bb82015-03-29 13:32:47 +020018002015-03-29 Werner Lemberg <wl@gnu.org>
1801
Werner Lembergf353a382015-03-29 14:47:49 +02001802 [cff] Fix Savannah bug #44629.
1803
1804 * src/cff/cf2font.h (CF2_MAX_SUBR), src/cff/cffgload.h
1805 (CFF_MAX_SUBRS_CALLS): Set to 16.
1806
18072015-03-29 Werner Lemberg <wl@gnu.org>
1808
Werner Lemberg10e2bb82015-03-29 13:32:47 +02001809 [type1, truetype] Make the MM API more flexible w.r.t. `num_coords'.
1810
1811 This commit allows `num_coords' to be larger or smaller than the
1812 number of available axes while selecting a design instance, either
1813 ignoring excess data or using defaults if data is missing.
1814
1815 * src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design):
1816 Implement it.
1817
1818 * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design,
1819 T1_Set_Var_Design): Ditto.
1820
18212015-03-29 Werner Lemberg <wl@gnu.org>
Werner Lemberg8ce30262015-03-27 08:33:47 +01001822
Werner Lembergdd5d6d72015-03-29 10:04:22 +02001823 [type1] Minor.
1824
1825 * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design): Use
1826 FT_THROW.
1827 (T1_Set_Var_Design): Use T1_MAX_MM_AXIS and FT_THROW.
1828
18292015-03-27 Werner Lemberg <wl@gnu.org>
1830
Werner Lemberg8ce30262015-03-27 08:33:47 +01001831 [cff] Trace charstring nesting levels.
1832
1833 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdCALLGSUBR,
1834 cf2_cmdCALLSUBR, cf2_cmdRETURN>: Implement it.
1835
1836 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
1837 <cff_op_callsubr, cff_op_callgsubr, cff_op_return>: Ditto.
1838
Alexei Podtelezhnikovdac56442015-03-21 23:30:16 -040018392015-03-21 Alexei Podtelezhnikov <apodtele@gmail.com>
1840
1841 [base] Optimize `FT_Angle_Diff'.
1842
1843 Under normal circumstances we are usually close to the desired range
1844 of angle values, so that the remainder is not really necessary.
1845
1846 * src/base/fttrigon.c (FT_Angle_Diff): Use loops instead of remainder.
1847
1848 * src/autofit/aftypes.h (AF_ANGLE_DIFF): Ditto in the unused macro.
1849
Werner Lemberg6cc425d2015-03-21 06:51:07 +010018502015-03-21 Werner Lemberg <wl@gnu.org>
1851
1852 [truetype] Improve `gvar' handling.
1853
1854 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Correctly handle
1855 single-element runs. Cf. glyph `Q' in Skia.ttf with weights larger
1856 than the default.
1857
Alexei Podtelezhnikov2d7284e2015-03-20 21:34:19 -040018582015-03-20 Alexei Podtelezhnikov <apodtele@gmail.com>
1859
1860 * src/base/fttrigon.c (FT_Vector_Rotate): Minor refactoring.
1861
Alexei Podtelezhnikov6a171722015-03-17 22:43:08 -040018622015-03-17 Alexei Podtelezhnikov <apodtele@gmail.com>
1863
1864 Fix Savannah bug #44412 (part 2).
1865
1866 * src/base/fttrigon.c (FT_Sin, FT_Cos, FT_Tan): Call `FT_Vector_Unit'.
1867
Werner Lemberg06339952015-03-11 06:30:23 +010018682015-03-11 Werner Lemberg <wl@gnu.org>
1869
Werner Lembergd3284462015-03-11 16:45:58 +01001870 [autofit] Add support for Arabic script.
1871
1872 Thanks to Titus Nemeth <tn@tntypography.eu> for guidance!
1873
1874 * src/autofit/afblue.dat: Add blue zone data for Arabic.
1875
1876 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1877
1878 * src/autofit/afscript.h: Add Arabic standard characters.
1879
1880 * src/autofit/afranges.c: Add Arabic data.
1881
1882 * src/autofit/afstyles.h: Add Arabic data.
1883
1884 * docs/CHANGES: Document it.
1885
18862015-03-11 Werner Lemberg <wl@gnu.org>
1887
Werner Lemberga4516382015-03-11 08:09:13 +01001888 Rename `svxf86nm.h' to `svfntfmt.h'; update related symbols.
1889
1890 * include/internal/ftserv.h (FT_SERVICE_XFREE86_NAME_H): Renamed
1891 to...
1892 (FT_SERVICE_FONT_FORMAT_H): This.
1893
1894 * include/internal/services/svfntfmt.h (FT_XF86_FORMAT_*): Renamed
1895 to ...
1896 (FT_FONT_FORMAT_*): This.
1897
1898 src/base/ftfntfmt.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c,
1899 src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c,
1900 src/truetype/ttdriver.c, src/type1/t1driver.c,
1901 src/type42/t42drivr.c, src/winfonts/winfnt.c: Updated.
1902
19032015-03-11 Werner Lemberg <wl@gnu.org>
1904
Werner Lembergdd7028c2015-03-11 07:45:05 +01001905 [base] Rename `FT_XFREE86_H' to `FT_FONT_FORMATS_H'.
1906
1907 * include/config/ftheader.h: Implement it.
1908 * src/base/ftfntfmt.c, docs/CHANGES: Updated.
1909
19102015-03-11 Werner Lemberg <wl@gnu.org>
1911
Werner Lembergf4d1c112015-03-11 07:32:58 +01001912 [base] Rename `FT_Get_X11_Font_Format' to `FT_Get_Font_Format'.
1913
1914 * include/ftfntfmt.h, src/base/ftfntfmt.c: Implement it.
1915
1916 * docs/CHANGES: Updated.
1917
19182015-03-11 Werner Lemberg <wl@gnu.org>
1919
Werner Lembergcb0f7b62015-03-11 06:51:27 +01001920 Fix automatic copyright updating.
1921
1922 * src/tools/update-copyright: Make scanning of `no-copyright'
1923 actually work.
1924
1925 * src/tools/no-copyright: Don't include README in general.
1926
19272015-03-11 Werner Lemberg <wl@gnu.org>
1928
Werner Lemberg06339952015-03-11 06:30:23 +01001929 Rename `ftxf86.[ch]' to `ftfntfmt.[ch]'.
1930
1931 CMakeLists.txt, builds/amiga/makefile, builds/amiga/makefile.os4,
1932 builds/amiga/smakefile, builds/mac/FreeType.m68k_cfm.make.txt,
1933 builds/mac/FreeType.m68k_far.make.txt,
1934 builds/mac/FreeType.ppc_carbon.make.txt,
1935 builds/mac/FreeType.ppc_classic.make.txt, builds/symbian/bld.inf,
1936 builds/symbian/freetype.mmp, builds/wince/vc2005-ce/freetype.vcproj,
1937 builds/wince/vc2008-ce/freetype.vcproj,
1938 builds/windows/vc2005/freetype.vcproj,
1939 builds/windows/vc2008/freetype.vcproj,
1940 builds/windows/vc2010/freetype.vcxproj,
1941 builds/windows/vc2010/freetype.vcxproj.filters,
1942 builds/windows/visualc/freetype.dsp,
1943 builds/windows/visualc/freetype.vcproj,
1944 builds/windows/visualce/freetype.dsp,
1945 builds/windows/visualce/freetype.vcproj, docs/INSTALL.ANY,
1946 include/config/ftheader.h, include/ftfntfmt.h, modules.cfg,
1947 src/base/ftfntfmt.c, vms_make.com: Updated.
1948
Alexei Podtelezhnikov6b832c82015-03-10 23:25:49 -040019492015-03-10 Alexei Podtelezhnikov <apodtele@gmail.com>
1950
1951 Fix Savannah bug #44412 (part 1).
1952
1953 * src/base/ftstroke.c (ft_stroker_inside): Handle near U-turns.
1954
Werner Lembergeee7d8b2015-03-10 11:15:15 +010019552015-03-10 Werner Lemberg <wl@gnu.org>
1956
1957 [base] Rename `FT_Bitmap_New' to `FT_Bitmap_Init'.
1958
1959 * include/ftbitmap.h, src/base/ftbitmap.c: Implement it.
1960 Update all callers.
1961
1962 * docs/CHANGES: Updated.
1963
Werner Lemberg493cc032015-03-06 05:38:31 +010019642015-03-06 Werner Lemberg <wl@gnu.org>
1965
1966 * src/sfnt/ttload.c (tt_face_load_font_dir): Fix compiler warning.
1967
1968 Found by Alexei.
1969
Alexei Podtelezhnikovdd7498d2015-03-05 22:51:36 -050019702015-03-05 Alexei Podtelezhnikov <apodtele@gmail.com>
1971
1972 * src/base/ftstroke.c: Simplify.
1973
Werner Lemberg328b7922015-03-04 08:40:23 +010019742015-03-04 Werner Lemberg <wl@gnu.org>
1975
1976 [truetype] Some fixes and code refactoring in `ttgxvar.c'.
1977
1978 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix return value
1979 of `point_cnt' if two bytes are read.
1980 Use a more vertical coding style.
1981 (ft_var_readpackeddeltas): Use FT_UInt for `delta_cnt' parameter.
1982 Use a more vertical coding style.
1983
Werner Lemberga374c9c2015-03-03 11:23:45 +010019842015-03-03 Werner Lemberg <wl@gnu.org>
1985
1986 [autofit] Fix Savannah bug #44241.
1987
1988 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Reject glyphs
1989 with less than 3 points.
1990
Werner Lemberga07029e2015-03-02 06:54:08 +010019912015-03-02 Werner Lemberg <wl@gnu.org>
1992
1993 Simplify `TYPEOF' macro.
1994
1995 No need for two arguments.
1996
1997 * include/config/ftconfig.h, builds/unix/ftconfig.in,
1998 builds/vms/ftconfig.h (TYPEOF): Updated.
1999
2000 * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
2001 src/autofit/afwarp.h (AF_WARPER_FLOOR): Updated.
2002
20032015-03-01 Werner Lemberg <wl@gnu.org>
Werner Lemberg4b9234b2015-02-25 06:31:43 +01002004
Werner Lemberg851e8152015-03-01 19:27:09 +01002005 Various compiler warning fixes for `make multi'.
2006
2007 * src/autofit/afcjk.c (af_cjk_hints_compute_blue_edges),
2008 src/autofit/aflatin.c (af_latin_hint_compute_blue_edges,
2009 af_latin_hint_edges), src/autofit/aflatin2.c
2010 (af_latin2_hints_compute_blue_edges, af_latin2_hint_edges): Declare
2011 as `static'.
2012
2013 * src/cache/ftccmap.c (FTC_CMAP_QUERY_HASH, FTC_CMAP_NODE_HASH):
2014 Removed. Unused.
2015 * src/cache/ftcimage.c: Include FT_INTERNAL_OBJECTS_H.
2016 * src/cache/ftcmanag.c (FTC_LRU_GET_MANAGER): Removed. Unused.
2017
2018 * src/cff/cf2intrp.c: Include `cf2intrp.h'.
2019 * src/cff/cffdrivr.c (PAIR_TAG): Removed. Unused.
2020
2021 * src/gzip/ftgzip.c (NO_DUMMY_DECL): Removed. Unused.
2022
2023 * src/psaux/afmparse.c (afm_parser_read_int): Declare as `static'.
2024
2025 * src/pshinter/pshalgo.c (STRONGER, PSH_ZONE_MIN, PSH_ZONE_MAX):
2026 Removed. Unused.
2027
2028 * src/raster/ftraster.c (Render_Glyph): Declare as `static'.
2029
2030 * src/sfnt/ttpost.c (load_format_20): Fix signedness warning.
2031
2032 * src/truetype/ttdriver.c (PAIR_TAG): Removed. Unused.
2033 * src/truetype/ttsubpix.c (is_member_of_family_class,
2034 is_member_of_style_class): Declare as `static'.
2035
2036 * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Declare
2037 as `static'.
2038 * src/type1/t1load.c (mm_axis_unmap, mm_weights_unmap): Declare as
2039 `static'.
2040 (T1_FIELD_COUNT): Removed. Unused.
2041 * src/type1/t1parse.h (T1_Done_Table): Removed. Unused.
2042
2043 * src/type42/t42parse.c (T1_Done_Table): Removed. Unused.
2044
20452015-02-25 Werner Lemberg <wl@gnu.org>
2046
Werner Lemberg04c22372015-02-25 11:20:20 +01002047 [psaux] Signedness fixes.
2048
2049 * include/internal/psaux.h, src/psaux/afmparse.c,
2050 src/psaux/afmparse.h, src/psaux/psconv.c, src/psaux/psobjs.c,
2051 src/psaux/t1cmap.c, src/psaux/t1decode.c: Apply.
2052
20532015-02-25 Werner Lemberg <wl@gnu.org>
2054
Werner Lembergd25ec162015-02-25 09:19:59 +01002055 [otvalid] Signedness fixes.
2056
2057 * src/otvalid/otvcommn.c, src/otvalid/otvgdef.c,
2058 src/otvalid/otvgpos.c, src/otvalid/otvgsub.c, src/otvalid/otvmath.c:
2059 Apply.
2060
20612015-02-25 Werner Lemberg <wl@gnu.org>
2062
Werner Lemberg5c9d9bf2015-02-25 08:13:40 +01002063 * src/bzip2/ftbzip2.c (ft_bzip2_alloc): Signedness fix.
2064
20652015-02-25 Werner Lemberg <wl@gnu.org>
2066
Werner Lemberg83d41812015-02-25 08:10:58 +01002067 [lzw] Signedness fixes.
2068
2069 * src/lzw/ftzopen.c, src/lzw/ftzopen.h: Apply.
2070
20712015-02-25 Werner Lemberg <wl@gnu.org>
2072
Werner Lemberg17b62912015-02-25 07:53:09 +01002073 [gxvalid] Signedness fixes.
2074
2075 * src/gxvalid/gxvbsln.c, src/gxvalid/gxvcommn.c,
2076 src/gxvalid/gxvcommn.h, src/gxvalid/gxvjust.c,
2077 src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmort.c,
2078 src/gxvalid/gxvmort1.c, src/gxvalid/gxvmort2.c,
2079 src/gxvalid/gxvmorx.c, src/gxvalid/gxvmorx1.c,
2080 src/gxvalid/gxvmorx2.c, src/gxvalid/gxvopbd.c,
2081 src/gxvalid/gxvprop.c, src/gxvalid/gxvtrak.c: Apply.
2082
20832015-02-25 Werner Lemberg <wl@gnu.org>
2084
Werner Lemberg24e4e962015-02-25 06:57:16 +01002085 [cache] Signedness fixes.
2086
2087 * src/cache/ftcbasic.c, src/cache/ftccmap.c, src/cache/ftcimage.c,
2088 src/cache/ftcmanag.c, src/cache/ftcsbits.c: Apply.
2089
20902015-02-25 Werner Lemberg <wl@gnu.org>
2091
Werner Lemberg559727d2015-02-25 06:55:00 +01002092 Change dimension fields in `FTC_ImageTypeRec' to unsigned type.
2093
2094 This doesn't break ABI.
2095
2096 * include/ftcache.h (FTC_ImageTypeRec): Use unsigned types for
2097 `width' and `height'.
2098
2099 * docs/CHANGES: Document it.
2100
21012015-02-25 Werner Lemberg <wl@gnu.org>
2102
Werner Lemberg4b9234b2015-02-25 06:31:43 +01002103 [cache] Don't use `labs'.
2104
2105 This is the only place in FreeType where this function was used.
2106
2107 * include/config/ftstdlib.h (ft_labs): Remove.
2108
2109 * src/cache/ftcimage.c (ftc_inode_weight): Replace `ft_labs' with
2110 `FT_ABS'.
2111
Werner Lemberg4d1f7af2015-02-23 07:04:36 +010021122015-02-23 Werner Lemberg <wl@gnu.org>
2113
Werner Lemberg3aaebe32015-02-23 08:20:27 +01002114 [cache] Replace `FT_PtrDist' with `FT_Offset'.
2115
2116 * src/cache/ftccache.h (FTC_NodeRec): `FT_Offset' (a.k.a. `size_t')
2117 is a better choice for `hash' to hold a pointer than `FT_PtrDist'
2118 (a.k.a. `ptrdiff_t'), especially since the latter is signed,
2119 causing zillions of signedness warnings. [Note that `hash' was of
Werner Lemberg17b62912015-02-25 07:53:09 +01002120 type `FT_UInt32' before the change to `FT_PtrDist'.]
Werner Lemberg3aaebe32015-02-23 08:20:27 +01002121 Update all users.
2122
2123 * src/cache/ftcbasic.c, src/cache/ftccache.c, src/cache/ftccmap.c,
2124 src/cache/ftcglyph.c, src/cache/ftcglyph.h: Updated.
2125
21262015-02-23 Werner Lemberg <wl@gnu.org>
2127
Werner Lemberg4d1f7af2015-02-23 07:04:36 +01002128 [smooth, raster] Re-enable standalone compilation.
2129
2130 * src/raster/ftraster.c (FT_RENDER_POOL_SIZE, FT_MAX)
2131 [_STANDALONE_]: Define macros.
2132
2133 * src/smooth/ftgrays.c (FT_RENDER_POOL_SIZE, FT_MAX, FT_ABS,
2134 FT_HYPOT) [_STANDALONE_]: Define macros.
2135
Werner Lemberg03ccfd02015-02-22 08:25:16 +010021362015-02-22 Werner Lemberg <wl@gnu.org>
2137
Werner Lembergcb13e712015-02-23 06:41:52 +01002138 [smooth] Signedness fixes.
2139
2140 * src/smooth/ftgrays.c, src/smooth/ftsmooth.c: Apply.
2141
21422015-02-22 Werner Lemberg <wl@gnu.org>
2143
Werner Lemberga974e9a2015-02-22 21:02:13 +01002144 * src/raster/ftraster.c: Use the file's typedefs everywhere.
2145
21462015-02-22 Werner Lemberg <wl@gnu.org>
2147
Werner Lembergb0ebcdc2015-02-22 20:42:49 +01002148 * src/sfnt/ttpost.c (load_format_20): Fix error tracing message.
2149
2150 Bug introduced 6 commits earlier.
2151
21522015-02-22 Werner Lemberg <wl@gnu.org>
2153
Werner Lemberg22b1d5c2015-02-22 20:41:03 +01002154 [pshinter] Fix thinko.
2155
2156 * src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Correctly
2157 check `count'.
2158 Bug introduced two commits earlier.
2159
21602015-02-22 Werner Lemberg <wl@gnu.org>
2161
Werner Lembergca96fe02015-02-22 20:05:04 +01002162 [raster] Signedness fixes.
2163
2164 * src/raster/ftraster.c, src/raster/ftrend1.c: Apply.
2165
21662015-02-22 Werner Lemberg <wl@gnu.org>
2167
Werner Lemberg452066c2015-02-22 15:59:02 +01002168 [pshinter] Signedness fixes.
2169
2170 * src/pshinter/pshalgo.c, src/pshinter/pshglob.c,
2171 src/pshinter/pshrec.c: Apply.
2172
21732015-02-22 Werner Lemberg <wl@gnu.org>
2174
Werner Lemberg41c2ed82015-02-22 15:57:47 +01002175 [pshinter] Use macros for (unsigned) flags, not enumerations.
2176
2177 * src/pshinter/pshalgo.h (PSH_Hint_Flags): Replace with macros.
2178 Updated.
2179 * src/pshinter/pshrec.h (PS_Hint_Flags): Replace with macros.
2180
21812015-02-22 Werner Lemberg <wl@gnu.org>
2182
Werner Lemberg25c2f882015-02-22 15:54:31 +01002183 * src/pshinter/pshrec.c: Simplify.
2184 (ps_hints_open, ps_hints_stem): Remove switch statement.
2185
21862015-02-22 Werner Lemberg <wl@gnu.org>
2187
Werner Lemberg01f08422015-02-22 12:03:28 +01002188 [sfnt] Signedness fixes.
2189
2190 * src/sfnt/pngshim.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap.c,
2191 src/sfnt/ttkern.c, src/sfnt/ttload.c, src/sfnt/ttpost.c,
2192 src/sfnt/ttsbit.c: Apply.
2193 * src/sfnt/sfdriver.c: Apply.
2194 (sfnt_get_ps_name): Simplify.
2195
21962015-02-22 Werner Lemberg <wl@gnu.org>
2197
Werner Lemberg3c374c82015-02-22 09:16:53 +01002198 [bdf] Signedness fixes.
2199
2200 * src/bdf/bdf.h, src/bdf/bdfdrivr.c, src/bdf/bdfdrivr.h,
2201 src/bdf/bdflib.c: Apply.
2202
22032015-02-22 Werner Lemberg <wl@gnu.org>
2204
Werner Lembergb13945a2015-02-22 09:15:47 +01002205 * src/bdf/bdflib.c (_bdf_atous): New function.
2206 (_bdf_parse_glyphs, _bdf_parse_start): Use it.
2207
22082015-02-22 Werner Lemberg <wl@gnu.org>
2209
Werner Lemberg03ccfd02015-02-22 08:25:16 +01002210 [pcf] Signedness fixes.
2211
2212 * src/pcf/pcf.h, src/pcf/pcfdrivr.c: Apply.
2213 * src/pcf/pcfread.c: Apply.
2214 (pcf_get_encodings): Ignore invalid negative encoding offsets.
2215
Werner Lemberg633a7292015-02-21 07:02:01 +010022162015-02-21 Werner Lemberg <wl@gnu.org>
2217
Werner Lemberg3d7e53f2015-02-21 11:30:54 +01002218 * src/winfonts/winfnt.c: Signedness fixes.
2219
22202015-02-21 Werner Lemberg <wl@gnu.org>
2221
Werner Lemberg7b6b4172015-02-21 10:39:34 +01002222 [type42] Signedness fixes.
2223
2224 * src/type42/t42parse.c, src/type42/t42parse.h,
2225 src/type42/t42types.h: Apply.
2226
22272015-02-21 Werner Lemberg <wl@gnu.org>
2228
Werner Lemberg8bfffb42015-02-21 09:52:29 +01002229 [pfr] Signedness fixes.
2230
2231 * src/pfr/pfrdrivr.c, src/pfr/pfrgload.c, src/pfr/pfrload.c,
2232 src/pfr/pfrload.h, src/pfr/pfrobjs.c, src/pfr/pfrsbit.c,
2233 src/pfr/pfrtypes.h: Apply.
2234
22352015-02-21 Werner Lemberg <wl@gnu.org>
2236
Werner Lemberg633a7292015-02-21 07:02:01 +01002237 [cff] Minor signedness fixes related to last commit.
2238
2239 * src/cff/cf2ft.c, src/cff/cf2intrp.c, src/cff/cffgload.c: Apply.
2240
Werner Lemberg3a8d0532015-02-20 08:35:32 +010022412015-02-20 Werner Lemberg <wl@gnu.org>
2242
Werner Lembergc00b05f2015-02-20 20:42:55 +01002243 [cff] Thinkos in bias handling.
2244
2245 Only the final result is always positive.
2246
2247 Bug introduced three commits earlier.
2248
2249 * src/cff/cffgload.c, src/cff/cffgload.h: Apply.
2250
22512015-02-20 Werner Lemberg <wl@gnu.org>
2252
Werner Lemberg2bf03eb2015-02-20 20:14:11 +01002253 [cid] Fix signedness issues and emit some better error codes.
2254
2255 * src/cid/cidgload.c, src/cid/cidload.h, src/cid/cidobjs.c,
2256 src/cid/cidparse.h: Apply.
2257 * src/cid/cidload.c: Apply.
2258 (parse_fd_array): Reject negative values for number of dictionaries.
2259 * src/cid/cidparse.c: Apply.
2260 (cid_parser_new): Reject negative values for hex data length.
2261
22622015-02-20 Werner Lemberg <wl@gnu.org>
2263
Werner Lembergeb05bfb2015-02-20 08:37:35 +01002264 [cff] Signedness fixes for new engine.
2265
2266 * src/cff/cf2arrst.c, src/cff/cf2fixed.h, src/cff/cf2ft.c,
2267 src/cff/cf2ft.h, src/cff/cf2hints.c, src/cff/cf2intrp.c: Apply.
2268
22692015-02-20 Werner Lemberg <wl@gnu.org>
2270
Werner Lemberg3a8d0532015-02-20 08:35:32 +01002271 [cff] Signedness fixes for basic infrastructure and old engine.
2272
2273 * include/internal/pshints.h, src/cff/cffdrivr.c,
2274 src/cff/cffgload.c, src/cff/cffgload.h, src/cff/cffload.c,
2275 src/cff/cffobjs.c, src/cff/cffparse.c, src/pshinter/pshrec.c: Apply.
2276
Werner Lemberg81e5ff52015-02-19 09:46:48 +010022772015-02-19 Werner Lemberg <wl@gnu.org>
2278
Werner Lemberg3a1df3e2015-02-19 15:42:48 +01002279 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Ignore `countSizePairs'.
2280
2281 This is hard-coded to value 2 in `fvar' version 1.0 (and no newer
2282 version exists), but some fonts set it incorrectly.
2283
2284 Problem reported by Adam Twardoch <adam@fontlab.com>.
2285
22862015-02-19 Werner Lemberg <wl@gnu.org>
2287
Werner Lemberg93a884c2015-02-19 14:11:16 +01002288 [cff] Emit better error code for invalid private dict size.
2289
2290 * src/cff/cffparse.c (cff_parse_private_dict): Reject negative
2291 values for size and offset.
2292
22932015-02-19 Werner Lemberg <wl@gnu.org>
2294
Werner Lembergb57bb112015-02-19 10:44:18 +01002295 [autofit] Fix signedness issues.
2296
2297 * src/autofit/afangles.c, src/autofit/afcjk.c,
2298 src/autofit/afglobal.c, src/autofit/afhints.c,
2299 src/autofit/aflatin.c, src/autofit/aflatin2.c, src/autofit/afwarp.c,
2300 src/autofit/hbshim.c: Apply.
2301
23022015-02-19 Werner Lemberg <wl@gnu.org>
2303
Werner Lemberg81e5ff52015-02-19 09:46:48 +01002304 [autofit] Use macros for (unsigned) flags, not enumerations.
2305
2306 This harmonizes with other code in FreeType (and reduces the number
2307 of necessary casts to avoid compiler warnings).
2308
2309 * src/autofit/afblue.hin: Make flag macros unsigned.
2310 * src/autofit/afblue.h: Regenerated.
2311
2312 * src/autofit/afcjk.h: Replace flag enumeration with macros.
2313 * src/autofit/afcjk.c: Updated.
2314
2315 * src/autofit/afhints.h (AF_Flags, AF_Edge_Flags): Replace with
2316 macros.
2317 * src/autofit/afhints.c: Updated.
2318
2319 * src/autofit/aflatin.h: Replace flag enumerations with macros.
2320 * src/autofit/aflatin.c, src/autofit/aflatin2.c: Updated.
2321
2322 * src/autofit/aftypes.h (AF_ScalerFlags): Replace with macros.
2323
Werner Lemberg6a0ded72015-02-18 08:51:22 +010023242015-02-18 Werner Lemberg <wl@gnu.org>
2325
Werner Lemberg3b5f3322015-02-18 11:45:22 +01002326 [type1] Fix signedness issues.
2327
2328 * include/internal/psaux.h, include/internal/t1types.h,
2329 src/psaux/psobjs.c, src/psaux/psobjs.h, src/psaux/t1decode.c,
2330 src/type1/t1gload.c, src/type1/t1load.c, src/type1/t1parse.c: Apply.
2331
23322015-02-18 Werner Lemberg <wl@gnu.org>
2333
Werner Lemberg272e3cd2015-02-18 11:38:46 +01002334 [psaux, type1] Fix minor AFM issues.
2335
2336 * include/internal/t1types.h (AFM_KernPairRec): Make indices
2337 unsigned.
2338 Update users.
2339 (AFM_FontInfoRec): Make element counters unsigned.
2340 Update users.
2341 * src/psaux/afmparse.h (AFM_ValueRec): Add union member for unsigned
2342 int.
2343
2344 * src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs):
2345 Reject negative values for number of kerning elements.
2346
2347 * src/type1/t1afm.c, src/tools/test_afm.c: Updated.
2348
23492015-02-18 Werner Lemberg <wl@gnu.org>
2350
Werner Lemberg6bd7d282015-02-18 09:22:06 +01002351 Don't use `FT_PtrDist' for lengths.
2352
2353 Use FT_UInt instead.
2354
2355 * include/internal/psaux.h (PS_Table_FuncsRec, PS_TableRec,
2356 T1_DecoderRec): Do it.
2357
2358 * include/internal/t1types.h (T1_FontRec): Ditto.
2359
2360 * src/cid/cidload.c (cid_parse_dict): Updated.
2361 * src/pfr/pfrload.c (pfr_extra_item_load_font_id): Ditto.
2362 * src/psaux/psobjs.c (ps_table_add), src/psaux/psobjs.h: Ditto.
2363 * src/type1/t1load.c (parse_blend_axis_types, parse_encoding,
2364 parse_chharstrings, parse_dict): Ditto.
2365 * src/type42/t42parse.c (t42_parse_encoding, t42_parse_charstrings,
2366 t42_parse_dict): Ditto.
2367
23682015-02-18 Werner Lemberg <wl@gnu.org>
2369
Werner Lemberg6a0ded72015-02-18 08:51:22 +01002370 * src/type1/t1driver.c (t1_ps_get_font_value): Clean up.
2371 This handles negative values better, avoiding many casts.
2372
Werner Lemberg0a33a392015-02-17 08:03:05 +010023732015-02-17 Werner Lemberg <wl@gnu.org>
2374
Werner Lembergd3240c52015-02-17 20:30:36 +01002375 [base] Fix Savannah bug #44284.
2376
2377 * src/base/ftcalc.c (FT_MulFix): Typos.
2378
23792015-02-17 Werner Lemberg <wl@gnu.org>
2380
Werner Lemberg1f7a4e12015-02-17 10:17:56 +01002381 [truetype] Finish compiler warning fixes for signedness issues.
2382
2383 * src/truetype/ttgxvar.c, src/truetype/ttsubpix.c,
2384 src/truetype/ttsubpix.h: Apply.
2385
23862015-02-17 Werner Lemberg <wl@gnu.org>
2387
Werner Lemberg9daea2c2015-02-17 09:27:56 +01002388 * src/truetype/ttsubpix.c: Adding missing `static' keywords.
2389
23902015-02-17 Werner Lemberg <wl@gnu.org>
2391
Werner Lembergd9c3f152015-02-17 09:21:26 +01002392 [truetype] More signedness fixes.
2393
2394 * include/internal/tttypes.h, src/truetype/ttinterp.h,
2395 src/truetype/ttobjs.h, src/truetype/ttinterp.c,
2396 src/truetype/ttobjs.c: Apply.
2397
23982015-02-17 Werner Lemberg <wl@gnu.org>
2399
Werner Lemberg0a33a392015-02-17 08:03:05 +01002400 [truetype] Various signedness fixes.
2401
2402 * include/internal/ftgloadr.h, src/truetype/ttpload.c: Apply.
2403
2404 * src/truetype/ttgload.c: Apply.
2405 (TT_Get_VMetrics): Protect against invalid ascenders and descenders
2406 while constructing advance height.
2407
Werner Lemberg587351b2015-02-16 07:03:22 +010024082015-02-16 Werner Lemberg <wl@gnu.org>
2409
Werner Lemberg76abc752015-02-16 22:00:27 +01002410 [base] Finish compiler warning fixes for signedness issues.
2411
2412 * src/base/ftglyph.c, src/base/ftlcdfil.c, src/base/ftstroke.c:
2413 Apply.
2414
24152015-02-16 Werner Lemberg <wl@gnu.org>
2416
Werner Lemberg10aa8582015-02-16 20:12:54 +01002417 * include/tttables.h (TT_OS2): `fsType' must be FT_UShort.
2418
24192015-02-16 Werner Lemberg <wl@gnu.org>
2420
Werner Lemberg2e814fc2015-02-16 20:05:08 +01002421 More minor signedness warning fixes.
2422
2423 * src/base/ftbbox.c, src/base/ftbitmap.c, src/base/fttrigon.c,
2424 src/base/ftutil.c: Apply.
2425
24262015-02-16 Werner Lemberg <wl@gnu.org>
2427
Werner Lemberg82235d02015-02-16 19:35:16 +01002428 Next round of minor compiler warning fixes.
2429
2430 * include/internal/ftrfork.h (FT_RFork_Ref): Change `offset' member
2431 type to `FT_Long'.
2432 (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Add `static' keyword.
2433
Werner Lemberg3aaebe32015-02-23 08:20:27 +01002434 * include/internal/ftstream.h (FT_Stream_Pos): Return `FT_ULong'.
Werner Lemberg82235d02015-02-16 19:35:16 +01002435
2436 * src/base/ftoutln.c, src/base/ftrfork.c, src/base/ftstream.c:
2437 Signedess fixes.
2438
24392015-02-16 Werner Lemberg <wl@gnu.org>
2440
Werner Lemberg3cfa4d12015-02-16 17:59:06 +01002441 Various minor signedness fixes.
2442
2443 * include/ftadvanc.h, include/internal/ftobjs.h,
2444 src/base/ftgloadr.c, src/base/ftobjs.c: Apply.
2445
24462015-02-16 Werner Lemberg <wl@gnu.org>
2447
Werner Lemberg6f325c22015-02-16 11:31:32 +01002448 New `TYPEOF' macro.
2449
2450 This helps suppress signedness warnings, avoiding issues with
2451 implicit conversion changes.
2452
2453 * include/config/ftconfig.h, builds/unix/ftconfig.in,
2454 builds/vms/ftconfig.h (TYPEOF): Define.
2455
2456 * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
2457 src/autofit/afwarp.h (AF_WARPER_FLOOR): Use it.
2458
24592015-02-16 Werner Lemberg <wl@gnu.org>
2460
Werner Lemberg1f377f02015-02-16 08:37:09 +01002461 * src/base/ftsystem.c: Use casts in standard C function wrappers.
2462 (ft_alloc, ft_realloc, ft_ansi_stream_io, FT_Stream_Open): Do it.
2463
24642015-02-16 Werner Lemberg <wl@gnu.org>
2465
Werner Lemberg0814b802015-02-16 07:29:53 +01002466 Fix Savannah bug #44261.
2467
2468 * builds/unix/detect.mk (setup) [unix]: Set `CONFIG_SHELL' in the
2469 environment also while calling the configure script.
2470
24712015-02-16 Werner Lemberg <wl@gnu.org>
2472
Werner Lemberg587351b2015-02-16 07:03:22 +01002473 * include/internal/ftmemory.h: Add some `FT_Offset' casts.
2474 (FT_MEM_SET, FT_MEM_COPY, FT_MEM_MOVE, FT_ARRAY_ZERO, FT_ARRAY_COPY,
2475 FT_MEM_MOVE): Do it.
2476
Werner Lemberg6d7d6362015-02-15 12:30:42 +010024772015-02-15 Werner Lemberg <wl@gnu.org>
2478
Werner Lemberg48186b82015-02-16 06:37:36 +01002479 [base] Clean up signedness issues in `ftdbgmem.c'.
2480
2481 Also fix other minor issues.
2482
2483 * src/base/ftdbgmem.c (FT_MemTableRec): Replace all FT_ULong types
2484 with FT_Long for consistency.
2485 (ft_mem_primes): Change type to `FT_Int'.
2486 (ft_mem_closest_prime, ft_mem_table_set): Updated.
2487
2488 (ft_mem_debug_panic, ft_mem_debug_alloc, ft_mem_debug_free,
2489 ft_mem_debug_realloc): Use `static' keyword and fix signedness
2490 warnings where necessary.
2491
2492 (ft_mem_table_resize, ft_mem_table_new, ft_mem_table_destroy,
2493 ft_mem_table_get_nodep, ft_mem_debug_init, FT_DumpMemory): Fix types
2494 and add or remove casts to avoid signedness warnings.
2495
24962015-02-15 Werner Lemberg <wl@gnu.org>
2497
Werner Lemberg6d7d6362015-02-15 12:30:42 +01002498 [base] Clean up signedness in arithmetic functions.
2499
2500 This makes the code more readable and reduces compiler warnings.
2501
2502 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round, FT_MulFix,
2503 FT_DivFix): Convert input parameters to unsigned, do the
2504 computation, then convert the result back to signed.
2505 (ft_corner_orientation): Fix casts.
2506
Werner Lemberg92359bd2015-02-07 09:47:23 +010025072015-02-07 Werner Lemberg <wl@gnu.org>
2508
2509 [sfnt] Fix Savannah bug #44184.
2510
2511 * src/sfnt/ttload.c (check_table_dir, tt_face_load_font_dir): No
2512 longer reject `htmx' and `vmtx' tables with invalid length but
2513 sanitize them.
2514
Jon Anderson416d8792015-02-06 10:16:45 +010025152015-02-06 Jon Anderson <jon@websupergoo.com>
2516
2517 [truetype] Fix regression in the incremental glyph loader.
2518
2519 * src/truetype/ttgload.c (load_truetype_glyph): For incremental
2520 fonts, the glyph index may be greater than the number of glyphs
2521 indicated, so guard the check with a preprocessor conditional.
2522
Werner Lembergb6cb4992015-02-06 08:46:06 +010025232015-02-06 Werner Lemberg <wl@gnu.org>
2524
2525 [autofit] Fix potential memory leak.
2526
2527 While this doesn't show up with FreeType, exactly the same code
2528 leaks with ttfautohint's modified auto-hinter code (which gets used
2529 in a slightly different way).
2530
2531 It certainly doesn't harm since it is similar to already existing
2532 checks in the code for embedded arrays.
2533
2534 * src/autofit/afhints.c (af_glyph_hints_reload): Set `max_contours'
2535 and `max_points' for all cases.
2536
Werner Lemberg19146a52015-01-31 11:01:33 +010025372015-01-31 Werner Lemberg <wl@gnu.org>
2538
2539 [autofit] Add support for Thai script.
2540
2541 Thanks to Ben Mitchell <ben@rosettatype.com> for guidance with blue
2542 zone characters!
2543
2544 * src/autofit/afblue.dat: Add blue zone data for Thai.
2545
2546 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2547
2548 * src/autofit/afscript.h: Add Thai standard characters.
2549
2550 * src/autofit/afranges.c: Add Thai data.
2551
2552 * src/autofit/afstyles.h: Add Thai data.
2553
Behdad Esfahbod264b5e42015-01-23 21:23:55 +010025542015-01-23 Behdad Esfahbod <behdad@behdad.org>
2555
2556 [raster] Handle `FT_RASTER_FLAG_AA' correctly.
2557
2558 This fixes a breakage caused by the commit `[raster] Remove
2559 5-level gray AA mode from monochrome rasterizer.'.
2560
Werner Lembergd2c531e2015-01-23 22:37:42 +01002561 Problem reported by Markus Trippelsdorf <markus@trippelsdorf.de>.
Behdad Esfahbod264b5e42015-01-23 21:23:55 +01002562
2563 * src/raster/ftraster.c (ft_black_render): Handle
2564 `FT_RASTER_FLAG_AA'.
2565
2566 * src/raster/ftrend1.c (ft_raster1_render): Remove gray AA mode
2567 remnants.
2568
Werner Lemberg79a5ac62015-01-18 07:30:04 +010025692015-01-18 Werner Lemberg <wl@gnu.org>
2570
2571 * src/base/ftobjs.c (FT_New_Library): Fix compiler warning.
2572
Chris Liddell942aa5f2015-01-18 07:29:48 +010025732015-01-18 Chris Liddell <chris.liddell@artifex.com>
2574
2575 [raster] Fix Savannah bug #44022.
2576
2577 Add fallback for glyphs with degenerate bounding boxes.
2578
2579 If a glyph has only one very narrow feature, the bbox can end up
2580 with either the width or height of the bbox being 0, in which case
2581 no raster memory is allocated and no attempt is made to render the
2582 glyph. This is less than ideal when the drop-out compensation in
2583 the rendering code would actually result in the glyph being
2584 rendered.
2585
2586 This problem can be observed with the `I' glyph (gid 47) in the
2587 Autodesk RomanS TrueType font.
2588
2589 * src/raster/ftrend1.c (ft_raster1_render): Add a fallback if either
2590 dimension is zero to explicitly round up/down (instead of simply
2591 round).
2592
Werner Lemberg50be00d2015-01-17 20:38:31 +010025932015-01-17 Werner Lemberg <wl@gnu.org>
2594
2595 Add some tools to handle yearly copyright notice updates.
2596
2597 We are now following the GNU guidelines: A new release automatically
2598 means that the copyright year of all affected files gets updated; it
2599 is no longer used to track years of modification changes.
2600
2601 * src/tools/update-copyright-year: New Perl script.
2602 * src/tools/update-copyright: New shell script that calls
2603 `update-copyright-year' on all files.
2604 * src/tools/no-copyright: Exceptions that should not be handled by
2605 `update-copyright'
2606
Werner Lemberg4eff8542015-01-14 20:06:19 +010026072015-01-14 Werner Lemberg <wl@gnu.org>
2608
2609 * docs/CHANGES: Updated, using a description from Behdad.
2610
Behdad Esfahbod3f9b3d82015-01-14 15:48:12 +010026112015-01-14 Behdad Esfahbod <behdad@behdad.org>
2612
Behdad Esfahbod48c86622015-01-14 19:38:36 +01002613 * src/autofit/afmodule.c (af_autofitter_done): Fix compiler warning.
2614
26152015-01-14 Behdad Esfahbod <behdad@behdad.org>
2616
Behdad Esfahbod56ddafa2015-01-14 19:36:02 +01002617 [autofit] Add embedded array of segments and edges.
2618
2619 Avoids multiple mallocs per typical glyphs.
2620
2621 With this and recent changes to avoid mallocs, the thread-safe
2622 stack-based loader is now as fast as the previous model that had one
2623 cached singleton.
2624
2625 * src/autofit/afhints.h (AF_SEGMENTS_EMBEDDED, AF_EDGES_EMBEDDED):
2626 New macros.
2627 (AF_AxisHintsRec): Add two arrays for segments and edges.
2628
2629 * src/autofit/afhints.c (af_axis_hints_new_segment): Only allocate
2630 data if number of segments exceeds given threshold value.
2631 (af_axis_hints_new_edge): Only allocate data if number of edges
2632 exceeds given threshold value.
2633 (af_glyph_hints_done): Updated.
2634
26352015-01-14 Behdad Esfahbod <behdad@behdad.org>
2636
Behdad Esfahbod6f16b102015-01-14 19:26:49 +01002637 [autofit] Add embedded arrays for points and contours.
2638
2639 This avoids at least two malloc calls for typical glyphs.
2640
2641 * src/autofit/afhints.h (AF_POINTS_EMBEDDED, AF_CONTOURS_EMBEDDED):
2642 New macros.
2643 (AF_GlyphHintsRec): Add two arrays for contours and points.
2644
2645 * src/autofit/afhints.c (af_glyph_hints_init, af_glyph_hints_done):
2646 Updated.
2647 (af_glyph_hints_reload): Only allocate data if number of contours or
2648 points exceeds given threshold values.
2649
26502015-01-14 Behdad Esfahbod <behdad@behdad.org>
2651
Behdad Esfahbodc2733652015-01-14 19:16:12 +01002652 [autofit] Allocate hints object on the stack.
2653
2654 This avoids one malloc per load.
2655
2656 * src/autofit/afloader.h (AF_LoaderRec): Change type of `hints' to
2657 `AF_GlyphHints'.
2658 Update prototype.
2659
2660 * src/autofit/afloader.c (af_loader_init): Use `AF_GlyphHints'
2661 parameter instead of `FT_Memory'.
2662 (af_loader_done): Directly reset `load_hints'.
2663 (af_loader_load_g): Updated.
2664
2665 * src/autofit/afmodule.c (af_autofitter_load_glyph): Use local
2666 `hints' object.
2667
26682015-01-14 Behdad Esfahbod <behdad@behdad.org>
2669
Behdad Esfahboda4117fb2015-01-14 19:07:54 +01002670 [autofit] Reuse slot glyph loader.
2671
2672 No need to create a new glyph loader; we can reuse the one from
2673 `slot->internal->loader'. It's hard to tell why it was written that
2674 way originally, but new code looks sound and correct to me, and
2675 avoids lots of allocations.
2676
2677 * src/autofit/afloader.c (af_loader_init): Change return type to
2678 `void'.
2679 Don't call `FT_GlyphLoader_New'.
2680 (af_loader_reset): Don't call `FT_GlyphLoader_Rewind'.
2681 (af_loader_load_g): Update code to use `internal->loader', which
2682 doesn't need copying of data.
2683
2684 * src/autofit/afloader.h (AF_LoaderRec): Remove `gloader' member.
2685 Update prototype.
2686
2687 * src/autofit/afmodule.c (af_autofitter_load_glyph): Updated.
2688
26892015-01-14 Behdad Esfahbod <behdad@behdad.org>
2690
Behdad Esfahbodae6699f2015-01-14 18:55:39 +01002691 [autofit] Remove (unused) support for composite glyphs.
2692
2693 We never have to deal with composite glyphs in the autohinter, as
2694 those will be loaded into FORMAT_OUTLINE by the recursed
2695 `FT_Load_Glyph' function.
2696
2697 In the rare cases that FT_LOAD_NO_RECURSE is set, it will imply
2698 FT_LOAD_NO_SCALE as per `FT_Load_Glyph', which then implies
2699 FT_LOAD_NO_HINTING:
2700
2701 /* resolve load flags dependencies */
2702
2703 if ( load_flags & FT_LOAD_NO_RECURSE )
2704 load_flags |= FT_LOAD_NO_SCALE |
2705 FT_LOAD_IGNORE_TRANSFORM;
2706
2707 if ( load_flags & FT_LOAD_NO_SCALE )
2708 {
2709 load_flags |= FT_LOAD_NO_HINTING |
2710 FT_LOAD_NO_BITMAP;
2711
2712 load_flags &= ~FT_LOAD_RENDER;
2713 }
2714
2715 and as such the auto-hinter is never called. Thus, the recursion in
2716 `af_loader_load_g' never actually happens. So remove the depth
2717 counter as well.
2718
2719 * src/autofit/afloader.c (af_loader_load_g): Remove `depth'
2720 parameter.
2721 <FT_GLYPH_FORMAT_COMPOSITE>: Remove associated code.
2722 (af_loader_load_glyph): Updated.
2723
27242015-01-14 Behdad Esfahbod <behdad@behdad.org>
2725
Behdad Esfahbodc242fe42015-01-14 18:48:14 +01002726 [raster] Fix uninitialized memory access.
2727
2728 Apparently `ras.cProfile' might be uninitialized. This will be the
2729 case if `ras.top == ras.cProfile->offset', as can be seen in
2730 `End_Profile'. The overshoot code introduced in a change `Fix B/W
2731 rasterization of subglyphs with different drop-out modes.' (from
2732 2009-06-18) violated this, accessing `ras.cProfile->flags'
2733 unconditionally just before calling `End_Profile' (which then
2734 detected that `cProfile' is uninitialized and didn't touch it).
2735
2736 This was harmless, and was not detected by valgrind before because
2737 the objects were allocated on the `raster_pool', which was always
2738 initialized. With recent change to allocate raster buffers on the
2739 stack, valgrind now reported this invalid access.
2740
2741 * src/raster/ftraster.c (Convert_Glyph): Don't access an
2742 uninitialized `cProfile'.
2743
27442015-01-14 Behdad Esfahbod <behdad@behdad.org>
2745
Behdad Esfahbodb2ba6862015-01-14 18:43:13 +01002746 [smooth] Fix uninitialized memory access.
2747
2748 Looks like `ras.span_y' could always be used without initialization.
2749 This was never detected by valgrind before because the library-wide
2750 `raster_pool' was used for the worker object and `raster_pool' was
2751 originally zero'ed. But subsequent reuses of it were using `span_y'
2752 uninitialized. With the recent change to not use `render_pool' and
2753 allocate worker and buffer on the stack, valgrind now detects this
2754 uninitialized access.
2755
2756 * src/smooth/ftgrays.c (gray_raster_render): Initialize
2757 `ras.span_y'.
2758
27592015-01-14 Behdad Esfahbod <behdad@behdad.org>
2760
Behdad Esfahbod603292d2015-01-14 18:35:56 +01002761 [base] Don't initialize unused `driver->glyph_loader'.
2762
2763 * src/base/ftobjs.c (Destroy_Driver): Don't call
2764 `FT_GlyphLoader_Done'.
2765 (FT_Add_Module): Don't call `FT_GlyphLoader_New'.
2766
27672015-01-14 Behdad Esfahbod <behdad@behdad.org>
2768
Behdad Esfahbod51634252015-01-14 18:30:59 +01002769 [base] Don't allocate `library->raster_pool' anymore.
2770
2771 It's unused after the following commits:
2772
2773 [raster] Allocate render pool for mono rasterizer on the stack.
2774 [raster] Remove 5-level gray AA mode from monochrome rasterizer.
2775
2776 The value of FT_RENDER_POOL_SIZE still serves the purpose it used to
2777 serve, which is, to adjust the pool size. But the pool is now
2778 allocated on the stack on demand.
2779
2780 * src/base/ftobjs.c (FT_New_Library, FT_Done_Library): Implement.
2781
27822015-01-14 Behdad Esfahbod <behdad@behdad.org>
2783
Behdad Esfahbod6dfdaf42015-01-14 18:21:13 +01002784 [base] Do not reorder library->renderers upon use.
2785
2786 Instead of keeping `library->renderers' in a MRU order, just leave
2787 it as-is. The MRU machinery wasn't thread-safe.
2788
2789 With this patch, rasterizing glyphs from different faces from
2790 different threads doesn't fail choosing rasterizer
2791 (FT_Err_Cannot_Render_Glyph).
2792
2793 Easiest to see that crash was to add a `printf' (or otherwise let
2794 thread yield in FT_Throw with debugging enabled).
2795
2796 * src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c
2797 (FT_Outline_Render): Don't call `FT_Set_Renderer'.
2798
27992015-01-14 Behdad Esfahbod <behdad@behdad.org>
2800
Behdad Esfahboda773c302015-01-14 18:16:20 +01002801 [raster] Allocate render pool for mono rasterizer on the stack.
2802
2803 Instead of using the `render_pool' member of `FT_Library' that is
2804 provided down to the rasterizer, completely ignore that and allocate
2805 needed objects on the stack instead.
2806
2807 With this patch, rasterizing glyphs from different faces from
2808 different threads doesn't crash in the monochrome rasterizer.
2809
2810 * src/raster/ftraster.c (black_TRaster): Remove `buffer',
2811 `buffer_size', and `worker' members.
2812
2813 (ft_black_render): Create `buffer' locally.
2814 (ft_black_reset): Updated.
2815
28162015-01-14 Behdad Esfahbod <behdad@behdad.org>
2817
Behdad Esfahbod8dc86352015-01-14 18:06:22 +01002818 [raster] Remove 5-level gray AA mode from monochrome rasterizer.
2819
2820 It was off by default and couldn't be turned on at runtime. And the
2821 smooth rasterizer superceded it over ten years ago. No point in
2822 keeping. Comments suggested that it was there for compatibility
2823 with FreeType 1.
2824
2825 550 lines down.
2826
2827 * src/raster/ftraster.c (FT_RASTER_OPTION_ANTI_ALIASING,
2828 RASTER_GRAY_LINES): Remove macros and all associated code.
2829
2830 (black_TWorker): Remove `gray_min_x' and `gray_max_x'.
2831 (black_TRaster): Remove `grays' and `gray_width'.
2832
2833 (Vertical_Sweep_Init, Vertical_Sweep_Span, Vertical_Sweep_Drop,
2834 ft_black_render): Updated.
2835
2836 * src/raster/ftrend1.c (ft_raster1_render): Simplify code.
2837 (ft_raster5_renderer_class): Removed.
2838
28392015-01-14 Behdad Esfahbod <behdad@behdad.org>
2840
Behdad Esfahbod747ae2c2015-01-14 17:54:26 +01002841 [smooth] Allocate render pool for smooth rasterizer on the stack.
2842
2843 Instead of using the `render_pool' member of `FT_Library' that is
2844 provided down to the rasterizer, completely ignore that and allocate
2845 needed objects on the stack instead.
2846
2847 With this patch, rasterizing glyphs from different faces from
2848 different threads doesn't crash in the smooth rasterizer.
2849
2850 Bugs:
2851
2852 https://bugzilla.redhat.com/show_bug.cgi?id=678397
2853 https://bugzilla.redhat.com/show_bug.cgi?id=1004315
2854 https://bugzilla.redhat.com/show_bug.cgi?id=1165471
2855 https://bugs.freedesktop.org/show_bug.cgi?id=69034
2856
2857 * src/smooth/ftgrays.c (gray_TRaster): Remove `buffer',
2858 `buffer_size', `band_size', and `worker' members.
2859
2860 (gray_raster_render): Create `buffer', `buffer_size', and
2861 `band_size' locally.
2862 (gray_raster_reset): Updated.
2863
28642015-01-14 Behdad Esfahbod <behdad@behdad.org>
2865
Behdad Esfahbod531d4632015-01-14 17:46:55 +01002866 [truetype] Allocate TT_ExecContext in TT_Size instead of TT_Driver.
2867
2868 Previously the code had stipulation for using a per-TT_Size exec
2869 context if `size->debug' was true. But there was no way that
2870 `size->debug' could *ever* be true. As such, the code was always
2871 using the singleton `TT_ExecContext' that was stored in `TT_Driver'.
2872 This was, clearly, not threadsafe.
2873
2874 With this patch, loading glyphs from different faces from different
2875 threads doesn't crash in the bytecode loader code.
2876
2877 * src/truetype/ttobjs.h (TT_SizeRec): Remove `debug' member.
2878 (TT_DriverRec): Remove `context' member.
2879
2880 * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Remove
2881 `TT_ExecContext' code related to a global `TT_Driver' object.
2882
2883 (tt_driver_done): Don't remove `TT_ExecContext' object here but ...
2884 (tt_size_done_bytecode): ... here.
2885
2886 (tt_driver_init): Don't create `TT_ExecContext' object here but ...
2887 (tt_size_init_bytecode): ... here, only on demand.
2888
2889 * src/truetype/ttinterp.c (TT_Run_Context): Remove defunct debug
2890 code.
2891 (TT_New_Context): Remove `TT_ExecContext' code related to a global
2892 `TT_Driver' object.
2893
2894 * src/truetype/ttinterp.h: Updated.
2895
2896 * src/truetype/ttgload.c (TT_Hint_Glyph, tt_loader_init): Updated.
2897
28982015-01-14 Behdad Esfahbod <behdad@behdad.org>
2899
Behdad Esfahbod89bc8d42015-01-14 16:01:19 +01002900 [autofit] Allocate AF_Loader on the stack instead of AF_Module.
2901
2902 Stop sharing a global `AF_Loader'. Allocate one on the stack during
2903 glyph load.
2904
2905 Right now this results in about 25% slowdown, to be fixed in a
2906 following commit.
2907
2908 With this patch loading glyphs from different faces from different
2909 threads doesn't immediately crash in the autohinting loader code.
2910
2911 Bugs:
2912
2913 https://bugzilla.redhat.com/show_bug.cgi?id=1164941
2914
2915 * src/autofit/afloader.c (af_loader_init): Pass
2916 `AF_Loader' and `FT_Memory' instead of `AF_Module' as arguments.
2917 (af_loader_reset, af_loader_load_glyph): Also pass `loader' as
2918 argument.
2919 (af_loader_done): Use `AF_Loader' instead of `AF_Module' as
2920 argument.
2921
2922 * src/autofit/afmodule.c (af_autofitter_init): Don't call
2923 `af_loader_init'.
2924 (af_autofitter_done): Don't call `af_loader_done'.
2925 (af_autofitter_load_glyph): Use a local `AF_Loader' object.
2926
2927 * src/autofit/afloader.h: Include `afmodule.h'.
2928 Update prototypes.
2929 Move typedef for `AF_Module' to...
2930
2931 * src/autofit/afmodule.h: ... this place.
2932 No longer include `afloader.h'.
2933
29342015-01-14 Behdad Esfahbod <behdad@behdad.org>
2935
Behdad Esfahbod3f9b3d82015-01-14 15:48:12 +01002936 * src/type42/t42objs.h (T42_DriverRec): Remove unused member.
2937
Werner Lemberg36d03c92015-01-12 11:26:30 +010029382015-01-12 Werner Lemberg <wl@gnu.org>
2939
2940 Fix Savannah bug #43976.
2941
2942 Assure that FreeType's internal include directories are found before
2943 `CPPFLAGS' (which might be set by the user in the environment), and
2944 `CPPFLAGS' before `CFLAGS'.
2945
2946 * builds/freetype.mk (FT_CFLAGS): Don't add `INCLUDE_FLAGS'.
2947 (FT_COMPILE): Make this a special variable for compiling only the
2948 files handled in `freetype.mk'.
2949 (.c.$O): Removed, unused.
2950
2951 * src/*/rules.mk (*_COMPILE): Fix order of include directories.
2952
Werner Lembergd03a67a2015-01-11 08:39:14 +010029532015-01-11 Werner Lemberg <wl@gnu.org>
2954
Werner Lemberg95b57052015-01-11 09:50:49 +01002955 [truetype] Prettyfing.
2956
2957 * src/truetype/ttinterp.c (project, dualproj, fast_project,
2958 fast_dualproj): Rename to...
2959 (PROJECT, DUALPROJ, FAST_PROJECT, FAST_DUALPROJ): ... this.
2960
29612015-01-11 Werner Lemberg <wl@gnu.org>
2962
Werner Lembergea173c02015-01-11 08:58:54 +01002963 * src/truetype/ttinterp.c (Ins_JROT, Ins_JROF): Simplify.
2964
2965 Based on a patch from Behdad.
2966
29672015-01-11 Werner Lemberg <wl@gnu.org>
2968
Werner Lemberg628578c2015-01-11 08:53:31 +01002969 * src/truetype/ttinterp.c (Ins_SxVTL): Simplify function call.
2970
29712015-01-11 Werner Lemberg <wl@gnu.org>
2972
Werner Lemberg08e79092015-01-11 08:45:50 +01002973 * src/truetype/ttinterp.c (Normalize): Remove unused argument.
2974
29752015-01-11 Werner Lemberg <wl@gnu.org>
2976
Werner Lembergd03a67a2015-01-11 08:39:14 +01002977 [truetype] More macro expansions.
2978
Werner Lemberg4aaadf42015-01-11 08:42:28 +01002979 * src/truetype/ttinterp.c (FT_UNUSED_EXEC): Remove macro by
2980 expansion.
2981
29822015-01-11 Werner Lemberg <wl@gnu.org>
2983
2984 [truetype] More macro expansions.
2985
Werner Lembergd03a67a2015-01-11 08:39:14 +01002986 * src/truetype/ttinterp.c (INS_ARG): Remove macro by expansion,
2987 adjusting funtion calls where necessary.
2988 (FT_UNUSED_ARG): Removed, no longer needed.
2989
Werner Lemberg1b4d68c2015-01-10 19:56:28 +010029902015-01-10 Werner Lemberg <wl@gnu.org>
2991
Werner Lembergeb341362015-01-11 00:23:27 +01002992 [truetype] More macro expansions.
2993
2994 Based on a patch from Behdad.
2995
2996 * src/truetype/ttinterp.c (DO_*): Expand macros into corresponding
2997 `Ins_*' functions.
2998 (TT_RunIns): Replace `DO_*' macros with `Ins_*' function calls.
2999 (ARRAY_BOUND_ERROR): Remove second definition, which is no longer
3000 needed.
3001 (Ins_SVTCA, Ins_SPVTCA, Ins_SFVTCA): Replaced with...
3002 (Ins_SxyTCA): New function.
3003
30042015-01-10 Werner Lemberg <wl@gnu.org>
3005
Werner Lemberg01be1302015-01-10 23:05:37 +01003006 [truetype] Remove TT_CONFIG_OPTION_INTERPRETER_SWITCH.
3007
3008 Behdad suggested this code simplification, and nobody objected...
3009
3010 * include/config/ftoption.h, devel/ftoption.h
3011 (TT_CONFIG_OPTION_INTERPRETER_SWITCH): Remove.
3012
3013 * src/truetype/ttinterp.c [TT_CONFIG_OPTION_INTERPRETER_SWITCH]:
3014 Remove related code.
3015 (ARRAY_BOUND_ERROR): Use do-while loop.
3016
30172015-01-10 Werner Lemberg <wl@gnu.org>
3018
Werner Lembergfae0c812015-01-10 20:23:10 +01003019 [truetype] More macro expansions.
3020
Werner Lemberg6cc1f122015-01-10 21:56:59 +01003021 * src/truetype/ttinterp.c, src/truetype/ttinterp.h (EXEC_ARG_,
3022 EXEC_ARG): Remove by replacing with expansion.
3023
30242015-01-10 Werner Lemberg <wl@gnu.org>
3025
3026 [truetype] More macro expansions.
3027
Werner Lemberg24681452015-01-10 21:53:48 +01003028 Based on a patch from Behdad.
3029
3030 * src/truetype/ttinterp.c (SKIP_Code, GET_ShortIns, NORMalize,
3031 SET_SuperRound, ROUND_None, INS_Goto_CodeRange, CUR_Func_move,
3032 CUR_Func_move_orig, CUR_Func_round, CUR_Func_cur_ppem,
3033 CUR_Func_read_cvt, CUR_Func_write_cvt, CUR_Func_move_cvt,
3034 CURRENT_Ratio, INS_SxVTL, COMPUTE_Funcs, COMPUTE_Round,
3035 COMPUTE_Point_Displacement, MOVE_Zp2_Point): Remove by replacing
3036 with expansion.
3037
3038 (Cur_Func_project, CUR_Func_dualproj, CUR_fast_project,
3039 CUR_fast_dualproj): Replace with macros `project', `dualproj',
3040 `fast_project', `fast_dualproj'.
3041
30422015-01-10 Werner Lemberg <wl@gnu.org>
3043
3044 [truetype] More macro expansions.
3045
Werner Lembergfae0c812015-01-10 20:23:10 +01003046 * src/truetype/ttinterp.c (EXEC_OP_, EXEC_OP): Remove by replacing
3047 with expansion.
3048
30492015-01-10 Werner Lemberg <wl@gnu.org>
3050
Werner Lemberg5a752f32015-01-10 20:08:35 +01003051 [truetype] Remove code for static TrueType interpreter.
3052
3053 This is a follow-up patch.
3054
3055 * src/truetype/ttinterp.c, src/truetype/ttinterp.h
3056 [TT_CONFIG_OPTION_STATIC_INTERPRETER,
3057 TT_CONFIG_OPTION_STATIC_RASTER]: Remove macros and related code.
3058
30592015-01-10 Werner Lemberg <wl@gnu.org>
3060
Werner Lemberg1b4d68c2015-01-10 19:56:28 +01003061 * src/truetype/ttinterp.c (CUR): Remove by replacing with expansion.
3062
3063 This starts a series of patches that simplifies the code of the
3064 bytecode interpreter.
3065
Werner Lembergf6aa0892013-05-10 07:58:47 +02003066
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00003067----------------------------------------------------------------------------
3068
Werner Lemberga724dcf2015-10-11 05:50:07 +02003069Copyright 2015 by
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00003070David Turner, Robert Wilhelm, and Werner Lemberg.
3071
3072This file is part of the FreeType project, and may only be used, modified,
3073and distributed under the terms of the FreeType project license,
3074LICENSE.TXT. By continuing to use, modify, or distribute this file you
3075indicate that you have read the license and understand and accept it
3076fully.
3077
3078
3079Local Variables:
3080version-control: never
Werner Lemberg4e03fe72006-04-29 06:20:09 +00003081coding: utf-8
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00003082End: