blob: f167eaeda3e3a7b977bf0dca1f552be88cc1e5a2 [file] [log] [blame]
Werner Lemberg066a4912015-10-06 07:55:32 +020012015-10-06 Werner Lemberg <wl@gnu.org>
2
3 [cff] Return correct PS names from pure CFF (#46130).
4
5 * src/cff/cffdrivr.c (cff_get_ps_name): Use SFNT service only for
6 SFNT.
7
Werner Lemberg8cabd912015-10-04 08:18:01 +020082015-10-04 Werner Lemberg <wl@gnu.org>
9
Werner Lemberg30fe5e72015-10-04 13:08:08 +020010 [base] Replace left shifts with multiplication (#46118).
11
12 * src/base/ftglyph.c (ft_bitmap_glyph_bbox, FT_Get_Glyph): Do it.
13
142015-10-04 Werner Lemberg <wl@gnu.org>
15
Werner Lemberg8cabd912015-10-04 08:18:01 +020016 * Version 2.6.1 released.
17 =========================
18
19
20 Tag sources with `VER-2-6-1'.
21
22 * docs/VERSION.DLL: Update documentation and bump version number to
23 2.6.1.
24
25 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
26 builds/windows/vc2005/index.html,
27 builds/windows/vc2008/freetype.vcproj,
28 builds/windows/vc2008/index.html,
29 builds/windows/vc2010/freetype.vcxproj,
30 builds/windows/vc2010/index.html,
31 builds/windows/visualc/freetype.dsp,
32 builds/windows/visualc/freetype.vcproj,
33 builds/windows/visualc/index.html,
34 builds/windows/visualce/freetype.dsp,
35 builds/windows/visualce/freetype.vcproj,
36 builds/windows/visualce/index.html,
37 builds/wince/vc2005-ce/freetype.vcproj,
38 builds/wince/vc2005-ce/index.html,
39 builds/wince/vc2008-ce/freetype.vcproj,
40 builds/wince/vc2008-ce/index.html: s/2.6/2.6.1/, s/26/261/.
41
42 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
43
44 * builds/unix/configure.raw (version_info): Set to 18:1:12.
45 * CMakeLists.txt (VERSION_PATCH): Set to 1.
46
47 * src/autofit/afmodule.c [AF_DEBUG_AUTOFIT]: Ensure C linking for
48 dumping functions.
49
502015-10-04 Werner Lemberg <wl@gnu.org>
Werner Lemberg53838ce2015-10-03 21:12:25 +020051
52 [bzip2, gzip] Avoid access of unitialized memory (#46109).
53
Werner Lembergb260dc92015-10-04 07:39:22 +020054 * src/bzip2/ftbzip2.c (ft_bzip2_file_fill_input), src/gzip/ftgzip.c
55 (ft_gzip_file_fill_input): In case of an error, adjust the limit to
56 avoid copying uninitialized memory.
57
582015-10-03 Werner Lemberg <wl@gnu.org>
59
60 [bzip2, gzip] Avoid access of unitialized memory (#46109).
61
Werner Lemberg53838ce2015-10-03 21:12:25 +020062 * src/bzip2/ftbzip2.c (ft_bzip2_file_fill_output), src/gzip/ftgzip.c
63 (ft_gzip_file_fill_output): In case of an error, adjust the limit to
64 avoid copying uninitialized memory.
65
Alexei Podtelezhnikove2dae8f2015-10-01 22:03:34 -0400662015-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
67
68 [smooth] Clean up worker.
69
70 * src/smooth/ftgrays.c (gray_TWorker): Remove never used fields.
71
Werner Lemberg5f8f44d2015-10-01 14:16:03 +0200722015-10-01 Werner Lemberg <wl@gnu.org>
73
Werner Lemberg90e437e2015-10-01 20:00:27 +020074 [sfnt] Make `tt_cmap4_char_map_linear' more robust (#46078).
75
76 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Take care of
77 border conditions (i.e., if the loop exits naturally).
78
792015-10-01 Werner Lemberg <wl@gnu.org>
80
Werner Lembergfab67b82015-10-01 16:47:05 +020081 * src/autofit/afranges.c (af_deva_nonbase_uniranges): Fix ranges.
82 They should be a subset of `af_deva_uniranges'.
83
842015-10-01 Werner Lemberg <wl@gnu.org>
85
Werner Lemberg5f8f44d2015-10-01 14:16:03 +020086 [sfnt] Make `tt_cmap4_char_map_linear' faster (#46078).
87
88 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Use inner loop to
89 reject too large glyph indices.
90
Alexei Podtelezhnikov8bbcfb22015-09-30 23:08:53 -0400912015-09-30 Alexei Podtelezhnikov <apodtele@gmail.com>
92
93 [smooth] Clean up worker.
94
95 * src/smooth/ftgrays.c (gray_TWorker): Remove lightly used `last_ey'.
96 (gray_start_cell, gray_render_line): Update.
97
Werner Lemberg8651f372015-09-30 10:26:10 +0200982015-09-30 Werner Lemberg <wl@gnu.org>
99
Werner Lembergdbd04262015-09-30 17:52:42 +0200100 [autofit] Replace `no-base' with `non-base'.
101
102 * src/autofit/*: Do it.
103
1042015-09-30 Werner Lemberg <wl@gnu.org>
105
Werner Lemberg2ff83a52015-09-30 14:44:29 +0200106 [sfnt] Rewrite `tt_cmap4_char_map_linear' (#46078).
107
108 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Add code to better
109 skip invalid segments.
110 If searching the next character, provide a more efficient logic to
111 speed up the code.
112
1132015-09-30 Werner Lemberg <wl@gnu.org>
114
Werner Lemberg8651f372015-09-30 10:26:10 +0200115 [truetype] Adjust number of glyphs for malformed `loca' tables.
116
117 * src/truetype/ttpload.c (tt_face_load_loca): Implement it.
118
Werner Lemberg483007f2015-09-29 11:22:15 +02001192015-09-29 Werner Lemberg <wl@gnu.org>
120
121 [pshinter] Avoid harmless overflow (#45984).
122
123 * src/pshinter/pshglob.c (psh_blues_set_zones): Fix it.
124
Werner Lemberga3046562015-09-28 09:45:56 +02001252015-09-28 Werner Lemberg <wl@gnu.org>
126
127 [autofit] Add support for Lao script.
128
129 Thanks to Danh Hong <danhhong@gmail.com> for guidance with blue zone
130 characters!
131
132 * src/autofit/afblue.dat: Add blue zone data for Lao.
133
134 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
135
136 * src/autofit/afscript.h: Add Lao standard characters.
137
138 * src/autofit/afranges.c: Add Lao data.
139
140 * src/autofit/afstyles.h: Add Lao data.
141
suzuki toshiya8a05d252015-09-28 01:40:21 +09001422015-09-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
suzuki toshiyafb5268c2015-09-28 02:01:43 +0900143
144 [base] Fix a leak by broken sfnt-PS or resource fork (#46028).
145
146 open_face_from_buffer() frees passed buffer if valid font
147 is not found. But if copying to the buffer is failed,
148 the allocated buffer should be freed within the caller.
149
150 * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Free
151 the buffer `sfnt_ps' if an error caused before calling
152 open_face_from_buffer().
153 (Mac_Read_sfnt_Resource): Free the buffer `sfnt_data' if
154 an error caused before calling open_face_from_buffer();
155
1562015-09-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
suzuki toshiya8a05d252015-09-28 01:40:21 +0900157
158 [mac] Fix buffer size calculation for LWFN font.
159
160 * src/base/ftmac.c (read_lwfn): Cast post_size to FT_ULong
161 to prevent confused copy by too large chunk size.
162
Alexei Podtelezhnikov3dffe8e2015-09-27 11:30:17 -04001632015-09-26 Alexei Podtelezhnikov <apodtele@gmail.com>
164
165 * src/smooth/ftgrays.c (PIXEL_MASK): Remove unused macro.
166
Werner Lemberg41877532015-09-26 15:19:54 +02001672015-09-26 Werner Lemberg <wl@gnu.org>
168
Werner Lemberg19188a92015-09-26 16:57:17 +0200169 [autofit] Minor tracing improvement.
170
171 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Don't emit
172 blue zones header line if there are no blue zones.
173
1742015-09-26 Werner Lemberg <wl@gnu.org>
175
Werner Lemberg41877532015-09-26 15:19:54 +0200176 [bzip2, gzip, lzw] Harmonize function signatures with prototype.
177
178 Suggested by Hin-Tak Leung.
179
180 * src/bzip2/ftbzip2.c (ft_bzip2_stream_io), src/gzip/ftgzip.c
181 (ft_gzip_stream_io), src/lzw/ftlzw.c (ft_lzw_stream_io): Do it.
182
Hin-Tak Leung265ade82015-09-26 14:51:30 +02001832015-09-26 Hin-Tak Leung <htl10@users.sourceforge.net>
184
185 Add new FT_LOAD_COMPUTE_METRICS load flag.
186
187 * include/freetype/freetype.h (FT_LOAD_COMPUTE_METRICS): New macro.
188 * src/truetype/ttgload.c (compute_glyph_metrics): Usage.
189
Werner Lembergd57f2272015-09-26 08:44:26 +02001902015-09-26 Werner Lemberg <wl@gnu.org>
191
192 * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Add cast.
193
Werner Lemberg2439c512015-09-25 16:54:28 +02001942015-09-25 Werner Lemberg <wl@gnu.org>
195
196 [type1] Protect against invalid number of glyphs (#46029).
197
198 * src/type1/t1load.c (parse_charstrings): Check number of
199 `CharStrings' dictionary entries against size of data stream.
200
Werner Lembergc409eb12015-09-24 12:39:38 +02002012015-09-23 Werner Lemberg <wl@gnu.org>
202
Werner Lemberg5339c752015-09-24 13:39:44 +0200203 [sfnt] Better checks for invalid cmaps (2/2) (#46019).
204
205 While the current code in `FT_Get_Next_Char' correctly rejects
206 out-of-bounds glyph indices, it can be extremely slow for malformed
207 cmaps that use 32bit values. This commit tries to improve that.
208
209 * src/sfnt/ttcmap.c (tt_cmap8_char_next, tt_cmap12_next,
210 tt_cmap12_char_map_binary, tt_cmap13_next,
211 tt_cmap13_char_map_binary): Reject glyph indices larger than or
212 equal to the number of glyphs.
213
2142015-09-23 Werner Lemberg <wl@gnu.org>
215
Werner Lembergc409eb12015-09-24 12:39:38 +0200216 [base, sfnt] Better checks for invalid cmaps (1/2).
217
218 * src/base/ftobjs.c (FT_Get_Char_Index): Don't return out-of-bounds
219 glyph indices.
220 (FT_Get_First_Char): Updated.
221
222 * src/sfnt/ttcmap.c (tt_cmap6_char_next): Don't return character
223 codes greater than 0xFFFF.
224
225 (tt_cmap8_char_index): Avoid integer overflow in computation of
226 glyph index.
227 (tt_cmap8_char_next): Avoid integer overflows in computation of
228 both next character code and glyph index.
229
230 (tt_cmap10_char_index): Fix unsigned integer logic.
231 (tt_cmap10_char_next): Avoid integer overflow in computation of
232 next character code.
233
234 (tt_cmap12_next): Avoid integer overflows in computation of both
235 next character code and glyph index.
236 (tt_cmap12_char_map_binary): Ditto.
237 (tt_cmap12_char_next): Simplify.
238
239 (tt_cmap13_char_map_binary): Avoid integer overflow in computation
240 of next character code.
241 (tt_cmap13_char_next): Simplify.
242
suzuki toshiyae982f5b2015-09-21 23:07:22 +09002432015-09-21 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
244
Werner Lembergd7f456e2015-09-26 08:37:14 +0200245 [base] Check too long POST and sfnt resource (#45919).
suzuki toshiyae982f5b2015-09-21 23:07:22 +0900246
Werner Lembergd7f456e2015-09-26 08:37:14 +0200247 * src/base/ftbase.h (FT_MAC_RFORK_MAX_LEN): Maximum length of the
248 resource fork for Mac OS. Resource forks larger than 16 MB can be
249 written but can't be handled correctly, at least in Carbon routine.
250 See https://support.microsoft.com/en-us/kb/130437.
suzuki toshiyae982f5b2015-09-21 23:07:22 +0900251
Werner Lembergd7f456e2015-09-26 08:37:14 +0200252 * src/base/ftobjs.c (Mac_Read_POST_Resource): No need to use `0x'
253 prefix for `%p' formatter.
suzuki toshiyae982f5b2015-09-21 23:07:22 +0900254
Werner Lembergd7f456e2015-09-26 08:37:14 +0200255 * src/base/ftbase.c (Mac_Read_POST_Resource): Check the fragment and
256 total size of the concatenated POST resource before buffer
257 allocation.
258 (Mac_Read_sfnt_Resource): Check the declared size of sfnt resource
suzuki toshiyae982f5b2015-09-21 23:07:22 +0900259 before buffer allocation.
suzuki toshiyae982f5b2015-09-21 23:07:22 +0900260
Werner Lembergd7f456e2015-09-26 08:37:14 +0200261 * src/base/ftmac.c (read_lwfn, FT_New_Face_From_SFNT): Check the
262 total resource size before buffer allocation.
suzuki toshiyae982f5b2015-09-21 23:07:22 +0900263
Werner Lembergcb7a5122015-09-19 07:58:03 +02002642015-09-19 Werner Lemberg <wl@gnu.org>
265
Werner Lemberg730b6d72015-09-19 12:41:12 +0200266 [sfnt] Improve handling of invalid SFNT table entries (#45987).
267
268 This patch fixes weaknesses in function `tt_face_load_font_dir'.
269
270 - It incorrectly assumed that valid tables are always at the
271 beginning. As a consequence, some valid tables after invalid
272 entries (which are ignored) were never seen.
273
274 - Duplicate table entries (this is, having the same tag) were not
275 rejected.
276
277 - The number of valid tables was sometimes too large, leading to
278 access of invalid tables.
279
280 * src/sfnt/ttload.c (check_table_dir): Add argument to return number
281 of valid tables.
282 Add another tracing message.
283 (tt_face_load_font_dir): Only allocate table array for valid
284 entries as returned by `check_table_dir'.
285 Reject duplicate tables and adjust number of valid tables
286 accordingly.
287
2882015-09-19 Werner Lemberg <wl@gnu.org>
289
Werner Lembergcb7a5122015-09-19 07:58:03 +0200290 [pcf] Improve `FT_ABS' fix from 2015-09-17 (#45999).
291
292 * src/pcf/pcfread.c (pcf_load_font): Do first the cast to FT_Short,
293 then take the absolute value.
294 Also apply FT_ABS to `height'.
295
Werner Lemberg9db9add2015-09-17 13:42:59 +02002962015-09-17 Werner Lemberg <wl@gnu.org>
297
Werner Lembergf28c95c2015-09-17 19:30:26 +0200298 [type42] Fix memory leak (#45989).
299
300 * src/type42/t42parse.c (t42_parse_charstrings): Allow only a single
301 `CharStrings' array.
302
3032015-09-17 Werner Lemberg <wl@gnu.org>
304
Werner Lemberg4942c2b2015-09-17 17:56:53 +0200305 [psaux] Fix memory leak (#45986).
306
307 * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
308 Free `temp' in case of error.
309
3102015-09-17 Werner Lemberg <wl@gnu.org>
311
Werner Lemberg7d364b72015-09-17 16:31:58 +0200312 [psaux] Improve tracing message.
313
314 * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
315 Handle plural correctly.
316
3172015-09-17 Werner Lemberg <wl@gnu.org>
318
Werner Lembergc838c4f2015-09-17 16:22:40 +0200319 [pcf] Fix integer overflows (#45985).
320
321 * src/pcf/pcfread.c (pcf_load_font): Use FT_MulDiv.
322
3232015-09-17 Werner Lemberg <wl@gnu.org>
324
Werner Lemberg9db9add2015-09-17 13:42:59 +0200325 [pcf] Use FT_ABS for some property values (#45893).
326
327 * src/pcf/pcfread.c (pcf_load_font): Take absolute values for
328 AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE, RESOLUTION_X, and
329 RESOLUTION_Y. In tracing mode, add warnings.
330
Werner Lembergbd0438a2015-09-16 18:05:43 +02003312015-09-16 Werner Lemberg <wl@gnu.org>
332
333 Minor fixes for some clang warnings.
334
335 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Cast, possible missing
336 initialization.
337
338 * src/truetype/ttgload.c (TT_Process_Composite_Component): Cast.
339
Werner Lemberg581c7e22015-09-15 06:49:06 +02003402015-09-15 Werner Lemberg <wl@gnu.org>
341
Werner Lemberg19cb1122015-09-15 08:52:36 +0200342 [type1, type42] Fix memory leaks (#45966).
343
344 * src/type1/t1load.c (parse_blend_axis_types): Handle multiple axis
345 names.
346 (parse_blend_design_map): Allow only a single design map.
347 (parse_encoding): Handle multiple encoding vectors.
348
349 * src/type42/t42parse.c (t42_parse_encoding): Handle multiple
350 encoding vectors.
351
3522015-09-15 Werner Lemberg <wl@gnu.org>
353
Werner Lemberg7f0f4012015-09-15 07:23:53 +0200354 [truetype] Fix integer type (#45965).
355
356 * src/truetype/ttobjs.c (tt_synth_sfnt_checksum): Implement it.
357
3582015-09-15 Werner Lemberg <wl@gnu.org>
359
Werner Lemberg577daf12015-09-15 07:10:16 +0200360 * src/pcf/pcfread.c (pcf_load_font): Fix integer overflow (#45964).
361
3622015-09-15 Werner Lemberg <wl@gnu.org>
363
Werner Lemberg581c7e22015-09-15 06:49:06 +0200364 [type1, type42] Check encoding array size (#45961).
365
366 * src/type1/t1load.c (parse_encoding), src/type42/t42parse.c
367 (t42_parse_encoding): Do it.
368
Alexei Podtelezhnikov3ea0d2c2015-09-13 23:19:34 -04003692015-09-14 Alexei Podtelezhnikov <apodtele@gmail.com>
370
371 * src/base/ftcalc.c (FT_MulFix) [FT_LONG64]: Improve.
372
Werner Lemberg7962a152015-09-14 00:38:26 +02003732015-09-14 Werner Lemberg <wl@gnu.org>
374
375 [type1] Fix another potential buffer overflow (#45955).
376
377 * src/type1/t1parse (T1_Get_Private_Dict): Assure that check for
378 `eexec' doesn't exceed `limit'.
379
Werner Lemberge40e8b32015-09-13 08:05:50 +02003802015-09-13 Werner Lemberg <wl@gnu.org>
381
Werner Lembergff7d6402015-09-13 23:53:16 +0200382 Replace `mkinstalldirs' with AC_PROG_MKDIR_P.
383
384 * builds/unix/mkinstalldirs: Removed, no longer needed.
385
386 * builds/unix/configure.raw: Call `AC_PROG_MKDIR_P'.
387 Update pwd call for `$INSTALL'.
388
389 * builds/unix/unix-def.in (MKINSTALLDIRS): Use `@MKDIR_P@'.
390
391 * autogen.sh: Updated.
392
3932015-09-13 Werner Lemberg <wl@gnu.org>
394
Werner Lemberg3df92aa2015-09-13 09:21:52 +0200395 [winfonts] Check alignment shift count for resource data (#45938).
396
397 * src/winfonts/winfnt.c (fnt_face_get_dll_font): Implement it.
398
3992015-09-13 Werner Lemberg <wl@gnu.org>
400
Werner Lemberge3058612015-09-13 08:41:43 +0200401 [type1] Fix potential buffer overflow (#45923).
402
403 * src/type1/t1parse.c (T1_Get_Private_Dict): Assure `cur' doesn't
404 point to end of file buffer.
405
4062015-09-13 Werner Lemberg <wl@gnu.org>
407
Werner Lemberge40e8b32015-09-13 08:05:50 +0200408 [gzip] Fix access of small compressed files (#45937).
409
410 * src/gzip/ftgzip.c (ft_gzip_stream_close): Avoid memory leak.
411
412 (ft_gzip_get_uncompressed_file): Correct byte order while reading
413 unsigned long value. Without this change, the whole optimization of
414 accessing small files in `FT_Stream_OpenGzip' is never executed! As
415 a consequence, access to PCF files in general (which are normally
416 small files) should be much improved now as originally intended.
417
Werner Lemberg23423bc2015-09-11 08:28:27 +02004182015-09-11 Werner Lemberg <wl@gnu.org>
419
Werner Lembergdb5a4a92015-09-12 08:32:55 +0200420 [psaux] Fix potential buffer overflow (#45922).
421
422 * src/psaux/psobjs.c (ps_parser_skip_PS_token): If a token is
423 enclosed in balanced expressions, ensure that the cursor position
424 doesn't get larger than the current limit.
425
4262015-09-11 Werner Lemberg <wl@gnu.org>
427
Werner Lemberg19b82cf2015-09-11 20:25:32 +0200428 [base] Avoid crash while tracing `load_mac_face'.
429
430 Reported in Savannah bug #45919.
431
432 * src/base/ftobjs.c (load_mac_face): Honour FT_OPEN_MEMORY while
433 tracing.
434
4352015-09-11 Werner Lemberg <wl@gnu.org>
436
Werner Lemberg23423bc2015-09-11 08:28:27 +0200437 [type42] Fix endless loop (#45920).
438
439 * src/type42/t42parse.c (t42_parse_encoding): Synchronize with
440 type1's `parse_encoding'.
441
Werner Lemberge5a27a72015-09-10 07:44:11 +02004422015-09-10 Werner Lemberg <wl@gnu.org>
443
444 [docmaker] Allow `-' in bold and italic markup.
445
446 * src/tools/docmaker/sources.py (re_italic, re_bold): Adjust
447 accordingly.
448
Alexei Podtelezhnikov09948e42015-09-09 21:30:15 -04004492015-09-09 Alexei Podtelezhnikov <apodtele@gmail.com>
450
451 * src/base/ftcalc.c (FT_RoundFix): Improve.
452
Wojciech Mamrak822acb02015-09-09 07:59:10 +02004532015-09-09 Wojciech Mamrak <wmamrak@gmail.com>
454
455 * src/base/ftcalc.c (FT_CeilFix, FT_FloorFix): Normalize.
456
457 This commit makes the functions behave as expected, this is,
458 rounding towards plus or minus infinity.
459
Alexei Podtelezhnikovb002f682015-09-07 13:47:36 -04004602015-09-07 Alexei Podtelezhnikov <apodtele@gmail.com>
461
462 * src/smooth/ftgrays.c (gray_render_line): Simplify clipping.
463
Alexei Podtelezhnikov5a6dc872015-09-04 23:14:46 -04004642015-09-04 Alexei Podtelezhnikov <apodtele@gmail.com>
465
466 [raster,smooth] Microoptimizations.
467
468 * src/raster/ftraster.c (Insert_Y_Turn, Finalize_Profile_Table,
469 Beziier_Up, ): Use do-while loops.
470
471 * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line,
472 gray_convert_glyph): Ditto.
473
Werner Lemberg696b7122015-09-04 10:10:59 +02004742015-09-04 Werner Lemberg <wl@gnu.org>
475
Werner Lembergd3cba0e2015-09-04 10:28:53 +0200476 [autofit] Redesign code ranges (2/2).
477
478 This commit adds two fallback scripts (`latb', `latp') and
479 implements support for the no-base character ranges introduced in
480 the previous commit.
481
482 * src/autofit/aftypes.h (AF_ScriptClassRec): Add
483 `script_uni_nobase_ranges' field.
484 (AF_DEFINE_SCRIPT_CLASS): Updated.
485
486 * src/autofit/afscript.h, src/autofit/afstyles.h: Add `latb' and
487 `latp' fallback scripts.
488
489 * src/autofit/afblue.dat: Add blue zones for Latin subscript and
490 superscript fallback scripts.
491
492 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
493
494 * src/autofit/afglobal.h (AF_NOBASE): New style flag for no-base
495 characters.
496 (AF_STYLE_MASK): Updated.
497
498 * src/autofit/afglobal.c (SCRIPT): Updated.
499 (af_face_globals_compute_style_coverage): Handle new style flag.
500
501 * src/autofit/aflatin.c (af_latin_hints_apply): Handle new style
502 flag.
503
504 * src/autofit/afranges.h (SCRIPT): Use it to export no-base ranges.
505
5062015-09-04 Werner Lemberg <wl@gnu.org>
507
Werner Lemberg696b7122015-09-04 10:10:59 +0200508 [autofit] Redesign code ranges (1/2).
509
510 This patch introduces auxiliary code ranges that identify no-base
511 characters; they refer to glyphs of a script that should be hinted
512 without alignments to blue zones (mostly diacritics).
513
514 It also splits off ranges for fallback scripts that handle subscript
515 and superscript characters not covered by OpenType features. For
516 example, this greatly helps improve the hinting of various phonetic
517 alphabets, which contain a large amount characters that look like
518 superscript glyphs.
519
520 Finally, code ranges are updated to Unicode 8.0, and enclosed
521 characters are removed in general since they normally look better if
522 they stay unhinted.
523
524 * src/autofit/afranges.c (af_latn_uniranges): Updated to Unicode
525 8.0.
526 Split off superscript-like and subscript-like glyphs into...
527
528 (af_latb_uniranges, af_latp_uniranges): ... these two new arrays.
529
530 (af_xxxx_nobase_uniranges): New arrays that hold no-base characters
531 of the corresponding character ranges.
532
Werner Lemberg8cbbcf62015-09-03 06:47:30 +02005332015-09-03 Werner Lemberg <wl@gnu.org>
534
535 [autofit] Pass glyph index to hinting function.
536
537 No functionality change yet.
538
539 * src/autofit/aftypes.h (AF_WritingSystem_ApplyHintsFunc): Pass
540 glyph index.
541
542 * src/autofit/afcjk.c, src/autofit/afcjk.h (af_cjk_hints_apply),
543 src/autofit/afdummy.c (af_dummy_hints_apply), src/autofit/afindic.c
544 (af_indic_hints_apply), src/autofit/aflatin.c
545 (af_latin_hints_apply), src/autofit/aflatin2.c
546 (af_latin2_hints_apply), src/autofit/afloader.c (af_loader_load_g):
547 Updated.
548
Werner Lemberg87c81f02015-08-30 10:35:21 +02005492015-08-30 Werner Lemberg <wl@gnu.org>
550
Werner Lemberg40103a32015-08-31 08:51:52 +0200551 [autofit] Code clean-up.
552
553 * src/autofit/afglobal.h (AF_STYLE_MASK): New macro.
554 (AF_STYLE_UNASSIGNED): Use AF_STYLE_MASK for definition.
555
556 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
557 Updated.
558
5592015-08-30 Werner Lemberg <wl@gnu.org>
560
Werner Lemberg87c81f02015-08-30 10:35:21 +0200561 [autofit] Make glyph style array use 16bit values.
562
563 * include/freetype/ftautoh.h (FT_Prop_GlyphToScriptMap): Use
564 `FT_UShort' for `map' field.
565
566 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage,
567 af_face_globals_new), src/autofit/hbshim.c, src/autofit/hbshim.h
568 (af_get_coverage): Use FT_UShort for `glyph_styles' array.
569
570 * src/autofit/afglobal.h (AF_STYLE_UNASSIGNED, AF_DIGIT): Extend to
571 16 bits.
572 (AF_FaceGlobalsRec): Use `FT_UShort' for `glyph_styles' field.
573
Werner Lemberg633d8ed2015-08-26 06:18:47 +02005742015-08-26 Werner Lemberg <wl@gnu.org>
575
576 * builds/unix/configure.raw: Need harfbuzz >= 0.9.21 (#45828).
577
Werner Lemberg78b01402015-08-25 07:23:01 +02005782015-08-25 Werner Lemberg <wl@gnu.org>
579
580 [base] Improve kerning tracing and documentation.
581
582 * src/base/ftobjs.c (FT_Get_Kerning): Emit tracing message if
583 scaled-down kerning values differ.
584
Werner Lemberg91d59162015-08-18 06:04:36 +02005852015-08-18 Werner Lemberg <wl@gnu.org>
586
587 [raster] Remove last remnants of `raster5' driver.
588
589 * src/raster/ftrend1.h (ft_raster5_renderer_class): Removed.
590
591 * src/raster/rastpic.c, src/raster/rastpic.h
592 (ft_raster5_renderer_class_pic_init,
593 ft_raster5_renderer_class_pic_free): Removed.
594
Alexei Podtelezhnikova0172d12015-08-17 22:58:59 -04005952015-08-17 Alexei Podtelezhnikov <apodtele@gmail.com>
596
597 [base] Improve emboldener (#45596).
598
599 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Correct displacement
600 of zero-lenght segments.
601
Alexei Podtelezhnikov00d89952015-08-16 22:57:34 -04006022015-08-16 Alexei Podtelezhnikov <apodtele@gmail.com>
603
Alexei Podtelezhnikov815c3242015-08-17 21:48:46 -0400604 [base] Reoptimize arithmetic.
Alexei Podtelezhnikov00d89952015-08-16 22:57:34 -0400605
606 * src/base/ftcalc.c (FT_MulDiv, FT_MulFix) [!FT_LONG64]: Remove
607 special cases that slow down the general use.
608
pazerf0ed30e2015-08-15 06:53:09 +02006092015-08-15 pazer <ibemad@gmail.com>
610
611 Fix C++ compilation (#45762).
612
613 * src/base/ftstroke.c (ft_outline_glyph_class): Use
614 FT_CALLBACK_TABLE.
615
Alexei Podtelezhnikovae258aa2015-08-14 23:23:18 -04006162015-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
617
618 [truetype] Clean up.
619
620 * src/truetype/ttgload.c (TT_Process_Composite_Component): Use
621 `FT_Outline_Transform' and `FT_Outline_Translate'.
622 (translate_array): Dropped.
623
Werner Lembergd0d7ee02015-08-14 14:30:58 +02006242015-08-14 Andreas Enge <andreas.enge@inria.fr>
625
626 * builds/unix/detect.mk (CONFIG_SHELL): Don't handle it (#44261).
627
Werner Lemberg14d6b5d2015-08-13 15:22:17 +02006282015-08-13 Werner Lemberg <wl@gnu.org>
629
630 [truetype] Introduce named instance access to GX fonts.
631
632 For functions querying a face, bits 16-30 of the face index can hold
633 the named instance index if we have a GX font. The indices start
634 with value 1; value 0 indicates font access without GX variation
635 data.
636
637 * include/freetype/freetype.h (FT_FaceRec): Update documentation.
638 * include/freetype/internal/sfnt.h: Ditto.
639
640 * src/sfnt/sfobjs.c (sfnt_init_face)
641 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Get number of named instances and
642 do argument checks.
643 (sfnt_load_face): Updated.
644
645 * src/truetype/ttobjs.c (tt_face_init)
646 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Use named instance, overwriting
647 the style name.
648
649 * src/base/ftobjs.c (open_face_from_buffer,
650 open_face_PS_from_sfnt_stream): Updated.
651 * src/bdf/bdfdrivr.c (BDF_Face_Init): Updated.
652 * src/cff/cffload.c (cff_font_load): Updated.
653
654 * src/cff/cffobjs.c (cff_face_init): Make function exit early for
655 pure CFF fonts if `font_index < 0'.
656 Updated.
657
658 * src/cid/cidobjs.c (cid_face_init): Updated.
659 * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated.
660 * src/pfr/pfrobjs.c (pfr_face_init): Updated.
661 * src/type1/t1objs.c (T1_Face_Init): Updated.
662 * src/type42/t42objs.c (T42_Face_Init): Updated.
663 * src/winfonts/winfnt.c (fnt_face_get_dll_font, FNT_Face_Init):
664 Updated.
665
666 * docs/CHANGES: Updated.
667
Alexei Podtelezhnikov4a466862015-08-12 23:45:40 -04006682015-08-12 Alexei Podtelezhnikov <apodtele@gmail.com>
669
670 [type1,cff,cid] Streamline font matrix application.
671
672 * src/type1/t1gload.c (T1_Load_Glyph): Directly modify advances only
673 if font matrix is not trivial.
674 * src/cff/cffgload.c (cff_slot_load): Ditto.
675 * sff/cid/cidgload.c (cid_slot_load_glyph): Ditto for advances and the
676 entire outline.
677
Werner Lemberg7ebe6ac2015-08-11 06:47:25 +02006782015-08-11 Werner Lemberg <wl@gnu.org>
679
680 [builds/unix] Minor.
681
682 * builds/unix/configure.raw:
683 s/lib{priv,staticconf}/libs{priv,staticconf}/ for orthogonality with
684 similarly named uppercase variables.
685
Alexei Podtelezhnikova37da212015-08-10 23:05:02 -04006862015-08-10 Alexei Podtelezhnikov <apodtele@gmail.com>
687
688 [type1,cid,type42] Minor improvements.
689
690 * src/type1/t1load.c (t1_parse_font_matrix): Scale units per EM only
691 when necessary. Refresh comments.
692 * src/cid/cidload.c (cid_parse_font_matrix): Ditto.
693 * src/type42/t42parse.c (t42_parse_font_matrix): Refresh comments.
694
Werner Lemberge5f44692015-08-08 07:45:03 +02006952015-08-08 Werner Lemberg <wl@gnu.org>
696
Werner Lembergbd75a512015-08-08 08:39:45 +0200697 [type42] Fix glyph access.
698
699 This is a severe bug: We've missed one level of indirection, as
700 described in the Type 42 specification. As a result, ftview
701 sometimes showed incorrect glyphs for given glyph names, and even
702 displayed `error 0x0006' (invalid argument!) in case the number of
703 glyph indices differed between the Type 42 font and the embedded
704 TTF.
705
706 Apparently, noone ever noticed it; this shows how much Type 42 fonts
707 are in use...
708
709 * src/type42/t42objs.c (T42_GlyphSlot_Load): Map Type 42 glyph index
710 to embedded TTF's glyph index.
711
7122015-08-08 Werner Lemberg <wl@gnu.org>
713
Werner Lemberge5f44692015-08-08 07:45:03 +0200714 [type42] Minor clean-up.
715
716 * src/type42/t42parse.c (t42_parse_font_matrix): Remove unused
717 variable.
718
Alexei Podtelezhnikovfd705122015-08-06 21:49:08 -04007192015-08-06 Alexei Podtelezhnikov <apodtele@gmail.com>
720
721 [type42] Parse FontMatrix according to specifications.
722
723 * src/type42/t42parse.c (t42_parse_font_matrix): Type 42 FontMatrix
724 does not need scaling by 1000. Units_per_EM are taken from the
725 embedded TrueType.
726
Werner Lembergff406e22015-08-06 07:34:50 +02007272015-08-06 Werner Lemberg <wl@gnu.org>
728
729 [autofit] Improve Arabic hinting.
730
731 Problem reported by Titus Nemeth <tn@tntypography.eu> (by using
732 ttfautohint).
733
734 * src/autofit/afblue.dat: Add neutral blue zone for the tatweel
735 character.
736
737 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
738
Alexei Podtelezhnikov98e8e992015-08-06 00:06:14 -04007392015-08-05 Alexei Podtelezhnikov <apodtele@gmail.com>
740
741 [truetype] Clean up types.
742
743 * src/truetype/ttobjs.c (TT_Size): Move declaration from here.
744 * include/freetype/internal/tttypes.h (TT_Size): ... to here.
745 (TT_LoaderRec): Switch to appropriate types for `face' and `size'.
746 * src/truetype/ttgload.c: Remove corresponding type casts.
747 * src/truetype/ttsubpix.c: Ditto.
748
Werner Lemberg15e2a4f2015-08-05 21:53:50 +02007492015-08-05 Werner Lemberg <wl@gnu.org>
750
751 [autofit] Improve recognition of flat vs. rounded segments.
752
753 Lower the flatness threshold from upem/8 to upem/14, making the
754 auto-hinter accept shorter elements.
755
756 Synchronize flat/round stem selection algorithm with blue zone code.
757
758 * src/autofit/aflatin.c (FLAT_THRESHOLD): New macro.
759 (af_latin_metrics_init_blues): Use it.
760 (af_latin_hints_compute_segments): Collect information on maximum
761 and minimum coordinates of `on' points; use this to add a constraint
762 for the flat/round decision similar to
763 `af_latin_metrics_init_blues'.
764
Werner Lembergeb22ef22015-08-04 06:50:04 +02007652015-08-04 Werner Lemberg <wl@gnu.org>
766
767 Another left-shift bug (#45681).
768
769 * src/base/ftobjs.c (IsMacBinary): Only accept positive values for
770 `dlen'.
771
Alexei Podtelezhnikov7e6c3212015-08-03 23:26:13 -04007722015-08-03 Alexei Podtelezhnikov <apodtele@gmail.com>
773
774 [base] Fix `ft_corner_orientation'.
775
776 Remove casting from `FT_Long' to `FT_Int' that might change the sign
777 of the return value and make it faster too.
778
779 * src/base/ftcalc.c (ft_corner_orientation): On 32-bit systems, stay
780 with 32-bit arithmetic when safe. Use plain math on 64-bit systems.
781 * src/pshinter/pshalgo.c: Remove old unused code.
782
Werner Lembergca6a5cf2015-08-03 08:51:18 +02007832015-08-03 Werner Lemberg <wl@gnu.org>
784
Werner Lemberg8dfc7602015-08-03 12:23:30 +0200785 * src/truetype/ttgload.c (load_truetype_glyph)
786 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Fix crash for composite glyphs
787 having a depth greater than 1.
788
7892015-08-03 Werner Lemberg <wl@gnu.org>
790
Werner Lembergca6a5cf2015-08-03 08:51:18 +0200791 Fix typo in clang bug from 2015-07-31 (#45678).
792
793 * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Fix inequality.
794
Werner Lemberg70e9d812015-08-02 09:42:12 +02007952015-08-02 Werner Lemberg <wl@gnu.org>
796
Werner Lemberga82c45d2015-08-02 18:35:49 +0200797 * CMakeLists.txt: Improve shared library support.
798
799 Based on a patch from John Cary <cary@txcorp.com>.
800
8012015-08-02 Werner Lemberg <wl@gnu.org>
802
Werner Lemberg682c2712015-08-02 15:46:26 +0200803 * builds/unix/freetype-config.in (enable_shared): Remove. Unused.
804
8052015-08-02 Werner Lemberg <wl@gnu.org>
806
Werner Lemberg70e9d812015-08-02 09:42:12 +0200807 Fix more invalid left-shifts.
808
809 * src/pfr/pfrgload.c (pfr_glyph_load_compound): Use multiplication,
810 not left-shift.
811
812 * src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar,
813 tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Use multiplication,
814 not left-shift.
815
Werner Lemberg5d1b8ab2015-07-31 21:49:07 +02008162015-07-31 Werner Lemberg <wl@gnu.org>
817
Werner Lemberg6343ba22015-08-01 07:53:48 +0200818 Fix some bugs found by clang's `-fsanitize=undefined' (#45661).
819
820 * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Only accept
821 positive values from header.
822 Check overflow.
823
824 * src/base/ftoutln.c (SCALED): Correctly handle left-shift of
825 negative values.
826
827 * src/bdf/bdf.h (_bdf_glyph_modified, _bdf_set_glyph_modified,
828 _bdf_clear_glyph_modified): Use unsigned long constant.
829
830 * src/bdf/bdfdrivr.c (BDF_Size_Select, BDF_Glyph_Load): Don't
831 left-shift values that can be negative.
832
833 * src/pcf/pcfdrivr.c (PCF_Size_Select, PCF_Glyph_Load): Don't
834 left-shift values that can be negative.
835
836 * src/raster/ftraster.c (SCALED): Correctly handle left-shift of
837 negative values.
838
839 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Don't left-shift
840 values that can be negative.
841
842 * src/truetype/ttgload.c (TT_Load_Composite_Glyph,
843 compute_glyph_metrics, load_sbit_image): Don't left-shift values
844 that can be negative.
845
8462015-07-31 Werner Lemberg <wl@gnu.org>
847
Werner Lemberg5d1b8ab2015-07-31 21:49:07 +0200848 Define FT_LONG_MAX.
849
850 * include/freetype/config/ftstdlib.h (FT_LONG_MAX): New macro.
851 * src/cff/cf2arrst.c (cf2_arrstack_setNumElements): Use it.
852
8532015-07-28 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov2b07a5a2015-07-28 23:14:30 -0400854
855 * src/base/ftcalc.c (FT_Vector_NormLen): Clarify.
856
Werner Lemberg5d1b8ab2015-07-31 21:49:07 +02008572015-07-27 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikove8b186e2015-07-27 23:22:34 -0400858
859 * src/base/ftcalc.c (FT_Vector_NormLen): Explicate type conversions.
860
Matthias Clasenb650dfb2015-07-26 21:08:34 +02008612015-07-26 Matthias Clasen <matthias.clasen@gmail.com>
862
863 [cff] Don't use `hmtx' table for LSB (#45520).
864
865 * src/cff/cffgload.c (cff_slot_load): Use `htmx' table for advance
866 width only. Bug introduced 2015-04-10.
867
Werner Lembergf9be5672015-07-09 15:10:31 +02008682015-07-09 Werner Lemberg <wl@gnu.org>
869
870 Better support of user-supplied C++ namespaces.
871
872 See
873
874 http://lists.nongnu.org/archive/html/freetype-devel/2015-07/msg00008.html
875
876 for a rationale.
877
878 * src/autofit/afpic.h, src/base/basepic.h, src/cff/cffpic.h,
879 src/pshinter/pshpic.h, src/psnames/pspic.h, src/raster/rastpic.h,
880 src/sfnt/sfntpic.h, src/smooth/ftspic.h, src/truetype/ttpic.h
881 (FT_BEGIN_HEADER, FT_END_HEADER): Move macro calls to not enclose
882 header files that contain FT_{BEGIN,END}_HEADER macros by
883 themselves.
884
885 * src/autofit/aftypes.h [FT_DEBUG_AUTOFIT]: Include
886 FT_CONFIG_STANDARD_LIBRARY_H earlier.
887
888 * src/truetype/ttpic.h: Include FT_INTERNL_PIC_H.
889
Werner Lemberg1cdac102015-07-07 14:04:44 +02008902015-07-07 Werner Lemberg <wl@gnu.org>
891
892 [sfnt] Make `tt_face_get_name' member of the SFNT interface.
893
894 * include/freetype/internal/sfnt.h (TT_Get_Name_Func): New
895 prototype.
896 (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): New member `get_name'.
897
898 * src/sfnt/sfdriver.c (sfnt_interface): Updated.
899
900 * src/sfnt/sfobjs.c (tt_face_get_name): Tag it with `LOCAL_DEF'.
901 * src/sfnt/sfobjs.h: Add prototype for it.
902
Werner Lembergeb1bba92015-06-30 09:46:39 +02009032015-06-30 Werner Lemberg <wl@gnu.org>
904
905 Fix some clang compiler warnings.
906
907 * src/base/ftoutln.c (FT_Outline_EmboldenXY), src/cff/cf2intrp.c
908 (cf2_interpT2CharString), src/truetype/ttgload.c
909 (load_truetype_glyph), src/truetype/ttgxvar.c (tt_handle_deltas),
910 src/truetype/ttinterp.c (Ins_INSTCTRL): Fix signedness issues.
911
Alexei Podtelezhnikov884e4e62015-06-29 22:32:05 -04009122015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
913
Alexei Podtelezhnikov5aaabb42015-06-29 22:46:54 -0400914 [truetype] Speed up bytecode interpreter.
915
916 * src/truetype/ttinterp.c (Normalize): Use `FT_Vector_NormLen'.
917
9182015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
919
Alexei Podtelezhnikov9ef02bd2015-06-29 22:39:10 -0400920 [base] Speed up emboldening.
921
Werner Lembergeb1bba92015-06-30 09:46:39 +0200922 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Use
923 `FT_Vector_NormLen'.
Alexei Podtelezhnikov9ef02bd2015-06-29 22:39:10 -0400924
9252015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
926
Alexei Podtelezhnikov884e4e62015-06-29 22:32:05 -0400927 [base] Implement fast vector normalization.
928
929 The function uses Newton's iterations instead of dividing vector
930 components by its length, which needs a square root. This is,
931 literally, a bit less accurate but a lot faster.
932
933 * src/base/ftcalc.c (FT_Vector_NormLen): New function.
934
Werner Lemberg22479ca2015-06-28 10:26:33 +02009352015-06-28 Werner Lemberg <wl@gnu.org>
936
Werner Lemberg7cdc77f2015-06-28 11:40:02 +0200937 * CMakeLists.txt: Always create `ftconfig.h'.
938
939 For non-UNIX builds, the file stays unmodified. However, it's
940 better to have the main configuration files at the same place
941 regardless of the OS.
942
9432015-06-28 Werner Lemberg <wl@gnu.org>
944
Werner Lemberg2c89e2c2015-06-28 11:06:47 +0200945 * CMakeLists.txt: Improve MSVC support (#43737).
946
9472015-06-28 Werner Lemberg <wl@gnu.org>
948
Werner Lemberg52c9b1a2015-06-28 11:03:10 +0200949 [cmake] Check for libraries and create `ftoption.h'.
950
951 * builds/FindHarfBuzz.cmake: New file, taken from
952
953 https://trac.webkit.org/browser/trunk/Source/cmake/FindHarfBuzz.cmake
954
955 * CMakeLists.Txt: Add path to local cmake modules.
956 Find dependencies for zlib, bzip2, libpng, and harfbuzz.
957 Create `ftoption.h' file.
958 Set up include and linker stuff for libraries.
959
9602015-06-28 Werner Lemberg <wl@gnu.org>
961
Werner Lemberg97b757d2015-06-28 10:42:47 +0200962 * CMakeLists.txt: Fix creation of `ftconfig.h'.
963 Check for UNIX header files using `check_include_file'.
964 Set up correct header include directories.
965
9662015-06-28 Werner Lemberg <wl@gnu.org>
967
Werner Lemberg22479ca2015-06-28 10:26:33 +0200968 * CMakeLists.txt: Disallow in-source builds.
969
Werner Lemberg802f6a92015-06-27 07:12:42 +02009702015-06-27 Werner Lemberg <wl@gnu.org>
971
972 * src/tools/docmaker/utils.py (check_output): Add missing `\n'.
973
Werner Lemberg94c79c22015-06-26 06:46:59 +02009742015-06-26 Werner Lemberg <wl@gnu.org>
975
Werner Lemberg802f6a92015-06-27 07:12:42 +0200976 * CMakeLists.txt: Select platform-dependent `ftdebug.c'.
Werner Lemberg94c79c22015-06-26 06:46:59 +0200977
Werner Lemberg392cf222015-06-25 13:04:57 +02009782015-06-25 Werner Lemberg <wl@gnu.org>
979
Werner Lemberg68222dd2015-06-25 16:38:11 +0200980 * CMakeLists.txt: Use cmake functions for generating `ftconfig.h'.
981 Additionally, do this for UNIX only.
982
9832015-06-25 Werner Lemberg <wl@gnu.org>
984
Werner Lemberg5ef5a4f2015-06-25 15:45:13 +0200985 * CMakeLists.txt (BASE_SRCS): Use `ftbase.c' and `psnames.c'.
986
9872015-06-25 Werner Lemberg <wl@gnu.org>
988
Werner Lemberg392cf222015-06-25 13:04:57 +0200989 Another adjustment to header locations.
990
991 This change is a result of a discussion thread on freetype-devel
992
993 http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html
994
995 Re-introduce the `freetype2' subdirectory for all FreeType header
996 files after installation, and rename the `freetype2' subdirectory in
997 the git repository to `freetype'.
998
999 * include/freetype2: Renamed to...
1000 * include/freetype: This.
1001
1002 * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
1003 PRIVATE_HEADERS): Updated.
1004 Update creation of `ftconfig.h'.
1005 Install generated `ftconfig.h'.
1006
1007 * Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
1008
1009 * builds/amiga/include/config/ftconfig.h, builds/freetype.mk
1010 (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
1011 builds/unix/freetype2.in: Updated.
1012
1013 * builds/unix/freetype-config.in: Updated.
1014 * builds/unix/configure.raw: Don't check for `rmdir'.
1015 * builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable
1016 according to the autoconf info manual.
1017 * builds/unix/install.mk (install, uninstall,
1018 distclean_project_unix): Update and simplify.
1019
1020 * builds/wince/*, builds/windows/*: Updated.
1021
1022 * devel/ft2build.h, include/ft2build.h: Updated.
1023
1024 * include/freetype2/config/ftheader.h,
1025 include/freetype2/internal/ftserv.h,
1026 include/freetype2/internal/internal.h: Update all header file
1027 macros.
1028
1029 * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
1030
1031 * docs/*: Updated.
1032
Werner Lemberg1982a882015-06-26 06:52:34 +020010332015-06-24 Alexei Podtelezhnikov <apodtele@gmail.com>
1034
1035 * src/bdf/bdflib.c (_bdf_parse_start): Disallow 0 bpp.
1036
10372015-06-24 Alexei Podtelezhnikov <apodtele@gmail.com>
1038
1039 * src/bdf/bdflib.c (_bdf_parse_start): Simplify bpp parsing.
1040
Werner Lemberg59312682015-06-23 09:24:48 +020010412015-06-23 Werner Lemberg <wl@gnu.org>
1042
1043 s/TYPEOF/FT_TYPEOF/ (#45376).
1044
1045 * builds/unix/ftconfig.in, builds/vms/ftconfig.in,
1046 include/freetype2/config/ftconfig.h,
1047 include/freetype2/internal/ftobjs.h, src/autofit/afwarp.h: Do it.
1048
Werner Lemberg8502c982015-06-22 06:35:23 +020010492015-06-22 Werner Lemberg <wl@gnu.org>
1050
1051 Fix Savannah bug #45097.
1052
1053 We no longer `pollute' the namespace of possible header file names;
1054 instead we move `ft2build.h' up by one level so that it gets
1055 installed in the default include directory (e.g.,
1056 /usr/local/include). After this commit, only `ft2build.h' stays in
1057 the compiler's include path.
1058
1059 No visible changes for the user who follows the standard FreeType
1060 header inclusion rules.
1061
1062 * include/*: Move to ...
1063 * include/freetype2/*: This directory, except `ft2build.h'.
1064
1065 * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
1066 PRIVATE_HEADERS), Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
1067
1068 * builds/amiga/include/config/ftconfig.h, builds/freetype.mk
1069 (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
1070 builds/unix/install.mk (install, uninstall),
1071 builds/unix/freetype2.in: Updated.
1072
1073 * builds/unix/freetype-config.in: Updated.
1074 Emit -I directory only if it is not `/usr/include'.
1075
1076 * builds/wince/*, builds/windows/*: Updated.
1077
1078 * devel/ft2build.h, include/ft2build.h: Updated.
1079
1080 * include/freetype2/config/ftheader.h,
1081 include/freetype2/internal/ftserv.h,
1082 include/freetype2/internal/internal.h: Update all header file
1083 macros.
1084
1085 * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
1086
Werner Lemberg31d97df2015-06-21 19:12:12 +020010872015-06-21 Werner Lemberg <wl@gnu.org>
1088
1089 Make Jam support work again.
1090
1091 This is just very basic stuff and just a little bit tested on
1092 GNU/Linux only. I won't delve into this since I'm not a Jam user.
1093
1094 * Jamfile: Call `HDRMACRO' for `ftserv.h' also.
1095 (DEFINES): Replace with...
1096 (CCFLAGS): ... this.
1097
1098 * src/Jamfile: Don't call `HDRMACRO' for `internal.h'; this is
1099 already handled in the top-level Jamfile.
1100
1101 * src/autofit/Jamfile (DEFINES): Replace with...
1102 (CCFLAGS): ... this.
1103 (_sources): Add missing files.
1104
1105 * src/cache/Jamfile: Don't call `HDRMACRO' for `ftcache.h'; it no
1106 longer contains macro header definitions.
1107
1108 * src/base/Jamfile, src/cff/Jamfile, src/sfnt/Jamfile,
1109 src/truetype/Jamfile (_sources): Add missing files.
1110
Werner Lemberg1a147ac2015-06-16 10:20:07 +020011112015-06-16 Werner Lemberg <wl@gnu.org>
1112
1113 Fix Savannah bug #45326.
1114
1115 * src/sfnt/sfntpic.h (SFNT_SERVICES_GET): Remove duplicate
1116 definitions.
1117
Werner Lemberge1862302015-06-07 16:11:18 +020011182015-06-07 Werner Lemberg <wl@gnu.org>
1119
1120 * Version 2.6 released.
1121 =======================
1122
1123
1124 Tag sources with `VER-2-6'.
1125
1126 * docs/VERSION.DLL: Update documentation and bump version number to
1127 2.6.
1128
1129 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
1130 builds/windows/vc2005/index.html,
1131 builds/windows/vc2008/freetype.vcproj,
1132 builds/windows/vc2008/index.html,
1133 builds/windows/vc2010/freetype.vcxproj,
1134 builds/windows/vc2010/index.html,
1135 builds/windows/visualc/freetype.dsp,
1136 builds/windows/visualc/freetype.vcproj,
1137 builds/windows/visualc/index.html,
1138 builds/windows/visualce/freetype.dsp,
1139 builds/windows/visualce/freetype.vcproj,
1140 builds/windows/visualce/index.html,
1141 builds/wince/vc2005-ce/freetype.vcproj,
1142 builds/wince/vc2005-ce/index.html,
1143 builds/wince/vc2008-ce/freetype.vcproj,
1144 builds/wince/vc2008-ce/index.html: s/2.5.5/2.6/, s/255/26/.
1145
1146 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 6.
1147 (FREETYPE_PATCH): Set to 0.
1148
1149 * builds/unix/configure.raw (version_info): Set to 18:0:12.
Werner Lemberg8cabd912015-10-04 08:18:01 +02001150 * CMakeLists.txt (VERSION_MINOR): Set to 6.
1151 (VERSION_PATCH): Set to 0.
Werner Lemberge1862302015-06-07 16:11:18 +02001152
1153 * src/autofit/afmodule.c [!FT_MAKE_OPTION_SINGLE_OBJECT]: Add
1154 declarations for dumping functions.
1155
1156 * src/truetype/ttinterp.c (TT_New_Context): Pacify compiler.
1157
1158 * builds/toplevel.mk: Use `freetype.mk's code to compute the version
1159 string.
1160 Don't include a zero patch level in version string.
1161 * builds/freetype.mk: Remove code for computing the version string.
1162
Ashish Azad472119a2015-06-06 05:45:17 +020011632015-06-06 Ashish Azad <ashish.azad@samsung.com>
1164
1165 Fix Savannah bug #45260.
1166
1167 * src/pfr/pfrdrivr.c (pfr_get_kerning): Fix typo.
1168
Werner Lemberg75534a02015-06-03 00:54:09 +020011692015-06-03 Werner Lemberg <wl@gnu.org>
1170
1171 [truetype] Fix memory leak.
1172
1173 Problem reported by Grissiom <chaos.proton@gmail.com>; in
1174
1175 http://lists.nongnu.org/archive/html/freetype/2015-05/msg00013.html
1176
1177 there is an example code to trigger the bug.
1178
1179 * src/truetype/ttobjs.c (tt_size_init_bytecode): Free old `size'
1180 data before allocating again. Bug most probably introduced four
1181 years ago in version 2.4.3.
1182
11832015-06-02 Werner Lemberg <wl@gnu.org>
Werner Lemberg54d04282015-06-01 12:12:06 +02001184
Werner Lembergd1ade6d2015-06-02 11:44:52 +02001185 [raster] Add more tracing.
1186
1187 * src/raster/ftraster.c (FT_TRACE7) [_STANDALONE_]: Define.
1188 (Vertical_Sweep_Span, Vertical_Sweep_Drop, Horizontal_Sweep_Span,
1189 Horizontal_Sweep_Drop, Render_Glyph): Add tracing calls.
1190
11912015-06-01 Werner Lemberg <wl@gnu.org>
1192
Werner Lemberg54d04282015-06-01 12:12:06 +02001193 [truetype] While tracing opcodes, show code position and stack.
1194
1195 * src/truetype/ttinterp.c: Change all existing TRACE7 calls to
1196 TRACE6.
1197 (opcode_name): Add string lengths.
1198 (TT_RunIns): Implement display of code position and stack.
1199
Werner Lembergcdee7d12015-05-31 11:54:42 +020012002015-05-31 Werner Lemberg <wl@gnu.org>
1201
Werner Lemberge9df4e42015-05-31 12:21:34 +02001202 [truetype] In GX, make private point numbers work correctly.
1203
1204 This is completely missing in Apple's documentation: If a `gvar'
1205 tuple uses private point numbers (this is, deltas are specified for
1206 some points only), the uncovered points must be interpolated for
1207 this tuple similar to the IUP bytecode instruction. Examples that
1208 need this functionality are glyphs `Oslash' and `Q' in Skia.ttf.
1209
1210 * src/truetype/ttgxvar.c (tt_delta_shift, tt_delta_interpolate,
1211 tt_handle_deltas): New functions.
1212 (TT_Vary_Get_Glyph_Deltas): Renamed to...
1213 (TT_Vary_Apply_Glyph_Deltas): ... this; it directly processes the
1214 points and does no longer return an array of deltas.
1215 Add tracing information.
1216 Call `tt_handle_deltas' to interpolate missing deltas.
1217 Also fix a minor memory leak in case of error.
1218
1219 * src/truetype/ttgxvar.h: Updated.
1220
1221 * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
1222 load_truetype_glyph): Updated.
1223
12242015-05-31 Werner Lemberg <wl@gnu.org>
1225
Werner Lemberg9845c1d2015-05-31 11:57:31 +02001226 [truetype] In GX, make intermediate tuplets work at extrema.
1227
1228 * src/truetype/ttgxvar.c (ft_var_apply_tuple): Fix range condition.
1229
12302015-05-31 Werner Lemberg <wl@gnu.org>
1231
Werner Lembergcdee7d12015-05-31 11:54:42 +02001232 [truetype] Add tracing information to GX code.
1233
1234 * src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar,
1235 ft_var_apply_tuple, TT_Get_MM_Var, TT_Set_MM_Blend,
1236 TT_Set_Var_Design, tt_face_vary_cvt): Do it.
1237
Werner Lemberg366b2ea2015-05-28 10:58:40 +020012382015-05-28 Werner Lemberg <wl@gnu.org>
1239
1240 * src/tools/apinames.c (names_dump): Fix invalid reference.
1241
1242 Problem reported by Guzman Mosqueda, Jose R
1243 <jose.r.guzman.mosqueda@intel.com>.
1244
Werner Lemberga5e1f6f2015-05-24 23:29:23 +020012452015-05-24 Werner Lemberg <wl@gnu.org>
1246
1247 [truetype] Fix commit from 2015-05-22.
1248
1249 * src/truetype/ttgload.c, src/truetype/ttinterp.c: Guard new code
1250 with `TT_CONFIG_OPTION_SUBPIXEL_HINTING'.
1251
1252 Problem reported by Nikolaus Waxweiler <madigens@gmail.com>.
1253
Werner Lembergbb435da2015-05-23 07:21:25 +020012542015-05-23 Werner Lemberg <wl@gnu.org>
1255
Werner Lemberg7f099482015-05-24 09:50:24 +02001256 [truetype] Fix return values of GETINFO bytecode instruction.
1257
1258 * src/truetype/ttinterp.h (TT_ExecContextRec): New fields
1259 `vertical_lcd' and `gray_cleartype'.
1260
1261 * src/truetype/ttgload.c (tt_loader_init): Initialize new fields.
1262 Change `symmetrical smoothing' to TRUE, since FreeType produces
1263 exactly this.
1264
1265 * src/truetype/ttinterp.c (Ins_GETINFO): Fix selector/return bit
1266 values for symmetrical smoothing, namely 11/18.
1267 Handle bits for vertical LCD subpixels (8/15) and Gray ClearType
1268 (12/19).
1269
12702015-05-23 Werner Lemberg <wl@gnu.org>
1271
Werner Lembergbb435da2015-05-23 07:21:25 +02001272 [truetype] Minor.
1273
1274 * src/truetype/ttinterp.h (TT_ExecContext):
1275 s/subpixel/subpixel_hinting.
1276
1277 * src/truetype/ttgload.c, src/truetype/ttgload.h: Updated.
1278
12792015-05-22 Werner Lemberg <wl@gnu.org>
Werner Lemberg790b8df2015-05-20 12:33:40 +02001280
Werner Lembergc61cad82015-05-22 22:02:15 +02001281 [truetype] Support selector index 3 of the INSTCTRL instruction.
1282
1283 This flag activates `native ClearType hinting', disabling backwards
1284 compatibility mode as described in Greg Hitchcocks whitepaper. In
1285 other words, it enables unrestricted functionality of all TrueType
1286 instructions in ClearType.
1287
1288 * src/truetype/ttgload.c (tt_get_metrics): Call `sph_set_tweaks'
1289 unconditionally.
1290 (tt_loader_init): Unset `ignore_x_mode' flag if bit 2 of
1291 `GS.instruct_control' is active.
1292
1293 * src/truetype/ttinterp.c (Ins_INSTCTRL): Handle selector index 3.
1294 (Ins_GETINFO): Updated.
1295
1296 * docs/CHANGES: Document it.
1297
12982015-05-20 Werner Lemberg <wl@gnu.org>
1299
Werner Lemberg790b8df2015-05-20 12:33:40 +02001300 [truetype] Minor.
1301
1302 * src/truetype/ttinterp.h (SetSuperRound): Fix type of `GridPeriod'
1303 argument.
1304
Werner Lemberg0a6b6ff2015-05-17 22:54:48 +020013052015-05-17 Werner Lemberg <wl@gnu.org>
1306
1307 [truetype] Fix loading of composite glyphs.
1308
1309 * src/truetype/ttgload.c (TT_Load_Composite_Glyph): If the
1310 ARGS_ARE_XY_VALUES flag is not set, handle argument values as
1311 unsigned. I trust `ttx' (which has exactly such code) that it does
1312 the right thing here...
1313
1314 The reason that noone has ever noticed this bug is probably the fact
1315 that point-aligned subglyphs are rare, as are subglyphs with a
1316 number of points in the range [128;255], which is quite large (or
1317 even in the range [32768;65535], which is extremely unlikely).
1318
Chris Liddelld65bf722015-05-12 07:16:46 +020013192015-05-12 Chris Liddell <chris.liddell@artifex.com>
1320
Chris Liddella87fb8c2015-05-12 07:27:35 +02001321 [cff] Make the `*curveto' operators more tolerant.
1322
1323 * src/cff/cf2intrp.c (cf2_interpT2CharString): The opcodes
1324 `vvcurveto', `hhcurveto', `vhcurveto', and `hvcurveto' all iterate,
1325 pulling values off the stack until the stack is exhausted.
1326 Implicitly the stack must be a multiple (or for subtly different
1327 behaviour) a multiple plus a specific number of extra values deep.
1328 If that's not the case, enforce it (as the old code did).
1329
13302015-05-12 Chris Liddell <chris.liddell@artifex.com>
1331
Chris Liddelld65bf722015-05-12 07:16:46 +02001332 [cff] fix incremental interface with new cff code.
1333
1334 * src/cff/cf2ft.c (cf2_getSeacComponent): When using the incremental
1335 interface to retrieve glyph data for a SEAC, it be left to the
1336 incremental interface callback to apply the encoding to raw
1337 character index (as it was in the previous code).
1338
Alexei Podtelezhnikov40914952015-04-29 21:57:30 -040013392015-04-29 Alexei Podtelezhnikov <apodtele@gmail.com>
1340
1341 [autofit] Speed up IUP.
1342
1343 * src/autofit/afhints.c (af_iup_interp): Separate trivial snapping to
1344 the same position from true interpolation, use `scale' to reduce
1345 divisions.
1346
Werner Lemberg3cc076d2015-04-28 09:16:27 +020013472015-04-28 Werner Lemberg <wl@gnu.org>
1348
1349 [cff] Use `name' table for PS name if we have a SFNT-CFF.
1350
1351 This follows the OpenType 1.7 specification. See
1352
1353 http://tug.org/pipermail/tex-live/2015-April/036634.html
1354
1355 for a discussion.
1356
1357 * src/cff/cffdrivr.c (cff_get_ps_name): Use the `sfnt' service if we
1358 have an SFNT.
1359
Alexei Podtelezhnikov40623a12015-04-27 22:27:00 -040013602015-04-27 Alexei Podtelezhnikov <apodtele@gmail.com>
1361
1362 [truetype] Speed up IUP.
1363
1364 * src/truetype/ttinterp.c (_iup_worker_interpolate): Separate trivial
1365 snapping to the same position from true interpolation.
1366
Werner Lemberg12661a52015-04-21 07:13:59 +020013672015-04-21 Werner Lemberg <wl@gnu.org>
1368
Werner Lemberg14df6b12015-04-22 11:14:35 +02001369 [autofit] By default, enable warping code but switch off warping.
1370
1371 Suggested by Behdad.
1372
1373 * include/config/ftoption.h: Define AF_CONFIG_OPTION_USE_WARPER.
1374
1375 * src/autofit/afmodule.c (af_autofitter_init): Initialize `warping'
1376 with `false'.
1377
13782015-04-21 Werner Lemberg <wl@gnu.org>
1379
Werner Lembergd164f702015-04-21 07:51:41 +02001380 * docs/CHANGES: Updated.
1381
13822015-04-21 Werner Lemberg <wl@gnu.org>
1383
Werner Lemberg12661a52015-04-21 07:13:59 +02001384 [autofit] Introduce `warping' property.
1385
1386 This code replaces the debugging hook from the previous commit with
1387 a better, more generic solution.
1388
1389 * include/ftautoh.h: Document it.
1390
1391 * src/autofit/afmodule.h (AF_ModuleRec)
1392 [AF_CONFIG_OPTION_USE_WARPER]: Add `warping' field.
1393
1394 * src/autofit/afmodule.c (_af_debug_disable_warper): Remove.
1395 (af_property_set, af_property_get, af_autofitter_init)
1396 [AF_CONFIG_OPTION_USE_WARPER]: Handle `warping' option.
1397
1398 * src/autofit/afhints.h (AF_HINTS_DO_WARP): Remove use of the no
1399 longer existing `_af_debug_disable_warper'.
1400
1401 * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c
1402 (af_latin_hints_init), src/autofit/aflatin2.c (af_latin2_hints_init)
1403 [AF_CONFIG_OPTION_USE_WARPER]: Add `AF_SCALER_FLAG_NO_WARPER' to the
1404 scaler flags if warping is off.
1405
1406 * src/autofit/aftypes.h: Updated.
1407
Werner Lemberg58f48f02015-04-16 20:11:49 +020014082015-04-16 Werner Lemberg <wl@gnu.org>
1409
1410 [autofit] Add debugging hook to disable warper.
1411
1412 * src/autofit/afmodule.c (_af_debug_disable_warper)
1413 [FT_DEBUG_AUTOFIT]: New global variable.
1414
1415 * src/autofit/aftypes.h: Updated.
1416 (AF_SCALER_FLAG_NO_WARPER): New macro (not actively used yet).
1417
1418 * src/autofit/afhints.h (AF_HINTS_DO_WARP): New macro.
1419
1420 * src/autofi/aflatin.c (af_latin_hints_apply)
1421 [AF_CONFIG_OPTION_USE_WARPER]: Use `AF_HINTS_DO_WARP' to control use
1422 of warper.
1423
1424 * src/autofit/afcjk.c (af_cjk_hints_init, af_cjk_hints_apply)
1425 [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'.
1426
1427 * src/autofit/aflatin2.c (af_latin2_hints_apply)
1428 [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'.
1429
Werner Lemberg5cd21552015-04-10 07:01:01 +020014302015-04-10 Werner Lemberg <wl@gnu.org>
1431
1432 [cff] Update advance width handling to OpenType 1.7.
1433
1434 Problem reported by Behdad.
1435
1436 * src/cff/cffdrivr.c (cff_get_advances): Handle SFNT case
1437 separately.
1438
1439 * src/cff/cffgload.c (cff_slot_load): Use advance width and side
1440 bearing values from `hmtx' table if present.
1441
Alexei Podtelezhnikov67b912d2015-04-03 22:38:11 -040014422015-04-03 Alexei Podtelezhnikov <apodtele@gmail.com>
1443
1444 * src/autofit/afhints.c (af_glyph_hints_reload): Use do-while loop.
1445
Alexei Podtelezhnikov770b5d02015-04-02 23:15:36 -040014462015-04-02 Alexei Podtelezhnikov <apodtele@gmail.com>
1447
1448 * src/autofit/aflatin.c (af_latin_hint_edges): Reduce logic.
1449
14502015-04-01 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov886f4d02015-04-01 22:57:43 -04001451
1452 [autofit] Finish the thought.
1453
1454 * src/autofit/afhints.c (af_direction_compute): make sure the long arm
1455 is never negative so that its `FT_ABS' is not necessary.
1456
Werner Lemberg16217e52015-04-01 13:13:56 +020014572015-04-01 Werner Lemberg <wl@gnu.org>
1458
Werner Lemberga2fa6572015-04-01 15:55:41 +02001459 [autofit] Call dumper functions for tracing.
1460
1461 * src/autofit/afcjk.c (af_cjk_hints_apply): Remove dead code.
1462 * src/autofit/afhints.c (af_glyph_hints_dump_points): Minor
1463 improvement.
1464 * src/autofit/afmodule.c (af_autofitter_load_glyph): Implement it.
1465
14662015-04-01 Werner Lemberg <wl@gnu.org>
1467
Werner Lembergdb8df792015-04-01 13:30:55 +02001468 [autofit] Make debugging stuff work again.
1469
1470 The interface to ftgrid was broken in the series of commits starting
1471 with
1472
1473 [autofit] Allocate AF_Loader on the stack instead of AF_Module.
1474
1475 from 2015-01-14.
1476
1477 * src/autofit/afmodule.c (_af_debug_hints_rec) [FT_DEBUG_AUTOFIT]:
1478 Use a global AF_GlyphHintsRec object for debugging.
1479 (af_autofitter_done, af_autofitter_load_glyph): Updated.
1480
1481 * src/autofit/afloader.c (af_loader_init, af_loader_done): Updated.
1482
14832015-04-01 Werner Lemberg <wl@gnu.org>
1484
Werner Lemberg16217e52015-04-01 13:13:56 +02001485 * src/autofit/afhints.c (af_glyph_hints_done): Fix minor thinko.
1486
Werner Lemberg10e2bb82015-03-29 13:32:47 +020014872015-03-29 Werner Lemberg <wl@gnu.org>
1488
Werner Lembergf353a382015-03-29 14:47:49 +02001489 [cff] Fix Savannah bug #44629.
1490
1491 * src/cff/cf2font.h (CF2_MAX_SUBR), src/cff/cffgload.h
1492 (CFF_MAX_SUBRS_CALLS): Set to 16.
1493
14942015-03-29 Werner Lemberg <wl@gnu.org>
1495
Werner Lemberg10e2bb82015-03-29 13:32:47 +02001496 [type1, truetype] Make the MM API more flexible w.r.t. `num_coords'.
1497
1498 This commit allows `num_coords' to be larger or smaller than the
1499 number of available axes while selecting a design instance, either
1500 ignoring excess data or using defaults if data is missing.
1501
1502 * src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design):
1503 Implement it.
1504
1505 * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design,
1506 T1_Set_Var_Design): Ditto.
1507
15082015-03-29 Werner Lemberg <wl@gnu.org>
Werner Lemberg8ce30262015-03-27 08:33:47 +01001509
Werner Lembergdd5d6d72015-03-29 10:04:22 +02001510 [type1] Minor.
1511
1512 * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design): Use
1513 FT_THROW.
1514 (T1_Set_Var_Design): Use T1_MAX_MM_AXIS and FT_THROW.
1515
15162015-03-27 Werner Lemberg <wl@gnu.org>
1517
Werner Lemberg8ce30262015-03-27 08:33:47 +01001518 [cff] Trace charstring nesting levels.
1519
1520 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdCALLGSUBR,
1521 cf2_cmdCALLSUBR, cf2_cmdRETURN>: Implement it.
1522
1523 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
1524 <cff_op_callsubr, cff_op_callgsubr, cff_op_return>: Ditto.
1525
Alexei Podtelezhnikovdac56442015-03-21 23:30:16 -040015262015-03-21 Alexei Podtelezhnikov <apodtele@gmail.com>
1527
1528 [base] Optimize `FT_Angle_Diff'.
1529
1530 Under normal circumstances we are usually close to the desired range
1531 of angle values, so that the remainder is not really necessary.
1532
1533 * src/base/fttrigon.c (FT_Angle_Diff): Use loops instead of remainder.
1534
1535 * src/autofit/aftypes.h (AF_ANGLE_DIFF): Ditto in the unused macro.
1536
Werner Lemberg6cc425d2015-03-21 06:51:07 +010015372015-03-21 Werner Lemberg <wl@gnu.org>
1538
1539 [truetype] Improve `gvar' handling.
1540
1541 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Correctly handle
1542 single-element runs. Cf. glyph `Q' in Skia.ttf with weights larger
1543 than the default.
1544
Alexei Podtelezhnikov2d7284e2015-03-20 21:34:19 -040015452015-03-20 Alexei Podtelezhnikov <apodtele@gmail.com>
1546
1547 * src/base/fttrigon.c (FT_Vector_Rotate): Minor refactoring.
1548
Alexei Podtelezhnikov6a171722015-03-17 22:43:08 -040015492015-03-17 Alexei Podtelezhnikov <apodtele@gmail.com>
1550
1551 Fix Savannah bug #44412 (part 2).
1552
1553 * src/base/fttrigon.c (FT_Sin, FT_Cos, FT_Tan): Call `FT_Vector_Unit'.
1554
Werner Lemberg06339952015-03-11 06:30:23 +010015552015-03-11 Werner Lemberg <wl@gnu.org>
1556
Werner Lembergd3284462015-03-11 16:45:58 +01001557 [autofit] Add support for Arabic script.
1558
1559 Thanks to Titus Nemeth <tn@tntypography.eu> for guidance!
1560
1561 * src/autofit/afblue.dat: Add blue zone data for Arabic.
1562
1563 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1564
1565 * src/autofit/afscript.h: Add Arabic standard characters.
1566
1567 * src/autofit/afranges.c: Add Arabic data.
1568
1569 * src/autofit/afstyles.h: Add Arabic data.
1570
1571 * docs/CHANGES: Document it.
1572
15732015-03-11 Werner Lemberg <wl@gnu.org>
1574
Werner Lemberga4516382015-03-11 08:09:13 +01001575 Rename `svxf86nm.h' to `svfntfmt.h'; update related symbols.
1576
1577 * include/internal/ftserv.h (FT_SERVICE_XFREE86_NAME_H): Renamed
1578 to...
1579 (FT_SERVICE_FONT_FORMAT_H): This.
1580
1581 * include/internal/services/svfntfmt.h (FT_XF86_FORMAT_*): Renamed
1582 to ...
1583 (FT_FONT_FORMAT_*): This.
1584
1585 src/base/ftfntfmt.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c,
1586 src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c,
1587 src/truetype/ttdriver.c, src/type1/t1driver.c,
1588 src/type42/t42drivr.c, src/winfonts/winfnt.c: Updated.
1589
15902015-03-11 Werner Lemberg <wl@gnu.org>
1591
Werner Lembergdd7028c2015-03-11 07:45:05 +01001592 [base] Rename `FT_XFREE86_H' to `FT_FONT_FORMATS_H'.
1593
1594 * include/config/ftheader.h: Implement it.
1595 * src/base/ftfntfmt.c, docs/CHANGES: Updated.
1596
15972015-03-11 Werner Lemberg <wl@gnu.org>
1598
Werner Lembergf4d1c112015-03-11 07:32:58 +01001599 [base] Rename `FT_Get_X11_Font_Format' to `FT_Get_Font_Format'.
1600
1601 * include/ftfntfmt.h, src/base/ftfntfmt.c: Implement it.
1602
1603 * docs/CHANGES: Updated.
1604
16052015-03-11 Werner Lemberg <wl@gnu.org>
1606
Werner Lembergcb0f7b62015-03-11 06:51:27 +01001607 Fix automatic copyright updating.
1608
1609 * src/tools/update-copyright: Make scanning of `no-copyright'
1610 actually work.
1611
1612 * src/tools/no-copyright: Don't include README in general.
1613
16142015-03-11 Werner Lemberg <wl@gnu.org>
1615
Werner Lemberg06339952015-03-11 06:30:23 +01001616 Rename `ftxf86.[ch]' to `ftfntfmt.[ch]'.
1617
1618 CMakeLists.txt, builds/amiga/makefile, builds/amiga/makefile.os4,
1619 builds/amiga/smakefile, builds/mac/FreeType.m68k_cfm.make.txt,
1620 builds/mac/FreeType.m68k_far.make.txt,
1621 builds/mac/FreeType.ppc_carbon.make.txt,
1622 builds/mac/FreeType.ppc_classic.make.txt, builds/symbian/bld.inf,
1623 builds/symbian/freetype.mmp, builds/wince/vc2005-ce/freetype.vcproj,
1624 builds/wince/vc2008-ce/freetype.vcproj,
1625 builds/windows/vc2005/freetype.vcproj,
1626 builds/windows/vc2008/freetype.vcproj,
1627 builds/windows/vc2010/freetype.vcxproj,
1628 builds/windows/vc2010/freetype.vcxproj.filters,
1629 builds/windows/visualc/freetype.dsp,
1630 builds/windows/visualc/freetype.vcproj,
1631 builds/windows/visualce/freetype.dsp,
1632 builds/windows/visualce/freetype.vcproj, docs/INSTALL.ANY,
1633 include/config/ftheader.h, include/ftfntfmt.h, modules.cfg,
1634 src/base/ftfntfmt.c, vms_make.com: Updated.
1635
Alexei Podtelezhnikov6b832c82015-03-10 23:25:49 -040016362015-03-10 Alexei Podtelezhnikov <apodtele@gmail.com>
1637
1638 Fix Savannah bug #44412 (part 1).
1639
1640 * src/base/ftstroke.c (ft_stroker_inside): Handle near U-turns.
1641
Werner Lembergeee7d8b2015-03-10 11:15:15 +010016422015-03-10 Werner Lemberg <wl@gnu.org>
1643
1644 [base] Rename `FT_Bitmap_New' to `FT_Bitmap_Init'.
1645
1646 * include/ftbitmap.h, src/base/ftbitmap.c: Implement it.
1647 Update all callers.
1648
1649 * docs/CHANGES: Updated.
1650
Werner Lemberg493cc032015-03-06 05:38:31 +010016512015-03-06 Werner Lemberg <wl@gnu.org>
1652
1653 * src/sfnt/ttload.c (tt_face_load_font_dir): Fix compiler warning.
1654
1655 Found by Alexei.
1656
Alexei Podtelezhnikovdd7498d2015-03-05 22:51:36 -050016572015-03-05 Alexei Podtelezhnikov <apodtele@gmail.com>
1658
1659 * src/base/ftstroke.c: Simplify.
1660
Werner Lemberg328b7922015-03-04 08:40:23 +010016612015-03-04 Werner Lemberg <wl@gnu.org>
1662
1663 [truetype] Some fixes and code refactoring in `ttgxvar.c'.
1664
1665 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix return value
1666 of `point_cnt' if two bytes are read.
1667 Use a more vertical coding style.
1668 (ft_var_readpackeddeltas): Use FT_UInt for `delta_cnt' parameter.
1669 Use a more vertical coding style.
1670
Werner Lemberga374c9c2015-03-03 11:23:45 +010016712015-03-03 Werner Lemberg <wl@gnu.org>
1672
1673 [autofit] Fix Savannah bug #44241.
1674
1675 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Reject glyphs
1676 with less than 3 points.
1677
Werner Lemberga07029e2015-03-02 06:54:08 +010016782015-03-02 Werner Lemberg <wl@gnu.org>
1679
1680 Simplify `TYPEOF' macro.
1681
1682 No need for two arguments.
1683
1684 * include/config/ftconfig.h, builds/unix/ftconfig.in,
1685 builds/vms/ftconfig.h (TYPEOF): Updated.
1686
1687 * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
1688 src/autofit/afwarp.h (AF_WARPER_FLOOR): Updated.
1689
16902015-03-01 Werner Lemberg <wl@gnu.org>
Werner Lemberg4b9234b2015-02-25 06:31:43 +01001691
Werner Lemberg851e8152015-03-01 19:27:09 +01001692 Various compiler warning fixes for `make multi'.
1693
1694 * src/autofit/afcjk.c (af_cjk_hints_compute_blue_edges),
1695 src/autofit/aflatin.c (af_latin_hint_compute_blue_edges,
1696 af_latin_hint_edges), src/autofit/aflatin2.c
1697 (af_latin2_hints_compute_blue_edges, af_latin2_hint_edges): Declare
1698 as `static'.
1699
1700 * src/cache/ftccmap.c (FTC_CMAP_QUERY_HASH, FTC_CMAP_NODE_HASH):
1701 Removed. Unused.
1702 * src/cache/ftcimage.c: Include FT_INTERNAL_OBJECTS_H.
1703 * src/cache/ftcmanag.c (FTC_LRU_GET_MANAGER): Removed. Unused.
1704
1705 * src/cff/cf2intrp.c: Include `cf2intrp.h'.
1706 * src/cff/cffdrivr.c (PAIR_TAG): Removed. Unused.
1707
1708 * src/gzip/ftgzip.c (NO_DUMMY_DECL): Removed. Unused.
1709
1710 * src/psaux/afmparse.c (afm_parser_read_int): Declare as `static'.
1711
1712 * src/pshinter/pshalgo.c (STRONGER, PSH_ZONE_MIN, PSH_ZONE_MAX):
1713 Removed. Unused.
1714
1715 * src/raster/ftraster.c (Render_Glyph): Declare as `static'.
1716
1717 * src/sfnt/ttpost.c (load_format_20): Fix signedness warning.
1718
1719 * src/truetype/ttdriver.c (PAIR_TAG): Removed. Unused.
1720 * src/truetype/ttsubpix.c (is_member_of_family_class,
1721 is_member_of_style_class): Declare as `static'.
1722
1723 * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Declare
1724 as `static'.
1725 * src/type1/t1load.c (mm_axis_unmap, mm_weights_unmap): Declare as
1726 `static'.
1727 (T1_FIELD_COUNT): Removed. Unused.
1728 * src/type1/t1parse.h (T1_Done_Table): Removed. Unused.
1729
1730 * src/type42/t42parse.c (T1_Done_Table): Removed. Unused.
1731
17322015-02-25 Werner Lemberg <wl@gnu.org>
1733
Werner Lemberg04c22372015-02-25 11:20:20 +01001734 [psaux] Signedness fixes.
1735
1736 * include/internal/psaux.h, src/psaux/afmparse.c,
1737 src/psaux/afmparse.h, src/psaux/psconv.c, src/psaux/psobjs.c,
1738 src/psaux/t1cmap.c, src/psaux/t1decode.c: Apply.
1739
17402015-02-25 Werner Lemberg <wl@gnu.org>
1741
Werner Lembergd25ec162015-02-25 09:19:59 +01001742 [otvalid] Signedness fixes.
1743
1744 * src/otvalid/otvcommn.c, src/otvalid/otvgdef.c,
1745 src/otvalid/otvgpos.c, src/otvalid/otvgsub.c, src/otvalid/otvmath.c:
1746 Apply.
1747
17482015-02-25 Werner Lemberg <wl@gnu.org>
1749
Werner Lemberg5c9d9bf2015-02-25 08:13:40 +01001750 * src/bzip2/ftbzip2.c (ft_bzip2_alloc): Signedness fix.
1751
17522015-02-25 Werner Lemberg <wl@gnu.org>
1753
Werner Lemberg83d41812015-02-25 08:10:58 +01001754 [lzw] Signedness fixes.
1755
1756 * src/lzw/ftzopen.c, src/lzw/ftzopen.h: Apply.
1757
17582015-02-25 Werner Lemberg <wl@gnu.org>
1759
Werner Lemberg17b62912015-02-25 07:53:09 +01001760 [gxvalid] Signedness fixes.
1761
1762 * src/gxvalid/gxvbsln.c, src/gxvalid/gxvcommn.c,
1763 src/gxvalid/gxvcommn.h, src/gxvalid/gxvjust.c,
1764 src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmort.c,
1765 src/gxvalid/gxvmort1.c, src/gxvalid/gxvmort2.c,
1766 src/gxvalid/gxvmorx.c, src/gxvalid/gxvmorx1.c,
1767 src/gxvalid/gxvmorx2.c, src/gxvalid/gxvopbd.c,
1768 src/gxvalid/gxvprop.c, src/gxvalid/gxvtrak.c: Apply.
1769
17702015-02-25 Werner Lemberg <wl@gnu.org>
1771
Werner Lemberg24e4e962015-02-25 06:57:16 +01001772 [cache] Signedness fixes.
1773
1774 * src/cache/ftcbasic.c, src/cache/ftccmap.c, src/cache/ftcimage.c,
1775 src/cache/ftcmanag.c, src/cache/ftcsbits.c: Apply.
1776
17772015-02-25 Werner Lemberg <wl@gnu.org>
1778
Werner Lemberg559727d2015-02-25 06:55:00 +01001779 Change dimension fields in `FTC_ImageTypeRec' to unsigned type.
1780
1781 This doesn't break ABI.
1782
1783 * include/ftcache.h (FTC_ImageTypeRec): Use unsigned types for
1784 `width' and `height'.
1785
1786 * docs/CHANGES: Document it.
1787
17882015-02-25 Werner Lemberg <wl@gnu.org>
1789
Werner Lemberg4b9234b2015-02-25 06:31:43 +01001790 [cache] Don't use `labs'.
1791
1792 This is the only place in FreeType where this function was used.
1793
1794 * include/config/ftstdlib.h (ft_labs): Remove.
1795
1796 * src/cache/ftcimage.c (ftc_inode_weight): Replace `ft_labs' with
1797 `FT_ABS'.
1798
Werner Lemberg4d1f7af2015-02-23 07:04:36 +010017992015-02-23 Werner Lemberg <wl@gnu.org>
1800
Werner Lemberg3aaebe32015-02-23 08:20:27 +01001801 [cache] Replace `FT_PtrDist' with `FT_Offset'.
1802
1803 * src/cache/ftccache.h (FTC_NodeRec): `FT_Offset' (a.k.a. `size_t')
1804 is a better choice for `hash' to hold a pointer than `FT_PtrDist'
1805 (a.k.a. `ptrdiff_t'), especially since the latter is signed,
1806 causing zillions of signedness warnings. [Note that `hash' was of
Werner Lemberg17b62912015-02-25 07:53:09 +01001807 type `FT_UInt32' before the change to `FT_PtrDist'.]
Werner Lemberg3aaebe32015-02-23 08:20:27 +01001808 Update all users.
1809
1810 * src/cache/ftcbasic.c, src/cache/ftccache.c, src/cache/ftccmap.c,
1811 src/cache/ftcglyph.c, src/cache/ftcglyph.h: Updated.
1812
18132015-02-23 Werner Lemberg <wl@gnu.org>
1814
Werner Lemberg4d1f7af2015-02-23 07:04:36 +01001815 [smooth, raster] Re-enable standalone compilation.
1816
1817 * src/raster/ftraster.c (FT_RENDER_POOL_SIZE, FT_MAX)
1818 [_STANDALONE_]: Define macros.
1819
1820 * src/smooth/ftgrays.c (FT_RENDER_POOL_SIZE, FT_MAX, FT_ABS,
1821 FT_HYPOT) [_STANDALONE_]: Define macros.
1822
Werner Lemberg03ccfd02015-02-22 08:25:16 +010018232015-02-22 Werner Lemberg <wl@gnu.org>
1824
Werner Lembergcb13e712015-02-23 06:41:52 +01001825 [smooth] Signedness fixes.
1826
1827 * src/smooth/ftgrays.c, src/smooth/ftsmooth.c: Apply.
1828
18292015-02-22 Werner Lemberg <wl@gnu.org>
1830
Werner Lemberga974e9a2015-02-22 21:02:13 +01001831 * src/raster/ftraster.c: Use the file's typedefs everywhere.
1832
18332015-02-22 Werner Lemberg <wl@gnu.org>
1834
Werner Lembergb0ebcdc2015-02-22 20:42:49 +01001835 * src/sfnt/ttpost.c (load_format_20): Fix error tracing message.
1836
1837 Bug introduced 6 commits earlier.
1838
18392015-02-22 Werner Lemberg <wl@gnu.org>
1840
Werner Lemberg22b1d5c2015-02-22 20:41:03 +01001841 [pshinter] Fix thinko.
1842
1843 * src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Correctly
1844 check `count'.
1845 Bug introduced two commits earlier.
1846
18472015-02-22 Werner Lemberg <wl@gnu.org>
1848
Werner Lembergca96fe02015-02-22 20:05:04 +01001849 [raster] Signedness fixes.
1850
1851 * src/raster/ftraster.c, src/raster/ftrend1.c: Apply.
1852
18532015-02-22 Werner Lemberg <wl@gnu.org>
1854
Werner Lemberg452066c2015-02-22 15:59:02 +01001855 [pshinter] Signedness fixes.
1856
1857 * src/pshinter/pshalgo.c, src/pshinter/pshglob.c,
1858 src/pshinter/pshrec.c: Apply.
1859
18602015-02-22 Werner Lemberg <wl@gnu.org>
1861
Werner Lemberg41c2ed82015-02-22 15:57:47 +01001862 [pshinter] Use macros for (unsigned) flags, not enumerations.
1863
1864 * src/pshinter/pshalgo.h (PSH_Hint_Flags): Replace with macros.
1865 Updated.
1866 * src/pshinter/pshrec.h (PS_Hint_Flags): Replace with macros.
1867
18682015-02-22 Werner Lemberg <wl@gnu.org>
1869
Werner Lemberg25c2f882015-02-22 15:54:31 +01001870 * src/pshinter/pshrec.c: Simplify.
1871 (ps_hints_open, ps_hints_stem): Remove switch statement.
1872
18732015-02-22 Werner Lemberg <wl@gnu.org>
1874
Werner Lemberg01f08422015-02-22 12:03:28 +01001875 [sfnt] Signedness fixes.
1876
1877 * src/sfnt/pngshim.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap.c,
1878 src/sfnt/ttkern.c, src/sfnt/ttload.c, src/sfnt/ttpost.c,
1879 src/sfnt/ttsbit.c: Apply.
1880 * src/sfnt/sfdriver.c: Apply.
1881 (sfnt_get_ps_name): Simplify.
1882
18832015-02-22 Werner Lemberg <wl@gnu.org>
1884
Werner Lemberg3c374c82015-02-22 09:16:53 +01001885 [bdf] Signedness fixes.
1886
1887 * src/bdf/bdf.h, src/bdf/bdfdrivr.c, src/bdf/bdfdrivr.h,
1888 src/bdf/bdflib.c: Apply.
1889
18902015-02-22 Werner Lemberg <wl@gnu.org>
1891
Werner Lembergb13945a2015-02-22 09:15:47 +01001892 * src/bdf/bdflib.c (_bdf_atous): New function.
1893 (_bdf_parse_glyphs, _bdf_parse_start): Use it.
1894
18952015-02-22 Werner Lemberg <wl@gnu.org>
1896
Werner Lemberg03ccfd02015-02-22 08:25:16 +01001897 [pcf] Signedness fixes.
1898
1899 * src/pcf/pcf.h, src/pcf/pcfdrivr.c: Apply.
1900 * src/pcf/pcfread.c: Apply.
1901 (pcf_get_encodings): Ignore invalid negative encoding offsets.
1902
Werner Lemberg633a7292015-02-21 07:02:01 +010019032015-02-21 Werner Lemberg <wl@gnu.org>
1904
Werner Lemberg3d7e53f2015-02-21 11:30:54 +01001905 * src/winfonts/winfnt.c: Signedness fixes.
1906
19072015-02-21 Werner Lemberg <wl@gnu.org>
1908
Werner Lemberg7b6b4172015-02-21 10:39:34 +01001909 [type42] Signedness fixes.
1910
1911 * src/type42/t42parse.c, src/type42/t42parse.h,
1912 src/type42/t42types.h: Apply.
1913
19142015-02-21 Werner Lemberg <wl@gnu.org>
1915
Werner Lemberg8bfffb42015-02-21 09:52:29 +01001916 [pfr] Signedness fixes.
1917
1918 * src/pfr/pfrdrivr.c, src/pfr/pfrgload.c, src/pfr/pfrload.c,
1919 src/pfr/pfrload.h, src/pfr/pfrobjs.c, src/pfr/pfrsbit.c,
1920 src/pfr/pfrtypes.h: Apply.
1921
19222015-02-21 Werner Lemberg <wl@gnu.org>
1923
Werner Lemberg633a7292015-02-21 07:02:01 +01001924 [cff] Minor signedness fixes related to last commit.
1925
1926 * src/cff/cf2ft.c, src/cff/cf2intrp.c, src/cff/cffgload.c: Apply.
1927
Werner Lemberg3a8d0532015-02-20 08:35:32 +010019282015-02-20 Werner Lemberg <wl@gnu.org>
1929
Werner Lembergc00b05f2015-02-20 20:42:55 +01001930 [cff] Thinkos in bias handling.
1931
1932 Only the final result is always positive.
1933
1934 Bug introduced three commits earlier.
1935
1936 * src/cff/cffgload.c, src/cff/cffgload.h: Apply.
1937
19382015-02-20 Werner Lemberg <wl@gnu.org>
1939
Werner Lemberg2bf03eb2015-02-20 20:14:11 +01001940 [cid] Fix signedness issues and emit some better error codes.
1941
1942 * src/cid/cidgload.c, src/cid/cidload.h, src/cid/cidobjs.c,
1943 src/cid/cidparse.h: Apply.
1944 * src/cid/cidload.c: Apply.
1945 (parse_fd_array): Reject negative values for number of dictionaries.
1946 * src/cid/cidparse.c: Apply.
1947 (cid_parser_new): Reject negative values for hex data length.
1948
19492015-02-20 Werner Lemberg <wl@gnu.org>
1950
Werner Lembergeb05bfb2015-02-20 08:37:35 +01001951 [cff] Signedness fixes for new engine.
1952
1953 * src/cff/cf2arrst.c, src/cff/cf2fixed.h, src/cff/cf2ft.c,
1954 src/cff/cf2ft.h, src/cff/cf2hints.c, src/cff/cf2intrp.c: Apply.
1955
19562015-02-20 Werner Lemberg <wl@gnu.org>
1957
Werner Lemberg3a8d0532015-02-20 08:35:32 +01001958 [cff] Signedness fixes for basic infrastructure and old engine.
1959
1960 * include/internal/pshints.h, src/cff/cffdrivr.c,
1961 src/cff/cffgload.c, src/cff/cffgload.h, src/cff/cffload.c,
1962 src/cff/cffobjs.c, src/cff/cffparse.c, src/pshinter/pshrec.c: Apply.
1963
Werner Lemberg81e5ff52015-02-19 09:46:48 +010019642015-02-19 Werner Lemberg <wl@gnu.org>
1965
Werner Lemberg3a1df3e2015-02-19 15:42:48 +01001966 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Ignore `countSizePairs'.
1967
1968 This is hard-coded to value 2 in `fvar' version 1.0 (and no newer
1969 version exists), but some fonts set it incorrectly.
1970
1971 Problem reported by Adam Twardoch <adam@fontlab.com>.
1972
19732015-02-19 Werner Lemberg <wl@gnu.org>
1974
Werner Lemberg93a884c2015-02-19 14:11:16 +01001975 [cff] Emit better error code for invalid private dict size.
1976
1977 * src/cff/cffparse.c (cff_parse_private_dict): Reject negative
1978 values for size and offset.
1979
19802015-02-19 Werner Lemberg <wl@gnu.org>
1981
Werner Lembergb57bb112015-02-19 10:44:18 +01001982 [autofit] Fix signedness issues.
1983
1984 * src/autofit/afangles.c, src/autofit/afcjk.c,
1985 src/autofit/afglobal.c, src/autofit/afhints.c,
1986 src/autofit/aflatin.c, src/autofit/aflatin2.c, src/autofit/afwarp.c,
1987 src/autofit/hbshim.c: Apply.
1988
19892015-02-19 Werner Lemberg <wl@gnu.org>
1990
Werner Lemberg81e5ff52015-02-19 09:46:48 +01001991 [autofit] Use macros for (unsigned) flags, not enumerations.
1992
1993 This harmonizes with other code in FreeType (and reduces the number
1994 of necessary casts to avoid compiler warnings).
1995
1996 * src/autofit/afblue.hin: Make flag macros unsigned.
1997 * src/autofit/afblue.h: Regenerated.
1998
1999 * src/autofit/afcjk.h: Replace flag enumeration with macros.
2000 * src/autofit/afcjk.c: Updated.
2001
2002 * src/autofit/afhints.h (AF_Flags, AF_Edge_Flags): Replace with
2003 macros.
2004 * src/autofit/afhints.c: Updated.
2005
2006 * src/autofit/aflatin.h: Replace flag enumerations with macros.
2007 * src/autofit/aflatin.c, src/autofit/aflatin2.c: Updated.
2008
2009 * src/autofit/aftypes.h (AF_ScalerFlags): Replace with macros.
2010
Werner Lemberg6a0ded72015-02-18 08:51:22 +010020112015-02-18 Werner Lemberg <wl@gnu.org>
2012
Werner Lemberg3b5f3322015-02-18 11:45:22 +01002013 [type1] Fix signedness issues.
2014
2015 * include/internal/psaux.h, include/internal/t1types.h,
2016 src/psaux/psobjs.c, src/psaux/psobjs.h, src/psaux/t1decode.c,
2017 src/type1/t1gload.c, src/type1/t1load.c, src/type1/t1parse.c: Apply.
2018
20192015-02-18 Werner Lemberg <wl@gnu.org>
2020
Werner Lemberg272e3cd2015-02-18 11:38:46 +01002021 [psaux, type1] Fix minor AFM issues.
2022
2023 * include/internal/t1types.h (AFM_KernPairRec): Make indices
2024 unsigned.
2025 Update users.
2026 (AFM_FontInfoRec): Make element counters unsigned.
2027 Update users.
2028 * src/psaux/afmparse.h (AFM_ValueRec): Add union member for unsigned
2029 int.
2030
2031 * src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs):
2032 Reject negative values for number of kerning elements.
2033
2034 * src/type1/t1afm.c, src/tools/test_afm.c: Updated.
2035
20362015-02-18 Werner Lemberg <wl@gnu.org>
2037
Werner Lemberg6bd7d282015-02-18 09:22:06 +01002038 Don't use `FT_PtrDist' for lengths.
2039
2040 Use FT_UInt instead.
2041
2042 * include/internal/psaux.h (PS_Table_FuncsRec, PS_TableRec,
2043 T1_DecoderRec): Do it.
2044
2045 * include/internal/t1types.h (T1_FontRec): Ditto.
2046
2047 * src/cid/cidload.c (cid_parse_dict): Updated.
2048 * src/pfr/pfrload.c (pfr_extra_item_load_font_id): Ditto.
2049 * src/psaux/psobjs.c (ps_table_add), src/psaux/psobjs.h: Ditto.
2050 * src/type1/t1load.c (parse_blend_axis_types, parse_encoding,
2051 parse_chharstrings, parse_dict): Ditto.
2052 * src/type42/t42parse.c (t42_parse_encoding, t42_parse_charstrings,
2053 t42_parse_dict): Ditto.
2054
20552015-02-18 Werner Lemberg <wl@gnu.org>
2056
Werner Lemberg6a0ded72015-02-18 08:51:22 +01002057 * src/type1/t1driver.c (t1_ps_get_font_value): Clean up.
2058 This handles negative values better, avoiding many casts.
2059
Werner Lemberg0a33a392015-02-17 08:03:05 +010020602015-02-17 Werner Lemberg <wl@gnu.org>
2061
Werner Lembergd3240c52015-02-17 20:30:36 +01002062 [base] Fix Savannah bug #44284.
2063
2064 * src/base/ftcalc.c (FT_MulFix): Typos.
2065
20662015-02-17 Werner Lemberg <wl@gnu.org>
2067
Werner Lemberg1f7a4e12015-02-17 10:17:56 +01002068 [truetype] Finish compiler warning fixes for signedness issues.
2069
2070 * src/truetype/ttgxvar.c, src/truetype/ttsubpix.c,
2071 src/truetype/ttsubpix.h: Apply.
2072
20732015-02-17 Werner Lemberg <wl@gnu.org>
2074
Werner Lemberg9daea2c2015-02-17 09:27:56 +01002075 * src/truetype/ttsubpix.c: Adding missing `static' keywords.
2076
20772015-02-17 Werner Lemberg <wl@gnu.org>
2078
Werner Lembergd9c3f152015-02-17 09:21:26 +01002079 [truetype] More signedness fixes.
2080
2081 * include/internal/tttypes.h, src/truetype/ttinterp.h,
2082 src/truetype/ttobjs.h, src/truetype/ttinterp.c,
2083 src/truetype/ttobjs.c: Apply.
2084
20852015-02-17 Werner Lemberg <wl@gnu.org>
2086
Werner Lemberg0a33a392015-02-17 08:03:05 +01002087 [truetype] Various signedness fixes.
2088
2089 * include/internal/ftgloadr.h, src/truetype/ttpload.c: Apply.
2090
2091 * src/truetype/ttgload.c: Apply.
2092 (TT_Get_VMetrics): Protect against invalid ascenders and descenders
2093 while constructing advance height.
2094
Werner Lemberg587351b2015-02-16 07:03:22 +010020952015-02-16 Werner Lemberg <wl@gnu.org>
2096
Werner Lemberg76abc752015-02-16 22:00:27 +01002097 [base] Finish compiler warning fixes for signedness issues.
2098
2099 * src/base/ftglyph.c, src/base/ftlcdfil.c, src/base/ftstroke.c:
2100 Apply.
2101
21022015-02-16 Werner Lemberg <wl@gnu.org>
2103
Werner Lemberg10aa8582015-02-16 20:12:54 +01002104 * include/tttables.h (TT_OS2): `fsType' must be FT_UShort.
2105
21062015-02-16 Werner Lemberg <wl@gnu.org>
2107
Werner Lemberg2e814fc2015-02-16 20:05:08 +01002108 More minor signedness warning fixes.
2109
2110 * src/base/ftbbox.c, src/base/ftbitmap.c, src/base/fttrigon.c,
2111 src/base/ftutil.c: Apply.
2112
21132015-02-16 Werner Lemberg <wl@gnu.org>
2114
Werner Lemberg82235d02015-02-16 19:35:16 +01002115 Next round of minor compiler warning fixes.
2116
2117 * include/internal/ftrfork.h (FT_RFork_Ref): Change `offset' member
2118 type to `FT_Long'.
2119 (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Add `static' keyword.
2120
Werner Lemberg3aaebe32015-02-23 08:20:27 +01002121 * include/internal/ftstream.h (FT_Stream_Pos): Return `FT_ULong'.
Werner Lemberg82235d02015-02-16 19:35:16 +01002122
2123 * src/base/ftoutln.c, src/base/ftrfork.c, src/base/ftstream.c:
2124 Signedess fixes.
2125
21262015-02-16 Werner Lemberg <wl@gnu.org>
2127
Werner Lemberg3cfa4d12015-02-16 17:59:06 +01002128 Various minor signedness fixes.
2129
2130 * include/ftadvanc.h, include/internal/ftobjs.h,
2131 src/base/ftgloadr.c, src/base/ftobjs.c: Apply.
2132
21332015-02-16 Werner Lemberg <wl@gnu.org>
2134
Werner Lemberg6f325c22015-02-16 11:31:32 +01002135 New `TYPEOF' macro.
2136
2137 This helps suppress signedness warnings, avoiding issues with
2138 implicit conversion changes.
2139
2140 * include/config/ftconfig.h, builds/unix/ftconfig.in,
2141 builds/vms/ftconfig.h (TYPEOF): Define.
2142
2143 * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
2144 src/autofit/afwarp.h (AF_WARPER_FLOOR): Use it.
2145
21462015-02-16 Werner Lemberg <wl@gnu.org>
2147
Werner Lemberg1f377f02015-02-16 08:37:09 +01002148 * src/base/ftsystem.c: Use casts in standard C function wrappers.
2149 (ft_alloc, ft_realloc, ft_ansi_stream_io, FT_Stream_Open): Do it.
2150
21512015-02-16 Werner Lemberg <wl@gnu.org>
2152
Werner Lemberg0814b802015-02-16 07:29:53 +01002153 Fix Savannah bug #44261.
2154
2155 * builds/unix/detect.mk (setup) [unix]: Set `CONFIG_SHELL' in the
2156 environment also while calling the configure script.
2157
21582015-02-16 Werner Lemberg <wl@gnu.org>
2159
Werner Lemberg587351b2015-02-16 07:03:22 +01002160 * include/internal/ftmemory.h: Add some `FT_Offset' casts.
2161 (FT_MEM_SET, FT_MEM_COPY, FT_MEM_MOVE, FT_ARRAY_ZERO, FT_ARRAY_COPY,
2162 FT_MEM_MOVE): Do it.
2163
Werner Lemberg6d7d6362015-02-15 12:30:42 +010021642015-02-15 Werner Lemberg <wl@gnu.org>
2165
Werner Lemberg48186b82015-02-16 06:37:36 +01002166 [base] Clean up signedness issues in `ftdbgmem.c'.
2167
2168 Also fix other minor issues.
2169
2170 * src/base/ftdbgmem.c (FT_MemTableRec): Replace all FT_ULong types
2171 with FT_Long for consistency.
2172 (ft_mem_primes): Change type to `FT_Int'.
2173 (ft_mem_closest_prime, ft_mem_table_set): Updated.
2174
2175 (ft_mem_debug_panic, ft_mem_debug_alloc, ft_mem_debug_free,
2176 ft_mem_debug_realloc): Use `static' keyword and fix signedness
2177 warnings where necessary.
2178
2179 (ft_mem_table_resize, ft_mem_table_new, ft_mem_table_destroy,
2180 ft_mem_table_get_nodep, ft_mem_debug_init, FT_DumpMemory): Fix types
2181 and add or remove casts to avoid signedness warnings.
2182
21832015-02-15 Werner Lemberg <wl@gnu.org>
2184
Werner Lemberg6d7d6362015-02-15 12:30:42 +01002185 [base] Clean up signedness in arithmetic functions.
2186
2187 This makes the code more readable and reduces compiler warnings.
2188
2189 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round, FT_MulFix,
2190 FT_DivFix): Convert input parameters to unsigned, do the
2191 computation, then convert the result back to signed.
2192 (ft_corner_orientation): Fix casts.
2193
Werner Lemberg92359bd2015-02-07 09:47:23 +010021942015-02-07 Werner Lemberg <wl@gnu.org>
2195
2196 [sfnt] Fix Savannah bug #44184.
2197
2198 * src/sfnt/ttload.c (check_table_dir, tt_face_load_font_dir): No
2199 longer reject `htmx' and `vmtx' tables with invalid length but
2200 sanitize them.
2201
Jon Anderson416d8792015-02-06 10:16:45 +010022022015-02-06 Jon Anderson <jon@websupergoo.com>
2203
2204 [truetype] Fix regression in the incremental glyph loader.
2205
2206 * src/truetype/ttgload.c (load_truetype_glyph): For incremental
2207 fonts, the glyph index may be greater than the number of glyphs
2208 indicated, so guard the check with a preprocessor conditional.
2209
Werner Lembergb6cb4992015-02-06 08:46:06 +010022102015-02-06 Werner Lemberg <wl@gnu.org>
2211
2212 [autofit] Fix potential memory leak.
2213
2214 While this doesn't show up with FreeType, exactly the same code
2215 leaks with ttfautohint's modified auto-hinter code (which gets used
2216 in a slightly different way).
2217
2218 It certainly doesn't harm since it is similar to already existing
2219 checks in the code for embedded arrays.
2220
2221 * src/autofit/afhints.c (af_glyph_hints_reload): Set `max_contours'
2222 and `max_points' for all cases.
2223
Werner Lemberg19146a52015-01-31 11:01:33 +010022242015-01-31 Werner Lemberg <wl@gnu.org>
2225
2226 [autofit] Add support for Thai script.
2227
2228 Thanks to Ben Mitchell <ben@rosettatype.com> for guidance with blue
2229 zone characters!
2230
2231 * src/autofit/afblue.dat: Add blue zone data for Thai.
2232
2233 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2234
2235 * src/autofit/afscript.h: Add Thai standard characters.
2236
2237 * src/autofit/afranges.c: Add Thai data.
2238
2239 * src/autofit/afstyles.h: Add Thai data.
2240
Behdad Esfahbod264b5e42015-01-23 21:23:55 +010022412015-01-23 Behdad Esfahbod <behdad@behdad.org>
2242
2243 [raster] Handle `FT_RASTER_FLAG_AA' correctly.
2244
2245 This fixes a breakage caused by the commit `[raster] Remove
2246 5-level gray AA mode from monochrome rasterizer.'.
2247
Werner Lembergd2c531e2015-01-23 22:37:42 +01002248 Problem reported by Markus Trippelsdorf <markus@trippelsdorf.de>.
Behdad Esfahbod264b5e42015-01-23 21:23:55 +01002249
2250 * src/raster/ftraster.c (ft_black_render): Handle
2251 `FT_RASTER_FLAG_AA'.
2252
2253 * src/raster/ftrend1.c (ft_raster1_render): Remove gray AA mode
2254 remnants.
2255
Werner Lemberg79a5ac62015-01-18 07:30:04 +010022562015-01-18 Werner Lemberg <wl@gnu.org>
2257
2258 * src/base/ftobjs.c (FT_New_Library): Fix compiler warning.
2259
Chris Liddell942aa5f2015-01-18 07:29:48 +010022602015-01-18 Chris Liddell <chris.liddell@artifex.com>
2261
2262 [raster] Fix Savannah bug #44022.
2263
2264 Add fallback for glyphs with degenerate bounding boxes.
2265
2266 If a glyph has only one very narrow feature, the bbox can end up
2267 with either the width or height of the bbox being 0, in which case
2268 no raster memory is allocated and no attempt is made to render the
2269 glyph. This is less than ideal when the drop-out compensation in
2270 the rendering code would actually result in the glyph being
2271 rendered.
2272
2273 This problem can be observed with the `I' glyph (gid 47) in the
2274 Autodesk RomanS TrueType font.
2275
2276 * src/raster/ftrend1.c (ft_raster1_render): Add a fallback if either
2277 dimension is zero to explicitly round up/down (instead of simply
2278 round).
2279
Werner Lemberg50be00d2015-01-17 20:38:31 +010022802015-01-17 Werner Lemberg <wl@gnu.org>
2281
2282 Add some tools to handle yearly copyright notice updates.
2283
2284 We are now following the GNU guidelines: A new release automatically
2285 means that the copyright year of all affected files gets updated; it
2286 is no longer used to track years of modification changes.
2287
2288 * src/tools/update-copyright-year: New Perl script.
2289 * src/tools/update-copyright: New shell script that calls
2290 `update-copyright-year' on all files.
2291 * src/tools/no-copyright: Exceptions that should not be handled by
2292 `update-copyright'
2293
Werner Lemberg4eff8542015-01-14 20:06:19 +010022942015-01-14 Werner Lemberg <wl@gnu.org>
2295
2296 * docs/CHANGES: Updated, using a description from Behdad.
2297
Behdad Esfahbod3f9b3d82015-01-14 15:48:12 +010022982015-01-14 Behdad Esfahbod <behdad@behdad.org>
2299
Behdad Esfahbod48c86622015-01-14 19:38:36 +01002300 * src/autofit/afmodule.c (af_autofitter_done): Fix compiler warning.
2301
23022015-01-14 Behdad Esfahbod <behdad@behdad.org>
2303
Behdad Esfahbod56ddafa2015-01-14 19:36:02 +01002304 [autofit] Add embedded array of segments and edges.
2305
2306 Avoids multiple mallocs per typical glyphs.
2307
2308 With this and recent changes to avoid mallocs, the thread-safe
2309 stack-based loader is now as fast as the previous model that had one
2310 cached singleton.
2311
2312 * src/autofit/afhints.h (AF_SEGMENTS_EMBEDDED, AF_EDGES_EMBEDDED):
2313 New macros.
2314 (AF_AxisHintsRec): Add two arrays for segments and edges.
2315
2316 * src/autofit/afhints.c (af_axis_hints_new_segment): Only allocate
2317 data if number of segments exceeds given threshold value.
2318 (af_axis_hints_new_edge): Only allocate data if number of edges
2319 exceeds given threshold value.
2320 (af_glyph_hints_done): Updated.
2321
23222015-01-14 Behdad Esfahbod <behdad@behdad.org>
2323
Behdad Esfahbod6f16b102015-01-14 19:26:49 +01002324 [autofit] Add embedded arrays for points and contours.
2325
2326 This avoids at least two malloc calls for typical glyphs.
2327
2328 * src/autofit/afhints.h (AF_POINTS_EMBEDDED, AF_CONTOURS_EMBEDDED):
2329 New macros.
2330 (AF_GlyphHintsRec): Add two arrays for contours and points.
2331
2332 * src/autofit/afhints.c (af_glyph_hints_init, af_glyph_hints_done):
2333 Updated.
2334 (af_glyph_hints_reload): Only allocate data if number of contours or
2335 points exceeds given threshold values.
2336
23372015-01-14 Behdad Esfahbod <behdad@behdad.org>
2338
Behdad Esfahbodc2733652015-01-14 19:16:12 +01002339 [autofit] Allocate hints object on the stack.
2340
2341 This avoids one malloc per load.
2342
2343 * src/autofit/afloader.h (AF_LoaderRec): Change type of `hints' to
2344 `AF_GlyphHints'.
2345 Update prototype.
2346
2347 * src/autofit/afloader.c (af_loader_init): Use `AF_GlyphHints'
2348 parameter instead of `FT_Memory'.
2349 (af_loader_done): Directly reset `load_hints'.
2350 (af_loader_load_g): Updated.
2351
2352 * src/autofit/afmodule.c (af_autofitter_load_glyph): Use local
2353 `hints' object.
2354
23552015-01-14 Behdad Esfahbod <behdad@behdad.org>
2356
Behdad Esfahboda4117fb2015-01-14 19:07:54 +01002357 [autofit] Reuse slot glyph loader.
2358
2359 No need to create a new glyph loader; we can reuse the one from
2360 `slot->internal->loader'. It's hard to tell why it was written that
2361 way originally, but new code looks sound and correct to me, and
2362 avoids lots of allocations.
2363
2364 * src/autofit/afloader.c (af_loader_init): Change return type to
2365 `void'.
2366 Don't call `FT_GlyphLoader_New'.
2367 (af_loader_reset): Don't call `FT_GlyphLoader_Rewind'.
2368 (af_loader_load_g): Update code to use `internal->loader', which
2369 doesn't need copying of data.
2370
2371 * src/autofit/afloader.h (AF_LoaderRec): Remove `gloader' member.
2372 Update prototype.
2373
2374 * src/autofit/afmodule.c (af_autofitter_load_glyph): Updated.
2375
23762015-01-14 Behdad Esfahbod <behdad@behdad.org>
2377
Behdad Esfahbodae6699f2015-01-14 18:55:39 +01002378 [autofit] Remove (unused) support for composite glyphs.
2379
2380 We never have to deal with composite glyphs in the autohinter, as
2381 those will be loaded into FORMAT_OUTLINE by the recursed
2382 `FT_Load_Glyph' function.
2383
2384 In the rare cases that FT_LOAD_NO_RECURSE is set, it will imply
2385 FT_LOAD_NO_SCALE as per `FT_Load_Glyph', which then implies
2386 FT_LOAD_NO_HINTING:
2387
2388 /* resolve load flags dependencies */
2389
2390 if ( load_flags & FT_LOAD_NO_RECURSE )
2391 load_flags |= FT_LOAD_NO_SCALE |
2392 FT_LOAD_IGNORE_TRANSFORM;
2393
2394 if ( load_flags & FT_LOAD_NO_SCALE )
2395 {
2396 load_flags |= FT_LOAD_NO_HINTING |
2397 FT_LOAD_NO_BITMAP;
2398
2399 load_flags &= ~FT_LOAD_RENDER;
2400 }
2401
2402 and as such the auto-hinter is never called. Thus, the recursion in
2403 `af_loader_load_g' never actually happens. So remove the depth
2404 counter as well.
2405
2406 * src/autofit/afloader.c (af_loader_load_g): Remove `depth'
2407 parameter.
2408 <FT_GLYPH_FORMAT_COMPOSITE>: Remove associated code.
2409 (af_loader_load_glyph): Updated.
2410
24112015-01-14 Behdad Esfahbod <behdad@behdad.org>
2412
Behdad Esfahbodc242fe42015-01-14 18:48:14 +01002413 [raster] Fix uninitialized memory access.
2414
2415 Apparently `ras.cProfile' might be uninitialized. This will be the
2416 case if `ras.top == ras.cProfile->offset', as can be seen in
2417 `End_Profile'. The overshoot code introduced in a change `Fix B/W
2418 rasterization of subglyphs with different drop-out modes.' (from
2419 2009-06-18) violated this, accessing `ras.cProfile->flags'
2420 unconditionally just before calling `End_Profile' (which then
2421 detected that `cProfile' is uninitialized and didn't touch it).
2422
2423 This was harmless, and was not detected by valgrind before because
2424 the objects were allocated on the `raster_pool', which was always
2425 initialized. With recent change to allocate raster buffers on the
2426 stack, valgrind now reported this invalid access.
2427
2428 * src/raster/ftraster.c (Convert_Glyph): Don't access an
2429 uninitialized `cProfile'.
2430
24312015-01-14 Behdad Esfahbod <behdad@behdad.org>
2432
Behdad Esfahbodb2ba6862015-01-14 18:43:13 +01002433 [smooth] Fix uninitialized memory access.
2434
2435 Looks like `ras.span_y' could always be used without initialization.
2436 This was never detected by valgrind before because the library-wide
2437 `raster_pool' was used for the worker object and `raster_pool' was
2438 originally zero'ed. But subsequent reuses of it were using `span_y'
2439 uninitialized. With the recent change to not use `render_pool' and
2440 allocate worker and buffer on the stack, valgrind now detects this
2441 uninitialized access.
2442
2443 * src/smooth/ftgrays.c (gray_raster_render): Initialize
2444 `ras.span_y'.
2445
24462015-01-14 Behdad Esfahbod <behdad@behdad.org>
2447
Behdad Esfahbod603292d2015-01-14 18:35:56 +01002448 [base] Don't initialize unused `driver->glyph_loader'.
2449
2450 * src/base/ftobjs.c (Destroy_Driver): Don't call
2451 `FT_GlyphLoader_Done'.
2452 (FT_Add_Module): Don't call `FT_GlyphLoader_New'.
2453
24542015-01-14 Behdad Esfahbod <behdad@behdad.org>
2455
Behdad Esfahbod51634252015-01-14 18:30:59 +01002456 [base] Don't allocate `library->raster_pool' anymore.
2457
2458 It's unused after the following commits:
2459
2460 [raster] Allocate render pool for mono rasterizer on the stack.
2461 [raster] Remove 5-level gray AA mode from monochrome rasterizer.
2462
2463 The value of FT_RENDER_POOL_SIZE still serves the purpose it used to
2464 serve, which is, to adjust the pool size. But the pool is now
2465 allocated on the stack on demand.
2466
2467 * src/base/ftobjs.c (FT_New_Library, FT_Done_Library): Implement.
2468
24692015-01-14 Behdad Esfahbod <behdad@behdad.org>
2470
Behdad Esfahbod6dfdaf42015-01-14 18:21:13 +01002471 [base] Do not reorder library->renderers upon use.
2472
2473 Instead of keeping `library->renderers' in a MRU order, just leave
2474 it as-is. The MRU machinery wasn't thread-safe.
2475
2476 With this patch, rasterizing glyphs from different faces from
2477 different threads doesn't fail choosing rasterizer
2478 (FT_Err_Cannot_Render_Glyph).
2479
2480 Easiest to see that crash was to add a `printf' (or otherwise let
2481 thread yield in FT_Throw with debugging enabled).
2482
2483 * src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c
2484 (FT_Outline_Render): Don't call `FT_Set_Renderer'.
2485
24862015-01-14 Behdad Esfahbod <behdad@behdad.org>
2487
Behdad Esfahboda773c302015-01-14 18:16:20 +01002488 [raster] Allocate render pool for mono rasterizer on the stack.
2489
2490 Instead of using the `render_pool' member of `FT_Library' that is
2491 provided down to the rasterizer, completely ignore that and allocate
2492 needed objects on the stack instead.
2493
2494 With this patch, rasterizing glyphs from different faces from
2495 different threads doesn't crash in the monochrome rasterizer.
2496
2497 * src/raster/ftraster.c (black_TRaster): Remove `buffer',
2498 `buffer_size', and `worker' members.
2499
2500 (ft_black_render): Create `buffer' locally.
2501 (ft_black_reset): Updated.
2502
25032015-01-14 Behdad Esfahbod <behdad@behdad.org>
2504
Behdad Esfahbod8dc86352015-01-14 18:06:22 +01002505 [raster] Remove 5-level gray AA mode from monochrome rasterizer.
2506
2507 It was off by default and couldn't be turned on at runtime. And the
2508 smooth rasterizer superceded it over ten years ago. No point in
2509 keeping. Comments suggested that it was there for compatibility
2510 with FreeType 1.
2511
2512 550 lines down.
2513
2514 * src/raster/ftraster.c (FT_RASTER_OPTION_ANTI_ALIASING,
2515 RASTER_GRAY_LINES): Remove macros and all associated code.
2516
2517 (black_TWorker): Remove `gray_min_x' and `gray_max_x'.
2518 (black_TRaster): Remove `grays' and `gray_width'.
2519
2520 (Vertical_Sweep_Init, Vertical_Sweep_Span, Vertical_Sweep_Drop,
2521 ft_black_render): Updated.
2522
2523 * src/raster/ftrend1.c (ft_raster1_render): Simplify code.
2524 (ft_raster5_renderer_class): Removed.
2525
25262015-01-14 Behdad Esfahbod <behdad@behdad.org>
2527
Behdad Esfahbod747ae2c2015-01-14 17:54:26 +01002528 [smooth] Allocate render pool for smooth rasterizer on the stack.
2529
2530 Instead of using the `render_pool' member of `FT_Library' that is
2531 provided down to the rasterizer, completely ignore that and allocate
2532 needed objects on the stack instead.
2533
2534 With this patch, rasterizing glyphs from different faces from
2535 different threads doesn't crash in the smooth rasterizer.
2536
2537 Bugs:
2538
2539 https://bugzilla.redhat.com/show_bug.cgi?id=678397
2540 https://bugzilla.redhat.com/show_bug.cgi?id=1004315
2541 https://bugzilla.redhat.com/show_bug.cgi?id=1165471
2542 https://bugs.freedesktop.org/show_bug.cgi?id=69034
2543
2544 * src/smooth/ftgrays.c (gray_TRaster): Remove `buffer',
2545 `buffer_size', `band_size', and `worker' members.
2546
2547 (gray_raster_render): Create `buffer', `buffer_size', and
2548 `band_size' locally.
2549 (gray_raster_reset): Updated.
2550
25512015-01-14 Behdad Esfahbod <behdad@behdad.org>
2552
Behdad Esfahbod531d4632015-01-14 17:46:55 +01002553 [truetype] Allocate TT_ExecContext in TT_Size instead of TT_Driver.
2554
2555 Previously the code had stipulation for using a per-TT_Size exec
2556 context if `size->debug' was true. But there was no way that
2557 `size->debug' could *ever* be true. As such, the code was always
2558 using the singleton `TT_ExecContext' that was stored in `TT_Driver'.
2559 This was, clearly, not threadsafe.
2560
2561 With this patch, loading glyphs from different faces from different
2562 threads doesn't crash in the bytecode loader code.
2563
2564 * src/truetype/ttobjs.h (TT_SizeRec): Remove `debug' member.
2565 (TT_DriverRec): Remove `context' member.
2566
2567 * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Remove
2568 `TT_ExecContext' code related to a global `TT_Driver' object.
2569
2570 (tt_driver_done): Don't remove `TT_ExecContext' object here but ...
2571 (tt_size_done_bytecode): ... here.
2572
2573 (tt_driver_init): Don't create `TT_ExecContext' object here but ...
2574 (tt_size_init_bytecode): ... here, only on demand.
2575
2576 * src/truetype/ttinterp.c (TT_Run_Context): Remove defunct debug
2577 code.
2578 (TT_New_Context): Remove `TT_ExecContext' code related to a global
2579 `TT_Driver' object.
2580
2581 * src/truetype/ttinterp.h: Updated.
2582
2583 * src/truetype/ttgload.c (TT_Hint_Glyph, tt_loader_init): Updated.
2584
25852015-01-14 Behdad Esfahbod <behdad@behdad.org>
2586
Behdad Esfahbod89bc8d42015-01-14 16:01:19 +01002587 [autofit] Allocate AF_Loader on the stack instead of AF_Module.
2588
2589 Stop sharing a global `AF_Loader'. Allocate one on the stack during
2590 glyph load.
2591
2592 Right now this results in about 25% slowdown, to be fixed in a
2593 following commit.
2594
2595 With this patch loading glyphs from different faces from different
2596 threads doesn't immediately crash in the autohinting loader code.
2597
2598 Bugs:
2599
2600 https://bugzilla.redhat.com/show_bug.cgi?id=1164941
2601
2602 * src/autofit/afloader.c (af_loader_init): Pass
2603 `AF_Loader' and `FT_Memory' instead of `AF_Module' as arguments.
2604 (af_loader_reset, af_loader_load_glyph): Also pass `loader' as
2605 argument.
2606 (af_loader_done): Use `AF_Loader' instead of `AF_Module' as
2607 argument.
2608
2609 * src/autofit/afmodule.c (af_autofitter_init): Don't call
2610 `af_loader_init'.
2611 (af_autofitter_done): Don't call `af_loader_done'.
2612 (af_autofitter_load_glyph): Use a local `AF_Loader' object.
2613
2614 * src/autofit/afloader.h: Include `afmodule.h'.
2615 Update prototypes.
2616 Move typedef for `AF_Module' to...
2617
2618 * src/autofit/afmodule.h: ... this place.
2619 No longer include `afloader.h'.
2620
26212015-01-14 Behdad Esfahbod <behdad@behdad.org>
2622
Behdad Esfahbod3f9b3d82015-01-14 15:48:12 +01002623 * src/type42/t42objs.h (T42_DriverRec): Remove unused member.
2624
Werner Lemberg36d03c92015-01-12 11:26:30 +010026252015-01-12 Werner Lemberg <wl@gnu.org>
2626
2627 Fix Savannah bug #43976.
2628
2629 Assure that FreeType's internal include directories are found before
2630 `CPPFLAGS' (which might be set by the user in the environment), and
2631 `CPPFLAGS' before `CFLAGS'.
2632
2633 * builds/freetype.mk (FT_CFLAGS): Don't add `INCLUDE_FLAGS'.
2634 (FT_COMPILE): Make this a special variable for compiling only the
2635 files handled in `freetype.mk'.
2636 (.c.$O): Removed, unused.
2637
2638 * src/*/rules.mk (*_COMPILE): Fix order of include directories.
2639
Werner Lembergd03a67a2015-01-11 08:39:14 +010026402015-01-11 Werner Lemberg <wl@gnu.org>
2641
Werner Lemberg95b57052015-01-11 09:50:49 +01002642 [truetype] Prettyfing.
2643
2644 * src/truetype/ttinterp.c (project, dualproj, fast_project,
2645 fast_dualproj): Rename to...
2646 (PROJECT, DUALPROJ, FAST_PROJECT, FAST_DUALPROJ): ... this.
2647
26482015-01-11 Werner Lemberg <wl@gnu.org>
2649
Werner Lembergea173c02015-01-11 08:58:54 +01002650 * src/truetype/ttinterp.c (Ins_JROT, Ins_JROF): Simplify.
2651
2652 Based on a patch from Behdad.
2653
26542015-01-11 Werner Lemberg <wl@gnu.org>
2655
Werner Lemberg628578c2015-01-11 08:53:31 +01002656 * src/truetype/ttinterp.c (Ins_SxVTL): Simplify function call.
2657
26582015-01-11 Werner Lemberg <wl@gnu.org>
2659
Werner Lemberg08e79092015-01-11 08:45:50 +01002660 * src/truetype/ttinterp.c (Normalize): Remove unused argument.
2661
26622015-01-11 Werner Lemberg <wl@gnu.org>
2663
Werner Lembergd03a67a2015-01-11 08:39:14 +01002664 [truetype] More macro expansions.
2665
Werner Lemberg4aaadf42015-01-11 08:42:28 +01002666 * src/truetype/ttinterp.c (FT_UNUSED_EXEC): Remove macro by
2667 expansion.
2668
26692015-01-11 Werner Lemberg <wl@gnu.org>
2670
2671 [truetype] More macro expansions.
2672
Werner Lembergd03a67a2015-01-11 08:39:14 +01002673 * src/truetype/ttinterp.c (INS_ARG): Remove macro by expansion,
2674 adjusting funtion calls where necessary.
2675 (FT_UNUSED_ARG): Removed, no longer needed.
2676
Werner Lemberg1b4d68c2015-01-10 19:56:28 +010026772015-01-10 Werner Lemberg <wl@gnu.org>
2678
Werner Lembergeb341362015-01-11 00:23:27 +01002679 [truetype] More macro expansions.
2680
2681 Based on a patch from Behdad.
2682
2683 * src/truetype/ttinterp.c (DO_*): Expand macros into corresponding
2684 `Ins_*' functions.
2685 (TT_RunIns): Replace `DO_*' macros with `Ins_*' function calls.
2686 (ARRAY_BOUND_ERROR): Remove second definition, which is no longer
2687 needed.
2688 (Ins_SVTCA, Ins_SPVTCA, Ins_SFVTCA): Replaced with...
2689 (Ins_SxyTCA): New function.
2690
26912015-01-10 Werner Lemberg <wl@gnu.org>
2692
Werner Lemberg01be1302015-01-10 23:05:37 +01002693 [truetype] Remove TT_CONFIG_OPTION_INTERPRETER_SWITCH.
2694
2695 Behdad suggested this code simplification, and nobody objected...
2696
2697 * include/config/ftoption.h, devel/ftoption.h
2698 (TT_CONFIG_OPTION_INTERPRETER_SWITCH): Remove.
2699
2700 * src/truetype/ttinterp.c [TT_CONFIG_OPTION_INTERPRETER_SWITCH]:
2701 Remove related code.
2702 (ARRAY_BOUND_ERROR): Use do-while loop.
2703
27042015-01-10 Werner Lemberg <wl@gnu.org>
2705
Werner Lembergfae0c812015-01-10 20:23:10 +01002706 [truetype] More macro expansions.
2707
Werner Lemberg6cc1f122015-01-10 21:56:59 +01002708 * src/truetype/ttinterp.c, src/truetype/ttinterp.h (EXEC_ARG_,
2709 EXEC_ARG): Remove by replacing with expansion.
2710
27112015-01-10 Werner Lemberg <wl@gnu.org>
2712
2713 [truetype] More macro expansions.
2714
Werner Lemberg24681452015-01-10 21:53:48 +01002715 Based on a patch from Behdad.
2716
2717 * src/truetype/ttinterp.c (SKIP_Code, GET_ShortIns, NORMalize,
2718 SET_SuperRound, ROUND_None, INS_Goto_CodeRange, CUR_Func_move,
2719 CUR_Func_move_orig, CUR_Func_round, CUR_Func_cur_ppem,
2720 CUR_Func_read_cvt, CUR_Func_write_cvt, CUR_Func_move_cvt,
2721 CURRENT_Ratio, INS_SxVTL, COMPUTE_Funcs, COMPUTE_Round,
2722 COMPUTE_Point_Displacement, MOVE_Zp2_Point): Remove by replacing
2723 with expansion.
2724
2725 (Cur_Func_project, CUR_Func_dualproj, CUR_fast_project,
2726 CUR_fast_dualproj): Replace with macros `project', `dualproj',
2727 `fast_project', `fast_dualproj'.
2728
27292015-01-10 Werner Lemberg <wl@gnu.org>
2730
2731 [truetype] More macro expansions.
2732
Werner Lembergfae0c812015-01-10 20:23:10 +01002733 * src/truetype/ttinterp.c (EXEC_OP_, EXEC_OP): Remove by replacing
2734 with expansion.
2735
27362015-01-10 Werner Lemberg <wl@gnu.org>
2737
Werner Lemberg5a752f32015-01-10 20:08:35 +01002738 [truetype] Remove code for static TrueType interpreter.
2739
2740 This is a follow-up patch.
2741
2742 * src/truetype/ttinterp.c, src/truetype/ttinterp.h
2743 [TT_CONFIG_OPTION_STATIC_INTERPRETER,
2744 TT_CONFIG_OPTION_STATIC_RASTER]: Remove macros and related code.
2745
27462015-01-10 Werner Lemberg <wl@gnu.org>
2747
Werner Lemberg1b4d68c2015-01-10 19:56:28 +01002748 * src/truetype/ttinterp.c (CUR): Remove by replacing with expansion.
2749
2750 This starts a series of patches that simplifies the code of the
2751 bytecode interpreter.
2752
Werner Lemberg232bd942014-12-30 21:44:51 +010027532014-12-30 Werner Lemberg <wl@gnu.org>
2754
2755 * Version 2.5.5 released.
2756 =========================
2757
2758
2759 Tag sources with `VER-2-5-5'.
2760
2761 * docs/VERSION.DLL: Update documentation and bump version number to
2762 2.5.5.
2763
2764 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
2765 builds/windows/vc2005/index.html,
2766 builds/windows/vc2008/freetype.vcproj,
2767 builds/windows/vc2008/index.html,
2768 builds/windows/vc2010/freetype.vcxproj,
2769 builds/windows/vc2010/index.html,
2770 builds/windows/visualc/freetype.dsp,
2771 builds/windows/visualc/freetype.vcproj,
2772 builds/windows/visualc/index.html,
2773 builds/windows/visualce/freetype.dsp,
2774 builds/windows/visualce/freetype.vcproj,
2775 builds/windows/visualce/index.html,
2776 builds/wince/vc2005-ce/freetype.vcproj,
2777 builds/wince/vc2005-ce/index.html,
2778 builds/wince/vc2008-ce/freetype.vcproj,
2779 builds/wince/vc2008-ce/index.html: s/2.5.4/2.5.5/, s/254/255/.
2780
2781 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 5.
2782
2783 * builds/unix/configure.raw (version_info): Set to 17:4:11.
2784 * CMakeLists.txt (VERSION_PATCH): Set to 5.
2785 * docs/CHANGES: Updated.
2786
2787 * builds/toplevel.mk (dist): Fix typos.
2788
Alexei Podtelezhnikov70241552014-12-24 12:11:46 -050027892014-12-24 Alexei Podtelezhnikov <apodtele@gmail.com>
2790
2791 [base] Formatting and nanooptimizations.
2792
2793 * src/base/ftcalc.c,
2794 * src/base/fttrigon.c: Revise sign restoration.
2795
Werner Lemberg06842c72014-12-13 07:42:51 +010027962014-12-13 Werner Lemberg <wl@gnu.org>
2797
2798 * src/pcf/pcfread.c (pcf_read_TOC): Improve fix from 2014-12-08.
2799
Werner Lembergb9438112014-12-11 13:33:14 +010028002014-12-11 Werner Lemberg <wl@gnu.org>
2801
Werner Lemberg82119502014-12-11 22:27:06 +01002802 * builds/toplevel.mk (dist): Use older POSIX standard for `tar'.
2803
2804 Apparently, BSD tar isn't capable yet of handling POSIX-1.2001
2805 (contrary to GNU tar), so force the POSIX-1.1988 format.
2806
2807 Problem reported by Stephen Fisher <sfisher@SDF.ORG>.
2808
28092014-12-11 Werner Lemberg <wl@gnu.org>
2810
Werner Lemberg812ed342014-12-11 14:07:29 +01002811 * src/type42/t42parse.c (t42_parse_sfnts): Reject invalid TTF size.
2812
28132014-12-11 Werner Lemberg <wl@gnu.org>
2814
Werner Lembergc9ca6ff2014-12-11 13:39:39 +01002815 * src/base/ftobjs.c (FT_Get_Glyph_Name): Fix off-by-one check.
2816
2817 Problem reported by Dennis Felsing <dennis@felsin9.de>.
2818
28192014-12-11 Werner Lemberg <wl@gnu.org>
2820
Werner Lembergb9438112014-12-11 13:33:14 +01002821 * src/type42/t42parse.c (t42_parse_sfnts): Check `string_size'.
2822
2823 Problem reported by Dennis Felsing <dennis@felsin9.de>.
2824
suzuki toshiya2b592822014-12-10 00:27:41 +090028252014-12-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2826
suzuki toshiya9bd1e552014-12-09 14:51:52 +09002827 [gxvalid] Fix a naming convention conflicting with ftvalid.
2828
2829 See previous changeset for otvalid.
2830
2831 * src/gxvalid/{gxvcommn.h, gxvmort.h, gxvmorx.h}: Replace
2832 `valid' by `gxvalid'.
2833 * src/gxvalid/{gxvbsln.c, gxvcommn.c, gxvfeat.c, gxvjust.c,
2834 gxvkern.c, gxvlcar.c, gxvmort.c, gxvmort0.c, gxvmort1.c,
2835 gxvmort2.c, gxvmort4.c, gxvmort5.c, gxvmorx.c, gxvmorx0.c,
2836 gxvmorx1.c, gxvmorx2.c, gxvmorx4.c, gxvmorx5.c, gxvopbd.c,
2837 gxvprop.c, gxvtrak.c}: Replace `valid' by `gxvalid' if
2838 it is typed as GXV_Validator.
2839
28402014-12-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2841
suzuki toshiya51abdf62014-12-09 00:58:04 +09002842 [otvalid] Fix a naming convention conflicting with ftvalid.
2843
2844 Some prototypes in ftvalid.h use `valid' for the variables
2845 typed as FT_Validator. Their implementations in src/base/
2846 ftobjs.c and utilizations in src/sfnt/ttcmap.c do similar.
2847
2848 Some macros in otvcommn.h assume the exist of the variable
2849 `valid' typed as OTV_Validator in the caller.
2850
2851 Mixing these two conventions cause invalid pointer conversion
2852 and unexpected SEGV in longjmp. To prevent it, all variables
2853 typed as OTV_Validator are renamed to `otvalid'.
2854
2855 * src/otvalid/otvcommn.h: Replace `valid' by `otvalid'.
2856 * src/otvalid/{otvcommn.c, otvbase.c, otvgdef.c, otvgpos.c,
2857 otvgsub.c, otvjstf.c, otvmath.c}: Replace `valid' by `otvalid'
2858 if it is typed as OTV_Validator.
2859
28602014-12-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2861
suzuki toshiya2b592822014-12-10 00:27:41 +09002862 [ftvalid] Introduce FT_THROW() in FT_INVALID_XXX macros.
2863
2864 Original patch is designed by Werner Lemberg. Extra part
2865 for otvalid and gxvalid are added by suzuki toshiya, see
2866 discussion:
2867 http://lists.nongnu.org/archive/html/freetype-devel/2014-12/msg00002.html
2868 http://lists.nongnu.org/archive/html/freetype-devel/2014-12/msg00007.html
2869
2870 * include/internal/ftvalid.h: Introduce FT_THROW() in FT_INVALID_().
2871 * src/gxvalid/gxvcommn.h: Ditto.
2872 * src/otvalid/otvcommn.h: Ditto.
2873
Werner Lemberg74af85c2014-12-08 16:01:50 +010028742014-12-08 Werner Lemberg <wl@gnu.org>
2875
2876 [pcf] Fix Savannah bug #43774.
2877
2878 Work around `features' of X11's `pcfWriteFont' and `pcfReadFont'
2879 functions. Since the PCF format doesn't have an official
2880 specification, we have to exactly follow these functions' behaviour.
2881
2882 The problem was unveiled with a patch from 2014-11-06, fixing issue
2883 #43547.
2884
2885 * src/pcf/pcfread.c (pcf_read_TOC): Don't check table size for last
2886 element. Instead, assign real size.
2887
Werner Lemberg66883b52014-12-07 09:17:06 +010028882014-12-07 Werner Lemberg <wl@gnu.org>
2889
Werner Lemberg553c9672014-12-07 19:29:52 +01002890 Work around a bug in Borland's C++ compiler.
2891
2892 See
2893
2894 http://qc.embarcadero.com/wc/qcmain.aspx?d=118998
2895
2896 for Borland's bug tracker entry.
2897
2898 Reported by Yuliana Zigangirova <zigangirova@inbox.ru>,
2899 http://lists.gnu.org/archive/html/freetype-devel/2014-04/msg00001.html.
2900
2901 * include/internal/ftvalid.h (FT_ValidatorRec), src/smooth/ftgrays.c
2902 (gray_TWorker_): Move `ft_jmp_buf' field to be the first element.
2903
29042014-12-07 Werner Lemberg <wl@gnu.org>
2905
Werner Lemberg9870d6d2014-12-07 09:40:47 +01002906 */*: Decorate hex constants with `U' and `L' where appropriate.
2907
29082014-12-07 Werner Lemberg <wl@gnu.org>
2909
Werner Lemberg66883b52014-12-07 09:17:06 +01002910 [truetype] Prevent memory leak for buggy fonts.
2911
2912 * src/truetype/ttobjs.c (tt_size_done): Unconditionally call
2913 `tt_size_done_bytecode'.
2914
Werner Lemberg94926682014-12-06 07:11:44 +010029152014-12-06 Werner Lemberg <wl@gnu.org>
2916
2917 * Version 2.5.4 released.
2918 =========================
2919
2920
2921 Tag sources with `VER-2-5-4'.
2922
2923 * docs/VERSION.DLL: Update documentation and bump version number to
2924 2.5.4.
2925
2926 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
2927 builds/windows/vc2005/index.html,
2928 builds/windows/vc2008/freetype.vcproj,
2929 builds/windows/vc2008/index.html,
2930 builds/windows/vc2010/freetype.vcxproj,
2931 builds/windows/vc2010/index.html,
2932 builds/windows/visualc/freetype.dsp,
2933 builds/windows/visualc/freetype.vcproj,
2934 builds/windows/visualc/index.html,
2935 builds/windows/visualce/freetype.dsp,
2936 builds/windows/visualce/freetype.vcproj,
2937 builds/windows/visualce/index.html,
2938 builds/wince/vc2005-ce/freetype.vcproj,
2939 builds/wince/vc2005-ce/index.html,
2940 builds/wince/vc2008-ce/freetype.vcproj,
2941 builds/wince/vc2008-ce/index.html: s/2.5.3/2.5.4/, s/253/254/.
2942
2943 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4.
2944
2945 * builds/unix/configure.raw (version_info): Set to 17:3:11.
2946 * CMakeLists.txt (VERSION_PATCH): Set to 4.
2947 * docs/CHANGES: Updated.
2948
Werner Lemberg934ef382014-12-04 06:38:51 +010029492014-12-04 Werner Lemberg <wl@gnu.org>
2950
2951 docs/CHANGES: Updated, formatted.
2952
Dave Arnold2cdc4562014-12-04 06:10:16 +010029532014-12-04 Dave Arnold <darnold@adobe.com>
2954
Dave Arnoldf89396c2014-12-04 06:17:26 +01002955 [cff] Modify an FT_ASSERT.
2956
2957 * src/cff/cf2hints.c (cf2_hintmap_map): After the fix for Savannah
2958 bug #43661, the test font `...aspartam.otf' still triggers an
2959 FT_ASSERT. Since hintmap still works with count==0, ...
2960 (cf2_glyphpath_lineTo, cf2_glyphpath_curveTo): ... add that term to
2961 suppress the assert.
2962
29632014-12-04 Dave Arnold <darnold@adobe.com>
2964
Dave Arnold2cdc4562014-12-04 06:10:16 +01002965 [cff] Fix Savannah bug #43661.
2966
2967 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdHSTEM,
2968 cf2_cmdVSTEM, cf2_cmdHINTMASK>: Don't append to stem arrays after
2969 hintmask is constructed.
2970
2971 * src/cff/cf2hints.c (cf2_hintmap_build): Add defensive code to
2972 avoid reading past end of hintmask.
2973
Werner Lemberg16188eb2014-12-03 10:18:34 +010029742014-12-03 Werner Lemberg <wl@gnu.org>
2975
Werner Lemberg8fa69a82014-12-03 20:07:14 +01002976 docs/CHANGES: Updated.
2977
29782014-12-03 Werner Lemberg <wl@gnu.org>
2979
Werner Lemberga632b5f2014-12-03 19:30:44 +01002980 [autofit] Better fix for conversion specifiers in debug messages.
2981
2982 Using `%ld' for pointer differences causes warnings on 32bit
2983 platforms. The correct type would be (the relatively new) `%td',
2984 however, this is missing on some important platforms.
2985
2986 This patch improves the change from 2014-11-28.
2987
2988 * src/autofit/afhints.c (AF_INDEX_NUM): Use `int' typecast. Our
2989 pointer differences are always sufficiently small.
2990 (af_glyph_hints_dump_points, af_glyph_hints_dump_segments,
2991 af_glyph_hints_dump_edge): Revert to `%d' and use `AF_INDEX_NUM'.
2992
29932014-12-03 Werner Lemberg <wl@gnu.org>
2994
Werner Lemberg16188eb2014-12-03 10:18:34 +01002995 FT_Sfnt_Tag: s/ft_sfnt_xxx/FT_SFNT_XXX/ for orthogonality.
2996
2997 All public FreeType enumeration and flag values are uppercase...
2998
2999 * include/tttables.h (FT_Sfnt_Tag): Implement it. For backwards
3000 compatilibity, retain the old values as macros.
3001
3002 * src/base/ftfstype.c (FT_Get_FSType_Flags), src/sfnt/sfdriver.c
3003 (get_sfnt_table): Updated.
3004
Werner Lemberg2af25ac2014-12-02 08:38:57 +010030052014-12-02 Werner Lemberg <wl@gnu.org>
3006
Werner Lembergde43ace2014-12-02 23:06:04 +01003007 * include/*: Improve structure of documentation.
3008
3009 . Add and update many `<Order>' tags.
3010 . Apply various documentation fixes.
3011 . Remove details to deprecated (or never implemented) data.
3012
30132014-12-02 Werner Lemberg <wl@gnu.org>
3014
Werner Lembergca1f5cc2014-12-02 22:49:25 +01003015 [docmaker] Always handle `<Order>' section elements.
3016
3017 Previously, those elements were handled only for sections present in
3018 a `<Sections>' chapter element.
3019
3020 * src/tools/docmaker/content.py (ContentProcessor::finish):
3021 Implement it.
3022
30232014-12-02 Werner Lemberg <wl@gnu.org>
3024
Werner Lembergef6a3522014-12-02 21:16:59 +01003025 [docmaker] Properly handle empty rows in Synopsis.
3026
3027 * src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Emit
3028 `&nbsp;' for empty fields.
3029
30302014-12-02 Werner Lemberg <wl@gnu.org>
3031
Werner Lemberg0e96f052014-12-02 11:08:31 +01003032 [docmaker] Thinko.
3033
3034 * src/tools/docmaker/content.py (DocBlock::get_markup_words_all):
3035 Emit `/empty/' string for first element also.
3036
30372014-12-02 Werner Lemberg <wl@gnu.org>
3038
Werner Lemberg102d4a72014-12-02 10:27:40 +01003039 [docmaker] Honour empty lines in `<Order>' section element.
3040
3041 This greatly improves the readability of the `Synopsis' links.
3042
3043 * src/tools/docmaker/content.py (DocBlock::get_markup_words_all):
3044 Insert string `/empty/' between items.
3045
3046 * src/tools/docmaker/formatter.py (Formatter::section_dump): Make it
3047 robust against nonexistent keys.
3048
3049 * src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Emit
3050 empty <td> elements for `/empty/'.
3051
30522014-12-02 Werner Lemberg <wl@gnu.org>
3053
Werner Lemberg2af25ac2014-12-02 08:38:57 +01003054 [docmaker] Ensure Python 3 compatibility.
3055
3056 * src/tools/docmaker/content.py (ContentProcessor::set_section,
3057 ContentProcessor::finish): Replace `has_key' function with `in'
3058 keyword.
3059
3060 * src/tools/docmaker/formatter.py (Formatter::__init__): Replace
3061 sorting function with a key generator.
3062 (Formatter::add_identifier): Replace `has_key' function with `in'
3063 keyword.
3064
3065 * src/tools/docmaker/tohtml.py (HtmlFormatter::html_source_quote):
3066 Replace `has_key' function with `in' keyword.
3067 (HtmlFormatter::index_exit, HtmlFormatter::section_enter): Use
3068 integer division.
3069 s/<>/>/.
3070
3071 * src/tools/docmaker/utils.py: Import `itertools'.
3072 (index_sort): Replaced by...
3073 (index_key): ... this new key generator (doing exactly the same).
3074
Werner Lemberg8f795112014-11-29 06:49:15 +010030752014-11-29 Werner Lemberg <wl@gnu.org>
3076
Werner Lemberg80bfeb12014-12-01 10:07:52 +01003077 [docmaker] Don't output a block multiple times.
3078
3079 This bug was hidden by not processing all lines of `<Order>' blocks.
3080
3081 * src/tools/docmaker/formatter.py (Formatter::section_dump): Filter
3082 out field names.
3083
30842014-11-29 Werner Lemberg <wl@gnu.org>
3085
Werner Lemberg0dbad762014-12-01 08:44:48 +01003086 [docmaker] Use field values as HTML link targets where possible.
3087
3088 * src/tools/docmaker/tohtml.py (HtmlFormatter::make_block_url):
3089 Accept second, optional argument to specify a name.
3090 (HtmlFormatter::html_source_quote): Link to field ID if possible.
3091 (HtmlFormatter::print_html_field_list): Emit `id' attribute.
3092
30932014-11-29 Werner Lemberg <wl@gnu.org>
3094
Werner Lemberg785b1d02014-11-30 22:16:34 +01003095 [docmaker] Allow empty lines in `<Order>' blocks.
3096
3097 Before this patch, the suggested order of entries stopped at the
3098 first empty line.
3099
3100 Obviously, nobody noticed that this problem caused a much reduced
3101 set of links in the `Synopsis' sections; in particular, the
3102 `<Order>' blocks contain a lot of entries that wouldn't be listed
3103 otherwise...
3104
3105 * src/tools/docmaker/content.py (DocBlock::get_markup_words_all):
3106 New function to iterate over all items.
3107 (DocSection::process): Use it.
3108
31092014-11-29 Werner Lemberg <wl@gnu.org>
3110
Werner Lemberg16b3e622014-11-30 20:58:27 +01003111 * src/tools/docmaker/sources.py (column) [Format 2]: Fix regexp.
3112
3113 After the single asterisk there must be no other immediately following
3114 asterisk.
3115
31162014-11-29 Werner Lemberg <wl@gnu.org>
3117
Werner Lemberg434bc692014-11-29 23:12:55 +01003118 * src/tools/docmaker/tohtml.py: Improve CSS for vertical spacing.
Werner Lemberg51987ea2014-11-29 22:19:29 +01003119
Werner Lemberg434bc692014-11-29 23:12:55 +010031202014-11-29 Werner Lemberg <wl@gnu.org>
3121
3122 [docmaker] Improve HTML code for table of contents.
3123
3124 * src/tools/docmaker/tohtml.py: Introduce a new table class `toc',
Werner Lemberg51987ea2014-11-29 22:19:29 +01003125 together with proper CSS.
3126
31272014-11-29 Werner Lemberg <wl@gnu.org>
3128
Werner Lembergaa834ce2014-11-29 20:08:29 +01003129 [docmaker] Provide higher-level markup and simplify HTML.
3130
3131 * src/tools/docmaker/tohtml.py: Instead of using extraneous `<div>'
3132 elements, use CSS descendants (of class `section') to format the
3133 data.
3134
3135 Also remove reduntant <p> and <br> elements, replacing them with
3136 proper CSS.
3137
3138 Globally reduce page width to 75%.
3139
3140 (block_header): Rename <div> class to `section'.
3141
31422014-11-29 Werner Lemberg <wl@gnu.org>
3143
Werner Lemberg3bb97022014-11-29 16:12:37 +01003144 [docmaker] Add `top' links after blocks.
3145
3146 * src/tools/docmaker/tohtml.py (block_footer_middle): Implement it.
3147
31482014-11-29 Werner Lemberg <wl@gnu.org>
3149
Werner Lemberga31f9712014-11-29 07:18:44 +01003150 * src/tools/docmaker/tohtml.py: Improve CSS for fields.
3151
Werner Lemberg3bb97022014-11-29 16:12:37 +01003152 Make fields align horizontally relative to full line width.
Werner Lemberga31f9712014-11-29 07:18:44 +01003153
31542014-11-29 Werner Lemberg <wl@gnu.org>
3155
Werner Lemberg8f795112014-11-29 06:49:15 +01003156 * src/tools/docmaker/tohtml.py: Fix index and TOC templates.
3157
3158 This thinko was introduced 2014-11-27.
3159
Werner Lembergba1ba0c2014-11-28 22:04:14 +010031602014-11-28 Werner Lemberg <wl@gnu.org>
3161
3162 [docmaker] Format field lists with CSS.
3163
3164 This also simplifies the inserted HTML code.
3165
3166 * src/tools/docmaker/tohtml.py
3167 (HtmlFormatter::print_html_field_list): Do it.
3168
suzuki toshiya348fffa2014-11-28 16:05:59 +090031692014-11-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3170
3171 Fix compiler warning to the comparison between signed and
3172 unsigned variable.
3173
3174 * src/pfr/pfrsbit.c (pfr_slot_load_bitmap): Fix the comparison
3175 between `ypos + ysize' and FT_INT_{MAX,MIN}.
3176
Werner Lembergba1ba0c2014-11-28 22:04:14 +010031772014-11-28 Werner Lemberg <wl@gnu.org>
Werner Lemberg984e0712014-11-28 05:33:58 +01003178
Werner Lembergba1ba0c2014-11-28 22:04:14 +01003179 [docmaker] Replace empty `<td>' with CSS.
Werner Lemberg46d4dc82014-11-28 05:49:56 +01003180
3181 * src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Do
3182 it.
3183
Werner Lembergba1ba0c2014-11-28 22:04:14 +010031842014-11-28 Werner Lemberg <wl@gnu.org>
Werner Lemberg46d4dc82014-11-28 05:49:56 +01003185
Werner Lemberg984e0712014-11-28 05:33:58 +01003186 [docmaker] Replace some `<table>' tags with `<h4>' and `<div>'.
3187
3188 * src/tools/docmaker/tohtml.py (marker_*): Use `<h4>'.
3189 (source_*): Use `<div>'.
3190 (HtmlFormatter::block_enter): s/<h4>/<h3>/.
3191
suzuki toshiya9ee6a0a2014-11-28 11:14:18 +090031922014-11-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3193
3194 Fix compiler warning to conversion specifiers in debug messages.
3195
3196 * src/autofit/afhints.c (af_glyph_hints_dump_points): Add length
Werner Lemberga632b5f2014-12-03 19:30:44 +01003197 modifier to dump long integers.
3198 (af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Ditto.
suzuki toshiya9ee6a0a2014-11-28 11:14:18 +09003199
Werner Lemberg26d699e2014-11-27 19:22:52 +010032002014-11-27 Werner Lemberg <wl@gnu.org>
3201
Werner Lemberg984e0712014-11-28 05:33:58 +01003202 * src/tools/docmaker/tohtml.py: Use more CSS for index.
Werner Lemberg7ea36342014-11-27 19:38:31 +01003203
32042014-11-27 Werner Lemberg <wl@gnu.org>
3205
Werner Lembergedcf8172014-11-27 19:28:48 +01003206 [docmaker] Replace `name' attribute of `<a>' with `id'.
3207
3208 * src/tools/docmaker/tohtml.py (HtmlFormatter::block_enter): Do it.
3209
32102014-11-27 Werner Lemberg <wl@gnu.org>
3211
Werner Lemberg26d699e2014-11-27 19:22:52 +01003212 * src/tools/docmaker/tohtml.py: Remove remaining `width' attributes.
3213
3214 For `Index' and `TOC' links, we now simply use the `text-align' CSS
3215 property of `<td>' to enforce flush-left and flush-right,
3216 eliminating the hack with an empty, full-width `<td>' element
3217 inbetween.
3218
3219 The change also enforces the same (smaller) size for all index and
3220 TOC links.
3221
suzuki toshiya2676e072014-11-28 00:58:25 +090032222014-11-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3223
suzuki toshiya1b12f5d2014-11-28 01:22:26 +09003224 * src/cff/cf2font.c: Include `ftcalc.h' to use FT_MSB(),
3225 cf2font.c could not find it under `make multi' build.
3226
32272014-11-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3228
suzuki toshiya2676e072014-11-28 00:58:25 +09003229 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Remove
3230 unrequired negative value check for `width' and `height'.
3231
Werner Lemberg8585cf52014-11-27 10:49:05 +010032322014-11-27 Werner Lemberg <wl@gnu.org>
3233
Werner Lembergdd3fee02014-11-27 13:20:52 +01003234 * src/tools/docmaker/tohtml.py: More HTML table refactoring.
3235
3236 Replace some `<table>' tags with `<div>' to simplify structure.
3237
3238 Move `bgcolor' attribute to CSS.
3239
3240 Replace most `width' attributes with CSS. The remaining instances
3241 (providing a similar effect as LaTeX's `\hfill' command) are removed
3242 in a later patch.
3243
32442014-11-27 Werner Lemberg <wl@gnu.org>
3245
Werner Lemberga5ad26a2014-11-27 10:52:24 +01003246 * src/tools/docmaker/tohtml.py: Replace <font> with CSS.
3247
32482014-11-27 Werner Lemberg <wl@gnu.org>
3249
Werner Lembergba67c612014-11-27 10:51:49 +01003250 * src/tools/docmaker/tohtml.py: Center <table> with CSS.
3251
32522014-11-27 Werner Lemberg <wl@gnu.org>
3253
Werner Lemberg5594fa52014-11-27 10:50:50 +01003254 * src/tools/docmaker/tohtml.py: Replace `<center>' with `<div>'.
3255
32562014-11-27 Werner Lemberg <wl@gnu.org>
3257
Werner Lemberg8585cf52014-11-27 10:49:05 +01003258 * src/tools/docmaker/tohtml.py: Remove redundant `<center>' tags.
3259
3260 This starts a series of commits into the direction of generating
3261 valid HTML 5 code, especially using much more CSS.
3262
suzuki toshiya1b057042014-11-27 17:53:20 +090032632014-11-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3264
3265 Prevent too negative values (< FT_INT_MIN) in bitmap metrics,
3266 suggested by Alexei.
3267
3268 * src/pfr/pfrsbit.c (pfr_slot_load_bitmap): Prevent too
3269 negative values in `xpos' and `ypos + ysize'.
3270 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Prevent
3271 too negative values in `x_left' and `y_top'. Either negative
3272 values in `width' and `height' are checked.
3273
Werner Lemberg3d167cb2014-11-27 05:19:41 +010032742014-11-27 Werner Lemberg <wl@gnu.org>
3275
Werner Lembergc52882a2014-11-27 08:01:25 +01003276 [docmaker] Produce better HTML code.
3277
3278 * src/tools/docmaker/tohtml.py: Always use double quotes for
3279 attribute values.
3280 (source_footer): Close `td' and `tr' groups.
3281
32822014-11-27 Werner Lemberg <wl@gnu.org>
3283
Werner Lembergdbb93152014-11-27 07:20:48 +01003284 Use better way to disable creation of .pyc files for `make refdoc'.
3285
3286 Python 2.6 was released in 2008...
3287
3288 * builds/freetype.mk (refdoc): Use python's `-B' option.
3289
3290 * builds/detect.mk (std_setup, dos_setup): Mention required python
3291 version for `refdoc' target.
3292
32932014-11-27 Werner Lemberg <wl@gnu.org>
3294
Werner Lemberge8a5c332014-11-27 06:48:37 +01003295 * src/tools/docmaker/sources.py (re_bold, re_italic): Use
3296 non-grouping parentheses.
3297 * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word):
3298 Updated.
3299
33002014-11-27 Werner Lemberg <wl@gnu.org>
3301
Werner Lemberg3d167cb2014-11-27 05:19:41 +01003302 * src/base/ftobjs.c (FT_Get_Glyph_Name): Fix compiler warning.
3303
3304 Introdruced in previous change. Reported by Alexei.
3305
Werner Lemberga593a042014-11-26 18:42:48 +010033062014-11-26 Werner Lemberg <wl@gnu.org>
3307
Werner Lembergf34f1922014-11-26 21:59:21 +01003308 * src/*: Add checks for parameters of API functions where missing.
3309
3310 `API functions' are functions tagged with `FT_EXPORT_DEF'.
3311
3312 Besides trivial fixes, the following changes are included, too.
3313
3314 * src/base/ftbdf.c (FT_Get_BDF_Charset_ID, FT_Get_BDF_Property): Set
3315 error code if no service is available.
3316
3317 * src/base/ftinit.c (FT_Done_FreeType): Change return value for
3318 invalid `library' parameter to `Invalid_Library_Handle'.
3319
3320 * src/base/ftobjs.c (FT_New_Size): Change return value for invalid
3321 `asize' parameter to `Invalid_Argument'.
3322
3323 * src/base/ftoutln.c (FT_Outline_Copy): Change return value for
3324 invalid `source' and `target' parameters to `Invalid_Outline'.
3325 (FT_Outline_Done_Internal): Change return value for invalid
3326 `outline' parameter to `Invalid_Outline'.
3327
33282014-11-26 Werner Lemberg <wl@gnu.org>
3329
Werner Lemberga593a042014-11-26 18:42:48 +01003330 * src/cache/ftcbasic.c: Use single calls to `FT_TRACE'.
3331
suzuki toshiya5aff8532014-11-26 14:36:12 +090033322014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3333
suzuki toshiyacd4a5a22014-11-27 00:20:48 +09003334 * src/base/ftobj.c (Mac_Read_POST_Resource): Additional
3335 overflow check in the summation of POST fragment lengths,
3336 suggested by Mateusz Jurczyk <mjurczyk@google.com>.
3337
33382014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3339
suzuki toshiya1720e812014-11-26 16:39:00 +09003340 * src/base/ftobjs.c (Mac_Read_POST_Resource): Insert comments
3341 and fold too long tracing messages.
3342
33432014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3344
suzuki toshiya18a8f0d2014-11-26 16:11:38 +09003345 Fix Savannah bug #43540.
3346
3347 * src/base/ftmac.c (parse_fond): Prevent a buffer overrun
3348 caused by a font including too many (> 63) strings to store
3349 names[] table.
3350
33512014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3352
suzuki toshiya45331672014-11-26 16:02:17 +09003353 * src/base/ftobjs.c (Mac_Read_POST_Resource): Use unsigned long
3354 variables to read the lengths in POST fragments. Suggested by
3355 Mateusz Jurczyk <mjurczyk@google.com>.
3356
33572014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3358
suzuki toshiya35252ae2014-11-26 15:52:23 +09003359 Fix Savannah bug #43539.
3360
3361 * src/base/ftobjs.c (Mac_Read_POST_Resource): Fix integer overflow
3362 by a broken POST table in resource-fork.
3363
33642014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3365
suzuki toshiya240c94a2014-11-26 15:43:29 +09003366 Fix Savannah bug #43538.
3367
3368 * src/base/ftobjs.c (Mac_Read_POST_Resource): Fix integer overflow
3369 by a broken POST table in resource-fork.
3370
33712014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3372
suzuki toshiya5aff8532014-11-26 14:36:12 +09003373 * src/base/ftobjs.c (Mac_Read_POST_Resource): Avoid memory leak
3374 by a broken POST table in resource-fork. Return after freeing
3375 the buffered POST table when it is found to be broken.
3376
Werner Lemberg04edbbd2014-11-25 10:21:13 +010033772014-11-25 Werner Lemberg <wl@gnu.org>
3378
Werner Lemberg02b8e7e2014-11-25 11:31:51 +01003379 */*: s/Invalid_Argument/Invalid_Size_Handle/ where appropriate.
3380
33812014-11-25 Werner Lemberg <wl@gnu.org>
3382
Werner Lemberg0d4aa232014-11-25 11:26:14 +01003383 */*: s/Invalid_Argument/Invalid_Stream_Handle/ where appropriate.
3384
33852014-11-25 Werner Lemberg <wl@gnu.org>
3386
Werner Lembergf4f9e682014-11-25 11:11:55 +01003387 */*: s/Invalid_Argument/Invalid_Library_Handle/ where appropriate.
3388
33892014-11-25 Werner Lemberg <wl@gnu.org>
3390
Werner Lemberg04c2aa12014-11-25 10:22:12 +01003391 */*: s/Invalid_Argument/Invalid_Outline/ where appropriate.
3392
33932014-11-25 Werner Lemberg <wl@gnu.org>
3394
Werner Lemberg04edbbd2014-11-25 10:21:13 +01003395 */*: s/Invalid_Argument/Invalid_Face_Handle/ where appropriate.
3396
Werner Lembergeca0f062014-11-24 10:22:08 +010033972014-11-24 Werner Lemberg <wl@gnu.org>
3398
Werner Lemberg3e867112014-11-25 09:01:07 +01003399 [Savannah bug #43682] Adjust some renderer callbacks.
3400
3401 * src/raster/ftraster.c (ft_black_set_mode): Change return type to
3402 `int' to stay in sync with `FT_Renderer_SetModeFunc' prototype.
3403
3404 * src/smooth/ftgrays.c (gray_raster_set_mode): New dummy function
3405 for orthogonality.
3406 (ft_grays_raster): Use it.
3407
Werner Lemberg04edbbd2014-11-25 10:21:13 +010034082014-11-25 Werner Lemberg <wl@gnu.org>
Werner Lemberg3e867112014-11-25 09:01:07 +01003409
Werner Lemberg6689a002014-11-25 08:53:09 +01003410 [Savannah bug #43682] Properly handle missing return errors.
3411
3412 The functions in this patch *do* return non-trivial errors that must
3413 be taken care of.
3414
3415 * src/autofit/afloader.c (af_loader_load_g), src/base/ftobjs.c
3416 (FT_Render_Glyph_Internal), src/base/ftoutln.c (FT_Outline_Render),
3417 src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_endchar>,
3418 src/psaux/psobjs.c (ps_parser_load_field_table), src/psaux/t1decode
3419 (t1_decoder_parse_charstrings) <op_endchar>, src/truetype/ttgload.c
3420 (load_truetype_glyph <subglyph loop>, tt_loader_init,
3421 TT_Load_Glyph), src/truetype/ttgxvar.c (TT_Set_MM_Blend),
3422 src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Do it.
3423
Werner Lemberg04edbbd2014-11-25 10:21:13 +010034242014-11-25 Werner Lemberg <wl@gnu.org>
Werner Lemberg6689a002014-11-25 08:53:09 +01003425
Werner Lembergb24e8ba2014-11-25 08:30:49 +01003426 [Savannah bug #43682] Add/remove `void' casts to some functions.
3427
3428 We use a cast to indicate that we intentionally ignore a function's
3429 return value. However, this doesn't apply to API functions where
3430 errors can only happen for trivially invalid input.
3431
3432 * src/base/ftstroke.c (FT_Glyph_Stroke, FT_Glyph_StrokeBorder),
3433 src/base/ftsynth.c (FT_GlyphSlot_Embolden), src/cff/cffgload.c
3434 (cff_slot_load), src/pfr/pfrdrivr.c (pfr_get_kerning),
3435 src/type1/t1load.c (parse_encoding), src/type42/t42parse.c
3436 (t42_parse_encoding): Do it.
3437
Werner Lemberg04edbbd2014-11-25 10:21:13 +010034382014-11-25 Werner Lemberg <wl@gnu.org>
Werner Lembergb24e8ba2014-11-25 08:30:49 +01003439
Werner Lembergef439fd2014-11-25 08:14:15 +01003440 [Savannah bug #43682] Change some signatures to `void' return type.
3441
3442 * include/internal/pshints.h (PSH_Globals_SetScaleFunc),
3443 include/internal/sfnt.h (TT_Get_Metrics_Func),
3444 src/pshinter/pshglob.c (psh_globals_set_scale),
3445 src/pshinter/pshrec.c (ps_hints_init), src/sfnt/ttmtx.c
3446 (tt_face_get_metrics), src/truetype/ttinterp.c (TT_Goto_CodeRange,
3447 TT_Set_CodeRange, TT_Clear_CodeRange, TT_Done_Context,
3448 TT_Save_Context): Do it.
3449
3450 * src/pshinter/pshglob.h, src/pshinter/pshrec.h, src/sfnt/ttmtx.h,
3451 src/truetype/ttgload.c (TT_Hint_Glyph), src/truetype/ttinterp.c
3452 (TT_Run_Context), src/truetype/ttinterp.h, src/truetype/ttobjs.c
3453 (tt_size_run_fpgm, tt_size_run_prep): Updated.
3454
34552014-11-24 Werner Lemberg <wl@gnu.org>
3456
Werner Lemberg6889f7b2014-11-24 17:16:08 +01003457 Remove all code related to FT_MAX_CHARMAP_CACHEABLE.
3458
3459 This is no longer used.
3460
3461 * src/base/ftobjs.c, src/cache/ftccmap.c, src/cff/cffobjs.c,
3462 src/sfnt/ttcmap.c: Do it.
3463
34642014-11-24 Werner Lemberg <wl@gnu.org>
3465
Werner Lembergf0292bb2014-11-24 10:51:21 +01003466 [sfnt] Fix Savannah bug #43680.
3467
3468 This adds an additional constraint to make the fix from 2013-01-25
3469 really work.
3470
3471 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_image) <index_format==4>:
3472 Check `p' before `num_glyphs'.
3473
34742014-11-24 Werner Lemberg <wl@gnu.org>
3475
Werner Lembergeca0f062014-11-24 10:22:08 +01003476 [truetype] Fix Savannah bug #43679.
3477
3478 * src/truetype/ttpload.c (tt_face_load_hdmx): Check minimum size of
3479 `record_size'.
3480
Jarkko Pöyry96341dc2014-11-24 09:53:07 +010034812014-11-24 Jarkko Pöyry <jarkko.poyry@gmail.com>
3482
3483 [cff, pfr, psaux, winfonts] Fix Savannah bug #43676.
3484
Werner Lemberged6a9df2014-12-06 23:28:58 +01003485 Don't cast cmap init function pointers to an incompatible type.
Jarkko Pöyry96341dc2014-11-24 09:53:07 +01003486
3487 Without this patch, the number of parameters between declaration and
3488 the real signature differs. Calling such a function results in
3489 undefined behavior.
3490
3491 ISO/IEC 9899:TC3 (Committee Draft September 7, 2007)
3492 6.5.2.2 Function calls
3493 9 If the function is defined with a type that is not
3494 compatible with the type (of the expression) pointed to by
3495 the expression that denotes the called function, the
3496 behavior is undefined.
3497
3498 On certain platforms (c -> js with emscripten) this causes
3499 termination of execution or invalid calls because in the emscripten
3500 implementation, function pointers of different types are stored in
3501 different pointer arrays. Incorrect pointer type here results in
3502 indexing of an incorrect array.
3503
3504 * src/cff/cffcmap.c (cff_cmap_encoding_init, cff_cmap_unicode_init),
3505 src/pfr/pfrcmap.c (pfr_cmap_init), src/psaux/t1cmap.c
3506 t1_cmap_standard_init, t1_cmap_expert_init, t1_cmap_custom_init,
3507 t1_cmap_unicode_init), src/winfonts/winfnt.c (fnt_cmap_init): Fix
3508 signature.
3509
Werner Lemberga7a42072014-11-24 06:44:45 +010035102014-11-24 Werner Lemberg <wl@gnu.org>
3511
Werner Lembergf70d9342014-11-24 09:31:32 +01003512 [sfnt] Fix Savannah bug #43672.
3513
3514 * src/sfnt/ttkern.c (tt_face_load_kern): Use correct value for
3515 minimum table length test.
3516
35172014-11-24 Werner Lemberg <wl@gnu.org>
3518
Werner Lemberg73be9f92014-11-24 07:30:05 +01003519 [type1, type42] Another fix for Savannah bug #43655.
3520
3521 * src/type1/t1load.c (parse_charstrings), src/type42/t42parse.c
3522 (t42_parse_charstrings): Add another boundary testing.
3523
35242014-11-24 Werner Lemberg <wl@gnu.org>
3525
Werner Lemberga7a42072014-11-24 06:44:45 +01003526 [docmaker] Formatting, copyright, improved documentation.
3527
3528 * src/tools/docmaker/*: No code changes besides trivial
3529 modifications.
3530
Werner Lemberg9bd20b72014-11-22 06:24:45 +010035312014-11-22 Werner Lemberg <wl@gnu.org>
3532
Werner Lembergaf834612014-11-22 13:29:10 +01003533 [bdf] Fix Savannah bug #43660.
3534
3535 * src/bdf/bdflib.c (_bdf_parse_glyphs) <"ENDFONT">: Check
3536 `_BDF_GLYPH_BITS'.
3537
35382014-11-22 Werner Lemberg <wl@gnu.org>
3539
Werner Lemberg42fcd662014-11-22 12:44:33 +01003540 [type42] Allow only embedded TrueType fonts.
3541
3542 This is a follow-up to Savannah bug #43659.
3543
3544 * src/type42/t42objs.c (T42_Face_Init): Exclusively use the
3545 `truetype' font driver for loading the font contained in the `sfnts'
3546 array.
3547
35482014-11-22 Werner Lemberg <wl@gnu.org>
3549
Werner Lemberg37881872014-11-22 10:46:47 +01003550 [type42] Fix Savannah bug #43659.
3551
3552 * src/type42/t42objs.c (T42_Open_Face): Initialize `face->ttf_size'.
3553
3554 * src/type42/t42parse.c (t42_parse_sfnts): Always set
3555 `face->ttf_size' directly. This ensures a correct stream size in
3556 the call to `FT_Open_Face', which follows after parsing, even for
3557 buggy input data.
3558 Fix error messages.
3559
35602014-11-22 Werner Lemberg <wl@gnu.org>
3561
Werner Lemberg5f201ab2014-11-22 09:16:39 +01003562 [cff] Fix Savannah bug #43658.
3563
3564 * src/cff/cf2ft.c (cf2_builder_lineTo, cf2_builder_cubeTo): Handle
3565 return values of point allocation routines.
3566
35672014-11-22 Werner Lemberg <wl@gnu.org>
3568
Werner Lemberg9bd20b72014-11-22 06:24:45 +01003569 [sfnt] Fix Savannah bug #43656.
3570
3571 * src/sfnt/ttcmap.c (tt_cmap4_validate): Fix order of validity
3572 tests.
3573
Werner Lemberg6de76172014-11-21 06:05:49 +010035742014-11-21 Werner Lemberg <wl@gnu.org>
3575
Werner Lembergdd897102014-11-21 22:19:28 +01003576 [type1, type42] Fix Savannah bug #43655.
3577
3578 * src/type1/t1load.c (parse_charstrings), src/type42/t42parse.c
3579 (t42_parse_charstrings): Fix boundary testing.
3580
35812014-11-21 Werner Lemberg <wl@gnu.org>
3582
Werner Lembergb1fc00d2014-11-21 12:06:40 +01003583 * src/pcf/pcfread.c (pcf_get_metrics): Sanitize invalid metrics.
3584
35852014-11-21 Werner Lemberg <wl@gnu.org>
3586
Werner Lemberg9154dab2014-11-21 08:03:51 +01003587 [ftlcdfil] Obey flow direction.
3588
3589 * src/base/ftlcdfil.c (_ft_lcd_filter_fir, _ft_lcd_filter_legacy):
3590 Handle `up' flow.
3591
35922014-11-21 Werner Lemberg <wl@gnu.org>
3593
Werner Lemberg644d6fa2014-11-21 07:28:50 +01003594 * src/base/ftbitmap.c (FT_Bitmap_Convert): Improve.
3595
3596 This commit completes argument checks and adds support for different
3597 flow directions.
3598
35992014-11-21 Werner Lemberg <wl@gnu.org>
3600
Werner Lemberg6de76172014-11-21 06:05:49 +01003601 * src/base/ftbitmap.c (FT_Bitmap_Copy): Improve.
3602
3603 This commit adds argument checks and support for different flow
3604 directions.
3605
Werner Lemberg1e6e1b82014-11-20 21:07:56 +010036062014-11-20 Werner Lemberg <wl@gnu.org>
3607
3608 * src/base/ftbitmap.c (FT_Bitmap_New): Check argument.
3609
Werner Lembergd6061212014-11-19 21:13:23 +010036102014-11-19 Werner Lemberg <wl@gnu.org>
3611
Werner Lembergb3500af2014-11-19 21:28:21 +01003612 Change some fields in `FT_Bitmap' to unsigned type.
3613
3614 This doesn't break ABI.
3615
3616 * include/ftimage.h (FT_Bitmap): Make `rows', `width', `num_grays',
3617 `pixel_mode', and `palette_mode' unsigned types.
3618
3619 * src/base/ftbitmap.c: Updated.
3620 (FT_Bitmap_Copy): Fix casts.
3621
3622 * src/cache/ftcsbits.c, src/raster/ftraster.c, src/sfnt/pngshim.c:
3623 Updated.
3624
36252014-11-19 Werner Lemberg <wl@gnu.org>
3626
Werner Lembergdf485772014-11-19 21:21:23 +01003627 Make `FT_Bitmap_Convert' correctly handle negative `pitch' values.
3628
3629 * src/base/ftbitmap.c (FT_Bitmap_Convert): Always use positive value
3630 for the pitch while copying data.
3631 Correctly set pitch sign in target bitmap.
3632
36332014-11-19 Werner Lemberg <wl@gnu.org>
3634
Werner Lembergd6061212014-11-19 21:13:23 +01003635 Minor code improvement in `FT_Bitmap_Embolden'.
3636
3637 * src/base/ftbitmap.c (FT_Bitmap_Embolden) <FT_PIXEL_MODE_GRAY[24]>:
3638 Fix thinko.
3639
Alexei Podtelezhnikovf841ad32014-11-19 21:19:06 -050036402014-11-19 Alexei Podtelezhnikov <apodtele@gmail.com>
3641
3642 * src/base/fttrigon.c: Use dedicated `FT_Angle' for arctan table.
3643
Werner Lemberga67c43e2014-11-19 06:46:23 +010036442014-11-19 Behdad Esfahbod <behdad@behdad.org>
3645
3646 Avoid compiler warnings on x86-64 for `FT_MulFix'.
3647
3648 `FT_MulFix' takes `FT_Long' parameters as defined in `freetype.h',
3649 but several inline implementations of it in `ftcalc.h' take
3650 `FT_Int32' arguments. This is causing compiler warnings on x86-64:
3651 If parameters of type `FT_Fixed' (= `FT_Long') are passed to the
3652 inline implementation of this function, integer values are truncated
3653 from 64bit to 32bit.
3654
3655 * include/internal/ftcalc.h (FT_MulFix) [FT_MULFIX_ASSEMBLER]: Add
3656 casts.
3657
Werner Lemberg54abd222014-11-15 09:05:22 +010036582014-11-15 Werner Lemberg <wl@gnu.org>
3659
3660 [sfnt] Fix Savannah bug #43597.
3661
3662 * src/sfnt/pngshim.c (Load_SBit_Png): Protect against too large
3663 bitmaps.
3664
Werner Lemberg602040b2014-11-12 20:51:20 +010036652014-11-12 Werner Lemberg <wl@gnu.org>
3666
Werner Lemberg257c2702014-11-12 21:42:13 +01003667 [sfnt] Fix Savannah bug #43591.
3668
3669 * src/sfnt/ttsbit.c (tt_sbit_decoder_init): Protect against addition
3670 and multiplication overflow.
3671
36722014-11-12 Werner Lemberg <wl@gnu.org>
3673
Werner Lemberg677ddf42014-11-12 21:26:44 +01003674 [sfnt] Fix Savannah bug #43590.
3675
3676 * src/sfnt/ttload.c (check_table_dir, tt_face_load_font_dir):
3677 Protect against addition overflow.
3678
36792014-11-12 Werner Lemberg <wl@gnu.org>
3680
Werner Lembergf46add12014-11-12 21:06:08 +01003681 [sfnt] Fix Savannah bug #43589.
3682
3683 * src/sfnt/sfobjs.c (woff_open_font): Protect against addition
3684 overflow.
3685
36862014-11-12 Werner Lemberg <wl@gnu.org>
3687
Werner Lemberg602040b2014-11-12 20:51:20 +01003688 [sfnt] Fix Savannah bug #43588.
3689
3690 * src/sfnt/ttcmap.c (tt_cmap8_validate, tt_cmap10_validate,
3691 tt_cmap12_validate, tt_cmap13_validate, tt_cmap14_validate): Protect
3692 against overflow in additions and multiplications.
3693
Alexei Podtelezhnikov2e73a1b2014-11-09 23:22:43 -050036942014-11-10 Alexei Podtelezhnikov <apodtele@gmail.com>
3695
3696 [base] CORDIC improvements.
3697
3698 The scaling between the hypotenuse and its CORDIC approximation is
3699 based on regression analysis. The smaller padding for `theta' is
3700 justifed by its maximum error of less than 6.
3701
3702 * src/base/fttrigon.c (ft_trig_downscale): Borrow code from
3703 ./ftcalc.c (ft_multo64), change linear intercept.
3704 (ft_trig_pseudo_polarize): Decrease `theta' padding.
3705
Werner Lemberg0e73d212014-11-09 01:27:38 +010037062014-11-09 Werner Lemberg <wl@gnu.org>
3707
3708 * src/base/ftstroke.c (ft_stroker_inside): Fix border intersections.
3709
3710 One more place to check whether `radius' is zero.
3711
3712 Problem reported by Marco Wertz <marco.wertz@gmx.de>.
3713
Werner Lemberg2c4832d2014-11-07 07:42:33 +010037142014-11-07 Werner Lemberg <wl@gnu.org>
3715
Werner Lemberg602040b2014-11-12 20:51:20 +01003716 [bdf] Fix Savannah bug #43535.
Werner Lemberg2c4832d2014-11-07 07:42:33 +01003717
3718 * src/bdf/bdflib.c (_bdf_strncmp): New macro that checks one
3719 character more than `strncmp'.
3720 s/ft_strncmp/_bdf_strncmp/ everywhere.
3721
Werner Lembergf49a1002014-11-06 13:30:28 +010037222014-11-06 Werner Lemberg <wl@gnu.org>
3723
Werner Lemberg602040b2014-11-12 20:51:20 +01003724 [pcf] Fix Savannah bug #43548.
Werner Lembergef1eba72014-11-06 23:25:05 +01003725
Werner Lemberg2c4832d2014-11-07 07:42:33 +01003726 * src/pcf/pcfread.c (pcf_get_encodings): Add sanity checks for row
3727 and column values.
Werner Lembergef1eba72014-11-06 23:25:05 +01003728
37292014-11-06 Werner Lemberg <wl@gnu.org>
3730
Werner Lemberg602040b2014-11-12 20:51:20 +01003731 [pcf] Fix Savannah bug #43547.
Werner Lemberg0e2f5d52014-11-06 22:32:46 +01003732
3733 * src/pcf/pcfread.c (pcf_read_TOC): Check `size' and `offset'
3734 values.
3735
37362014-11-06 Werner Lemberg <wl@gnu.org>
3737
Werner Lembergf49a1002014-11-06 13:30:28 +01003738 * src/pcf/pcfread.c (pcf_read_TOC): Avoid memory leak.
3739
Infinalityfacfc792014-11-03 07:24:59 +010037402014-11-03 Infinality <infinality@infinality.net>
3741
3742 * src/truetype/ttsubpix.c (COMPATIBILITY_MODE_Rules): Updated.
3743
3744 The previous commit deteriorates rendering of DejaVu and similar
3745 fonts; this gets compensated with this rule.
3746
Werner Lemberg706f7522014-11-03 07:20:57 +010037472014-11-03 Werner Lemberg <wl@gnu.org>
3748
3749 * src/truetype/ttinterp.c (Ins_DELTAP): Fix subpixel hinting.
3750
3751 Before this patch, it was impossible to ever call DELTAP[123] in
3752 subpixel hinting mode as described in the ClearType whitepaper; it
3753 only worked if in `compatibility mode'. However, compatibility mode
3754 essentially disables SHPIX, completely ruining hinting of
3755 ttfautohint output, for example.
3756
3757 We now follow the whitepaper more closely so that DELTAP[123]
3758 instructions for touched points in the non-subpixel direction are
3759 executed.
3760
Alexei Podtelezhnikove1efe0a2014-10-31 00:07:14 -040037612014-10-31 Alexei Podtelezhnikov <apodtele@gmail.com>
3762
Alexei Podtelezhnikov525d4872014-10-31 22:12:37 -04003763 [smooth] Improve code readability.
3764
3765 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Rearrange code.
3766
37672014-10-31 Alexei Podtelezhnikov <apodtele@gmail.com>
3768
Alexei Podtelezhnikove1efe0a2014-10-31 00:07:14 -04003769 [smooth] Reduce outline translations during rendering.
3770
3771 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Translate origin
3772 virtually by modifying cbox, actually translate outline if cumulative
3773 shift is not zero.
3774
Alexei Podtelezhnikovc7fd9352014-10-30 22:43:01 -040037752014-10-30 Alexei Podtelezhnikov <apodtele@gmail.com>
3776
3777 [smooth] Fix Savannah bug #35604 (cont'd).
3778
3779 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Remove checks and
3780 casts that became unnecessary after the variable type upgrades.
3781
Alexei Podtelezhnikov74916992014-10-29 22:24:24 -040037822014-10-29 Alexei Podtelezhnikov <apodtele@gmail.com>
3783
Alexei Podtelezhnikov465ab992014-10-29 23:45:23 -04003784 [smooth] Improve code readability.
3785
3786 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Rearrange code.
3787
37882014-10-29 Alexei Podtelezhnikov <apodtele@gmail.com>
3789
Alexei Podtelezhnikov74916992014-10-29 22:24:24 -04003790 Unify hypotenuse approximations.
3791
3792 * include/internal/ftcalc.h (FT_HYPOT): Move macro from here...
3793 * include/internal/ftobjs.h: ... to here, next to required `FT_ABS'.
3794 * src/smooth/ftgrays.c (gray_render_cubic): Use it here.
3795
Werner Lembergfe151522014-10-25 05:56:59 +020037962014-10-25 Werner Lemberg <wl@gnu.org>
3797
3798 [cff] Test valid darkening parameter macros in `ftoption.h'.
3799
3800 We no longer need an otherwise unused typedef that can cause a gcc
3801 warning.
3802 Problem reported by Alexei.
3803
3804 * src/cff/cffobjs.c (cff_driver_init): Use
3805 `CFF_CONFIG_OPTION_DARKENING_PARAMETER_XXX' macros directly.
3806 (SET_DARKENING_PARAMETERS): Removed.
3807 Compile time tests are now ...
3808
3809 * devel/ftoption.h, include/config/ftoption.h: ... here.
3810
Alexei Podtelezhnikovaba0f492014-10-24 23:50:57 -040038112014-10-25 Alexei Podtelezhnikov <apodtele@gmail.com>
3812
3813 Improve flat corner definition.
3814
3815 * include/internal/ftcalc.h (FT_HYPOT): Macro to approximate Euclidean
3816 distance with the alpha max plus beta min algorithm.
3817 * src/base/ftcalc.c (ft_corner_is_flat): Use it instead of Taxicab
3818 metric.
3819
David Weißdd8de1a2014-10-23 20:01:48 +020038202014-10-23 David Weiß <David.Weiss@ptvgroup.com>
3821
3822 [build] Improve property file for vc2010.
3823
3824 User-defined properties should be empty by default to prevent linker
3825 failures.
3826
3827 * builds/windows/vc2010/freetype.user.props,
3828 builds/windows/vc2010/freetype.vcxproj:
3829 s/OptionsDirectory/UserOptionDirectory/.
3830 Comment out all user options.
3831
Werner Lembergdd570e92014-10-23 19:57:37 +020038322014-10-23 Werner Lemberg <wl@gnu.org>
3833
3834 [cff] Work around bug in preprocessor of MSVC 2010.
3835
3836 We have been hit by
3837
3838 https://connect.microsoft.com/VisualStudio/feedback/details/718976/msvc-pr
3839
3840 * devel/ftoption.h, include/config/ftoption.h: Replace
3841 `CFF_CONFIG_OPTION_DARKENING_PARAMETERS' with eight macros
3842 `CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4}'.
3843
3844 * src/cff/cffobjs.c (SET_DARKENING_PARAMETERS): Removed. We no
3845 longer need double expansion.
3846 (SET_DARKENING_PARAMETERS_0): Renamed to ...
3847 (SET_DARKENING_PARAMETERS): ... this.
3848 Update call.
3849
Werner Lembergcc7bb802014-10-20 08:35:50 +020038502014-10-20 Werner Lemberg <wl@gnu.org>
3851
3852 [sbit] Minor fixes.
3853
3854 * src/sfnt/ttsbit.c (tt_face_load_sbit) [TT_SBIT_TABLE_TYPE_SBIX]:
3855 Accept overlay format also, but emit warning message in that case.
3856 (tt_sbit_decoder_load_metrics): Add missing newline to error
3857 message.
3858 (tt_sbit_load_sbix_image): Add `rgbl' graphic type (as used on iOS
3859 7.1) to the list of unsupported formats.
3860
Alexei Podtelezhnikov118e6512014-10-19 23:31:08 -040038612014-10-19 Alexei Podtelezhnikov <apodtele@gmail.com>
3862
3863 [truetype] Clean up bytecode rounding.
3864
3865 Zero distance does not have to be treated specially if you follow
3866 specifications and check the sign as the very last step of rounding.
3867
3868 * src/truetype/ttinterp.c (Round_None, Round_To_Grid,
3869 Round_Down_To_Grid, Round_Up_To_Grid, Round_To_Double_Grid): Use
3870 macros when available, do not check for non-zero distance.
3871 (Round_To_Half_Grid, Round_Super, Round_Super_45): Ditto, return phase
3872 if sign changed.
3873
Alexei Podtelezhnikovd4aabda2014-10-18 10:10:04 -040038742014-10-18 Alexei Podtelezhnikov <apodtele@gmail.com>
3875
3876 [truetype] Unwrap engine compensation settings.
3877
3878 * src/truetype/ttobjs.c (tt_size_init_bytecode): Updated.
3879
David Weißfede19e2014-10-18 14:59:20 +020038802014-10-18 David Weiß <David.Weiss@ptvgroup.com>
3881
3882 [build] Add property file to vc2010 project.
3883
3884 This simplifies custom build configurations, especially for
3885 automated build environments.
3886
3887 * builds/windows/vc2010/freetype.user.props: New configuration file.
3888
3889 * builds/windows/vc2010/freetype.vcxproj: Include
3890 `freetype.user.props' and use its data fields.
3891
3892 * builds/windows/vc2010/index.html: Updated.
3893
Werner Lembergc9c33f22014-10-18 11:01:14 +020038942014-10-18 Werner Lemberg <wl@gnu.org>
3895
3896 [autofit] Add blue-zone support for Telugu.
3897
3898 This essentially moves the Telugu script from the `Indic' hinter to
3899 the `Latin' hinter.
3900
3901 Note that this is a first shot and quite certainly needs
3902 refinements.
3903
3904 * src/autofit/afblue.dat: Add blue zone data for Telugu.
3905
3906 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3907
3908 * src/autofit/afscript.h: Add Telugu standard characters and move
3909 data out of AF_CONFIG_OPTION_INDIC block.
3910
3911 * src/autofit/afranges.c: Move Telugu data out of
3912 AF_CONFIG_OPTION_INDIC block.
3913
3914 * src/autofit/afstyles.h: Update Telugu data; in particular, use
3915 AF_WRITING_SYSTEM_LATIN.
3916
Werner Lemberg54306f52014-10-18 10:42:28 +020039172014-10-18 David Wimsey <david@wimsey.us>
3918
3919 [cmake] Add iOS build support.
Werner Lemberg1050aa92014-10-18 10:45:09 +02003920 From Savannah patch #8497.
Werner Lemberg54306f52014-10-18 10:42:28 +02003921
3922 * builds/cmake/iOS.cmake: New file. Universal binaries are built
3923 with both 32 and 64 bit arm architectures.
3924
3925 * CMakeLists.txt (IOS_PLATFORM): New variable for running the iOS
3926 toolchain. Possible values are `OS' to build on iOS, or
3927 `SIMULATOR' to build on APPLE.
3928
Werner Lemberg1a1750f2014-10-16 22:54:01 +020039292014-10-16 Behdad Esfahbod <behdad@behdad.org>
3930 Werner Lemberg <wl@gnu.org>
3931
3932 [cff] Add `CFF_CONFIG_OPTION_DARKENING_PARAMETERS' config macro.
3933
3934 * devel/ftoption.h, include/config/ftoption.h
3935 (CFF_CONFIG_OPTION_DARKENING_PARAMETERS): New macro.
3936
3937 * src/cff/cffobjs.c (SET_DARKENING_PARAMETERS,
3938 SET_DARKENING_PARAMETERS_0): New macros.
3939 (cff_driver_init): Use new macros.
3940
Alexei Podtelezhnikov7e83f062014-10-14 23:03:56 -040039412014-10-14 Alexei Podtelezhnikov <apodtele@gmail.com>
3942
3943 [truetype] Limit delta shift range.
3944
Werner Lembergdf3d67e2014-10-16 07:24:44 +02003945 The valid range for delta shift is zero through six. Negative values
3946 are invalid according to
3947
Alexei Podtelezhnikov7e83f062014-10-14 23:03:56 -04003948 https://developer.apple.com/fonts/TrueType-Reference-Manual/RM04/Chap4.html#delta%20shift
3949
3950 * src/truetype/ttobjs.h (delta_shift, delta_base): Make unsigned.
Werner Lembergdf3d67e2014-10-16 07:24:44 +02003951 * src/truetype/ttinterp.h (DO_SDS): Throw an error if `delta_shift'
3952 is out of range.
3953 (Ins_DELTAP, Ins_DELTAC): Optimize for valid `delta_shift'.
Alexei Podtelezhnikov7e83f062014-10-14 23:03:56 -04003954
Werner Lemberg03987bf2014-10-16 07:19:46 +020039552014-10-16 Werner Lemberg <wl@gnu.org>
3956
3957 A better fix for Savannah bug #43392.
3958 Suggested by Doug Felt <dougfelt@gmail.com>.
3959
Werner Lembergdf3d67e2014-10-16 07:24:44 +02003960 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics): Set
Werner Lemberg03987bf2014-10-16 07:19:46 +02003961 `vertAdvance' to zero...
3962
3963 * src/truetype/ttgload.c (TT_Load_Glyph): ... and set here a default
3964 value for `vertAdvance' based on `linearVertAdvance' in case
3965 `vertAdvance' is zero. Note that the previous computed ad-hoc value
3966 for `linearVertAdvance' was apparently not tested in a real-life
3967 situation.
3968
David Weiß3889cb22014-10-14 11:35:16 +020039692014-10-14 David Weiß <David.Weiss@ptvgroup.com>
3970
3971 [build] Better optimization settings for vc2010 solution file.
3972
3973 * builds/windows/vc2010/freetype.sln,
3974 builds/windows/vc2010/freetype.vcxproj: Updated.
3975
Werner Lemberg8f178092014-10-14 08:28:09 +020039762014-10-14 Werner Lemberg <wl@gnu.org>
3977
3978 [autofit] Adjust Devenagari character range.
3979
3980 * src/autofit/afranges.c (af_deva_uniranges): Omit characters that
3981 are common to all other Indic scripts.
3982
Werner Lemberg1ca5fa12014-10-12 08:31:32 +020039832014-10-12 Werner Lemberg <wl@gnu.org>
3984
3985 [sfnt] Fix Savannah bug #43392.
3986
3987 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics): Don't let
3988 vertical metrics uninitialized.
3989
Alexei Podtelezhnikov673a28e2014-10-11 14:40:51 -040039902014-10-11 Alexei Podtelezhnikov <apodtele@gmail.com>
3991
3992 [base] Small bbox correction.
3993
3994 * src/base/ftbbox.c (FT_Outline_Get_BBox): Start from nonsense bbox
Werner Lembergdf3d67e2014-10-16 07:24:44 +02003995 instead of initial point that could be `off' in conic outlines.
Alexei Podtelezhnikov673a28e2014-10-11 14:40:51 -04003996
Alexei Podtelezhnikov2ffcf172014-10-08 22:01:08 -040039972014-10-08 Alexei Podtelezhnikov <apodtele@gmail.com>
3998
Alexei Podtelezhnikov40dac112014-10-09 00:58:14 -04003999 [base] Fix Savannah bug #43356.
4000
4001 * src/base/ftbbox.c (BBox_Move_To, BBox_Conic_To): Update bbox in case
Werner Lembergdf3d67e2014-10-16 07:24:44 +02004002 of implicit `to'.
Alexei Podtelezhnikov40dac112014-10-09 00:58:14 -04004003 (BBox_Line_To): New emitter that does not update bbox.
4004
40052014-10-08 Alexei Podtelezhnikov <apodtele@gmail.com>
4006
Alexei Podtelezhnikov2ffcf172014-10-08 22:01:08 -04004007 [base] Introduce and use new macro `FT_UPDATE_BBOX'
4008
4009 * src/base/ftbbox.c (FT_UPDATE_BBOX): New macro.
4010 (FT_Outline_Get_BBox): Use it here.
4011
Alexei Podtelezhnikov7abdb8c2014-10-02 23:13:33 -040040122014-10-02 Alexei Podtelezhnikov <apodtele@gmail.com>
4013
4014 [base] Significant optimization of `ft_div64by32'
4015
4016 We shift as many bits as we can into the high register, perform
4017 32-bit division with modulo there, then work through the remaining
4018 bits with long division. This optimization is especially noticeable
4019 for smaller dividends that barely use the high register.
4020
4021 * src/base/ftcalc.c (ft_div64by32): Updated.
4022
Dave Arnold537c55d2014-10-02 06:32:32 +020040232014-10-02 Dave Arnold <darnold@adobe.com>
4024
4025 [cff] Fix Savannah bug #43271.
4026
4027 * src/cff/cf2font.c (cf2_computeDarkening): Change overflow
4028 detection to use logarithms and clamp `scaledStem'.
4029
Alexei Podtelezhnikov418e18f2014-10-01 22:36:40 -040040302014-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
4031
Alexei Podtelezhnikov74d0aad2014-10-01 23:27:15 -04004032 * src/base/ftcalc.c: Remove miscellaneous type casts.
4033
40342014-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
4035
Alexei Podtelezhnikov418e18f2014-10-01 22:36:40 -04004036 [base] Use more common `FT_MSB' implementation with masks.
4037
4038 * src/base/ftcalc.c (FT_MSB): Updated.
4039
Alexei Podtelezhnikov955aff12014-09-30 23:09:39 -040040402014-09-30 Alexei Podtelezhnikov <apodtele@gmail.com>
4041
4042 [base] Clean up.
4043
4044 * src/base/ftcalc.c (FT_MOVE_SIGN): New macro for frequently used
4045 code.
4046
Alexei Podtelezhnikov7f491112014-09-25 22:54:38 -040040472014-09-25 Alexei Podtelezhnikov <apodtele@gmail.com>
4048
4049 [base] Avoid unnecessary long division.
4050
4051 This applies to `FT_MulDiv' but not to `FT_DivFix', where overflows or
4052 lack thereof are predicted accurately.
4053
4054 * src/base/ftcalc.c (ft_div64by32): Improve readability.
4055 (FT_MulDiv, FT_MulDiv_No_Round) [!FT_LONG64]: Use straight division
4056 when multiplication stayed within 32 bits.
4057
Werner Lemberg5b68e4f2014-09-24 19:06:13 +020040582014-09-24 Werner Lemberg <wl@gnu.org>
4059
4060 [autofit] Minor clean-ups.
4061
4062 * src/autofit/afhints.c (AF_FLAGS): Remove obsolete values.
4063
4064 * src/autofit/afhints.c (af_glyph_hints_dump_points,
4065 af_glyph_hints_align_strong_points): Updated.
4066
4067 * src/autofit/aflatin.c (af_latin_hints_link_segments,
4068 af_latin_hints_compute_segments), src/autofit/afcjk.c
4069 (af_cjk_hints_link_segments), src/autofit/aflatin2.c
4070 (af_latin2_hints_link_segments, af_latin2_hints_compute_segments):
4071 There are no longer fake segments since more than 10 years...
4072
Werner Lemberg387a9fe2014-09-22 06:42:24 +020040732014-09-22 Werner Lemberg <wl@gnu.org>
4074
4075 [autofit] Minor code streamlining.
4076
4077 * src/autofit/afhints.c (af_axis_hints_new_edge): Remove redundant
4078 initialization.
4079
Alexei Podtelezhnikov5c894842014-09-19 22:03:15 -040040802014-09-19 Alexei Podtelezhnikov <apodtele@gmail.com>
4081
4082 * src/base/ftcalc.c: Harmonize code.
4083
40842014-09-15 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikovbc12d9e2014-09-08 21:27:43 -04004085
Alexei Podtelezhnikovef070d42014-09-15 22:06:19 -04004086 [base] Tighten the overflow check in `FT_MulDiv'.
4087
4088 * src/base/ftcalc.c (FT_MulDiv) [!FT_LONG64]: Updated.
4089
40902014-09-08 Alexei Podtelezhnikov <apodtele@gmail.com>
4091
Alexei Podtelezhnikovbc12d9e2014-09-08 21:27:43 -04004092 Fix Savannah bug #43153.
4093
4094 * src/psaux/psconv.c (PS_Conv_ToFixed): Add protection against
Alexei Podtelezhnikov7abdb8c2014-10-02 23:13:33 -04004095 overflow in `divider'.
Alexei Podtelezhnikovbc12d9e2014-09-08 21:27:43 -04004096
Alexei Podtelezhnikov32128522014-09-03 21:57:42 -040040972014-09-03 Alexei Podtelezhnikov <apodtele@gmail.com>
4098
Alexei Podtelezhnikov336735d2014-09-03 22:55:26 -04004099 [base] Tighten the overflow check in `FT_DivFix'.
4100
4101 This fixes a 13-year old bug. The original overflow check should have
4102 been updated when rounding was introduced into this function
4103 (c2cd00443b).
4104
4105 * src/base/ftcalc.c (FT_DivFix) [!FT_LONG64]: Updated.
4106 * include/freetype.h (FT_DivFix): Updated documentation.
4107
41082014-09-03 Alexei Podtelezhnikov <apodtele@gmail.com>
4109
Alexei Podtelezhnikov32128522014-09-03 21:57:42 -04004110 [base] Tighten the overflow check in `FT_MulFix'.
4111
4112 * src/base/ftcalc.c (FT_MulFix) [!FT_LONG64]: Updated.
4113
Alexei Podtelezhnikov125c3ca2014-09-02 22:38:59 -040041142014-09-02 Alexei Podtelezhnikov <apodtele@gmail.com>
4115
4116 [truetype] Shortcut ppem calculations for square pixels.
4117
4118 * src/truetype/ttinterp.h (TT_ExecContextRec): New field
4119 `cur_ppem_func' with a function pointer.
4120 * src/truetype/ttinterp.c (TT_RunIns): Initialize `cur_ppem_func'
4121 depending on the pixel geometry to either...
4122 (Current_Ppem_Stretched): ... this for stretched pixels.
4123 (Current_Ppem): ... or this for square pixels.
4124 (DO_MPPEM, DO_MPS, Ins_DELTAP, Ins_DELTAC): Use `cur_ppem_func'.
4125
Behdad Esfahbod1ec98b22014-08-31 08:47:11 +020041262014-08-31 Behdad Esfahbod <behdad@behdad.org>
4127
4128 Don't use `register' keyword. Fixes compiler warnings.
4129
4130 * src/base/ftcalc.c (FT_Add64) [!FT_LONG64]: Do it.
4131 * src/gzip/inftrees.c (huft_build): Ditto.
4132 * src/truetype/ttinterp.c (TT_MulFix14_arm): Ditto.
4133
Alexei Podtelezhnikova8bc49e2014-08-24 22:14:01 -040041342014-08-24 Alexei Podtelezhnikov <apodtele@gmail.com>
4135
Alexei Podtelezhnikov125c3ca2014-09-02 22:38:59 -04004136 [truetype] Optimize DELTAP and DELTAC.
Alexei Podtelezhnikova8bc49e2014-08-24 22:14:01 -04004137
4138 * src/truetype/ttinterp.c (Ins_DELTAP, Ins_DELTAC): Move ppem
4139 calculations outside of the loop.
4140
Alexei Podtelezhnikov98688592014-08-21 23:28:52 -040041412014-08-21 Alexei Podtelezhnikov <apodtele@gmail.com>
4142
4143 Fix Savannah bug #43033.
4144
4145 * include/config/ftconfig.h, builds/unix/ftconfig.in,
4146 builds/vms/ftconfig.h [FT_LONG64]: Do not disable the macro when
4147 64-bit type is `long'.
4148
Alexei Podtelezhnikov8fd87d42014-08-20 00:57:22 -040041492014-08-20 Alexei Podtelezhnikov <apodtele@gmail.com>
4150
4151 [base] Small optimization of `FT_MulFix'.
4152
4153 * src/base/ftcalc.c (FT_MulFix): Loosen up the condition for direct
4154 32-bit calculations.
4155
Alexei Podtelezhnikovf09326a2014-08-20 00:08:38 -040041562014-08-19 Alexei Podtelezhnikov <apodtele@gmail.com>
4157
4158 [base] Use unsigned calculation in `FT_MulDiv'.
4159
4160 * src/base/ftcalc.c (FT_MulDiv): Updated to expand 32-bit range.
4161
Alexei Podtelezhnikov382f3152014-08-18 23:16:15 -040041622014-08-18 Alexei Podtelezhnikov <apodtele@gmail.com>
4163
4164 [base] Remove truncation in `FT_DivFix'.
4165
4166 * src/base/ftcalc.c (FT_DivFix): Updated.
4167
Alexei Podtelezhnikov5ef20232014-08-14 23:21:46 -040041682014-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
4169
4170 Minor refactoring.
4171
4172 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round): Updated.
4173
41742014-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikovc7022462014-08-14 23:01:01 -04004175
4176 Turn FT_MSB into a macro when using gcc builtins.
4177
4178 * src/base/ftcalc.c, include/internal/ftcalc.h: Updated.
4179
Alexei Podtelezhnikovf8efbcf2014-08-12 23:22:17 -040041802014-08-12 Alexei Podtelezhnikov <apodtele@gmail.com>
4181
4182 [base] Avoid undefined FT_MSB in `BBox_Cubic_Check'.
4183
4184 * src/base/ftbbox.c (BBox_Cubic_Check): Update.
4185 (update_cubic_max): Repalce with...
4186 (cubic_peak): ... this, which now handles upscaling.
4187
Alexei Podtelezhnikov47289932014-08-11 23:39:34 -040041882014-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
4189
Alexei Podtelezhnikov28018d42014-08-12 00:26:16 -04004190 [base] Handle collapsed outlines to avoid undefined FT_MSB.
4191
4192 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Update.
4193
41942014-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
4195
Alexei Podtelezhnikov47289932014-08-11 23:39:34 -04004196 [base] Restore FT_MulFix inlining.
4197
4198 * include/freetype.h (FT_MulFix): Unconditionally defined.
4199
4200 * src/base/ftcalc.c [FT_MULFIX_ASSEMBLER]: Move code from here...
4201
4202 * include/internal/ftcalc.h [FT_MULFIX_ASSEMBLER]: ... to here,
4203 which conditionally replaces the function with an inline version
4204 through the macro.
4205
Alexei Podtelezhnikov90be4b62014-08-08 22:27:10 -040042062014-08-08 Alexei Podtelezhnikov <apodtele@gmail.com>
4207
4208 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Refactor.
4209
Werner Lembergd17cabf2014-07-26 09:53:50 +090042102014-07-26 Werner Lemberg <wl@gnu.org>
4211
4212 [cff] Fix typo.
4213
4214 * src/cff/cf2hints.c (cf2_glyphpath_computeOffset): Use correct
4215 offsets in third quadrant.
4216
4217 Reported by maks <maksqwe1@ukr.net>.
4218
Werner Lemberg4e754132014-07-17 17:34:49 +090042192014-07-17 Werner Lemberg <wl@gnu.org>
4220
4221 Fix Savannah bug #42788.
4222
4223 * src/pfr/pfrobjs.c: Include `ftcalc.h'.
4224
Alexei Podtelezhnikovc0a6f202014-07-16 22:05:56 -040042252014-07-16 Alexei Podtelezhnikov <apodtele@gmail.com>
4226
4227 Replace `ft_highpow2' function.
4228
4229 * src/pfr/pfrobjs.c (pfr_face_get_kerning): Use `FT_MSB' instead of
4230 `ft_highpow2'.
4231
4232 * src/base/ftutil.c, include/internal/ftobjs.h (ft_highpow2): Remove
4233 it.
4234
Alexei Podtelezhnikov71330ce2014-07-15 23:30:45 -040042352014-07-15 Alexei Podtelezhnikov <apodtele@gmail.com>
4236
Werner Lembergcbbf26b2014-07-17 17:27:12 +09004237 * src/base/ftcalc.c (FT_MSB): Utilize gcc builtins.
Alexei Podtelezhnikov177982e2014-07-15 23:54:34 -04004238
42392014-07-15 Alexei Podtelezhnikov <apodtele@gmail.com>
4240
Alexei Podtelezhnikov71330ce2014-07-15 23:30:45 -04004241 [base] Move assembler code back in the source file.
4242
4243 FT_MulFix assembler used to reside in ftcalc.c before f47d263f1b.
4244
4245 * include/config/ftconfig.h, builds/unix/ftconfig.in,
4246 builds/vms/ftconfig.h [FT_MULFIX_ASSEMBLER]: Move code from here...
4247
4248 * src/base/ftcalc.c [FT_MULFIX_ASSEMBLER]: ... to here.
4249
42502014-07-14 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov1183cd42014-07-14 22:30:55 -04004251
4252 [base] Further clean up color bitmap conversion.
4253
4254 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Stop
4255 using FT_MulFix and FT_DivFix since all calculations fit into 32 bits.
4256
Werner Lemberg441b3f32014-07-13 02:28:14 +090042572014-07-13 Werner Lemberg <wl@gnu.org>
4258
4259 [truetype] Improve handling of buggy `prep' tables.
4260
4261 In case of an error in the `prep' table, no longer try to execute it
4262 again and again. This makes FreeType handle endless loops in buggy
4263 fonts much faster.
4264
4265 * src/truetype/ttobjs.h (TT_SizeRec): The fields `bytecode_ready'
4266 and `cvt_ready' are now negative if not initialized yet, otherwise
4267 they indicate the error code of the last run.
4268
4269 * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep,
4270 tt_size_done_bytecode, tt_size_init_bytecode,
4271 tt_size_ready_bytecode, tt_size_init, tt_size_done, tt_size_reset):
4272 Updated.
4273
4274 * src/truetype/ttgload.c (tt_loader_init): Updated.
4275 * src/truetype/ttinterp.c (TT_RunIns): Force reexecution of `fpgm'
4276 and `prep' only if we are in the `glyf' table.
4277
Werner Lemberge98e2bc2014-07-12 16:37:39 +090042782014-07-12 Werner Lemberg <wl@gnu.org>
4279
4280 * builds/vms/ftconfig.h: Synchronize.
4281 Problem reported by Alexei.
4282
Alexei Podtelezhnikov35576bf2014-07-11 22:40:34 -040042832014-07-11 Alexei Podtelezhnikov <apodtele@gmail.com>
4284
4285 [base] Clean up bitmap conversion.
4286
4287 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Use
4288 appropriate FT_DivFix and remove superfluous upscaling.
4289
Alexei Podtelezhnikovceab95a2014-07-04 23:01:32 -040042902014-07-04 Alexei Podtelezhnikov <apodtele@gmail.com>
4291
4292 [base] Small optimization of the ancient code.
4293
4294 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round): Loosen up the
4295 condition for direct 32-bit calculations.
4296
Werner Lemberg38975562014-06-27 06:55:56 +020042972014-06-27 Werner Lemberg <wl@gnu.org>
4298
4299 Fix Apple standard glyph names.
4300
4301 * src/sfnt/ttpost.c (tt_post_default_names): Synchronize with
4302 `tools/glnames.py'
4303
4304 Problem reported by Adam Twardoch <adam@fontlab.com>.
4305
Werner Lembergcf2347c2014-06-17 09:01:04 +020043062014-06-17 Werner Lemberg <wl@gnu.org>
4307
Werner Lemberg231171f2014-06-17 09:14:32 +02004308 Partially revert commit from 2014-06-13.
4309
4310 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Move
4311 declaration of `p_first' and `p_last' out of the loop.
4312
43132014-06-17 Werner Lemberg <wl@gnu.org>
4314
Werner Lembergcf2347c2014-06-17 09:01:04 +02004315 * builds/unix/freetype2.m4: s/AC_PATH_PROG/AC_PATH_TOOL/.
4316
4317 This simplifies cross-compiling.
4318
Werner Lemberg6497b9c2014-06-13 09:28:00 +020043192014-06-13 Werner Lemberg <wl@gnu.org>
4320
Werner Lemberge5c0fff2014-06-13 14:01:20 +02004321 Fix more compiler warnings.
4322 Reported by Wojciech Mamrak <wmamrak@gmail.com>.
4323
4324 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
4325 Make integer constant unsigned.
4326
4327 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
4328 <TT_SBIT_TABLE_TYPE_SBIX>: Fix types.
4329 (tt_sbit_decoder_load_compound, tt_face_load_sbix_image): Add proper
4330 casts.
4331
43322014-06-13 Werner Lemberg <wl@gnu.org>
4333
Werner Lemberg6497b9c2014-06-13 09:28:00 +02004334 Fix compiler warnings.
4335 Reported by Wojciech Mamrak <wmamrak@gmail.com>.
4336
4337 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage),
Werner Lembergcbbf26b2014-07-17 17:27:12 +09004338 src/autofit/afmodule.c (af_property_set): Fix `signed' vs.
Werner Lemberg6497b9c2014-06-13 09:28:00 +02004339 `unsigned' issues.
4340
4341 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Make compiler
4342 happy.
4343
4344 * src/base/ftlcdfil.c (_ft_lcd_filter_fir): Use only four elements
4345 for `fir'.
4346 Fix `signed' vs. `unsigned' issues.
4347
4348 * src/sfnt/sfobjs.c (WRITE_BYTE): Removed, unused.
4349 (WRITE_USHORT, WRITE_ULONG): Add proper casts.
4350
4351 * src/truetype/ttgload.c (TT_Get_VMetrics): Add proper casts.
4352
4353 * src/truetype/ttinterp.c (Ins_DELTAP): Add proper casts for `B1'
4354 and `B2'.
4355
Alexey Petruchik02f21702014-05-16 08:09:43 +020043562014-05-16 Alexey Petruchik <alexey.petruchik@gmail.com>
4357
4358 [cmake] Add option to build OS X framework.
4359
4360 * CMakeLists.txt: Update accordingly.
4361
4362 * builds/mac/freetype-Info.plist: New file.
4363
Pavel Koshevoy15da66a2014-05-13 07:33:48 +020043642014-05-13 Pavel Koshevoy <pkoshevoy@gmail.com>
4365
4366 * CMakeLists.txt (BASE_SRCS): Add missing `ftbdf.c'.
4367
Werner Lemberg07e7b8a2014-05-11 08:00:25 +020043682014-05-11 Werner Lemberg <wl@gnu.org>
4369
Werner Lembergfaa21472014-05-11 12:44:00 +02004370 [autofit] Fix variable initializations.
4371
4372 * src/autofit/afhints.c (af_glyph_hints_reload): Assign default
4373 values to `in_dir' and `out_dir' for all points.
4374
43752014-05-11 Werner Lemberg <wl@gnu.org>
4376
Werner Lemberg07e7b8a2014-05-11 08:00:25 +02004377 [autofit] Fix crash with font `CabinSketch-Bold.ttf'.
4378
4379 Problem reported by Ralf S. Engelschall <rse@engelschall.com>.
4380
4381 * src/autofit/afhints.c (af_glyph_hints_reload): Fix threshold for
4382 finding first non-near point.
4383 Properly initialize non-near point deltas.
4384
Werner Lemberg63bef9a2014-05-01 07:16:05 +020043852014-05-01 Werner Lemberg <wl@gnu.org>
4386
Werner Lembergc576bb02014-05-01 17:24:19 +02004387 [autofit] Add blue-zone support for Devanagari.
4388
4389 This essentially moves the Devanagari script from the `Indic' hinter
4390 to the `Latin' hinter. Thanks to Girish Dalvi
4391 <girish.dalvi@gmail.com> for guidance with blue zone characters!
4392
4393 * src/autofit/afblue.dat: Add blue zone data for Devanagari.
4394
4395 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
4396
4397 * src/autofit/afscript.h: Add Devanagari standard characters and
4398 move data out of AF_CONFIG_OPTION_INDIC block.
4399
4400 * src/autofit/afranges.c: Move Devanagari data out of
4401 AF_CONFIG_OPTION_INDIC block.
4402 Move U+20B9, (new) Rupee sign, from Latin to Devanagari.
4403
4404 * src/autofit/afstyles.h: Update Devanagari data; in particular, use
4405 AF_WRITING_SYSTEM_LATIN.
4406
44072014-05-01 Werner Lemberg <wl@gnu.org>
4408
Werner Lemberg63bef9a2014-05-01 07:16:05 +02004409 [autofit] Fix handling of neutral blue zones in stems.
4410
4411 * src/autofit/afhints.h (AF_Edge_Flags): New value
4412 `AF_EDGE_NEUTRAL'.
4413
4414 * src/autofit/aflatin.c (af_latin_hints_compute_blue_edges): Trace
4415 neutral blue zones with AF_EDGE_NEUTRAL.
4416 (af_latin_hint_edges): Skip neutral blue zones if necessary.
4417
Werner Lembergccfc4b42014-04-28 21:13:14 +020044182014-04-28 Werner Lemberg <wl@gnu.org>
4419
4420 [autofit] Introduce neutral blue zones to the latin module.
4421
4422 Such blue zones match either the top or the bottom of a contour. We
4423 need them for scripts where accent-like elements directly touch the
4424 base character (for example, some vowel signs in Devanagari, cf.
4425 U+0913 or U+0914).
4426
4427 * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_NEUTRAL): New
4428 property.
4429
4430 * src/autofit/afblue.h: Regenerated.
4431
4432 * src/autofit/aflatin.h (AF_LATIN_IS_NEUTRAL_BLUE): New macro.
4433 (AF_LATIN_BLUE_NEUTRAL): New enumeration value.
4434
4435 * src/autofit/aflatin.c (af_latin_metrics_init_blues,
4436 af_latin_hints_compute_blue_edges): Handle neutral blue zones.
4437
Werner Lembergabb3fca2014-04-25 22:13:32 +020044382014-04-25 Werner Lemberg <wl@gnu.org>
4439
4440 * src/autofit/hbshim.c: Partially revert commit from 2014-04-17.
4441
4442 Using input glyph coverage data is simply wrong.
4443
4444 Problem reported by Nikolaus Waxweiler <madigens@gmail.com> and
4445 Mantas MikulÄ—nas <grawity@gmail.com>.
4446
Werner Lembergf1936372014-04-23 08:22:33 +020044472014-04-23 Werner Lemberg <wl@gnu.org>
4448
4449 * src/raster/ftraster.c (Vertical_Sweep_Span): Use drop-out mode.
4450
4451 This spot has been missed while introducing support for various
4452 drop-out modes years ago (including no drop-out mode, which this
4453 commit fixes).
4454
4455 Problem reported by Patrick Thomas <pthomas505@gmail.com>.
4456
Werner Lembergd9b44702014-04-22 07:33:07 +020044572014-04-22 Werner Lemberg <wl@gnu.org>
4458
4459 * src/sfnt/pngshim.c (error_callback): s/longjmp/ft_longjmp/.
4460
Werner Lemberg98e510e2014-04-20 22:11:27 +020044612014-04-20 Werner Lemberg <wl@gnu.org>
4462
4463 [autofit] Fix Savannah bug #42148.
4464
4465 The adaptation of the cjk auto-hinter module to blue stringsets in
4466 2013-08-25 had three severe bugs. Mea culpa.
4467
4468 1. Contrary to the latin auto-hinter, characters for reference and
4469 overshoot values of a blue zone are specified separately. Due to
4470 the screwed-up change it didn't work at all.
4471
4472 2. A boolean comparison was erroneously replaced with a cast,
4473 causing invalid results with the `^' operator later on. The
4474 visual artifact caused by this problem is the topic of the bug
4475 report.
4476
4477 3. Two flag values were inverted, causing incorrect assignment of
4478 reference and overshoot values.
4479
4480 * src/autofit/afblue.dat: Fix CJK bluestrings, introducing a new
4481 syntax to have both reference and overshoot characters in a single
4482 string. This is error #1.
4483 Add extensive comments.
4484
4485 * src/autofit/afblue.hin (AF_BLUE_PROPERTY_CJK_FILL): Removed, no
4486 longer used.
Werner Lembergccfc4b42014-04-28 21:13:14 +02004487 (AF_BLUE_PROPERTY_CJK_TOP, AF_BLUE_PROPERTY_CJK_HORIZ): Fix values.
Werner Lemberg98e510e2014-04-20 22:11:27 +02004488 This is error #3.
4489
4490 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
4491
4492 * src/autofit/afcjk.c (af_cjk_metrics_init_blues): Correct error #1.
4493 Use character `|' to separate characters for reference and overshoot
4494 values.
4495 Improve tracing messages, synchronizing them with the latin
4496 auto-hinter.
Werner Lembergccfc4b42014-04-28 21:13:14 +02004497 (af_cjk_hints_compute_blue_edges): Fix value of `is_top_right_blue'.
Werner Lemberg98e510e2014-04-20 22:11:27 +02004498 This is error #2.
4499 (af_cjk_align_linked_edge): Add tracing message.
4500
4501 * src/autofit/afcjk.h (AF_CJK_IS_FILLED_BLUE): Removed, no longer
4502 used.
4503
Werner Lembergbbd83132014-04-17 01:24:36 +020045042014-04-17 Werner Lemberg <wl@gnu.org>
4505
Werner Lemberg8c7fb782014-04-17 15:53:25 +02004506 [autofit] More coverage fixes for complex scripts.
4507
4508 * src/autofit/hbshim.c (af_get_coverage): Merge input glyph coverage
4509 of GSUB lookups into output coverage. Otherwise, ligatures are not
4510 handled properly.
4511 Don't check blue zone characters for default coverage.
4512
45132014-04-17 Werner Lemberg <wl@gnu.org>
4514
Werner Lembergbbd83132014-04-17 01:24:36 +02004515 Make `FT_Get_SubGlyph_Info' actually work.
4516
4517 * src/base/ftobjs.c (FT_Get_SubGlyph_Info): Return FT_Err_Ok
4518 if there is no error.
4519
Werner Lemberg181fd072014-04-15 16:47:05 +020045202014-04-15 Werner Lemberg <wl@gnu.org>
4521
4522 [afblue.pl]: Minor improvements.
4523
4524 * src/tools/afblue.pl: Allow whitespace before comments.
4525 Ignore whitespace in strings.
4526
Werner Lemberg8b1f2a62014-04-14 07:58:19 +020045272014-04-14 Werner Lemberg <wl@gnu.org>
4528
4529 [autofit] Improve coverage handling.
4530
4531 * src/autofit/hbshim.c (af_get_coverage): Don't exclude glyphs
4532 appearing in the GPOS table if we are processing the default
4533 coverage.
4534
David Weber76307872014-04-13 15:41:13 +020045352014-04-13 David Weber <weber.aulendorf@googlemail.com>
4536
4537 [smooth] Fix stand-alone compilation.
4538
4539 * src/smooth/ftgrays.c (FT_BEGIN_STMNT, FT_END_STMNT): Define.
4540
Werner Lemberg8a94b1e2014-04-12 20:44:33 +020045412014-04-12 Werner Lemberg <wl@gnu.org>
4542
4543 [autofit] Redesign the recognition algorithm of strong points.
4544
4545 In particular, local extrema without horizontal or vertical segments
4546 are better recognized:
4547
4548 + A + D
4549 \ /
4550 \ /
4551 \ /
4552 \ /
4553 \ + C
4554 \ /
4555 B +/
4556
4557 If the distances AB and CD are large, point B wasn't previously
4558 detected as an extremum since the `ft_corner_is_flat' function
4559 `swallowed' BC regardless of its direction, tagging point B as weak.
4560 The next iteration started at B and made `ft_corner_is_flat' swallow
4561 point C, tagging it as weak also, et voilà.
4562
4563 To improve that, another pass gets now performed before calling
4564 `ft_corner_is_flat' to improve the `topology' of an outline: A
4565 sequence of non-horizontal or non-vertical vectors that point into
4566 the same quadrant are handled as a single, large vector.
4567
4568 Additionally, distances of near points are now accumulated, which
4569 makes the auto-hinter handle them as if they were prepended to the
4570 next non-near vector.
4571
4572 This generally improves the auto-hinter's rendering results.
4573
4574 * src/autofit/afhints.c (af_glyph_hints_reload): Implement it.
4575
4576 * src/autofit/afhints.h (AF_FLAGS): Remove no longer used flag
4577 `AF_FLAG_NEAR'.
4578
Werner Lemberg71f53e12014-04-05 16:27:19 +020045792014-04-05 Werner Lemberg <wl@gnu.org>
4580
4581 [autofit] Improve scoring algorithm for identifying stems.
4582
4583 Problem reported by Karsten Lücke <karsten.luecke@kltf.de>.
4584
4585 The new algorithm takes care of the width of stems: If the distance
4586 between two segments is larger than the largest stem width, the
4587 demerits quickly increase for larger distances. This improves
4588 hinting of slanted fonts (especially if the inner parts of serifs
4589 have non-horizontal `shoulders'), avoiding false stem links.
4590
4591 * src/autofit/aflatin.c (af_latin_hints_link_segments): Use largest
4592 stem width (if available) to compute better demerits for distances
4593 between stems.
4594 (af_latin_hints_detect_features): Pass stem width array and array
4595 size.
4596 (af_latin_metrics_init_widths): Updated to use original algorithm.
4597 (af_latin_hints_apply): Updated to use new algorithm.
4598
4599 * src/autofit/aflatin.h: Updated.
4600 * src/autofit/afcjk.c: Updated.
4601
Werner Lembergf8555b52014-04-03 05:45:38 +020046022014-04-03 Werner Lemberg <wl@gnu.org>
4603
4604 Don't require `gzip' module for `sfnt'.
4605
4606 Reported by Preet <prismatic.project@gmail.com>.
4607
4608 * src/sfnt/sfobjs.c (woff_open_font): Guard use of
4609 FT_Gzip_Uncompress with FT_CONFIG_OPTION_USE_ZLIB.
4610
Werner Lembergf41070f2014-03-27 17:38:23 +010046112014-03-27 Werner Lemberg <wl@gnu.org>
4612
4613 Fix Savannah bug #38235.
4614
4615 Work around a bug in pkg-config version 0.28 and earlier: If a
4616 variable value gets surrounded by doublequotes (in particular values
4617 for the `prefix' variable), the prefix override mechanism fails.
4618
4619 * builds/unix/freetype2.in: Don't use doublequotes.
4620 * builds/unix/unix-def.in (freetype.pc): Escape spaces in directory
4621 names with backslashes.
4622
Werner Lembergab76d972014-03-24 19:45:03 +010046232014-03-24 Werner Lemberg <wl@gnu.org>
4624
4625 Fix Savannah bug #41946.
4626
4627 Based on a patch from Marek Kašík <mkasik@redhat.com>.
4628
4629 * builds/unix/configure.raw (LIBS_CONFIG): Remove.
4630 * builds/unix/freetype-config.in (libs): Hard-code value.
4631 * builds/unix/unix-def.in: Updated.
4632
Werner Lembergd5159922014-03-22 06:20:54 +010046332014-03-22 Werner Lemberg <wl@gnu.org>
4634
4635 Another revert for the change from 2014-03-18.
4636
4637 Problem reported by Nikolaus Waxweiler <madigens@gmail.com>.
4638
4639 * src/base/ftcalc.c (FT_MulFix): Ensure that an `FT_MulFix' symbol
4640 gets always exported.
4641
Werner Lembergf0c471a2014-03-20 07:13:12 +010046422014-03-20 Werner Lemberg <wl@gnu.org>
4643
4644 CMakeLists.txt: Another fix for include directories.
4645
4646 Problem reported by Taylor Holberton <taylorcholberton@gmail.com>.
4647
Werner Lembergcc7cf2c2014-03-19 07:35:35 +010046482014-03-19 Werner Lemberg <wl@gnu.org>
4649
Werner Lemberg606c74f2014-03-19 23:46:42 +01004650 CMakeLists.txt: Fix include directories.
4651
4652 Problem reported by Taylor Holberton <taylorcholberton@gmail.com>.
4653
46542014-03-19 Werner Lemberg <wl@gnu.org>
4655
Werner Lembergcc7cf2c2014-03-19 07:35:35 +01004656 Partially revert last commit.
4657
4658 Found by Alexei.
4659
4660 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Initializing
4661 those variables is plain wrong, since we are in a loop.
4662
Sean McBride87628722014-03-18 08:39:35 +010046632014-03-18 Sean McBride <sean@rogue-research.com>
4664 Werner Lemberg <wl@gnu.org>
4665
4666 Fix clang warnings.
4667
4668 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Initialize
4669 some variables.
4670
4671 * src/base/ftcalc.c (FT_MulFix): Only use code if
4672 `FT_MULFIX_INLINED' is not defined.
4673
4674 * src/bdf/bdfdrivr.c (bdf_cmap_class), src/cache/ftcbasic.c
4675 (ftc_basic_image_family_class, ftc_basic_image_cache_class,
4676 ftc_basic_sbit_family_class, ftc_basic_sbit_cache_class),
4677 src/cache/ftccmap.c (ftc_cmap_cache_class), src/cache/ftcmanag.c
4678 (ftc_size_list_class, ftc_face_list_class), src/pcf/pcfdrivr.c
4679 (pcf_cmap_class), src/pfr/pfrdrivr.c (pfr_metrics_service_rec): Make
4680 function static.
4681
4682 * src/type1/t1driver.c (t1_ps_get_font_value): Remove redundant
4683 code.
4684
Werner Lemberg23367ff2014-03-17 07:33:14 +010046852014-03-17 Werner Lemberg <wl@gnu.org>
4686
4687 Fix Savannah bug #41869.
4688
4689 This works around a problem with HarfBuzz (<= 0.9.26), which doesn't
4690 validate glyph indices returned by
4691 `hb_ot_layout_lookup_collect_glyphs'.
4692
4693 * src/autofit/hbshim.c (af_get_coverage): Guard `idx'.
4694
4695 * docs/CHANGES: Updated.
4696
Werner Lemberg03181682014-03-14 08:06:06 +010046972014-03-14 Werner Lemberg <wl@gnu.org>
4698
4699 * builds/unix/configure.raw: Don't show error messages of `which'.
4700
Alan Coopersmithed372b72014-03-09 06:14:12 +010047012014-03-09 Alan Coopersmith <alan.coopersmith@oracle.com>
4702
4703 Fix cppcheck 1.64 warning.
4704
4705 * src/autofit/afglobal.c (af_face_globals_new): Catch NULL pointer
4706 dereference in case of error.
4707
Werner Lemberg1a69dc72014-03-09 06:06:58 +010047082014-03-09 Sean McBride <sean@rogue-research.com>
4709
4710 * src/sfnt/ttcmap.c (tt_face_build_cmaps): Remove clang warning.
4711
Werner Lemberg05565362014-03-06 18:56:58 +010047122014-03-06 Werner Lemberg <wl@gnu.org>
4713
Werner Lembergec8853c2014-03-06 19:13:45 +01004714 * Version 2.5.3 released.
4715 =========================
4716
4717
4718 Tag sources with `VER-2-5-3'.
4719
4720 * docs/VERSION.DLL: Update documentation and bump version number to
4721 2.5.3.
4722
4723 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
4724 builds/windows/vc2005/index.html,
4725 builds/windows/vc2008/freetype.vcproj,
4726 builds/windows/vc2008/index.html,
4727 builds/windows/vc2010/freetype.vcxproj,
4728 builds/windows/vc2010/index.html,
4729 builds/windows/visualc/freetype.dsp,
4730 builds/windows/visualc/freetype.vcproj,
4731 builds/windows/visualc/index.html,
4732 builds/windows/visualce/freetype.dsp,
4733 builds/windows/visualce/freetype.vcproj,
4734 builds/windows/visualce/index.html,
4735 builds/wince/vc2005-ce/freetype.vcproj,
4736 builds/wince/vc2005-ce/index.html,
4737 builds/wince/vc2008-ce/freetype.vcproj,
4738 builds/wince/vc2008-ce/index.html: s/2.5.2/2.5.3/, s/252/253/.
4739
4740 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
4741
4742 * builds/unix/configure.raw (version_info): Set to 17:2:11.
4743 * CMakeLists.txt (VERSION_PATCH): Set to 3.
4744 * docs/CHANGES: Updated.
4745
47462014-03-06 Werner Lemberg <wl@gnu.org>
4747
Werner Lemberg05565362014-03-06 18:56:58 +01004748 Fixes for compilation with C++.
4749
4750 * src/autofit/hbshim.c (scripts): Change type to `hb_script_t'.
4751 (af_get_coverage): Updated.
4752 (COVERAGE): Add cast.
4753
Sean McBrideb24e8d32014-03-06 14:54:22 +010047542014-03-06 Sean McBride <sean@rogue-research.com>
4755
4756 Remove more clang analyzer warnings.
4757
4758 * src/bdf/bdflib.c (_bdf_readstream), src/truetype/ttgload.c
4759 (TT_Load_Glyph): Remove dead stores.
4760
Werner Lemberga32758f2014-03-05 08:02:46 +010047612014-03-05 Werner Lemberg <wl@gnu.org>
4762
4763 * builds/unix/configure.raw: Simplify.
4764
suzuki toshiya382f3ef2014-03-05 10:19:15 +090047652014-03-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4766
4767 Fix a bug in configure in library dependency setting
Werner Lemberga32758f2014-03-05 08:02:46 +01004768 Reported in https://bugs.freedesktop.org/show_bug.cgi?id=75652.
suzuki toshiya382f3ef2014-03-05 10:19:15 +09004769
4770 * builds/unix/configure.raw: Use `x"${xxx}" != xno' style.
4771
Werner Lembergf48f7dc2014-03-04 04:40:07 +010047722014-03-04 Werner Lemberg <wl@gnu.org>
4773
4774 Minor fix for `make devel'.
4775
4776 * builds/freetype.mk (INCLUDE_FLAGS) [DEVEL_DIR]: Don't use
4777 pkg-config for bzip2 since not all GNU/Linux distributions have
4778 `bzip2.pc' (and the header file `bzlib.h' is located in /usr/include
4779 normally).
4780
Werner Lemberg7ac76b52014-03-04 04:29:17 +010047812014-03-04 Sean McBride <sean@rogue-research.com>
4782
4783 Fix several clang static analyzer dead store warnings.
4784
4785 * src/autofit/afhints.c (af_glyph_hints_reload,
4786 af_glyph_hints_align_weak_points): Remove unnecessary assignments.
4787
4788 * src/bdf/bdflib.c (bdf_font_load): Ditto.
4789
4790 * src/pshinter/pshalgo.c (psh_glyph_compute_extrema,
4791 psh_glyph_interpolate_other_points): Ditto.
4792
4793 * src/type1/t1load.c (T1_Set_MM_Blend): Ditto.
4794
Werner Lemberg93ebcbd2014-03-03 07:13:45 +010047952014-03-03 Werner Lemberg <wl@gnu.org>
4796
4797 Rewrite library option handling in `configure'.
4798
4799 o Introduce `auto' value for `--with-XXX' library options; this is
4800 now the default.
4801
4802 o First use `pkg-config' for library detection, then fall back to
4803 other tests.
4804
4805 * builds/unix/configure.raw (--with-zlib, --with-bzip2, --with-png,
4806 --with-harfbuzz): Rewrite.
4807 Use new `xxx_reqpriv', `xxx_libpriv', and `xxx_libstaticconf'
4808 variables to collect data for `freetype2.pc' and `freetype-config'.
4809 (FT2_EXTRA_LIBS): Renamed to ...
4810 (ft2_extra_libs): This since it gets no longer substituted.
4811 (REQUIRES_PRIVATE, LIBS_PRIVATE, LIBS_CONFIG, LIBSSTATIC_CONFIG):
4812 New output variables, replacing `XXX_PKG' and `LIBXXX'.
4813 Add notice at the end of `configure' showing the library
4814 configuration.
4815
4816 * builds/unix/freetype-config.in (--static): New command line
4817 option.
4818 (libs): Updated.
4819 (staticlibs): New variable, to be used if `--static' is given.
Werner Lemberg8fa69a82014-12-03 20:07:14 +01004820 * docs/freetype-config.1: Document `--static'.
Werner Lemberg93ebcbd2014-03-03 07:13:45 +01004821
4822 * builds/unix/freetype2.in, builds/unix/unix-def.in: Updated.
4823
Werner Lemberg86026a42014-03-01 06:57:19 +010048242014-03-01 Werner Lemberg <wl@gnu.org>
4825
Werner Lemberge962a912014-03-01 21:00:02 +01004826 Avoid `long long' warnings with older gcc compilers.
4827 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
4828
4829 * builds/unix/configure.raw: Don't use gcc's `-pedantic' flag for
4830 versions < 4.6. This is especially needed for Max OS X since this
4831 OS runs a gcc variant (or emulation) based on version 4.2.1.
4832
48332014-03-01 Werner Lemberg <wl@gnu.org>
4834
Werner Lemberg6030a9f2014-03-01 14:01:12 +01004835 * docs/INSTALL.CROSS: Revised and updated.
4836
48372014-03-01 Werner Lemberg <wl@gnu.org>
4838
Werner Lemberg646db052014-03-01 12:48:07 +01004839 Make `make clean' remove `freetype2.pc'.
4840
4841 This is a generated file at build time, not configure time.
4842
4843 * builds/unix/unix-def.in (DISTCLEAN): Move `freetype2.pc' to ...
4844 (CLEAN): This variable.
4845
48462014-03-01 Werner Lemberg <wl@gnu.org>
4847
Werner Lemberg00c79ed2014-03-01 12:32:20 +01004848 Use pkg-config for detecting libpng and libbz2 also.
4849
4850 * builds/unix/configure.raw (HAVE_PKG): New variable.
4851 Search for libbz2 using `pkg-config'; s/BZ2/BZIP2/.
4852 Search for libpng using `pkg-config'.
4853 Fix definition of `LIBHARFBUZZ' variable.
4854 * builds/unix/freetype-config.in ($libs): Updated.
4855 * builds/unix/freetype2.in: Add `URL' field.
4856 Update `Requires.private' and `Libs.private'.
4857 * builds/unix/unix-def.in: Updated.
4858
48592014-03-01 Werner Lemberg <wl@gnu.org>
4860
Werner Lemberg86026a42014-03-01 06:57:19 +01004861 Add configure support for HarfBuzz.
4862
4863 * builds/unix/pkg.m4: New file.
4864 * builds/unix/configure.raw: Search for libharfbuzz using
4865 `pkg-config'.
4866 Add `--without-harfbuzz' option.
4867 * builds/unix/freetype-config.in, builds/unix/freetype2.in,
4868 builds/unix/unix-def.in (freetype-config, freetype2.pc): Handle
4869 HarfBuzz.
4870
4871 * docs/INSTALL.UNIX: Document interdependency of Freetype with
4872 HarfBuzz.
4873
Alexei Podtelezhnikov6adda682014-02-28 09:24:26 +010048742014-02-28 Alexei Podtelezhnikov <apodtele@gmail.com>
4875
4876 [cff] Math simplifications.
4877
4878 * src/cf2blues.c (cf2_blues_init): Use `FT_MulDiv'.
4879 * src/cf2ft.c (cf2_getScaleAndHintFlag): Use simple division.
4880
Dave Arnold0eae6eb2014-02-28 07:40:01 +010048812014-02-28 Dave Arnold <darnold@adobe.com>
4882
Dave Arnold135c3fa2014-02-28 07:42:42 +01004883 [cff] Fix Savannah bug #41697, part 2.
4884
4885 * src/cff/cf2ft.c (cf2_initLocalRegionBuffer,
4886 cf2_initGlobalRegionBuffer): It is possible for a charstring to call
4887 a subroutine if no subroutines exist. This is an error but should
4888 not trigger an assert. Split the assert to account for this.
4889
48902014-02-28 Dave Arnold <darnold@adobe.com>
4891
Dave Arnold0eae6eb2014-02-28 07:40:01 +01004892 [cff] Fix Savannah bug #41697, part 1.
4893
4894 * src/cff/cf2hints.c (cf2_hintmap_build): Return when `hintMask' is
4895 invalid. In this case, it is not safe to use the length of
4896 `hStemHintArray'; the exception has already been recorded in
4897 `hintMask'.
4898
Werner Lembergeee4ff82014-02-26 18:12:36 +010048992014-02-26 Werner Lemberg <wl@gnu.org>
4900
Werner Lemberga2b5f662014-02-26 19:50:18 +01004901 [sfnt] Fix Savannah bug #41696.
4902
4903 * src/sfnt/ttcmap.c (tt_cmap0_validate, tt_cmap2_validate,
4904 tt_cmap4_validate, tt_cmap14_validate): Fix limit tests.
4905
49062014-02-26 Werner Lemberg <wl@gnu.org>
4907
Werner Lembergeee4ff82014-02-26 18:12:36 +01004908 [winfnt] Fix Savannah bug #41694.
4909
4910 * src/winfonts/winfnt.c (FNT_Load_Glyph): Check glyph offset.
4911
49122014-02-26 Werner Lemberg <wl@gnu.org>
Werner Lemberg9a567642014-02-26 13:08:07 +01004913
Werner Lemberg08c628d2014-02-26 14:18:03 +01004914 [cff] Fix Savannah bug #41693.
4915
4916 * src/cff/cffload.c (CFF_Load_FD_Select): Reject empty array.
4917
Werner Lembergeee4ff82014-02-26 18:12:36 +010049182014-02-26 Werner Lemberg <wl@gnu.org>
Werner Lemberg08c628d2014-02-26 14:18:03 +01004919
Werner Lemberg9a567642014-02-26 13:08:07 +01004920 [bdf] Fix Savannah bug #41692.
4921
4922 bdflib puts data from the input stream into a buffer in chunks of
4923 1024 bytes. The data itself gets then parsed line by line, simply
4924 increasing the current pointer into the buffer; if the search for
4925 the final newline character exceeds the buffer size, more data gets
4926 read.
4927
4928 However, in case the current line's end is very near to the buffer
4929 end, and the keyword to compare with is longer than the current
4930 line's length, an out-of-bounds read might happen since `memcmp'
4931 doesn't stop properly at the string end.
4932
4933 * src/bdf/bdflib.c: s/ft_memcmp/ft_strncmp/ to make comparisons
4934 stop at string ends.
4935
suzuki toshiya91c7a972014-02-17 16:38:31 +090049362014-02-17 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4937
4938 [autofit] Fix `make multi' compilation.
4939
suzuki toshiyacc9a0c22014-02-17 16:43:54 +09004940 * src/autofit/hbshim.c: Include `afglobal.h' and `aftypes.h'.
suzuki toshiya91c7a972014-02-17 16:38:31 +09004941
Werner Lemberg6b290fd2014-02-19 09:26:54 +010049422014-02-19 Werner Lemberg <wl@gnu.org>
4943 Simon Bünzli <zeniko@gmail.com>
4944
4945 Fix Savannah bug #32902.
4946
4947 Patch taken from
4948
4949 https://code.google.com/p/sumatrapdf/source/browse/trunk/ext/_patches/freetype2.patch?spec=svn8620&r=8620#87
4950
4951 with slight modifications.
4952
4953 * src/type1/t1parse.c (T1_Get_Private_Dict): Add heuristic test to
4954 handle fonts that incorrectly use \r at the beginning of an eexec
4955 block.
4956
Simon Bünzlidf14e6c2014-02-19 08:42:52 +010049572014-02-19 Simon Bünzli <zeniko@gmail.com>
4958
4959 Fix Savannah bug #41590.
4960
4961 * src/type1/t1load.c (parse_encoding): Protect against invalid
4962 number.
4963
Dave Arnold89a94d42014-02-12 23:45:47 +010049642014-02-12 Dave Arnold <darnold@adobe.com>
4965
4966 [cff] Optimize by using `FT_MulDiv'.
4967 Suggested by Alexei.
4968
4969 * src/cff/cf2font.c (cf2_computeDarkening): Do it.
4970
Werner Lemberg85ee27a2014-02-12 23:27:41 +010049712014-02-12 Werner Lemberg <wl@gnu.org>
4972
4973 Fix Savannah bug #41465.
4974
4975 * builds/unix/unix-def.in (CLEAN): Add `freetype-config'.
4976 (DISTCLEAN): Remove `freetype-config'.
4977
Sean McBride7be2a942014-02-08 13:55:38 +010049782014-02-08 Sean McBride <sean@rogue-research.com>
4979
4980 Fix clang static analyzer and compiler warnings.
4981
4982 * src/autofit/afhints.c (af_glyph_hints_align_weak_points),
4983 src/autofit/afloader (af_loader_load_g) <FT_GLYPH_FORMAT_COMPOSITE>,
4984 src/base/ftcalc.c (FT_MSB), src/base/ftoutln.c
4985 (FT_Outline_Decompose), src/bdf/bdfdrivr.c (bdf_interpret_style),
4986 src/cff/cffparse.c (cff_parse_integer), src/cid/cidparse.c
4987 (cid_parser_new), src/pfr/pfrload.c (pfr_phy_font_load),
4988 src/raster/ftraster.c (Decompose_Curve), src/sfnt/sfdriver.c
4989 (sfnt_get_ps_name), src/sfnt/ttcmap.c (tt_cmap12_next,
4990 tt_cmap13_next), src/smooth/ftgrays.c (gray_hline): Remove dead
4991 code.
4992
4993 * src/autofit/afmodule.c (af_property_get_face_globals,
4994 af_property_set, af_property_get), src/base/ftbitmap.c
4995 (ft_gray_for_premultiplied_srgb_bgra): Make functions static.
4996
4997 * src/base/ftobjs.c (ft_remove_renderer): Protect against
4998 library == NULL.
4999 (ft_property_do): Make function static.
5000
5001 * src/base/ftrfork.c: Include `ftbase.h'.
5002
5003 * src/sfnt/ttsbit.c (tt_face_load_sbix_image)
5004 [!FT_CONFIG_OPTION_USE_PNG], src/type1/t1gload.c
5005 (T1_Compute_Max_Advance): Avoid compiler warning.
5006
5007 * src/truetype/ttinterp.c (TT_New_Context): Reduce scope of
5008 variable.
5009
Werner Lembergab98c5e2014-02-08 11:34:33 +010050102014-02-08 Werner Lemberg <wl@gnu.org>
5011
5012 Fix Windows build directories.
5013
5014 The build target is now `windows' instead of `win32'.
5015
5016 Problem reported by Nickolas George <darknova.clan@gmail.com>.
5017
5018 * builds/modules.mk: Don't use `win32' and `win16' (!) but
5019 `windows'.
5020
5021 * builds/windows/detect.mk, builds/windows/win32-def.mk:
5022 s/win32/windows/.
5023
Eugen Sawina8ceae42014-02-08 06:30:06 +010050242014-02-08 Eugen Sawin <esawin@mozilla.com>
5025
5026 Fix Savannah bug #41507.
5027
5028 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap)
5029 [!FT_CONFIG_OPTION_USE_PNG] <17, 17, 19>: Fix error handling.
5030
Dave Arnold355b3592014-02-08 06:23:04 +010050312014-02-08 Dave Arnold <darnold@adobe.com>
5032
5033 [cff] Fix minor performance bug.
5034
5035 * src/cff/cf2font.c (cf2_font_setup): Darkening amount and blue zone
5036 calculations are now cached and not recomputed on each glyph.
5037
Werner Lemberg6dce1362014-02-05 15:40:47 +010050382014-02-05 Werner Lemberg <wl@gnu.org>
5039
5040 Fix problems with perl 5.8.8 as distributed with current MinGW.
5041
5042 * src/tools/afblue.pl: Work-around for Perl bug #63402.
5043 (string_re): Avoid `possessive quantifiers', which have been
5044 introduced in Perl version 5.10.
5045
Werner Lemberga8772912014-02-04 11:36:08 +010050462014-02-04 Werner Lemberg <wl@gnu.org>
5047
Werner Lembergd87f9a62014-02-04 16:14:09 +01005048 Fix compilation with MinGW.
5049
5050 Right now, compilation out of the box with latest MinGW is broken
5051 due to bugs in header files of mingwrt 4.0.3 in strict ANSI mode,
5052 cf.
5053
5054 https://sourceforge.net/p/mingw/bugs/2024/
5055 https://sourceforge.net/p/mingw/bugs/2046/
5056
5057 * builds/unix/configure.raw: Don't set `-ansi' flag for MinGW.
5058
50592014-02-04 Werner Lemberg <wl@gnu.org>
5060
Werner Lemberga8772912014-02-04 11:36:08 +01005061 [autofit] Minor fix.
5062
5063 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
5064 src/autofit/aflatin.c (af_latin_metrics_init_widths): Fix handling
5065 of alternative standard characters.
5066 This also fixes a compilation warning in non-debug mode.
5067
Werner Lembergee3778d2014-02-03 11:16:47 +010050682014-02-03 Werner Lemberg <wl@gnu.org>
5069
5070 [cff] Fix Savannah bug #41363.
5071
5072 * src/cff/cf2ft.c (cf2_checkTransform): Convert assertion into
5073 parameter check.
5074 (cf2_decoder_parse_charstrings): Call `cf2_checkTransform' only if
5075 we are scaling the outline.
5076 (cf2_getPpemY): Remove problematic assertion.
5077
Werner Lemberga3364002014-01-26 09:45:23 +010050782014-01-26 Werner Lemberg <wl@gnu.org>
5079
5080 [autofit] Introduce two more slots for standard characters.
5081
5082 This is useful for OpenType features like `c2sc' (caps to small
5083 caps) that don't have lowercase letters by definition, or other
5084 features that mainly operate on numerals.
5085
5086 * src/autofit/afscript.h: Add more standard characters.
5087
5088 * src/autofit/aftypes.h: Update use of `SCRIPT' macro.
5089 (AF_ScriptClassRec): Add members to hold two more standard
5090 characters.
5091 (AF_DEFINE_SCRIPT_CLASS): Updated.
5092
5093 * src/autofit/afglobal.c, src/autofit/afglobal.h,
5094 * src/autofit/afpic.c, src/autofit/afranges.h, src/autofit/hbshim.c:
5095 Update use of `SCRIPT' macro.
5096
5097 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
5098 src/autofit/aflatin.c (af_latin_metrics_init_widths): Scan two more
5099 standard characters.
5100
Werner Lembergeb7691c2014-01-24 19:04:22 +010051012014-01-24 Werner Lemberg <wl@gnu.org>
5102
5103 Fix Savannah bug #41320.
5104
5105 * src/autofit/aflatin.c (af_latin_metrics_init_blues)
5106 <AF_LATIN_IS_LONG_BLUE>: Avoid negative index of `last'.
5107
Werner Lemberg8b281f82014-01-23 08:14:53 +010051082014-01-23 Werner Lemberg <wl@gnu.org>
5109
Werner Lemberg752f3912014-01-23 09:14:25 +01005110 Fix Savannah bug #41310.
5111
5112 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap) <glyph_format==5>:
5113 Don't check metrics, which this format doesn't have.
5114 This is another correction to the commit from 2013-11-21.
5115
51162014-01-23 Werner Lemberg <wl@gnu.org>
5117
Werner Lemberg8b281f82014-01-23 08:14:53 +01005118 Fix Savannah bug #41309.
5119
5120 * src/type1/t1load.c (t1_parse_font_matrix): Properly handle result
5121 of `T1_ToFixedArray'.
5122
5123 * src/cid/cidload.c (cid_parse_font_matrix): Synchronize with
5124 `t1_parse_font_matrix'.
5125
5126 * src/type42/t42parse.c (t42_parse_font_matrix): Synchronize with
5127 `t1_parse_font_matrix'.
5128 (t42_parse_encoding): Synchronize with `t1_parse_encoding'.
5129
5130 * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_BBOX>,
5131 <T1_FIELD_TYPE_MMOX>: Properly handle result of `ps_tofixedarray'.
5132
Werner Lembergff8dc312014-01-22 09:19:57 +010051332014-01-22 Werner Lemberg <wl@gnu.org>
5134
5135 * src/autofit/hbshim.c (af_get_coverage): Fix memory leaks.
5136
Werner Lemberg6a700782014-01-16 08:55:40 +010051372014-01-16 Werner Lemberg <wl@gnu.org>
5138
5139 [autofit] Improve tracing of style coverages.
5140
5141 * include/internal/fttrace.h: Add `afglobal' for tracing style
5142 coverages.
5143
5144 * src/autofit/afglobal.c: Include FT_INTERNAL_DEBUG_H.
5145 (FT_COMPONENT): Define.
5146 (af_face_globals_compute_style_coverage): Trace `gstyles' array
5147 data.
5148
Werner Lemberg7cbfdff2014-01-09 07:26:06 +010051492014-01-09 Werner Lemberg <wl@gnu.org>
5150
5151 Fix Savannah bug #41158.
5152
5153 * builds/unix/install.mk (install): Create man page directory.
5154
Chongyu Zhu94c66942014-01-08 08:52:59 +010051552014-01-08 Chongyu Zhu <lembacon@gmail.com>
5156
5157 [arm] Fix Savannah bug #41138, part 2.
5158
5159 * builds/unix/ftconfig.in (FT_MulFix_arm), include/config/ftconfig.h
5160 (FT_MulFix_arm), src/truetype/ttinterp.c (TT_MulFix14_arm): Fix
5161 preprocessor conditionals for `add.w'.
5162
Werner Lembergc46fa862014-01-08 08:45:40 +010051632014-01-08 Werner Lemberg <wl@gnu.org>
5164
5165 [autofit] Fix Savannah bug #41138, part 1.
5166
5167 * src/tools/afblue.pl <Handling #endif>: Produce correct auxiliary
5168 enumeration names for generated `#else'.
5169
5170 * src/autofit/afblue.h: Regenerated.
5171
Werner Lemberg3e5a3742014-01-06 07:53:10 +010051722014-01-06 Werner Lemberg <wl@gnu.org>
5173
5174 Add manual page for `freetype-config'.
5175 Contributed by Nis Martensen <nis.martensen@web.de>.
5176
5177 * docs/freetype-config.1: New file.
5178
5179 * builds/unix/unix-def.in (mandir): Define.
5180 * builds/unix/install.mk (install, uninstall): Handle manpage.
5181
Werner Lemberg991cbcc2014-01-05 13:24:56 +010051822014-01-05 Werner Lemberg <wl@gnu.org>
5183
5184 [autofit] Minor fixes for `afblue.pl'.
5185
5186 * src/tools/afblue.pl (aux_name): Don't use `reverse'.
5187 <Handling #endif>: Use proper indentation for generated `#else'.
5188
5189 * src/autofit/afblue.h: Regenerated.
5190
Werner Lemberg0d977442014-01-04 11:46:34 +010051912014-01-04 Werner Lemberg <wl@gnu.org>
5192
5193 [autofit] Fix Indic scripts.
5194
5195 Split the single, incorrect Indic entry into separate scripts so
5196 that the covered ranges are the same: Bengali, Devanagari, Gujarati,
5197 Gurmukhi, Kannada, Limbu, Malayalam, Oriya, Sinhala, Sundanese,
5198 Syloti Nagri, Tamil, Telugu, and Tibetan. At the same time, remove
5199 entries for Meetai Mayak and Sharada – the Unicode ranges were
5200 incorrect (and nobody has complained about that), fonts are scarce
5201 for those scripts, and the Indic auto-hinter support is rudimentary
5202 anyways.
5203
5204 * src/autofit/afscript.h: Updated, using AF_CONFIG_OPTION_INDIC and
5205 AF_CONFIG_OPTION_CJK.
5206
5207 * src/autofit/afstyles.h (STYLE_DEFAULT_INDIC): New auxiliary macro.
5208 Use it, together with AF_CONFIG_OPTION_INDIC and
5209 AF_CONFIG_OPTION_CJK, to update.
5210
5211 * src/autofit/afranges.c [AF_CONFIG_OPTION_INDIC]: Updated.
5212 [!AF_CONFIG_OPTION_INDIC, !AF_CONFIG_OPTION_CJK]: Removed.
5213 Sort entries by tags.
5214
Werner Lemberg5c7f5502014-01-03 10:48:26 +010052152014-01-03 Werner Lemberg <wl@gnu.org>
5216
Werner Lembergecdb0e32014-01-03 20:49:31 +01005217 [autofit] Thinko.
5218
5219 * src/autofit/hbshim.c (af_get_char_index): Similar to
5220 `af_get_coverage', reject glyphs which are not substituted.
5221
52222014-01-03 Werner Lemberg <wl@gnu.org>
5223
Werner Lemberga42f9182014-01-03 18:29:41 +01005224 [autofit] Fix handling of default coverages.
5225
Werner Lemberg1b5bc892014-01-03 18:33:24 +01005226 With this commit, the implementation of coverage handling is
5227 completed.
5228
5229 * src/autofit/hbshim.c (af_get_coverage): Exit early if nothing to
5230 do.
5231 Reject coverages which don't contain appropriate glyphs for blue
5232 zones.
5233
52342014-01-03 Werner Lemberg <wl@gnu.org>
5235
5236 [autofit] Fix handling of default coverages.
5237
Werner Lemberga42f9182014-01-03 18:29:41 +01005238 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
5239 First handle non-default coverages, then the default coverage of the
5240 default script, and finally the other default coverages.
5241
52422014-01-03 Werner Lemberg <wl@gnu.org>
5243
Werner Lembergf45749b2014-01-03 18:09:36 +01005244 [autofit] Fix scaling of HarfBuzz shaping.
5245
5246 * src/autofit/hbshim.c (af_get_char_index): Scale to units per EM.
5247
52482014-01-03 Werner Lemberg <wl@gnu.org>
5249
Werner Lemberg5c7f5502014-01-03 10:48:26 +01005250 [autofit] Better ftgrid support.
5251
5252 * src/autofit/afhints.c (af_glyph_hints_get_segment_offset): Add
5253 parameters `is_blue' and `blue_offset'.
5254
Werner Lemberg73cc8332014-01-01 07:10:36 +010052552014-01-01 Werner Lemberg <wl@gnu.org>
5256
Werner Lemberg55cd7e02014-01-02 13:07:48 +01005257 [autofit] Remove some styles.
5258
5259 * src/autofit/afcover.h: Remove coverages for alternative fractions,
5260 denominators, numerators, and fractions.
5261
5262 * src/autofit/afstyles.h (META_STYLE_LATIN): Updated.
5263
52642014-01-01 Werner Lemberg <wl@gnu.org>
5265
Werner Lembergc973e672014-01-01 16:34:42 +01005266 [autofit] Add more styles.
5267
5268 * src/autofit/afstyles.h (STYLE_LATIN, META_STYLE_LATIN): New
5269 auxiliary macros; use them to define styles for Cyrillic, Greek, and
5270 Latin.
5271
5272 * src/autofit/afcover.h: Remove coverage for oldstyle figures.
5273 Since those digits are used in combination with ordinary letters, it
5274 makes no sense to handle them separately.
5275
5276 * src/autofit/afglobal.c (af_face_globals_get_metrics): Don't limit
5277 `options' parameter to 4 bits.
5278
52792014-01-01 Werner Lemberg <wl@gnu.org>
5280
Werner Lembergabb2f732014-01-01 08:00:16 +01005281 [autofit] Fix style assignments to glyphs.
5282
5283 * src/autofit/hbshim.c (af_get_coverage)
5284 [FT_CONFIG_OPTION_USE_HARFBUZZ]: Scan GPOS coverage of features also
5285 so that we can skip glyphs that have both GSUB and GPOS data.
5286
52872014-01-01 Werner Lemberg <wl@gnu.org>
5288
Werner Lemberg0950f3a2014-01-01 07:48:20 +01005289 * src/autofit/hbshim.c: s/{lookups,glyphs}/gsub_{lookups,glyphs}/.
5290
52912014-01-01 Werner Lemberg <wl@gnu.org>
5292
Werner Lemberg73cc8332014-01-01 07:10:36 +01005293 [autofit] Implement and use `af_get_char_index' with HarfBuzz.
5294
5295 * src/autofit/hbshim.c (COVERAGE) [FT_CONFIG_OPTION_USE_HARFBUZZ]:
5296 Redefine to construct HarfBuzz features.
5297 (af_get_char_index) [FT_CONFIG_OPTION_USE_HARFBUZZ]: Rewritten.
5298
5299 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Use
5300 `y_offset' to adjust `best_y'.
5301
Werner Lembergc9d99472013-12-31 08:16:57 +010053022013-12-31 Werner Lemberg <wl@gnu.org>
5303
Werner Lemberg785f3852013-12-31 09:45:10 +01005304 [autofit] s/AF_STYLE_...._DEFAULT/AF_STYLE_...._DFLT/i.
5305
53062013-12-31 Werner Lemberg <wl@gnu.org>
5307
Werner Lembergc9d99472013-12-31 08:16:57 +01005308 [autofit] Fix interface of `af_get_char_index'.
5309
5310 * src/autofit/hbshim.c (af_get_char_index): Return error value.
5311 Add argument for y offset (to be used in a yet-to-come patch).
5312
5313 * src/autofit/hbshim.h, src/autofit/afcjk.c,
5314 src/autofit/aflatin.c: Updated.
5315
Werner Lemberg44aa7e02013-12-30 07:41:22 +010053162013-12-30 Werner Lemberg <wl@gnu.org>
5317
5318 [autofit] Don't combine multiple features into one set.
5319
5320 Combining them, as originally envisioned, would lead to much more
5321 complicated code, as investigations have shown meanwhile. The major
5322 drawback is that we run out of available style slots much earlier.
5323 However, this is only a theoretical issue since we don't support a
5324 large number of scripts currently.
5325
5326 * src/autofit/afcover.h: Replace `COVERAGE_{1,2,3}' macros with
5327 a single-element `COVERAGE' macro, sort the elements by the feature
5328 tags, and add entry for `ruby'.
5329
5330 * src/autofit/aftypes.h: Updated.
5331 * src/autofit/hbshim.c: Updated.
5332
Werner Lemberg6af01a02013-12-28 08:55:24 +010053332013-12-28 Werner Lemberg <wl@gnu.org>
5334
Werner Lemberg072dc452013-12-28 12:26:21 +01005335 [autofit] Code shuffling to reduce use of cpp macros.
5336
5337 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
5338 Call `af_get_coverage' unconditionally.
5339
5340 * src/autofit/autofit.c: Include `hbshim.c' unconditionally.
5341
5342 * src/autofit/hbshim.c (af_get_coverage)
5343 [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Provide dummy function.
5344
5345 * src/autofit/hbshim.h: Provide function declarations
5346 unconditionally.
5347
53482013-12-28 Werner Lemberg <wl@gnu.org>
5349
Werner Lemberg17af5862013-12-28 10:33:01 +01005350 [autofit] Add wrapper function for `FT_Get_Char_Index'.
5351
5352 Yet-to-come changes will provide HarfBuzz functionality for the new
5353 function.
5354
5355 * src/autofit/hbshim.c (af_get_char_index): New function.
5356 * src/autofit/hbshim.h: Updated.
5357
5358 * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
5359 af_cjk_metrics_init_blues, af_cjk_metrics_check_digits): Updated.
5360
5361 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
5362 af_latin_metrics_init_blues, af_latin_metrics_check_digits):
5363 Updated.
5364
53652013-12-28 Werner Lemberg <wl@gnu.org>
5366
Werner Lemberg6af01a02013-12-28 08:55:24 +01005367 [autofit] Use `global' HarfBuzz font object.
5368
5369 We now use `hb_font' instead of `hb_face' since yet-to-come changes
5370 need this.
5371
5372 * src/autofit/afglobal.h: Include `hbshim.h'.
5373 (AF_FaceGlobalsRec) [FT_CONFIG_OPTION_USE_HARFBUZZ]: New member
5374 `hb_font'.
5375
5376 * src/autofit/afglobal.c (af_face_globals_new)
5377 [FT_CONFIG_OPTION_USE_HARFBUZZ]: Create `hb_font'.
5378 (af_face_globals_free) [FT_CONFIG_OPTION_USE_HARFBUZZ]: Destroy
5379 `hb_font'.
5380
5381 * src/autofit/hbshim.h: Include HarfBuzz headers.
5382
5383 * src/autofit/hbshim.c: Include `hbshim.h' instead of HarfBuzz
5384 headers.
5385 (af_get_coverage): Updated.
5386
Werner Lembergd32a7d32013-12-27 19:26:04 +010053872013-12-27 Werner Lemberg <wl@gnu.org>
5388
5389 [autofit] Handle `DFLT' OpenType script for coverages.
5390
5391 * include/ftautoh.h: Document new `default-script' property.
5392
5393 * src/autofit/hbshim.c (af_get_coverage): Use `AF_FaceGlobals' for
5394 type of first parameter.
5395 (script_tags): Add one more element.
5396 (af_get_coverage): Adjust `script_tags' to handle `DFLT' script tag.
5397
5398 * src/autofit/hbshim.h: Updated.
5399
5400 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
5401 Updated.
5402
5403 * src/autofit/afglobal.h (AF_SCRIPT_DEFAULT): New macro.
5404
5405 * src/autofit/afmodule.h (AF_ModuleRec): New `default_script'
5406 member.
5407
5408 * src/autofit/afmodule.c (af_property_set, af_property_get): Handle
5409 `default-script' property.
5410 (af_autofitter_init): Updated.
5411
suzuki toshiyae2d2b152013-12-27 16:44:24 +090054122013-12-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5413
5414 [ftrfork] Fix the face order difference between POSIX and Carbon.
5415
5416 The fragmented resources in Suitcase and .dfont should be reordered
Werner Lemberg00a7b512013-12-27 19:18:49 +01005417 when `POST' resource for Type1 is being restored, but reordering of
suzuki toshiyae2d2b152013-12-27 16:44:24 +09005418 sfnt resources induces the different face order. Now the ordering
Werner Lemberg00a7b512013-12-27 19:18:49 +01005419 is restricted to `POST' resource only, to prevent the different
5420 order issue (e.g. the face index in the fontconfig cache generated
5421 with Carbon framework is incompatible with that by FreeType 2
5422 without Carbon framework.) Found by Khaled Hosny and Hin-Tak Leung.
5423
suzuki toshiyae2d2b152013-12-27 16:44:24 +09005424 http://lists.gnu.org/archive/html/freetype-devel/2013-02/msg00035.html
5425 http://lists.gnu.org/archive/html/freetype-devel/2013-12/msg00027.html
5426
5427 * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Add a switch
Werner Lemberg44aa7e02013-12-30 07:41:22 +01005428 `sort_by_res_id' to control the fragmented resource ordering.
Werner Lemberg00a7b512013-12-27 19:18:49 +01005429 * include/internal/ftrfork.h: Declare new switch.
5430 * src/base/ftobjs.c (IsMacResource): Enable the sorting for `POST'
5431 resource, and disable the sorting for `sfnt' resource.
suzuki toshiyae2d2b152013-12-27 16:44:24 +09005432
Werner Lemberg5f577462013-12-25 08:50:50 +010054332013-12-25 Werner Lemberg <wl@gnu.org>
5434
5435 Fix Savannah bug #40997.
5436
5437 * src/bdf/bdfdrivr.c (BDF_Face_Init): Only use OR operator to
5438 adjust face flags since FT_FACE_FLAG_EXTERNAL_STREAM might already
5439 be set.
5440 * src/cff/cffobjs.c (cff_face_init): Ditto.
5441 * src/cid/cidobjs.c (cid_face_init): Ditto.
5442 * src/pcf/pcfread.c (pcf_load_font): Ditto.
5443 * src/pfr/pfrobjs.c (pfr_face_init): Ditto.
5444 * src/type1/t1objs.c (T1_Face_Init): Ditto.
5445 * src/type42/t42objs.c (T42_Face_Init): Ditto.
5446 * src/winfonts/winfnt.c (FNT_Face_Init): Ditto.
5447
Werner Lembergc4e968e2013-12-21 07:23:08 +010054482013-12-21 Werner Lemberg <wl@gnu.org>
5449
Werner Lemberg19241342013-12-21 21:31:38 +01005450 [autofit] Introduce `coverages'.
5451
5452 Coverages are the interface to the HarfBuzz library to acces
5453 OpenType features for handling glyphs not addressable by the cmap.
5454
5455 Right now, compilation of HarfBuzz is only added to the development
5456 build. A solution for standard build mode will be delayed until
5457 HarfBuzz gets split into two libraries to avoid mutual dependencies
5458 between FreeType and HarfBuzz.
5459
5460 Note that this is only a first step in handling coverages, basically
5461 providing the framework only. Code for handling selected OpenType
5462 features (this is, actually using the data in `afcover.h') will
5463 follow.
5464
5465 * devel/ftoption.h, include/config/ftoption.h
5466 (FT_CONFIG_OPTION_USE_HARFBUZZ): New macro.
5467
5468 * src/autofit/hbshim.c, src/autofit/hbshim.h, src/autofit/afcover.h:
5469 New files.
5470
5471 * src/autofit/afscript.h: Add HarfBuzz script name tags.
5472
5473 * src/autofit/afstyles.h: Add default coverage enumeration values.
5474
5475 * src/autofit/aftypes.h: Update use of `SCRIPT' and `STYLE' macros.
5476 (AF_Coverage): New enumeration (generated by `afcover.h').
5477 (AF_StyleClassRec): New member `coverage'.
5478 (AF_DEFINE_STYLE_CLASS): Updated.
5479
5480 * include/internal/fttrace.h: Add `afharfbuzz' for tracing coverage
5481 data.
5482
5483 * src/autofit/afglobal.h: Update use of `SCRIPT' and `STYLE' macros.
5484 (AF_SCRIPT_FALLBACK): Renamed to ...
5485 (AF_STYLE_FALLBACK): ... this.
5486
5487 * src/autofit/afglobal.c: Include `hbshim.c'.
5488 Update use of `SCRIPT' and `STYLE' macros.
5489 (af_face_globals_compute_style_coverage)
5490 [FT_CONFIG_OPTION_USE_HARFBUZZ]: Call `af_get_coverage'.
5491 Update.
5492
5493 * src/autofit/afmodule.h (AF_ModuleRec):
5494 s/fallback_script/fallback_style/.
5495
5496 * src/autofit/afmodule.c (af_property_set): Adapt handling of
5497 `fallback-script' property to set a fallback style.
5498 (af_property_get, af_autofitter_init): Updated.
5499
5500 * src/autofit/afpic.c: Update use of `SCRIPT' and `STYLE' macros.
5501
5502 * src/autofit/afranges.h: Update use of `SCRIPT' macro.
5503
5504 * src/autofit/autofit.c [FT_CONFIG_OPTION_USE_HARFBUZZ]: Include
5505 `hbshim.c'.
5506
5507 * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `hbshim.c'.
5508 (AUTOF_DRV_H): Add `afcover.h'.
5509
5510 * builds/freetype.mk (INCLUDE_FLAGS) [DEVEL_DIR]: Use pkg-config for
5511 all libraries needed by FreeType.
5512
55132013-12-21 Werner Lemberg <wl@gnu.org>
5514
Werner Lembergb337fa22013-12-21 19:33:15 +01005515 Fix Savannah bug #40975 (sort of).
5516
5517 * src/truetype/ttinterp.c (Ins_IP): Fix sign typo to make FreeType
5518 behave the same as the Windows TrueType engine for the invalid case.
5519
55202013-12-21 Werner Lemberg <wl@gnu.org>
5521
Werner Lemberg3bf60952013-12-21 08:49:11 +01005522 [autofit] Make PIC mode work actually.
5523
5524 * src/autofit/afpic.h (AFModulePIC): Fix array sizes to fit the
5525 enumeration values automatically generated by including `afscript.h'
5526 and friends.
5527
5528 * src/autofit/afpic.c (autofit_module_class_pic_init): Updated.
5529
55302013-12-21 Werner Lemberg <wl@gnu.org>
5531
Werner Lembergbd413862013-12-21 08:14:25 +01005532 Fix PIC linking.
5533
5534 * include/internal/ftrfork.h (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Fix
5535 generated function name.
5536
5537 * src/base/basepic.c (FT_Init_Table_raccess_guess_table): Rename
5538 to ...
5539 (FT_Init_Table_ft_raccess_guess_table): ... this so that the
5540 function name correctly corresponds to what the macro framework
5541 expects.
5542
5543 * src/psnames/rules.mk (PSNAMES_DRV_SRC_S): Use correct file name so
5544 that PIC functions are compiled also.
5545
55462013-12-21 Werner Lemberg <wl@gnu.org>
5547
Werner Lembergc4e968e2013-12-21 07:23:08 +01005548 [base] Add missing dependencies to Makefile.
5549
5550 * src/base/rules.mk (BASE_SRC): Add `basepic.c' and `ftpic.c'.
5551 (BASE_H): Add `basepic.h'.
5552
Werner Lemberg974b1932013-12-20 17:26:26 +010055532013-12-20 Werner Lemberg <wl@gnu.org>
5554
Werner Lemberg8a8f3752013-12-20 18:35:35 +01005555 [autofit] Fix PIC compilation.
5556
5557 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
5558 src/autofit/aflatin.c (af_latin_metrics_init_widths)
5559 [FT_CONFIG_OPTION_PIC]: Declare `globals'.
5560
5561 * src/autofit/afglobal.c: Always call AF_DEFINE_SCRIPT_CLASS, and
5562 AF_DEFINE_STYLE_CLASS.
5563
5564 * src/autofit/afpic.c: Include `afglobal.h'.
5565 (autofit_module_class_pic_init): Typo.
5566
5567 * src/autofit/aftypes.h (AF_DEFINE_SCRIPT_CLASS,
5568 AF_DEFINE_STYLE_CLASS): Don't use the same identifier for macro
5569 parameter and structure member.
5570
55712013-12-20 Werner Lemberg <wl@gnu.org>
5572
Werner Lemberg974b1932013-12-20 17:26:26 +01005573 [autofit] Introduce `styles'.
5574
5575 This is the new top-level structure for handling glyph input data;
5576 scripts are now defined separately.
5577
5578 * src/autofit/aftypes.h (SCRIPT): Updated.
5579 (AF_ScriptClassRec): Move `blue_stringset' and `writing_system'
5580 members to ...
5581 (AF_Style_ClassRec): ... this new structure.
5582 (AF_Style): New enumeration.
5583 (AF_StyleMetricsRec): Replace `script' enumeration with
5584 `style_class' pointer.
5585 (AF_DEFINE_SCRIPT_CLASS, AF_DECLARE_SCRIPT_CLASS): Updated.
5586 (AF_DEFINE_STYLE_CLASS, AF_DECLARE_STYLE_CLASS): New macros.
5587
5588 * src/autofit/afstyles.h: New file, using data from `afscript.h'.
5589 * src/autofit/afscript.h: Updated.
5590
5591 * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
5592 af_cjk_metrics_init_blues, af_cjk_hint_edges): Updated.
5593
5594 * src/autofit/afglobal.c (SCRIPT): Updated.
5595 (STYLE): Redefine macro to load `afstyles.h'.
5596 (af_script_names) [FT_DEBUG_LEVEL_TRACE]: Replace with...
5597 (af_style_names): ... this array.
5598 (af_face_globals_compute_script_coverage): Renamed to...
5599 (af_face_globals_compute_style_coverage): ... this.
5600 Updated.
5601 (af_face_globals_new, af_face_globals_free,
5602 af_face_globals_get_metrics): Updated.
5603
5604 * src/autofit/afglobal.h (SCRIPT): Updated.
5605 (STYLE): Redefine macro to load `afstyles.h'.
5606 (AF_SCRIPT_FALLBACK): Update definition. This will get more
5607 refinements with later on.
5608 (AF_SCRIPT_UNASSIGNED): Replace with...
5609 (AF_STYLE_UNASSIGNED): ... this macro.
5610 (AF_FaceGlobalsRec): Updated.
5611
5612 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
5613 af_latin_metrics_init_blues, af_latin_metrics_scale_dim,
5614 af_latin_hint_edges): Updated.
5615
5616 * src/autofit/aflatin2.c (af_latin2_metrics_init_widths): Updated.
5617 (af_ltn2_uniranges): Removed.
5618
5619 * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph):
5620 Updated.
5621
5622 * src/autofit/afpic.c (autofit_module_class_pic_init): Updated.
5623 * src/autofit/afpic.h (AF_STYLE_CLASSES_GET): New macro.
5624 (AFModulePIC): Add `af_style_classes' and `af_style_classes_rec'
5625 members.
5626
5627 * src/autofit/afranges.h: Updated.
5628
5629 * src/autofit/rules.mk (AUTOF_DRV_H): Add `afstyles.h'.
5630
Werner Lembergd8324572013-12-19 15:45:24 +010056312013-12-19 Werner Lemberg <wl@gnu.org>
5632
5633 [autofit] Factor scripts and uniranges out of writing system files.
5634
5635 * src/autofit/afranges.c, src/autofit/afranges.h: New files.
5636
5637 * src/autofit/afscript.h: Extend `SCRIPT' macro with more
5638 parameters, taking data from the writing system files.
5639
5640 * src/autofit/aftypes.h: Updated.
5641
5642 * src/autofit/afglobal.c: Include `afranges.h'.
5643 Load `afscript.h' to call AF_DEFINE_SCRIPT_CLASS.
5644 * src/autofit/afglobal.c: Include `afranges.h'.
5645 Load `afscript.h' to call AF_DECLARE_SCRIPT_CLASS.
5646
5647 * src/autofit/afcjk.c, src/autofit/afcjk.h: Updated.
5648 * src/autofit/afdummy.c, src/autofit/afdummy.h: Updated.
5649 * src/autofit/afindic.c, src/autofit/afindic.h: Updated.
5650 * src/autofit/aflatin.c, src/autofit/aflatin.h: Updated.
5651 * src/autofit/aflatn2.c, src/autofit/aflatn2.h: Updated.
5652
5653 * src/autofit/afpic.c: Updated.
5654
5655 * src/autofir/autofit.c: Include `afranges.c'.
5656 * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `afranges.c'.
5657
Werner Lemberg9a354552013-12-18 10:36:06 +010056582013-12-18 Werner Lemberg <wl@gnu.org>
5659
Werner Lemberg73f31982013-12-19 15:24:17 +01005660 [autofit] More code orthogonality.
5661
5662 * src/autofit/aftypes.h (AF_StyleMetrics): Replace `script_class'
5663 pointer to an `AF_ScriptClass' structure with `script' index of type
5664 `AF_Script'.
5665 Move some code around.
5666
5667 * src/autofit/afcjk.c: Include `afpic.h'.
5668 (af_cjk_metrics_init_widths, af_cjk_metrics_init_blues,
5669 af_cjk_hint_edges): Updated.
5670
5671 * src/autofit/aflatin.c: Include `afpic.h'.
5672 (af_latin_metrics_init_widths, af_latin_metrics_init_blues,
5673 af_latin_metrics_scale_dim, af_latin_hint_edges): Updated.
5674
5675 * src/autofit/afglobal.c (af_face_globals_get_metrics): Updated.
5676
5677 * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph):
5678 Updated.
5679
56802013-12-18 Werner Lemberg <wl@gnu.org>
5681
Werner Lemberg3f91cb32013-12-18 12:59:35 +01005682 [autofit] s/ScriptMetrics/StyleMetrics/.
5683
56842013-12-18 Werner Lemberg <wl@gnu.org>
5685
Werner Lemberg4fccc212013-12-18 12:53:01 +01005686 [autofit] s/script_{metrics,hints}/style_{metrics,hints}/
5687
56882013-12-18 Werner Lemberg <wl@gnu.org>
5689
Werner Lembergf4df4072013-12-18 10:39:30 +01005690 [autofit] s/gscripts/gstyles/.
5691
56922013-12-18 Werner Lemberg <wl@gnu.org>
5693
Werner Lemberg9a354552013-12-18 10:36:06 +01005694 [autofit] s/glyph_scripts/glyph_styles/.
5695
5696 This is the first commit of a series to create a new top-level
5697 structure (a `style') for handling scripts, writing_systems, and
5698 soon-to-be-added coverages.
5699
Werner Lemberg7a5fc2f2013-12-17 13:29:53 +010057002013-12-17 Werner Lemberg <wl@gnu.org>
5701
5702 [autofit] s/AF_Script_/AF_WritingSystem_/ where appropriate.
5703
Infinality8bb09b02013-12-11 09:01:13 +010057042013-12-11 Infinality <infinality@infinality.net>
5705
5706 [truetype] Simplify logic of rendering modes.
5707
5708 This patch unifies the subpixel and non-subpixel cases.
5709
5710 * src/truetype/ttinterp.h (TT_ExecContextRec): Remove
5711 `grayscale_hinting'; all code should refer to `grayscale' instead.
5712 Remove unused `native_hinting' member.
5713 Rename `subpixel_hinting' member to `subpixel.
5714
5715 * src/truetype/ttgload.c (TT_LOADER_SET_PP): Updated.
5716 (tt_loader_init): Updated.
5717
5718 * src/truetype/ttinterp.c (Ins_GETINFO): Simplify.
5719 Updated.
5720
Werner Lemberge9d95aa2013-12-11 07:48:51 +010057212013-12-11 Werner Lemberg <wl@gnu.org>
5722
5723 [documentation] Add section how to include FreeType header files.
5724 Problem reported by David Kastrup <dak@gnu.org>.
5725
5726 Surprisingly, a description how to do that was completely missing in
5727 the API reference.
5728
5729 * include/freetype.h, include/ftchapters.h: New documentation
5730 section `header_inclusion'.
5731
Werner Lemberg05c786d2013-12-10 08:38:57 +010057322013-12-10 Werner Lemberg <wl@gnu.org>
5733
Werner Lemberg91932592013-12-10 13:24:07 +01005734 [autofit] s/DFLT/NONE/, s/dflt/none/.
5735
57362013-12-10 Werner Lemberg <wl@gnu.org>
5737
Werner Lemberg45244f82013-12-10 13:18:11 +01005738 [autofit] s/AF_SCRIPT_NONE/AF_SCRIPT_UNASSIGNED/.
5739
57402013-12-10 Werner Lemberg <wl@gnu.org>
5741
Werner Lemberg69d1a362013-12-10 10:12:27 +01005742 [truetype] Fix scaling of vertical phantom points.
5743
5744 * src/truetype/ttgload.c (load_truetype_glyph): Scale pp3.x and
5745 pp4.x also.
5746
57472013-12-10 Werner Lemberg <wl@gnu.org>
5748
Werner Lemberg05c786d2013-12-10 08:38:57 +01005749 [truetype] Fix positioning of composite glyphs.
5750 Problem reported by Nigel Tao <nigeltao@golang.org>.
5751
5752 * src/truetype/ttgload.c (TT_Hint_Glyph): Remove code that shifts
5753 the glyph (component) by a fractional value computed from the LSB
5754 phantom point. This is wrong, since the horizontal phantom points
5755 get rounded horizontally later on.
5756
Werner Lembergdd8050a2013-12-08 23:14:46 +010057572013-12-08 Werner Lemberg <wl@gnu.org>
5758
5759 * Version 2.5.2 released.
5760 =========================
5761
5762
5763 Tag sources with `VER-2-5-2'.
5764
5765 * docs/VERSION.DLL: Update documentation and bump version number to
5766 2.5.2.
5767
5768 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
5769 builds/windows/vc2005/index.html,
5770 builds/windows/vc2008/freetype.vcproj,
5771 builds/windows/vc2008/index.html,
5772 builds/windows/vc2010/freetype.vcxproj,
5773 builds/windows/vc2010/index.html,
5774 builds/windows/visualc/freetype.dsp,
5775 builds/windows/visualc/freetype.vcproj,
5776 builds/windows/visualc/index.html,
5777 builds/windows/visualce/freetype.dsp,
5778 builds/windows/visualce/freetype.vcproj,
5779 builds/windows/visualce/index.html,
5780 builds/wince/vc2005-ce/freetype.vcproj,
5781 builds/wince/vc2005-ce/index.html,
5782 builds/wince/vc2008-ce/freetype.vcproj,
5783 builds/wince/vc2008-ce/index.html: s/2.5.1/2.5.2/, s/251/252/.
5784
Werner Lembergec8853c2014-03-06 19:13:45 +01005785 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
Werner Lembergdd8050a2013-12-08 23:14:46 +01005786
5787 * builds/unix/configure.raw (version_info): Set to 17:1:11.
Werner Lembergec8853c2014-03-06 19:13:45 +01005788 * CMakeLists.txt (VERSION_PATCH): Set to 2.
Werner Lembergdd8050a2013-12-08 23:14:46 +01005789 * docs/CHANGES: Updated.
5790
Werner Lemberg98d185c2013-12-07 09:26:55 +010057912013-12-07 Werner Lemberg <wl@gnu.org>
5792
5793 [truetype] Next round in phantom point handling.
5794
5795 Greg Hitchcock provided very interesting insights into the
5796 complicated history of the horizontal positions of the TSB and BSB
5797 phantom points.
5798
5799 * src/truetype/ttgload.c (TT_LOADER_SET_PP)
5800 [TT_CONFIG_OPTION_SUBPIXEL_HINTING]: Use `subpixel_hinting' and
5801 `grayscale_hinting' flags as conditionals for the x position of TSB
5802 and BSB.
5803
Werner Lembergfcdb7842013-12-05 15:53:27 +010058042013-12-05 Werner Lemberg <wl@gnu.org>
5805
5806 * builds/freetype.mk (FT_CC): Removed. Unused.
5807
Werner Lemberg64b395c2013-12-04 06:18:56 +010058082013-12-04 Werner Lemberg <wl@gnu.org>
5809
5810 [sfnt] Fix handling of embedded bitmap strikes.
5811
5812 This corrects the commit from 2013-11-21. Problem reported by
5813 Andrey Panov <panov@canopus.iacp.dvo.ru>.
5814
5815 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Fix logic to
5816 detect excessive bytes for bit-aligned bitmaps.
5817
Werner Lembergbdd5e752013-12-03 06:57:02 +010058182013-12-03 Werner Lemberg <wl@gnu.org>
5819
Werner Lembergc2b47532013-12-03 07:01:57 +01005820 [truetype] Remove dead code.
5821
5822 Reported by Nigel Tao <nigeltao@golang.org>.
5823
5824 * include/internal/tttypes.h (TT_LoaderRec): Remove unused
5825 `preserve_pps' field.
5826 * src/truetype/ttgload.c (TT_Hint_Glyph): Updated.
5827
58282013-12-03 Werner Lemberg <wl@gnu.org>
5829
Werner Lembergbdd5e752013-12-03 06:57:02 +01005830 [truetype] Fix phantom point handling.
5831
5832 This is a further improvement to the changes from 2013-11-06.
5833
5834 * src/truetype/ttgload.c (TT_Hint_Glyph): Horizontal phantom points
5835 are rounded horizontally, vertical ones are rounded vertically.
5836 (TT_LOADER_SET_PP): The horizontal position of vertical phantom
5837 points in pre-ClearType mode is zero, as shown in the OpenType
5838 specification.
5839
Werner Lemberg64872a52013-12-02 07:51:17 +010058402013-12-02 Werner Lemberg <wl@gnu.org>
5841
5842 [truetype] Fix change from 2013-11-20.
5843
5844 Problem reported by Akira Kakuto <kakuto@fuk.kindai.ac.jp>.
5845
5846 * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Protect call to
5847 `Update_Max' with both a TT_USE_BYTECODE_INTERPRETER guard and a
5848 `IS_HINTED' clause.
5849 Also remove redundant check using `maxSizeOfInstructions' – in
5850 simple glyphs, the bytecode data comes before the outline data, and
5851 a validity test for this is already present.
5852
Werner Lemberg52166ab2013-11-27 10:10:16 +010058532013-11-27 Werner Lemberg <wl@gnu.org>
5854
5855 [autofit] Fix use of dumping functions in `ftgrid' demo program.
5856
5857 * src/autofit/afhints.c (AF_DUMP) [FT_DEBUG_AUTOFIT]: New macro.
5858 (af_glyph_hints_dump_points, af_glyph_hints_dump_segments,
5859 af_glyph_hints_dump_edges) [FT_DEBUG_AUTOFIT]: Add parameter to
5860 handle output to stdout.
5861 Use AF_DUMP.
5862 (af_glyph_hints_dump_points, af_glyph_hints_dump_segments,
5863 af_glyph_hints_dump_edges) [!FT_DEBUG_AUTOFIT]: Removed.
5864
Werner Lemberg3aee4292013-11-25 00:28:11 +010058652013-11-25 Werner Lemberg <wl@gnu.org>
5866
5867 * Version 2.5.1 released.
5868 =========================
5869
5870
5871 Tag sources with `VER-2-5-1'.
5872
5873 * docs/VERSION.DLL: Update documentation and bump version number to
5874 2.5.1.
5875
5876 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
5877 builds/windows/vc2005/index.html,
5878 builds/windows/vc2008/freetype.vcproj,
5879 builds/windows/vc2008/index.html,
5880 builds/windows/vc2010/freetype.vcxproj,
5881 builds/windows/vc2010/index.html,
5882 builds/windows/visualc/freetype.dsp,
5883 builds/windows/visualc/freetype.vcproj,
5884 builds/windows/visualc/index.html,
5885 builds/windows/visualce/freetype.dsp,
5886 builds/windows/visualce/freetype.vcproj,
5887 builds/windows/visualce/index.html,
5888 builds/wince/vc2005-ce/freetype.vcproj,
5889 builds/wince/vc2005-ce/index.html,
5890 builds/wince/vc2008-ce/freetype.vcproj,
5891 builds/wince/vc2008-ce/index.html: s/2.5.0/2.5.1/, s/250/251/.
5892
5893 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
5894
5895 * builds/unix/configure.raw (version_info): Set to 17:0:11.
Werner Lembergec8853c2014-03-06 19:13:45 +01005896 * CMakeLists.txt (VERSION_PATCH): Set to 1.
Werner Lemberg3aee4292013-11-25 00:28:11 +01005897 * docs/CHANGES, docs/release: Updated.
5898
Werner Lemberg9326caf2013-11-23 23:59:25 +010058992013-11-23 Werner Lemberg <wl@gnu.org>
5900
Werner Lemberg063ee6b2013-11-24 00:19:17 +01005901 [truetype]: Add tricky font names `hkscsiic.ttf' and `iicore.ttf'.
5902
5903 * src/truetype/ttobjs.c (TRICK_NAMES_MAX_CHARACTERS,
5904 TRICK_NAMES_COUNT): Updated.
5905 (trick_names): Add family name for the two fonts.
5906
59072013-11-23 Werner Lemberg <wl@gnu.org>
5908
Werner Lemberg9326caf2013-11-23 23:59:25 +01005909 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Typo.
5910
Werner Lemberg427b1762013-11-21 13:10:56 +010059112013-11-21 Werner Lemberg <wl@gnu.org>
5912
Werner Lemberg9326caf2013-11-23 23:59:25 +01005913 [sfnt] Typo.
Werner Lemberg8af2a1c2013-11-21 13:13:12 +01005914
5915 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
5916
5917 * src/sfnt/sfobjs.c (sfnt_load_face): Return correct `bsize->width'
5918 value if the font lacks an `OS/2' table.
5919
59202013-11-21 Werner Lemberg <wl@gnu.org>
5921
Werner Lemberg64b395c2013-12-04 06:18:56 +01005922 [sfnt] Improve handling of buggy embedded bitmap strikes.
Werner Lemberg427b1762013-11-21 13:10:56 +01005923
5924 We are now able to successfully load `AppleMyoungJo.ttf'.
5925 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
5926
5927 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Don't trust glyph
5928 format.
5929
Werner Lemberg28626862013-11-20 21:06:18 +010059302013-11-20 Werner Lemberg <wl@gnu.org>
5931
5932 [truetype] Don't trust `maxp's `maxSizeOfInstructions'.
5933
5934 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>; see
5935
5936 http://lists.nongnu.org/archive/html/freetype-devel/2013-08/msg00005.html
5937
5938 for details.
5939
5940 * src/base/ftobjs.c (FT_Load_Glyph): Check size of `fpgm' and `prep'
5941 tables also for setting `autohint'.
5942
5943 * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Use code from
5944 `TT_Process_Composite_Glyph' for handling unreliable values of
5945 `maxSizeOfInstructions'.
5946
Werner Lembergbc25de62013-11-16 07:52:20 +010059472013-11-16 Werner Lemberg <wl@gnu.org>
5948
5949 [sfnt] Fix `OS/2' table version 5 support.
5950
5951 We now follow the `official' announcement from Microsoft (on the
5952 OpenType mailing list, which unfortunately hasn't a public archive).
5953
5954 * include/freetype/tttables.h (TT_OS2):
5955 s/usLowerPointSize/usLowerOpticalPointSize/,
5956 s/usUpperPointSize/usUpperOpticalPointSize/.
5957
5958 * src/sfnt/ttload.c (tt_face_load_os2): Update, and set correct
5959 default values.
5960
Werner Lembergfae38202013-11-13 08:55:46 +010059612013-11-13 Werner Lemberg <wl@gnu.org>
5962
Werner Lembergc52b1292013-11-13 10:06:00 +01005963 * builds/unix/ft2unix.h: Remove. No longer necessary.
5964
5965 * builds/unix/install.mk (install): Updated.
5966
59672013-11-13 Werner Lemberg <wl@gnu.org>
5968
Werner Lembergfae38202013-11-13 08:55:46 +01005969 Simplify header file hierarchy.
5970
5971 This large patch changes the header file directory layout from
5972 `include/freetype/...' to `include/...', effectively removing one
5973 level. Since the file `ft2build.h' is also located in `include'
5974 (and it stays there even after installation), all FreeType header
5975 files are now in a single directory.
5976
5977 Applications that use (a) `freetype-config' or FreeType's
5978 `pkg-config' file to get the include directory for the compiler, and
5979 (b) the documented way for header inclusion like
5980
5981 #include <ft2build.h>
5982 #include FT_FREETYPE_H
5983 ...
5984
5985 don't need any change to the source code.
5986
5987 * include/freetype/*: Move up to...
5988 * include/*: ... this directory.
5989
5990 * builds/amiga/include/freetype/*: Move up to...
5991 * builds/amiga/include/*: ... this directory.
5992
5993 */*: Essentially do `s@/freetype/@/@' where appropriate.
5994
5995 * CMakeList.txt: Simplify.
5996 * builds/unix/freetype-config.in, builds/unix/freetype2.in: For
5997 `--cflags', return a single directory.
5998 * builds/unix/install.mk (install): No longer try to remove `cache'
5999 and `internal' subdirectories; instead, remove the `freetype'
6000 subdirectory.
6001
Werner Lembergea5c7812013-11-12 08:55:26 +010060022013-11-12 Werner Lemberg <wl@gnu.org>
6003
6004 [truetype] Fix last `truetype' commit.
6005
6006 * src/truetype/ttgload.c (tt_get_metrics): Preserve stream position.
6007 Return error value.
6008 (load_truetype_glyph): Updated.
6009
Werner Lemberg78333282013-11-10 06:26:52 +010060102013-11-10 Werner Lemberg <wl@gnu.org>
6011
6012 * docs/CMAKE: New dummy file.
6013
Dave Arnolddd213012013-11-08 10:52:51 +010060142013-11-08 Dave Arnold <darnold@adobe.com>
6015
6016 [cff] Fix for hints that touch.
6017
6018 * src/cff/cf2hints.c (cf2_hintmap_insertHint): Fix condition for
6019 finding index value of insertion point.
6020
Werner Lemberg7e4b0fb2013-11-06 07:14:49 +010060212013-11-06 Werner Lemberg <wl@gnu.org>
6022
Werner Lemberg5e225b72013-11-06 08:41:59 +01006023 [truetype] Fix handling of phantom points in composite glyphs.
6024 Problem reported by Nigel Tao <nigeltao@golang.org>.
6025
6026 This is a follow-up commit to the previous one.
6027
6028 * src/truetype/ttgload.c (load_truetype_glyph): Call
6029 `tt_get_metrics' after loading the glyph header.
6030
60312013-11-06 Werner Lemberg <wl@gnu.org>
6032
Werner Lemberg7e4b0fb2013-11-06 07:14:49 +01006033 [truetype] Improve emulation of vertical metrics.
6034
6035 This commit also improves the start values of vertical phantom
6036 points. Kudos to Greg Hitchcock for help.
6037
6038 * src/truetype/ttgload.c (TT_Get_VMetrics): Add parameter to pass
6039 `yMax' value. Replace code with fixed Microsoft definition.
6040 (tt_get_metrics): Updated.
6041 (TT_LOADER_SET_PP): Add explanation how to initialize phantom
6042 points, taken from both the OpenType specification and private
6043 communication with Greg (which will eventually be added to the
6044 standard).
6045 Fix horizontal position of `pp3' and `pp4'.
6046
6047 * src/truetype/ttgload.h: Updated.
6048
6049 * src/truetype/ttdriver.c (tt_get_advances): Updated.
6050
6051 * docs/CHANGES: Updated.
6052
Werner Lembergc6064282013-11-05 13:29:15 +010060532013-11-05 Werner Lemberg <wl@gnu.org>
6054
Werner Lemberg50740532013-11-05 23:19:18 +01006055 * builds/windows/vc2010/freetype.vcxproj: s/v110/v100/.
6056 PlatformToolSet version 110 is for VC2012.
6057
6058 Problem reported (with solution) by Dave Arnold <darnold@adobe.com>.
6059
60602013-11-05 Werner Lemberg <wl@gnu.org>
6061
Werner Lembergc6064282013-11-05 13:29:15 +01006062 [truetype] Correctly reset point tags for glyph components.
6063 Problem reported by Nigel Tao <nigeltao@golang.org>.
6064
6065 * src/truetype/ttgload.c (TT_Process_Composite_Glyph): Fix loop.
6066
Werner Lemberg35b08182013-11-02 08:28:41 +010060672013-11-02 Werner Lemberg <wl@gnu.org>
6068
Werner Lemberg7d449432013-11-02 11:36:37 +01006069 [truetype] Fix GETINFO opcode handling of subpixel hinting bits.
6070
6071 * src/truetype/ttinterp.c (Ins_GETINFO): Don't request bit 6 set to
6072 get info on subpixel hinting.
6073
6074 * docs/CHANGES: Updated.
6075
60762013-11-02 Werner Lemberg <wl@gnu.org>
6077
Werner Lemberg35b08182013-11-02 08:28:41 +01006078 Fix Savannah bug #40451.
6079
6080 Simply apply the patch from the bug report.
6081
6082 * builds/unix/ftconfig.in, builds/vms/ftconfig.h,
6083 include/freetype/config/ftconfig.h: The used #pragma directives only
6084 work with gcc versions 4.6 and higher.
6085
Werner Lembergebf52d62013-11-01 13:26:28 +010060862013-11-01 Werner Lemberg <wl@gnu.org>
6087
Werner Lembergafa0d592013-11-01 22:27:27 +01006088 * docs/CHANGES: Updated.
6089
60902013-11-01 Werner Lemberg <wl@gnu.org>
6091
Werner Lembergebf52d62013-11-01 13:26:28 +01006092 [truetype] Minor code refactoring.
6093
6094 Two benefits: The allocated FDEF (and IDEF) array gets slightly
6095 smaller, and the `ttdebug' demo program has access to function
6096 numbers without additional costs.
6097
6098 Fortunately, no changes to FontForge are necessary – this is the
6099 only external TrueType debugger I know of, but others may exist and
6100 should check the code accordingly.
6101
6102 * src/truetype/ttinterp.h (TT_CallRec): Replace `Cur_Restart' and
6103 `Cur_End' with a pointer to the corresponding `TT_DefRecord'
6104 structure.
6105
6106 * src/truetype/ttinterp.c (DO_JROT, DO_JMPR, DO_JROF, Ins_ENDF,
6107 Ins_CALL, Ins_LOOPCALL, Ins_UNKNOWN, TT_RunIns <Invalid_Opcode>):
6108 Updated.
6109
Werner Lembergee510512013-10-27 07:25:35 +010061102013-10-27 Werner Lemberg <wl@gnu.org>
6111
6112 [sfnt] Implement support for `OS/2' table version 5.
6113
6114 See
6115
6116 http://typedrawers.com/discussion/470/new-microsoft-size-specific-design-selection-mechanism
6117
6118 for the announcement.
6119
6120 * include/freetype/tttables.h (TT_OS2): Add fields
6121 `usLowerPointSize' and `usUpperPointSize'. Since FreeType returns
6122 this structure only as a pointer through `FT_Get_Sfnt_Table', there
6123 shouldn't be any ABI problems.
6124
6125 * src/sfnt/ttload.c (tt_face_load_os2): Implement it.
6126
6127 * docs/CHANGES: Updated.
6128
Werner Lemberg994a8592013-10-24 08:50:34 +020061292013-10-24 Werner Lemberg <wl@gnu.org>
6130
6131 * README.git, docs/CHANGES, docs/INSTALL: Updated.
6132
John Carya0e4a732013-10-24 08:49:08 +020061332013-10-24 John Cary <cary@txcorp.com>
6134
6135 Provide cmake support.
6136
6137 * CMakeLists.txt: New file.
6138
Kenneth Miller4d87ac82013-10-23 20:10:56 +020061392013-10-23 Kenneth Miller <kennethadammiller@yahoo.com>
6140 Werner Lemberg <wl@gnu.org>
6141
6142 Provide support for x64 builds in Visual C++ project files.
6143
6144 * src/builds/win32: Renamed to...
6145 * src/builds/windows: This.
6146
6147 * src/builds/windows/vc2010/*: Updated to handle x64 target.
6148
6149 * src/builds/windows/*.mk, docs/INSTALL.GNU: s/win32/windows/ where
6150 appropriate.
6151
Werner Lemberg604838d2013-10-22 01:10:10 +020061522013-10-22 Werner Lemberg <wl@gnu.org>
6153
6154 * src/base/md5.c, src/base/md5.h: Updated to recent version.
6155
6156 * src/base/ftobjs.c: Updated; `md5.c' no longer uses `free'.
6157
Werner Lembergdb9159c2013-10-22 10:27:50 +02006158 The canonical URL to get updates for this file is
6159
6160 http://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/popa3d/popa3d/md5/
6161
6162 as the author told me in private communication.
6163
Werner Lemberg34efe052013-10-19 21:14:40 +020061642013-10-19 Werner Lemberg <wl@gnu.org>
6165
Werner Lemberg75efc2d2013-10-19 21:46:03 +02006166 [autofit] s/SMALL_TOP/X_HEIGHT/.
6167
6168 * src/autofit/afblue.dat: Updated.
6169
6170 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
6171
6172 * src/autofit/aflatin.c, src/autofit/aflatin.h,
6173 src/autofit/atlatin2.c: Updated.
6174
61752013-10-19 Werner Lemberg <wl@gnu.org>
6176
Werner Lemberg34efe052013-10-19 21:14:40 +02006177 * src/autofit/afblue.dat: s/MINOR/DESCENDER/.
6178
6179 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
6180
Werner Lemberg955f6a82013-10-16 19:47:57 +020061812013-10-16 Werner Lemberg <wl@gnu.org>
6182
Werner Lemberga5f22a92013-10-17 11:08:25 +02006183 [autofit] Add description strings to script entries.
6184
6185 Currently, this is unused.
6186
6187 * src/autofit/afscript.h: Do it.
6188 * src/autofit/afglobal.c, src/autofit/afpic.c,
6189 src/autofit/aftypes.h: Updated.
6190
61912013-10-16 Werner Lemberg <wl@gnu.org>
6192
Werner Lemberg955f6a82013-10-16 19:47:57 +02006193 [autofit] Improve tracing message for extra light flag.
6194
6195 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Do it.
6196
Chongyu Zhu41632b52013-10-15 11:40:34 +020061972013-10-15 Chongyu Zhu <lembacon@gmail.com>
6198
6199 [arm] Fix thumb2 inline assembly under LLVM.
6200
6201 When using `ADD' with an immediate operand, the instruction is
6202 actually `ADD Rd, Rn, #<imm12>', that is, the maximum of the
6203 immediate operand cannot exceed 4095. It will fail to compile with
6204 LLVM.
6205
6206 However, in GCC, due to some legacy compatibility considerations,
6207 `ADD.W' will be automatically emitted when the immediate operand is
6208 larger than 4095.
6209
6210 * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h
6211 (FT_MulFix_arm) [__GNUC__]: Support clang compiler.
6212
6213 * src/truetype/ttinterp.c (TT_MulFix14_arm) [__GNUC__]: Ditto.
6214
Werner Lembergb6695242013-10-12 10:33:04 +020062152013-10-12 Werner Lemberg <wl@gnu.org>
6216
6217 [autofit] Improve tracing of `latin' hinter.
6218
6219 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Report blue
6220 zone types.
6221 (af_latin_metrics_scale_dim): Report scaling changes due to x height
6222 alignment.
6223 Report scaled stroke width and blue zone values.
6224
Dave Arnolde845a852013-10-03 23:04:29 +020062252013-10-03 Dave Arnold <darnold@adobe.com>
6226
6227 * src/cff/cf2font.c (cf2_computeDarkening): Avoid division by zero.
6228
Werner Lemberg2c56f2a2013-10-07 22:01:00 +02006229 Note that the old code avoided using a region of the piecewise
6230 linear function where the slope was zero. The recovery was to use a
6231 different section of the function, which produced a different,
6232 incorrect amount of darkening.
6233
Darrell Bellert01af71d2013-10-02 22:04:07 +020062342013-10-02 Darrell Bellert <darrell.bellert@hl.konicaminolta.us>
6235
6236 * src/sfnt/ttload.c (tt_face_load_pclt): Fix `pclt_fields'.
6237
Dave Arnold0b330452013-10-02 11:04:06 +020062382013-10-02 Dave Arnold <darnold@adobe.com>
6239
6240 * src/cff/cf2font.c (cf2_computeDarkening): Initialize darkenAmount.
6241
6242 This line was lost in commit 89ca1fd6 (from 2013-06-25). The effect
6243 is to use a previous darkening amount when producing an unhinted,
6244 unscaled outline. This can cause autohint samples in ftgrid and
6245 ftview to be based on darkened CFF outlines instead of unhinted,
6246 undarkened ones.
6247
Dave Arnold3a2cb0f2013-09-29 16:17:02 +020062482013-09-29 Dave Arnold <darnold@adobe.com>
6249
6250 Fix Savannah bug #39295.
6251
6252 The bug was caused by switching to the initial hintmap (the one in
6253 effect when `moveto' executes) just before drawing the final element
6254 in the charstring. This ensured that the path was closed (in both
6255 Character Space and Device Space). But if the final element was a
6256 curve and if the final hintmap was different enough from the initial
6257 one, then the curve was visibly distorted.
6258
6259 The first part of the fix is to draw the final curve using the final
6260 hintmap as specified by the charstring. This corrects the
6261 distortion but does not ensure closing in Device Space. It may
6262 require the rasterizer to automatically generate an extra closing
6263 line. Depending on the hintmap differences, this line could be from
6264 zero to a couple pixels in length.
6265
6266 The second part of the fix covers the case where the charstring
6267 subpath is closed with an explicit line. We now modify that line's
6268 end point to avoid the distortion.
6269
6270 Some glyphs in the bug report font (TexGyreHeros-Regular) that show
6271 the change are:
6272
6273 25ppem S (98)
6274 24ppem eight (52)
6275 25.5ppem p (85)
6276
6277 Curves at the *end* of a subpath are no longer distorted. However,
6278 some of these glyphs have bad hint substitutions in the middle of a
6279 subpath, and these are not affected.
6280
6281 The patch has been tested with a set of 106 fonts that shipped with
6282 Adobe Creative Suite 4, together with 756 Open Source CFF fonts from
6283 Google Fonts. There are 1.5 million glyphs, of which some 20k are
6284 changed with the fix. A sampling of a few hundred of these changes
6285 have been examined more closely, and the changes look good (or at
6286 least acceptable).
6287
6288 * src/cff/cf2hints.h (CF2_GlyphPathRec): New element `pathIsClosing'
6289 to indicate that we synthesize a closepath line.
6290
6291 * src/cff/cf2hints.c (cf2_glyphpath_init): Updated.
6292 (cf2_glyphpath_pushPrevElem): If closing, use first hint map (for
6293 `lineto' operator) and adjust hint zone.
6294 For synthesized closing lines, use end point in first hint zone.
6295 (cf2_glyphpath_lineTo): Take care of synthesized closing lines. In
6296 particular, shift the detection of zero-length lines from character
6297 space to device space.
6298 (cf2_glyphpath_closeOpenPath): Remove assertion.
6299 Updated.
6300
Werner Lembergb75a8b82013-09-25 09:46:36 +020063012013-09-25 Werner Lemberg <wl@gnu.org>
6302
6303 * src/autofit/aflatin.c (af_{grek,cyrl}_uniranges): Fix arrays.
6304
suzuki toshiyaac0f4452013-09-25 10:57:17 +090063052013-09-25 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6306
6307 [bdf, pcf] Refuse non-zero face_index.
Werner Lemberg964317e2013-09-25 09:22:40 +02006308
suzuki toshiyaac0f4452013-09-25 10:57:17 +09006309 Suggested by Akira Tagoh, see
6310
6311 http://lists.gnu.org/archive/html/freetype/2013-09/msg00030.html
6312
Werner Lemberg964317e2013-09-25 09:22:40 +02006313 * src/bdf/bdfdrivr.c (BDF_Face_Init): Return `Invalid_Argument'
6314 error if the font could be opened but non-zero `face_index' is
6315 given.
suzuki toshiyaac0f4452013-09-25 10:57:17 +09006316 * src/pcf/pcfdrivr.c (PCF_Face_Init): Ditto.
6317
6318 * src/type42/t42objs.c (T42_Face_Init): Remove unrequired FT_UNUSED
Werner Lemberg964317e2013-09-25 09:22:40 +02006319 macro for `face_index' because it is validated later.
suzuki toshiyaac0f4452013-09-25 10:57:17 +09006320
Werner Lemberg4de77872013-09-23 22:10:08 +020063212013-09-23 Werner Lemberg <wl@gnu.org>
6322
6323 Fix Savannah bug #40090.
6324
6325 * src/autofit/afcjk.c (af_cjk_metrics_scale): Revert commit
6326 306f8c5d (from 2013-08-25) affecting this function.
6327
Werner Lemberg5a4c5a52013-09-22 22:37:26 +020063282013-09-22 Werner Lemberg <wl@gnu.org>
6329
6330 [autofit] Disunify Cyrillic and Greek handling from Latin.
6331
6332 * src/autofit/afscript.h: Add Cyrillic and Greek.
6333
6334 * src/autofit/afblue.dat (AF_BLUE_STRINGSET_GREK,
6335 AF_BLUE_STRINGSET_CYRL): Add blue zones for Greek and Cyrillic.
6336 (AF_BLUE_STRINGSET_LATN): Fix typo.
6337 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
6338
6339 * src/autofit/aflatin.c (af_grek_uniranges, af_cyrl_uniranges): New
6340 arrays.
6341 (af_grek_script_class, af_cyrl_script_class): New scripts.
6342 * src/autofit/aflatin.h: Updated.
6343
Werner Lemberg2cca9662013-09-20 07:23:34 +020063442013-09-20 Werner Lemberg <wl@gnu.org>
6345
6346 * docs/CHANGES: Updated.
6347
Behdad Esfahbod31e726d2013-09-20 07:20:53 +020063482013-09-20 Behdad Esfahbod <behdad@behdad.org>
6349
6350 Fix vertical size of emboldened glyphs.
6351
6352 Cf. https://bugzilla.gnome.org/show_bug.cgi?id=686709
6353
6354 * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Adjust `horiBearingY'
6355 also.
6356
Alexei Podtelezhnikov52381c12013-09-11 23:25:56 -040063572013-09-11 Alexei Podtelezhnikov <apodtele@gmail.com>
6358
6359 * include/freetype/ftoutln.h: Correct FT_Outline_Get_Orientation
6360 algorithm description.
6361
Werner Lemberg3f542492013-09-11 23:08:31 +020063622013-09-11 Werner Lemberg <wl@gnu.org>
6363
6364 [autofit] Improve Hebrew rendering.
6365
6366 This change introduces a new blue zone property
6367 `AF_BLUE_PROPERTY_LATIN_LONG' to make the auto-hinter ignore short
6368 top segments.
6369
6370 * src/autofit/afblue.dat: Fix Hebrew blue strings.
6371 Use AF_BLUE_PROPERTY_LATIN_LONG for AF_BLUE_STRING_HEBREW_TOP.
6372
6373 * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_LONG): New macro.
6374
6375 * src/autofit/afblue.c, src/autofit/afblue.h: Updated.
6376
6377 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Handle
6378 `AF_LATIN_IS_LONG_BLUE'.
6379
6380 * src/autofit/aflatin.h (AF_LATIN_IS_LONG_BLUE): New macro.
6381
Werner Lemberg85a7fdf2013-08-29 21:03:05 +020063822013-08-28 Behdad Esfahbod <behdad@google.com>
6383
6384 [sfnt] Fix frame access while reading WOFF table directory.
6385
6386 * src/sfnt/sfobjs.c (woff_open_font): Using single memory frame
6387 while reading the directory entries for the whole loop.
6388
63892013-08-29 Werner Lemberg <wl@gnu.org>
Werner Lembergd689d1c2013-08-29 17:53:40 +02006390 Behdad Esfahbod <behdad@google.com>
6391
6392 Implement support for WOFF containers.
6393
6394 We simply synthesize a SFNT from the WOFF, create a memory stream
6395 for the new data, and load the SFNT as usual.
6396
6397 Does NOT add any API to access WOFF metadata or private blocks.
6398
6399 * include/freetype/internal/tttypes.h (WOFF_HeaderRec,
6400 WOFF_TableRec): New structures.
6401
6402 * include/freetype/tttags.h (TTAG_wOFF): New macro.
6403
6404 * src/base/ftobjs.c (FT_Open_Face): Set `stream' after calling
6405 `open_face'.
6406
6407 * src/sfnt/sfobjs.c [FT_CONFIG_OPTION_SYSTEM_ZLIB]: Include
6408 `FT_GZIP_H'.
6409 (WRITE_BYTE, WRITE_USHORT, WRITE_ULONG): New temporary macros for
6410 writing to a stream.
6411 (sfnt_stream_close, compare_offsets, woff_open_font): New functions.
6412 (sfnt_open_font): Handle `TTAG_wOFF'.
6413 (sfnt_init_face): Set `stream' after calling `sfnt_open_font'.
6414
6415 * src/truetype/ttobjs.c (tt_face_init): Set `stream' after calling
6416 `sfnt->init_face'.
6417
6418 * src/base/ftobjs.c (open_face): Use a pointer to FT_Stream as an
6419 argument so that a changed stream survives.
6420 Update callers.
6421
64222013-08-28 Werner Lemberg <wl@gnu.org>
Werner Lemberge0f39ae2013-08-28 17:34:01 +02006423
Werner Lembergdc240522013-08-29 17:53:24 +02006424 [gzip] New function `FT_Gzip_Uncompress'.
6425
6426 This is modeled after zlib's `uncompress' function. We need this
6427 for WOFF support.
6428
6429 * include/freetype/ftgzip.h, src/gzip/ftgzip.c (FT_Gzip_Uncompress):
6430 New function.
6431
6432 * src/gzip/rules.mk: Rewrite to better reflect dependencies.
6433
64342013-08-28 Werner Lemberg <wl@gnu.org>
6435
Werner Lemberg5195ecd2013-08-28 17:41:21 +02006436 [autofit] Fix `make multi' compilation.
6437
6438 * src/autofit/afblue.cin, src/autofit/afblue.c: Don't include
6439 `afblue.h' but `aftypes.h'.
6440 * src/autofit/afcjk.c: Don't include `aftypes.h' but `afglobal.h'.
6441
64422013-08-28 Werner Lemberg <wl@gnu.org>
6443
Werner Lemberge0f39ae2013-08-28 17:34:01 +02006444 [autofit] Fix C++ compilation.
6445
6446 * src/autofit/afglobal.c (af_face_globals_get_metrics),
6447 src/autofit/afdummy.c (af_dflt_script_class), src/autofit/afindic.c
6448 (af_deva_script_class): Use proper casts.
6449
Behdad Esfahbodbd3849e2013-08-27 21:43:38 +020064502013-08-27 Behdad Esfahbod <behdad@google.com>
6451
Behdad Esfahbodc799dd62013-08-27 21:46:03 +02006452 * src/sfnt/ttload.c (tt_face_load_font_dir): Fix sign typos.
6453
64542013-08-27 Behdad Esfahbod <behdad@google.com>
6455
Behdad Esfahbodbd3849e2013-08-27 21:43:38 +02006456 FT_Open_Face: Improve external stream handling.
6457
6458 If the font's `clazz->init_face' function wants to swap to new
6459 stream, handling of whether original stream was external could
6460 result to either memory leak or double free. Mark externality into
6461 face flags before calling `init_face' such that the clazz can handle
6462 external streams properly.
6463
6464 * src/base/ftobjs.c (FT_Open_Face): Move code to set
6465 FT_FACE_FLAG_EXTERNAL_STREAM to...
6466 (open_face): This function.
6467
Werner Lemberg5e53db22013-08-27 18:37:39 +020064682013-08-27 Werner Lemberg <wl@gnu.org>
6469
Werner Lembergbcd8c0b2013-08-27 21:36:03 +02006470 Remove `FT_SqrtFixed' function.
6471
6472 It's no longer used.
6473
6474 * include/freetype/internal/ftcalc.h, src/base/ftcalc.c: Do it.
6475
64762013-08-27 Werner Lemberg <wl@gnu.org>
6477
Werner Lemberg5e53db22013-08-27 18:37:39 +02006478 [autofit] While tracing, report script names instead of ID values.
6479
6480 * src/autofit/afglobal.c (af_script_names) [FT_DEBUG_LEVEL_TRACE]:
6481 New array.
6482 * src/autofit/afglobal.h: Updated.
6483
6484 * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
6485 af_cjk_hint_edges): Use `af_script_names'.
6486 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
6487 af_latin_hint_edges): Ditto.
6488
Werner Lemberg92f5a042013-08-26 09:22:27 +020064892013-08-26 Werner Lemberg <wl@gnu.org>
6490
Werner Lemberg278f64b2013-08-26 20:20:03 +02006491 [autofit] Report used script while hinting a glyph.
6492
6493 * src/autofit/afcjk.c (af_cjk_hint_edges), src/autofit/aflatin.c
6494 (af_latin_hint_edges): Implement it.
6495
64962013-08-26 Werner Lemberg <wl@gnu.org>
6497
Werner Lemberg371f5c32013-08-26 20:11:24 +02006498 [autofit] Add support for Hebrew script.
6499
6500 * src/autofit/afblue.dat: Add blue strings for Hebrew.
6501 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
6502
6503 * src/autofit/aflatin.c (af_hebr_uniranges): New array.
6504 (af_hebr_script_class): New script.
6505 * src/autofit/aflatin.h, src/autofit/afscript.h: Updated.
6506
65072013-08-26 Werner Lemberg <wl@gnu.org>
6508
Werner Lemberg098121d2013-08-26 18:54:05 +02006509 [autofit] Improve tracing messages.
6510
6511 * src/autofit/afcjk.c (af_cjk_metrics_init_widths): Mention script
6512 ID in tracing message.
6513 (af_cjk_metrics_init_blues): Initialize `axis' outside of the inner
6514 loop.
6515 Improve tracing messages.
6516 (af_cjk_hint_edges) [FT_DEBUG_LEVEL_TRACE]: New variable
6517 `num_actions' to count hinting actions.
6518 Improve tracing messages.
6519
6520 * src/autofit/aflatin.c (af_latin_metrics_init_widths): Mention
6521 script ID in tracing message.
6522 (af_latin_metrics_init_blues, af_latin_hint_edges): Improve tracing
6523 messages.
6524
65252013-08-26 Werner Lemberg <wl@gnu.org>
6526
Werner Lembergffee64a2013-08-26 12:55:48 +02006527 Better tracing of loaded glyphs.
6528
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02006529 Previously, the loading of a glyph was traced at level 4, if at all.
Werner Lembergffee64a2013-08-26 12:55:48 +02006530 With this change, all font loading routines emit a tracing message
6531 at level 1, making it easier to select tracing output (for example
6532 using F2_DEBUG="any:1 afhints:7 aflatin:7").
6533
6534 * src/bdf/bdfdrivr.c (BDF_Glyph_Load): Add tracing message.
6535 * src/cff/cffdrivr.c (cff_glyph_load): Ditto.
6536 * src/cff/cffgload.c (cff_decoder_prepare): Improve tracing
6537 messages.
6538 * src/cid/cidgload.c (cid_load_glyph): Use level 1 for tracing
6539 message.
6540 * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Ditto.
6541 * src/pfr/pfrobjs.c (pfr_slot_load): Add tracing message.
6542 * src/truetype/ttgload.c (TT_Load_Glyph): Ditto.
6543 * src/type1/t1gload.c (T1_Load_Glyph): Ditto.
6544 * src/type42/t42objs.c (T42_GlyphSlot_Load): Ditto.
6545 * src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto.
6546
65472013-08-26 Werner Lemberg <wl@gnu.org>
6548
Werner Lemberg33655a92013-08-26 09:58:50 +02006549 [autofit] Fix script selection.
6550
6551 * src/autofit/afglobal.c (af_face_globals_get_metrics): Use
6552 `AF_SCRIPT_DFLT', not value 0.
6553 Simplify code.
6554
6555 * src/autofit/afscript.h: Sort by script name.
6556
65572013-08-26 Werner Lemberg <wl@gnu.org>
6558
Werner Lemberg92f5a042013-08-26 09:22:27 +02006559 [autofit] Make `dummy' hinter work as expected.
6560
6561 * src/autofit/afdummy.c (af_dummy_hints_init): Properly set scaling
6562 information.
6563 (af_dummy_hints_apply): Scale the glyphs.
6564
Werner Lemberg8b8be782013-08-25 08:01:41 +020065652013-08-25 Werner Lemberg <wl@gnu.org>
6566
Werner Lembergc1eb4452013-08-25 19:47:26 +02006567 [autofit] Make `cjk' module use blue stringsets.
6568
6569 * src/autofit/afcjk.c (AF_CJK_MAX_TEST_CHARACTERS): Removed.
6570 (af_cjk_hani_blue_chars): Removed.
6571 (AF_CJK_BLUE_TYPE_*): Removed.
6572 (af_cjk_metrics_init_blues): Replace AF_CJK_MAX_TEST_CHARACTERS with
6573 AF_BLUE_STRING_MAX_LEN.
6574 Change loops to use offsets (in file `afblue.h') into the new arrays
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02006575 `af_blue_stringsets' and `af_blue_strings' (in file `afblue.c').
Werner Lembergc1eb4452013-08-25 19:47:26 +02006576 Instead of three dimensions (as used in the old blue string array)
6577 we now use properties to do the same, saving one loop nesting level.
6578
6579 * src/autofit/afcjk.h: Remove old enumeration values superseded by
6580 the new data in `afblue.h'.
6581 (AF_CJK_IS_TOP_BLUE, AF_CJK_IS_HORIZ_BLUE, AF_CJK_IS_FILLED_BLUE,
6582 AF_CJK_IS_RIGHT_BLUE): New macros, to be used in
6583 `af_cjk_metrics_init_blues'.
6584 (AF_CJK_BLUE_IS_RIGHT): Remove this now redundant enum value.
6585 (AF_CJK_BLUE_IS_TOP): Renamed to...
6586 (AF_CJK_BLUE_TOP): This.
6587 (AF_CJK_MAX_BLUES): Remove.
6588 (AF_CJKAxisRec): Updated.
6589
65902013-08-25 Werner Lemberg <wl@gnu.org>
6591
Werner Lemberg5c4a23a2013-08-25 19:29:07 +02006592 [autofit] Typo.
6593
6594 * src/autofit/afblue.hin, src/autofit/afblue.c (GET_UTF8_CHAR): Use
6595 cast.
6596
65972013-08-25 Werner Lemberg <wl@gnu.org>
6598
Werner Lemberg306f8c52013-08-25 13:07:08 +02006599 [autofit] Synchronize `cjk' with `latin' module (and vice versa).
6600
6601 * src/autofit/afcjk.c (af_cjk_metrics_init_widths): Add tracing
6602 messages.
6603 (af_cjk_metrics_init_blues): Don't pass blue string array as
6604 argument but use the global array directly.
6605 Use `outline' directly.
6606 Update and add tracing messages.
6607 (af_cjk_metrics_init): Simplify code.
6608 (af_cjk_metrics_scale_dim): Improve tracing message.
6609 (af_cjk_metrics_scale): Synchronize.
6610
6611 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
6612 af_latin_metrics_init_blues): Improve and add tracing messages.
6613
66142013-08-25 Werner Lemberg <wl@gnu.org>
6615
Werner Lemberg0975d682013-08-25 08:37:47 +02006616 [autofit] Make `latin' module use blue stringsets.
6617
6618 * src/autofit/aflatin.c (AF_LATIN_MAX_TEST_CHARACTERS): Removed.
6619 (af_latin_blue_chars): Removed.
6620 (af_latin_metrics_init_blues): Replace AF_LATIN_MAX_TEST_CHARACTERS
6621 with AF_BLUE_STRING_MAX_LEN.
6622 Change loops to use offsets (in file `afblue.h') into the new arrays
6623 `af_blue_stringsets' and `af_blue_strings' (in file `afblue.c').
6624 Use `AF_LATIN_IS_SMALL_TOP_BLUE' macro.
6625
6626 * src/autofit/aflatin.h: Remove old enumeration values superseded by
6627 the new data in `afblue.h'.
6628 (AF_LATIN_IS_TOP_BLUE): Updated definition.
6629 (AF_LATIN_IS_SMALL_TOP_BLUE): New macro.
6630 (AF_LATIN_MAX_BLUES): Remove.
6631 (AF_LatinAxisRec): Updated.
6632
66332013-08-25 Werner Lemberg <wl@gnu.org>
6634
Werner Lembergdb3e5b92013-08-25 08:23:22 +02006635 [autofit] Add blue stringsets.
6636
6637 * src/autofit/aftypes.h: Include `afblue.h'.
6638 (AF_ScriptClassRec): Add `blue_stringset' field.
6639 (AF_DEFINE_SCRIPT_CLASS): Updated.
6640
6641 * src/autofit/autofit.c: Include `afblue.c'.
6642
6643 * src/autofit/afcjk.c (af_hani_script_class), src/autofit/afdummy.c
6644 (af_dflt_script_class), src/autofit/afindic.c
6645 (af_deva_script_class), src/autofit/aflatin.c
6646 (af_latn_script_class), src/autofit/aflatin2.c
6647 (af_ltn2_script_class): Updated.
6648
6649 * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `afblue.c'.
6650
66512013-08-25 Werner Lemberg <wl@gnu.org>
6652
Werner Lemberg8b8be782013-08-25 08:01:41 +02006653 [autofit] Introduce data file for blue strings.
6654
6655 The idea is to have a central file which gets processed by a Perl
6656 script to create proper `.c' and `.h' files using templates. There
6657 are two other reasons to do that:
6658
6659 . The data file should be easily readable. We use UTF-8 encoding
6660 which then gets converted to single bytes.
6661
6662 . Since the number of supported scripts will increase soon, the
6663 current usage of blue string arrays is a waste of space. Using
6664 the Perl script it is possible to imitate jagged arrays,
6665 defining enumeration constants as offsets into the arrays.
6666
6667 This commit only adds files without changing any functionality.
6668
6669 * src/autofit/afblue.dat: New data file.
6670 * src/tools/afblue.pl: New Perl script for processing `afblue.dat'.
6671
6672 * src/autofit/afblue.cin, src/autofit/afblue.hin: New template files
6673 for...
6674 * src/autofit/afblue.c, src/autofit/afblue.c: New source files.
6675 To avoid a dependency on Perl, we add them too.
6676
Alexei Podtelezhnikovfc32e1c2013-08-19 22:57:05 -040066772013-08-19 Alexei Podtelezhnikov <apodtele@gmail.com>
6678
Werner Lemberg71c0ad62013-08-27 21:30:09 +02006679 [base] Enable new algorithm for `BBox_Cubic_Check'.
Alexei Podtelezhnikovfc32e1c2013-08-19 22:57:05 -04006680
Werner Lemberg71c0ad62013-08-27 21:30:09 +02006681 * src/base/ftbbox.c: Enable new BBox_Cubic_Check algorithm, remove
6682 the old one.
6683 Improve comments.
Alexei Podtelezhnikovfc32e1c2013-08-19 22:57:05 -04006684
Werner Lemberg6bfa2632013-08-18 18:34:05 +020066852013-08-18 Werner Lemberg <wl@gnu.org>
6686
Werner Lemberg4af44442013-08-18 18:46:30 +02006687 * builds/unix/unix-def.in (freetype2.pc): Don't set executable bit.
6688
66892013-08-18 Werner Lemberg <wl@gnu.org>
6690
Werner Lemberg6bfa2632013-08-18 18:34:05 +02006691 Fix Savannah bug #39804.
6692
6693 * builds/unix/configure.raw (LIBPNG): Define and export.
6694 * builds/unix/freetype-config.in, builds/unix/freetype2.in: Handle
6695 libpng.
6696
Alexei Podtelezhnikov32a7d872013-08-17 22:19:21 -040066972013-08-17 Alexei Podtelezhnikov <apodtele@gmail.com>
6698
6699 [base] Clean up BBox_Conic_Check.
6700
6701 * src/base/ftbbox.c (BBox_Conic_Check): Remove redundant checks for
6702 extremum at the segment ends, which are already within the bbox.
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02006703 Slightly modify calculations.
Alexei Podtelezhnikov32a7d872013-08-17 22:19:21 -04006704
Alexei Podtelezhnikov1a9c3d12013-08-15 22:51:42 -040067052013-08-15 Alexei Podtelezhnikov <apodtele@gmail.com>
6706
6707 [base] Finish experimental (disabled) BBox_Cubic_Check implementation.
6708
6709 * src/base/ftbbox.c (BBox_Cubic_Check): Scale arguments to improve
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02006710 accuracy and avoid overflows.
Alexei Podtelezhnikov1a9c3d12013-08-15 22:51:42 -04006711
Alexei Podtelezhnikov61a65512013-08-13 22:28:57 -040067122013-08-13 Alexei Podtelezhnikov <apodtele@gmail.com>
6713
6714 [base] Refactor experimental (disabled) BBox_Cubic_Check.
6715
6716 * src/base/ftbbox.c (BBox_Cubic_Check): Implement the minimum search
Alexei Podtelezhnikov1a9c3d12013-08-15 22:51:42 -04006717 as the mirror image of the maximum search implemented here...
6718 (update_max): New function.
Alexei Podtelezhnikov61a65512013-08-13 22:28:57 -04006719
John Tytgat9bcfab82013-08-06 08:55:19 +020067202013-08-06 John Tytgat <John.Tytgat@esko.com>
6721
6722 Fix Savannah bug #39702.
6723
6724 * src/cff/cffload.c (cff_index_get_pointers): Check for `cur_offset
6725 != 0'; this stronger test is mandated by the CFF specification.
6726 Fix test for INDEX structures which have one or more empty entries
6727 at the end.
6728
Werner Lembergcc25e3a2013-08-05 08:46:15 +020067292013-08-05 Werner Lemberg <wl@gnu.org>
6730
Werner Lemberga32682f2013-08-06 00:21:46 +02006731 Fix gcc pragmas, part 2.
6732
6733 * src/truetype/ttinterp.c (TT_MulFix14_long_long,
6734 TT_DotFix14_long_long): `#pragma gcc diagnostic {push,pop}' has been
6735 introduced with gcc version 4.6.
6736
67372013-08-05 Werner Lemberg <wl@gnu.org>
6738
Werner Lemberg69e524d2013-08-05 23:38:32 +02006739 Fix gcc pragmas.
6740
6741 * src/truetype/ttinterp.c (TT_MulFix14_long_long,
6742 TT_DotFix14_long_long): Older gcc versions don't accept diagnostic
6743 pragmas within a function body.
6744
67452013-08-05 Werner Lemberg <wl@gnu.org>
6746
Werner Lemberg9e6de362013-08-05 16:37:21 +02006747 Fix Savannah bug #39700.
6748
6749 * builds/unix/ftconfig.h: Synchronize with
6750 `include/freetype/config/ftconfig.h'.
6751
6752 * builds/vms/ftconfig.h: Ditto.
6753 Make the differences to the master `ftconfig.h' file as small as
6754 possible for easier maintainance.
6755
67562013-08-05 Werner Lemberg <wl@gnu.org>
6757
Werner Lembergcc25e3a2013-08-05 08:46:15 +02006758 [autofit] Improve handling of `near' points.
6759
6760 Points which are very near to each other are now marked as such.
6761 The `weak' flag is then computed by using the `in' vector of the
6762 first and the `out' vector of the last point of a group of near
6763 points.
6764
6765 For example, this fixes the rendering of glyph `Oslash' in
6766 `Roboto-Thin.ttf'.
6767
6768 * src/autofit/afhints.h (AF_Flags): New value `AF_FLAGS_NEAR'.
6769
6770 * src/autofit/afhints.c (af_glyph_hints_reload): Introduce
6771 the heuristic value `near_limit' to decide whether the current point
6772 is near to the previous one, then set `AF_FLAG_NEAR' accordingly.
6773 Store good `in' vector (of last non-near point) in
6774 `last_good_in_{x,y}' and use it as an argument to
6775 `ft_corner_is_flat' if necessary.
6776
Werner Lemberg74a9b672013-08-02 14:53:32 +020067772013-08-02 Werner Lemberg <wl@gnu.org>
6778
Werner Lemberg0d28a7d2013-08-02 22:59:43 +02006779 * include/freetype/ftcffdrv.h: Improve documentation.
6780 This is based on blog entries from David Lemon and Dave Arnold (both
6781 from Adobe) with kind permission. Dave also helped in
6782 proof-reading.
6783
67842013-08-02 Werner Lemberg <wl@gnu.org>
6785
Werner Lemberg456cc442013-08-02 20:25:21 +02006786 [autofit] Move declaration of scripts into separate file.
6787
6788 This has the benefit that we don't need to duplicate the data at
6789 different places.
6790
6791 * src/autofit/afscript.h: New file.
6792
6793 * src/autofit/aftypes.h (AF_Script): Include `afscript.h' to define
6794 the enumeration values.
6795
6796 * src/autofit/afglobal.c: Include `afscript.h' to get the script
6797 specific header files.
6798 (af_script_classes): Include `afscript.h' to fill this array.
6799
6800 * src/autofit/afpic.c: Include `afscript.h' to get the script
6801 specific header files.
6802 (autofit_module_class_pic_init): Include `afscript.h' for
6803 initialization.
6804 * src/autofit/afpic.h (AF_SCRIPT_CLASSES_COUNT,
6805 AF_SCRIPT_CLASSES_REC_COUNT): Removed. Use `AF_SCRIPT_MAX' instead.
6806
6807 * src/autofit/rules.mk (AUTOF_DRV_H): Updated.
6808
68092013-08-02 Werner Lemberg <wl@gnu.org>
6810
Werner Lemberg773601d2013-08-02 19:51:17 +02006811 [autofit] Move declaration of writing systems into separate file.
6812
6813 This has the benefit that we don't need to duplicate the data at
6814 different places.
6815
6816 * src/autofit/afwrtsys.h: New file.
6817
6818 * src/autofit/aftypes.h (AF_WritingSystem): Include `afwrtsys.h' to
6819 define the enumeration values.
6820
6821 * src/autofit/afglobal.c: Include `afwrtsys.h' to get the writing
6822 system specific header files.
6823 Include `afpic.h'.
6824 (af_writing_system_classes): Include `afwrtsys.h' to fill this
6825 array.
6826
6827 * src/autofit/afpic.c: Include `afwrtsys.h' to get the writing
6828 system specific header files.
6829 (autofit_module_class_pic_init): Include `afwrtsys.h' for
6830 initialization.
6831 * src/autofit/afpic.h (AF_WRITING_SYSTEM_CLASSES_COUNT,
6832 AF_WRITING_SYSTEM_CLASSES_REC_COUNT): Removed. Use
6833 `AF_WRITING_SYSTEM_MAX' instead.
6834
68352013-08-02 Werner Lemberg <wl@gnu.org>
6836
Werner Lemberg74a9b672013-08-02 14:53:32 +02006837 [sfnt] Fix compilation with g++.
6838
6839 * src/sfnt/pngshim.c (error_callback, read_data_from_FT_stream): Use
6840 cast.
6841 (Load_SBit_Png): Pacify compiler.
6842
Werner Lemberg89a529f2013-08-02 14:50:23 +020068432013-08-02 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6844 Werner Lemberg <wl@gnu.org>
6845
6846 [autofit] Fix `make multi'.
6847
6848 * include/freetype/config/ftconfig.h (FT_LOCAL_ARRAY,
6849 FT_LOCAL_ARRAY_DEF): New macros.
6850
6851 * src/autofit/afglobal.c (af_writing_system_classes,
6852 af_script_classes): Use FT_LOCAL_ARRAY_DEF.
6853 * src/autofit/afglobal.h: Declare `af_writing_system_classes' and
6854 `af_script_classes'.
6855 * src/autofit/afloader.c: Include `afpic.h'.
6856
Werner Lemberge8ed2d62013-08-01 12:20:20 +020068572013-08-01 Werner Lemberg <wl@gnu.org>
6858
6859 Another round of cppcheck nitpicks.
6860
6861 The call was (from the top-level of the FreeType tree):
6862
6863 cppcheck --force \
6864 --enable=all \
6865 -I /usr/include \
6866 -I /usr/local/include \
6867 -I /usr/lib/gcc/i586-suse-linux/4.7/include \
6868 -I include \
6869 -I include/freetype \
6870 -I include/freetype/config \
6871 -I include/freetype/internal \
6872 -DFT2_BUILD_LIBRARY \
6873 . &> cppcheck.log
6874
6875 using cppcheck git commit f7e93f99.
6876
6877 Note that cppcheck still can't handle `#include FOO' (with `FOO' a
6878 macro).
6879
6880 */* Improve variable scopes.
6881 */* Remove redundant initializations which get overwritten.
6882
6883 * src/gxvalid/*: Comment out redundant code or guard it with
6884 FT_DEBUG_LEVEL_TRACE.
6885
Werner Lemberg5d6a3602013-07-30 23:17:04 +020068862013-07-30 Werner Lemberg <wl@gnu.org>
6887
Werner Lemberg72f5ff52013-07-31 22:49:29 +02006888 [autofit] Introduce `writing systems'.
6889
6890 This patch adds a new top level to the auto-hinter's script class
6891 hierarchy. It defines `writing systems' which can contain multiple
6892 scripts.
6893
6894 For example, the `latin' writing system (in file `aflatin.c') is
6895 able to support scripts like Latin, Cyrillic, Armenian, etc., which
6896 can be handled similarly.
6897
6898 Scripts are now named using four-letter OpenType tags.
6899
6900 * src/autofit/aftypes.h (AF_ScriptClassRec): Move relevant members
6901 to...
6902 (AF_WritingSystemClassRec): This new structure. It holds pointers
6903 to functions which can be shared among related scripts.
6904 (AF_WritingSystem): New enumeration.
6905 (AF_Script): Revised values using four-letter tags.
6906 (AF_DEFINE_WRITING_SYSTEM_CLASS): New macro.
6907 (AF_DEFINE_SCRIPT_CLASS): Updated.
6908
6909 * src/autofit/afglobal.c (af_writing_system_classes): New global,
6910 constant array.
6911 (af_script_classes): Updated.
6912 (af_face_globals_free): Updated.
6913 Remove assertion.
6914 (af_face_globals_get_metrics): Updated.
6915
6916 * src/autofit/afglobal.h (AF_SCRIPT_FALLBACK)
6917 [!AF_CONFIG_OPTION_CJK]: Handle this case.
6918
6919 * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph):
6920 Updated.
6921
6922 * src/autofit/afpic.c (autofit_module_class_pic_init): Updated;
6923 initialize structures for both writing systems and scripts.
6924 * src/autofit/afpic.h: Updated.
6925 (AF_WRITING_SYSTEM_CLASSES_GET): New macro.
6926
6927 * src/autofit/afcjk.c (af_cjk_writing_system_class): New writing
6928 system.
6929 (af_cjk_uniranges): Renamed to...
6930 (af_hani_uniranges): This.
6931 (af_cjk_script_class): Reduced and renamed to...
6932 (af_hani_script_class): This.
6933 * src/autofit/afcjk.h: Updated.
6934
6935 * src/autofit/afdummy.c (af_dummy_writing_system_class): New writing
6936 system.
6937 (af_dummy_script_class): Reduced and renamed to...
6938 (af_dflt_script_class): This.
6939 * src/autofit/afdummy.h: Updated.
6940
6941 * src/autofit/afindic.c (af_indic_writing_system_class): New writing
6942 system.
6943 (af_indic_uniranges): Renamed to...
6944 (af_deva_uniranges): This.
6945 (af_indic_script_class): Reduced and renamed to...
6946 (af_deva_script_class): This.
6947 * src/autofit/afcjk.h: Updated.
6948
6949 * src/autofit/aflatin.c (af_latin_writing_system_class): New writing
6950 system.
6951 (af_latin_uniranges): Renamed to...
6952 (af_latn_uniranges): This.
6953 (af_latin_script_class): Reduced and renamed to...
6954 (af_latn_script_class): This.
6955 * src/autofit/aflatin.h: Updated.
6956
6957 * src/autofit/aflatin2.c (af_latin2_writing_system_class): New
6958 writing system.
6959 (af_latin2_uniranges): Renamed to...
6960 (af_ltn2_uniranges): This.
6961 Synchronize ranges with `latin'.
6962 (af_latin2_script_class): Reduced and renamed to...
6963 (af_ltn2_script_class): This.
6964 * src/autofit/aflatin2.h: Updated.
6965
69662013-07-30 Werner Lemberg <wl@gnu.org>
6967
Werner Lemberg5d6a3602013-07-30 23:17:04 +02006968 [autofit] Variable renaming.
6969
6970 * src/autofit/aftypes.h (AF_ScriptMetricsRec):
6971 s/clazz/script_class/.
6972 Update all users.
6973
suzuki toshiya2b29ed62013-07-30 13:55:29 +090069742013-07-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6975
6976 Ignore libpng-config under cross-building configuration,
6977 because it will return the flags for the hosting environment.
6978
6979 * builds/unix/configure.raw: Ignore libpng-config when
6980 `cross_compiling' == yes.
6981
suzuki toshiyaf2e7f1e2013-07-30 13:32:57 +090069822013-07-30 Behdad Esfahbod <behdad@google.com>
6983
6984 Prevent division by zero by a transparent color.
6985
6986 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra):
6987 Return 0 immediately, when alpha channel is zero.
6988
Behdad Esfahbod21c32b02013-07-25 21:53:18 +020069892013-07-25 Behdad Esfahbod <behdad@google.com>
6990
6991 Add FT_FACE_FLAG_COLOR and FT_HAS_COLOR.
6992
6993 Also disambiguate Google's color bitmap tables.
6994
6995 * include/freetype/freetype.h (FT_FACE_FLAG_COLOR, FT_HAS_COLOR):
6996 New macros.
6997
6998 * include/freetype/internal/tttypes.h (TT_SbitTableType): Add
6999 TT_SBIT_TABLE_TYPE_CBLC.
7000
7001 * src/sfnt/sfobjs.c (sfnt_load_face): Handle FT_FACE_FLAG_COLOR.
7002
7003 * src/sfnt/ttsbit.c (tt_face_load_sbit,
7004 tt_face_load_strike_metrics, tt_face_load_sbit_image): Handle
7005 TT_SBIT_TABLE_TYPE_CBLC.
7006
suzuki toshiyab4725cb2013-07-24 14:25:39 +090070072013-07-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
7008
7009 [sfnt] Fix for `make multi' target.
7010
7011 * src/sfnt/pngshim.c (Load_SBit_Png): Use FT_LOCAL_DEF().
7012
Werner Lemberg6a7df622013-07-20 10:48:37 +020070132013-07-20 Werner Lemberg <wl@gnu.org>
7014
7015 * docs/INSTALL.GNU: Updated.
7016
Behdad Esfahbodff269522013-07-20 08:02:39 +020070172013-07-20 Behdad Esfahbod <behdad@google.com>
7018
7019 [sfnt] Fix `sbix' table version handling.
7020
7021 * src/sfnt/ttsbit.c (tt_face_load_sbit) [TT_SBIT_TABLE_TYPE_SBIX]:
7022 USHORT version numbers are to be considered as `minor'.
7023
Werner Lemberg05c14212013-07-19 23:11:23 +020070242013-07-19 Werner Lemberg <wl@gnu.org>
7025
7026 [autofit] Fix segment classification for blue zones.
7027
7028 The old code (essentially unchanged since the very beginning)
7029 incorrectly handled this configuration
7030
7031 x -o- x
7032 / \
7033 / \
7034 / \
7035 o o
7036
7037 as flat and this
7038
7039 o o
7040 / /
7041 x| x|
7042 | |
7043 o---------------o
7044
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02007045 as round. (`o' and `x' are on and off points, respectively).
Werner Lemberg05c14212013-07-19 23:11:23 +02007046
7047 This is a major change which should improve the rendering results
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02007048 enormously for many TrueType fonts, especially in the range approx.
Werner Lemberg05c14212013-07-19 23:11:23 +02007049 20-40ppem, fixing the appearance of many overshoots.
7050
7051 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Look at the
7052 first and last points of the segment, not the points right before
7053 and after.
7054
70552013-07-19 Behdad Esfahbod <behdad@google.com>
Werner Lemberg01705392013-07-18 13:13:12 +02007056
Behdad Esfahbod778a7e62013-07-19 14:28:28 +02007057 [sfnt] `sbix' fix-ups.
7058
7059 * src/sfnt/sfobjs.c (sfnt_load_face): Apple's `sbix' color bitmaps
7060 are rendered scaled and then the `glyf' outline rendered on top. We
7061 don't support that yet, so just ignore the `glyf' outline and
7062 advertise it as a bitmap-only font.
7063
7064 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
7065 [TT_SBIT_TABLE_TYPE_SBIX]: Return metrics in 26.6 units.
7066 (tt_face_load_sbix_image): Typo.
7067
70682013-07-18 Behdad Esfahbod <behdad@google.com>
7069
Werner Lemberg01705392013-07-18 13:13:12 +02007070 [sfnt] Add support for Apple's `sbix' color bitmap table.
7071
7072 * include/freetype/internal/tttypes.h (TT_SBit_MetricsRec): Widen
7073 fields to FT_Short and FT_UShort, respectively.
7074 (TT_SBitTableType): New enumeration.
7075 (TT_FaceRec): Add `sbit_table_type' field.
7076
7077 * include/freetype/tttags.h (TTAG_sbix): New macro.
7078
7079 * src/sfnt/pngshim.c (Load_SBit_Png): Pass a more generic
7080 FT_GlyphSlot argument instead FT_Bitmap.
7081 Add flag to control map and metrics handling.
7082 Update all users.
7083
7084 * src/sfnt/ttsbit.c: Include `ttmtx.h'.
7085 (tt_face_load_eblc): Renamed to...
7086 (tt_face_load_sbit): This.
7087 Handlic `sbix' bitmaps.
7088 (tt_face_free_eblc): Renamed to...
7089 (tt_face_load_sbit): This.
7090 Updated.
7091 (tt_face_load_strike_metrics): Handle `sbix' bitmaps.
7092 (tt_face_load_sbix_image): New function.
7093 (tt_sbit_decoder_alloc_bitmap, tt_sbit_decoder_load_image,
7094 tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned,
7095 tt_sbit_decoder_load_compound, tt_sbit_decoder_load_png,
7096 tt_sbit_decoder_load_image, tt_sbit_decoder_load_bitmap): Don't pass
7097 and handle load flags.
7098 (tt_sbit_decoder_load_bitmap) [!FT_CONFIG_OPTION_USE_PNG]: Better
7099 handle formats 17-19.
7100 Move color to grayscale conversion to...
7101 (tt_face_load_sbit_image): Here.
7102 Handle `sbix' bitmaps.
7103
7104 * src/sfnt/pngshim.h: Updated.
7105 * src/sfnt/ttsbit.h: Updated.
7106 * src/sfnt/sfdriver.c: Updated.
7107
Werner Lemberg274207e2013-07-18 12:38:57 +020071082013-07-18 Werner Lemberg <wl@gnu.org>
7109
7110 [sfnt] Ignore invalid magic number in `head' or `bhed'.
7111
7112 Other font engines seem to ignore it also. Problem reported by
7113 Hin-Tak Leung <htl10@users.sourceforge.net>.
7114
7115 * src/sfnt/ttload.c (check_table_dir): Don't abort but warn only if
7116 we have an invalid magic number.
7117
Werner Lemberg9a7951d2013-07-16 15:25:24 +020071182013-07-16 Werner Lemberg <wl@gnu.org>
7119
7120 [smooth] Fix segfault caused by previous commit.
7121
7122 * src/smooth/ftgrays.c (gray_set_cell): Always compute
7123 `ras.invalid'.
7124
David Turnera5f33ee2013-07-16 12:40:03 +020071252013-07-16 David Turner <digit@google.com>
7126
David Turner89929ec2013-07-16 13:36:07 +02007127 [smooth] Improve performance.
7128
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02007129 Provide a work-around for an ARM-specific performance bug in GCC.
David Turner89929ec2013-07-16 13:36:07 +02007130 This speeds up the rasterizer by more than 5%.
7131
7132 Also slightly optimize `set_gray_cell' and `gray_record_cell' (which
7133 also improves performance on other platforms by a tiny bit (<1%).
7134
7135 * src/smooth/ftgrays.c (FT_DIV_MOD): New macro.
7136 Use it where appropriate.
7137
7138 (gray_record_cell, gray_set_cell, gray_move_to,
7139 gray_convert_glyph_inner): Streamline condition handling.
7140
71412013-07-16 David Turner <digit@google.com>
7142
David Turnerf66d48e2013-07-16 13:18:00 +02007143 [truetype] Add assembler code for TT_MulFix14 and TT_DotFix14.
7144
7145 This patch provides slightly optimized versions for ARM, x86, and
7146 x86_64 CPUs if built with GCC.
7147
7148 Also remove some dead code.
7149
7150 * src/truetype/ttinterp.c (TT_MulFix14_arm, TT_MulFix14_long_long,
7151 TT_DotFix14_long_long): New functions.
7152
71532013-07-16 David Turner <digit@google.com>
7154
David Turnerb2890882013-07-16 12:52:18 +02007155 Optimize FT_MulFix for x86_64 GCC builds.
7156
7157 This patch provides an optimized `FT_MulFix' implementation for
7158 x86_64 machines when FreeType is built with GCC, or compatible
7159 compilers like Clang.
7160
7161 Example:
7162 bin/ftbench -p -t 5 -s 14 -f 0008 Arial.ttf
7163
7164 Before:
7165
7166 Load 4.863 us/op
7167 Load_Advances (Normal) 4.816 us/op
7168 Load_Advances (Fast) 0.028 us/op
7169 Render 2.753 us/op
7170 Get_Glyph 0.463 us/op
7171 Get_CBox 0.077 us/op
7172 Get_Char_Index 0.023 us/op
7173 Iterate CMap 13.898 us/op
7174 New_Face 12.368 us/op
7175 Embolden 0.028 us/op
7176 Get_BBox 0.302 us/op
7177
7178 After:
7179
7180 Load 4.617 us/op
7181 Load_Advances (Normal) 4.645 us/op
7182 Load_Advances (Fast) 0.027 us/op
7183 Render 2.789 us/op
7184 Get_Glyph 0.460 us/op
7185 Get_CBox 0.077 us/op
7186 Get_Char_Index 0.024 us/op
7187 Iterate CMap 13.403 us/op
7188 New_Face 12.278 us/op
7189 Embolden 0.028 us/op
7190 Get_BBox 0.301 us/op
7191
7192 * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h
7193 (FT_MulFix_x86_64): New function.
7194
71952013-07-16 David Turner <digit@google.com>
7196
David Turnera5f33ee2013-07-16 12:40:03 +02007197 Speed up ARMv7 support.
7198
7199 When building for ARMv7 with thumb2 instructions, the optimized
7200 `FT_MulFix_arm' assembly routine was not being used.
7201
7202 The reason for this is in the `ftconfig.h' header, namely:
7203
7204 - The assembly routine uses the `smull' instruction which is not
7205 available when generating Thumb-1 machine code. It is available
7206 in Thumb-2 mode, though.
7207
7208 - The header was written a long time ago before Thumb-2 became
7209 widely popular (e.g. with Android). So it simply doesn't use the
7210 assembly routine if the `__thumb__' built-in macro is defined.
7211
7212 - When compiling in Thumb-2 mode, the compiler will define both
7213 `__thumb__' and `__thumb2__'.
7214
7215 By checking for `(__thumb2__ || !__thumb__)', we ensure that the
7216 assembly routine is only avoided when generating Thumb-1 code.
7217
7218 Given that this is performance-sensitive function, this improves
7219 `ftbench' as follows on a Galaxy Nexus:
7220
7221 Before (us/op) After (us/op)
7222
7223 - loading Arial.ttf glyphs at 14 ppem [1]
7224
7225 Load 34.285 33.098
7226
7227 - same operation with the light auto-hinter [2]
7228
7229 Load 31.317 29.590
7230
7231 - same operation without hinting [3]
7232
7233 Load 6.143 5.376
7234
7235 - loading Arial.ttf advances at 14 ppem [4]
7236
7237 Load_Advances (normal) 34.216 33.016
7238 Load_Advances (fast) 0.176 0.176
7239
7240 [1] ftbench -t 5 -p -s 14 -b a -f 0008 Arial.ttf
7241 [2] ftbench -t 5 -p -s 14 -b a -r 1 -f 0028 Arial.ttf
7242 [3] ftbench -t 5 -p -s 14 -b a -f 000a Arial.ttf
7243 [4] ftbench -t 5 -p -s 14 -b b -f 0008 Arial.ttf
7244
7245 * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h
7246 (FT_MULFIX_ASSEMBLER): Fix handling for ARMv7.
7247
Werner Lemberge12fc772013-06-28 07:57:32 +020072482013-06-28 Werner Lemberg <wl@gnu.org>
7249
7250 * docs/CHANGES: Updated.
7251
Werner Lemberg680c1d42013-06-27 17:21:59 +020072522013-06-27 Werner Lemberg <wl@gnu.org>
7253
7254 * src/winfonts/winfnt.c (FNT_Load_Glyph): Fix bitmap width guard.
7255
Werner Lembergc7cc9eb2013-06-25 07:24:02 +020072562013-06-25 Werner Lemberg <wl@gnu.org>
7257
Werner Lembergb8850fc2013-06-26 12:22:10 +02007258 [cff] Add darkening limit to `darkening-parameters'.
7259
7260 * src/cff/cffdrivr.c (cff_property_set): Add check.
7261
72622013-06-25 Werner Lemberg <wl@gnu.org>
7263
Werner Lemberg89ca1fd2013-06-25 23:28:02 +02007264 [cff] Add `darkening-parameters' property.
7265
7266 * include/freetype/ftcffdrv.h: Document it.
7267
7268 * src/cff/cffdrivr.c (cff_property_set, cff_property_get): Handle
7269 `darkening-parameters' property.
7270
7271 * src/cff/cf2font.h (CF2_FontRec): Add `darkenParams' array.
7272
7273 * src/cff/cf2font.c (cf2_computeDarkening): Add `darkenParams'
7274 argument and use it.
7275 Update all callers.
7276
7277 * src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Copy
7278 `darken_params' values.
7279
7280 * src/cff/cffobjs.h (CFF_DriverRec): Add `darken_params' array.
7281
7282 * src/cff/cffobjs.c (cff_driver_init): Set default values for
7283 `darken_params'.
7284
72852013-06-25 Werner Lemberg <wl@gnu.org>
7286
Werner Lembergfad93262013-06-25 10:41:37 +02007287 [docmaker] Code shuffling.
7288
7289 * src/tools/docmaker/tohtml.py (re_url): Move regexp...
7290 * src/tools/docmaker/sources.py: ... to this file.
7291
72922013-06-25 Werner Lemberg <wl@gnu.org>
7293
Werner Lemberg8bdc4072013-06-25 10:20:53 +02007294 [docmaker] Remove unused functions.
7295
7296 * src/tools/docmaker/content.py (DocMarkup.get_start,
7297 DocBlock.get_markup_name): Removed.
7298 * src/tools/docmaker/tohtml.py (html_quote0, dump_html_code,
7299 HtmlFormatter.make_html_words): Removed.
7300
73012013-06-25 Werner Lemberg <wl@gnu.org>
7302
Werner Lembergffb8b472013-06-25 09:09:30 +02007303 * builds/freetype.mk (dll): Remove target.
7304
7305 Problem reported by Jörg Günnewig <joerg.guennewig@googlemail.com>.
7306
73072013-06-25 Werner Lemberg <wl@gnu.org>
7308
Werner Lembergc7cc9eb2013-06-25 07:24:02 +02007309 [docmaker] Recognise URLs.
7310
7311 * src/tools/docmaker/tohtml.py (re_url): New regular expression.
7312 (make_html_para): Use it.
7313
Werner Lemberg25b7da52013-06-19 10:23:36 +020073142013-06-19 Werner Lemberg <wl@gnu.org>
7315
Werner Lembergfe4f5712013-06-19 23:27:47 +02007316 * Version 2.5.0.1 released.
7317 ===========================
7318
7319
7320 Tag sources with `VER-2-5-0-1'.
7321
7322 * include/freetype/config/ftoption.h: Undefine
7323 CFF_CONFIG_OPTION_OLD_ENGINE.
7324 * devel/ftoption.h: Define CFF_CONFIG_OPTION_OLD_ENGINE.
7325
73262013-06-19 Werner Lemberg <wl@gnu.org>
7327
Werner Lemberg609f0ca2013-06-19 14:41:47 +02007328 * builds/unix/install.mk (install): Don't create `cache' directory.
7329
7330 Found by Peter Breitenlohner <peb@mppmu.mpg.de>.
7331
73322013-06-19 Werner Lemberg <wl@gnu.org>
7333
Werner Lemberg25b7da52013-06-19 10:23:36 +02007334 * Version 2.5.0 released.
7335 =========================
7336
7337
7338 Tag sources with `VER-2-5-0'.
7339
7340 * docs/VERSION.DLL: Update documentation and bump version number to
7341 2.5.0.
7342
7343 * README, Jamfile (RefDoc),
7344 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
7345 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
7346 builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
7347 builds/win32/visualc/freetype.dsp,
7348 builds/win32/visualc/freetype.vcproj,
7349 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
7350 builds/win32/visualce/freetype.vcproj,
7351 builds/win32/visualce/index.html,
7352 builds/wince/vc2005-ce/freetype.vcproj,
7353 builds/wince/vc2005-ce/index.html,
7354 builds/wince/vc2008-ce/freetype.vcproj,
7355 builds/wince/vc2008-ce/index.html: s/2.4.12/2.5.0/, s/2412/250/.
7356
7357 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 5.
7358 (FREETYPE_PATCH): Set to 0.
7359
7360 * builds/unix/configure.raw (version_info): Set to 16:2:10.
7361
7362 * src/base/ftobjs.c (FT_Open_Face): Pacify compiler.
7363 * src/truetype/ttinterp.c (Ins_MSIRP, Ins_MIRP): Ditto.
7364
Werner Lembergf56691a2013-06-18 10:17:48 +020073652013-06-18 Werner Lemberg <wl@gnu.org>
7366
7367 Fix Savannah bug #39269.
7368
7369 * src/base/ftgloadr.c (FT_GlyphLoader_CheckPoints): Free memory in
7370 case of reacollocation failures.
7371
Andrew Church67cf7a82013-06-18 09:35:34 +020073722013-06-18 Andrew Church <achurch+savannah@achurch.org>
7373
7374 Fix Savannah bug #39266.
7375
7376 If memory allocations fail at certain points while opening a font,
7377 FreeType can either crash due to a NULL dereference or leak memory.
7378
7379 * include/freetype/internal/ftobjs.c (FT_Face_InternalRec,
7380 FT_LibraryRec): Make `refcount' a signed integer. If, for example,
7381 FT_Open_Face() fails in a memory allocation before the face's
7382 reference count is set to 1, a subsequent `FT_Done_Library' call
7383 would otherwise loop over `FT_Done_Face' 2^32 times before freeing
7384 the face.
7385
7386 * src/base/ftobjs.c (open_face): Initialize `stream' and friends
7387 earlier.
7388 (FT_Open_Face) <Fail>: Behave correctly if `node' is NULL.
7389 (FT_Destroy_Module) <Fail>: Check that `renderer_clazz' is valid.
7390
73912013-06-14 Werner Lemberg <wl@gnu.org>
Werner Lembergd7e34442013-06-14 18:33:39 +02007392
7393 * src/smooth/ftgrays.c One final pragma to silence 64-bit MSVC.
7394
Dave Arnoldcb23a622013-06-13 07:46:32 +020073952013-06-06 Dave Arnold <darnold@adobe.com>
7396 Werner Lemberg <wl@gnu.org>
7397
7398 [cff] Add code to Adobe's engine to handle ppem > 2000.
7399
7400 * src/cff/cffgload.c (cff_slot_load): If we get
7401 FT_Err_Glyph_Too_Big, retry unhinted and scale up later on.
7402
Andrew Church67cf7a82013-06-18 09:35:34 +020074032013-06-12 Werner Lemberg <wl@gnu.org>
Werner Lemberg25b6e602013-06-12 11:06:34 +02007404
Werner Lemberg294ce112013-06-12 23:33:11 +02007405 Another try on pragmas.
7406
7407 * include/freetype/internal/ftdebug.h: Move pragmas to...
7408 * include/freetype/internal/internal.h: ... this file since it gets
7409 included by all source files.
7410 * include/freetype/internal/ftserv.h: Remove pragma which has no
7411 effect.
7412
Dave Arnoldcb23a622013-06-13 07:46:32 +020074132013-06-12 Werner Lemberg <wl@gnu.org>
Werner Lemberg294ce112013-06-12 23:33:11 +02007414
Werner Lemberg25b6e602013-06-12 11:06:34 +02007415 * include/freetype/internal/ftdebug.h: Disable MSVC warning C4127.
7416
7417 This partially undoes commit 3f6e0e0c.
7418
Werner Lembergc06889e2013-06-12 10:58:06 +020074192013-06-12 Werner Lemberg <wl@gnu.org>
7420
7421 More compiler warning fixes.
7422
7423 */*: Use cast to `FT_Bool' (or `Bool') where appropriate.
7424
Werner Lemberg99e60d82013-06-10 01:44:37 +020074252013-06-10 Werner Lemberg <wl@gnu.org>
7426
Werner Lemberg5e094c62013-06-10 14:59:21 +02007427 [truetype] Improve handling of broken sbit advance widths.
7428
7429 * src/truetype/ttgload.c (TT_Load_Glyph): Use the glyph's (scaled)
7430 `linearHoriAdvance' if the sbit's `horiAdvance' value is zero.
7431
7432 Cf. font `Fixedsys Excelsior' v3.01 (FSEX300.ttf), glyph A, 16ppem.
7433
74342013-06-10 Werner Lemberg <wl@gnu.org>
7435
Werner Lemberga25ecfd2013-06-10 12:57:16 +02007436 [sfnt] Improve embedded bitmap tracing.
7437
7438 * src/base/ftobjs.c (FT_Request_Size): Move trace message regarding
7439 bitmap strike match to...
7440 (FT_Match_Size): This function.
7441
7442 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics,
7443 tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned,
7444 tt_sbit_decoder_load_compound, tt_sbit_decoder_load_png,
7445 tt_sbit_decoder_load_image): Decorate with tracing messages.
7446
74472013-06-10 Werner Lemberg <wl@gnu.org>
7448
Werner Lemberg99e60d82013-06-10 01:44:37 +02007449 Fix Savannah bug #39160.
7450
7451 * src/truetype/ttinterp.c (Ins_SDPVTL): Set projection vector too
7452 for the degenerate case.
7453
Werner Lemberg2ba871b2013-06-09 08:20:54 +020074542013-06-09 David Turner <digit@google.com>
7455
7456 * src/cache/ftcmanag.c (FTC_Manager_Reset): Add missing cache flush.
7457
7458 This code, present since eight(!) years in the unused `CACHE'
7459 branch, has been forgotten to apply to the master branch. It's
7460 really amazing that noone has ever complained since
7461 `FTC_Manager_Reset' is pretty useless without flushing the cache.
7462
Werner Lemberg85fd84b2013-06-07 17:10:21 +020074632013-06-07 Werner Lemberg <wl@gnu.org>
7464
Werner Lemberg3f6e0e02013-06-07 18:10:40 +02007465 Add and improve pragmas for MSVC compiler.
7466
7467 * include/freetype/internal/ftdebug.h: Remove pragmas.
7468 * include/freetype/internal/ftserv.h: Use push and pop for pragmas.
7469 * include/freetype/internal/ftvalid.h: Handle warning C4324.
7470 * src/base/ftobjs.c: Use push and pop for pragmas.
7471 * src/gzip/ftgzip.c: Handle warning C4244.
7472
74732013-06-07 Werner Lemberg <wl@gnu.org>
7474
Werner Lemberg85fd84b2013-06-07 17:10:21 +02007475 [cff] s/cf2_getGlyphWidth/cf2_getGlyphOutline/.
7476
7477 * src/cff/cf2font.c, src/cff/cf2font.h, src/cff/cf2ft.c: Do it.
7478
Werner Lemberg4447b2c2013-06-06 21:28:36 +020074792013-06-06 Dave Arnold <darnold@adobe.com>
7480
7481 [cff] Add early exit feature for width-only calls.
7482
7483 This is for `FT_Get_Advance'.
7484
7485 There are 7 places where the spec says the width can be defined:
7486
7487 hstem/hstemhm
7488 vstem/vstemhm
7489 cntrmask/hintmask
7490 hmoveto
7491 vmoveto
7492 rmoveto
7493 endchar
7494
7495 * src/cff/cf2intrp.c (cf2_doStems): Exit early for width-only calls,
7496 if possible.
7497
7498 (cf2_interpT2CharString) <cf2_cmdHSTEM>, <cf2_cmdVSTEM>,
7499 <cf2_cmdVMOVETO>, <cf2_cmdENDCHAR>, <cf2_cmdHINTMASK>,
7500 <cf2_cmdRMOVETO>, <cf2_cmdHMOVETO>: Exit early for width-only calls.
7501
Werner Lembergbadf3172013-06-06 09:16:38 +020075022013-06-06 Werner Lemberg <wl@gnu.org>
7503
7504 Next round of compiler fixes.
7505
7506 * builds/win32/ftdebug.c, builds/wince/ftdebug.c (ft_debug_init):
7507 Add proper cast.
7508
7509 * include/freetype/internal/ftserv.h (FT_SERVICE_UNAVAILABLE): Fix
7510 cast.
7511 * include/freetype/internal/ftstream.h: Decorate stream and frame
7512 macros with `FT_Long' and `FT_ULong' as appropriate.
7513
7514 * src/base/ftrfork.c (raccess_guess_darwin_hfsplus,
7515 raccess_guess_darwin_newvfs): Use cast.
7516
7517 * src/bdf/bdflib.c (_bdf_set_default_spacing): Use cast.
7518
7519 * src/cache/ftcmanag.c (FTC_Manager_Check): Fix cast.
7520 * src/cache/ftcmanag.h (FTC_ManagerRec): Ditto.
7521
7522 * src/cff/cf2arrst.c (cf2_arrstack_setNum_Elements): Use cast.
7523 * src/cff/cf2ft.c (cf2_freeSeacComponent): Ditto.
7524 * src/cff/cffobjs.c (remove_subset_prefix, remove_style): Ditto.
7525
7526 * src/cid/cidparse.c (cid_parser_new): Use cast.
7527
7528 * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Use cast.
7529
7530 * src/psaux/psobjs.c (reallocate_t1_table): Fix argument type.
7531
7532 * src/raster/ftraster.c (ft_black_reset): Use cast.
7533
7534 * src/truetype/ttgxvar.c (FT_Stream_FTell): Use cast.
7535 (ALL_POINTS): Fix cast.
7536
7537 * src/type1/t1driver.c (t1_ps_get_font_value): Add casts.
7538 * src/type1/t1parse.c (T1_Get_Private_Dict): Add cast.
7539
Dave Arnoldc3782492013-06-05 19:57:55 +020075402013-06-05 Dave Arnold <darnold@adobe.com>
7541
7542 Fix more MSVC Win32 compiler warnings.
7543
7544 * src/base/ftobjs.c: Fix typo in MS pragma.
7545
7546 * src/base/bdflib.c (_bdf_set_default_spacing, _bdf_add_property):
7547 `lineno' is only used in debug mode.
7548
7549 * src/cff/cf2ft.c (cf2_builder_moveTo): `params' is only used in
7550 debug mode.
7551
Werner Lemberg45392b72013-06-05 13:43:20 +020075522013-06-05 Werner Lemberg <wl@gnu.org>
7553
7554 Fix compiler warnings.
7555
7556 * include/freetype/internal/ftmemory.h: Decorate memory allocation
7557 macros with `FT_Long' where appropriate.
7558 Remove duplicate of FT_MEM_QRENEW_ARRAY definition.
7559
7560 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Use
7561 cast.
7562
7563 * src/base/ftobjs.c: Add warning disabling pragma for MSVC while
7564 including `md5.c'.
7565
7566 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdESC>: Add
7567 cast.
7568
7569 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_compound): Fix casts.
7570 (tt_sbit_decoder_load_bitmap): Beautification.
7571
7572 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Initialize
7573 variables (earlier).
7574
7575 * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Pacify compiler.
7576
7577 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Use unsigned constants
7578 where appropriate.
7579
7580 * src/type1/t1load.c (T1_Get_MM_Var): Ditto.
7581
Werner Lembergdc624ca2013-06-04 10:30:48 +020075822013-06-04 Werner Lemberg <wl@gnu.org>
7583
Werner Lembergd9634982013-06-04 20:18:57 +02007584 * src/cff/cf2font.c (cf2_getGlyphWidth): Initialize `advWidth'.
7585
7586 Problem reported by Ingmar Sittl <ingmar.sittl@elektrobit.com>.
7587
75882013-06-04 Werner Lemberg <wl@gnu.org>
7589
Werner Lembergdc624ca2013-06-04 10:30:48 +02007590 Apply fixes for cppcheck nitpicks.
7591
7592 http://cppcheck.sourceforge.net/
7593
Werner Lemberg8d8508e2013-06-04 13:09:01 +02007594 The call was (from the top-level of the FreeType tree):
7595
7596 cppcheck --force \
7597 --enable=all \
7598 -I include \
7599 -I include/freetype/ \
7600 -I include/freetype/config/ \
7601 -I include/freetype/internal/ \
7602 . &> cppcheck.log
7603
Werner Lembergdc624ca2013-06-04 10:30:48 +02007604 Note that the current version heavily chokes on FreeType, delivering
Werner Lemberg8d8508e2013-06-04 13:09:01 +02007605 many wrong results. I will report those issues to the cppcheck team
Werner Lembergdc624ca2013-06-04 10:30:48 +02007606 so that a newer version gives improved results hopefully.
7607
7608 */* Improve variable scopes.
7609 */* Remove redundant initializations which get overwritten.
7610
Werner Lemberge8ed2d62013-08-01 12:20:20 +02007611 * src/base/ftmac.c, builds/mac/ftmac.c (count_faces_scalable):
Werner Lembergdc624ca2013-06-04 10:30:48 +02007612 Remove unused variable.
7613
7614 * src/base/ftdbgmem.c (ft_mem_table_destroy): `table' can't be zero.
7615
7616 * src/gxvalid/gxvkern.c (gxv_kern_subtable_fmt1_entry_validate):
7617 Remove functionless code.
7618
7619 * src/tools/ftrandom.c (main): Fix memory leak.
7620
Werner Lemberg2429dc32013-06-03 12:41:58 +020076212013-06-03 Werner Lemberg <wl@gnu.org>
7622
7623 Add CFF_CONFIG_OPTION_OLD_ENGINE configuration option.
7624
7625 This controls whether the old FreeType CFF engine gets compiled into
7626 FreeType. It is now disabled by default.
7627
7628 * devel/ftoption.h, include/freetype/config/ftoption.h
7629 (CFF_CONFIG_OPTION_OLD_ENGINE): New macro.
7630
7631 * src/cff/cffdrivr.c (cff_property_set), src/cff/cffgload.c
7632 (CFF_Operator, cff_argument_counts, cff_builder_add_point,
7633 cff_operator_seac, cff_decoder_parse_charstrings, cff_slot_load),
7634 src/cff/cffgload.h, src/cff/cffobjs.c (cff_driver_init): Use
7635 CFF_CONFIG_OPTION_OLD_ENGINE to guard the affected code.
7636
7637 * docs/CHANGES: Updated.
7638
Werner Lembergf9cceeb2013-06-02 23:38:13 +020076392013-06-02 Werner Lemberg <wl@gnu.org>
7640
7641 Fix PNG library handling.
7642
7643 * builds/unix/configure.raw: Don't use LIBPNG_LIBS but
7644 LIBPNG_LDFLAGS.
7645
Behdad Esfahbod760d3422013-05-29 11:36:18 +020076462013-05-23 Behdad Esfahbod <behdad@google.com>
7647
7648 Add support for color embedded bitmaps (eg. color emoji).
7649
7650 A new load flag, FT_LOAD_COLOR, makes FreeType load color
7651 embedded-bitmaps, following this draft specification
7652
7653 https://color-emoji.googlecode.com/git/specification/v1.html
7654
7655 which defines two new SFNT tables, `CBDT' and `CBLC' (named and
7656 modeled after `EBDT' and `EBLC', respectively). The color bitmaps
7657 are stored in the new FT_PIXEL_MODE_BGRA format to represent BGRA
7658 pre-multiplied sRGB images. If PNG support is available, PNG color
7659 images as defined in the same proposed specification are supported
7660 also.
7661
7662 Note that color bitmaps are converted to grayscale if client didn't
7663 ask for color.
7664
7665 * builds/unix/configure.raw: Search for libpng.
7666 Add `--without-png' option.
7667
7668 * devel/ftoption.h, include/freetype/config/ftoption.h
7669 (FT_CONFIG_OPTION_USE_PNG): New macro.
7670
7671 * include/freetype/freetype.h (FT_LOAD_COLOR): New load flag.
7672
7673 * include/freetype/ftimage.h (FT_Pixel_Mode): Add
7674 `FT_PIXEL_MODE_BGRA'.
7675
7676 * include/freetype/tttags.h (TTAG_CBDT, TTAG_CBLC): New tags.
7677
7678 * src/base/ftbitmap.c (FT_Bitmap_Embolden): Updated.
7679 (ft_gray_for_premultiplied_srgb_bgra): New function.
7680 (FT_Bitmap_Convert): Handle FT_PIXEL_MODE_BGRA.
7681
7682 * src/sfnt/pngshim.c, src/sfnt/pngshim.h: New files.
7683
7684 * src/sfnt/sfnt.c: Include `pngshim.c'.
7685
7686 * src/sfnt/ttsbit.c: Include FT_BITMAP_H and `pngshim.h'
7687 (tt_face_load_eblc): Load `CBLC'.
7688 (tt_sbit_decoder_init): Load `CBDT'.
7689 (tt_sbit_decoder_alloc_bitmap): Pass load flags to select between
7690 color and grayscale bitmaps.
7691 Set `num_grays'. This is used by `ftview' to choose the blending
7692 algorithm.
7693 (tt_sbit_decoder_load_byte_aligned,
7694 tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_compound,
7695 tt_sbit_decoder_load_image): Pass load flag.
7696 s/write/pwrite/.
7697 Don't call `tt_sbit_decoder_alloc_bitmap'.
7698 Updated.
7699 (tt_sbit_decoder_load_png) [FT_CONFIG_OPTION_USE_PNG]: New function.
7700 (tt_sbit_decoder_load_bitmap): Pass load flag.
7701 Handle new glyph formats 17, 18, and 19.
7702 Call `tt_sbit_decoder_alloc_bitmap'.
7703 Flatten color bitmaps if necessary.
7704 (tt_face_load_sbit_image): Updated.
7705
7706 * src/sfnt/rules.mk (SFNT_DRV_SRC): Add `pngshim.c'.
7707
7708 * docs/CHANGES: Updated.
7709
Guenter41e44802013-05-24 11:38:09 +020077102013-05-24 Guenter <info@gknw.net>
7711
7712 Apply Savannah patch #8055.
7713
7714 Make `apinames' create an import file for NetWare.
7715
7716 * src/tools/apinames.c (PROGRAM_VERSION): Set to 0.2.
7717 (OutputFormat): Add `OUTPUT_NETWARE_IMP'.
7718 (names_dump): Handle it.
7719 (usage): Updated.
7720 (main): Handle new command line flag `-wN'.
7721
Behdad Esfahbod2d6e1fb2013-05-23 08:01:20 +020077222013-05-23 Behdad Esfahbod <behdad@behdad.org>
7723
7724 Compilation fix.
7725
7726 * src/truetype/ttinterp.c (TT_RunIns)
7727 [!TT_CONFIG_OPTION_SUBPIXEL_HINTING]: Make it work.
7728
Infinality18f35ed2013-05-21 20:51:15 -050077292013-05-22 Infinality <infinality@infinality.net>
7730
Infinality3c783c12013-05-21 21:03:00 -05007731 [truetype] Formatting and an additional subpixel tweak.
7732
7733 * src/truetype/ttinterp.c (Ins_SHPIX): Formatting fix.
7734 * src/truetype/ttsubpix.c (SKIP_NONPIXEL_Y_MOVES_Rules):
7735 Revert previous modification for Verdana clones.
7736
77372013-05-22 Infinality <infinality@infinality.net>
7738
Infinality18f35ed2013-05-21 20:51:15 -05007739 [truetype] Adjust subpixel zp2 moves and tweak rules.
7740
7741 These modifications fix thin diagonal stems in some legacy fonts.
7742
7743 * src/truetype/ttinterp.c (Direct_Move_X): Remove unused macro.
7744 (Move_Zp2_Point): Don't always disable x moves for subpixel rendering.
7745 (Ins_SHP): Disable x moves here for subpixel rendering.
7746 (Ins_SHPIX): Only disable x moves in compatibility mode.
7747 Split out zp2 move reversals and reorder conditional respectively.
7748
7749 * src/truetype/ttsubpix.c (SKIP_NONPIXEL_Y_MOVES_Rules): Fix oversight.
7750 Only adjust Verdana clones for 17 ppem.
7751 (SKIP_NONPIXEL_Y_MOVES_Rules_Exceptions): Add Courier New.
7752 (ALWAYS_SKIP_DELTAP_Rules): Found additional cases for Arial `s'.
7753
Infinality63bfa832013-05-20 07:38:21 +020077542013-05-20 Infinality <infinality@infinality.net>
7755
7756 [truetype] Simplify and improve subpixel function detection.
7757
7758 Some small enhancements have allowed the removal of many macros and
7759 the simplification of existing rules in `ttsubpix.c'.
7760
7761 * src/truetype/ttsubpix.h (SPH_TWEAK_ALLOW_X_DMOVEX,
7762 SPH_TWEAK_ALLOW_X_MOVE_ZP2,
7763 SPH_TWEAK_DELTAP_SKIP_EXAGGERATED_VALUES,
7764 SPH_TWEAK_SKIP_INLINE_DELTAS, SPH_TWEAK_MIRP_CVT_ZERO): Removed.
7765 (SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES_DELTAP): New rule macro.
7766
7767 * src/truetype/ttsubpix.c: Updated affected rules.
7768
7769 * src/truetype/ttinterp.c (Direct_Move_X): Updated.
7770 (INS_FDEF): Add additional function detection.
7771 (INS_ENDF): Set runtime flag.
7772 (Ins_CALL): Skip the call under certain conditions.
7773 Remove bad code.
7774 (Ins_LOOPCALL): Skip the call under certain conditions.
7775 Remove bad code.
7776 (Move_Zp2_Point): Updated.
7777 (Ins_SHPIX): Updated.
7778 Skip the move under some situations.
7779 (Ins_MIAP): Improve conditions.
7780 (Ins_MIRP): Updated.
7781 (Ins_DELTAP): Skip move under certain conditions.
7782 Simplify conditions.
7783 (TT_RunIns): Updated.
7784 Add code to handle new function detection.
7785 Trace messages.
7786
Werner Lembergfd664692013-05-17 17:40:27 +020077872013-05-17 Werner Lemberg <wl@gnu.org>
7788
7789 Update more FT_Err_XXX macros using FT_ERR and FT_THROW;
7790
7791 * builds/amiga/src/base/ftsystem.c, builds/mac/ftmac.c,
7792 builds/unix/ftsystem.c, builds/vms/ftsystem.c: Do it.
7793
Werner Lembergf04951a2013-05-17 13:51:07 +020077942013-05-15 Werner Lemberg <wl@gnu.org>
7795
7796 [truetype] Add `interpreter-version' property.
7797
7798 This makes the option TT_CONFIG_OPTION_SUBPIXEL_HINTING controllable
7799 at runtime.
7800
Werner Lemberg27991332013-05-17 14:00:26 +02007801 * include/freetype/ftttdrv.h: New file.
7802
7803 * include/freetype/config/ftheader.h (FT_TRUETYPE_DRIVER_H): New
7804 macro.
7805
Werner Lembergf04951a2013-05-17 13:51:07 +02007806 * src/truetype/ttdriver.c: Include FT_TRUETYPE_DRIVER_H.
7807 (tt_property_set, tt_property_get): Fill templates.
7808
7809 * src/truetype/ttobjs.h (TT_DriverRec): Add `interpreter_version'
7810 member.
7811 Remove unused `extension_component' member.
7812
7813 * src/truetype/ttgload.c: Include FT_TRUETYPE_DRIVER_H.
7814 (tt_get_metrics, TT_Hint_Glyph, TT_Process_Simple_Glyph,
7815 compute_glyph_metrics, tt_loader_init): Use `interpreter_version'.
7816
7817 * src/truetype/ttinterp.c: Include FT_TRUETYPE_DRIVER_H.
7818 (SUBPIXEL_HINTING): New macro to check `interpreter_version' flag.
7819 Update all affected functions to use it.
7820 Use TT_INTERPRETER_VERSION_XXX where appropriate.
7821
7822 * src/truetype/ttobjs.c: Include FT_TRUETYPE_DRIVER_H.
7823 (tt_driver_init): Initialize `interpreter_version'.
7824
7825 * src/truetype/ttsubpix.c: Include FT_TRUETYPE_DRIVER_H.
7826 Use TT_INTERPRETER_VERSION_XXX where appropriate.
7827
Werner Lemberg7441dd82013-05-13 09:12:46 +020078282013-05-13 Werner Lemberg <wl@gnu.org>
7829
Werner Lemberg6650be72013-05-13 10:05:29 +02007830 [truetype] Avoid empty source file.
7831
7832 * src/truetype/ttsubpix.c [!TT_CONFIG_OPTION_SUBPIXEL_HINTING]:
7833 Provide dummy typedef.
7834
78352013-05-13 Werner Lemberg <wl@gnu.org>
7836
Werner Lemberg7441dd82013-05-13 09:12:46 +02007837 * src/cff/cf2font.c (cf2_getGlyphWidth): Fix uninitialized variable.
7838
7839 Fix suggested by Vaibhav Nagarnaik <vnagarnaik@gmail.com>.
7840
Brian Nixon8d6025c2013-05-13 09:06:42 +020078412013-05-13 Brian Nixon <bnixon@yahoo.com>
7842
7843 Fix Savannah bug #38970.
7844
7845 * src/base/ftdebug.c, builds/win32/ftdebug.c,
7846 builds/wince/ftdebug.c, builds/amiga/src/base/ftdebug.c
7847 (ft_debug_init): Don't read past the environment variable FT2_DEBUG.
7848
Werner Lembergd51ac9c2013-05-12 06:00:27 +020078492013-05-12 Werner Lemberg <wl@gnu.org>
7850
Werner Lembergcd888752013-05-12 15:08:57 +02007851 [truetype] Add framework for TrueType properties.
7852
7853 * src/truetype/ttdrivr.c: Include FT_SERVICE_PROPERTIES_H.
7854 (tt_property_set, tt_property_get): New functions, still empty.
7855 Define `tt_service_properties' service.
7856 Update `tt_services'.
7857
7858 * src/truetype/ttpic.h: Include FT_SERVICE_PROPERTIES_H.
7859 (TT_SERVICE_PROPERTIES_GET): New macro.
7860 (TTModulePIC): Add `tt_service_properties'.
7861
78622013-05-12 Werner Lemberg <wl@gnu.org>
7863
Werner Lembergb112fa42013-05-12 07:29:04 +02007864 Fix Savannah bug #38967.
7865
7866 * src/base/ftcalc.c (FT_DivFix) [FT_LONG64]: Fix cast.
7867
78682013-05-12 Werner Lemberg <wl@gnu.org>
7869
Werner Lembergcbcf33d2013-05-12 07:27:48 +02007870 Introduce unsigned 64bit type (if available).
7871
7872 * include/freetype/config/ftconfig.h: Define FT_UINT64 if available.
7873 [FT_LONG64]: Provide FT_UInt64.
7874
7875 * builds/unix/ftconfig.in: Synchronized.
7876
78772013-05-12 Werner Lemberg <wl@gnu.org>
7878
Werner Lembergd51ac9c2013-05-12 06:00:27 +02007879 Fix Savannah bug #38968.
7880
7881 * include/freetype/ftmodapi.h: Add `FT_EXPORT' to
7882 FT_Property_{Set,Get}.
7883 * src/base/ftobjs.c: Add `FT_EXPORT_DEF' to
7884 FT_Property_{Set,Get}.
7885
Werner Lembergf6aa0892013-05-10 07:58:47 +020078862013-05-10 Werner Lemberg <wl@gnu.org>
7887
Werner Lembergea2b4752013-05-10 08:04:33 +02007888 [sfnt] Clean up bitmap code.
7889
7890 * src/sfnt/ttsbit.c: Deleted.
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02007891 * src/sfnt/ttsbit0.c: Renamed to `ttsbit.c'.
Werner Lembergea2b4752013-05-10 08:04:33 +02007892 * rules.mk (SFNT_DRV_H): Updated.
7893
78942013-05-10 Werner Lemberg <wl@gnu.org>
7895
Werner Lembergf6aa0892013-05-10 07:58:47 +02007896 */* [FT_CONFIG_OPTION_OLD_INTERNALS]: Remove macro and guarded code.
7897
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00007898----------------------------------------------------------------------------
7899
Werner Lembergf57fc592015-01-17 20:41:43 +01007900Copyright 2013-2015 by
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00007901David Turner, Robert Wilhelm, and Werner Lemberg.
7902
7903This file is part of the FreeType project, and may only be used, modified,
7904and distributed under the terms of the FreeType project license,
7905LICENSE.TXT. By continuing to use, modify, or distribute this file you
7906indicate that you have read the license and understand and accept it
7907fully.
7908
7909
7910Local Variables:
7911version-control: never
Werner Lemberg4e03fe72006-04-29 06:20:09 +00007912coding: utf-8
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00007913End: