blob: 6d41da6c05b0455020dff1bd060da30347524463 [file] [log] [blame]
Werner Lembergcb7a5122015-09-19 07:58:03 +020012015-09-19 Werner Lemberg <wl@gnu.org>
2
3 [pcf] Improve `FT_ABS' fix from 2015-09-17 (#45999).
4
5 * src/pcf/pcfread.c (pcf_load_font): Do first the cast to FT_Short,
6 then take the absolute value.
7 Also apply FT_ABS to `height'.
8
Werner Lemberg9db9add2015-09-17 13:42:59 +020092015-09-17 Werner Lemberg <wl@gnu.org>
10
Werner Lembergf28c95c2015-09-17 19:30:26 +020011 [type42] Fix memory leak (#45989).
12
13 * src/type42/t42parse.c (t42_parse_charstrings): Allow only a single
14 `CharStrings' array.
15
162015-09-17 Werner Lemberg <wl@gnu.org>
17
Werner Lemberg4942c2b2015-09-17 17:56:53 +020018 [psaux] Fix memory leak (#45986).
19
20 * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
21 Free `temp' in case of error.
22
232015-09-17 Werner Lemberg <wl@gnu.org>
24
Werner Lemberg7d364b72015-09-17 16:31:58 +020025 [psaux] Improve tracing message.
26
27 * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
28 Handle plural correctly.
29
302015-09-17 Werner Lemberg <wl@gnu.org>
31
Werner Lembergc838c4f2015-09-17 16:22:40 +020032 [pcf] Fix integer overflows (#45985).
33
34 * src/pcf/pcfread.c (pcf_load_font): Use FT_MulDiv.
35
362015-09-17 Werner Lemberg <wl@gnu.org>
37
Werner Lemberg9db9add2015-09-17 13:42:59 +020038 [pcf] Use FT_ABS for some property values (#45893).
39
40 * src/pcf/pcfread.c (pcf_load_font): Take absolute values for
41 AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE, RESOLUTION_X, and
42 RESOLUTION_Y. In tracing mode, add warnings.
43
Werner Lembergbd0438a2015-09-16 18:05:43 +0200442015-09-16 Werner Lemberg <wl@gnu.org>
45
46 Minor fixes for some clang warnings.
47
48 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Cast, possible missing
49 initialization.
50
51 * src/truetype/ttgload.c (TT_Process_Composite_Component): Cast.
52
Werner Lemberg581c7e22015-09-15 06:49:06 +0200532015-09-15 Werner Lemberg <wl@gnu.org>
54
Werner Lemberg19cb1122015-09-15 08:52:36 +020055 [type1, type42] Fix memory leaks (#45966).
56
57 * src/type1/t1load.c (parse_blend_axis_types): Handle multiple axis
58 names.
59 (parse_blend_design_map): Allow only a single design map.
60 (parse_encoding): Handle multiple encoding vectors.
61
62 * src/type42/t42parse.c (t42_parse_encoding): Handle multiple
63 encoding vectors.
64
652015-09-15 Werner Lemberg <wl@gnu.org>
66
Werner Lemberg7f0f4012015-09-15 07:23:53 +020067 [truetype] Fix integer type (#45965).
68
69 * src/truetype/ttobjs.c (tt_synth_sfnt_checksum): Implement it.
70
712015-09-15 Werner Lemberg <wl@gnu.org>
72
Werner Lemberg577daf12015-09-15 07:10:16 +020073 * src/pcf/pcfread.c (pcf_load_font): Fix integer overflow (#45964).
74
752015-09-15 Werner Lemberg <wl@gnu.org>
76
Werner Lemberg581c7e22015-09-15 06:49:06 +020077 [type1, type42] Check encoding array size (#45961).
78
79 * src/type1/t1load.c (parse_encoding), src/type42/t42parse.c
80 (t42_parse_encoding): Do it.
81
Alexei Podtelezhnikov3ea0d2c2015-09-13 23:19:34 -0400822015-09-14 Alexei Podtelezhnikov <apodtele@gmail.com>
83
84 * src/base/ftcalc.c (FT_MulFix) [FT_LONG64]: Improve.
85
Werner Lemberg7962a152015-09-14 00:38:26 +0200862015-09-14 Werner Lemberg <wl@gnu.org>
87
88 [type1] Fix another potential buffer overflow (#45955).
89
90 * src/type1/t1parse (T1_Get_Private_Dict): Assure that check for
91 `eexec' doesn't exceed `limit'.
92
Werner Lemberge40e8b32015-09-13 08:05:50 +0200932015-09-13 Werner Lemberg <wl@gnu.org>
94
Werner Lembergff7d6402015-09-13 23:53:16 +020095 Replace `mkinstalldirs' with AC_PROG_MKDIR_P.
96
97 * builds/unix/mkinstalldirs: Removed, no longer needed.
98
99 * builds/unix/configure.raw: Call `AC_PROG_MKDIR_P'.
100 Update pwd call for `$INSTALL'.
101
102 * builds/unix/unix-def.in (MKINSTALLDIRS): Use `@MKDIR_P@'.
103
104 * autogen.sh: Updated.
105
1062015-09-13 Werner Lemberg <wl@gnu.org>
107
Werner Lemberg3df92aa2015-09-13 09:21:52 +0200108 [winfonts] Check alignment shift count for resource data (#45938).
109
110 * src/winfonts/winfnt.c (fnt_face_get_dll_font): Implement it.
111
1122015-09-13 Werner Lemberg <wl@gnu.org>
113
Werner Lemberge3058612015-09-13 08:41:43 +0200114 [type1] Fix potential buffer overflow (#45923).
115
116 * src/type1/t1parse.c (T1_Get_Private_Dict): Assure `cur' doesn't
117 point to end of file buffer.
118
1192015-09-13 Werner Lemberg <wl@gnu.org>
120
Werner Lemberge40e8b32015-09-13 08:05:50 +0200121 [gzip] Fix access of small compressed files (#45937).
122
123 * src/gzip/ftgzip.c (ft_gzip_stream_close): Avoid memory leak.
124
125 (ft_gzip_get_uncompressed_file): Correct byte order while reading
126 unsigned long value. Without this change, the whole optimization of
127 accessing small files in `FT_Stream_OpenGzip' is never executed! As
128 a consequence, access to PCF files in general (which are normally
129 small files) should be much improved now as originally intended.
130
Werner Lemberg23423bc2015-09-11 08:28:27 +02001312015-09-11 Werner Lemberg <wl@gnu.org>
132
Werner Lembergdb5a4a92015-09-12 08:32:55 +0200133 [psaux] Fix potential buffer overflow (#45922).
134
135 * src/psaux/psobjs.c (ps_parser_skip_PS_token): If a token is
136 enclosed in balanced expressions, ensure that the cursor position
137 doesn't get larger than the current limit.
138
1392015-09-11 Werner Lemberg <wl@gnu.org>
140
Werner Lemberg19b82cf2015-09-11 20:25:32 +0200141 [base] Avoid crash while tracing `load_mac_face'.
142
143 Reported in Savannah bug #45919.
144
145 * src/base/ftobjs.c (load_mac_face): Honour FT_OPEN_MEMORY while
146 tracing.
147
1482015-09-11 Werner Lemberg <wl@gnu.org>
149
Werner Lemberg23423bc2015-09-11 08:28:27 +0200150 [type42] Fix endless loop (#45920).
151
152 * src/type42/t42parse.c (t42_parse_encoding): Synchronize with
153 type1's `parse_encoding'.
154
Werner Lemberge5a27a72015-09-10 07:44:11 +02001552015-09-10 Werner Lemberg <wl@gnu.org>
156
157 [docmaker] Allow `-' in bold and italic markup.
158
159 * src/tools/docmaker/sources.py (re_italic, re_bold): Adjust
160 accordingly.
161
Alexei Podtelezhnikov09948e42015-09-09 21:30:15 -04001622015-09-09 Alexei Podtelezhnikov <apodtele@gmail.com>
163
164 * src/base/ftcalc.c (FT_RoundFix): Improve.
165
Wojciech Mamrak822acb02015-09-09 07:59:10 +02001662015-09-09 Wojciech Mamrak <wmamrak@gmail.com>
167
168 * src/base/ftcalc.c (FT_CeilFix, FT_FloorFix): Normalize.
169
170 This commit makes the functions behave as expected, this is,
171 rounding towards plus or minus infinity.
172
Alexei Podtelezhnikovb002f682015-09-07 13:47:36 -04001732015-09-07 Alexei Podtelezhnikov <apodtele@gmail.com>
174
175 * src/smooth/ftgrays.c (gray_render_line): Simplify clipping.
176
Alexei Podtelezhnikov5a6dc872015-09-04 23:14:46 -04001772015-09-04 Alexei Podtelezhnikov <apodtele@gmail.com>
178
179 [raster,smooth] Microoptimizations.
180
181 * src/raster/ftraster.c (Insert_Y_Turn, Finalize_Profile_Table,
182 Beziier_Up, ): Use do-while loops.
183
184 * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line,
185 gray_convert_glyph): Ditto.
186
Werner Lemberg696b7122015-09-04 10:10:59 +02001872015-09-04 Werner Lemberg <wl@gnu.org>
188
Werner Lembergd3cba0e2015-09-04 10:28:53 +0200189 [autofit] Redesign code ranges (2/2).
190
191 This commit adds two fallback scripts (`latb', `latp') and
192 implements support for the no-base character ranges introduced in
193 the previous commit.
194
195 * src/autofit/aftypes.h (AF_ScriptClassRec): Add
196 `script_uni_nobase_ranges' field.
197 (AF_DEFINE_SCRIPT_CLASS): Updated.
198
199 * src/autofit/afscript.h, src/autofit/afstyles.h: Add `latb' and
200 `latp' fallback scripts.
201
202 * src/autofit/afblue.dat: Add blue zones for Latin subscript and
203 superscript fallback scripts.
204
205 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
206
207 * src/autofit/afglobal.h (AF_NOBASE): New style flag for no-base
208 characters.
209 (AF_STYLE_MASK): Updated.
210
211 * src/autofit/afglobal.c (SCRIPT): Updated.
212 (af_face_globals_compute_style_coverage): Handle new style flag.
213
214 * src/autofit/aflatin.c (af_latin_hints_apply): Handle new style
215 flag.
216
217 * src/autofit/afranges.h (SCRIPT): Use it to export no-base ranges.
218
2192015-09-04 Werner Lemberg <wl@gnu.org>
220
Werner Lemberg696b7122015-09-04 10:10:59 +0200221 [autofit] Redesign code ranges (1/2).
222
223 This patch introduces auxiliary code ranges that identify no-base
224 characters; they refer to glyphs of a script that should be hinted
225 without alignments to blue zones (mostly diacritics).
226
227 It also splits off ranges for fallback scripts that handle subscript
228 and superscript characters not covered by OpenType features. For
229 example, this greatly helps improve the hinting of various phonetic
230 alphabets, which contain a large amount characters that look like
231 superscript glyphs.
232
233 Finally, code ranges are updated to Unicode 8.0, and enclosed
234 characters are removed in general since they normally look better if
235 they stay unhinted.
236
237 * src/autofit/afranges.c (af_latn_uniranges): Updated to Unicode
238 8.0.
239 Split off superscript-like and subscript-like glyphs into...
240
241 (af_latb_uniranges, af_latp_uniranges): ... these two new arrays.
242
243 (af_xxxx_nobase_uniranges): New arrays that hold no-base characters
244 of the corresponding character ranges.
245
Werner Lemberg8cbbcf62015-09-03 06:47:30 +02002462015-09-03 Werner Lemberg <wl@gnu.org>
247
248 [autofit] Pass glyph index to hinting function.
249
250 No functionality change yet.
251
252 * src/autofit/aftypes.h (AF_WritingSystem_ApplyHintsFunc): Pass
253 glyph index.
254
255 * src/autofit/afcjk.c, src/autofit/afcjk.h (af_cjk_hints_apply),
256 src/autofit/afdummy.c (af_dummy_hints_apply), src/autofit/afindic.c
257 (af_indic_hints_apply), src/autofit/aflatin.c
258 (af_latin_hints_apply), src/autofit/aflatin2.c
259 (af_latin2_hints_apply), src/autofit/afloader.c (af_loader_load_g):
260 Updated.
261
Werner Lemberg87c81f02015-08-30 10:35:21 +02002622015-08-30 Werner Lemberg <wl@gnu.org>
263
Werner Lemberg40103a32015-08-31 08:51:52 +0200264 [autofit] Code clean-up.
265
266 * src/autofit/afglobal.h (AF_STYLE_MASK): New macro.
267 (AF_STYLE_UNASSIGNED): Use AF_STYLE_MASK for definition.
268
269 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
270 Updated.
271
2722015-08-30 Werner Lemberg <wl@gnu.org>
273
Werner Lemberg87c81f02015-08-30 10:35:21 +0200274 [autofit] Make glyph style array use 16bit values.
275
276 * include/freetype/ftautoh.h (FT_Prop_GlyphToScriptMap): Use
277 `FT_UShort' for `map' field.
278
279 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage,
280 af_face_globals_new), src/autofit/hbshim.c, src/autofit/hbshim.h
281 (af_get_coverage): Use FT_UShort for `glyph_styles' array.
282
283 * src/autofit/afglobal.h (AF_STYLE_UNASSIGNED, AF_DIGIT): Extend to
284 16 bits.
285 (AF_FaceGlobalsRec): Use `FT_UShort' for `glyph_styles' field.
286
Werner Lemberg633d8ed2015-08-26 06:18:47 +02002872015-08-26 Werner Lemberg <wl@gnu.org>
288
289 * builds/unix/configure.raw: Need harfbuzz >= 0.9.21 (#45828).
290
Werner Lemberg78b01402015-08-25 07:23:01 +02002912015-08-25 Werner Lemberg <wl@gnu.org>
292
293 [base] Improve kerning tracing and documentation.
294
295 * src/base/ftobjs.c (FT_Get_Kerning): Emit tracing message if
296 scaled-down kerning values differ.
297
Werner Lemberg91d59162015-08-18 06:04:36 +02002982015-08-18 Werner Lemberg <wl@gnu.org>
299
300 [raster] Remove last remnants of `raster5' driver.
301
302 * src/raster/ftrend1.h (ft_raster5_renderer_class): Removed.
303
304 * src/raster/rastpic.c, src/raster/rastpic.h
305 (ft_raster5_renderer_class_pic_init,
306 ft_raster5_renderer_class_pic_free): Removed.
307
Alexei Podtelezhnikova0172d12015-08-17 22:58:59 -04003082015-08-17 Alexei Podtelezhnikov <apodtele@gmail.com>
309
310 [base] Improve emboldener (#45596).
311
312 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Correct displacement
313 of zero-lenght segments.
314
Alexei Podtelezhnikov00d89952015-08-16 22:57:34 -04003152015-08-16 Alexei Podtelezhnikov <apodtele@gmail.com>
316
Alexei Podtelezhnikov815c3242015-08-17 21:48:46 -0400317 [base] Reoptimize arithmetic.
Alexei Podtelezhnikov00d89952015-08-16 22:57:34 -0400318
319 * src/base/ftcalc.c (FT_MulDiv, FT_MulFix) [!FT_LONG64]: Remove
320 special cases that slow down the general use.
321
pazerf0ed30e2015-08-15 06:53:09 +02003222015-08-15 pazer <ibemad@gmail.com>
323
324 Fix C++ compilation (#45762).
325
326 * src/base/ftstroke.c (ft_outline_glyph_class): Use
327 FT_CALLBACK_TABLE.
328
Alexei Podtelezhnikovae258aa2015-08-14 23:23:18 -04003292015-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
330
331 [truetype] Clean up.
332
333 * src/truetype/ttgload.c (TT_Process_Composite_Component): Use
334 `FT_Outline_Transform' and `FT_Outline_Translate'.
335 (translate_array): Dropped.
336
Werner Lembergd0d7ee02015-08-14 14:30:58 +02003372015-08-14 Andreas Enge <andreas.enge@inria.fr>
338
339 * builds/unix/detect.mk (CONFIG_SHELL): Don't handle it (#44261).
340
Werner Lemberg14d6b5d2015-08-13 15:22:17 +02003412015-08-13 Werner Lemberg <wl@gnu.org>
342
343 [truetype] Introduce named instance access to GX fonts.
344
345 For functions querying a face, bits 16-30 of the face index can hold
346 the named instance index if we have a GX font. The indices start
347 with value 1; value 0 indicates font access without GX variation
348 data.
349
350 * include/freetype/freetype.h (FT_FaceRec): Update documentation.
351 * include/freetype/internal/sfnt.h: Ditto.
352
353 * src/sfnt/sfobjs.c (sfnt_init_face)
354 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Get number of named instances and
355 do argument checks.
356 (sfnt_load_face): Updated.
357
358 * src/truetype/ttobjs.c (tt_face_init)
359 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Use named instance, overwriting
360 the style name.
361
362 * src/base/ftobjs.c (open_face_from_buffer,
363 open_face_PS_from_sfnt_stream): Updated.
364 * src/bdf/bdfdrivr.c (BDF_Face_Init): Updated.
365 * src/cff/cffload.c (cff_font_load): Updated.
366
367 * src/cff/cffobjs.c (cff_face_init): Make function exit early for
368 pure CFF fonts if `font_index < 0'.
369 Updated.
370
371 * src/cid/cidobjs.c (cid_face_init): Updated.
372 * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated.
373 * src/pfr/pfrobjs.c (pfr_face_init): Updated.
374 * src/type1/t1objs.c (T1_Face_Init): Updated.
375 * src/type42/t42objs.c (T42_Face_Init): Updated.
376 * src/winfonts/winfnt.c (fnt_face_get_dll_font, FNT_Face_Init):
377 Updated.
378
379 * docs/CHANGES: Updated.
380
Alexei Podtelezhnikov4a466862015-08-12 23:45:40 -04003812015-08-12 Alexei Podtelezhnikov <apodtele@gmail.com>
382
383 [type1,cff,cid] Streamline font matrix application.
384
385 * src/type1/t1gload.c (T1_Load_Glyph): Directly modify advances only
386 if font matrix is not trivial.
387 * src/cff/cffgload.c (cff_slot_load): Ditto.
388 * sff/cid/cidgload.c (cid_slot_load_glyph): Ditto for advances and the
389 entire outline.
390
Werner Lemberg7ebe6ac2015-08-11 06:47:25 +02003912015-08-11 Werner Lemberg <wl@gnu.org>
392
393 [builds/unix] Minor.
394
395 * builds/unix/configure.raw:
396 s/lib{priv,staticconf}/libs{priv,staticconf}/ for orthogonality with
397 similarly named uppercase variables.
398
Alexei Podtelezhnikova37da212015-08-10 23:05:02 -04003992015-08-10 Alexei Podtelezhnikov <apodtele@gmail.com>
400
401 [type1,cid,type42] Minor improvements.
402
403 * src/type1/t1load.c (t1_parse_font_matrix): Scale units per EM only
404 when necessary. Refresh comments.
405 * src/cid/cidload.c (cid_parse_font_matrix): Ditto.
406 * src/type42/t42parse.c (t42_parse_font_matrix): Refresh comments.
407
Werner Lemberge5f44692015-08-08 07:45:03 +02004082015-08-08 Werner Lemberg <wl@gnu.org>
409
Werner Lembergbd75a512015-08-08 08:39:45 +0200410 [type42] Fix glyph access.
411
412 This is a severe bug: We've missed one level of indirection, as
413 described in the Type 42 specification. As a result, ftview
414 sometimes showed incorrect glyphs for given glyph names, and even
415 displayed `error 0x0006' (invalid argument!) in case the number of
416 glyph indices differed between the Type 42 font and the embedded
417 TTF.
418
419 Apparently, noone ever noticed it; this shows how much Type 42 fonts
420 are in use...
421
422 * src/type42/t42objs.c (T42_GlyphSlot_Load): Map Type 42 glyph index
423 to embedded TTF's glyph index.
424
4252015-08-08 Werner Lemberg <wl@gnu.org>
426
Werner Lemberge5f44692015-08-08 07:45:03 +0200427 [type42] Minor clean-up.
428
429 * src/type42/t42parse.c (t42_parse_font_matrix): Remove unused
430 variable.
431
Alexei Podtelezhnikovfd705122015-08-06 21:49:08 -04004322015-08-06 Alexei Podtelezhnikov <apodtele@gmail.com>
433
434 [type42] Parse FontMatrix according to specifications.
435
436 * src/type42/t42parse.c (t42_parse_font_matrix): Type 42 FontMatrix
437 does not need scaling by 1000. Units_per_EM are taken from the
438 embedded TrueType.
439
Werner Lembergff406e22015-08-06 07:34:50 +02004402015-08-06 Werner Lemberg <wl@gnu.org>
441
442 [autofit] Improve Arabic hinting.
443
444 Problem reported by Titus Nemeth <tn@tntypography.eu> (by using
445 ttfautohint).
446
447 * src/autofit/afblue.dat: Add neutral blue zone for the tatweel
448 character.
449
450 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
451
Alexei Podtelezhnikov98e8e992015-08-06 00:06:14 -04004522015-08-05 Alexei Podtelezhnikov <apodtele@gmail.com>
453
454 [truetype] Clean up types.
455
456 * src/truetype/ttobjs.c (TT_Size): Move declaration from here.
457 * include/freetype/internal/tttypes.h (TT_Size): ... to here.
458 (TT_LoaderRec): Switch to appropriate types for `face' and `size'.
459 * src/truetype/ttgload.c: Remove corresponding type casts.
460 * src/truetype/ttsubpix.c: Ditto.
461
Werner Lemberg15e2a4f2015-08-05 21:53:50 +02004622015-08-05 Werner Lemberg <wl@gnu.org>
463
464 [autofit] Improve recognition of flat vs. rounded segments.
465
466 Lower the flatness threshold from upem/8 to upem/14, making the
467 auto-hinter accept shorter elements.
468
469 Synchronize flat/round stem selection algorithm with blue zone code.
470
471 * src/autofit/aflatin.c (FLAT_THRESHOLD): New macro.
472 (af_latin_metrics_init_blues): Use it.
473 (af_latin_hints_compute_segments): Collect information on maximum
474 and minimum coordinates of `on' points; use this to add a constraint
475 for the flat/round decision similar to
476 `af_latin_metrics_init_blues'.
477
Werner Lembergeb22ef22015-08-04 06:50:04 +02004782015-08-04 Werner Lemberg <wl@gnu.org>
479
480 Another left-shift bug (#45681).
481
482 * src/base/ftobjs.c (IsMacBinary): Only accept positive values for
483 `dlen'.
484
Alexei Podtelezhnikov7e6c3212015-08-03 23:26:13 -04004852015-08-03 Alexei Podtelezhnikov <apodtele@gmail.com>
486
487 [base] Fix `ft_corner_orientation'.
488
489 Remove casting from `FT_Long' to `FT_Int' that might change the sign
490 of the return value and make it faster too.
491
492 * src/base/ftcalc.c (ft_corner_orientation): On 32-bit systems, stay
493 with 32-bit arithmetic when safe. Use plain math on 64-bit systems.
494 * src/pshinter/pshalgo.c: Remove old unused code.
495
Werner Lembergca6a5cf2015-08-03 08:51:18 +02004962015-08-03 Werner Lemberg <wl@gnu.org>
497
Werner Lemberg8dfc7602015-08-03 12:23:30 +0200498 * src/truetype/ttgload.c (load_truetype_glyph)
499 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Fix crash for composite glyphs
500 having a depth greater than 1.
501
5022015-08-03 Werner Lemberg <wl@gnu.org>
503
Werner Lembergca6a5cf2015-08-03 08:51:18 +0200504 Fix typo in clang bug from 2015-07-31 (#45678).
505
506 * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Fix inequality.
507
Werner Lemberg70e9d812015-08-02 09:42:12 +02005082015-08-02 Werner Lemberg <wl@gnu.org>
509
Werner Lemberga82c45d2015-08-02 18:35:49 +0200510 * CMakeLists.txt: Improve shared library support.
511
512 Based on a patch from John Cary <cary@txcorp.com>.
513
5142015-08-02 Werner Lemberg <wl@gnu.org>
515
Werner Lemberg682c2712015-08-02 15:46:26 +0200516 * builds/unix/freetype-config.in (enable_shared): Remove. Unused.
517
5182015-08-02 Werner Lemberg <wl@gnu.org>
519
Werner Lemberg70e9d812015-08-02 09:42:12 +0200520 Fix more invalid left-shifts.
521
522 * src/pfr/pfrgload.c (pfr_glyph_load_compound): Use multiplication,
523 not left-shift.
524
525 * src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar,
526 tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Use multiplication,
527 not left-shift.
528
Werner Lemberg5d1b8ab2015-07-31 21:49:07 +02005292015-07-31 Werner Lemberg <wl@gnu.org>
530
Werner Lemberg6343ba22015-08-01 07:53:48 +0200531 Fix some bugs found by clang's `-fsanitize=undefined' (#45661).
532
533 * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Only accept
534 positive values from header.
535 Check overflow.
536
537 * src/base/ftoutln.c (SCALED): Correctly handle left-shift of
538 negative values.
539
540 * src/bdf/bdf.h (_bdf_glyph_modified, _bdf_set_glyph_modified,
541 _bdf_clear_glyph_modified): Use unsigned long constant.
542
543 * src/bdf/bdfdrivr.c (BDF_Size_Select, BDF_Glyph_Load): Don't
544 left-shift values that can be negative.
545
546 * src/pcf/pcfdrivr.c (PCF_Size_Select, PCF_Glyph_Load): Don't
547 left-shift values that can be negative.
548
549 * src/raster/ftraster.c (SCALED): Correctly handle left-shift of
550 negative values.
551
552 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Don't left-shift
553 values that can be negative.
554
555 * src/truetype/ttgload.c (TT_Load_Composite_Glyph,
556 compute_glyph_metrics, load_sbit_image): Don't left-shift values
557 that can be negative.
558
5592015-07-31 Werner Lemberg <wl@gnu.org>
560
Werner Lemberg5d1b8ab2015-07-31 21:49:07 +0200561 Define FT_LONG_MAX.
562
563 * include/freetype/config/ftstdlib.h (FT_LONG_MAX): New macro.
564 * src/cff/cf2arrst.c (cf2_arrstack_setNumElements): Use it.
565
5662015-07-28 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov2b07a5a2015-07-28 23:14:30 -0400567
568 * src/base/ftcalc.c (FT_Vector_NormLen): Clarify.
569
Werner Lemberg5d1b8ab2015-07-31 21:49:07 +02005702015-07-27 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikove8b186e2015-07-27 23:22:34 -0400571
572 * src/base/ftcalc.c (FT_Vector_NormLen): Explicate type conversions.
573
Matthias Clasenb650dfb2015-07-26 21:08:34 +02005742015-07-26 Matthias Clasen <matthias.clasen@gmail.com>
575
576 [cff] Don't use `hmtx' table for LSB (#45520).
577
578 * src/cff/cffgload.c (cff_slot_load): Use `htmx' table for advance
579 width only. Bug introduced 2015-04-10.
580
Werner Lembergf9be5672015-07-09 15:10:31 +02005812015-07-09 Werner Lemberg <wl@gnu.org>
582
583 Better support of user-supplied C++ namespaces.
584
585 See
586
587 http://lists.nongnu.org/archive/html/freetype-devel/2015-07/msg00008.html
588
589 for a rationale.
590
591 * src/autofit/afpic.h, src/base/basepic.h, src/cff/cffpic.h,
592 src/pshinter/pshpic.h, src/psnames/pspic.h, src/raster/rastpic.h,
593 src/sfnt/sfntpic.h, src/smooth/ftspic.h, src/truetype/ttpic.h
594 (FT_BEGIN_HEADER, FT_END_HEADER): Move macro calls to not enclose
595 header files that contain FT_{BEGIN,END}_HEADER macros by
596 themselves.
597
598 * src/autofit/aftypes.h [FT_DEBUG_AUTOFIT]: Include
599 FT_CONFIG_STANDARD_LIBRARY_H earlier.
600
601 * src/truetype/ttpic.h: Include FT_INTERNL_PIC_H.
602
Werner Lemberg1cdac102015-07-07 14:04:44 +02006032015-07-07 Werner Lemberg <wl@gnu.org>
604
605 [sfnt] Make `tt_face_get_name' member of the SFNT interface.
606
607 * include/freetype/internal/sfnt.h (TT_Get_Name_Func): New
608 prototype.
609 (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): New member `get_name'.
610
611 * src/sfnt/sfdriver.c (sfnt_interface): Updated.
612
613 * src/sfnt/sfobjs.c (tt_face_get_name): Tag it with `LOCAL_DEF'.
614 * src/sfnt/sfobjs.h: Add prototype for it.
615
Werner Lembergeb1bba92015-06-30 09:46:39 +02006162015-06-30 Werner Lemberg <wl@gnu.org>
617
618 Fix some clang compiler warnings.
619
620 * src/base/ftoutln.c (FT_Outline_EmboldenXY), src/cff/cf2intrp.c
621 (cf2_interpT2CharString), src/truetype/ttgload.c
622 (load_truetype_glyph), src/truetype/ttgxvar.c (tt_handle_deltas),
623 src/truetype/ttinterp.c (Ins_INSTCTRL): Fix signedness issues.
624
Alexei Podtelezhnikov884e4e62015-06-29 22:32:05 -04006252015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
626
Alexei Podtelezhnikov5aaabb42015-06-29 22:46:54 -0400627 [truetype] Speed up bytecode interpreter.
628
629 * src/truetype/ttinterp.c (Normalize): Use `FT_Vector_NormLen'.
630
6312015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
632
Alexei Podtelezhnikov9ef02bd2015-06-29 22:39:10 -0400633 [base] Speed up emboldening.
634
Werner Lembergeb1bba92015-06-30 09:46:39 +0200635 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Use
636 `FT_Vector_NormLen'.
Alexei Podtelezhnikov9ef02bd2015-06-29 22:39:10 -0400637
6382015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
639
Alexei Podtelezhnikov884e4e62015-06-29 22:32:05 -0400640 [base] Implement fast vector normalization.
641
642 The function uses Newton's iterations instead of dividing vector
643 components by its length, which needs a square root. This is,
644 literally, a bit less accurate but a lot faster.
645
646 * src/base/ftcalc.c (FT_Vector_NormLen): New function.
647
Werner Lemberg22479ca2015-06-28 10:26:33 +02006482015-06-28 Werner Lemberg <wl@gnu.org>
649
Werner Lemberg7cdc77f2015-06-28 11:40:02 +0200650 * CMakeLists.txt: Always create `ftconfig.h'.
651
652 For non-UNIX builds, the file stays unmodified. However, it's
653 better to have the main configuration files at the same place
654 regardless of the OS.
655
6562015-06-28 Werner Lemberg <wl@gnu.org>
657
Werner Lemberg2c89e2c2015-06-28 11:06:47 +0200658 * CMakeLists.txt: Improve MSVC support (#43737).
659
6602015-06-28 Werner Lemberg <wl@gnu.org>
661
Werner Lemberg52c9b1a2015-06-28 11:03:10 +0200662 [cmake] Check for libraries and create `ftoption.h'.
663
664 * builds/FindHarfBuzz.cmake: New file, taken from
665
666 https://trac.webkit.org/browser/trunk/Source/cmake/FindHarfBuzz.cmake
667
668 * CMakeLists.Txt: Add path to local cmake modules.
669 Find dependencies for zlib, bzip2, libpng, and harfbuzz.
670 Create `ftoption.h' file.
671 Set up include and linker stuff for libraries.
672
6732015-06-28 Werner Lemberg <wl@gnu.org>
674
Werner Lemberg97b757d2015-06-28 10:42:47 +0200675 * CMakeLists.txt: Fix creation of `ftconfig.h'.
676 Check for UNIX header files using `check_include_file'.
677 Set up correct header include directories.
678
6792015-06-28 Werner Lemberg <wl@gnu.org>
680
Werner Lemberg22479ca2015-06-28 10:26:33 +0200681 * CMakeLists.txt: Disallow in-source builds.
682
Werner Lemberg802f6a92015-06-27 07:12:42 +02006832015-06-27 Werner Lemberg <wl@gnu.org>
684
685 * src/tools/docmaker/utils.py (check_output): Add missing `\n'.
686
Werner Lemberg94c79c22015-06-26 06:46:59 +02006872015-06-26 Werner Lemberg <wl@gnu.org>
688
Werner Lemberg802f6a92015-06-27 07:12:42 +0200689 * CMakeLists.txt: Select platform-dependent `ftdebug.c'.
Werner Lemberg94c79c22015-06-26 06:46:59 +0200690
Werner Lemberg392cf222015-06-25 13:04:57 +02006912015-06-25 Werner Lemberg <wl@gnu.org>
692
Werner Lemberg68222dd2015-06-25 16:38:11 +0200693 * CMakeLists.txt: Use cmake functions for generating `ftconfig.h'.
694 Additionally, do this for UNIX only.
695
6962015-06-25 Werner Lemberg <wl@gnu.org>
697
Werner Lemberg5ef5a4f2015-06-25 15:45:13 +0200698 * CMakeLists.txt (BASE_SRCS): Use `ftbase.c' and `psnames.c'.
699
7002015-06-25 Werner Lemberg <wl@gnu.org>
701
Werner Lemberg392cf222015-06-25 13:04:57 +0200702 Another adjustment to header locations.
703
704 This change is a result of a discussion thread on freetype-devel
705
706 http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html
707
708 Re-introduce the `freetype2' subdirectory for all FreeType header
709 files after installation, and rename the `freetype2' subdirectory in
710 the git repository to `freetype'.
711
712 * include/freetype2: Renamed to...
713 * include/freetype: This.
714
715 * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
716 PRIVATE_HEADERS): Updated.
717 Update creation of `ftconfig.h'.
718 Install generated `ftconfig.h'.
719
720 * Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
721
722 * builds/amiga/include/config/ftconfig.h, builds/freetype.mk
723 (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
724 builds/unix/freetype2.in: Updated.
725
726 * builds/unix/freetype-config.in: Updated.
727 * builds/unix/configure.raw: Don't check for `rmdir'.
728 * builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable
729 according to the autoconf info manual.
730 * builds/unix/install.mk (install, uninstall,
731 distclean_project_unix): Update and simplify.
732
733 * builds/wince/*, builds/windows/*: Updated.
734
735 * devel/ft2build.h, include/ft2build.h: Updated.
736
737 * include/freetype2/config/ftheader.h,
738 include/freetype2/internal/ftserv.h,
739 include/freetype2/internal/internal.h: Update all header file
740 macros.
741
742 * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
743
744 * docs/*: Updated.
745
Werner Lemberg1982a882015-06-26 06:52:34 +02007462015-06-24 Alexei Podtelezhnikov <apodtele@gmail.com>
747
748 * src/bdf/bdflib.c (_bdf_parse_start): Disallow 0 bpp.
749
7502015-06-24 Alexei Podtelezhnikov <apodtele@gmail.com>
751
752 * src/bdf/bdflib.c (_bdf_parse_start): Simplify bpp parsing.
753
Werner Lemberg59312682015-06-23 09:24:48 +02007542015-06-23 Werner Lemberg <wl@gnu.org>
755
756 s/TYPEOF/FT_TYPEOF/ (#45376).
757
758 * builds/unix/ftconfig.in, builds/vms/ftconfig.in,
759 include/freetype2/config/ftconfig.h,
760 include/freetype2/internal/ftobjs.h, src/autofit/afwarp.h: Do it.
761
Werner Lemberg8502c982015-06-22 06:35:23 +02007622015-06-22 Werner Lemberg <wl@gnu.org>
763
764 Fix Savannah bug #45097.
765
766 We no longer `pollute' the namespace of possible header file names;
767 instead we move `ft2build.h' up by one level so that it gets
768 installed in the default include directory (e.g.,
769 /usr/local/include). After this commit, only `ft2build.h' stays in
770 the compiler's include path.
771
772 No visible changes for the user who follows the standard FreeType
773 header inclusion rules.
774
775 * include/*: Move to ...
776 * include/freetype2/*: This directory, except `ft2build.h'.
777
778 * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
779 PRIVATE_HEADERS), Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
780
781 * builds/amiga/include/config/ftconfig.h, builds/freetype.mk
782 (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
783 builds/unix/install.mk (install, uninstall),
784 builds/unix/freetype2.in: Updated.
785
786 * builds/unix/freetype-config.in: Updated.
787 Emit -I directory only if it is not `/usr/include'.
788
789 * builds/wince/*, builds/windows/*: Updated.
790
791 * devel/ft2build.h, include/ft2build.h: Updated.
792
793 * include/freetype2/config/ftheader.h,
794 include/freetype2/internal/ftserv.h,
795 include/freetype2/internal/internal.h: Update all header file
796 macros.
797
798 * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
799
Werner Lemberg31d97df2015-06-21 19:12:12 +02008002015-06-21 Werner Lemberg <wl@gnu.org>
801
802 Make Jam support work again.
803
804 This is just very basic stuff and just a little bit tested on
805 GNU/Linux only. I won't delve into this since I'm not a Jam user.
806
807 * Jamfile: Call `HDRMACRO' for `ftserv.h' also.
808 (DEFINES): Replace with...
809 (CCFLAGS): ... this.
810
811 * src/Jamfile: Don't call `HDRMACRO' for `internal.h'; this is
812 already handled in the top-level Jamfile.
813
814 * src/autofit/Jamfile (DEFINES): Replace with...
815 (CCFLAGS): ... this.
816 (_sources): Add missing files.
817
818 * src/cache/Jamfile: Don't call `HDRMACRO' for `ftcache.h'; it no
819 longer contains macro header definitions.
820
821 * src/base/Jamfile, src/cff/Jamfile, src/sfnt/Jamfile,
822 src/truetype/Jamfile (_sources): Add missing files.
823
Werner Lemberg1a147ac2015-06-16 10:20:07 +02008242015-06-16 Werner Lemberg <wl@gnu.org>
825
826 Fix Savannah bug #45326.
827
828 * src/sfnt/sfntpic.h (SFNT_SERVICES_GET): Remove duplicate
829 definitions.
830
Werner Lemberge1862302015-06-07 16:11:18 +02008312015-06-07 Werner Lemberg <wl@gnu.org>
832
833 * Version 2.6 released.
834 =======================
835
836
837 Tag sources with `VER-2-6'.
838
839 * docs/VERSION.DLL: Update documentation and bump version number to
840 2.6.
841
842 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
843 builds/windows/vc2005/index.html,
844 builds/windows/vc2008/freetype.vcproj,
845 builds/windows/vc2008/index.html,
846 builds/windows/vc2010/freetype.vcxproj,
847 builds/windows/vc2010/index.html,
848 builds/windows/visualc/freetype.dsp,
849 builds/windows/visualc/freetype.vcproj,
850 builds/windows/visualc/index.html,
851 builds/windows/visualce/freetype.dsp,
852 builds/windows/visualce/freetype.vcproj,
853 builds/windows/visualce/index.html,
854 builds/wince/vc2005-ce/freetype.vcproj,
855 builds/wince/vc2005-ce/index.html,
856 builds/wince/vc2008-ce/freetype.vcproj,
857 builds/wince/vc2008-ce/index.html: s/2.5.5/2.6/, s/255/26/.
858
859 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 6.
860 (FREETYPE_PATCH): Set to 0.
861
862 * builds/unix/configure.raw (version_info): Set to 18:0:12.
863 * CMakeLists.txt (VERSION_MINOR): Set to 0.
864 (VERSION_PATCH): Set to 6.
865
866 * src/autofit/afmodule.c [!FT_MAKE_OPTION_SINGLE_OBJECT]: Add
867 declarations for dumping functions.
868
869 * src/truetype/ttinterp.c (TT_New_Context): Pacify compiler.
870
871 * builds/toplevel.mk: Use `freetype.mk's code to compute the version
872 string.
873 Don't include a zero patch level in version string.
874 * builds/freetype.mk: Remove code for computing the version string.
875
Ashish Azad472119a2015-06-06 05:45:17 +02008762015-06-06 Ashish Azad <ashish.azad@samsung.com>
877
878 Fix Savannah bug #45260.
879
880 * src/pfr/pfrdrivr.c (pfr_get_kerning): Fix typo.
881
Werner Lemberg75534a02015-06-03 00:54:09 +02008822015-06-03 Werner Lemberg <wl@gnu.org>
883
884 [truetype] Fix memory leak.
885
886 Problem reported by Grissiom <chaos.proton@gmail.com>; in
887
888 http://lists.nongnu.org/archive/html/freetype/2015-05/msg00013.html
889
890 there is an example code to trigger the bug.
891
892 * src/truetype/ttobjs.c (tt_size_init_bytecode): Free old `size'
893 data before allocating again. Bug most probably introduced four
894 years ago in version 2.4.3.
895
8962015-06-02 Werner Lemberg <wl@gnu.org>
Werner Lemberg54d04282015-06-01 12:12:06 +0200897
Werner Lembergd1ade6d2015-06-02 11:44:52 +0200898 [raster] Add more tracing.
899
900 * src/raster/ftraster.c (FT_TRACE7) [_STANDALONE_]: Define.
901 (Vertical_Sweep_Span, Vertical_Sweep_Drop, Horizontal_Sweep_Span,
902 Horizontal_Sweep_Drop, Render_Glyph): Add tracing calls.
903
9042015-06-01 Werner Lemberg <wl@gnu.org>
905
Werner Lemberg54d04282015-06-01 12:12:06 +0200906 [truetype] While tracing opcodes, show code position and stack.
907
908 * src/truetype/ttinterp.c: Change all existing TRACE7 calls to
909 TRACE6.
910 (opcode_name): Add string lengths.
911 (TT_RunIns): Implement display of code position and stack.
912
Werner Lembergcdee7d12015-05-31 11:54:42 +02009132015-05-31 Werner Lemberg <wl@gnu.org>
914
Werner Lemberge9df4e42015-05-31 12:21:34 +0200915 [truetype] In GX, make private point numbers work correctly.
916
917 This is completely missing in Apple's documentation: If a `gvar'
918 tuple uses private point numbers (this is, deltas are specified for
919 some points only), the uncovered points must be interpolated for
920 this tuple similar to the IUP bytecode instruction. Examples that
921 need this functionality are glyphs `Oslash' and `Q' in Skia.ttf.
922
923 * src/truetype/ttgxvar.c (tt_delta_shift, tt_delta_interpolate,
924 tt_handle_deltas): New functions.
925 (TT_Vary_Get_Glyph_Deltas): Renamed to...
926 (TT_Vary_Apply_Glyph_Deltas): ... this; it directly processes the
927 points and does no longer return an array of deltas.
928 Add tracing information.
929 Call `tt_handle_deltas' to interpolate missing deltas.
930 Also fix a minor memory leak in case of error.
931
932 * src/truetype/ttgxvar.h: Updated.
933
934 * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
935 load_truetype_glyph): Updated.
936
9372015-05-31 Werner Lemberg <wl@gnu.org>
938
Werner Lemberg9845c1d2015-05-31 11:57:31 +0200939 [truetype] In GX, make intermediate tuplets work at extrema.
940
941 * src/truetype/ttgxvar.c (ft_var_apply_tuple): Fix range condition.
942
9432015-05-31 Werner Lemberg <wl@gnu.org>
944
Werner Lembergcdee7d12015-05-31 11:54:42 +0200945 [truetype] Add tracing information to GX code.
946
947 * src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar,
948 ft_var_apply_tuple, TT_Get_MM_Var, TT_Set_MM_Blend,
949 TT_Set_Var_Design, tt_face_vary_cvt): Do it.
950
Werner Lemberg366b2ea2015-05-28 10:58:40 +02009512015-05-28 Werner Lemberg <wl@gnu.org>
952
953 * src/tools/apinames.c (names_dump): Fix invalid reference.
954
955 Problem reported by Guzman Mosqueda, Jose R
956 <jose.r.guzman.mosqueda@intel.com>.
957
Werner Lemberga5e1f6f2015-05-24 23:29:23 +02009582015-05-24 Werner Lemberg <wl@gnu.org>
959
960 [truetype] Fix commit from 2015-05-22.
961
962 * src/truetype/ttgload.c, src/truetype/ttinterp.c: Guard new code
963 with `TT_CONFIG_OPTION_SUBPIXEL_HINTING'.
964
965 Problem reported by Nikolaus Waxweiler <madigens@gmail.com>.
966
Werner Lembergbb435da2015-05-23 07:21:25 +02009672015-05-23 Werner Lemberg <wl@gnu.org>
968
Werner Lemberg7f099482015-05-24 09:50:24 +0200969 [truetype] Fix return values of GETINFO bytecode instruction.
970
971 * src/truetype/ttinterp.h (TT_ExecContextRec): New fields
972 `vertical_lcd' and `gray_cleartype'.
973
974 * src/truetype/ttgload.c (tt_loader_init): Initialize new fields.
975 Change `symmetrical smoothing' to TRUE, since FreeType produces
976 exactly this.
977
978 * src/truetype/ttinterp.c (Ins_GETINFO): Fix selector/return bit
979 values for symmetrical smoothing, namely 11/18.
980 Handle bits for vertical LCD subpixels (8/15) and Gray ClearType
981 (12/19).
982
9832015-05-23 Werner Lemberg <wl@gnu.org>
984
Werner Lembergbb435da2015-05-23 07:21:25 +0200985 [truetype] Minor.
986
987 * src/truetype/ttinterp.h (TT_ExecContext):
988 s/subpixel/subpixel_hinting.
989
990 * src/truetype/ttgload.c, src/truetype/ttgload.h: Updated.
991
9922015-05-22 Werner Lemberg <wl@gnu.org>
Werner Lemberg790b8df2015-05-20 12:33:40 +0200993
Werner Lembergc61cad82015-05-22 22:02:15 +0200994 [truetype] Support selector index 3 of the INSTCTRL instruction.
995
996 This flag activates `native ClearType hinting', disabling backwards
997 compatibility mode as described in Greg Hitchcocks whitepaper. In
998 other words, it enables unrestricted functionality of all TrueType
999 instructions in ClearType.
1000
1001 * src/truetype/ttgload.c (tt_get_metrics): Call `sph_set_tweaks'
1002 unconditionally.
1003 (tt_loader_init): Unset `ignore_x_mode' flag if bit 2 of
1004 `GS.instruct_control' is active.
1005
1006 * src/truetype/ttinterp.c (Ins_INSTCTRL): Handle selector index 3.
1007 (Ins_GETINFO): Updated.
1008
1009 * docs/CHANGES: Document it.
1010
10112015-05-20 Werner Lemberg <wl@gnu.org>
1012
Werner Lemberg790b8df2015-05-20 12:33:40 +02001013 [truetype] Minor.
1014
1015 * src/truetype/ttinterp.h (SetSuperRound): Fix type of `GridPeriod'
1016 argument.
1017
Werner Lemberg0a6b6ff2015-05-17 22:54:48 +020010182015-05-17 Werner Lemberg <wl@gnu.org>
1019
1020 [truetype] Fix loading of composite glyphs.
1021
1022 * src/truetype/ttgload.c (TT_Load_Composite_Glyph): If the
1023 ARGS_ARE_XY_VALUES flag is not set, handle argument values as
1024 unsigned. I trust `ttx' (which has exactly such code) that it does
1025 the right thing here...
1026
1027 The reason that noone has ever noticed this bug is probably the fact
1028 that point-aligned subglyphs are rare, as are subglyphs with a
1029 number of points in the range [128;255], which is quite large (or
1030 even in the range [32768;65535], which is extremely unlikely).
1031
Chris Liddelld65bf722015-05-12 07:16:46 +020010322015-05-12 Chris Liddell <chris.liddell@artifex.com>
1033
Chris Liddella87fb8c2015-05-12 07:27:35 +02001034 [cff] Make the `*curveto' operators more tolerant.
1035
1036 * src/cff/cf2intrp.c (cf2_interpT2CharString): The opcodes
1037 `vvcurveto', `hhcurveto', `vhcurveto', and `hvcurveto' all iterate,
1038 pulling values off the stack until the stack is exhausted.
1039 Implicitly the stack must be a multiple (or for subtly different
1040 behaviour) a multiple plus a specific number of extra values deep.
1041 If that's not the case, enforce it (as the old code did).
1042
10432015-05-12 Chris Liddell <chris.liddell@artifex.com>
1044
Chris Liddelld65bf722015-05-12 07:16:46 +02001045 [cff] fix incremental interface with new cff code.
1046
1047 * src/cff/cf2ft.c (cf2_getSeacComponent): When using the incremental
1048 interface to retrieve glyph data for a SEAC, it be left to the
1049 incremental interface callback to apply the encoding to raw
1050 character index (as it was in the previous code).
1051
Alexei Podtelezhnikov40914952015-04-29 21:57:30 -040010522015-04-29 Alexei Podtelezhnikov <apodtele@gmail.com>
1053
1054 [autofit] Speed up IUP.
1055
1056 * src/autofit/afhints.c (af_iup_interp): Separate trivial snapping to
1057 the same position from true interpolation, use `scale' to reduce
1058 divisions.
1059
Werner Lemberg3cc076d2015-04-28 09:16:27 +020010602015-04-28 Werner Lemberg <wl@gnu.org>
1061
1062 [cff] Use `name' table for PS name if we have a SFNT-CFF.
1063
1064 This follows the OpenType 1.7 specification. See
1065
1066 http://tug.org/pipermail/tex-live/2015-April/036634.html
1067
1068 for a discussion.
1069
1070 * src/cff/cffdrivr.c (cff_get_ps_name): Use the `sfnt' service if we
1071 have an SFNT.
1072
Alexei Podtelezhnikov40623a12015-04-27 22:27:00 -040010732015-04-27 Alexei Podtelezhnikov <apodtele@gmail.com>
1074
1075 [truetype] Speed up IUP.
1076
1077 * src/truetype/ttinterp.c (_iup_worker_interpolate): Separate trivial
1078 snapping to the same position from true interpolation.
1079
Werner Lemberg12661a52015-04-21 07:13:59 +020010802015-04-21 Werner Lemberg <wl@gnu.org>
1081
Werner Lemberg14df6b12015-04-22 11:14:35 +02001082 [autofit] By default, enable warping code but switch off warping.
1083
1084 Suggested by Behdad.
1085
1086 * include/config/ftoption.h: Define AF_CONFIG_OPTION_USE_WARPER.
1087
1088 * src/autofit/afmodule.c (af_autofitter_init): Initialize `warping'
1089 with `false'.
1090
10912015-04-21 Werner Lemberg <wl@gnu.org>
1092
Werner Lembergd164f702015-04-21 07:51:41 +02001093 * docs/CHANGES: Updated.
1094
10952015-04-21 Werner Lemberg <wl@gnu.org>
1096
Werner Lemberg12661a52015-04-21 07:13:59 +02001097 [autofit] Introduce `warping' property.
1098
1099 This code replaces the debugging hook from the previous commit with
1100 a better, more generic solution.
1101
1102 * include/ftautoh.h: Document it.
1103
1104 * src/autofit/afmodule.h (AF_ModuleRec)
1105 [AF_CONFIG_OPTION_USE_WARPER]: Add `warping' field.
1106
1107 * src/autofit/afmodule.c (_af_debug_disable_warper): Remove.
1108 (af_property_set, af_property_get, af_autofitter_init)
1109 [AF_CONFIG_OPTION_USE_WARPER]: Handle `warping' option.
1110
1111 * src/autofit/afhints.h (AF_HINTS_DO_WARP): Remove use of the no
1112 longer existing `_af_debug_disable_warper'.
1113
1114 * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c
1115 (af_latin_hints_init), src/autofit/aflatin2.c (af_latin2_hints_init)
1116 [AF_CONFIG_OPTION_USE_WARPER]: Add `AF_SCALER_FLAG_NO_WARPER' to the
1117 scaler flags if warping is off.
1118
1119 * src/autofit/aftypes.h: Updated.
1120
Werner Lemberg58f48f02015-04-16 20:11:49 +020011212015-04-16 Werner Lemberg <wl@gnu.org>
1122
1123 [autofit] Add debugging hook to disable warper.
1124
1125 * src/autofit/afmodule.c (_af_debug_disable_warper)
1126 [FT_DEBUG_AUTOFIT]: New global variable.
1127
1128 * src/autofit/aftypes.h: Updated.
1129 (AF_SCALER_FLAG_NO_WARPER): New macro (not actively used yet).
1130
1131 * src/autofit/afhints.h (AF_HINTS_DO_WARP): New macro.
1132
1133 * src/autofi/aflatin.c (af_latin_hints_apply)
1134 [AF_CONFIG_OPTION_USE_WARPER]: Use `AF_HINTS_DO_WARP' to control use
1135 of warper.
1136
1137 * src/autofit/afcjk.c (af_cjk_hints_init, af_cjk_hints_apply)
1138 [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'.
1139
1140 * src/autofit/aflatin2.c (af_latin2_hints_apply)
1141 [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'.
1142
Werner Lemberg5cd21552015-04-10 07:01:01 +020011432015-04-10 Werner Lemberg <wl@gnu.org>
1144
1145 [cff] Update advance width handling to OpenType 1.7.
1146
1147 Problem reported by Behdad.
1148
1149 * src/cff/cffdrivr.c (cff_get_advances): Handle SFNT case
1150 separately.
1151
1152 * src/cff/cffgload.c (cff_slot_load): Use advance width and side
1153 bearing values from `hmtx' table if present.
1154
Alexei Podtelezhnikov67b912d2015-04-03 22:38:11 -040011552015-04-03 Alexei Podtelezhnikov <apodtele@gmail.com>
1156
1157 * src/autofit/afhints.c (af_glyph_hints_reload): Use do-while loop.
1158
Alexei Podtelezhnikov770b5d02015-04-02 23:15:36 -040011592015-04-02 Alexei Podtelezhnikov <apodtele@gmail.com>
1160
1161 * src/autofit/aflatin.c (af_latin_hint_edges): Reduce logic.
1162
11632015-04-01 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov886f4d02015-04-01 22:57:43 -04001164
1165 [autofit] Finish the thought.
1166
1167 * src/autofit/afhints.c (af_direction_compute): make sure the long arm
1168 is never negative so that its `FT_ABS' is not necessary.
1169
Werner Lemberg16217e52015-04-01 13:13:56 +020011702015-04-01 Werner Lemberg <wl@gnu.org>
1171
Werner Lemberga2fa6572015-04-01 15:55:41 +02001172 [autofit] Call dumper functions for tracing.
1173
1174 * src/autofit/afcjk.c (af_cjk_hints_apply): Remove dead code.
1175 * src/autofit/afhints.c (af_glyph_hints_dump_points): Minor
1176 improvement.
1177 * src/autofit/afmodule.c (af_autofitter_load_glyph): Implement it.
1178
11792015-04-01 Werner Lemberg <wl@gnu.org>
1180
Werner Lembergdb8df792015-04-01 13:30:55 +02001181 [autofit] Make debugging stuff work again.
1182
1183 The interface to ftgrid was broken in the series of commits starting
1184 with
1185
1186 [autofit] Allocate AF_Loader on the stack instead of AF_Module.
1187
1188 from 2015-01-14.
1189
1190 * src/autofit/afmodule.c (_af_debug_hints_rec) [FT_DEBUG_AUTOFIT]:
1191 Use a global AF_GlyphHintsRec object for debugging.
1192 (af_autofitter_done, af_autofitter_load_glyph): Updated.
1193
1194 * src/autofit/afloader.c (af_loader_init, af_loader_done): Updated.
1195
11962015-04-01 Werner Lemberg <wl@gnu.org>
1197
Werner Lemberg16217e52015-04-01 13:13:56 +02001198 * src/autofit/afhints.c (af_glyph_hints_done): Fix minor thinko.
1199
Werner Lemberg10e2bb82015-03-29 13:32:47 +020012002015-03-29 Werner Lemberg <wl@gnu.org>
1201
Werner Lembergf353a382015-03-29 14:47:49 +02001202 [cff] Fix Savannah bug #44629.
1203
1204 * src/cff/cf2font.h (CF2_MAX_SUBR), src/cff/cffgload.h
1205 (CFF_MAX_SUBRS_CALLS): Set to 16.
1206
12072015-03-29 Werner Lemberg <wl@gnu.org>
1208
Werner Lemberg10e2bb82015-03-29 13:32:47 +02001209 [type1, truetype] Make the MM API more flexible w.r.t. `num_coords'.
1210
1211 This commit allows `num_coords' to be larger or smaller than the
1212 number of available axes while selecting a design instance, either
1213 ignoring excess data or using defaults if data is missing.
1214
1215 * src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design):
1216 Implement it.
1217
1218 * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design,
1219 T1_Set_Var_Design): Ditto.
1220
12212015-03-29 Werner Lemberg <wl@gnu.org>
Werner Lemberg8ce30262015-03-27 08:33:47 +01001222
Werner Lembergdd5d6d72015-03-29 10:04:22 +02001223 [type1] Minor.
1224
1225 * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design): Use
1226 FT_THROW.
1227 (T1_Set_Var_Design): Use T1_MAX_MM_AXIS and FT_THROW.
1228
12292015-03-27 Werner Lemberg <wl@gnu.org>
1230
Werner Lemberg8ce30262015-03-27 08:33:47 +01001231 [cff] Trace charstring nesting levels.
1232
1233 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdCALLGSUBR,
1234 cf2_cmdCALLSUBR, cf2_cmdRETURN>: Implement it.
1235
1236 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
1237 <cff_op_callsubr, cff_op_callgsubr, cff_op_return>: Ditto.
1238
Alexei Podtelezhnikovdac56442015-03-21 23:30:16 -040012392015-03-21 Alexei Podtelezhnikov <apodtele@gmail.com>
1240
1241 [base] Optimize `FT_Angle_Diff'.
1242
1243 Under normal circumstances we are usually close to the desired range
1244 of angle values, so that the remainder is not really necessary.
1245
1246 * src/base/fttrigon.c (FT_Angle_Diff): Use loops instead of remainder.
1247
1248 * src/autofit/aftypes.h (AF_ANGLE_DIFF): Ditto in the unused macro.
1249
Werner Lemberg6cc425d2015-03-21 06:51:07 +010012502015-03-21 Werner Lemberg <wl@gnu.org>
1251
1252 [truetype] Improve `gvar' handling.
1253
1254 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Correctly handle
1255 single-element runs. Cf. glyph `Q' in Skia.ttf with weights larger
1256 than the default.
1257
Alexei Podtelezhnikov2d7284e2015-03-20 21:34:19 -040012582015-03-20 Alexei Podtelezhnikov <apodtele@gmail.com>
1259
1260 * src/base/fttrigon.c (FT_Vector_Rotate): Minor refactoring.
1261
Alexei Podtelezhnikov6a171722015-03-17 22:43:08 -040012622015-03-17 Alexei Podtelezhnikov <apodtele@gmail.com>
1263
1264 Fix Savannah bug #44412 (part 2).
1265
1266 * src/base/fttrigon.c (FT_Sin, FT_Cos, FT_Tan): Call `FT_Vector_Unit'.
1267
Werner Lemberg06339952015-03-11 06:30:23 +010012682015-03-11 Werner Lemberg <wl@gnu.org>
1269
Werner Lembergd3284462015-03-11 16:45:58 +01001270 [autofit] Add support for Arabic script.
1271
1272 Thanks to Titus Nemeth <tn@tntypography.eu> for guidance!
1273
1274 * src/autofit/afblue.dat: Add blue zone data for Arabic.
1275
1276 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1277
1278 * src/autofit/afscript.h: Add Arabic standard characters.
1279
1280 * src/autofit/afranges.c: Add Arabic data.
1281
1282 * src/autofit/afstyles.h: Add Arabic data.
1283
1284 * docs/CHANGES: Document it.
1285
12862015-03-11 Werner Lemberg <wl@gnu.org>
1287
Werner Lemberga4516382015-03-11 08:09:13 +01001288 Rename `svxf86nm.h' to `svfntfmt.h'; update related symbols.
1289
1290 * include/internal/ftserv.h (FT_SERVICE_XFREE86_NAME_H): Renamed
1291 to...
1292 (FT_SERVICE_FONT_FORMAT_H): This.
1293
1294 * include/internal/services/svfntfmt.h (FT_XF86_FORMAT_*): Renamed
1295 to ...
1296 (FT_FONT_FORMAT_*): This.
1297
1298 src/base/ftfntfmt.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c,
1299 src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c,
1300 src/truetype/ttdriver.c, src/type1/t1driver.c,
1301 src/type42/t42drivr.c, src/winfonts/winfnt.c: Updated.
1302
13032015-03-11 Werner Lemberg <wl@gnu.org>
1304
Werner Lembergdd7028c2015-03-11 07:45:05 +01001305 [base] Rename `FT_XFREE86_H' to `FT_FONT_FORMATS_H'.
1306
1307 * include/config/ftheader.h: Implement it.
1308 * src/base/ftfntfmt.c, docs/CHANGES: Updated.
1309
13102015-03-11 Werner Lemberg <wl@gnu.org>
1311
Werner Lembergf4d1c112015-03-11 07:32:58 +01001312 [base] Rename `FT_Get_X11_Font_Format' to `FT_Get_Font_Format'.
1313
1314 * include/ftfntfmt.h, src/base/ftfntfmt.c: Implement it.
1315
1316 * docs/CHANGES: Updated.
1317
13182015-03-11 Werner Lemberg <wl@gnu.org>
1319
Werner Lembergcb0f7b62015-03-11 06:51:27 +01001320 Fix automatic copyright updating.
1321
1322 * src/tools/update-copyright: Make scanning of `no-copyright'
1323 actually work.
1324
1325 * src/tools/no-copyright: Don't include README in general.
1326
13272015-03-11 Werner Lemberg <wl@gnu.org>
1328
Werner Lemberg06339952015-03-11 06:30:23 +01001329 Rename `ftxf86.[ch]' to `ftfntfmt.[ch]'.
1330
1331 CMakeLists.txt, builds/amiga/makefile, builds/amiga/makefile.os4,
1332 builds/amiga/smakefile, builds/mac/FreeType.m68k_cfm.make.txt,
1333 builds/mac/FreeType.m68k_far.make.txt,
1334 builds/mac/FreeType.ppc_carbon.make.txt,
1335 builds/mac/FreeType.ppc_classic.make.txt, builds/symbian/bld.inf,
1336 builds/symbian/freetype.mmp, builds/wince/vc2005-ce/freetype.vcproj,
1337 builds/wince/vc2008-ce/freetype.vcproj,
1338 builds/windows/vc2005/freetype.vcproj,
1339 builds/windows/vc2008/freetype.vcproj,
1340 builds/windows/vc2010/freetype.vcxproj,
1341 builds/windows/vc2010/freetype.vcxproj.filters,
1342 builds/windows/visualc/freetype.dsp,
1343 builds/windows/visualc/freetype.vcproj,
1344 builds/windows/visualce/freetype.dsp,
1345 builds/windows/visualce/freetype.vcproj, docs/INSTALL.ANY,
1346 include/config/ftheader.h, include/ftfntfmt.h, modules.cfg,
1347 src/base/ftfntfmt.c, vms_make.com: Updated.
1348
Alexei Podtelezhnikov6b832c82015-03-10 23:25:49 -040013492015-03-10 Alexei Podtelezhnikov <apodtele@gmail.com>
1350
1351 Fix Savannah bug #44412 (part 1).
1352
1353 * src/base/ftstroke.c (ft_stroker_inside): Handle near U-turns.
1354
Werner Lembergeee7d8b2015-03-10 11:15:15 +010013552015-03-10 Werner Lemberg <wl@gnu.org>
1356
1357 [base] Rename `FT_Bitmap_New' to `FT_Bitmap_Init'.
1358
1359 * include/ftbitmap.h, src/base/ftbitmap.c: Implement it.
1360 Update all callers.
1361
1362 * docs/CHANGES: Updated.
1363
Werner Lemberg493cc032015-03-06 05:38:31 +010013642015-03-06 Werner Lemberg <wl@gnu.org>
1365
1366 * src/sfnt/ttload.c (tt_face_load_font_dir): Fix compiler warning.
1367
1368 Found by Alexei.
1369
Alexei Podtelezhnikovdd7498d2015-03-05 22:51:36 -050013702015-03-05 Alexei Podtelezhnikov <apodtele@gmail.com>
1371
1372 * src/base/ftstroke.c: Simplify.
1373
Werner Lemberg328b7922015-03-04 08:40:23 +010013742015-03-04 Werner Lemberg <wl@gnu.org>
1375
1376 [truetype] Some fixes and code refactoring in `ttgxvar.c'.
1377
1378 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix return value
1379 of `point_cnt' if two bytes are read.
1380 Use a more vertical coding style.
1381 (ft_var_readpackeddeltas): Use FT_UInt for `delta_cnt' parameter.
1382 Use a more vertical coding style.
1383
Werner Lemberga374c9c2015-03-03 11:23:45 +010013842015-03-03 Werner Lemberg <wl@gnu.org>
1385
1386 [autofit] Fix Savannah bug #44241.
1387
1388 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Reject glyphs
1389 with less than 3 points.
1390
Werner Lemberga07029e2015-03-02 06:54:08 +010013912015-03-02 Werner Lemberg <wl@gnu.org>
1392
1393 Simplify `TYPEOF' macro.
1394
1395 No need for two arguments.
1396
1397 * include/config/ftconfig.h, builds/unix/ftconfig.in,
1398 builds/vms/ftconfig.h (TYPEOF): Updated.
1399
1400 * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
1401 src/autofit/afwarp.h (AF_WARPER_FLOOR): Updated.
1402
14032015-03-01 Werner Lemberg <wl@gnu.org>
Werner Lemberg4b9234b2015-02-25 06:31:43 +01001404
Werner Lemberg851e8152015-03-01 19:27:09 +01001405 Various compiler warning fixes for `make multi'.
1406
1407 * src/autofit/afcjk.c (af_cjk_hints_compute_blue_edges),
1408 src/autofit/aflatin.c (af_latin_hint_compute_blue_edges,
1409 af_latin_hint_edges), src/autofit/aflatin2.c
1410 (af_latin2_hints_compute_blue_edges, af_latin2_hint_edges): Declare
1411 as `static'.
1412
1413 * src/cache/ftccmap.c (FTC_CMAP_QUERY_HASH, FTC_CMAP_NODE_HASH):
1414 Removed. Unused.
1415 * src/cache/ftcimage.c: Include FT_INTERNAL_OBJECTS_H.
1416 * src/cache/ftcmanag.c (FTC_LRU_GET_MANAGER): Removed. Unused.
1417
1418 * src/cff/cf2intrp.c: Include `cf2intrp.h'.
1419 * src/cff/cffdrivr.c (PAIR_TAG): Removed. Unused.
1420
1421 * src/gzip/ftgzip.c (NO_DUMMY_DECL): Removed. Unused.
1422
1423 * src/psaux/afmparse.c (afm_parser_read_int): Declare as `static'.
1424
1425 * src/pshinter/pshalgo.c (STRONGER, PSH_ZONE_MIN, PSH_ZONE_MAX):
1426 Removed. Unused.
1427
1428 * src/raster/ftraster.c (Render_Glyph): Declare as `static'.
1429
1430 * src/sfnt/ttpost.c (load_format_20): Fix signedness warning.
1431
1432 * src/truetype/ttdriver.c (PAIR_TAG): Removed. Unused.
1433 * src/truetype/ttsubpix.c (is_member_of_family_class,
1434 is_member_of_style_class): Declare as `static'.
1435
1436 * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Declare
1437 as `static'.
1438 * src/type1/t1load.c (mm_axis_unmap, mm_weights_unmap): Declare as
1439 `static'.
1440 (T1_FIELD_COUNT): Removed. Unused.
1441 * src/type1/t1parse.h (T1_Done_Table): Removed. Unused.
1442
1443 * src/type42/t42parse.c (T1_Done_Table): Removed. Unused.
1444
14452015-02-25 Werner Lemberg <wl@gnu.org>
1446
Werner Lemberg04c22372015-02-25 11:20:20 +01001447 [psaux] Signedness fixes.
1448
1449 * include/internal/psaux.h, src/psaux/afmparse.c,
1450 src/psaux/afmparse.h, src/psaux/psconv.c, src/psaux/psobjs.c,
1451 src/psaux/t1cmap.c, src/psaux/t1decode.c: Apply.
1452
14532015-02-25 Werner Lemberg <wl@gnu.org>
1454
Werner Lembergd25ec162015-02-25 09:19:59 +01001455 [otvalid] Signedness fixes.
1456
1457 * src/otvalid/otvcommn.c, src/otvalid/otvgdef.c,
1458 src/otvalid/otvgpos.c, src/otvalid/otvgsub.c, src/otvalid/otvmath.c:
1459 Apply.
1460
14612015-02-25 Werner Lemberg <wl@gnu.org>
1462
Werner Lemberg5c9d9bf2015-02-25 08:13:40 +01001463 * src/bzip2/ftbzip2.c (ft_bzip2_alloc): Signedness fix.
1464
14652015-02-25 Werner Lemberg <wl@gnu.org>
1466
Werner Lemberg83d41812015-02-25 08:10:58 +01001467 [lzw] Signedness fixes.
1468
1469 * src/lzw/ftzopen.c, src/lzw/ftzopen.h: Apply.
1470
14712015-02-25 Werner Lemberg <wl@gnu.org>
1472
Werner Lemberg17b62912015-02-25 07:53:09 +01001473 [gxvalid] Signedness fixes.
1474
1475 * src/gxvalid/gxvbsln.c, src/gxvalid/gxvcommn.c,
1476 src/gxvalid/gxvcommn.h, src/gxvalid/gxvjust.c,
1477 src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmort.c,
1478 src/gxvalid/gxvmort1.c, src/gxvalid/gxvmort2.c,
1479 src/gxvalid/gxvmorx.c, src/gxvalid/gxvmorx1.c,
1480 src/gxvalid/gxvmorx2.c, src/gxvalid/gxvopbd.c,
1481 src/gxvalid/gxvprop.c, src/gxvalid/gxvtrak.c: Apply.
1482
14832015-02-25 Werner Lemberg <wl@gnu.org>
1484
Werner Lemberg24e4e962015-02-25 06:57:16 +01001485 [cache] Signedness fixes.
1486
1487 * src/cache/ftcbasic.c, src/cache/ftccmap.c, src/cache/ftcimage.c,
1488 src/cache/ftcmanag.c, src/cache/ftcsbits.c: Apply.
1489
14902015-02-25 Werner Lemberg <wl@gnu.org>
1491
Werner Lemberg559727d2015-02-25 06:55:00 +01001492 Change dimension fields in `FTC_ImageTypeRec' to unsigned type.
1493
1494 This doesn't break ABI.
1495
1496 * include/ftcache.h (FTC_ImageTypeRec): Use unsigned types for
1497 `width' and `height'.
1498
1499 * docs/CHANGES: Document it.
1500
15012015-02-25 Werner Lemberg <wl@gnu.org>
1502
Werner Lemberg4b9234b2015-02-25 06:31:43 +01001503 [cache] Don't use `labs'.
1504
1505 This is the only place in FreeType where this function was used.
1506
1507 * include/config/ftstdlib.h (ft_labs): Remove.
1508
1509 * src/cache/ftcimage.c (ftc_inode_weight): Replace `ft_labs' with
1510 `FT_ABS'.
1511
Werner Lemberg4d1f7af2015-02-23 07:04:36 +010015122015-02-23 Werner Lemberg <wl@gnu.org>
1513
Werner Lemberg3aaebe32015-02-23 08:20:27 +01001514 [cache] Replace `FT_PtrDist' with `FT_Offset'.
1515
1516 * src/cache/ftccache.h (FTC_NodeRec): `FT_Offset' (a.k.a. `size_t')
1517 is a better choice for `hash' to hold a pointer than `FT_PtrDist'
1518 (a.k.a. `ptrdiff_t'), especially since the latter is signed,
1519 causing zillions of signedness warnings. [Note that `hash' was of
Werner Lemberg17b62912015-02-25 07:53:09 +01001520 type `FT_UInt32' before the change to `FT_PtrDist'.]
Werner Lemberg3aaebe32015-02-23 08:20:27 +01001521 Update all users.
1522
1523 * src/cache/ftcbasic.c, src/cache/ftccache.c, src/cache/ftccmap.c,
1524 src/cache/ftcglyph.c, src/cache/ftcglyph.h: Updated.
1525
15262015-02-23 Werner Lemberg <wl@gnu.org>
1527
Werner Lemberg4d1f7af2015-02-23 07:04:36 +01001528 [smooth, raster] Re-enable standalone compilation.
1529
1530 * src/raster/ftraster.c (FT_RENDER_POOL_SIZE, FT_MAX)
1531 [_STANDALONE_]: Define macros.
1532
1533 * src/smooth/ftgrays.c (FT_RENDER_POOL_SIZE, FT_MAX, FT_ABS,
1534 FT_HYPOT) [_STANDALONE_]: Define macros.
1535
Werner Lemberg03ccfd02015-02-22 08:25:16 +010015362015-02-22 Werner Lemberg <wl@gnu.org>
1537
Werner Lembergcb13e712015-02-23 06:41:52 +01001538 [smooth] Signedness fixes.
1539
1540 * src/smooth/ftgrays.c, src/smooth/ftsmooth.c: Apply.
1541
15422015-02-22 Werner Lemberg <wl@gnu.org>
1543
Werner Lemberga974e9a2015-02-22 21:02:13 +01001544 * src/raster/ftraster.c: Use the file's typedefs everywhere.
1545
15462015-02-22 Werner Lemberg <wl@gnu.org>
1547
Werner Lembergb0ebcdc2015-02-22 20:42:49 +01001548 * src/sfnt/ttpost.c (load_format_20): Fix error tracing message.
1549
1550 Bug introduced 6 commits earlier.
1551
15522015-02-22 Werner Lemberg <wl@gnu.org>
1553
Werner Lemberg22b1d5c2015-02-22 20:41:03 +01001554 [pshinter] Fix thinko.
1555
1556 * src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Correctly
1557 check `count'.
1558 Bug introduced two commits earlier.
1559
15602015-02-22 Werner Lemberg <wl@gnu.org>
1561
Werner Lembergca96fe02015-02-22 20:05:04 +01001562 [raster] Signedness fixes.
1563
1564 * src/raster/ftraster.c, src/raster/ftrend1.c: Apply.
1565
15662015-02-22 Werner Lemberg <wl@gnu.org>
1567
Werner Lemberg452066c2015-02-22 15:59:02 +01001568 [pshinter] Signedness fixes.
1569
1570 * src/pshinter/pshalgo.c, src/pshinter/pshglob.c,
1571 src/pshinter/pshrec.c: Apply.
1572
15732015-02-22 Werner Lemberg <wl@gnu.org>
1574
Werner Lemberg41c2ed82015-02-22 15:57:47 +01001575 [pshinter] Use macros for (unsigned) flags, not enumerations.
1576
1577 * src/pshinter/pshalgo.h (PSH_Hint_Flags): Replace with macros.
1578 Updated.
1579 * src/pshinter/pshrec.h (PS_Hint_Flags): Replace with macros.
1580
15812015-02-22 Werner Lemberg <wl@gnu.org>
1582
Werner Lemberg25c2f882015-02-22 15:54:31 +01001583 * src/pshinter/pshrec.c: Simplify.
1584 (ps_hints_open, ps_hints_stem): Remove switch statement.
1585
15862015-02-22 Werner Lemberg <wl@gnu.org>
1587
Werner Lemberg01f08422015-02-22 12:03:28 +01001588 [sfnt] Signedness fixes.
1589
1590 * src/sfnt/pngshim.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap.c,
1591 src/sfnt/ttkern.c, src/sfnt/ttload.c, src/sfnt/ttpost.c,
1592 src/sfnt/ttsbit.c: Apply.
1593 * src/sfnt/sfdriver.c: Apply.
1594 (sfnt_get_ps_name): Simplify.
1595
15962015-02-22 Werner Lemberg <wl@gnu.org>
1597
Werner Lemberg3c374c82015-02-22 09:16:53 +01001598 [bdf] Signedness fixes.
1599
1600 * src/bdf/bdf.h, src/bdf/bdfdrivr.c, src/bdf/bdfdrivr.h,
1601 src/bdf/bdflib.c: Apply.
1602
16032015-02-22 Werner Lemberg <wl@gnu.org>
1604
Werner Lembergb13945a2015-02-22 09:15:47 +01001605 * src/bdf/bdflib.c (_bdf_atous): New function.
1606 (_bdf_parse_glyphs, _bdf_parse_start): Use it.
1607
16082015-02-22 Werner Lemberg <wl@gnu.org>
1609
Werner Lemberg03ccfd02015-02-22 08:25:16 +01001610 [pcf] Signedness fixes.
1611
1612 * src/pcf/pcf.h, src/pcf/pcfdrivr.c: Apply.
1613 * src/pcf/pcfread.c: Apply.
1614 (pcf_get_encodings): Ignore invalid negative encoding offsets.
1615
Werner Lemberg633a7292015-02-21 07:02:01 +010016162015-02-21 Werner Lemberg <wl@gnu.org>
1617
Werner Lemberg3d7e53f2015-02-21 11:30:54 +01001618 * src/winfonts/winfnt.c: Signedness fixes.
1619
16202015-02-21 Werner Lemberg <wl@gnu.org>
1621
Werner Lemberg7b6b4172015-02-21 10:39:34 +01001622 [type42] Signedness fixes.
1623
1624 * src/type42/t42parse.c, src/type42/t42parse.h,
1625 src/type42/t42types.h: Apply.
1626
16272015-02-21 Werner Lemberg <wl@gnu.org>
1628
Werner Lemberg8bfffb42015-02-21 09:52:29 +01001629 [pfr] Signedness fixes.
1630
1631 * src/pfr/pfrdrivr.c, src/pfr/pfrgload.c, src/pfr/pfrload.c,
1632 src/pfr/pfrload.h, src/pfr/pfrobjs.c, src/pfr/pfrsbit.c,
1633 src/pfr/pfrtypes.h: Apply.
1634
16352015-02-21 Werner Lemberg <wl@gnu.org>
1636
Werner Lemberg633a7292015-02-21 07:02:01 +01001637 [cff] Minor signedness fixes related to last commit.
1638
1639 * src/cff/cf2ft.c, src/cff/cf2intrp.c, src/cff/cffgload.c: Apply.
1640
Werner Lemberg3a8d0532015-02-20 08:35:32 +010016412015-02-20 Werner Lemberg <wl@gnu.org>
1642
Werner Lembergc00b05f2015-02-20 20:42:55 +01001643 [cff] Thinkos in bias handling.
1644
1645 Only the final result is always positive.
1646
1647 Bug introduced three commits earlier.
1648
1649 * src/cff/cffgload.c, src/cff/cffgload.h: Apply.
1650
16512015-02-20 Werner Lemberg <wl@gnu.org>
1652
Werner Lemberg2bf03eb2015-02-20 20:14:11 +01001653 [cid] Fix signedness issues and emit some better error codes.
1654
1655 * src/cid/cidgload.c, src/cid/cidload.h, src/cid/cidobjs.c,
1656 src/cid/cidparse.h: Apply.
1657 * src/cid/cidload.c: Apply.
1658 (parse_fd_array): Reject negative values for number of dictionaries.
1659 * src/cid/cidparse.c: Apply.
1660 (cid_parser_new): Reject negative values for hex data length.
1661
16622015-02-20 Werner Lemberg <wl@gnu.org>
1663
Werner Lembergeb05bfb2015-02-20 08:37:35 +01001664 [cff] Signedness fixes for new engine.
1665
1666 * src/cff/cf2arrst.c, src/cff/cf2fixed.h, src/cff/cf2ft.c,
1667 src/cff/cf2ft.h, src/cff/cf2hints.c, src/cff/cf2intrp.c: Apply.
1668
16692015-02-20 Werner Lemberg <wl@gnu.org>
1670
Werner Lemberg3a8d0532015-02-20 08:35:32 +01001671 [cff] Signedness fixes for basic infrastructure and old engine.
1672
1673 * include/internal/pshints.h, src/cff/cffdrivr.c,
1674 src/cff/cffgload.c, src/cff/cffgload.h, src/cff/cffload.c,
1675 src/cff/cffobjs.c, src/cff/cffparse.c, src/pshinter/pshrec.c: Apply.
1676
Werner Lemberg81e5ff52015-02-19 09:46:48 +010016772015-02-19 Werner Lemberg <wl@gnu.org>
1678
Werner Lemberg3a1df3e2015-02-19 15:42:48 +01001679 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Ignore `countSizePairs'.
1680
1681 This is hard-coded to value 2 in `fvar' version 1.0 (and no newer
1682 version exists), but some fonts set it incorrectly.
1683
1684 Problem reported by Adam Twardoch <adam@fontlab.com>.
1685
16862015-02-19 Werner Lemberg <wl@gnu.org>
1687
Werner Lemberg93a884c2015-02-19 14:11:16 +01001688 [cff] Emit better error code for invalid private dict size.
1689
1690 * src/cff/cffparse.c (cff_parse_private_dict): Reject negative
1691 values for size and offset.
1692
16932015-02-19 Werner Lemberg <wl@gnu.org>
1694
Werner Lembergb57bb112015-02-19 10:44:18 +01001695 [autofit] Fix signedness issues.
1696
1697 * src/autofit/afangles.c, src/autofit/afcjk.c,
1698 src/autofit/afglobal.c, src/autofit/afhints.c,
1699 src/autofit/aflatin.c, src/autofit/aflatin2.c, src/autofit/afwarp.c,
1700 src/autofit/hbshim.c: Apply.
1701
17022015-02-19 Werner Lemberg <wl@gnu.org>
1703
Werner Lemberg81e5ff52015-02-19 09:46:48 +01001704 [autofit] Use macros for (unsigned) flags, not enumerations.
1705
1706 This harmonizes with other code in FreeType (and reduces the number
1707 of necessary casts to avoid compiler warnings).
1708
1709 * src/autofit/afblue.hin: Make flag macros unsigned.
1710 * src/autofit/afblue.h: Regenerated.
1711
1712 * src/autofit/afcjk.h: Replace flag enumeration with macros.
1713 * src/autofit/afcjk.c: Updated.
1714
1715 * src/autofit/afhints.h (AF_Flags, AF_Edge_Flags): Replace with
1716 macros.
1717 * src/autofit/afhints.c: Updated.
1718
1719 * src/autofit/aflatin.h: Replace flag enumerations with macros.
1720 * src/autofit/aflatin.c, src/autofit/aflatin2.c: Updated.
1721
1722 * src/autofit/aftypes.h (AF_ScalerFlags): Replace with macros.
1723
Werner Lemberg6a0ded72015-02-18 08:51:22 +010017242015-02-18 Werner Lemberg <wl@gnu.org>
1725
Werner Lemberg3b5f3322015-02-18 11:45:22 +01001726 [type1] Fix signedness issues.
1727
1728 * include/internal/psaux.h, include/internal/t1types.h,
1729 src/psaux/psobjs.c, src/psaux/psobjs.h, src/psaux/t1decode.c,
1730 src/type1/t1gload.c, src/type1/t1load.c, src/type1/t1parse.c: Apply.
1731
17322015-02-18 Werner Lemberg <wl@gnu.org>
1733
Werner Lemberg272e3cd2015-02-18 11:38:46 +01001734 [psaux, type1] Fix minor AFM issues.
1735
1736 * include/internal/t1types.h (AFM_KernPairRec): Make indices
1737 unsigned.
1738 Update users.
1739 (AFM_FontInfoRec): Make element counters unsigned.
1740 Update users.
1741 * src/psaux/afmparse.h (AFM_ValueRec): Add union member for unsigned
1742 int.
1743
1744 * src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs):
1745 Reject negative values for number of kerning elements.
1746
1747 * src/type1/t1afm.c, src/tools/test_afm.c: Updated.
1748
17492015-02-18 Werner Lemberg <wl@gnu.org>
1750
Werner Lemberg6bd7d282015-02-18 09:22:06 +01001751 Don't use `FT_PtrDist' for lengths.
1752
1753 Use FT_UInt instead.
1754
1755 * include/internal/psaux.h (PS_Table_FuncsRec, PS_TableRec,
1756 T1_DecoderRec): Do it.
1757
1758 * include/internal/t1types.h (T1_FontRec): Ditto.
1759
1760 * src/cid/cidload.c (cid_parse_dict): Updated.
1761 * src/pfr/pfrload.c (pfr_extra_item_load_font_id): Ditto.
1762 * src/psaux/psobjs.c (ps_table_add), src/psaux/psobjs.h: Ditto.
1763 * src/type1/t1load.c (parse_blend_axis_types, parse_encoding,
1764 parse_chharstrings, parse_dict): Ditto.
1765 * src/type42/t42parse.c (t42_parse_encoding, t42_parse_charstrings,
1766 t42_parse_dict): Ditto.
1767
17682015-02-18 Werner Lemberg <wl@gnu.org>
1769
Werner Lemberg6a0ded72015-02-18 08:51:22 +01001770 * src/type1/t1driver.c (t1_ps_get_font_value): Clean up.
1771 This handles negative values better, avoiding many casts.
1772
Werner Lemberg0a33a392015-02-17 08:03:05 +010017732015-02-17 Werner Lemberg <wl@gnu.org>
1774
Werner Lembergd3240c52015-02-17 20:30:36 +01001775 [base] Fix Savannah bug #44284.
1776
1777 * src/base/ftcalc.c (FT_MulFix): Typos.
1778
17792015-02-17 Werner Lemberg <wl@gnu.org>
1780
Werner Lemberg1f7a4e12015-02-17 10:17:56 +01001781 [truetype] Finish compiler warning fixes for signedness issues.
1782
1783 * src/truetype/ttgxvar.c, src/truetype/ttsubpix.c,
1784 src/truetype/ttsubpix.h: Apply.
1785
17862015-02-17 Werner Lemberg <wl@gnu.org>
1787
Werner Lemberg9daea2c2015-02-17 09:27:56 +01001788 * src/truetype/ttsubpix.c: Adding missing `static' keywords.
1789
17902015-02-17 Werner Lemberg <wl@gnu.org>
1791
Werner Lembergd9c3f152015-02-17 09:21:26 +01001792 [truetype] More signedness fixes.
1793
1794 * include/internal/tttypes.h, src/truetype/ttinterp.h,
1795 src/truetype/ttobjs.h, src/truetype/ttinterp.c,
1796 src/truetype/ttobjs.c: Apply.
1797
17982015-02-17 Werner Lemberg <wl@gnu.org>
1799
Werner Lemberg0a33a392015-02-17 08:03:05 +01001800 [truetype] Various signedness fixes.
1801
1802 * include/internal/ftgloadr.h, src/truetype/ttpload.c: Apply.
1803
1804 * src/truetype/ttgload.c: Apply.
1805 (TT_Get_VMetrics): Protect against invalid ascenders and descenders
1806 while constructing advance height.
1807
Werner Lemberg587351b2015-02-16 07:03:22 +010018082015-02-16 Werner Lemberg <wl@gnu.org>
1809
Werner Lemberg76abc752015-02-16 22:00:27 +01001810 [base] Finish compiler warning fixes for signedness issues.
1811
1812 * src/base/ftglyph.c, src/base/ftlcdfil.c, src/base/ftstroke.c:
1813 Apply.
1814
18152015-02-16 Werner Lemberg <wl@gnu.org>
1816
Werner Lemberg10aa8582015-02-16 20:12:54 +01001817 * include/tttables.h (TT_OS2): `fsType' must be FT_UShort.
1818
18192015-02-16 Werner Lemberg <wl@gnu.org>
1820
Werner Lemberg2e814fc2015-02-16 20:05:08 +01001821 More minor signedness warning fixes.
1822
1823 * src/base/ftbbox.c, src/base/ftbitmap.c, src/base/fttrigon.c,
1824 src/base/ftutil.c: Apply.
1825
18262015-02-16 Werner Lemberg <wl@gnu.org>
1827
Werner Lemberg82235d02015-02-16 19:35:16 +01001828 Next round of minor compiler warning fixes.
1829
1830 * include/internal/ftrfork.h (FT_RFork_Ref): Change `offset' member
1831 type to `FT_Long'.
1832 (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Add `static' keyword.
1833
Werner Lemberg3aaebe32015-02-23 08:20:27 +01001834 * include/internal/ftstream.h (FT_Stream_Pos): Return `FT_ULong'.
Werner Lemberg82235d02015-02-16 19:35:16 +01001835
1836 * src/base/ftoutln.c, src/base/ftrfork.c, src/base/ftstream.c:
1837 Signedess fixes.
1838
18392015-02-16 Werner Lemberg <wl@gnu.org>
1840
Werner Lemberg3cfa4d12015-02-16 17:59:06 +01001841 Various minor signedness fixes.
1842
1843 * include/ftadvanc.h, include/internal/ftobjs.h,
1844 src/base/ftgloadr.c, src/base/ftobjs.c: Apply.
1845
18462015-02-16 Werner Lemberg <wl@gnu.org>
1847
Werner Lemberg6f325c22015-02-16 11:31:32 +01001848 New `TYPEOF' macro.
1849
1850 This helps suppress signedness warnings, avoiding issues with
1851 implicit conversion changes.
1852
1853 * include/config/ftconfig.h, builds/unix/ftconfig.in,
1854 builds/vms/ftconfig.h (TYPEOF): Define.
1855
1856 * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
1857 src/autofit/afwarp.h (AF_WARPER_FLOOR): Use it.
1858
18592015-02-16 Werner Lemberg <wl@gnu.org>
1860
Werner Lemberg1f377f02015-02-16 08:37:09 +01001861 * src/base/ftsystem.c: Use casts in standard C function wrappers.
1862 (ft_alloc, ft_realloc, ft_ansi_stream_io, FT_Stream_Open): Do it.
1863
18642015-02-16 Werner Lemberg <wl@gnu.org>
1865
Werner Lemberg0814b802015-02-16 07:29:53 +01001866 Fix Savannah bug #44261.
1867
1868 * builds/unix/detect.mk (setup) [unix]: Set `CONFIG_SHELL' in the
1869 environment also while calling the configure script.
1870
18712015-02-16 Werner Lemberg <wl@gnu.org>
1872
Werner Lemberg587351b2015-02-16 07:03:22 +01001873 * include/internal/ftmemory.h: Add some `FT_Offset' casts.
1874 (FT_MEM_SET, FT_MEM_COPY, FT_MEM_MOVE, FT_ARRAY_ZERO, FT_ARRAY_COPY,
1875 FT_MEM_MOVE): Do it.
1876
Werner Lemberg6d7d6362015-02-15 12:30:42 +010018772015-02-15 Werner Lemberg <wl@gnu.org>
1878
Werner Lemberg48186b82015-02-16 06:37:36 +01001879 [base] Clean up signedness issues in `ftdbgmem.c'.
1880
1881 Also fix other minor issues.
1882
1883 * src/base/ftdbgmem.c (FT_MemTableRec): Replace all FT_ULong types
1884 with FT_Long for consistency.
1885 (ft_mem_primes): Change type to `FT_Int'.
1886 (ft_mem_closest_prime, ft_mem_table_set): Updated.
1887
1888 (ft_mem_debug_panic, ft_mem_debug_alloc, ft_mem_debug_free,
1889 ft_mem_debug_realloc): Use `static' keyword and fix signedness
1890 warnings where necessary.
1891
1892 (ft_mem_table_resize, ft_mem_table_new, ft_mem_table_destroy,
1893 ft_mem_table_get_nodep, ft_mem_debug_init, FT_DumpMemory): Fix types
1894 and add or remove casts to avoid signedness warnings.
1895
18962015-02-15 Werner Lemberg <wl@gnu.org>
1897
Werner Lemberg6d7d6362015-02-15 12:30:42 +01001898 [base] Clean up signedness in arithmetic functions.
1899
1900 This makes the code more readable and reduces compiler warnings.
1901
1902 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round, FT_MulFix,
1903 FT_DivFix): Convert input parameters to unsigned, do the
1904 computation, then convert the result back to signed.
1905 (ft_corner_orientation): Fix casts.
1906
Werner Lemberg92359bd2015-02-07 09:47:23 +010019072015-02-07 Werner Lemberg <wl@gnu.org>
1908
1909 [sfnt] Fix Savannah bug #44184.
1910
1911 * src/sfnt/ttload.c (check_table_dir, tt_face_load_font_dir): No
1912 longer reject `htmx' and `vmtx' tables with invalid length but
1913 sanitize them.
1914
Jon Anderson416d8792015-02-06 10:16:45 +010019152015-02-06 Jon Anderson <jon@websupergoo.com>
1916
1917 [truetype] Fix regression in the incremental glyph loader.
1918
1919 * src/truetype/ttgload.c (load_truetype_glyph): For incremental
1920 fonts, the glyph index may be greater than the number of glyphs
1921 indicated, so guard the check with a preprocessor conditional.
1922
Werner Lembergb6cb4992015-02-06 08:46:06 +010019232015-02-06 Werner Lemberg <wl@gnu.org>
1924
1925 [autofit] Fix potential memory leak.
1926
1927 While this doesn't show up with FreeType, exactly the same code
1928 leaks with ttfautohint's modified auto-hinter code (which gets used
1929 in a slightly different way).
1930
1931 It certainly doesn't harm since it is similar to already existing
1932 checks in the code for embedded arrays.
1933
1934 * src/autofit/afhints.c (af_glyph_hints_reload): Set `max_contours'
1935 and `max_points' for all cases.
1936
Werner Lemberg19146a52015-01-31 11:01:33 +010019372015-01-31 Werner Lemberg <wl@gnu.org>
1938
1939 [autofit] Add support for Thai script.
1940
1941 Thanks to Ben Mitchell <ben@rosettatype.com> for guidance with blue
1942 zone characters!
1943
1944 * src/autofit/afblue.dat: Add blue zone data for Thai.
1945
1946 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1947
1948 * src/autofit/afscript.h: Add Thai standard characters.
1949
1950 * src/autofit/afranges.c: Add Thai data.
1951
1952 * src/autofit/afstyles.h: Add Thai data.
1953
Behdad Esfahbod264b5e42015-01-23 21:23:55 +010019542015-01-23 Behdad Esfahbod <behdad@behdad.org>
1955
1956 [raster] Handle `FT_RASTER_FLAG_AA' correctly.
1957
1958 This fixes a breakage caused by the commit `[raster] Remove
1959 5-level gray AA mode from monochrome rasterizer.'.
1960
Werner Lembergd2c531e2015-01-23 22:37:42 +01001961 Problem reported by Markus Trippelsdorf <markus@trippelsdorf.de>.
Behdad Esfahbod264b5e42015-01-23 21:23:55 +01001962
1963 * src/raster/ftraster.c (ft_black_render): Handle
1964 `FT_RASTER_FLAG_AA'.
1965
1966 * src/raster/ftrend1.c (ft_raster1_render): Remove gray AA mode
1967 remnants.
1968
Werner Lemberg79a5ac62015-01-18 07:30:04 +010019692015-01-18 Werner Lemberg <wl@gnu.org>
1970
1971 * src/base/ftobjs.c (FT_New_Library): Fix compiler warning.
1972
Chris Liddell942aa5f2015-01-18 07:29:48 +010019732015-01-18 Chris Liddell <chris.liddell@artifex.com>
1974
1975 [raster] Fix Savannah bug #44022.
1976
1977 Add fallback for glyphs with degenerate bounding boxes.
1978
1979 If a glyph has only one very narrow feature, the bbox can end up
1980 with either the width or height of the bbox being 0, in which case
1981 no raster memory is allocated and no attempt is made to render the
1982 glyph. This is less than ideal when the drop-out compensation in
1983 the rendering code would actually result in the glyph being
1984 rendered.
1985
1986 This problem can be observed with the `I' glyph (gid 47) in the
1987 Autodesk RomanS TrueType font.
1988
1989 * src/raster/ftrend1.c (ft_raster1_render): Add a fallback if either
1990 dimension is zero to explicitly round up/down (instead of simply
1991 round).
1992
Werner Lemberg50be00d2015-01-17 20:38:31 +010019932015-01-17 Werner Lemberg <wl@gnu.org>
1994
1995 Add some tools to handle yearly copyright notice updates.
1996
1997 We are now following the GNU guidelines: A new release automatically
1998 means that the copyright year of all affected files gets updated; it
1999 is no longer used to track years of modification changes.
2000
2001 * src/tools/update-copyright-year: New Perl script.
2002 * src/tools/update-copyright: New shell script that calls
2003 `update-copyright-year' on all files.
2004 * src/tools/no-copyright: Exceptions that should not be handled by
2005 `update-copyright'
2006
Werner Lemberg4eff8542015-01-14 20:06:19 +010020072015-01-14 Werner Lemberg <wl@gnu.org>
2008
2009 * docs/CHANGES: Updated, using a description from Behdad.
2010
Behdad Esfahbod3f9b3d82015-01-14 15:48:12 +010020112015-01-14 Behdad Esfahbod <behdad@behdad.org>
2012
Behdad Esfahbod48c86622015-01-14 19:38:36 +01002013 * src/autofit/afmodule.c (af_autofitter_done): Fix compiler warning.
2014
20152015-01-14 Behdad Esfahbod <behdad@behdad.org>
2016
Behdad Esfahbod56ddafa2015-01-14 19:36:02 +01002017 [autofit] Add embedded array of segments and edges.
2018
2019 Avoids multiple mallocs per typical glyphs.
2020
2021 With this and recent changes to avoid mallocs, the thread-safe
2022 stack-based loader is now as fast as the previous model that had one
2023 cached singleton.
2024
2025 * src/autofit/afhints.h (AF_SEGMENTS_EMBEDDED, AF_EDGES_EMBEDDED):
2026 New macros.
2027 (AF_AxisHintsRec): Add two arrays for segments and edges.
2028
2029 * src/autofit/afhints.c (af_axis_hints_new_segment): Only allocate
2030 data if number of segments exceeds given threshold value.
2031 (af_axis_hints_new_edge): Only allocate data if number of edges
2032 exceeds given threshold value.
2033 (af_glyph_hints_done): Updated.
2034
20352015-01-14 Behdad Esfahbod <behdad@behdad.org>
2036
Behdad Esfahbod6f16b102015-01-14 19:26:49 +01002037 [autofit] Add embedded arrays for points and contours.
2038
2039 This avoids at least two malloc calls for typical glyphs.
2040
2041 * src/autofit/afhints.h (AF_POINTS_EMBEDDED, AF_CONTOURS_EMBEDDED):
2042 New macros.
2043 (AF_GlyphHintsRec): Add two arrays for contours and points.
2044
2045 * src/autofit/afhints.c (af_glyph_hints_init, af_glyph_hints_done):
2046 Updated.
2047 (af_glyph_hints_reload): Only allocate data if number of contours or
2048 points exceeds given threshold values.
2049
20502015-01-14 Behdad Esfahbod <behdad@behdad.org>
2051
Behdad Esfahbodc2733652015-01-14 19:16:12 +01002052 [autofit] Allocate hints object on the stack.
2053
2054 This avoids one malloc per load.
2055
2056 * src/autofit/afloader.h (AF_LoaderRec): Change type of `hints' to
2057 `AF_GlyphHints'.
2058 Update prototype.
2059
2060 * src/autofit/afloader.c (af_loader_init): Use `AF_GlyphHints'
2061 parameter instead of `FT_Memory'.
2062 (af_loader_done): Directly reset `load_hints'.
2063 (af_loader_load_g): Updated.
2064
2065 * src/autofit/afmodule.c (af_autofitter_load_glyph): Use local
2066 `hints' object.
2067
20682015-01-14 Behdad Esfahbod <behdad@behdad.org>
2069
Behdad Esfahboda4117fb2015-01-14 19:07:54 +01002070 [autofit] Reuse slot glyph loader.
2071
2072 No need to create a new glyph loader; we can reuse the one from
2073 `slot->internal->loader'. It's hard to tell why it was written that
2074 way originally, but new code looks sound and correct to me, and
2075 avoids lots of allocations.
2076
2077 * src/autofit/afloader.c (af_loader_init): Change return type to
2078 `void'.
2079 Don't call `FT_GlyphLoader_New'.
2080 (af_loader_reset): Don't call `FT_GlyphLoader_Rewind'.
2081 (af_loader_load_g): Update code to use `internal->loader', which
2082 doesn't need copying of data.
2083
2084 * src/autofit/afloader.h (AF_LoaderRec): Remove `gloader' member.
2085 Update prototype.
2086
2087 * src/autofit/afmodule.c (af_autofitter_load_glyph): Updated.
2088
20892015-01-14 Behdad Esfahbod <behdad@behdad.org>
2090
Behdad Esfahbodae6699f2015-01-14 18:55:39 +01002091 [autofit] Remove (unused) support for composite glyphs.
2092
2093 We never have to deal with composite glyphs in the autohinter, as
2094 those will be loaded into FORMAT_OUTLINE by the recursed
2095 `FT_Load_Glyph' function.
2096
2097 In the rare cases that FT_LOAD_NO_RECURSE is set, it will imply
2098 FT_LOAD_NO_SCALE as per `FT_Load_Glyph', which then implies
2099 FT_LOAD_NO_HINTING:
2100
2101 /* resolve load flags dependencies */
2102
2103 if ( load_flags & FT_LOAD_NO_RECURSE )
2104 load_flags |= FT_LOAD_NO_SCALE |
2105 FT_LOAD_IGNORE_TRANSFORM;
2106
2107 if ( load_flags & FT_LOAD_NO_SCALE )
2108 {
2109 load_flags |= FT_LOAD_NO_HINTING |
2110 FT_LOAD_NO_BITMAP;
2111
2112 load_flags &= ~FT_LOAD_RENDER;
2113 }
2114
2115 and as such the auto-hinter is never called. Thus, the recursion in
2116 `af_loader_load_g' never actually happens. So remove the depth
2117 counter as well.
2118
2119 * src/autofit/afloader.c (af_loader_load_g): Remove `depth'
2120 parameter.
2121 <FT_GLYPH_FORMAT_COMPOSITE>: Remove associated code.
2122 (af_loader_load_glyph): Updated.
2123
21242015-01-14 Behdad Esfahbod <behdad@behdad.org>
2125
Behdad Esfahbodc242fe42015-01-14 18:48:14 +01002126 [raster] Fix uninitialized memory access.
2127
2128 Apparently `ras.cProfile' might be uninitialized. This will be the
2129 case if `ras.top == ras.cProfile->offset', as can be seen in
2130 `End_Profile'. The overshoot code introduced in a change `Fix B/W
2131 rasterization of subglyphs with different drop-out modes.' (from
2132 2009-06-18) violated this, accessing `ras.cProfile->flags'
2133 unconditionally just before calling `End_Profile' (which then
2134 detected that `cProfile' is uninitialized and didn't touch it).
2135
2136 This was harmless, and was not detected by valgrind before because
2137 the objects were allocated on the `raster_pool', which was always
2138 initialized. With recent change to allocate raster buffers on the
2139 stack, valgrind now reported this invalid access.
2140
2141 * src/raster/ftraster.c (Convert_Glyph): Don't access an
2142 uninitialized `cProfile'.
2143
21442015-01-14 Behdad Esfahbod <behdad@behdad.org>
2145
Behdad Esfahbodb2ba6862015-01-14 18:43:13 +01002146 [smooth] Fix uninitialized memory access.
2147
2148 Looks like `ras.span_y' could always be used without initialization.
2149 This was never detected by valgrind before because the library-wide
2150 `raster_pool' was used for the worker object and `raster_pool' was
2151 originally zero'ed. But subsequent reuses of it were using `span_y'
2152 uninitialized. With the recent change to not use `render_pool' and
2153 allocate worker and buffer on the stack, valgrind now detects this
2154 uninitialized access.
2155
2156 * src/smooth/ftgrays.c (gray_raster_render): Initialize
2157 `ras.span_y'.
2158
21592015-01-14 Behdad Esfahbod <behdad@behdad.org>
2160
Behdad Esfahbod603292d2015-01-14 18:35:56 +01002161 [base] Don't initialize unused `driver->glyph_loader'.
2162
2163 * src/base/ftobjs.c (Destroy_Driver): Don't call
2164 `FT_GlyphLoader_Done'.
2165 (FT_Add_Module): Don't call `FT_GlyphLoader_New'.
2166
21672015-01-14 Behdad Esfahbod <behdad@behdad.org>
2168
Behdad Esfahbod51634252015-01-14 18:30:59 +01002169 [base] Don't allocate `library->raster_pool' anymore.
2170
2171 It's unused after the following commits:
2172
2173 [raster] Allocate render pool for mono rasterizer on the stack.
2174 [raster] Remove 5-level gray AA mode from monochrome rasterizer.
2175
2176 The value of FT_RENDER_POOL_SIZE still serves the purpose it used to
2177 serve, which is, to adjust the pool size. But the pool is now
2178 allocated on the stack on demand.
2179
2180 * src/base/ftobjs.c (FT_New_Library, FT_Done_Library): Implement.
2181
21822015-01-14 Behdad Esfahbod <behdad@behdad.org>
2183
Behdad Esfahbod6dfdaf42015-01-14 18:21:13 +01002184 [base] Do not reorder library->renderers upon use.
2185
2186 Instead of keeping `library->renderers' in a MRU order, just leave
2187 it as-is. The MRU machinery wasn't thread-safe.
2188
2189 With this patch, rasterizing glyphs from different faces from
2190 different threads doesn't fail choosing rasterizer
2191 (FT_Err_Cannot_Render_Glyph).
2192
2193 Easiest to see that crash was to add a `printf' (or otherwise let
2194 thread yield in FT_Throw with debugging enabled).
2195
2196 * src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c
2197 (FT_Outline_Render): Don't call `FT_Set_Renderer'.
2198
21992015-01-14 Behdad Esfahbod <behdad@behdad.org>
2200
Behdad Esfahboda773c302015-01-14 18:16:20 +01002201 [raster] Allocate render pool for mono rasterizer on the stack.
2202
2203 Instead of using the `render_pool' member of `FT_Library' that is
2204 provided down to the rasterizer, completely ignore that and allocate
2205 needed objects on the stack instead.
2206
2207 With this patch, rasterizing glyphs from different faces from
2208 different threads doesn't crash in the monochrome rasterizer.
2209
2210 * src/raster/ftraster.c (black_TRaster): Remove `buffer',
2211 `buffer_size', and `worker' members.
2212
2213 (ft_black_render): Create `buffer' locally.
2214 (ft_black_reset): Updated.
2215
22162015-01-14 Behdad Esfahbod <behdad@behdad.org>
2217
Behdad Esfahbod8dc86352015-01-14 18:06:22 +01002218 [raster] Remove 5-level gray AA mode from monochrome rasterizer.
2219
2220 It was off by default and couldn't be turned on at runtime. And the
2221 smooth rasterizer superceded it over ten years ago. No point in
2222 keeping. Comments suggested that it was there for compatibility
2223 with FreeType 1.
2224
2225 550 lines down.
2226
2227 * src/raster/ftraster.c (FT_RASTER_OPTION_ANTI_ALIASING,
2228 RASTER_GRAY_LINES): Remove macros and all associated code.
2229
2230 (black_TWorker): Remove `gray_min_x' and `gray_max_x'.
2231 (black_TRaster): Remove `grays' and `gray_width'.
2232
2233 (Vertical_Sweep_Init, Vertical_Sweep_Span, Vertical_Sweep_Drop,
2234 ft_black_render): Updated.
2235
2236 * src/raster/ftrend1.c (ft_raster1_render): Simplify code.
2237 (ft_raster5_renderer_class): Removed.
2238
22392015-01-14 Behdad Esfahbod <behdad@behdad.org>
2240
Behdad Esfahbod747ae2c2015-01-14 17:54:26 +01002241 [smooth] Allocate render pool for smooth rasterizer on the stack.
2242
2243 Instead of using the `render_pool' member of `FT_Library' that is
2244 provided down to the rasterizer, completely ignore that and allocate
2245 needed objects on the stack instead.
2246
2247 With this patch, rasterizing glyphs from different faces from
2248 different threads doesn't crash in the smooth rasterizer.
2249
2250 Bugs:
2251
2252 https://bugzilla.redhat.com/show_bug.cgi?id=678397
2253 https://bugzilla.redhat.com/show_bug.cgi?id=1004315
2254 https://bugzilla.redhat.com/show_bug.cgi?id=1165471
2255 https://bugs.freedesktop.org/show_bug.cgi?id=69034
2256
2257 * src/smooth/ftgrays.c (gray_TRaster): Remove `buffer',
2258 `buffer_size', `band_size', and `worker' members.
2259
2260 (gray_raster_render): Create `buffer', `buffer_size', and
2261 `band_size' locally.
2262 (gray_raster_reset): Updated.
2263
22642015-01-14 Behdad Esfahbod <behdad@behdad.org>
2265
Behdad Esfahbod531d4632015-01-14 17:46:55 +01002266 [truetype] Allocate TT_ExecContext in TT_Size instead of TT_Driver.
2267
2268 Previously the code had stipulation for using a per-TT_Size exec
2269 context if `size->debug' was true. But there was no way that
2270 `size->debug' could *ever* be true. As such, the code was always
2271 using the singleton `TT_ExecContext' that was stored in `TT_Driver'.
2272 This was, clearly, not threadsafe.
2273
2274 With this patch, loading glyphs from different faces from different
2275 threads doesn't crash in the bytecode loader code.
2276
2277 * src/truetype/ttobjs.h (TT_SizeRec): Remove `debug' member.
2278 (TT_DriverRec): Remove `context' member.
2279
2280 * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Remove
2281 `TT_ExecContext' code related to a global `TT_Driver' object.
2282
2283 (tt_driver_done): Don't remove `TT_ExecContext' object here but ...
2284 (tt_size_done_bytecode): ... here.
2285
2286 (tt_driver_init): Don't create `TT_ExecContext' object here but ...
2287 (tt_size_init_bytecode): ... here, only on demand.
2288
2289 * src/truetype/ttinterp.c (TT_Run_Context): Remove defunct debug
2290 code.
2291 (TT_New_Context): Remove `TT_ExecContext' code related to a global
2292 `TT_Driver' object.
2293
2294 * src/truetype/ttinterp.h: Updated.
2295
2296 * src/truetype/ttgload.c (TT_Hint_Glyph, tt_loader_init): Updated.
2297
22982015-01-14 Behdad Esfahbod <behdad@behdad.org>
2299
Behdad Esfahbod89bc8d42015-01-14 16:01:19 +01002300 [autofit] Allocate AF_Loader on the stack instead of AF_Module.
2301
2302 Stop sharing a global `AF_Loader'. Allocate one on the stack during
2303 glyph load.
2304
2305 Right now this results in about 25% slowdown, to be fixed in a
2306 following commit.
2307
2308 With this patch loading glyphs from different faces from different
2309 threads doesn't immediately crash in the autohinting loader code.
2310
2311 Bugs:
2312
2313 https://bugzilla.redhat.com/show_bug.cgi?id=1164941
2314
2315 * src/autofit/afloader.c (af_loader_init): Pass
2316 `AF_Loader' and `FT_Memory' instead of `AF_Module' as arguments.
2317 (af_loader_reset, af_loader_load_glyph): Also pass `loader' as
2318 argument.
2319 (af_loader_done): Use `AF_Loader' instead of `AF_Module' as
2320 argument.
2321
2322 * src/autofit/afmodule.c (af_autofitter_init): Don't call
2323 `af_loader_init'.
2324 (af_autofitter_done): Don't call `af_loader_done'.
2325 (af_autofitter_load_glyph): Use a local `AF_Loader' object.
2326
2327 * src/autofit/afloader.h: Include `afmodule.h'.
2328 Update prototypes.
2329 Move typedef for `AF_Module' to...
2330
2331 * src/autofit/afmodule.h: ... this place.
2332 No longer include `afloader.h'.
2333
23342015-01-14 Behdad Esfahbod <behdad@behdad.org>
2335
Behdad Esfahbod3f9b3d82015-01-14 15:48:12 +01002336 * src/type42/t42objs.h (T42_DriverRec): Remove unused member.
2337
Werner Lemberg36d03c92015-01-12 11:26:30 +010023382015-01-12 Werner Lemberg <wl@gnu.org>
2339
2340 Fix Savannah bug #43976.
2341
2342 Assure that FreeType's internal include directories are found before
2343 `CPPFLAGS' (which might be set by the user in the environment), and
2344 `CPPFLAGS' before `CFLAGS'.
2345
2346 * builds/freetype.mk (FT_CFLAGS): Don't add `INCLUDE_FLAGS'.
2347 (FT_COMPILE): Make this a special variable for compiling only the
2348 files handled in `freetype.mk'.
2349 (.c.$O): Removed, unused.
2350
2351 * src/*/rules.mk (*_COMPILE): Fix order of include directories.
2352
Werner Lembergd03a67a2015-01-11 08:39:14 +010023532015-01-11 Werner Lemberg <wl@gnu.org>
2354
Werner Lemberg95b57052015-01-11 09:50:49 +01002355 [truetype] Prettyfing.
2356
2357 * src/truetype/ttinterp.c (project, dualproj, fast_project,
2358 fast_dualproj): Rename to...
2359 (PROJECT, DUALPROJ, FAST_PROJECT, FAST_DUALPROJ): ... this.
2360
23612015-01-11 Werner Lemberg <wl@gnu.org>
2362
Werner Lembergea173c02015-01-11 08:58:54 +01002363 * src/truetype/ttinterp.c (Ins_JROT, Ins_JROF): Simplify.
2364
2365 Based on a patch from Behdad.
2366
23672015-01-11 Werner Lemberg <wl@gnu.org>
2368
Werner Lemberg628578c2015-01-11 08:53:31 +01002369 * src/truetype/ttinterp.c (Ins_SxVTL): Simplify function call.
2370
23712015-01-11 Werner Lemberg <wl@gnu.org>
2372
Werner Lemberg08e79092015-01-11 08:45:50 +01002373 * src/truetype/ttinterp.c (Normalize): Remove unused argument.
2374
23752015-01-11 Werner Lemberg <wl@gnu.org>
2376
Werner Lembergd03a67a2015-01-11 08:39:14 +01002377 [truetype] More macro expansions.
2378
Werner Lemberg4aaadf42015-01-11 08:42:28 +01002379 * src/truetype/ttinterp.c (FT_UNUSED_EXEC): Remove macro by
2380 expansion.
2381
23822015-01-11 Werner Lemberg <wl@gnu.org>
2383
2384 [truetype] More macro expansions.
2385
Werner Lembergd03a67a2015-01-11 08:39:14 +01002386 * src/truetype/ttinterp.c (INS_ARG): Remove macro by expansion,
2387 adjusting funtion calls where necessary.
2388 (FT_UNUSED_ARG): Removed, no longer needed.
2389
Werner Lemberg1b4d68c2015-01-10 19:56:28 +010023902015-01-10 Werner Lemberg <wl@gnu.org>
2391
Werner Lembergeb341362015-01-11 00:23:27 +01002392 [truetype] More macro expansions.
2393
2394 Based on a patch from Behdad.
2395
2396 * src/truetype/ttinterp.c (DO_*): Expand macros into corresponding
2397 `Ins_*' functions.
2398 (TT_RunIns): Replace `DO_*' macros with `Ins_*' function calls.
2399 (ARRAY_BOUND_ERROR): Remove second definition, which is no longer
2400 needed.
2401 (Ins_SVTCA, Ins_SPVTCA, Ins_SFVTCA): Replaced with...
2402 (Ins_SxyTCA): New function.
2403
24042015-01-10 Werner Lemberg <wl@gnu.org>
2405
Werner Lemberg01be1302015-01-10 23:05:37 +01002406 [truetype] Remove TT_CONFIG_OPTION_INTERPRETER_SWITCH.
2407
2408 Behdad suggested this code simplification, and nobody objected...
2409
2410 * include/config/ftoption.h, devel/ftoption.h
2411 (TT_CONFIG_OPTION_INTERPRETER_SWITCH): Remove.
2412
2413 * src/truetype/ttinterp.c [TT_CONFIG_OPTION_INTERPRETER_SWITCH]:
2414 Remove related code.
2415 (ARRAY_BOUND_ERROR): Use do-while loop.
2416
24172015-01-10 Werner Lemberg <wl@gnu.org>
2418
Werner Lembergfae0c812015-01-10 20:23:10 +01002419 [truetype] More macro expansions.
2420
Werner Lemberg6cc1f122015-01-10 21:56:59 +01002421 * src/truetype/ttinterp.c, src/truetype/ttinterp.h (EXEC_ARG_,
2422 EXEC_ARG): Remove by replacing with expansion.
2423
24242015-01-10 Werner Lemberg <wl@gnu.org>
2425
2426 [truetype] More macro expansions.
2427
Werner Lemberg24681452015-01-10 21:53:48 +01002428 Based on a patch from Behdad.
2429
2430 * src/truetype/ttinterp.c (SKIP_Code, GET_ShortIns, NORMalize,
2431 SET_SuperRound, ROUND_None, INS_Goto_CodeRange, CUR_Func_move,
2432 CUR_Func_move_orig, CUR_Func_round, CUR_Func_cur_ppem,
2433 CUR_Func_read_cvt, CUR_Func_write_cvt, CUR_Func_move_cvt,
2434 CURRENT_Ratio, INS_SxVTL, COMPUTE_Funcs, COMPUTE_Round,
2435 COMPUTE_Point_Displacement, MOVE_Zp2_Point): Remove by replacing
2436 with expansion.
2437
2438 (Cur_Func_project, CUR_Func_dualproj, CUR_fast_project,
2439 CUR_fast_dualproj): Replace with macros `project', `dualproj',
2440 `fast_project', `fast_dualproj'.
2441
24422015-01-10 Werner Lemberg <wl@gnu.org>
2443
2444 [truetype] More macro expansions.
2445
Werner Lembergfae0c812015-01-10 20:23:10 +01002446 * src/truetype/ttinterp.c (EXEC_OP_, EXEC_OP): Remove by replacing
2447 with expansion.
2448
24492015-01-10 Werner Lemberg <wl@gnu.org>
2450
Werner Lemberg5a752f32015-01-10 20:08:35 +01002451 [truetype] Remove code for static TrueType interpreter.
2452
2453 This is a follow-up patch.
2454
2455 * src/truetype/ttinterp.c, src/truetype/ttinterp.h
2456 [TT_CONFIG_OPTION_STATIC_INTERPRETER,
2457 TT_CONFIG_OPTION_STATIC_RASTER]: Remove macros and related code.
2458
24592015-01-10 Werner Lemberg <wl@gnu.org>
2460
Werner Lemberg1b4d68c2015-01-10 19:56:28 +01002461 * src/truetype/ttinterp.c (CUR): Remove by replacing with expansion.
2462
2463 This starts a series of patches that simplifies the code of the
2464 bytecode interpreter.
2465
Werner Lemberg232bd942014-12-30 21:44:51 +010024662014-12-30 Werner Lemberg <wl@gnu.org>
2467
2468 * Version 2.5.5 released.
2469 =========================
2470
2471
2472 Tag sources with `VER-2-5-5'.
2473
2474 * docs/VERSION.DLL: Update documentation and bump version number to
2475 2.5.5.
2476
2477 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
2478 builds/windows/vc2005/index.html,
2479 builds/windows/vc2008/freetype.vcproj,
2480 builds/windows/vc2008/index.html,
2481 builds/windows/vc2010/freetype.vcxproj,
2482 builds/windows/vc2010/index.html,
2483 builds/windows/visualc/freetype.dsp,
2484 builds/windows/visualc/freetype.vcproj,
2485 builds/windows/visualc/index.html,
2486 builds/windows/visualce/freetype.dsp,
2487 builds/windows/visualce/freetype.vcproj,
2488 builds/windows/visualce/index.html,
2489 builds/wince/vc2005-ce/freetype.vcproj,
2490 builds/wince/vc2005-ce/index.html,
2491 builds/wince/vc2008-ce/freetype.vcproj,
2492 builds/wince/vc2008-ce/index.html: s/2.5.4/2.5.5/, s/254/255/.
2493
2494 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 5.
2495
2496 * builds/unix/configure.raw (version_info): Set to 17:4:11.
2497 * CMakeLists.txt (VERSION_PATCH): Set to 5.
2498 * docs/CHANGES: Updated.
2499
2500 * builds/toplevel.mk (dist): Fix typos.
2501
Alexei Podtelezhnikov70241552014-12-24 12:11:46 -050025022014-12-24 Alexei Podtelezhnikov <apodtele@gmail.com>
2503
2504 [base] Formatting and nanooptimizations.
2505
2506 * src/base/ftcalc.c,
2507 * src/base/fttrigon.c: Revise sign restoration.
2508
Werner Lemberg06842c72014-12-13 07:42:51 +010025092014-12-13 Werner Lemberg <wl@gnu.org>
2510
2511 * src/pcf/pcfread.c (pcf_read_TOC): Improve fix from 2014-12-08.
2512
Werner Lembergb9438112014-12-11 13:33:14 +010025132014-12-11 Werner Lemberg <wl@gnu.org>
2514
Werner Lemberg82119502014-12-11 22:27:06 +01002515 * builds/toplevel.mk (dist): Use older POSIX standard for `tar'.
2516
2517 Apparently, BSD tar isn't capable yet of handling POSIX-1.2001
2518 (contrary to GNU tar), so force the POSIX-1.1988 format.
2519
2520 Problem reported by Stephen Fisher <sfisher@SDF.ORG>.
2521
25222014-12-11 Werner Lemberg <wl@gnu.org>
2523
Werner Lemberg812ed342014-12-11 14:07:29 +01002524 * src/type42/t42parse.c (t42_parse_sfnts): Reject invalid TTF size.
2525
25262014-12-11 Werner Lemberg <wl@gnu.org>
2527
Werner Lembergc9ca6ff2014-12-11 13:39:39 +01002528 * src/base/ftobjs.c (FT_Get_Glyph_Name): Fix off-by-one check.
2529
2530 Problem reported by Dennis Felsing <dennis@felsin9.de>.
2531
25322014-12-11 Werner Lemberg <wl@gnu.org>
2533
Werner Lembergb9438112014-12-11 13:33:14 +01002534 * src/type42/t42parse.c (t42_parse_sfnts): Check `string_size'.
2535
2536 Problem reported by Dennis Felsing <dennis@felsin9.de>.
2537
suzuki toshiya2b592822014-12-10 00:27:41 +090025382014-12-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2539
suzuki toshiya9bd1e552014-12-09 14:51:52 +09002540 [gxvalid] Fix a naming convention conflicting with ftvalid.
2541
2542 See previous changeset for otvalid.
2543
2544 * src/gxvalid/{gxvcommn.h, gxvmort.h, gxvmorx.h}: Replace
2545 `valid' by `gxvalid'.
2546 * src/gxvalid/{gxvbsln.c, gxvcommn.c, gxvfeat.c, gxvjust.c,
2547 gxvkern.c, gxvlcar.c, gxvmort.c, gxvmort0.c, gxvmort1.c,
2548 gxvmort2.c, gxvmort4.c, gxvmort5.c, gxvmorx.c, gxvmorx0.c,
2549 gxvmorx1.c, gxvmorx2.c, gxvmorx4.c, gxvmorx5.c, gxvopbd.c,
2550 gxvprop.c, gxvtrak.c}: Replace `valid' by `gxvalid' if
2551 it is typed as GXV_Validator.
2552
25532014-12-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2554
suzuki toshiya51abdf62014-12-09 00:58:04 +09002555 [otvalid] Fix a naming convention conflicting with ftvalid.
2556
2557 Some prototypes in ftvalid.h use `valid' for the variables
2558 typed as FT_Validator. Their implementations in src/base/
2559 ftobjs.c and utilizations in src/sfnt/ttcmap.c do similar.
2560
2561 Some macros in otvcommn.h assume the exist of the variable
2562 `valid' typed as OTV_Validator in the caller.
2563
2564 Mixing these two conventions cause invalid pointer conversion
2565 and unexpected SEGV in longjmp. To prevent it, all variables
2566 typed as OTV_Validator are renamed to `otvalid'.
2567
2568 * src/otvalid/otvcommn.h: Replace `valid' by `otvalid'.
2569 * src/otvalid/{otvcommn.c, otvbase.c, otvgdef.c, otvgpos.c,
2570 otvgsub.c, otvjstf.c, otvmath.c}: Replace `valid' by `otvalid'
2571 if it is typed as OTV_Validator.
2572
25732014-12-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2574
suzuki toshiya2b592822014-12-10 00:27:41 +09002575 [ftvalid] Introduce FT_THROW() in FT_INVALID_XXX macros.
2576
2577 Original patch is designed by Werner Lemberg. Extra part
2578 for otvalid and gxvalid are added by suzuki toshiya, see
2579 discussion:
2580 http://lists.nongnu.org/archive/html/freetype-devel/2014-12/msg00002.html
2581 http://lists.nongnu.org/archive/html/freetype-devel/2014-12/msg00007.html
2582
2583 * include/internal/ftvalid.h: Introduce FT_THROW() in FT_INVALID_().
2584 * src/gxvalid/gxvcommn.h: Ditto.
2585 * src/otvalid/otvcommn.h: Ditto.
2586
Werner Lemberg74af85c2014-12-08 16:01:50 +010025872014-12-08 Werner Lemberg <wl@gnu.org>
2588
2589 [pcf] Fix Savannah bug #43774.
2590
2591 Work around `features' of X11's `pcfWriteFont' and `pcfReadFont'
2592 functions. Since the PCF format doesn't have an official
2593 specification, we have to exactly follow these functions' behaviour.
2594
2595 The problem was unveiled with a patch from 2014-11-06, fixing issue
2596 #43547.
2597
2598 * src/pcf/pcfread.c (pcf_read_TOC): Don't check table size for last
2599 element. Instead, assign real size.
2600
Werner Lemberg66883b52014-12-07 09:17:06 +010026012014-12-07 Werner Lemberg <wl@gnu.org>
2602
Werner Lemberg553c9672014-12-07 19:29:52 +01002603 Work around a bug in Borland's C++ compiler.
2604
2605 See
2606
2607 http://qc.embarcadero.com/wc/qcmain.aspx?d=118998
2608
2609 for Borland's bug tracker entry.
2610
2611 Reported by Yuliana Zigangirova <zigangirova@inbox.ru>,
2612 http://lists.gnu.org/archive/html/freetype-devel/2014-04/msg00001.html.
2613
2614 * include/internal/ftvalid.h (FT_ValidatorRec), src/smooth/ftgrays.c
2615 (gray_TWorker_): Move `ft_jmp_buf' field to be the first element.
2616
26172014-12-07 Werner Lemberg <wl@gnu.org>
2618
Werner Lemberg9870d6d2014-12-07 09:40:47 +01002619 */*: Decorate hex constants with `U' and `L' where appropriate.
2620
26212014-12-07 Werner Lemberg <wl@gnu.org>
2622
Werner Lemberg66883b52014-12-07 09:17:06 +01002623 [truetype] Prevent memory leak for buggy fonts.
2624
2625 * src/truetype/ttobjs.c (tt_size_done): Unconditionally call
2626 `tt_size_done_bytecode'.
2627
Werner Lemberg94926682014-12-06 07:11:44 +010026282014-12-06 Werner Lemberg <wl@gnu.org>
2629
2630 * Version 2.5.4 released.
2631 =========================
2632
2633
2634 Tag sources with `VER-2-5-4'.
2635
2636 * docs/VERSION.DLL: Update documentation and bump version number to
2637 2.5.4.
2638
2639 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
2640 builds/windows/vc2005/index.html,
2641 builds/windows/vc2008/freetype.vcproj,
2642 builds/windows/vc2008/index.html,
2643 builds/windows/vc2010/freetype.vcxproj,
2644 builds/windows/vc2010/index.html,
2645 builds/windows/visualc/freetype.dsp,
2646 builds/windows/visualc/freetype.vcproj,
2647 builds/windows/visualc/index.html,
2648 builds/windows/visualce/freetype.dsp,
2649 builds/windows/visualce/freetype.vcproj,
2650 builds/windows/visualce/index.html,
2651 builds/wince/vc2005-ce/freetype.vcproj,
2652 builds/wince/vc2005-ce/index.html,
2653 builds/wince/vc2008-ce/freetype.vcproj,
2654 builds/wince/vc2008-ce/index.html: s/2.5.3/2.5.4/, s/253/254/.
2655
2656 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4.
2657
2658 * builds/unix/configure.raw (version_info): Set to 17:3:11.
2659 * CMakeLists.txt (VERSION_PATCH): Set to 4.
2660 * docs/CHANGES: Updated.
2661
Werner Lemberg934ef382014-12-04 06:38:51 +010026622014-12-04 Werner Lemberg <wl@gnu.org>
2663
2664 docs/CHANGES: Updated, formatted.
2665
Dave Arnold2cdc4562014-12-04 06:10:16 +010026662014-12-04 Dave Arnold <darnold@adobe.com>
2667
Dave Arnoldf89396c2014-12-04 06:17:26 +01002668 [cff] Modify an FT_ASSERT.
2669
2670 * src/cff/cf2hints.c (cf2_hintmap_map): After the fix for Savannah
2671 bug #43661, the test font `...aspartam.otf' still triggers an
2672 FT_ASSERT. Since hintmap still works with count==0, ...
2673 (cf2_glyphpath_lineTo, cf2_glyphpath_curveTo): ... add that term to
2674 suppress the assert.
2675
26762014-12-04 Dave Arnold <darnold@adobe.com>
2677
Dave Arnold2cdc4562014-12-04 06:10:16 +01002678 [cff] Fix Savannah bug #43661.
2679
2680 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdHSTEM,
2681 cf2_cmdVSTEM, cf2_cmdHINTMASK>: Don't append to stem arrays after
2682 hintmask is constructed.
2683
2684 * src/cff/cf2hints.c (cf2_hintmap_build): Add defensive code to
2685 avoid reading past end of hintmask.
2686
Werner Lemberg16188eb2014-12-03 10:18:34 +010026872014-12-03 Werner Lemberg <wl@gnu.org>
2688
Werner Lemberg8fa69a82014-12-03 20:07:14 +01002689 docs/CHANGES: Updated.
2690
26912014-12-03 Werner Lemberg <wl@gnu.org>
2692
Werner Lemberga632b5f2014-12-03 19:30:44 +01002693 [autofit] Better fix for conversion specifiers in debug messages.
2694
2695 Using `%ld' for pointer differences causes warnings on 32bit
2696 platforms. The correct type would be (the relatively new) `%td',
2697 however, this is missing on some important platforms.
2698
2699 This patch improves the change from 2014-11-28.
2700
2701 * src/autofit/afhints.c (AF_INDEX_NUM): Use `int' typecast. Our
2702 pointer differences are always sufficiently small.
2703 (af_glyph_hints_dump_points, af_glyph_hints_dump_segments,
2704 af_glyph_hints_dump_edge): Revert to `%d' and use `AF_INDEX_NUM'.
2705
27062014-12-03 Werner Lemberg <wl@gnu.org>
2707
Werner Lemberg16188eb2014-12-03 10:18:34 +01002708 FT_Sfnt_Tag: s/ft_sfnt_xxx/FT_SFNT_XXX/ for orthogonality.
2709
2710 All public FreeType enumeration and flag values are uppercase...
2711
2712 * include/tttables.h (FT_Sfnt_Tag): Implement it. For backwards
2713 compatilibity, retain the old values as macros.
2714
2715 * src/base/ftfstype.c (FT_Get_FSType_Flags), src/sfnt/sfdriver.c
2716 (get_sfnt_table): Updated.
2717
Werner Lemberg2af25ac2014-12-02 08:38:57 +010027182014-12-02 Werner Lemberg <wl@gnu.org>
2719
Werner Lembergde43ace2014-12-02 23:06:04 +01002720 * include/*: Improve structure of documentation.
2721
2722 . Add and update many `<Order>' tags.
2723 . Apply various documentation fixes.
2724 . Remove details to deprecated (or never implemented) data.
2725
27262014-12-02 Werner Lemberg <wl@gnu.org>
2727
Werner Lembergca1f5cc2014-12-02 22:49:25 +01002728 [docmaker] Always handle `<Order>' section elements.
2729
2730 Previously, those elements were handled only for sections present in
2731 a `<Sections>' chapter element.
2732
2733 * src/tools/docmaker/content.py (ContentProcessor::finish):
2734 Implement it.
2735
27362014-12-02 Werner Lemberg <wl@gnu.org>
2737
Werner Lembergef6a3522014-12-02 21:16:59 +01002738 [docmaker] Properly handle empty rows in Synopsis.
2739
2740 * src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Emit
2741 `&nbsp;' for empty fields.
2742
27432014-12-02 Werner Lemberg <wl@gnu.org>
2744
Werner Lemberg0e96f052014-12-02 11:08:31 +01002745 [docmaker] Thinko.
2746
2747 * src/tools/docmaker/content.py (DocBlock::get_markup_words_all):
2748 Emit `/empty/' string for first element also.
2749
27502014-12-02 Werner Lemberg <wl@gnu.org>
2751
Werner Lemberg102d4a72014-12-02 10:27:40 +01002752 [docmaker] Honour empty lines in `<Order>' section element.
2753
2754 This greatly improves the readability of the `Synopsis' links.
2755
2756 * src/tools/docmaker/content.py (DocBlock::get_markup_words_all):
2757 Insert string `/empty/' between items.
2758
2759 * src/tools/docmaker/formatter.py (Formatter::section_dump): Make it
2760 robust against nonexistent keys.
2761
2762 * src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Emit
2763 empty <td> elements for `/empty/'.
2764
27652014-12-02 Werner Lemberg <wl@gnu.org>
2766
Werner Lemberg2af25ac2014-12-02 08:38:57 +01002767 [docmaker] Ensure Python 3 compatibility.
2768
2769 * src/tools/docmaker/content.py (ContentProcessor::set_section,
2770 ContentProcessor::finish): Replace `has_key' function with `in'
2771 keyword.
2772
2773 * src/tools/docmaker/formatter.py (Formatter::__init__): Replace
2774 sorting function with a key generator.
2775 (Formatter::add_identifier): Replace `has_key' function with `in'
2776 keyword.
2777
2778 * src/tools/docmaker/tohtml.py (HtmlFormatter::html_source_quote):
2779 Replace `has_key' function with `in' keyword.
2780 (HtmlFormatter::index_exit, HtmlFormatter::section_enter): Use
2781 integer division.
2782 s/<>/>/.
2783
2784 * src/tools/docmaker/utils.py: Import `itertools'.
2785 (index_sort): Replaced by...
2786 (index_key): ... this new key generator (doing exactly the same).
2787
Werner Lemberg8f795112014-11-29 06:49:15 +010027882014-11-29 Werner Lemberg <wl@gnu.org>
2789
Werner Lemberg80bfeb12014-12-01 10:07:52 +01002790 [docmaker] Don't output a block multiple times.
2791
2792 This bug was hidden by not processing all lines of `<Order>' blocks.
2793
2794 * src/tools/docmaker/formatter.py (Formatter::section_dump): Filter
2795 out field names.
2796
27972014-11-29 Werner Lemberg <wl@gnu.org>
2798
Werner Lemberg0dbad762014-12-01 08:44:48 +01002799 [docmaker] Use field values as HTML link targets where possible.
2800
2801 * src/tools/docmaker/tohtml.py (HtmlFormatter::make_block_url):
2802 Accept second, optional argument to specify a name.
2803 (HtmlFormatter::html_source_quote): Link to field ID if possible.
2804 (HtmlFormatter::print_html_field_list): Emit `id' attribute.
2805
28062014-11-29 Werner Lemberg <wl@gnu.org>
2807
Werner Lemberg785b1d02014-11-30 22:16:34 +01002808 [docmaker] Allow empty lines in `<Order>' blocks.
2809
2810 Before this patch, the suggested order of entries stopped at the
2811 first empty line.
2812
2813 Obviously, nobody noticed that this problem caused a much reduced
2814 set of links in the `Synopsis' sections; in particular, the
2815 `<Order>' blocks contain a lot of entries that wouldn't be listed
2816 otherwise...
2817
2818 * src/tools/docmaker/content.py (DocBlock::get_markup_words_all):
2819 New function to iterate over all items.
2820 (DocSection::process): Use it.
2821
28222014-11-29 Werner Lemberg <wl@gnu.org>
2823
Werner Lemberg16b3e622014-11-30 20:58:27 +01002824 * src/tools/docmaker/sources.py (column) [Format 2]: Fix regexp.
2825
2826 After the single asterisk there must be no other immediately following
2827 asterisk.
2828
28292014-11-29 Werner Lemberg <wl@gnu.org>
2830
Werner Lemberg434bc692014-11-29 23:12:55 +01002831 * src/tools/docmaker/tohtml.py: Improve CSS for vertical spacing.
Werner Lemberg51987ea2014-11-29 22:19:29 +01002832
Werner Lemberg434bc692014-11-29 23:12:55 +010028332014-11-29 Werner Lemberg <wl@gnu.org>
2834
2835 [docmaker] Improve HTML code for table of contents.
2836
2837 * src/tools/docmaker/tohtml.py: Introduce a new table class `toc',
Werner Lemberg51987ea2014-11-29 22:19:29 +01002838 together with proper CSS.
2839
28402014-11-29 Werner Lemberg <wl@gnu.org>
2841
Werner Lembergaa834ce2014-11-29 20:08:29 +01002842 [docmaker] Provide higher-level markup and simplify HTML.
2843
2844 * src/tools/docmaker/tohtml.py: Instead of using extraneous `<div>'
2845 elements, use CSS descendants (of class `section') to format the
2846 data.
2847
2848 Also remove reduntant <p> and <br> elements, replacing them with
2849 proper CSS.
2850
2851 Globally reduce page width to 75%.
2852
2853 (block_header): Rename <div> class to `section'.
2854
28552014-11-29 Werner Lemberg <wl@gnu.org>
2856
Werner Lemberg3bb97022014-11-29 16:12:37 +01002857 [docmaker] Add `top' links after blocks.
2858
2859 * src/tools/docmaker/tohtml.py (block_footer_middle): Implement it.
2860
28612014-11-29 Werner Lemberg <wl@gnu.org>
2862
Werner Lemberga31f9712014-11-29 07:18:44 +01002863 * src/tools/docmaker/tohtml.py: Improve CSS for fields.
2864
Werner Lemberg3bb97022014-11-29 16:12:37 +01002865 Make fields align horizontally relative to full line width.
Werner Lemberga31f9712014-11-29 07:18:44 +01002866
28672014-11-29 Werner Lemberg <wl@gnu.org>
2868
Werner Lemberg8f795112014-11-29 06:49:15 +01002869 * src/tools/docmaker/tohtml.py: Fix index and TOC templates.
2870
2871 This thinko was introduced 2014-11-27.
2872
Werner Lembergba1ba0c2014-11-28 22:04:14 +010028732014-11-28 Werner Lemberg <wl@gnu.org>
2874
2875 [docmaker] Format field lists with CSS.
2876
2877 This also simplifies the inserted HTML code.
2878
2879 * src/tools/docmaker/tohtml.py
2880 (HtmlFormatter::print_html_field_list): Do it.
2881
suzuki toshiya348fffa2014-11-28 16:05:59 +090028822014-11-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2883
2884 Fix compiler warning to the comparison between signed and
2885 unsigned variable.
2886
2887 * src/pfr/pfrsbit.c (pfr_slot_load_bitmap): Fix the comparison
2888 between `ypos + ysize' and FT_INT_{MAX,MIN}.
2889
Werner Lembergba1ba0c2014-11-28 22:04:14 +010028902014-11-28 Werner Lemberg <wl@gnu.org>
Werner Lemberg984e0712014-11-28 05:33:58 +01002891
Werner Lembergba1ba0c2014-11-28 22:04:14 +01002892 [docmaker] Replace empty `<td>' with CSS.
Werner Lemberg46d4dc82014-11-28 05:49:56 +01002893
2894 * src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Do
2895 it.
2896
Werner Lembergba1ba0c2014-11-28 22:04:14 +010028972014-11-28 Werner Lemberg <wl@gnu.org>
Werner Lemberg46d4dc82014-11-28 05:49:56 +01002898
Werner Lemberg984e0712014-11-28 05:33:58 +01002899 [docmaker] Replace some `<table>' tags with `<h4>' and `<div>'.
2900
2901 * src/tools/docmaker/tohtml.py (marker_*): Use `<h4>'.
2902 (source_*): Use `<div>'.
2903 (HtmlFormatter::block_enter): s/<h4>/<h3>/.
2904
suzuki toshiya9ee6a0a2014-11-28 11:14:18 +090029052014-11-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2906
2907 Fix compiler warning to conversion specifiers in debug messages.
2908
2909 * src/autofit/afhints.c (af_glyph_hints_dump_points): Add length
Werner Lemberga632b5f2014-12-03 19:30:44 +01002910 modifier to dump long integers.
2911 (af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Ditto.
suzuki toshiya9ee6a0a2014-11-28 11:14:18 +09002912
Werner Lemberg26d699e2014-11-27 19:22:52 +010029132014-11-27 Werner Lemberg <wl@gnu.org>
2914
Werner Lemberg984e0712014-11-28 05:33:58 +01002915 * src/tools/docmaker/tohtml.py: Use more CSS for index.
Werner Lemberg7ea36342014-11-27 19:38:31 +01002916
29172014-11-27 Werner Lemberg <wl@gnu.org>
2918
Werner Lembergedcf8172014-11-27 19:28:48 +01002919 [docmaker] Replace `name' attribute of `<a>' with `id'.
2920
2921 * src/tools/docmaker/tohtml.py (HtmlFormatter::block_enter): Do it.
2922
29232014-11-27 Werner Lemberg <wl@gnu.org>
2924
Werner Lemberg26d699e2014-11-27 19:22:52 +01002925 * src/tools/docmaker/tohtml.py: Remove remaining `width' attributes.
2926
2927 For `Index' and `TOC' links, we now simply use the `text-align' CSS
2928 property of `<td>' to enforce flush-left and flush-right,
2929 eliminating the hack with an empty, full-width `<td>' element
2930 inbetween.
2931
2932 The change also enforces the same (smaller) size for all index and
2933 TOC links.
2934
suzuki toshiya2676e072014-11-28 00:58:25 +090029352014-11-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2936
suzuki toshiya1b12f5d2014-11-28 01:22:26 +09002937 * src/cff/cf2font.c: Include `ftcalc.h' to use FT_MSB(),
2938 cf2font.c could not find it under `make multi' build.
2939
29402014-11-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2941
suzuki toshiya2676e072014-11-28 00:58:25 +09002942 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Remove
2943 unrequired negative value check for `width' and `height'.
2944
Werner Lemberg8585cf52014-11-27 10:49:05 +010029452014-11-27 Werner Lemberg <wl@gnu.org>
2946
Werner Lembergdd3fee02014-11-27 13:20:52 +01002947 * src/tools/docmaker/tohtml.py: More HTML table refactoring.
2948
2949 Replace some `<table>' tags with `<div>' to simplify structure.
2950
2951 Move `bgcolor' attribute to CSS.
2952
2953 Replace most `width' attributes with CSS. The remaining instances
2954 (providing a similar effect as LaTeX's `\hfill' command) are removed
2955 in a later patch.
2956
29572014-11-27 Werner Lemberg <wl@gnu.org>
2958
Werner Lemberga5ad26a2014-11-27 10:52:24 +01002959 * src/tools/docmaker/tohtml.py: Replace <font> with CSS.
2960
29612014-11-27 Werner Lemberg <wl@gnu.org>
2962
Werner Lembergba67c612014-11-27 10:51:49 +01002963 * src/tools/docmaker/tohtml.py: Center <table> with CSS.
2964
29652014-11-27 Werner Lemberg <wl@gnu.org>
2966
Werner Lemberg5594fa52014-11-27 10:50:50 +01002967 * src/tools/docmaker/tohtml.py: Replace `<center>' with `<div>'.
2968
29692014-11-27 Werner Lemberg <wl@gnu.org>
2970
Werner Lemberg8585cf52014-11-27 10:49:05 +01002971 * src/tools/docmaker/tohtml.py: Remove redundant `<center>' tags.
2972
2973 This starts a series of commits into the direction of generating
2974 valid HTML 5 code, especially using much more CSS.
2975
suzuki toshiya1b057042014-11-27 17:53:20 +090029762014-11-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2977
2978 Prevent too negative values (< FT_INT_MIN) in bitmap metrics,
2979 suggested by Alexei.
2980
2981 * src/pfr/pfrsbit.c (pfr_slot_load_bitmap): Prevent too
2982 negative values in `xpos' and `ypos + ysize'.
2983 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Prevent
2984 too negative values in `x_left' and `y_top'. Either negative
2985 values in `width' and `height' are checked.
2986
Werner Lemberg3d167cb2014-11-27 05:19:41 +010029872014-11-27 Werner Lemberg <wl@gnu.org>
2988
Werner Lembergc52882a2014-11-27 08:01:25 +01002989 [docmaker] Produce better HTML code.
2990
2991 * src/tools/docmaker/tohtml.py: Always use double quotes for
2992 attribute values.
2993 (source_footer): Close `td' and `tr' groups.
2994
29952014-11-27 Werner Lemberg <wl@gnu.org>
2996
Werner Lembergdbb93152014-11-27 07:20:48 +01002997 Use better way to disable creation of .pyc files for `make refdoc'.
2998
2999 Python 2.6 was released in 2008...
3000
3001 * builds/freetype.mk (refdoc): Use python's `-B' option.
3002
3003 * builds/detect.mk (std_setup, dos_setup): Mention required python
3004 version for `refdoc' target.
3005
30062014-11-27 Werner Lemberg <wl@gnu.org>
3007
Werner Lemberge8a5c332014-11-27 06:48:37 +01003008 * src/tools/docmaker/sources.py (re_bold, re_italic): Use
3009 non-grouping parentheses.
3010 * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word):
3011 Updated.
3012
30132014-11-27 Werner Lemberg <wl@gnu.org>
3014
Werner Lemberg3d167cb2014-11-27 05:19:41 +01003015 * src/base/ftobjs.c (FT_Get_Glyph_Name): Fix compiler warning.
3016
3017 Introdruced in previous change. Reported by Alexei.
3018
Werner Lemberga593a042014-11-26 18:42:48 +010030192014-11-26 Werner Lemberg <wl@gnu.org>
3020
Werner Lembergf34f1922014-11-26 21:59:21 +01003021 * src/*: Add checks for parameters of API functions where missing.
3022
3023 `API functions' are functions tagged with `FT_EXPORT_DEF'.
3024
3025 Besides trivial fixes, the following changes are included, too.
3026
3027 * src/base/ftbdf.c (FT_Get_BDF_Charset_ID, FT_Get_BDF_Property): Set
3028 error code if no service is available.
3029
3030 * src/base/ftinit.c (FT_Done_FreeType): Change return value for
3031 invalid `library' parameter to `Invalid_Library_Handle'.
3032
3033 * src/base/ftobjs.c (FT_New_Size): Change return value for invalid
3034 `asize' parameter to `Invalid_Argument'.
3035
3036 * src/base/ftoutln.c (FT_Outline_Copy): Change return value for
3037 invalid `source' and `target' parameters to `Invalid_Outline'.
3038 (FT_Outline_Done_Internal): Change return value for invalid
3039 `outline' parameter to `Invalid_Outline'.
3040
30412014-11-26 Werner Lemberg <wl@gnu.org>
3042
Werner Lemberga593a042014-11-26 18:42:48 +01003043 * src/cache/ftcbasic.c: Use single calls to `FT_TRACE'.
3044
suzuki toshiya5aff8532014-11-26 14:36:12 +090030452014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3046
suzuki toshiyacd4a5a22014-11-27 00:20:48 +09003047 * src/base/ftobj.c (Mac_Read_POST_Resource): Additional
3048 overflow check in the summation of POST fragment lengths,
3049 suggested by Mateusz Jurczyk <mjurczyk@google.com>.
3050
30512014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3052
suzuki toshiya1720e812014-11-26 16:39:00 +09003053 * src/base/ftobjs.c (Mac_Read_POST_Resource): Insert comments
3054 and fold too long tracing messages.
3055
30562014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3057
suzuki toshiya18a8f0d2014-11-26 16:11:38 +09003058 Fix Savannah bug #43540.
3059
3060 * src/base/ftmac.c (parse_fond): Prevent a buffer overrun
3061 caused by a font including too many (> 63) strings to store
3062 names[] table.
3063
30642014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3065
suzuki toshiya45331672014-11-26 16:02:17 +09003066 * src/base/ftobjs.c (Mac_Read_POST_Resource): Use unsigned long
3067 variables to read the lengths in POST fragments. Suggested by
3068 Mateusz Jurczyk <mjurczyk@google.com>.
3069
30702014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3071
suzuki toshiya35252ae2014-11-26 15:52:23 +09003072 Fix Savannah bug #43539.
3073
3074 * src/base/ftobjs.c (Mac_Read_POST_Resource): Fix integer overflow
3075 by a broken POST table in resource-fork.
3076
30772014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3078
suzuki toshiya240c94a2014-11-26 15:43:29 +09003079 Fix Savannah bug #43538.
3080
3081 * src/base/ftobjs.c (Mac_Read_POST_Resource): Fix integer overflow
3082 by a broken POST table in resource-fork.
3083
30842014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3085
suzuki toshiya5aff8532014-11-26 14:36:12 +09003086 * src/base/ftobjs.c (Mac_Read_POST_Resource): Avoid memory leak
3087 by a broken POST table in resource-fork. Return after freeing
3088 the buffered POST table when it is found to be broken.
3089
Werner Lemberg04edbbd2014-11-25 10:21:13 +010030902014-11-25 Werner Lemberg <wl@gnu.org>
3091
Werner Lemberg02b8e7e2014-11-25 11:31:51 +01003092 */*: s/Invalid_Argument/Invalid_Size_Handle/ where appropriate.
3093
30942014-11-25 Werner Lemberg <wl@gnu.org>
3095
Werner Lemberg0d4aa232014-11-25 11:26:14 +01003096 */*: s/Invalid_Argument/Invalid_Stream_Handle/ where appropriate.
3097
30982014-11-25 Werner Lemberg <wl@gnu.org>
3099
Werner Lembergf4f9e682014-11-25 11:11:55 +01003100 */*: s/Invalid_Argument/Invalid_Library_Handle/ where appropriate.
3101
31022014-11-25 Werner Lemberg <wl@gnu.org>
3103
Werner Lemberg04c2aa12014-11-25 10:22:12 +01003104 */*: s/Invalid_Argument/Invalid_Outline/ where appropriate.
3105
31062014-11-25 Werner Lemberg <wl@gnu.org>
3107
Werner Lemberg04edbbd2014-11-25 10:21:13 +01003108 */*: s/Invalid_Argument/Invalid_Face_Handle/ where appropriate.
3109
Werner Lembergeca0f062014-11-24 10:22:08 +010031102014-11-24 Werner Lemberg <wl@gnu.org>
3111
Werner Lemberg3e867112014-11-25 09:01:07 +01003112 [Savannah bug #43682] Adjust some renderer callbacks.
3113
3114 * src/raster/ftraster.c (ft_black_set_mode): Change return type to
3115 `int' to stay in sync with `FT_Renderer_SetModeFunc' prototype.
3116
3117 * src/smooth/ftgrays.c (gray_raster_set_mode): New dummy function
3118 for orthogonality.
3119 (ft_grays_raster): Use it.
3120
Werner Lemberg04edbbd2014-11-25 10:21:13 +010031212014-11-25 Werner Lemberg <wl@gnu.org>
Werner Lemberg3e867112014-11-25 09:01:07 +01003122
Werner Lemberg6689a002014-11-25 08:53:09 +01003123 [Savannah bug #43682] Properly handle missing return errors.
3124
3125 The functions in this patch *do* return non-trivial errors that must
3126 be taken care of.
3127
3128 * src/autofit/afloader.c (af_loader_load_g), src/base/ftobjs.c
3129 (FT_Render_Glyph_Internal), src/base/ftoutln.c (FT_Outline_Render),
3130 src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_endchar>,
3131 src/psaux/psobjs.c (ps_parser_load_field_table), src/psaux/t1decode
3132 (t1_decoder_parse_charstrings) <op_endchar>, src/truetype/ttgload.c
3133 (load_truetype_glyph <subglyph loop>, tt_loader_init,
3134 TT_Load_Glyph), src/truetype/ttgxvar.c (TT_Set_MM_Blend),
3135 src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Do it.
3136
Werner Lemberg04edbbd2014-11-25 10:21:13 +010031372014-11-25 Werner Lemberg <wl@gnu.org>
Werner Lemberg6689a002014-11-25 08:53:09 +01003138
Werner Lembergb24e8ba2014-11-25 08:30:49 +01003139 [Savannah bug #43682] Add/remove `void' casts to some functions.
3140
3141 We use a cast to indicate that we intentionally ignore a function's
3142 return value. However, this doesn't apply to API functions where
3143 errors can only happen for trivially invalid input.
3144
3145 * src/base/ftstroke.c (FT_Glyph_Stroke, FT_Glyph_StrokeBorder),
3146 src/base/ftsynth.c (FT_GlyphSlot_Embolden), src/cff/cffgload.c
3147 (cff_slot_load), src/pfr/pfrdrivr.c (pfr_get_kerning),
3148 src/type1/t1load.c (parse_encoding), src/type42/t42parse.c
3149 (t42_parse_encoding): Do it.
3150
Werner Lemberg04edbbd2014-11-25 10:21:13 +010031512014-11-25 Werner Lemberg <wl@gnu.org>
Werner Lembergb24e8ba2014-11-25 08:30:49 +01003152
Werner Lembergef439fd2014-11-25 08:14:15 +01003153 [Savannah bug #43682] Change some signatures to `void' return type.
3154
3155 * include/internal/pshints.h (PSH_Globals_SetScaleFunc),
3156 include/internal/sfnt.h (TT_Get_Metrics_Func),
3157 src/pshinter/pshglob.c (psh_globals_set_scale),
3158 src/pshinter/pshrec.c (ps_hints_init), src/sfnt/ttmtx.c
3159 (tt_face_get_metrics), src/truetype/ttinterp.c (TT_Goto_CodeRange,
3160 TT_Set_CodeRange, TT_Clear_CodeRange, TT_Done_Context,
3161 TT_Save_Context): Do it.
3162
3163 * src/pshinter/pshglob.h, src/pshinter/pshrec.h, src/sfnt/ttmtx.h,
3164 src/truetype/ttgload.c (TT_Hint_Glyph), src/truetype/ttinterp.c
3165 (TT_Run_Context), src/truetype/ttinterp.h, src/truetype/ttobjs.c
3166 (tt_size_run_fpgm, tt_size_run_prep): Updated.
3167
31682014-11-24 Werner Lemberg <wl@gnu.org>
3169
Werner Lemberg6889f7b2014-11-24 17:16:08 +01003170 Remove all code related to FT_MAX_CHARMAP_CACHEABLE.
3171
3172 This is no longer used.
3173
3174 * src/base/ftobjs.c, src/cache/ftccmap.c, src/cff/cffobjs.c,
3175 src/sfnt/ttcmap.c: Do it.
3176
31772014-11-24 Werner Lemberg <wl@gnu.org>
3178
Werner Lembergf0292bb2014-11-24 10:51:21 +01003179 [sfnt] Fix Savannah bug #43680.
3180
3181 This adds an additional constraint to make the fix from 2013-01-25
3182 really work.
3183
3184 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_image) <index_format==4>:
3185 Check `p' before `num_glyphs'.
3186
31872014-11-24 Werner Lemberg <wl@gnu.org>
3188
Werner Lembergeca0f062014-11-24 10:22:08 +01003189 [truetype] Fix Savannah bug #43679.
3190
3191 * src/truetype/ttpload.c (tt_face_load_hdmx): Check minimum size of
3192 `record_size'.
3193
Jarkko Pöyry96341dc2014-11-24 09:53:07 +010031942014-11-24 Jarkko Pöyry <jarkko.poyry@gmail.com>
3195
3196 [cff, pfr, psaux, winfonts] Fix Savannah bug #43676.
3197
Werner Lemberged6a9df2014-12-06 23:28:58 +01003198 Don't cast cmap init function pointers to an incompatible type.
Jarkko Pöyry96341dc2014-11-24 09:53:07 +01003199
3200 Without this patch, the number of parameters between declaration and
3201 the real signature differs. Calling such a function results in
3202 undefined behavior.
3203
3204 ISO/IEC 9899:TC3 (Committee Draft September 7, 2007)
3205 6.5.2.2 Function calls
3206 9 If the function is defined with a type that is not
3207 compatible with the type (of the expression) pointed to by
3208 the expression that denotes the called function, the
3209 behavior is undefined.
3210
3211 On certain platforms (c -> js with emscripten) this causes
3212 termination of execution or invalid calls because in the emscripten
3213 implementation, function pointers of different types are stored in
3214 different pointer arrays. Incorrect pointer type here results in
3215 indexing of an incorrect array.
3216
3217 * src/cff/cffcmap.c (cff_cmap_encoding_init, cff_cmap_unicode_init),
3218 src/pfr/pfrcmap.c (pfr_cmap_init), src/psaux/t1cmap.c
3219 t1_cmap_standard_init, t1_cmap_expert_init, t1_cmap_custom_init,
3220 t1_cmap_unicode_init), src/winfonts/winfnt.c (fnt_cmap_init): Fix
3221 signature.
3222
Werner Lemberga7a42072014-11-24 06:44:45 +010032232014-11-24 Werner Lemberg <wl@gnu.org>
3224
Werner Lembergf70d9342014-11-24 09:31:32 +01003225 [sfnt] Fix Savannah bug #43672.
3226
3227 * src/sfnt/ttkern.c (tt_face_load_kern): Use correct value for
3228 minimum table length test.
3229
32302014-11-24 Werner Lemberg <wl@gnu.org>
3231
Werner Lemberg73be9f92014-11-24 07:30:05 +01003232 [type1, type42] Another fix for Savannah bug #43655.
3233
3234 * src/type1/t1load.c (parse_charstrings), src/type42/t42parse.c
3235 (t42_parse_charstrings): Add another boundary testing.
3236
32372014-11-24 Werner Lemberg <wl@gnu.org>
3238
Werner Lemberga7a42072014-11-24 06:44:45 +01003239 [docmaker] Formatting, copyright, improved documentation.
3240
3241 * src/tools/docmaker/*: No code changes besides trivial
3242 modifications.
3243
Werner Lemberg9bd20b72014-11-22 06:24:45 +010032442014-11-22 Werner Lemberg <wl@gnu.org>
3245
Werner Lembergaf834612014-11-22 13:29:10 +01003246 [bdf] Fix Savannah bug #43660.
3247
3248 * src/bdf/bdflib.c (_bdf_parse_glyphs) <"ENDFONT">: Check
3249 `_BDF_GLYPH_BITS'.
3250
32512014-11-22 Werner Lemberg <wl@gnu.org>
3252
Werner Lemberg42fcd662014-11-22 12:44:33 +01003253 [type42] Allow only embedded TrueType fonts.
3254
3255 This is a follow-up to Savannah bug #43659.
3256
3257 * src/type42/t42objs.c (T42_Face_Init): Exclusively use the
3258 `truetype' font driver for loading the font contained in the `sfnts'
3259 array.
3260
32612014-11-22 Werner Lemberg <wl@gnu.org>
3262
Werner Lemberg37881872014-11-22 10:46:47 +01003263 [type42] Fix Savannah bug #43659.
3264
3265 * src/type42/t42objs.c (T42_Open_Face): Initialize `face->ttf_size'.
3266
3267 * src/type42/t42parse.c (t42_parse_sfnts): Always set
3268 `face->ttf_size' directly. This ensures a correct stream size in
3269 the call to `FT_Open_Face', which follows after parsing, even for
3270 buggy input data.
3271 Fix error messages.
3272
32732014-11-22 Werner Lemberg <wl@gnu.org>
3274
Werner Lemberg5f201ab2014-11-22 09:16:39 +01003275 [cff] Fix Savannah bug #43658.
3276
3277 * src/cff/cf2ft.c (cf2_builder_lineTo, cf2_builder_cubeTo): Handle
3278 return values of point allocation routines.
3279
32802014-11-22 Werner Lemberg <wl@gnu.org>
3281
Werner Lemberg9bd20b72014-11-22 06:24:45 +01003282 [sfnt] Fix Savannah bug #43656.
3283
3284 * src/sfnt/ttcmap.c (tt_cmap4_validate): Fix order of validity
3285 tests.
3286
Werner Lemberg6de76172014-11-21 06:05:49 +010032872014-11-21 Werner Lemberg <wl@gnu.org>
3288
Werner Lembergdd897102014-11-21 22:19:28 +01003289 [type1, type42] Fix Savannah bug #43655.
3290
3291 * src/type1/t1load.c (parse_charstrings), src/type42/t42parse.c
3292 (t42_parse_charstrings): Fix boundary testing.
3293
32942014-11-21 Werner Lemberg <wl@gnu.org>
3295
Werner Lembergb1fc00d2014-11-21 12:06:40 +01003296 * src/pcf/pcfread.c (pcf_get_metrics): Sanitize invalid metrics.
3297
32982014-11-21 Werner Lemberg <wl@gnu.org>
3299
Werner Lemberg9154dab2014-11-21 08:03:51 +01003300 [ftlcdfil] Obey flow direction.
3301
3302 * src/base/ftlcdfil.c (_ft_lcd_filter_fir, _ft_lcd_filter_legacy):
3303 Handle `up' flow.
3304
33052014-11-21 Werner Lemberg <wl@gnu.org>
3306
Werner Lemberg644d6fa2014-11-21 07:28:50 +01003307 * src/base/ftbitmap.c (FT_Bitmap_Convert): Improve.
3308
3309 This commit completes argument checks and adds support for different
3310 flow directions.
3311
33122014-11-21 Werner Lemberg <wl@gnu.org>
3313
Werner Lemberg6de76172014-11-21 06:05:49 +01003314 * src/base/ftbitmap.c (FT_Bitmap_Copy): Improve.
3315
3316 This commit adds argument checks and support for different flow
3317 directions.
3318
Werner Lemberg1e6e1b82014-11-20 21:07:56 +010033192014-11-20 Werner Lemberg <wl@gnu.org>
3320
3321 * src/base/ftbitmap.c (FT_Bitmap_New): Check argument.
3322
Werner Lembergd6061212014-11-19 21:13:23 +010033232014-11-19 Werner Lemberg <wl@gnu.org>
3324
Werner Lembergb3500af2014-11-19 21:28:21 +01003325 Change some fields in `FT_Bitmap' to unsigned type.
3326
3327 This doesn't break ABI.
3328
3329 * include/ftimage.h (FT_Bitmap): Make `rows', `width', `num_grays',
3330 `pixel_mode', and `palette_mode' unsigned types.
3331
3332 * src/base/ftbitmap.c: Updated.
3333 (FT_Bitmap_Copy): Fix casts.
3334
3335 * src/cache/ftcsbits.c, src/raster/ftraster.c, src/sfnt/pngshim.c:
3336 Updated.
3337
33382014-11-19 Werner Lemberg <wl@gnu.org>
3339
Werner Lembergdf485772014-11-19 21:21:23 +01003340 Make `FT_Bitmap_Convert' correctly handle negative `pitch' values.
3341
3342 * src/base/ftbitmap.c (FT_Bitmap_Convert): Always use positive value
3343 for the pitch while copying data.
3344 Correctly set pitch sign in target bitmap.
3345
33462014-11-19 Werner Lemberg <wl@gnu.org>
3347
Werner Lembergd6061212014-11-19 21:13:23 +01003348 Minor code improvement in `FT_Bitmap_Embolden'.
3349
3350 * src/base/ftbitmap.c (FT_Bitmap_Embolden) <FT_PIXEL_MODE_GRAY[24]>:
3351 Fix thinko.
3352
Alexei Podtelezhnikovf841ad32014-11-19 21:19:06 -050033532014-11-19 Alexei Podtelezhnikov <apodtele@gmail.com>
3354
3355 * src/base/fttrigon.c: Use dedicated `FT_Angle' for arctan table.
3356
Werner Lemberga67c43e2014-11-19 06:46:23 +010033572014-11-19 Behdad Esfahbod <behdad@behdad.org>
3358
3359 Avoid compiler warnings on x86-64 for `FT_MulFix'.
3360
3361 `FT_MulFix' takes `FT_Long' parameters as defined in `freetype.h',
3362 but several inline implementations of it in `ftcalc.h' take
3363 `FT_Int32' arguments. This is causing compiler warnings on x86-64:
3364 If parameters of type `FT_Fixed' (= `FT_Long') are passed to the
3365 inline implementation of this function, integer values are truncated
3366 from 64bit to 32bit.
3367
3368 * include/internal/ftcalc.h (FT_MulFix) [FT_MULFIX_ASSEMBLER]: Add
3369 casts.
3370
Werner Lemberg54abd222014-11-15 09:05:22 +010033712014-11-15 Werner Lemberg <wl@gnu.org>
3372
3373 [sfnt] Fix Savannah bug #43597.
3374
3375 * src/sfnt/pngshim.c (Load_SBit_Png): Protect against too large
3376 bitmaps.
3377
Werner Lemberg602040b2014-11-12 20:51:20 +010033782014-11-12 Werner Lemberg <wl@gnu.org>
3379
Werner Lemberg257c2702014-11-12 21:42:13 +01003380 [sfnt] Fix Savannah bug #43591.
3381
3382 * src/sfnt/ttsbit.c (tt_sbit_decoder_init): Protect against addition
3383 and multiplication overflow.
3384
33852014-11-12 Werner Lemberg <wl@gnu.org>
3386
Werner Lemberg677ddf42014-11-12 21:26:44 +01003387 [sfnt] Fix Savannah bug #43590.
3388
3389 * src/sfnt/ttload.c (check_table_dir, tt_face_load_font_dir):
3390 Protect against addition overflow.
3391
33922014-11-12 Werner Lemberg <wl@gnu.org>
3393
Werner Lembergf46add12014-11-12 21:06:08 +01003394 [sfnt] Fix Savannah bug #43589.
3395
3396 * src/sfnt/sfobjs.c (woff_open_font): Protect against addition
3397 overflow.
3398
33992014-11-12 Werner Lemberg <wl@gnu.org>
3400
Werner Lemberg602040b2014-11-12 20:51:20 +01003401 [sfnt] Fix Savannah bug #43588.
3402
3403 * src/sfnt/ttcmap.c (tt_cmap8_validate, tt_cmap10_validate,
3404 tt_cmap12_validate, tt_cmap13_validate, tt_cmap14_validate): Protect
3405 against overflow in additions and multiplications.
3406
Alexei Podtelezhnikov2e73a1b2014-11-09 23:22:43 -050034072014-11-10 Alexei Podtelezhnikov <apodtele@gmail.com>
3408
3409 [base] CORDIC improvements.
3410
3411 The scaling between the hypotenuse and its CORDIC approximation is
3412 based on regression analysis. The smaller padding for `theta' is
3413 justifed by its maximum error of less than 6.
3414
3415 * src/base/fttrigon.c (ft_trig_downscale): Borrow code from
3416 ./ftcalc.c (ft_multo64), change linear intercept.
3417 (ft_trig_pseudo_polarize): Decrease `theta' padding.
3418
Werner Lemberg0e73d212014-11-09 01:27:38 +010034192014-11-09 Werner Lemberg <wl@gnu.org>
3420
3421 * src/base/ftstroke.c (ft_stroker_inside): Fix border intersections.
3422
3423 One more place to check whether `radius' is zero.
3424
3425 Problem reported by Marco Wertz <marco.wertz@gmx.de>.
3426
Werner Lemberg2c4832d2014-11-07 07:42:33 +010034272014-11-07 Werner Lemberg <wl@gnu.org>
3428
Werner Lemberg602040b2014-11-12 20:51:20 +01003429 [bdf] Fix Savannah bug #43535.
Werner Lemberg2c4832d2014-11-07 07:42:33 +01003430
3431 * src/bdf/bdflib.c (_bdf_strncmp): New macro that checks one
3432 character more than `strncmp'.
3433 s/ft_strncmp/_bdf_strncmp/ everywhere.
3434
Werner Lembergf49a1002014-11-06 13:30:28 +010034352014-11-06 Werner Lemberg <wl@gnu.org>
3436
Werner Lemberg602040b2014-11-12 20:51:20 +01003437 [pcf] Fix Savannah bug #43548.
Werner Lembergef1eba72014-11-06 23:25:05 +01003438
Werner Lemberg2c4832d2014-11-07 07:42:33 +01003439 * src/pcf/pcfread.c (pcf_get_encodings): Add sanity checks for row
3440 and column values.
Werner Lembergef1eba72014-11-06 23:25:05 +01003441
34422014-11-06 Werner Lemberg <wl@gnu.org>
3443
Werner Lemberg602040b2014-11-12 20:51:20 +01003444 [pcf] Fix Savannah bug #43547.
Werner Lemberg0e2f5d52014-11-06 22:32:46 +01003445
3446 * src/pcf/pcfread.c (pcf_read_TOC): Check `size' and `offset'
3447 values.
3448
34492014-11-06 Werner Lemberg <wl@gnu.org>
3450
Werner Lembergf49a1002014-11-06 13:30:28 +01003451 * src/pcf/pcfread.c (pcf_read_TOC): Avoid memory leak.
3452
Infinalityfacfc792014-11-03 07:24:59 +010034532014-11-03 Infinality <infinality@infinality.net>
3454
3455 * src/truetype/ttsubpix.c (COMPATIBILITY_MODE_Rules): Updated.
3456
3457 The previous commit deteriorates rendering of DejaVu and similar
3458 fonts; this gets compensated with this rule.
3459
Werner Lemberg706f7522014-11-03 07:20:57 +010034602014-11-03 Werner Lemberg <wl@gnu.org>
3461
3462 * src/truetype/ttinterp.c (Ins_DELTAP): Fix subpixel hinting.
3463
3464 Before this patch, it was impossible to ever call DELTAP[123] in
3465 subpixel hinting mode as described in the ClearType whitepaper; it
3466 only worked if in `compatibility mode'. However, compatibility mode
3467 essentially disables SHPIX, completely ruining hinting of
3468 ttfautohint output, for example.
3469
3470 We now follow the whitepaper more closely so that DELTAP[123]
3471 instructions for touched points in the non-subpixel direction are
3472 executed.
3473
Alexei Podtelezhnikove1efe0a2014-10-31 00:07:14 -040034742014-10-31 Alexei Podtelezhnikov <apodtele@gmail.com>
3475
Alexei Podtelezhnikov525d4872014-10-31 22:12:37 -04003476 [smooth] Improve code readability.
3477
3478 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Rearrange code.
3479
34802014-10-31 Alexei Podtelezhnikov <apodtele@gmail.com>
3481
Alexei Podtelezhnikove1efe0a2014-10-31 00:07:14 -04003482 [smooth] Reduce outline translations during rendering.
3483
3484 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Translate origin
3485 virtually by modifying cbox, actually translate outline if cumulative
3486 shift is not zero.
3487
Alexei Podtelezhnikovc7fd9352014-10-30 22:43:01 -040034882014-10-30 Alexei Podtelezhnikov <apodtele@gmail.com>
3489
3490 [smooth] Fix Savannah bug #35604 (cont'd).
3491
3492 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Remove checks and
3493 casts that became unnecessary after the variable type upgrades.
3494
Alexei Podtelezhnikov74916992014-10-29 22:24:24 -040034952014-10-29 Alexei Podtelezhnikov <apodtele@gmail.com>
3496
Alexei Podtelezhnikov465ab992014-10-29 23:45:23 -04003497 [smooth] Improve code readability.
3498
3499 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Rearrange code.
3500
35012014-10-29 Alexei Podtelezhnikov <apodtele@gmail.com>
3502
Alexei Podtelezhnikov74916992014-10-29 22:24:24 -04003503 Unify hypotenuse approximations.
3504
3505 * include/internal/ftcalc.h (FT_HYPOT): Move macro from here...
3506 * include/internal/ftobjs.h: ... to here, next to required `FT_ABS'.
3507 * src/smooth/ftgrays.c (gray_render_cubic): Use it here.
3508
Werner Lembergfe151522014-10-25 05:56:59 +020035092014-10-25 Werner Lemberg <wl@gnu.org>
3510
3511 [cff] Test valid darkening parameter macros in `ftoption.h'.
3512
3513 We no longer need an otherwise unused typedef that can cause a gcc
3514 warning.
3515 Problem reported by Alexei.
3516
3517 * src/cff/cffobjs.c (cff_driver_init): Use
3518 `CFF_CONFIG_OPTION_DARKENING_PARAMETER_XXX' macros directly.
3519 (SET_DARKENING_PARAMETERS): Removed.
3520 Compile time tests are now ...
3521
3522 * devel/ftoption.h, include/config/ftoption.h: ... here.
3523
Alexei Podtelezhnikovaba0f492014-10-24 23:50:57 -040035242014-10-25 Alexei Podtelezhnikov <apodtele@gmail.com>
3525
3526 Improve flat corner definition.
3527
3528 * include/internal/ftcalc.h (FT_HYPOT): Macro to approximate Euclidean
3529 distance with the alpha max plus beta min algorithm.
3530 * src/base/ftcalc.c (ft_corner_is_flat): Use it instead of Taxicab
3531 metric.
3532
David Weißdd8de1a2014-10-23 20:01:48 +020035332014-10-23 David Weiß <David.Weiss@ptvgroup.com>
3534
3535 [build] Improve property file for vc2010.
3536
3537 User-defined properties should be empty by default to prevent linker
3538 failures.
3539
3540 * builds/windows/vc2010/freetype.user.props,
3541 builds/windows/vc2010/freetype.vcxproj:
3542 s/OptionsDirectory/UserOptionDirectory/.
3543 Comment out all user options.
3544
Werner Lembergdd570e92014-10-23 19:57:37 +020035452014-10-23 Werner Lemberg <wl@gnu.org>
3546
3547 [cff] Work around bug in preprocessor of MSVC 2010.
3548
3549 We have been hit by
3550
3551 https://connect.microsoft.com/VisualStudio/feedback/details/718976/msvc-pr
3552
3553 * devel/ftoption.h, include/config/ftoption.h: Replace
3554 `CFF_CONFIG_OPTION_DARKENING_PARAMETERS' with eight macros
3555 `CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4}'.
3556
3557 * src/cff/cffobjs.c (SET_DARKENING_PARAMETERS): Removed. We no
3558 longer need double expansion.
3559 (SET_DARKENING_PARAMETERS_0): Renamed to ...
3560 (SET_DARKENING_PARAMETERS): ... this.
3561 Update call.
3562
Werner Lembergcc7bb802014-10-20 08:35:50 +020035632014-10-20 Werner Lemberg <wl@gnu.org>
3564
3565 [sbit] Minor fixes.
3566
3567 * src/sfnt/ttsbit.c (tt_face_load_sbit) [TT_SBIT_TABLE_TYPE_SBIX]:
3568 Accept overlay format also, but emit warning message in that case.
3569 (tt_sbit_decoder_load_metrics): Add missing newline to error
3570 message.
3571 (tt_sbit_load_sbix_image): Add `rgbl' graphic type (as used on iOS
3572 7.1) to the list of unsupported formats.
3573
Alexei Podtelezhnikov118e6512014-10-19 23:31:08 -040035742014-10-19 Alexei Podtelezhnikov <apodtele@gmail.com>
3575
3576 [truetype] Clean up bytecode rounding.
3577
3578 Zero distance does not have to be treated specially if you follow
3579 specifications and check the sign as the very last step of rounding.
3580
3581 * src/truetype/ttinterp.c (Round_None, Round_To_Grid,
3582 Round_Down_To_Grid, Round_Up_To_Grid, Round_To_Double_Grid): Use
3583 macros when available, do not check for non-zero distance.
3584 (Round_To_Half_Grid, Round_Super, Round_Super_45): Ditto, return phase
3585 if sign changed.
3586
Alexei Podtelezhnikovd4aabda2014-10-18 10:10:04 -040035872014-10-18 Alexei Podtelezhnikov <apodtele@gmail.com>
3588
3589 [truetype] Unwrap engine compensation settings.
3590
3591 * src/truetype/ttobjs.c (tt_size_init_bytecode): Updated.
3592
David Weißfede19e2014-10-18 14:59:20 +020035932014-10-18 David Weiß <David.Weiss@ptvgroup.com>
3594
3595 [build] Add property file to vc2010 project.
3596
3597 This simplifies custom build configurations, especially for
3598 automated build environments.
3599
3600 * builds/windows/vc2010/freetype.user.props: New configuration file.
3601
3602 * builds/windows/vc2010/freetype.vcxproj: Include
3603 `freetype.user.props' and use its data fields.
3604
3605 * builds/windows/vc2010/index.html: Updated.
3606
Werner Lembergc9c33f22014-10-18 11:01:14 +020036072014-10-18 Werner Lemberg <wl@gnu.org>
3608
3609 [autofit] Add blue-zone support for Telugu.
3610
3611 This essentially moves the Telugu script from the `Indic' hinter to
3612 the `Latin' hinter.
3613
3614 Note that this is a first shot and quite certainly needs
3615 refinements.
3616
3617 * src/autofit/afblue.dat: Add blue zone data for Telugu.
3618
3619 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3620
3621 * src/autofit/afscript.h: Add Telugu standard characters and move
3622 data out of AF_CONFIG_OPTION_INDIC block.
3623
3624 * src/autofit/afranges.c: Move Telugu data out of
3625 AF_CONFIG_OPTION_INDIC block.
3626
3627 * src/autofit/afstyles.h: Update Telugu data; in particular, use
3628 AF_WRITING_SYSTEM_LATIN.
3629
Werner Lemberg54306f52014-10-18 10:42:28 +020036302014-10-18 David Wimsey <david@wimsey.us>
3631
3632 [cmake] Add iOS build support.
Werner Lemberg1050aa92014-10-18 10:45:09 +02003633 From Savannah patch #8497.
Werner Lemberg54306f52014-10-18 10:42:28 +02003634
3635 * builds/cmake/iOS.cmake: New file. Universal binaries are built
3636 with both 32 and 64 bit arm architectures.
3637
3638 * CMakeLists.txt (IOS_PLATFORM): New variable for running the iOS
3639 toolchain. Possible values are `OS' to build on iOS, or
3640 `SIMULATOR' to build on APPLE.
3641
Werner Lemberg1a1750f2014-10-16 22:54:01 +020036422014-10-16 Behdad Esfahbod <behdad@behdad.org>
3643 Werner Lemberg <wl@gnu.org>
3644
3645 [cff] Add `CFF_CONFIG_OPTION_DARKENING_PARAMETERS' config macro.
3646
3647 * devel/ftoption.h, include/config/ftoption.h
3648 (CFF_CONFIG_OPTION_DARKENING_PARAMETERS): New macro.
3649
3650 * src/cff/cffobjs.c (SET_DARKENING_PARAMETERS,
3651 SET_DARKENING_PARAMETERS_0): New macros.
3652 (cff_driver_init): Use new macros.
3653
Alexei Podtelezhnikov7e83f062014-10-14 23:03:56 -040036542014-10-14 Alexei Podtelezhnikov <apodtele@gmail.com>
3655
3656 [truetype] Limit delta shift range.
3657
Werner Lembergdf3d67e2014-10-16 07:24:44 +02003658 The valid range for delta shift is zero through six. Negative values
3659 are invalid according to
3660
Alexei Podtelezhnikov7e83f062014-10-14 23:03:56 -04003661 https://developer.apple.com/fonts/TrueType-Reference-Manual/RM04/Chap4.html#delta%20shift
3662
3663 * src/truetype/ttobjs.h (delta_shift, delta_base): Make unsigned.
Werner Lembergdf3d67e2014-10-16 07:24:44 +02003664 * src/truetype/ttinterp.h (DO_SDS): Throw an error if `delta_shift'
3665 is out of range.
3666 (Ins_DELTAP, Ins_DELTAC): Optimize for valid `delta_shift'.
Alexei Podtelezhnikov7e83f062014-10-14 23:03:56 -04003667
Werner Lemberg03987bf2014-10-16 07:19:46 +020036682014-10-16 Werner Lemberg <wl@gnu.org>
3669
3670 A better fix for Savannah bug #43392.
3671 Suggested by Doug Felt <dougfelt@gmail.com>.
3672
Werner Lembergdf3d67e2014-10-16 07:24:44 +02003673 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics): Set
Werner Lemberg03987bf2014-10-16 07:19:46 +02003674 `vertAdvance' to zero...
3675
3676 * src/truetype/ttgload.c (TT_Load_Glyph): ... and set here a default
3677 value for `vertAdvance' based on `linearVertAdvance' in case
3678 `vertAdvance' is zero. Note that the previous computed ad-hoc value
3679 for `linearVertAdvance' was apparently not tested in a real-life
3680 situation.
3681
David Weiß3889cb22014-10-14 11:35:16 +020036822014-10-14 David Weiß <David.Weiss@ptvgroup.com>
3683
3684 [build] Better optimization settings for vc2010 solution file.
3685
3686 * builds/windows/vc2010/freetype.sln,
3687 builds/windows/vc2010/freetype.vcxproj: Updated.
3688
Werner Lemberg8f178092014-10-14 08:28:09 +020036892014-10-14 Werner Lemberg <wl@gnu.org>
3690
3691 [autofit] Adjust Devenagari character range.
3692
3693 * src/autofit/afranges.c (af_deva_uniranges): Omit characters that
3694 are common to all other Indic scripts.
3695
Werner Lemberg1ca5fa12014-10-12 08:31:32 +020036962014-10-12 Werner Lemberg <wl@gnu.org>
3697
3698 [sfnt] Fix Savannah bug #43392.
3699
3700 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics): Don't let
3701 vertical metrics uninitialized.
3702
Alexei Podtelezhnikov673a28e2014-10-11 14:40:51 -040037032014-10-11 Alexei Podtelezhnikov <apodtele@gmail.com>
3704
3705 [base] Small bbox correction.
3706
3707 * src/base/ftbbox.c (FT_Outline_Get_BBox): Start from nonsense bbox
Werner Lembergdf3d67e2014-10-16 07:24:44 +02003708 instead of initial point that could be `off' in conic outlines.
Alexei Podtelezhnikov673a28e2014-10-11 14:40:51 -04003709
Alexei Podtelezhnikov2ffcf172014-10-08 22:01:08 -040037102014-10-08 Alexei Podtelezhnikov <apodtele@gmail.com>
3711
Alexei Podtelezhnikov40dac112014-10-09 00:58:14 -04003712 [base] Fix Savannah bug #43356.
3713
3714 * src/base/ftbbox.c (BBox_Move_To, BBox_Conic_To): Update bbox in case
Werner Lembergdf3d67e2014-10-16 07:24:44 +02003715 of implicit `to'.
Alexei Podtelezhnikov40dac112014-10-09 00:58:14 -04003716 (BBox_Line_To): New emitter that does not update bbox.
3717
37182014-10-08 Alexei Podtelezhnikov <apodtele@gmail.com>
3719
Alexei Podtelezhnikov2ffcf172014-10-08 22:01:08 -04003720 [base] Introduce and use new macro `FT_UPDATE_BBOX'
3721
3722 * src/base/ftbbox.c (FT_UPDATE_BBOX): New macro.
3723 (FT_Outline_Get_BBox): Use it here.
3724
Alexei Podtelezhnikov7abdb8c2014-10-02 23:13:33 -040037252014-10-02 Alexei Podtelezhnikov <apodtele@gmail.com>
3726
3727 [base] Significant optimization of `ft_div64by32'
3728
3729 We shift as many bits as we can into the high register, perform
3730 32-bit division with modulo there, then work through the remaining
3731 bits with long division. This optimization is especially noticeable
3732 for smaller dividends that barely use the high register.
3733
3734 * src/base/ftcalc.c (ft_div64by32): Updated.
3735
Dave Arnold537c55d2014-10-02 06:32:32 +020037362014-10-02 Dave Arnold <darnold@adobe.com>
3737
3738 [cff] Fix Savannah bug #43271.
3739
3740 * src/cff/cf2font.c (cf2_computeDarkening): Change overflow
3741 detection to use logarithms and clamp `scaledStem'.
3742
Alexei Podtelezhnikov418e18f2014-10-01 22:36:40 -040037432014-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
3744
Alexei Podtelezhnikov74d0aad2014-10-01 23:27:15 -04003745 * src/base/ftcalc.c: Remove miscellaneous type casts.
3746
37472014-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
3748
Alexei Podtelezhnikov418e18f2014-10-01 22:36:40 -04003749 [base] Use more common `FT_MSB' implementation with masks.
3750
3751 * src/base/ftcalc.c (FT_MSB): Updated.
3752
Alexei Podtelezhnikov955aff12014-09-30 23:09:39 -040037532014-09-30 Alexei Podtelezhnikov <apodtele@gmail.com>
3754
3755 [base] Clean up.
3756
3757 * src/base/ftcalc.c (FT_MOVE_SIGN): New macro for frequently used
3758 code.
3759
Alexei Podtelezhnikov7f491112014-09-25 22:54:38 -040037602014-09-25 Alexei Podtelezhnikov <apodtele@gmail.com>
3761
3762 [base] Avoid unnecessary long division.
3763
3764 This applies to `FT_MulDiv' but not to `FT_DivFix', where overflows or
3765 lack thereof are predicted accurately.
3766
3767 * src/base/ftcalc.c (ft_div64by32): Improve readability.
3768 (FT_MulDiv, FT_MulDiv_No_Round) [!FT_LONG64]: Use straight division
3769 when multiplication stayed within 32 bits.
3770
Werner Lemberg5b68e4f2014-09-24 19:06:13 +020037712014-09-24 Werner Lemberg <wl@gnu.org>
3772
3773 [autofit] Minor clean-ups.
3774
3775 * src/autofit/afhints.c (AF_FLAGS): Remove obsolete values.
3776
3777 * src/autofit/afhints.c (af_glyph_hints_dump_points,
3778 af_glyph_hints_align_strong_points): Updated.
3779
3780 * src/autofit/aflatin.c (af_latin_hints_link_segments,
3781 af_latin_hints_compute_segments), src/autofit/afcjk.c
3782 (af_cjk_hints_link_segments), src/autofit/aflatin2.c
3783 (af_latin2_hints_link_segments, af_latin2_hints_compute_segments):
3784 There are no longer fake segments since more than 10 years...
3785
Werner Lemberg387a9fe2014-09-22 06:42:24 +020037862014-09-22 Werner Lemberg <wl@gnu.org>
3787
3788 [autofit] Minor code streamlining.
3789
3790 * src/autofit/afhints.c (af_axis_hints_new_edge): Remove redundant
3791 initialization.
3792
Alexei Podtelezhnikov5c894842014-09-19 22:03:15 -040037932014-09-19 Alexei Podtelezhnikov <apodtele@gmail.com>
3794
3795 * src/base/ftcalc.c: Harmonize code.
3796
37972014-09-15 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikovbc12d9e2014-09-08 21:27:43 -04003798
Alexei Podtelezhnikovef070d42014-09-15 22:06:19 -04003799 [base] Tighten the overflow check in `FT_MulDiv'.
3800
3801 * src/base/ftcalc.c (FT_MulDiv) [!FT_LONG64]: Updated.
3802
38032014-09-08 Alexei Podtelezhnikov <apodtele@gmail.com>
3804
Alexei Podtelezhnikovbc12d9e2014-09-08 21:27:43 -04003805 Fix Savannah bug #43153.
3806
3807 * src/psaux/psconv.c (PS_Conv_ToFixed): Add protection against
Alexei Podtelezhnikov7abdb8c2014-10-02 23:13:33 -04003808 overflow in `divider'.
Alexei Podtelezhnikovbc12d9e2014-09-08 21:27:43 -04003809
Alexei Podtelezhnikov32128522014-09-03 21:57:42 -040038102014-09-03 Alexei Podtelezhnikov <apodtele@gmail.com>
3811
Alexei Podtelezhnikov336735d2014-09-03 22:55:26 -04003812 [base] Tighten the overflow check in `FT_DivFix'.
3813
3814 This fixes a 13-year old bug. The original overflow check should have
3815 been updated when rounding was introduced into this function
3816 (c2cd00443b).
3817
3818 * src/base/ftcalc.c (FT_DivFix) [!FT_LONG64]: Updated.
3819 * include/freetype.h (FT_DivFix): Updated documentation.
3820
38212014-09-03 Alexei Podtelezhnikov <apodtele@gmail.com>
3822
Alexei Podtelezhnikov32128522014-09-03 21:57:42 -04003823 [base] Tighten the overflow check in `FT_MulFix'.
3824
3825 * src/base/ftcalc.c (FT_MulFix) [!FT_LONG64]: Updated.
3826
Alexei Podtelezhnikov125c3ca2014-09-02 22:38:59 -040038272014-09-02 Alexei Podtelezhnikov <apodtele@gmail.com>
3828
3829 [truetype] Shortcut ppem calculations for square pixels.
3830
3831 * src/truetype/ttinterp.h (TT_ExecContextRec): New field
3832 `cur_ppem_func' with a function pointer.
3833 * src/truetype/ttinterp.c (TT_RunIns): Initialize `cur_ppem_func'
3834 depending on the pixel geometry to either...
3835 (Current_Ppem_Stretched): ... this for stretched pixels.
3836 (Current_Ppem): ... or this for square pixels.
3837 (DO_MPPEM, DO_MPS, Ins_DELTAP, Ins_DELTAC): Use `cur_ppem_func'.
3838
Behdad Esfahbod1ec98b22014-08-31 08:47:11 +020038392014-08-31 Behdad Esfahbod <behdad@behdad.org>
3840
3841 Don't use `register' keyword. Fixes compiler warnings.
3842
3843 * src/base/ftcalc.c (FT_Add64) [!FT_LONG64]: Do it.
3844 * src/gzip/inftrees.c (huft_build): Ditto.
3845 * src/truetype/ttinterp.c (TT_MulFix14_arm): Ditto.
3846
Alexei Podtelezhnikova8bc49e2014-08-24 22:14:01 -040038472014-08-24 Alexei Podtelezhnikov <apodtele@gmail.com>
3848
Alexei Podtelezhnikov125c3ca2014-09-02 22:38:59 -04003849 [truetype] Optimize DELTAP and DELTAC.
Alexei Podtelezhnikova8bc49e2014-08-24 22:14:01 -04003850
3851 * src/truetype/ttinterp.c (Ins_DELTAP, Ins_DELTAC): Move ppem
3852 calculations outside of the loop.
3853
Alexei Podtelezhnikov98688592014-08-21 23:28:52 -040038542014-08-21 Alexei Podtelezhnikov <apodtele@gmail.com>
3855
3856 Fix Savannah bug #43033.
3857
3858 * include/config/ftconfig.h, builds/unix/ftconfig.in,
3859 builds/vms/ftconfig.h [FT_LONG64]: Do not disable the macro when
3860 64-bit type is `long'.
3861
Alexei Podtelezhnikov8fd87d42014-08-20 00:57:22 -040038622014-08-20 Alexei Podtelezhnikov <apodtele@gmail.com>
3863
3864 [base] Small optimization of `FT_MulFix'.
3865
3866 * src/base/ftcalc.c (FT_MulFix): Loosen up the condition for direct
3867 32-bit calculations.
3868
Alexei Podtelezhnikovf09326a2014-08-20 00:08:38 -040038692014-08-19 Alexei Podtelezhnikov <apodtele@gmail.com>
3870
3871 [base] Use unsigned calculation in `FT_MulDiv'.
3872
3873 * src/base/ftcalc.c (FT_MulDiv): Updated to expand 32-bit range.
3874
Alexei Podtelezhnikov382f3152014-08-18 23:16:15 -040038752014-08-18 Alexei Podtelezhnikov <apodtele@gmail.com>
3876
3877 [base] Remove truncation in `FT_DivFix'.
3878
3879 * src/base/ftcalc.c (FT_DivFix): Updated.
3880
Alexei Podtelezhnikov5ef20232014-08-14 23:21:46 -040038812014-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
3882
3883 Minor refactoring.
3884
3885 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round): Updated.
3886
38872014-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikovc7022462014-08-14 23:01:01 -04003888
3889 Turn FT_MSB into a macro when using gcc builtins.
3890
3891 * src/base/ftcalc.c, include/internal/ftcalc.h: Updated.
3892
Alexei Podtelezhnikovf8efbcf2014-08-12 23:22:17 -040038932014-08-12 Alexei Podtelezhnikov <apodtele@gmail.com>
3894
3895 [base] Avoid undefined FT_MSB in `BBox_Cubic_Check'.
3896
3897 * src/base/ftbbox.c (BBox_Cubic_Check): Update.
3898 (update_cubic_max): Repalce with...
3899 (cubic_peak): ... this, which now handles upscaling.
3900
Alexei Podtelezhnikov47289932014-08-11 23:39:34 -040039012014-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
3902
Alexei Podtelezhnikov28018d42014-08-12 00:26:16 -04003903 [base] Handle collapsed outlines to avoid undefined FT_MSB.
3904
3905 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Update.
3906
39072014-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
3908
Alexei Podtelezhnikov47289932014-08-11 23:39:34 -04003909 [base] Restore FT_MulFix inlining.
3910
3911 * include/freetype.h (FT_MulFix): Unconditionally defined.
3912
3913 * src/base/ftcalc.c [FT_MULFIX_ASSEMBLER]: Move code from here...
3914
3915 * include/internal/ftcalc.h [FT_MULFIX_ASSEMBLER]: ... to here,
3916 which conditionally replaces the function with an inline version
3917 through the macro.
3918
Alexei Podtelezhnikov90be4b62014-08-08 22:27:10 -040039192014-08-08 Alexei Podtelezhnikov <apodtele@gmail.com>
3920
3921 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Refactor.
3922
Werner Lembergd17cabf2014-07-26 09:53:50 +090039232014-07-26 Werner Lemberg <wl@gnu.org>
3924
3925 [cff] Fix typo.
3926
3927 * src/cff/cf2hints.c (cf2_glyphpath_computeOffset): Use correct
3928 offsets in third quadrant.
3929
3930 Reported by maks <maksqwe1@ukr.net>.
3931
Werner Lemberg4e754132014-07-17 17:34:49 +090039322014-07-17 Werner Lemberg <wl@gnu.org>
3933
3934 Fix Savannah bug #42788.
3935
3936 * src/pfr/pfrobjs.c: Include `ftcalc.h'.
3937
Alexei Podtelezhnikovc0a6f202014-07-16 22:05:56 -040039382014-07-16 Alexei Podtelezhnikov <apodtele@gmail.com>
3939
3940 Replace `ft_highpow2' function.
3941
3942 * src/pfr/pfrobjs.c (pfr_face_get_kerning): Use `FT_MSB' instead of
3943 `ft_highpow2'.
3944
3945 * src/base/ftutil.c, include/internal/ftobjs.h (ft_highpow2): Remove
3946 it.
3947
Alexei Podtelezhnikov71330ce2014-07-15 23:30:45 -040039482014-07-15 Alexei Podtelezhnikov <apodtele@gmail.com>
3949
Werner Lembergcbbf26b2014-07-17 17:27:12 +09003950 * src/base/ftcalc.c (FT_MSB): Utilize gcc builtins.
Alexei Podtelezhnikov177982e2014-07-15 23:54:34 -04003951
39522014-07-15 Alexei Podtelezhnikov <apodtele@gmail.com>
3953
Alexei Podtelezhnikov71330ce2014-07-15 23:30:45 -04003954 [base] Move assembler code back in the source file.
3955
3956 FT_MulFix assembler used to reside in ftcalc.c before f47d263f1b.
3957
3958 * include/config/ftconfig.h, builds/unix/ftconfig.in,
3959 builds/vms/ftconfig.h [FT_MULFIX_ASSEMBLER]: Move code from here...
3960
3961 * src/base/ftcalc.c [FT_MULFIX_ASSEMBLER]: ... to here.
3962
39632014-07-14 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov1183cd42014-07-14 22:30:55 -04003964
3965 [base] Further clean up color bitmap conversion.
3966
3967 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Stop
3968 using FT_MulFix and FT_DivFix since all calculations fit into 32 bits.
3969
Werner Lemberg441b3f32014-07-13 02:28:14 +090039702014-07-13 Werner Lemberg <wl@gnu.org>
3971
3972 [truetype] Improve handling of buggy `prep' tables.
3973
3974 In case of an error in the `prep' table, no longer try to execute it
3975 again and again. This makes FreeType handle endless loops in buggy
3976 fonts much faster.
3977
3978 * src/truetype/ttobjs.h (TT_SizeRec): The fields `bytecode_ready'
3979 and `cvt_ready' are now negative if not initialized yet, otherwise
3980 they indicate the error code of the last run.
3981
3982 * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep,
3983 tt_size_done_bytecode, tt_size_init_bytecode,
3984 tt_size_ready_bytecode, tt_size_init, tt_size_done, tt_size_reset):
3985 Updated.
3986
3987 * src/truetype/ttgload.c (tt_loader_init): Updated.
3988 * src/truetype/ttinterp.c (TT_RunIns): Force reexecution of `fpgm'
3989 and `prep' only if we are in the `glyf' table.
3990
Werner Lemberge98e2bc2014-07-12 16:37:39 +090039912014-07-12 Werner Lemberg <wl@gnu.org>
3992
3993 * builds/vms/ftconfig.h: Synchronize.
3994 Problem reported by Alexei.
3995
Alexei Podtelezhnikov35576bf2014-07-11 22:40:34 -040039962014-07-11 Alexei Podtelezhnikov <apodtele@gmail.com>
3997
3998 [base] Clean up bitmap conversion.
3999
4000 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Use
4001 appropriate FT_DivFix and remove superfluous upscaling.
4002
Alexei Podtelezhnikovceab95a2014-07-04 23:01:32 -040040032014-07-04 Alexei Podtelezhnikov <apodtele@gmail.com>
4004
4005 [base] Small optimization of the ancient code.
4006
4007 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round): Loosen up the
4008 condition for direct 32-bit calculations.
4009
Werner Lemberg38975562014-06-27 06:55:56 +020040102014-06-27 Werner Lemberg <wl@gnu.org>
4011
4012 Fix Apple standard glyph names.
4013
4014 * src/sfnt/ttpost.c (tt_post_default_names): Synchronize with
4015 `tools/glnames.py'
4016
4017 Problem reported by Adam Twardoch <adam@fontlab.com>.
4018
Werner Lembergcf2347c2014-06-17 09:01:04 +020040192014-06-17 Werner Lemberg <wl@gnu.org>
4020
Werner Lemberg231171f2014-06-17 09:14:32 +02004021 Partially revert commit from 2014-06-13.
4022
4023 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Move
4024 declaration of `p_first' and `p_last' out of the loop.
4025
40262014-06-17 Werner Lemberg <wl@gnu.org>
4027
Werner Lembergcf2347c2014-06-17 09:01:04 +02004028 * builds/unix/freetype2.m4: s/AC_PATH_PROG/AC_PATH_TOOL/.
4029
4030 This simplifies cross-compiling.
4031
Werner Lemberg6497b9c2014-06-13 09:28:00 +020040322014-06-13 Werner Lemberg <wl@gnu.org>
4033
Werner Lemberge5c0fff2014-06-13 14:01:20 +02004034 Fix more compiler warnings.
4035 Reported by Wojciech Mamrak <wmamrak@gmail.com>.
4036
4037 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
4038 Make integer constant unsigned.
4039
4040 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
4041 <TT_SBIT_TABLE_TYPE_SBIX>: Fix types.
4042 (tt_sbit_decoder_load_compound, tt_face_load_sbix_image): Add proper
4043 casts.
4044
40452014-06-13 Werner Lemberg <wl@gnu.org>
4046
Werner Lemberg6497b9c2014-06-13 09:28:00 +02004047 Fix compiler warnings.
4048 Reported by Wojciech Mamrak <wmamrak@gmail.com>.
4049
4050 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage),
Werner Lembergcbbf26b2014-07-17 17:27:12 +09004051 src/autofit/afmodule.c (af_property_set): Fix `signed' vs.
Werner Lemberg6497b9c2014-06-13 09:28:00 +02004052 `unsigned' issues.
4053
4054 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Make compiler
4055 happy.
4056
4057 * src/base/ftlcdfil.c (_ft_lcd_filter_fir): Use only four elements
4058 for `fir'.
4059 Fix `signed' vs. `unsigned' issues.
4060
4061 * src/sfnt/sfobjs.c (WRITE_BYTE): Removed, unused.
4062 (WRITE_USHORT, WRITE_ULONG): Add proper casts.
4063
4064 * src/truetype/ttgload.c (TT_Get_VMetrics): Add proper casts.
4065
4066 * src/truetype/ttinterp.c (Ins_DELTAP): Add proper casts for `B1'
4067 and `B2'.
4068
Alexey Petruchik02f21702014-05-16 08:09:43 +020040692014-05-16 Alexey Petruchik <alexey.petruchik@gmail.com>
4070
4071 [cmake] Add option to build OS X framework.
4072
4073 * CMakeLists.txt: Update accordingly.
4074
4075 * builds/mac/freetype-Info.plist: New file.
4076
Pavel Koshevoy15da66a2014-05-13 07:33:48 +020040772014-05-13 Pavel Koshevoy <pkoshevoy@gmail.com>
4078
4079 * CMakeLists.txt (BASE_SRCS): Add missing `ftbdf.c'.
4080
Werner Lemberg07e7b8a2014-05-11 08:00:25 +020040812014-05-11 Werner Lemberg <wl@gnu.org>
4082
Werner Lembergfaa21472014-05-11 12:44:00 +02004083 [autofit] Fix variable initializations.
4084
4085 * src/autofit/afhints.c (af_glyph_hints_reload): Assign default
4086 values to `in_dir' and `out_dir' for all points.
4087
40882014-05-11 Werner Lemberg <wl@gnu.org>
4089
Werner Lemberg07e7b8a2014-05-11 08:00:25 +02004090 [autofit] Fix crash with font `CabinSketch-Bold.ttf'.
4091
4092 Problem reported by Ralf S. Engelschall <rse@engelschall.com>.
4093
4094 * src/autofit/afhints.c (af_glyph_hints_reload): Fix threshold for
4095 finding first non-near point.
4096 Properly initialize non-near point deltas.
4097
Werner Lemberg63bef9a2014-05-01 07:16:05 +020040982014-05-01 Werner Lemberg <wl@gnu.org>
4099
Werner Lembergc576bb02014-05-01 17:24:19 +02004100 [autofit] Add blue-zone support for Devanagari.
4101
4102 This essentially moves the Devanagari script from the `Indic' hinter
4103 to the `Latin' hinter. Thanks to Girish Dalvi
4104 <girish.dalvi@gmail.com> for guidance with blue zone characters!
4105
4106 * src/autofit/afblue.dat: Add blue zone data for Devanagari.
4107
4108 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
4109
4110 * src/autofit/afscript.h: Add Devanagari standard characters and
4111 move data out of AF_CONFIG_OPTION_INDIC block.
4112
4113 * src/autofit/afranges.c: Move Devanagari data out of
4114 AF_CONFIG_OPTION_INDIC block.
4115 Move U+20B9, (new) Rupee sign, from Latin to Devanagari.
4116
4117 * src/autofit/afstyles.h: Update Devanagari data; in particular, use
4118 AF_WRITING_SYSTEM_LATIN.
4119
41202014-05-01 Werner Lemberg <wl@gnu.org>
4121
Werner Lemberg63bef9a2014-05-01 07:16:05 +02004122 [autofit] Fix handling of neutral blue zones in stems.
4123
4124 * src/autofit/afhints.h (AF_Edge_Flags): New value
4125 `AF_EDGE_NEUTRAL'.
4126
4127 * src/autofit/aflatin.c (af_latin_hints_compute_blue_edges): Trace
4128 neutral blue zones with AF_EDGE_NEUTRAL.
4129 (af_latin_hint_edges): Skip neutral blue zones if necessary.
4130
Werner Lembergccfc4b42014-04-28 21:13:14 +020041312014-04-28 Werner Lemberg <wl@gnu.org>
4132
4133 [autofit] Introduce neutral blue zones to the latin module.
4134
4135 Such blue zones match either the top or the bottom of a contour. We
4136 need them for scripts where accent-like elements directly touch the
4137 base character (for example, some vowel signs in Devanagari, cf.
4138 U+0913 or U+0914).
4139
4140 * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_NEUTRAL): New
4141 property.
4142
4143 * src/autofit/afblue.h: Regenerated.
4144
4145 * src/autofit/aflatin.h (AF_LATIN_IS_NEUTRAL_BLUE): New macro.
4146 (AF_LATIN_BLUE_NEUTRAL): New enumeration value.
4147
4148 * src/autofit/aflatin.c (af_latin_metrics_init_blues,
4149 af_latin_hints_compute_blue_edges): Handle neutral blue zones.
4150
Werner Lembergabb3fca2014-04-25 22:13:32 +020041512014-04-25 Werner Lemberg <wl@gnu.org>
4152
4153 * src/autofit/hbshim.c: Partially revert commit from 2014-04-17.
4154
4155 Using input glyph coverage data is simply wrong.
4156
4157 Problem reported by Nikolaus Waxweiler <madigens@gmail.com> and
4158 Mantas MikulÄ—nas <grawity@gmail.com>.
4159
Werner Lembergf1936372014-04-23 08:22:33 +020041602014-04-23 Werner Lemberg <wl@gnu.org>
4161
4162 * src/raster/ftraster.c (Vertical_Sweep_Span): Use drop-out mode.
4163
4164 This spot has been missed while introducing support for various
4165 drop-out modes years ago (including no drop-out mode, which this
4166 commit fixes).
4167
4168 Problem reported by Patrick Thomas <pthomas505@gmail.com>.
4169
Werner Lembergd9b44702014-04-22 07:33:07 +020041702014-04-22 Werner Lemberg <wl@gnu.org>
4171
4172 * src/sfnt/pngshim.c (error_callback): s/longjmp/ft_longjmp/.
4173
Werner Lemberg98e510e2014-04-20 22:11:27 +020041742014-04-20 Werner Lemberg <wl@gnu.org>
4175
4176 [autofit] Fix Savannah bug #42148.
4177
4178 The adaptation of the cjk auto-hinter module to blue stringsets in
4179 2013-08-25 had three severe bugs. Mea culpa.
4180
4181 1. Contrary to the latin auto-hinter, characters for reference and
4182 overshoot values of a blue zone are specified separately. Due to
4183 the screwed-up change it didn't work at all.
4184
4185 2. A boolean comparison was erroneously replaced with a cast,
4186 causing invalid results with the `^' operator later on. The
4187 visual artifact caused by this problem is the topic of the bug
4188 report.
4189
4190 3. Two flag values were inverted, causing incorrect assignment of
4191 reference and overshoot values.
4192
4193 * src/autofit/afblue.dat: Fix CJK bluestrings, introducing a new
4194 syntax to have both reference and overshoot characters in a single
4195 string. This is error #1.
4196 Add extensive comments.
4197
4198 * src/autofit/afblue.hin (AF_BLUE_PROPERTY_CJK_FILL): Removed, no
4199 longer used.
Werner Lembergccfc4b42014-04-28 21:13:14 +02004200 (AF_BLUE_PROPERTY_CJK_TOP, AF_BLUE_PROPERTY_CJK_HORIZ): Fix values.
Werner Lemberg98e510e2014-04-20 22:11:27 +02004201 This is error #3.
4202
4203 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
4204
4205 * src/autofit/afcjk.c (af_cjk_metrics_init_blues): Correct error #1.
4206 Use character `|' to separate characters for reference and overshoot
4207 values.
4208 Improve tracing messages, synchronizing them with the latin
4209 auto-hinter.
Werner Lembergccfc4b42014-04-28 21:13:14 +02004210 (af_cjk_hints_compute_blue_edges): Fix value of `is_top_right_blue'.
Werner Lemberg98e510e2014-04-20 22:11:27 +02004211 This is error #2.
4212 (af_cjk_align_linked_edge): Add tracing message.
4213
4214 * src/autofit/afcjk.h (AF_CJK_IS_FILLED_BLUE): Removed, no longer
4215 used.
4216
Werner Lembergbbd83132014-04-17 01:24:36 +020042172014-04-17 Werner Lemberg <wl@gnu.org>
4218
Werner Lemberg8c7fb782014-04-17 15:53:25 +02004219 [autofit] More coverage fixes for complex scripts.
4220
4221 * src/autofit/hbshim.c (af_get_coverage): Merge input glyph coverage
4222 of GSUB lookups into output coverage. Otherwise, ligatures are not
4223 handled properly.
4224 Don't check blue zone characters for default coverage.
4225
42262014-04-17 Werner Lemberg <wl@gnu.org>
4227
Werner Lembergbbd83132014-04-17 01:24:36 +02004228 Make `FT_Get_SubGlyph_Info' actually work.
4229
4230 * src/base/ftobjs.c (FT_Get_SubGlyph_Info): Return FT_Err_Ok
4231 if there is no error.
4232
Werner Lemberg181fd072014-04-15 16:47:05 +020042332014-04-15 Werner Lemberg <wl@gnu.org>
4234
4235 [afblue.pl]: Minor improvements.
4236
4237 * src/tools/afblue.pl: Allow whitespace before comments.
4238 Ignore whitespace in strings.
4239
Werner Lemberg8b1f2a62014-04-14 07:58:19 +020042402014-04-14 Werner Lemberg <wl@gnu.org>
4241
4242 [autofit] Improve coverage handling.
4243
4244 * src/autofit/hbshim.c (af_get_coverage): Don't exclude glyphs
4245 appearing in the GPOS table if we are processing the default
4246 coverage.
4247
David Weber76307872014-04-13 15:41:13 +020042482014-04-13 David Weber <weber.aulendorf@googlemail.com>
4249
4250 [smooth] Fix stand-alone compilation.
4251
4252 * src/smooth/ftgrays.c (FT_BEGIN_STMNT, FT_END_STMNT): Define.
4253
Werner Lemberg8a94b1e2014-04-12 20:44:33 +020042542014-04-12 Werner Lemberg <wl@gnu.org>
4255
4256 [autofit] Redesign the recognition algorithm of strong points.
4257
4258 In particular, local extrema without horizontal or vertical segments
4259 are better recognized:
4260
4261 + A + D
4262 \ /
4263 \ /
4264 \ /
4265 \ /
4266 \ + C
4267 \ /
4268 B +/
4269
4270 If the distances AB and CD are large, point B wasn't previously
4271 detected as an extremum since the `ft_corner_is_flat' function
4272 `swallowed' BC regardless of its direction, tagging point B as weak.
4273 The next iteration started at B and made `ft_corner_is_flat' swallow
4274 point C, tagging it as weak also, et voilà.
4275
4276 To improve that, another pass gets now performed before calling
4277 `ft_corner_is_flat' to improve the `topology' of an outline: A
4278 sequence of non-horizontal or non-vertical vectors that point into
4279 the same quadrant are handled as a single, large vector.
4280
4281 Additionally, distances of near points are now accumulated, which
4282 makes the auto-hinter handle them as if they were prepended to the
4283 next non-near vector.
4284
4285 This generally improves the auto-hinter's rendering results.
4286
4287 * src/autofit/afhints.c (af_glyph_hints_reload): Implement it.
4288
4289 * src/autofit/afhints.h (AF_FLAGS): Remove no longer used flag
4290 `AF_FLAG_NEAR'.
4291
Werner Lemberg71f53e12014-04-05 16:27:19 +020042922014-04-05 Werner Lemberg <wl@gnu.org>
4293
4294 [autofit] Improve scoring algorithm for identifying stems.
4295
4296 Problem reported by Karsten Lücke <karsten.luecke@kltf.de>.
4297
4298 The new algorithm takes care of the width of stems: If the distance
4299 between two segments is larger than the largest stem width, the
4300 demerits quickly increase for larger distances. This improves
4301 hinting of slanted fonts (especially if the inner parts of serifs
4302 have non-horizontal `shoulders'), avoiding false stem links.
4303
4304 * src/autofit/aflatin.c (af_latin_hints_link_segments): Use largest
4305 stem width (if available) to compute better demerits for distances
4306 between stems.
4307 (af_latin_hints_detect_features): Pass stem width array and array
4308 size.
4309 (af_latin_metrics_init_widths): Updated to use original algorithm.
4310 (af_latin_hints_apply): Updated to use new algorithm.
4311
4312 * src/autofit/aflatin.h: Updated.
4313 * src/autofit/afcjk.c: Updated.
4314
Werner Lembergf8555b52014-04-03 05:45:38 +020043152014-04-03 Werner Lemberg <wl@gnu.org>
4316
4317 Don't require `gzip' module for `sfnt'.
4318
4319 Reported by Preet <prismatic.project@gmail.com>.
4320
4321 * src/sfnt/sfobjs.c (woff_open_font): Guard use of
4322 FT_Gzip_Uncompress with FT_CONFIG_OPTION_USE_ZLIB.
4323
Werner Lembergf41070f2014-03-27 17:38:23 +010043242014-03-27 Werner Lemberg <wl@gnu.org>
4325
4326 Fix Savannah bug #38235.
4327
4328 Work around a bug in pkg-config version 0.28 and earlier: If a
4329 variable value gets surrounded by doublequotes (in particular values
4330 for the `prefix' variable), the prefix override mechanism fails.
4331
4332 * builds/unix/freetype2.in: Don't use doublequotes.
4333 * builds/unix/unix-def.in (freetype.pc): Escape spaces in directory
4334 names with backslashes.
4335
Werner Lembergab76d972014-03-24 19:45:03 +010043362014-03-24 Werner Lemberg <wl@gnu.org>
4337
4338 Fix Savannah bug #41946.
4339
4340 Based on a patch from Marek Kašík <mkasik@redhat.com>.
4341
4342 * builds/unix/configure.raw (LIBS_CONFIG): Remove.
4343 * builds/unix/freetype-config.in (libs): Hard-code value.
4344 * builds/unix/unix-def.in: Updated.
4345
Werner Lembergd5159922014-03-22 06:20:54 +010043462014-03-22 Werner Lemberg <wl@gnu.org>
4347
4348 Another revert for the change from 2014-03-18.
4349
4350 Problem reported by Nikolaus Waxweiler <madigens@gmail.com>.
4351
4352 * src/base/ftcalc.c (FT_MulFix): Ensure that an `FT_MulFix' symbol
4353 gets always exported.
4354
Werner Lembergf0c471a2014-03-20 07:13:12 +010043552014-03-20 Werner Lemberg <wl@gnu.org>
4356
4357 CMakeLists.txt: Another fix for include directories.
4358
4359 Problem reported by Taylor Holberton <taylorcholberton@gmail.com>.
4360
Werner Lembergcc7cf2c2014-03-19 07:35:35 +010043612014-03-19 Werner Lemberg <wl@gnu.org>
4362
Werner Lemberg606c74f2014-03-19 23:46:42 +01004363 CMakeLists.txt: Fix include directories.
4364
4365 Problem reported by Taylor Holberton <taylorcholberton@gmail.com>.
4366
43672014-03-19 Werner Lemberg <wl@gnu.org>
4368
Werner Lembergcc7cf2c2014-03-19 07:35:35 +01004369 Partially revert last commit.
4370
4371 Found by Alexei.
4372
4373 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Initializing
4374 those variables is plain wrong, since we are in a loop.
4375
Sean McBride87628722014-03-18 08:39:35 +010043762014-03-18 Sean McBride <sean@rogue-research.com>
4377 Werner Lemberg <wl@gnu.org>
4378
4379 Fix clang warnings.
4380
4381 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Initialize
4382 some variables.
4383
4384 * src/base/ftcalc.c (FT_MulFix): Only use code if
4385 `FT_MULFIX_INLINED' is not defined.
4386
4387 * src/bdf/bdfdrivr.c (bdf_cmap_class), src/cache/ftcbasic.c
4388 (ftc_basic_image_family_class, ftc_basic_image_cache_class,
4389 ftc_basic_sbit_family_class, ftc_basic_sbit_cache_class),
4390 src/cache/ftccmap.c (ftc_cmap_cache_class), src/cache/ftcmanag.c
4391 (ftc_size_list_class, ftc_face_list_class), src/pcf/pcfdrivr.c
4392 (pcf_cmap_class), src/pfr/pfrdrivr.c (pfr_metrics_service_rec): Make
4393 function static.
4394
4395 * src/type1/t1driver.c (t1_ps_get_font_value): Remove redundant
4396 code.
4397
Werner Lemberg23367ff2014-03-17 07:33:14 +010043982014-03-17 Werner Lemberg <wl@gnu.org>
4399
4400 Fix Savannah bug #41869.
4401
4402 This works around a problem with HarfBuzz (<= 0.9.26), which doesn't
4403 validate glyph indices returned by
4404 `hb_ot_layout_lookup_collect_glyphs'.
4405
4406 * src/autofit/hbshim.c (af_get_coverage): Guard `idx'.
4407
4408 * docs/CHANGES: Updated.
4409
Werner Lemberg03181682014-03-14 08:06:06 +010044102014-03-14 Werner Lemberg <wl@gnu.org>
4411
4412 * builds/unix/configure.raw: Don't show error messages of `which'.
4413
Alan Coopersmithed372b72014-03-09 06:14:12 +010044142014-03-09 Alan Coopersmith <alan.coopersmith@oracle.com>
4415
4416 Fix cppcheck 1.64 warning.
4417
4418 * src/autofit/afglobal.c (af_face_globals_new): Catch NULL pointer
4419 dereference in case of error.
4420
Werner Lemberg1a69dc72014-03-09 06:06:58 +010044212014-03-09 Sean McBride <sean@rogue-research.com>
4422
4423 * src/sfnt/ttcmap.c (tt_face_build_cmaps): Remove clang warning.
4424
Werner Lemberg05565362014-03-06 18:56:58 +010044252014-03-06 Werner Lemberg <wl@gnu.org>
4426
Werner Lembergec8853c2014-03-06 19:13:45 +01004427 * Version 2.5.3 released.
4428 =========================
4429
4430
4431 Tag sources with `VER-2-5-3'.
4432
4433 * docs/VERSION.DLL: Update documentation and bump version number to
4434 2.5.3.
4435
4436 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
4437 builds/windows/vc2005/index.html,
4438 builds/windows/vc2008/freetype.vcproj,
4439 builds/windows/vc2008/index.html,
4440 builds/windows/vc2010/freetype.vcxproj,
4441 builds/windows/vc2010/index.html,
4442 builds/windows/visualc/freetype.dsp,
4443 builds/windows/visualc/freetype.vcproj,
4444 builds/windows/visualc/index.html,
4445 builds/windows/visualce/freetype.dsp,
4446 builds/windows/visualce/freetype.vcproj,
4447 builds/windows/visualce/index.html,
4448 builds/wince/vc2005-ce/freetype.vcproj,
4449 builds/wince/vc2005-ce/index.html,
4450 builds/wince/vc2008-ce/freetype.vcproj,
4451 builds/wince/vc2008-ce/index.html: s/2.5.2/2.5.3/, s/252/253/.
4452
4453 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
4454
4455 * builds/unix/configure.raw (version_info): Set to 17:2:11.
4456 * CMakeLists.txt (VERSION_PATCH): Set to 3.
4457 * docs/CHANGES: Updated.
4458
44592014-03-06 Werner Lemberg <wl@gnu.org>
4460
Werner Lemberg05565362014-03-06 18:56:58 +01004461 Fixes for compilation with C++.
4462
4463 * src/autofit/hbshim.c (scripts): Change type to `hb_script_t'.
4464 (af_get_coverage): Updated.
4465 (COVERAGE): Add cast.
4466
Sean McBrideb24e8d32014-03-06 14:54:22 +010044672014-03-06 Sean McBride <sean@rogue-research.com>
4468
4469 Remove more clang analyzer warnings.
4470
4471 * src/bdf/bdflib.c (_bdf_readstream), src/truetype/ttgload.c
4472 (TT_Load_Glyph): Remove dead stores.
4473
Werner Lemberga32758f2014-03-05 08:02:46 +010044742014-03-05 Werner Lemberg <wl@gnu.org>
4475
4476 * builds/unix/configure.raw: Simplify.
4477
suzuki toshiya382f3ef2014-03-05 10:19:15 +090044782014-03-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4479
4480 Fix a bug in configure in library dependency setting
Werner Lemberga32758f2014-03-05 08:02:46 +01004481 Reported in https://bugs.freedesktop.org/show_bug.cgi?id=75652.
suzuki toshiya382f3ef2014-03-05 10:19:15 +09004482
4483 * builds/unix/configure.raw: Use `x"${xxx}" != xno' style.
4484
Werner Lembergf48f7dc2014-03-04 04:40:07 +010044852014-03-04 Werner Lemberg <wl@gnu.org>
4486
4487 Minor fix for `make devel'.
4488
4489 * builds/freetype.mk (INCLUDE_FLAGS) [DEVEL_DIR]: Don't use
4490 pkg-config for bzip2 since not all GNU/Linux distributions have
4491 `bzip2.pc' (and the header file `bzlib.h' is located in /usr/include
4492 normally).
4493
Werner Lemberg7ac76b52014-03-04 04:29:17 +010044942014-03-04 Sean McBride <sean@rogue-research.com>
4495
4496 Fix several clang static analyzer dead store warnings.
4497
4498 * src/autofit/afhints.c (af_glyph_hints_reload,
4499 af_glyph_hints_align_weak_points): Remove unnecessary assignments.
4500
4501 * src/bdf/bdflib.c (bdf_font_load): Ditto.
4502
4503 * src/pshinter/pshalgo.c (psh_glyph_compute_extrema,
4504 psh_glyph_interpolate_other_points): Ditto.
4505
4506 * src/type1/t1load.c (T1_Set_MM_Blend): Ditto.
4507
Werner Lemberg93ebcbd2014-03-03 07:13:45 +010045082014-03-03 Werner Lemberg <wl@gnu.org>
4509
4510 Rewrite library option handling in `configure'.
4511
4512 o Introduce `auto' value for `--with-XXX' library options; this is
4513 now the default.
4514
4515 o First use `pkg-config' for library detection, then fall back to
4516 other tests.
4517
4518 * builds/unix/configure.raw (--with-zlib, --with-bzip2, --with-png,
4519 --with-harfbuzz): Rewrite.
4520 Use new `xxx_reqpriv', `xxx_libpriv', and `xxx_libstaticconf'
4521 variables to collect data for `freetype2.pc' and `freetype-config'.
4522 (FT2_EXTRA_LIBS): Renamed to ...
4523 (ft2_extra_libs): This since it gets no longer substituted.
4524 (REQUIRES_PRIVATE, LIBS_PRIVATE, LIBS_CONFIG, LIBSSTATIC_CONFIG):
4525 New output variables, replacing `XXX_PKG' and `LIBXXX'.
4526 Add notice at the end of `configure' showing the library
4527 configuration.
4528
4529 * builds/unix/freetype-config.in (--static): New command line
4530 option.
4531 (libs): Updated.
4532 (staticlibs): New variable, to be used if `--static' is given.
Werner Lemberg8fa69a82014-12-03 20:07:14 +01004533 * docs/freetype-config.1: Document `--static'.
Werner Lemberg93ebcbd2014-03-03 07:13:45 +01004534
4535 * builds/unix/freetype2.in, builds/unix/unix-def.in: Updated.
4536
Werner Lemberg86026a42014-03-01 06:57:19 +010045372014-03-01 Werner Lemberg <wl@gnu.org>
4538
Werner Lemberge962a912014-03-01 21:00:02 +01004539 Avoid `long long' warnings with older gcc compilers.
4540 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
4541
4542 * builds/unix/configure.raw: Don't use gcc's `-pedantic' flag for
4543 versions < 4.6. This is especially needed for Max OS X since this
4544 OS runs a gcc variant (or emulation) based on version 4.2.1.
4545
45462014-03-01 Werner Lemberg <wl@gnu.org>
4547
Werner Lemberg6030a9f2014-03-01 14:01:12 +01004548 * docs/INSTALL.CROSS: Revised and updated.
4549
45502014-03-01 Werner Lemberg <wl@gnu.org>
4551
Werner Lemberg646db052014-03-01 12:48:07 +01004552 Make `make clean' remove `freetype2.pc'.
4553
4554 This is a generated file at build time, not configure time.
4555
4556 * builds/unix/unix-def.in (DISTCLEAN): Move `freetype2.pc' to ...
4557 (CLEAN): This variable.
4558
45592014-03-01 Werner Lemberg <wl@gnu.org>
4560
Werner Lemberg00c79ed2014-03-01 12:32:20 +01004561 Use pkg-config for detecting libpng and libbz2 also.
4562
4563 * builds/unix/configure.raw (HAVE_PKG): New variable.
4564 Search for libbz2 using `pkg-config'; s/BZ2/BZIP2/.
4565 Search for libpng using `pkg-config'.
4566 Fix definition of `LIBHARFBUZZ' variable.
4567 * builds/unix/freetype-config.in ($libs): Updated.
4568 * builds/unix/freetype2.in: Add `URL' field.
4569 Update `Requires.private' and `Libs.private'.
4570 * builds/unix/unix-def.in: Updated.
4571
45722014-03-01 Werner Lemberg <wl@gnu.org>
4573
Werner Lemberg86026a42014-03-01 06:57:19 +01004574 Add configure support for HarfBuzz.
4575
4576 * builds/unix/pkg.m4: New file.
4577 * builds/unix/configure.raw: Search for libharfbuzz using
4578 `pkg-config'.
4579 Add `--without-harfbuzz' option.
4580 * builds/unix/freetype-config.in, builds/unix/freetype2.in,
4581 builds/unix/unix-def.in (freetype-config, freetype2.pc): Handle
4582 HarfBuzz.
4583
4584 * docs/INSTALL.UNIX: Document interdependency of Freetype with
4585 HarfBuzz.
4586
Alexei Podtelezhnikov6adda682014-02-28 09:24:26 +010045872014-02-28 Alexei Podtelezhnikov <apodtele@gmail.com>
4588
4589 [cff] Math simplifications.
4590
4591 * src/cf2blues.c (cf2_blues_init): Use `FT_MulDiv'.
4592 * src/cf2ft.c (cf2_getScaleAndHintFlag): Use simple division.
4593
Dave Arnold0eae6eb2014-02-28 07:40:01 +010045942014-02-28 Dave Arnold <darnold@adobe.com>
4595
Dave Arnold135c3fa2014-02-28 07:42:42 +01004596 [cff] Fix Savannah bug #41697, part 2.
4597
4598 * src/cff/cf2ft.c (cf2_initLocalRegionBuffer,
4599 cf2_initGlobalRegionBuffer): It is possible for a charstring to call
4600 a subroutine if no subroutines exist. This is an error but should
4601 not trigger an assert. Split the assert to account for this.
4602
46032014-02-28 Dave Arnold <darnold@adobe.com>
4604
Dave Arnold0eae6eb2014-02-28 07:40:01 +01004605 [cff] Fix Savannah bug #41697, part 1.
4606
4607 * src/cff/cf2hints.c (cf2_hintmap_build): Return when `hintMask' is
4608 invalid. In this case, it is not safe to use the length of
4609 `hStemHintArray'; the exception has already been recorded in
4610 `hintMask'.
4611
Werner Lembergeee4ff82014-02-26 18:12:36 +010046122014-02-26 Werner Lemberg <wl@gnu.org>
4613
Werner Lemberga2b5f662014-02-26 19:50:18 +01004614 [sfnt] Fix Savannah bug #41696.
4615
4616 * src/sfnt/ttcmap.c (tt_cmap0_validate, tt_cmap2_validate,
4617 tt_cmap4_validate, tt_cmap14_validate): Fix limit tests.
4618
46192014-02-26 Werner Lemberg <wl@gnu.org>
4620
Werner Lembergeee4ff82014-02-26 18:12:36 +01004621 [winfnt] Fix Savannah bug #41694.
4622
4623 * src/winfonts/winfnt.c (FNT_Load_Glyph): Check glyph offset.
4624
46252014-02-26 Werner Lemberg <wl@gnu.org>
Werner Lemberg9a567642014-02-26 13:08:07 +01004626
Werner Lemberg08c628d2014-02-26 14:18:03 +01004627 [cff] Fix Savannah bug #41693.
4628
4629 * src/cff/cffload.c (CFF_Load_FD_Select): Reject empty array.
4630
Werner Lembergeee4ff82014-02-26 18:12:36 +010046312014-02-26 Werner Lemberg <wl@gnu.org>
Werner Lemberg08c628d2014-02-26 14:18:03 +01004632
Werner Lemberg9a567642014-02-26 13:08:07 +01004633 [bdf] Fix Savannah bug #41692.
4634
4635 bdflib puts data from the input stream into a buffer in chunks of
4636 1024 bytes. The data itself gets then parsed line by line, simply
4637 increasing the current pointer into the buffer; if the search for
4638 the final newline character exceeds the buffer size, more data gets
4639 read.
4640
4641 However, in case the current line's end is very near to the buffer
4642 end, and the keyword to compare with is longer than the current
4643 line's length, an out-of-bounds read might happen since `memcmp'
4644 doesn't stop properly at the string end.
4645
4646 * src/bdf/bdflib.c: s/ft_memcmp/ft_strncmp/ to make comparisons
4647 stop at string ends.
4648
suzuki toshiya91c7a972014-02-17 16:38:31 +090046492014-02-17 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4650
4651 [autofit] Fix `make multi' compilation.
4652
suzuki toshiyacc9a0c22014-02-17 16:43:54 +09004653 * src/autofit/hbshim.c: Include `afglobal.h' and `aftypes.h'.
suzuki toshiya91c7a972014-02-17 16:38:31 +09004654
Werner Lemberg6b290fd2014-02-19 09:26:54 +010046552014-02-19 Werner Lemberg <wl@gnu.org>
4656 Simon Bünzli <zeniko@gmail.com>
4657
4658 Fix Savannah bug #32902.
4659
4660 Patch taken from
4661
4662 https://code.google.com/p/sumatrapdf/source/browse/trunk/ext/_patches/freetype2.patch?spec=svn8620&r=8620#87
4663
4664 with slight modifications.
4665
4666 * src/type1/t1parse.c (T1_Get_Private_Dict): Add heuristic test to
4667 handle fonts that incorrectly use \r at the beginning of an eexec
4668 block.
4669
Simon Bünzlidf14e6c2014-02-19 08:42:52 +010046702014-02-19 Simon Bünzli <zeniko@gmail.com>
4671
4672 Fix Savannah bug #41590.
4673
4674 * src/type1/t1load.c (parse_encoding): Protect against invalid
4675 number.
4676
Dave Arnold89a94d42014-02-12 23:45:47 +010046772014-02-12 Dave Arnold <darnold@adobe.com>
4678
4679 [cff] Optimize by using `FT_MulDiv'.
4680 Suggested by Alexei.
4681
4682 * src/cff/cf2font.c (cf2_computeDarkening): Do it.
4683
Werner Lemberg85ee27a2014-02-12 23:27:41 +010046842014-02-12 Werner Lemberg <wl@gnu.org>
4685
4686 Fix Savannah bug #41465.
4687
4688 * builds/unix/unix-def.in (CLEAN): Add `freetype-config'.
4689 (DISTCLEAN): Remove `freetype-config'.
4690
Sean McBride7be2a942014-02-08 13:55:38 +010046912014-02-08 Sean McBride <sean@rogue-research.com>
4692
4693 Fix clang static analyzer and compiler warnings.
4694
4695 * src/autofit/afhints.c (af_glyph_hints_align_weak_points),
4696 src/autofit/afloader (af_loader_load_g) <FT_GLYPH_FORMAT_COMPOSITE>,
4697 src/base/ftcalc.c (FT_MSB), src/base/ftoutln.c
4698 (FT_Outline_Decompose), src/bdf/bdfdrivr.c (bdf_interpret_style),
4699 src/cff/cffparse.c (cff_parse_integer), src/cid/cidparse.c
4700 (cid_parser_new), src/pfr/pfrload.c (pfr_phy_font_load),
4701 src/raster/ftraster.c (Decompose_Curve), src/sfnt/sfdriver.c
4702 (sfnt_get_ps_name), src/sfnt/ttcmap.c (tt_cmap12_next,
4703 tt_cmap13_next), src/smooth/ftgrays.c (gray_hline): Remove dead
4704 code.
4705
4706 * src/autofit/afmodule.c (af_property_get_face_globals,
4707 af_property_set, af_property_get), src/base/ftbitmap.c
4708 (ft_gray_for_premultiplied_srgb_bgra): Make functions static.
4709
4710 * src/base/ftobjs.c (ft_remove_renderer): Protect against
4711 library == NULL.
4712 (ft_property_do): Make function static.
4713
4714 * src/base/ftrfork.c: Include `ftbase.h'.
4715
4716 * src/sfnt/ttsbit.c (tt_face_load_sbix_image)
4717 [!FT_CONFIG_OPTION_USE_PNG], src/type1/t1gload.c
4718 (T1_Compute_Max_Advance): Avoid compiler warning.
4719
4720 * src/truetype/ttinterp.c (TT_New_Context): Reduce scope of
4721 variable.
4722
Werner Lembergab98c5e2014-02-08 11:34:33 +010047232014-02-08 Werner Lemberg <wl@gnu.org>
4724
4725 Fix Windows build directories.
4726
4727 The build target is now `windows' instead of `win32'.
4728
4729 Problem reported by Nickolas George <darknova.clan@gmail.com>.
4730
4731 * builds/modules.mk: Don't use `win32' and `win16' (!) but
4732 `windows'.
4733
4734 * builds/windows/detect.mk, builds/windows/win32-def.mk:
4735 s/win32/windows/.
4736
Eugen Sawina8ceae42014-02-08 06:30:06 +010047372014-02-08 Eugen Sawin <esawin@mozilla.com>
4738
4739 Fix Savannah bug #41507.
4740
4741 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap)
4742 [!FT_CONFIG_OPTION_USE_PNG] <17, 17, 19>: Fix error handling.
4743
Dave Arnold355b3592014-02-08 06:23:04 +010047442014-02-08 Dave Arnold <darnold@adobe.com>
4745
4746 [cff] Fix minor performance bug.
4747
4748 * src/cff/cf2font.c (cf2_font_setup): Darkening amount and blue zone
4749 calculations are now cached and not recomputed on each glyph.
4750
Werner Lemberg6dce1362014-02-05 15:40:47 +010047512014-02-05 Werner Lemberg <wl@gnu.org>
4752
4753 Fix problems with perl 5.8.8 as distributed with current MinGW.
4754
4755 * src/tools/afblue.pl: Work-around for Perl bug #63402.
4756 (string_re): Avoid `possessive quantifiers', which have been
4757 introduced in Perl version 5.10.
4758
Werner Lemberga8772912014-02-04 11:36:08 +010047592014-02-04 Werner Lemberg <wl@gnu.org>
4760
Werner Lembergd87f9a62014-02-04 16:14:09 +01004761 Fix compilation with MinGW.
4762
4763 Right now, compilation out of the box with latest MinGW is broken
4764 due to bugs in header files of mingwrt 4.0.3 in strict ANSI mode,
4765 cf.
4766
4767 https://sourceforge.net/p/mingw/bugs/2024/
4768 https://sourceforge.net/p/mingw/bugs/2046/
4769
4770 * builds/unix/configure.raw: Don't set `-ansi' flag for MinGW.
4771
47722014-02-04 Werner Lemberg <wl@gnu.org>
4773
Werner Lemberga8772912014-02-04 11:36:08 +01004774 [autofit] Minor fix.
4775
4776 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
4777 src/autofit/aflatin.c (af_latin_metrics_init_widths): Fix handling
4778 of alternative standard characters.
4779 This also fixes a compilation warning in non-debug mode.
4780
Werner Lembergee3778d2014-02-03 11:16:47 +010047812014-02-03 Werner Lemberg <wl@gnu.org>
4782
4783 [cff] Fix Savannah bug #41363.
4784
4785 * src/cff/cf2ft.c (cf2_checkTransform): Convert assertion into
4786 parameter check.
4787 (cf2_decoder_parse_charstrings): Call `cf2_checkTransform' only if
4788 we are scaling the outline.
4789 (cf2_getPpemY): Remove problematic assertion.
4790
Werner Lemberga3364002014-01-26 09:45:23 +010047912014-01-26 Werner Lemberg <wl@gnu.org>
4792
4793 [autofit] Introduce two more slots for standard characters.
4794
4795 This is useful for OpenType features like `c2sc' (caps to small
4796 caps) that don't have lowercase letters by definition, or other
4797 features that mainly operate on numerals.
4798
4799 * src/autofit/afscript.h: Add more standard characters.
4800
4801 * src/autofit/aftypes.h: Update use of `SCRIPT' macro.
4802 (AF_ScriptClassRec): Add members to hold two more standard
4803 characters.
4804 (AF_DEFINE_SCRIPT_CLASS): Updated.
4805
4806 * src/autofit/afglobal.c, src/autofit/afglobal.h,
4807 * src/autofit/afpic.c, src/autofit/afranges.h, src/autofit/hbshim.c:
4808 Update use of `SCRIPT' macro.
4809
4810 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
4811 src/autofit/aflatin.c (af_latin_metrics_init_widths): Scan two more
4812 standard characters.
4813
Werner Lembergeb7691c2014-01-24 19:04:22 +010048142014-01-24 Werner Lemberg <wl@gnu.org>
4815
4816 Fix Savannah bug #41320.
4817
4818 * src/autofit/aflatin.c (af_latin_metrics_init_blues)
4819 <AF_LATIN_IS_LONG_BLUE>: Avoid negative index of `last'.
4820
Werner Lemberg8b281f82014-01-23 08:14:53 +010048212014-01-23 Werner Lemberg <wl@gnu.org>
4822
Werner Lemberg752f3912014-01-23 09:14:25 +01004823 Fix Savannah bug #41310.
4824
4825 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap) <glyph_format==5>:
4826 Don't check metrics, which this format doesn't have.
4827 This is another correction to the commit from 2013-11-21.
4828
48292014-01-23 Werner Lemberg <wl@gnu.org>
4830
Werner Lemberg8b281f82014-01-23 08:14:53 +01004831 Fix Savannah bug #41309.
4832
4833 * src/type1/t1load.c (t1_parse_font_matrix): Properly handle result
4834 of `T1_ToFixedArray'.
4835
4836 * src/cid/cidload.c (cid_parse_font_matrix): Synchronize with
4837 `t1_parse_font_matrix'.
4838
4839 * src/type42/t42parse.c (t42_parse_font_matrix): Synchronize with
4840 `t1_parse_font_matrix'.
4841 (t42_parse_encoding): Synchronize with `t1_parse_encoding'.
4842
4843 * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_BBOX>,
4844 <T1_FIELD_TYPE_MMOX>: Properly handle result of `ps_tofixedarray'.
4845
Werner Lembergff8dc312014-01-22 09:19:57 +010048462014-01-22 Werner Lemberg <wl@gnu.org>
4847
4848 * src/autofit/hbshim.c (af_get_coverage): Fix memory leaks.
4849
Werner Lemberg6a700782014-01-16 08:55:40 +010048502014-01-16 Werner Lemberg <wl@gnu.org>
4851
4852 [autofit] Improve tracing of style coverages.
4853
4854 * include/internal/fttrace.h: Add `afglobal' for tracing style
4855 coverages.
4856
4857 * src/autofit/afglobal.c: Include FT_INTERNAL_DEBUG_H.
4858 (FT_COMPONENT): Define.
4859 (af_face_globals_compute_style_coverage): Trace `gstyles' array
4860 data.
4861
Werner Lemberg7cbfdff2014-01-09 07:26:06 +010048622014-01-09 Werner Lemberg <wl@gnu.org>
4863
4864 Fix Savannah bug #41158.
4865
4866 * builds/unix/install.mk (install): Create man page directory.
4867
Chongyu Zhu94c66942014-01-08 08:52:59 +010048682014-01-08 Chongyu Zhu <lembacon@gmail.com>
4869
4870 [arm] Fix Savannah bug #41138, part 2.
4871
4872 * builds/unix/ftconfig.in (FT_MulFix_arm), include/config/ftconfig.h
4873 (FT_MulFix_arm), src/truetype/ttinterp.c (TT_MulFix14_arm): Fix
4874 preprocessor conditionals for `add.w'.
4875
Werner Lembergc46fa862014-01-08 08:45:40 +010048762014-01-08 Werner Lemberg <wl@gnu.org>
4877
4878 [autofit] Fix Savannah bug #41138, part 1.
4879
4880 * src/tools/afblue.pl <Handling #endif>: Produce correct auxiliary
4881 enumeration names for generated `#else'.
4882
4883 * src/autofit/afblue.h: Regenerated.
4884
Werner Lemberg3e5a3742014-01-06 07:53:10 +010048852014-01-06 Werner Lemberg <wl@gnu.org>
4886
4887 Add manual page for `freetype-config'.
4888 Contributed by Nis Martensen <nis.martensen@web.de>.
4889
4890 * docs/freetype-config.1: New file.
4891
4892 * builds/unix/unix-def.in (mandir): Define.
4893 * builds/unix/install.mk (install, uninstall): Handle manpage.
4894
Werner Lemberg991cbcc2014-01-05 13:24:56 +010048952014-01-05 Werner Lemberg <wl@gnu.org>
4896
4897 [autofit] Minor fixes for `afblue.pl'.
4898
4899 * src/tools/afblue.pl (aux_name): Don't use `reverse'.
4900 <Handling #endif>: Use proper indentation for generated `#else'.
4901
4902 * src/autofit/afblue.h: Regenerated.
4903
Werner Lemberg0d977442014-01-04 11:46:34 +010049042014-01-04 Werner Lemberg <wl@gnu.org>
4905
4906 [autofit] Fix Indic scripts.
4907
4908 Split the single, incorrect Indic entry into separate scripts so
4909 that the covered ranges are the same: Bengali, Devanagari, Gujarati,
4910 Gurmukhi, Kannada, Limbu, Malayalam, Oriya, Sinhala, Sundanese,
4911 Syloti Nagri, Tamil, Telugu, and Tibetan. At the same time, remove
4912 entries for Meetai Mayak and Sharada – the Unicode ranges were
4913 incorrect (and nobody has complained about that), fonts are scarce
4914 for those scripts, and the Indic auto-hinter support is rudimentary
4915 anyways.
4916
4917 * src/autofit/afscript.h: Updated, using AF_CONFIG_OPTION_INDIC and
4918 AF_CONFIG_OPTION_CJK.
4919
4920 * src/autofit/afstyles.h (STYLE_DEFAULT_INDIC): New auxiliary macro.
4921 Use it, together with AF_CONFIG_OPTION_INDIC and
4922 AF_CONFIG_OPTION_CJK, to update.
4923
4924 * src/autofit/afranges.c [AF_CONFIG_OPTION_INDIC]: Updated.
4925 [!AF_CONFIG_OPTION_INDIC, !AF_CONFIG_OPTION_CJK]: Removed.
4926 Sort entries by tags.
4927
Werner Lemberg5c7f5502014-01-03 10:48:26 +010049282014-01-03 Werner Lemberg <wl@gnu.org>
4929
Werner Lembergecdb0e32014-01-03 20:49:31 +01004930 [autofit] Thinko.
4931
4932 * src/autofit/hbshim.c (af_get_char_index): Similar to
4933 `af_get_coverage', reject glyphs which are not substituted.
4934
49352014-01-03 Werner Lemberg <wl@gnu.org>
4936
Werner Lemberga42f9182014-01-03 18:29:41 +01004937 [autofit] Fix handling of default coverages.
4938
Werner Lemberg1b5bc892014-01-03 18:33:24 +01004939 With this commit, the implementation of coverage handling is
4940 completed.
4941
4942 * src/autofit/hbshim.c (af_get_coverage): Exit early if nothing to
4943 do.
4944 Reject coverages which don't contain appropriate glyphs for blue
4945 zones.
4946
49472014-01-03 Werner Lemberg <wl@gnu.org>
4948
4949 [autofit] Fix handling of default coverages.
4950
Werner Lemberga42f9182014-01-03 18:29:41 +01004951 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
4952 First handle non-default coverages, then the default coverage of the
4953 default script, and finally the other default coverages.
4954
49552014-01-03 Werner Lemberg <wl@gnu.org>
4956
Werner Lembergf45749b2014-01-03 18:09:36 +01004957 [autofit] Fix scaling of HarfBuzz shaping.
4958
4959 * src/autofit/hbshim.c (af_get_char_index): Scale to units per EM.
4960
49612014-01-03 Werner Lemberg <wl@gnu.org>
4962
Werner Lemberg5c7f5502014-01-03 10:48:26 +01004963 [autofit] Better ftgrid support.
4964
4965 * src/autofit/afhints.c (af_glyph_hints_get_segment_offset): Add
4966 parameters `is_blue' and `blue_offset'.
4967
Werner Lemberg73cc8332014-01-01 07:10:36 +010049682014-01-01 Werner Lemberg <wl@gnu.org>
4969
Werner Lemberg55cd7e02014-01-02 13:07:48 +01004970 [autofit] Remove some styles.
4971
4972 * src/autofit/afcover.h: Remove coverages for alternative fractions,
4973 denominators, numerators, and fractions.
4974
4975 * src/autofit/afstyles.h (META_STYLE_LATIN): Updated.
4976
49772014-01-01 Werner Lemberg <wl@gnu.org>
4978
Werner Lembergc973e672014-01-01 16:34:42 +01004979 [autofit] Add more styles.
4980
4981 * src/autofit/afstyles.h (STYLE_LATIN, META_STYLE_LATIN): New
4982 auxiliary macros; use them to define styles for Cyrillic, Greek, and
4983 Latin.
4984
4985 * src/autofit/afcover.h: Remove coverage for oldstyle figures.
4986 Since those digits are used in combination with ordinary letters, it
4987 makes no sense to handle them separately.
4988
4989 * src/autofit/afglobal.c (af_face_globals_get_metrics): Don't limit
4990 `options' parameter to 4 bits.
4991
49922014-01-01 Werner Lemberg <wl@gnu.org>
4993
Werner Lembergabb2f732014-01-01 08:00:16 +01004994 [autofit] Fix style assignments to glyphs.
4995
4996 * src/autofit/hbshim.c (af_get_coverage)
4997 [FT_CONFIG_OPTION_USE_HARFBUZZ]: Scan GPOS coverage of features also
4998 so that we can skip glyphs that have both GSUB and GPOS data.
4999
50002014-01-01 Werner Lemberg <wl@gnu.org>
5001
Werner Lemberg0950f3a2014-01-01 07:48:20 +01005002 * src/autofit/hbshim.c: s/{lookups,glyphs}/gsub_{lookups,glyphs}/.
5003
50042014-01-01 Werner Lemberg <wl@gnu.org>
5005
Werner Lemberg73cc8332014-01-01 07:10:36 +01005006 [autofit] Implement and use `af_get_char_index' with HarfBuzz.
5007
5008 * src/autofit/hbshim.c (COVERAGE) [FT_CONFIG_OPTION_USE_HARFBUZZ]:
5009 Redefine to construct HarfBuzz features.
5010 (af_get_char_index) [FT_CONFIG_OPTION_USE_HARFBUZZ]: Rewritten.
5011
5012 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Use
5013 `y_offset' to adjust `best_y'.
5014
Werner Lembergc9d99472013-12-31 08:16:57 +010050152013-12-31 Werner Lemberg <wl@gnu.org>
5016
Werner Lemberg785f3852013-12-31 09:45:10 +01005017 [autofit] s/AF_STYLE_...._DEFAULT/AF_STYLE_...._DFLT/i.
5018
50192013-12-31 Werner Lemberg <wl@gnu.org>
5020
Werner Lembergc9d99472013-12-31 08:16:57 +01005021 [autofit] Fix interface of `af_get_char_index'.
5022
5023 * src/autofit/hbshim.c (af_get_char_index): Return error value.
5024 Add argument for y offset (to be used in a yet-to-come patch).
5025
5026 * src/autofit/hbshim.h, src/autofit/afcjk.c,
5027 src/autofit/aflatin.c: Updated.
5028
Werner Lemberg44aa7e02013-12-30 07:41:22 +010050292013-12-30 Werner Lemberg <wl@gnu.org>
5030
5031 [autofit] Don't combine multiple features into one set.
5032
5033 Combining them, as originally envisioned, would lead to much more
5034 complicated code, as investigations have shown meanwhile. The major
5035 drawback is that we run out of available style slots much earlier.
5036 However, this is only a theoretical issue since we don't support a
5037 large number of scripts currently.
5038
5039 * src/autofit/afcover.h: Replace `COVERAGE_{1,2,3}' macros with
5040 a single-element `COVERAGE' macro, sort the elements by the feature
5041 tags, and add entry for `ruby'.
5042
5043 * src/autofit/aftypes.h: Updated.
5044 * src/autofit/hbshim.c: Updated.
5045
Werner Lemberg6af01a02013-12-28 08:55:24 +010050462013-12-28 Werner Lemberg <wl@gnu.org>
5047
Werner Lemberg072dc452013-12-28 12:26:21 +01005048 [autofit] Code shuffling to reduce use of cpp macros.
5049
5050 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
5051 Call `af_get_coverage' unconditionally.
5052
5053 * src/autofit/autofit.c: Include `hbshim.c' unconditionally.
5054
5055 * src/autofit/hbshim.c (af_get_coverage)
5056 [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Provide dummy function.
5057
5058 * src/autofit/hbshim.h: Provide function declarations
5059 unconditionally.
5060
50612013-12-28 Werner Lemberg <wl@gnu.org>
5062
Werner Lemberg17af5862013-12-28 10:33:01 +01005063 [autofit] Add wrapper function for `FT_Get_Char_Index'.
5064
5065 Yet-to-come changes will provide HarfBuzz functionality for the new
5066 function.
5067
5068 * src/autofit/hbshim.c (af_get_char_index): New function.
5069 * src/autofit/hbshim.h: Updated.
5070
5071 * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
5072 af_cjk_metrics_init_blues, af_cjk_metrics_check_digits): Updated.
5073
5074 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
5075 af_latin_metrics_init_blues, af_latin_metrics_check_digits):
5076 Updated.
5077
50782013-12-28 Werner Lemberg <wl@gnu.org>
5079
Werner Lemberg6af01a02013-12-28 08:55:24 +01005080 [autofit] Use `global' HarfBuzz font object.
5081
5082 We now use `hb_font' instead of `hb_face' since yet-to-come changes
5083 need this.
5084
5085 * src/autofit/afglobal.h: Include `hbshim.h'.
5086 (AF_FaceGlobalsRec) [FT_CONFIG_OPTION_USE_HARFBUZZ]: New member
5087 `hb_font'.
5088
5089 * src/autofit/afglobal.c (af_face_globals_new)
5090 [FT_CONFIG_OPTION_USE_HARFBUZZ]: Create `hb_font'.
5091 (af_face_globals_free) [FT_CONFIG_OPTION_USE_HARFBUZZ]: Destroy
5092 `hb_font'.
5093
5094 * src/autofit/hbshim.h: Include HarfBuzz headers.
5095
5096 * src/autofit/hbshim.c: Include `hbshim.h' instead of HarfBuzz
5097 headers.
5098 (af_get_coverage): Updated.
5099
Werner Lembergd32a7d32013-12-27 19:26:04 +010051002013-12-27 Werner Lemberg <wl@gnu.org>
5101
5102 [autofit] Handle `DFLT' OpenType script for coverages.
5103
5104 * include/ftautoh.h: Document new `default-script' property.
5105
5106 * src/autofit/hbshim.c (af_get_coverage): Use `AF_FaceGlobals' for
5107 type of first parameter.
5108 (script_tags): Add one more element.
5109 (af_get_coverage): Adjust `script_tags' to handle `DFLT' script tag.
5110
5111 * src/autofit/hbshim.h: Updated.
5112
5113 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
5114 Updated.
5115
5116 * src/autofit/afglobal.h (AF_SCRIPT_DEFAULT): New macro.
5117
5118 * src/autofit/afmodule.h (AF_ModuleRec): New `default_script'
5119 member.
5120
5121 * src/autofit/afmodule.c (af_property_set, af_property_get): Handle
5122 `default-script' property.
5123 (af_autofitter_init): Updated.
5124
suzuki toshiyae2d2b152013-12-27 16:44:24 +090051252013-12-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5126
5127 [ftrfork] Fix the face order difference between POSIX and Carbon.
5128
5129 The fragmented resources in Suitcase and .dfont should be reordered
Werner Lemberg00a7b512013-12-27 19:18:49 +01005130 when `POST' resource for Type1 is being restored, but reordering of
suzuki toshiyae2d2b152013-12-27 16:44:24 +09005131 sfnt resources induces the different face order. Now the ordering
Werner Lemberg00a7b512013-12-27 19:18:49 +01005132 is restricted to `POST' resource only, to prevent the different
5133 order issue (e.g. the face index in the fontconfig cache generated
5134 with Carbon framework is incompatible with that by FreeType 2
5135 without Carbon framework.) Found by Khaled Hosny and Hin-Tak Leung.
5136
suzuki toshiyae2d2b152013-12-27 16:44:24 +09005137 http://lists.gnu.org/archive/html/freetype-devel/2013-02/msg00035.html
5138 http://lists.gnu.org/archive/html/freetype-devel/2013-12/msg00027.html
5139
5140 * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Add a switch
Werner Lemberg44aa7e02013-12-30 07:41:22 +01005141 `sort_by_res_id' to control the fragmented resource ordering.
Werner Lemberg00a7b512013-12-27 19:18:49 +01005142 * include/internal/ftrfork.h: Declare new switch.
5143 * src/base/ftobjs.c (IsMacResource): Enable the sorting for `POST'
5144 resource, and disable the sorting for `sfnt' resource.
suzuki toshiyae2d2b152013-12-27 16:44:24 +09005145
Werner Lemberg5f577462013-12-25 08:50:50 +010051462013-12-25 Werner Lemberg <wl@gnu.org>
5147
5148 Fix Savannah bug #40997.
5149
5150 * src/bdf/bdfdrivr.c (BDF_Face_Init): Only use OR operator to
5151 adjust face flags since FT_FACE_FLAG_EXTERNAL_STREAM might already
5152 be set.
5153 * src/cff/cffobjs.c (cff_face_init): Ditto.
5154 * src/cid/cidobjs.c (cid_face_init): Ditto.
5155 * src/pcf/pcfread.c (pcf_load_font): Ditto.
5156 * src/pfr/pfrobjs.c (pfr_face_init): Ditto.
5157 * src/type1/t1objs.c (T1_Face_Init): Ditto.
5158 * src/type42/t42objs.c (T42_Face_Init): Ditto.
5159 * src/winfonts/winfnt.c (FNT_Face_Init): Ditto.
5160
Werner Lembergc4e968e2013-12-21 07:23:08 +010051612013-12-21 Werner Lemberg <wl@gnu.org>
5162
Werner Lemberg19241342013-12-21 21:31:38 +01005163 [autofit] Introduce `coverages'.
5164
5165 Coverages are the interface to the HarfBuzz library to acces
5166 OpenType features for handling glyphs not addressable by the cmap.
5167
5168 Right now, compilation of HarfBuzz is only added to the development
5169 build. A solution for standard build mode will be delayed until
5170 HarfBuzz gets split into two libraries to avoid mutual dependencies
5171 between FreeType and HarfBuzz.
5172
5173 Note that this is only a first step in handling coverages, basically
5174 providing the framework only. Code for handling selected OpenType
5175 features (this is, actually using the data in `afcover.h') will
5176 follow.
5177
5178 * devel/ftoption.h, include/config/ftoption.h
5179 (FT_CONFIG_OPTION_USE_HARFBUZZ): New macro.
5180
5181 * src/autofit/hbshim.c, src/autofit/hbshim.h, src/autofit/afcover.h:
5182 New files.
5183
5184 * src/autofit/afscript.h: Add HarfBuzz script name tags.
5185
5186 * src/autofit/afstyles.h: Add default coverage enumeration values.
5187
5188 * src/autofit/aftypes.h: Update use of `SCRIPT' and `STYLE' macros.
5189 (AF_Coverage): New enumeration (generated by `afcover.h').
5190 (AF_StyleClassRec): New member `coverage'.
5191 (AF_DEFINE_STYLE_CLASS): Updated.
5192
5193 * include/internal/fttrace.h: Add `afharfbuzz' for tracing coverage
5194 data.
5195
5196 * src/autofit/afglobal.h: Update use of `SCRIPT' and `STYLE' macros.
5197 (AF_SCRIPT_FALLBACK): Renamed to ...
5198 (AF_STYLE_FALLBACK): ... this.
5199
5200 * src/autofit/afglobal.c: Include `hbshim.c'.
5201 Update use of `SCRIPT' and `STYLE' macros.
5202 (af_face_globals_compute_style_coverage)
5203 [FT_CONFIG_OPTION_USE_HARFBUZZ]: Call `af_get_coverage'.
5204 Update.
5205
5206 * src/autofit/afmodule.h (AF_ModuleRec):
5207 s/fallback_script/fallback_style/.
5208
5209 * src/autofit/afmodule.c (af_property_set): Adapt handling of
5210 `fallback-script' property to set a fallback style.
5211 (af_property_get, af_autofitter_init): Updated.
5212
5213 * src/autofit/afpic.c: Update use of `SCRIPT' and `STYLE' macros.
5214
5215 * src/autofit/afranges.h: Update use of `SCRIPT' macro.
5216
5217 * src/autofit/autofit.c [FT_CONFIG_OPTION_USE_HARFBUZZ]: Include
5218 `hbshim.c'.
5219
5220 * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `hbshim.c'.
5221 (AUTOF_DRV_H): Add `afcover.h'.
5222
5223 * builds/freetype.mk (INCLUDE_FLAGS) [DEVEL_DIR]: Use pkg-config for
5224 all libraries needed by FreeType.
5225
52262013-12-21 Werner Lemberg <wl@gnu.org>
5227
Werner Lembergb337fa22013-12-21 19:33:15 +01005228 Fix Savannah bug #40975 (sort of).
5229
5230 * src/truetype/ttinterp.c (Ins_IP): Fix sign typo to make FreeType
5231 behave the same as the Windows TrueType engine for the invalid case.
5232
52332013-12-21 Werner Lemberg <wl@gnu.org>
5234
Werner Lemberg3bf60952013-12-21 08:49:11 +01005235 [autofit] Make PIC mode work actually.
5236
5237 * src/autofit/afpic.h (AFModulePIC): Fix array sizes to fit the
5238 enumeration values automatically generated by including `afscript.h'
5239 and friends.
5240
5241 * src/autofit/afpic.c (autofit_module_class_pic_init): Updated.
5242
52432013-12-21 Werner Lemberg <wl@gnu.org>
5244
Werner Lembergbd413862013-12-21 08:14:25 +01005245 Fix PIC linking.
5246
5247 * include/internal/ftrfork.h (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Fix
5248 generated function name.
5249
5250 * src/base/basepic.c (FT_Init_Table_raccess_guess_table): Rename
5251 to ...
5252 (FT_Init_Table_ft_raccess_guess_table): ... this so that the
5253 function name correctly corresponds to what the macro framework
5254 expects.
5255
5256 * src/psnames/rules.mk (PSNAMES_DRV_SRC_S): Use correct file name so
5257 that PIC functions are compiled also.
5258
52592013-12-21 Werner Lemberg <wl@gnu.org>
5260
Werner Lembergc4e968e2013-12-21 07:23:08 +01005261 [base] Add missing dependencies to Makefile.
5262
5263 * src/base/rules.mk (BASE_SRC): Add `basepic.c' and `ftpic.c'.
5264 (BASE_H): Add `basepic.h'.
5265
Werner Lemberg974b1932013-12-20 17:26:26 +010052662013-12-20 Werner Lemberg <wl@gnu.org>
5267
Werner Lemberg8a8f3752013-12-20 18:35:35 +01005268 [autofit] Fix PIC compilation.
5269
5270 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
5271 src/autofit/aflatin.c (af_latin_metrics_init_widths)
5272 [FT_CONFIG_OPTION_PIC]: Declare `globals'.
5273
5274 * src/autofit/afglobal.c: Always call AF_DEFINE_SCRIPT_CLASS, and
5275 AF_DEFINE_STYLE_CLASS.
5276
5277 * src/autofit/afpic.c: Include `afglobal.h'.
5278 (autofit_module_class_pic_init): Typo.
5279
5280 * src/autofit/aftypes.h (AF_DEFINE_SCRIPT_CLASS,
5281 AF_DEFINE_STYLE_CLASS): Don't use the same identifier for macro
5282 parameter and structure member.
5283
52842013-12-20 Werner Lemberg <wl@gnu.org>
5285
Werner Lemberg974b1932013-12-20 17:26:26 +01005286 [autofit] Introduce `styles'.
5287
5288 This is the new top-level structure for handling glyph input data;
5289 scripts are now defined separately.
5290
5291 * src/autofit/aftypes.h (SCRIPT): Updated.
5292 (AF_ScriptClassRec): Move `blue_stringset' and `writing_system'
5293 members to ...
5294 (AF_Style_ClassRec): ... this new structure.
5295 (AF_Style): New enumeration.
5296 (AF_StyleMetricsRec): Replace `script' enumeration with
5297 `style_class' pointer.
5298 (AF_DEFINE_SCRIPT_CLASS, AF_DECLARE_SCRIPT_CLASS): Updated.
5299 (AF_DEFINE_STYLE_CLASS, AF_DECLARE_STYLE_CLASS): New macros.
5300
5301 * src/autofit/afstyles.h: New file, using data from `afscript.h'.
5302 * src/autofit/afscript.h: Updated.
5303
5304 * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
5305 af_cjk_metrics_init_blues, af_cjk_hint_edges): Updated.
5306
5307 * src/autofit/afglobal.c (SCRIPT): Updated.
5308 (STYLE): Redefine macro to load `afstyles.h'.
5309 (af_script_names) [FT_DEBUG_LEVEL_TRACE]: Replace with...
5310 (af_style_names): ... this array.
5311 (af_face_globals_compute_script_coverage): Renamed to...
5312 (af_face_globals_compute_style_coverage): ... this.
5313 Updated.
5314 (af_face_globals_new, af_face_globals_free,
5315 af_face_globals_get_metrics): Updated.
5316
5317 * src/autofit/afglobal.h (SCRIPT): Updated.
5318 (STYLE): Redefine macro to load `afstyles.h'.
5319 (AF_SCRIPT_FALLBACK): Update definition. This will get more
5320 refinements with later on.
5321 (AF_SCRIPT_UNASSIGNED): Replace with...
5322 (AF_STYLE_UNASSIGNED): ... this macro.
5323 (AF_FaceGlobalsRec): Updated.
5324
5325 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
5326 af_latin_metrics_init_blues, af_latin_metrics_scale_dim,
5327 af_latin_hint_edges): Updated.
5328
5329 * src/autofit/aflatin2.c (af_latin2_metrics_init_widths): Updated.
5330 (af_ltn2_uniranges): Removed.
5331
5332 * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph):
5333 Updated.
5334
5335 * src/autofit/afpic.c (autofit_module_class_pic_init): Updated.
5336 * src/autofit/afpic.h (AF_STYLE_CLASSES_GET): New macro.
5337 (AFModulePIC): Add `af_style_classes' and `af_style_classes_rec'
5338 members.
5339
5340 * src/autofit/afranges.h: Updated.
5341
5342 * src/autofit/rules.mk (AUTOF_DRV_H): Add `afstyles.h'.
5343
Werner Lembergd8324572013-12-19 15:45:24 +010053442013-12-19 Werner Lemberg <wl@gnu.org>
5345
5346 [autofit] Factor scripts and uniranges out of writing system files.
5347
5348 * src/autofit/afranges.c, src/autofit/afranges.h: New files.
5349
5350 * src/autofit/afscript.h: Extend `SCRIPT' macro with more
5351 parameters, taking data from the writing system files.
5352
5353 * src/autofit/aftypes.h: Updated.
5354
5355 * src/autofit/afglobal.c: Include `afranges.h'.
5356 Load `afscript.h' to call AF_DEFINE_SCRIPT_CLASS.
5357 * src/autofit/afglobal.c: Include `afranges.h'.
5358 Load `afscript.h' to call AF_DECLARE_SCRIPT_CLASS.
5359
5360 * src/autofit/afcjk.c, src/autofit/afcjk.h: Updated.
5361 * src/autofit/afdummy.c, src/autofit/afdummy.h: Updated.
5362 * src/autofit/afindic.c, src/autofit/afindic.h: Updated.
5363 * src/autofit/aflatin.c, src/autofit/aflatin.h: Updated.
5364 * src/autofit/aflatn2.c, src/autofit/aflatn2.h: Updated.
5365
5366 * src/autofit/afpic.c: Updated.
5367
5368 * src/autofir/autofit.c: Include `afranges.c'.
5369 * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `afranges.c'.
5370
Werner Lemberg9a354552013-12-18 10:36:06 +010053712013-12-18 Werner Lemberg <wl@gnu.org>
5372
Werner Lemberg73f31982013-12-19 15:24:17 +01005373 [autofit] More code orthogonality.
5374
5375 * src/autofit/aftypes.h (AF_StyleMetrics): Replace `script_class'
5376 pointer to an `AF_ScriptClass' structure with `script' index of type
5377 `AF_Script'.
5378 Move some code around.
5379
5380 * src/autofit/afcjk.c: Include `afpic.h'.
5381 (af_cjk_metrics_init_widths, af_cjk_metrics_init_blues,
5382 af_cjk_hint_edges): Updated.
5383
5384 * src/autofit/aflatin.c: Include `afpic.h'.
5385 (af_latin_metrics_init_widths, af_latin_metrics_init_blues,
5386 af_latin_metrics_scale_dim, af_latin_hint_edges): Updated.
5387
5388 * src/autofit/afglobal.c (af_face_globals_get_metrics): Updated.
5389
5390 * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph):
5391 Updated.
5392
53932013-12-18 Werner Lemberg <wl@gnu.org>
5394
Werner Lemberg3f91cb32013-12-18 12:59:35 +01005395 [autofit] s/ScriptMetrics/StyleMetrics/.
5396
53972013-12-18 Werner Lemberg <wl@gnu.org>
5398
Werner Lemberg4fccc212013-12-18 12:53:01 +01005399 [autofit] s/script_{metrics,hints}/style_{metrics,hints}/
5400
54012013-12-18 Werner Lemberg <wl@gnu.org>
5402
Werner Lembergf4df4072013-12-18 10:39:30 +01005403 [autofit] s/gscripts/gstyles/.
5404
54052013-12-18 Werner Lemberg <wl@gnu.org>
5406
Werner Lemberg9a354552013-12-18 10:36:06 +01005407 [autofit] s/glyph_scripts/glyph_styles/.
5408
5409 This is the first commit of a series to create a new top-level
5410 structure (a `style') for handling scripts, writing_systems, and
5411 soon-to-be-added coverages.
5412
Werner Lemberg7a5fc2f2013-12-17 13:29:53 +010054132013-12-17 Werner Lemberg <wl@gnu.org>
5414
5415 [autofit] s/AF_Script_/AF_WritingSystem_/ where appropriate.
5416
Infinality8bb09b02013-12-11 09:01:13 +010054172013-12-11 Infinality <infinality@infinality.net>
5418
5419 [truetype] Simplify logic of rendering modes.
5420
5421 This patch unifies the subpixel and non-subpixel cases.
5422
5423 * src/truetype/ttinterp.h (TT_ExecContextRec): Remove
5424 `grayscale_hinting'; all code should refer to `grayscale' instead.
5425 Remove unused `native_hinting' member.
5426 Rename `subpixel_hinting' member to `subpixel.
5427
5428 * src/truetype/ttgload.c (TT_LOADER_SET_PP): Updated.
5429 (tt_loader_init): Updated.
5430
5431 * src/truetype/ttinterp.c (Ins_GETINFO): Simplify.
5432 Updated.
5433
Werner Lemberge9d95aa2013-12-11 07:48:51 +010054342013-12-11 Werner Lemberg <wl@gnu.org>
5435
5436 [documentation] Add section how to include FreeType header files.
5437 Problem reported by David Kastrup <dak@gnu.org>.
5438
5439 Surprisingly, a description how to do that was completely missing in
5440 the API reference.
5441
5442 * include/freetype.h, include/ftchapters.h: New documentation
5443 section `header_inclusion'.
5444
Werner Lemberg05c786d2013-12-10 08:38:57 +010054452013-12-10 Werner Lemberg <wl@gnu.org>
5446
Werner Lemberg91932592013-12-10 13:24:07 +01005447 [autofit] s/DFLT/NONE/, s/dflt/none/.
5448
54492013-12-10 Werner Lemberg <wl@gnu.org>
5450
Werner Lemberg45244f82013-12-10 13:18:11 +01005451 [autofit] s/AF_SCRIPT_NONE/AF_SCRIPT_UNASSIGNED/.
5452
54532013-12-10 Werner Lemberg <wl@gnu.org>
5454
Werner Lemberg69d1a362013-12-10 10:12:27 +01005455 [truetype] Fix scaling of vertical phantom points.
5456
5457 * src/truetype/ttgload.c (load_truetype_glyph): Scale pp3.x and
5458 pp4.x also.
5459
54602013-12-10 Werner Lemberg <wl@gnu.org>
5461
Werner Lemberg05c786d2013-12-10 08:38:57 +01005462 [truetype] Fix positioning of composite glyphs.
5463 Problem reported by Nigel Tao <nigeltao@golang.org>.
5464
5465 * src/truetype/ttgload.c (TT_Hint_Glyph): Remove code that shifts
5466 the glyph (component) by a fractional value computed from the LSB
5467 phantom point. This is wrong, since the horizontal phantom points
5468 get rounded horizontally later on.
5469
Werner Lembergdd8050a2013-12-08 23:14:46 +010054702013-12-08 Werner Lemberg <wl@gnu.org>
5471
5472 * Version 2.5.2 released.
5473 =========================
5474
5475
5476 Tag sources with `VER-2-5-2'.
5477
5478 * docs/VERSION.DLL: Update documentation and bump version number to
5479 2.5.2.
5480
5481 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
5482 builds/windows/vc2005/index.html,
5483 builds/windows/vc2008/freetype.vcproj,
5484 builds/windows/vc2008/index.html,
5485 builds/windows/vc2010/freetype.vcxproj,
5486 builds/windows/vc2010/index.html,
5487 builds/windows/visualc/freetype.dsp,
5488 builds/windows/visualc/freetype.vcproj,
5489 builds/windows/visualc/index.html,
5490 builds/windows/visualce/freetype.dsp,
5491 builds/windows/visualce/freetype.vcproj,
5492 builds/windows/visualce/index.html,
5493 builds/wince/vc2005-ce/freetype.vcproj,
5494 builds/wince/vc2005-ce/index.html,
5495 builds/wince/vc2008-ce/freetype.vcproj,
5496 builds/wince/vc2008-ce/index.html: s/2.5.1/2.5.2/, s/251/252/.
5497
Werner Lembergec8853c2014-03-06 19:13:45 +01005498 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
Werner Lembergdd8050a2013-12-08 23:14:46 +01005499
5500 * builds/unix/configure.raw (version_info): Set to 17:1:11.
Werner Lembergec8853c2014-03-06 19:13:45 +01005501 * CMakeLists.txt (VERSION_PATCH): Set to 2.
Werner Lembergdd8050a2013-12-08 23:14:46 +01005502 * docs/CHANGES: Updated.
5503
Werner Lemberg98d185c2013-12-07 09:26:55 +010055042013-12-07 Werner Lemberg <wl@gnu.org>
5505
5506 [truetype] Next round in phantom point handling.
5507
5508 Greg Hitchcock provided very interesting insights into the
5509 complicated history of the horizontal positions of the TSB and BSB
5510 phantom points.
5511
5512 * src/truetype/ttgload.c (TT_LOADER_SET_PP)
5513 [TT_CONFIG_OPTION_SUBPIXEL_HINTING]: Use `subpixel_hinting' and
5514 `grayscale_hinting' flags as conditionals for the x position of TSB
5515 and BSB.
5516
Werner Lembergfcdb7842013-12-05 15:53:27 +010055172013-12-05 Werner Lemberg <wl@gnu.org>
5518
5519 * builds/freetype.mk (FT_CC): Removed. Unused.
5520
Werner Lemberg64b395c2013-12-04 06:18:56 +010055212013-12-04 Werner Lemberg <wl@gnu.org>
5522
5523 [sfnt] Fix handling of embedded bitmap strikes.
5524
5525 This corrects the commit from 2013-11-21. Problem reported by
5526 Andrey Panov <panov@canopus.iacp.dvo.ru>.
5527
5528 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Fix logic to
5529 detect excessive bytes for bit-aligned bitmaps.
5530
Werner Lembergbdd5e752013-12-03 06:57:02 +010055312013-12-03 Werner Lemberg <wl@gnu.org>
5532
Werner Lembergc2b47532013-12-03 07:01:57 +01005533 [truetype] Remove dead code.
5534
5535 Reported by Nigel Tao <nigeltao@golang.org>.
5536
5537 * include/internal/tttypes.h (TT_LoaderRec): Remove unused
5538 `preserve_pps' field.
5539 * src/truetype/ttgload.c (TT_Hint_Glyph): Updated.
5540
55412013-12-03 Werner Lemberg <wl@gnu.org>
5542
Werner Lembergbdd5e752013-12-03 06:57:02 +01005543 [truetype] Fix phantom point handling.
5544
5545 This is a further improvement to the changes from 2013-11-06.
5546
5547 * src/truetype/ttgload.c (TT_Hint_Glyph): Horizontal phantom points
5548 are rounded horizontally, vertical ones are rounded vertically.
5549 (TT_LOADER_SET_PP): The horizontal position of vertical phantom
5550 points in pre-ClearType mode is zero, as shown in the OpenType
5551 specification.
5552
Werner Lemberg64872a52013-12-02 07:51:17 +010055532013-12-02 Werner Lemberg <wl@gnu.org>
5554
5555 [truetype] Fix change from 2013-11-20.
5556
5557 Problem reported by Akira Kakuto <kakuto@fuk.kindai.ac.jp>.
5558
5559 * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Protect call to
5560 `Update_Max' with both a TT_USE_BYTECODE_INTERPRETER guard and a
5561 `IS_HINTED' clause.
5562 Also remove redundant check using `maxSizeOfInstructions' – in
5563 simple glyphs, the bytecode data comes before the outline data, and
5564 a validity test for this is already present.
5565
Werner Lemberg52166ab2013-11-27 10:10:16 +010055662013-11-27 Werner Lemberg <wl@gnu.org>
5567
5568 [autofit] Fix use of dumping functions in `ftgrid' demo program.
5569
5570 * src/autofit/afhints.c (AF_DUMP) [FT_DEBUG_AUTOFIT]: New macro.
5571 (af_glyph_hints_dump_points, af_glyph_hints_dump_segments,
5572 af_glyph_hints_dump_edges) [FT_DEBUG_AUTOFIT]: Add parameter to
5573 handle output to stdout.
5574 Use AF_DUMP.
5575 (af_glyph_hints_dump_points, af_glyph_hints_dump_segments,
5576 af_glyph_hints_dump_edges) [!FT_DEBUG_AUTOFIT]: Removed.
5577
Werner Lemberg3aee4292013-11-25 00:28:11 +010055782013-11-25 Werner Lemberg <wl@gnu.org>
5579
5580 * Version 2.5.1 released.
5581 =========================
5582
5583
5584 Tag sources with `VER-2-5-1'.
5585
5586 * docs/VERSION.DLL: Update documentation and bump version number to
5587 2.5.1.
5588
5589 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
5590 builds/windows/vc2005/index.html,
5591 builds/windows/vc2008/freetype.vcproj,
5592 builds/windows/vc2008/index.html,
5593 builds/windows/vc2010/freetype.vcxproj,
5594 builds/windows/vc2010/index.html,
5595 builds/windows/visualc/freetype.dsp,
5596 builds/windows/visualc/freetype.vcproj,
5597 builds/windows/visualc/index.html,
5598 builds/windows/visualce/freetype.dsp,
5599 builds/windows/visualce/freetype.vcproj,
5600 builds/windows/visualce/index.html,
5601 builds/wince/vc2005-ce/freetype.vcproj,
5602 builds/wince/vc2005-ce/index.html,
5603 builds/wince/vc2008-ce/freetype.vcproj,
5604 builds/wince/vc2008-ce/index.html: s/2.5.0/2.5.1/, s/250/251/.
5605
5606 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
5607
5608 * builds/unix/configure.raw (version_info): Set to 17:0:11.
Werner Lembergec8853c2014-03-06 19:13:45 +01005609 * CMakeLists.txt (VERSION_PATCH): Set to 1.
Werner Lemberg3aee4292013-11-25 00:28:11 +01005610 * docs/CHANGES, docs/release: Updated.
5611
Werner Lemberg9326caf2013-11-23 23:59:25 +010056122013-11-23 Werner Lemberg <wl@gnu.org>
5613
Werner Lemberg063ee6b2013-11-24 00:19:17 +01005614 [truetype]: Add tricky font names `hkscsiic.ttf' and `iicore.ttf'.
5615
5616 * src/truetype/ttobjs.c (TRICK_NAMES_MAX_CHARACTERS,
5617 TRICK_NAMES_COUNT): Updated.
5618 (trick_names): Add family name for the two fonts.
5619
56202013-11-23 Werner Lemberg <wl@gnu.org>
5621
Werner Lemberg9326caf2013-11-23 23:59:25 +01005622 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Typo.
5623
Werner Lemberg427b1762013-11-21 13:10:56 +010056242013-11-21 Werner Lemberg <wl@gnu.org>
5625
Werner Lemberg9326caf2013-11-23 23:59:25 +01005626 [sfnt] Typo.
Werner Lemberg8af2a1c2013-11-21 13:13:12 +01005627
5628 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
5629
5630 * src/sfnt/sfobjs.c (sfnt_load_face): Return correct `bsize->width'
5631 value if the font lacks an `OS/2' table.
5632
56332013-11-21 Werner Lemberg <wl@gnu.org>
5634
Werner Lemberg64b395c2013-12-04 06:18:56 +01005635 [sfnt] Improve handling of buggy embedded bitmap strikes.
Werner Lemberg427b1762013-11-21 13:10:56 +01005636
5637 We are now able to successfully load `AppleMyoungJo.ttf'.
5638 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
5639
5640 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Don't trust glyph
5641 format.
5642
Werner Lemberg28626862013-11-20 21:06:18 +010056432013-11-20 Werner Lemberg <wl@gnu.org>
5644
5645 [truetype] Don't trust `maxp's `maxSizeOfInstructions'.
5646
5647 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>; see
5648
5649 http://lists.nongnu.org/archive/html/freetype-devel/2013-08/msg00005.html
5650
5651 for details.
5652
5653 * src/base/ftobjs.c (FT_Load_Glyph): Check size of `fpgm' and `prep'
5654 tables also for setting `autohint'.
5655
5656 * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Use code from
5657 `TT_Process_Composite_Glyph' for handling unreliable values of
5658 `maxSizeOfInstructions'.
5659
Werner Lembergbc25de62013-11-16 07:52:20 +010056602013-11-16 Werner Lemberg <wl@gnu.org>
5661
5662 [sfnt] Fix `OS/2' table version 5 support.
5663
5664 We now follow the `official' announcement from Microsoft (on the
5665 OpenType mailing list, which unfortunately hasn't a public archive).
5666
5667 * include/freetype/tttables.h (TT_OS2):
5668 s/usLowerPointSize/usLowerOpticalPointSize/,
5669 s/usUpperPointSize/usUpperOpticalPointSize/.
5670
5671 * src/sfnt/ttload.c (tt_face_load_os2): Update, and set correct
5672 default values.
5673
Werner Lembergfae38202013-11-13 08:55:46 +010056742013-11-13 Werner Lemberg <wl@gnu.org>
5675
Werner Lembergc52b1292013-11-13 10:06:00 +01005676 * builds/unix/ft2unix.h: Remove. No longer necessary.
5677
5678 * builds/unix/install.mk (install): Updated.
5679
56802013-11-13 Werner Lemberg <wl@gnu.org>
5681
Werner Lembergfae38202013-11-13 08:55:46 +01005682 Simplify header file hierarchy.
5683
5684 This large patch changes the header file directory layout from
5685 `include/freetype/...' to `include/...', effectively removing one
5686 level. Since the file `ft2build.h' is also located in `include'
5687 (and it stays there even after installation), all FreeType header
5688 files are now in a single directory.
5689
5690 Applications that use (a) `freetype-config' or FreeType's
5691 `pkg-config' file to get the include directory for the compiler, and
5692 (b) the documented way for header inclusion like
5693
5694 #include <ft2build.h>
5695 #include FT_FREETYPE_H
5696 ...
5697
5698 don't need any change to the source code.
5699
5700 * include/freetype/*: Move up to...
5701 * include/*: ... this directory.
5702
5703 * builds/amiga/include/freetype/*: Move up to...
5704 * builds/amiga/include/*: ... this directory.
5705
5706 */*: Essentially do `s@/freetype/@/@' where appropriate.
5707
5708 * CMakeList.txt: Simplify.
5709 * builds/unix/freetype-config.in, builds/unix/freetype2.in: For
5710 `--cflags', return a single directory.
5711 * builds/unix/install.mk (install): No longer try to remove `cache'
5712 and `internal' subdirectories; instead, remove the `freetype'
5713 subdirectory.
5714
Werner Lembergea5c7812013-11-12 08:55:26 +010057152013-11-12 Werner Lemberg <wl@gnu.org>
5716
5717 [truetype] Fix last `truetype' commit.
5718
5719 * src/truetype/ttgload.c (tt_get_metrics): Preserve stream position.
5720 Return error value.
5721 (load_truetype_glyph): Updated.
5722
Werner Lemberg78333282013-11-10 06:26:52 +010057232013-11-10 Werner Lemberg <wl@gnu.org>
5724
5725 * docs/CMAKE: New dummy file.
5726
Dave Arnolddd213012013-11-08 10:52:51 +010057272013-11-08 Dave Arnold <darnold@adobe.com>
5728
5729 [cff] Fix for hints that touch.
5730
5731 * src/cff/cf2hints.c (cf2_hintmap_insertHint): Fix condition for
5732 finding index value of insertion point.
5733
Werner Lemberg7e4b0fb2013-11-06 07:14:49 +010057342013-11-06 Werner Lemberg <wl@gnu.org>
5735
Werner Lemberg5e225b72013-11-06 08:41:59 +01005736 [truetype] Fix handling of phantom points in composite glyphs.
5737 Problem reported by Nigel Tao <nigeltao@golang.org>.
5738
5739 This is a follow-up commit to the previous one.
5740
5741 * src/truetype/ttgload.c (load_truetype_glyph): Call
5742 `tt_get_metrics' after loading the glyph header.
5743
57442013-11-06 Werner Lemberg <wl@gnu.org>
5745
Werner Lemberg7e4b0fb2013-11-06 07:14:49 +01005746 [truetype] Improve emulation of vertical metrics.
5747
5748 This commit also improves the start values of vertical phantom
5749 points. Kudos to Greg Hitchcock for help.
5750
5751 * src/truetype/ttgload.c (TT_Get_VMetrics): Add parameter to pass
5752 `yMax' value. Replace code with fixed Microsoft definition.
5753 (tt_get_metrics): Updated.
5754 (TT_LOADER_SET_PP): Add explanation how to initialize phantom
5755 points, taken from both the OpenType specification and private
5756 communication with Greg (which will eventually be added to the
5757 standard).
5758 Fix horizontal position of `pp3' and `pp4'.
5759
5760 * src/truetype/ttgload.h: Updated.
5761
5762 * src/truetype/ttdriver.c (tt_get_advances): Updated.
5763
5764 * docs/CHANGES: Updated.
5765
Werner Lembergc6064282013-11-05 13:29:15 +010057662013-11-05 Werner Lemberg <wl@gnu.org>
5767
Werner Lemberg50740532013-11-05 23:19:18 +01005768 * builds/windows/vc2010/freetype.vcxproj: s/v110/v100/.
5769 PlatformToolSet version 110 is for VC2012.
5770
5771 Problem reported (with solution) by Dave Arnold <darnold@adobe.com>.
5772
57732013-11-05 Werner Lemberg <wl@gnu.org>
5774
Werner Lembergc6064282013-11-05 13:29:15 +01005775 [truetype] Correctly reset point tags for glyph components.
5776 Problem reported by Nigel Tao <nigeltao@golang.org>.
5777
5778 * src/truetype/ttgload.c (TT_Process_Composite_Glyph): Fix loop.
5779
Werner Lemberg35b08182013-11-02 08:28:41 +010057802013-11-02 Werner Lemberg <wl@gnu.org>
5781
Werner Lemberg7d449432013-11-02 11:36:37 +01005782 [truetype] Fix GETINFO opcode handling of subpixel hinting bits.
5783
5784 * src/truetype/ttinterp.c (Ins_GETINFO): Don't request bit 6 set to
5785 get info on subpixel hinting.
5786
5787 * docs/CHANGES: Updated.
5788
57892013-11-02 Werner Lemberg <wl@gnu.org>
5790
Werner Lemberg35b08182013-11-02 08:28:41 +01005791 Fix Savannah bug #40451.
5792
5793 Simply apply the patch from the bug report.
5794
5795 * builds/unix/ftconfig.in, builds/vms/ftconfig.h,
5796 include/freetype/config/ftconfig.h: The used #pragma directives only
5797 work with gcc versions 4.6 and higher.
5798
Werner Lembergebf52d62013-11-01 13:26:28 +010057992013-11-01 Werner Lemberg <wl@gnu.org>
5800
Werner Lembergafa0d592013-11-01 22:27:27 +01005801 * docs/CHANGES: Updated.
5802
58032013-11-01 Werner Lemberg <wl@gnu.org>
5804
Werner Lembergebf52d62013-11-01 13:26:28 +01005805 [truetype] Minor code refactoring.
5806
5807 Two benefits: The allocated FDEF (and IDEF) array gets slightly
5808 smaller, and the `ttdebug' demo program has access to function
5809 numbers without additional costs.
5810
5811 Fortunately, no changes to FontForge are necessary – this is the
5812 only external TrueType debugger I know of, but others may exist and
5813 should check the code accordingly.
5814
5815 * src/truetype/ttinterp.h (TT_CallRec): Replace `Cur_Restart' and
5816 `Cur_End' with a pointer to the corresponding `TT_DefRecord'
5817 structure.
5818
5819 * src/truetype/ttinterp.c (DO_JROT, DO_JMPR, DO_JROF, Ins_ENDF,
5820 Ins_CALL, Ins_LOOPCALL, Ins_UNKNOWN, TT_RunIns <Invalid_Opcode>):
5821 Updated.
5822
Werner Lembergee510512013-10-27 07:25:35 +010058232013-10-27 Werner Lemberg <wl@gnu.org>
5824
5825 [sfnt] Implement support for `OS/2' table version 5.
5826
5827 See
5828
5829 http://typedrawers.com/discussion/470/new-microsoft-size-specific-design-selection-mechanism
5830
5831 for the announcement.
5832
5833 * include/freetype/tttables.h (TT_OS2): Add fields
5834 `usLowerPointSize' and `usUpperPointSize'. Since FreeType returns
5835 this structure only as a pointer through `FT_Get_Sfnt_Table', there
5836 shouldn't be any ABI problems.
5837
5838 * src/sfnt/ttload.c (tt_face_load_os2): Implement it.
5839
5840 * docs/CHANGES: Updated.
5841
Werner Lemberg994a8592013-10-24 08:50:34 +020058422013-10-24 Werner Lemberg <wl@gnu.org>
5843
5844 * README.git, docs/CHANGES, docs/INSTALL: Updated.
5845
John Carya0e4a732013-10-24 08:49:08 +020058462013-10-24 John Cary <cary@txcorp.com>
5847
5848 Provide cmake support.
5849
5850 * CMakeLists.txt: New file.
5851
Kenneth Miller4d87ac82013-10-23 20:10:56 +020058522013-10-23 Kenneth Miller <kennethadammiller@yahoo.com>
5853 Werner Lemberg <wl@gnu.org>
5854
5855 Provide support for x64 builds in Visual C++ project files.
5856
5857 * src/builds/win32: Renamed to...
5858 * src/builds/windows: This.
5859
5860 * src/builds/windows/vc2010/*: Updated to handle x64 target.
5861
5862 * src/builds/windows/*.mk, docs/INSTALL.GNU: s/win32/windows/ where
5863 appropriate.
5864
Werner Lemberg604838d2013-10-22 01:10:10 +020058652013-10-22 Werner Lemberg <wl@gnu.org>
5866
5867 * src/base/md5.c, src/base/md5.h: Updated to recent version.
5868
5869 * src/base/ftobjs.c: Updated; `md5.c' no longer uses `free'.
5870
Werner Lembergdb9159c2013-10-22 10:27:50 +02005871 The canonical URL to get updates for this file is
5872
5873 http://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/popa3d/popa3d/md5/
5874
5875 as the author told me in private communication.
5876
Werner Lemberg34efe052013-10-19 21:14:40 +020058772013-10-19 Werner Lemberg <wl@gnu.org>
5878
Werner Lemberg75efc2d2013-10-19 21:46:03 +02005879 [autofit] s/SMALL_TOP/X_HEIGHT/.
5880
5881 * src/autofit/afblue.dat: Updated.
5882
5883 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
5884
5885 * src/autofit/aflatin.c, src/autofit/aflatin.h,
5886 src/autofit/atlatin2.c: Updated.
5887
58882013-10-19 Werner Lemberg <wl@gnu.org>
5889
Werner Lemberg34efe052013-10-19 21:14:40 +02005890 * src/autofit/afblue.dat: s/MINOR/DESCENDER/.
5891
5892 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
5893
Werner Lemberg955f6a82013-10-16 19:47:57 +020058942013-10-16 Werner Lemberg <wl@gnu.org>
5895
Werner Lemberga5f22a92013-10-17 11:08:25 +02005896 [autofit] Add description strings to script entries.
5897
5898 Currently, this is unused.
5899
5900 * src/autofit/afscript.h: Do it.
5901 * src/autofit/afglobal.c, src/autofit/afpic.c,
5902 src/autofit/aftypes.h: Updated.
5903
59042013-10-16 Werner Lemberg <wl@gnu.org>
5905
Werner Lemberg955f6a82013-10-16 19:47:57 +02005906 [autofit] Improve tracing message for extra light flag.
5907
5908 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Do it.
5909
Chongyu Zhu41632b52013-10-15 11:40:34 +020059102013-10-15 Chongyu Zhu <lembacon@gmail.com>
5911
5912 [arm] Fix thumb2 inline assembly under LLVM.
5913
5914 When using `ADD' with an immediate operand, the instruction is
5915 actually `ADD Rd, Rn, #<imm12>', that is, the maximum of the
5916 immediate operand cannot exceed 4095. It will fail to compile with
5917 LLVM.
5918
5919 However, in GCC, due to some legacy compatibility considerations,
5920 `ADD.W' will be automatically emitted when the immediate operand is
5921 larger than 4095.
5922
5923 * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h
5924 (FT_MulFix_arm) [__GNUC__]: Support clang compiler.
5925
5926 * src/truetype/ttinterp.c (TT_MulFix14_arm) [__GNUC__]: Ditto.
5927
Werner Lembergb6695242013-10-12 10:33:04 +020059282013-10-12 Werner Lemberg <wl@gnu.org>
5929
5930 [autofit] Improve tracing of `latin' hinter.
5931
5932 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Report blue
5933 zone types.
5934 (af_latin_metrics_scale_dim): Report scaling changes due to x height
5935 alignment.
5936 Report scaled stroke width and blue zone values.
5937
Dave Arnolde845a852013-10-03 23:04:29 +020059382013-10-03 Dave Arnold <darnold@adobe.com>
5939
5940 * src/cff/cf2font.c (cf2_computeDarkening): Avoid division by zero.
5941
Werner Lemberg2c56f2a2013-10-07 22:01:00 +02005942 Note that the old code avoided using a region of the piecewise
5943 linear function where the slope was zero. The recovery was to use a
5944 different section of the function, which produced a different,
5945 incorrect amount of darkening.
5946
Darrell Bellert01af71d2013-10-02 22:04:07 +020059472013-10-02 Darrell Bellert <darrell.bellert@hl.konicaminolta.us>
5948
5949 * src/sfnt/ttload.c (tt_face_load_pclt): Fix `pclt_fields'.
5950
Dave Arnold0b330452013-10-02 11:04:06 +020059512013-10-02 Dave Arnold <darnold@adobe.com>
5952
5953 * src/cff/cf2font.c (cf2_computeDarkening): Initialize darkenAmount.
5954
5955 This line was lost in commit 89ca1fd6 (from 2013-06-25). The effect
5956 is to use a previous darkening amount when producing an unhinted,
5957 unscaled outline. This can cause autohint samples in ftgrid and
5958 ftview to be based on darkened CFF outlines instead of unhinted,
5959 undarkened ones.
5960
Dave Arnold3a2cb0f2013-09-29 16:17:02 +020059612013-09-29 Dave Arnold <darnold@adobe.com>
5962
5963 Fix Savannah bug #39295.
5964
5965 The bug was caused by switching to the initial hintmap (the one in
5966 effect when `moveto' executes) just before drawing the final element
5967 in the charstring. This ensured that the path was closed (in both
5968 Character Space and Device Space). But if the final element was a
5969 curve and if the final hintmap was different enough from the initial
5970 one, then the curve was visibly distorted.
5971
5972 The first part of the fix is to draw the final curve using the final
5973 hintmap as specified by the charstring. This corrects the
5974 distortion but does not ensure closing in Device Space. It may
5975 require the rasterizer to automatically generate an extra closing
5976 line. Depending on the hintmap differences, this line could be from
5977 zero to a couple pixels in length.
5978
5979 The second part of the fix covers the case where the charstring
5980 subpath is closed with an explicit line. We now modify that line's
5981 end point to avoid the distortion.
5982
5983 Some glyphs in the bug report font (TexGyreHeros-Regular) that show
5984 the change are:
5985
5986 25ppem S (98)
5987 24ppem eight (52)
5988 25.5ppem p (85)
5989
5990 Curves at the *end* of a subpath are no longer distorted. However,
5991 some of these glyphs have bad hint substitutions in the middle of a
5992 subpath, and these are not affected.
5993
5994 The patch has been tested with a set of 106 fonts that shipped with
5995 Adobe Creative Suite 4, together with 756 Open Source CFF fonts from
5996 Google Fonts. There are 1.5 million glyphs, of which some 20k are
5997 changed with the fix. A sampling of a few hundred of these changes
5998 have been examined more closely, and the changes look good (or at
5999 least acceptable).
6000
6001 * src/cff/cf2hints.h (CF2_GlyphPathRec): New element `pathIsClosing'
6002 to indicate that we synthesize a closepath line.
6003
6004 * src/cff/cf2hints.c (cf2_glyphpath_init): Updated.
6005 (cf2_glyphpath_pushPrevElem): If closing, use first hint map (for
6006 `lineto' operator) and adjust hint zone.
6007 For synthesized closing lines, use end point in first hint zone.
6008 (cf2_glyphpath_lineTo): Take care of synthesized closing lines. In
6009 particular, shift the detection of zero-length lines from character
6010 space to device space.
6011 (cf2_glyphpath_closeOpenPath): Remove assertion.
6012 Updated.
6013
Werner Lembergb75a8b82013-09-25 09:46:36 +020060142013-09-25 Werner Lemberg <wl@gnu.org>
6015
6016 * src/autofit/aflatin.c (af_{grek,cyrl}_uniranges): Fix arrays.
6017
suzuki toshiyaac0f4452013-09-25 10:57:17 +090060182013-09-25 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6019
6020 [bdf, pcf] Refuse non-zero face_index.
Werner Lemberg964317e2013-09-25 09:22:40 +02006021
suzuki toshiyaac0f4452013-09-25 10:57:17 +09006022 Suggested by Akira Tagoh, see
6023
6024 http://lists.gnu.org/archive/html/freetype/2013-09/msg00030.html
6025
Werner Lemberg964317e2013-09-25 09:22:40 +02006026 * src/bdf/bdfdrivr.c (BDF_Face_Init): Return `Invalid_Argument'
6027 error if the font could be opened but non-zero `face_index' is
6028 given.
suzuki toshiyaac0f4452013-09-25 10:57:17 +09006029 * src/pcf/pcfdrivr.c (PCF_Face_Init): Ditto.
6030
6031 * src/type42/t42objs.c (T42_Face_Init): Remove unrequired FT_UNUSED
Werner Lemberg964317e2013-09-25 09:22:40 +02006032 macro for `face_index' because it is validated later.
suzuki toshiyaac0f4452013-09-25 10:57:17 +09006033
Werner Lemberg4de77872013-09-23 22:10:08 +020060342013-09-23 Werner Lemberg <wl@gnu.org>
6035
6036 Fix Savannah bug #40090.
6037
6038 * src/autofit/afcjk.c (af_cjk_metrics_scale): Revert commit
6039 306f8c5d (from 2013-08-25) affecting this function.
6040
Werner Lemberg5a4c5a52013-09-22 22:37:26 +020060412013-09-22 Werner Lemberg <wl@gnu.org>
6042
6043 [autofit] Disunify Cyrillic and Greek handling from Latin.
6044
6045 * src/autofit/afscript.h: Add Cyrillic and Greek.
6046
6047 * src/autofit/afblue.dat (AF_BLUE_STRINGSET_GREK,
6048 AF_BLUE_STRINGSET_CYRL): Add blue zones for Greek and Cyrillic.
6049 (AF_BLUE_STRINGSET_LATN): Fix typo.
6050 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
6051
6052 * src/autofit/aflatin.c (af_grek_uniranges, af_cyrl_uniranges): New
6053 arrays.
6054 (af_grek_script_class, af_cyrl_script_class): New scripts.
6055 * src/autofit/aflatin.h: Updated.
6056
Werner Lemberg2cca9662013-09-20 07:23:34 +020060572013-09-20 Werner Lemberg <wl@gnu.org>
6058
6059 * docs/CHANGES: Updated.
6060
Behdad Esfahbod31e726d2013-09-20 07:20:53 +020060612013-09-20 Behdad Esfahbod <behdad@behdad.org>
6062
6063 Fix vertical size of emboldened glyphs.
6064
6065 Cf. https://bugzilla.gnome.org/show_bug.cgi?id=686709
6066
6067 * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Adjust `horiBearingY'
6068 also.
6069
Alexei Podtelezhnikov52381c12013-09-11 23:25:56 -040060702013-09-11 Alexei Podtelezhnikov <apodtele@gmail.com>
6071
6072 * include/freetype/ftoutln.h: Correct FT_Outline_Get_Orientation
6073 algorithm description.
6074
Werner Lemberg3f542492013-09-11 23:08:31 +020060752013-09-11 Werner Lemberg <wl@gnu.org>
6076
6077 [autofit] Improve Hebrew rendering.
6078
6079 This change introduces a new blue zone property
6080 `AF_BLUE_PROPERTY_LATIN_LONG' to make the auto-hinter ignore short
6081 top segments.
6082
6083 * src/autofit/afblue.dat: Fix Hebrew blue strings.
6084 Use AF_BLUE_PROPERTY_LATIN_LONG for AF_BLUE_STRING_HEBREW_TOP.
6085
6086 * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_LONG): New macro.
6087
6088 * src/autofit/afblue.c, src/autofit/afblue.h: Updated.
6089
6090 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Handle
6091 `AF_LATIN_IS_LONG_BLUE'.
6092
6093 * src/autofit/aflatin.h (AF_LATIN_IS_LONG_BLUE): New macro.
6094
Werner Lemberg85a7fdf2013-08-29 21:03:05 +020060952013-08-28 Behdad Esfahbod <behdad@google.com>
6096
6097 [sfnt] Fix frame access while reading WOFF table directory.
6098
6099 * src/sfnt/sfobjs.c (woff_open_font): Using single memory frame
6100 while reading the directory entries for the whole loop.
6101
61022013-08-29 Werner Lemberg <wl@gnu.org>
Werner Lembergd689d1c2013-08-29 17:53:40 +02006103 Behdad Esfahbod <behdad@google.com>
6104
6105 Implement support for WOFF containers.
6106
6107 We simply synthesize a SFNT from the WOFF, create a memory stream
6108 for the new data, and load the SFNT as usual.
6109
6110 Does NOT add any API to access WOFF metadata or private blocks.
6111
6112 * include/freetype/internal/tttypes.h (WOFF_HeaderRec,
6113 WOFF_TableRec): New structures.
6114
6115 * include/freetype/tttags.h (TTAG_wOFF): New macro.
6116
6117 * src/base/ftobjs.c (FT_Open_Face): Set `stream' after calling
6118 `open_face'.
6119
6120 * src/sfnt/sfobjs.c [FT_CONFIG_OPTION_SYSTEM_ZLIB]: Include
6121 `FT_GZIP_H'.
6122 (WRITE_BYTE, WRITE_USHORT, WRITE_ULONG): New temporary macros for
6123 writing to a stream.
6124 (sfnt_stream_close, compare_offsets, woff_open_font): New functions.
6125 (sfnt_open_font): Handle `TTAG_wOFF'.
6126 (sfnt_init_face): Set `stream' after calling `sfnt_open_font'.
6127
6128 * src/truetype/ttobjs.c (tt_face_init): Set `stream' after calling
6129 `sfnt->init_face'.
6130
6131 * src/base/ftobjs.c (open_face): Use a pointer to FT_Stream as an
6132 argument so that a changed stream survives.
6133 Update callers.
6134
61352013-08-28 Werner Lemberg <wl@gnu.org>
Werner Lemberge0f39ae2013-08-28 17:34:01 +02006136
Werner Lembergdc240522013-08-29 17:53:24 +02006137 [gzip] New function `FT_Gzip_Uncompress'.
6138
6139 This is modeled after zlib's `uncompress' function. We need this
6140 for WOFF support.
6141
6142 * include/freetype/ftgzip.h, src/gzip/ftgzip.c (FT_Gzip_Uncompress):
6143 New function.
6144
6145 * src/gzip/rules.mk: Rewrite to better reflect dependencies.
6146
61472013-08-28 Werner Lemberg <wl@gnu.org>
6148
Werner Lemberg5195ecd2013-08-28 17:41:21 +02006149 [autofit] Fix `make multi' compilation.
6150
6151 * src/autofit/afblue.cin, src/autofit/afblue.c: Don't include
6152 `afblue.h' but `aftypes.h'.
6153 * src/autofit/afcjk.c: Don't include `aftypes.h' but `afglobal.h'.
6154
61552013-08-28 Werner Lemberg <wl@gnu.org>
6156
Werner Lemberge0f39ae2013-08-28 17:34:01 +02006157 [autofit] Fix C++ compilation.
6158
6159 * src/autofit/afglobal.c (af_face_globals_get_metrics),
6160 src/autofit/afdummy.c (af_dflt_script_class), src/autofit/afindic.c
6161 (af_deva_script_class): Use proper casts.
6162
Behdad Esfahbodbd3849e2013-08-27 21:43:38 +020061632013-08-27 Behdad Esfahbod <behdad@google.com>
6164
Behdad Esfahbodc799dd62013-08-27 21:46:03 +02006165 * src/sfnt/ttload.c (tt_face_load_font_dir): Fix sign typos.
6166
61672013-08-27 Behdad Esfahbod <behdad@google.com>
6168
Behdad Esfahbodbd3849e2013-08-27 21:43:38 +02006169 FT_Open_Face: Improve external stream handling.
6170
6171 If the font's `clazz->init_face' function wants to swap to new
6172 stream, handling of whether original stream was external could
6173 result to either memory leak or double free. Mark externality into
6174 face flags before calling `init_face' such that the clazz can handle
6175 external streams properly.
6176
6177 * src/base/ftobjs.c (FT_Open_Face): Move code to set
6178 FT_FACE_FLAG_EXTERNAL_STREAM to...
6179 (open_face): This function.
6180
Werner Lemberg5e53db22013-08-27 18:37:39 +020061812013-08-27 Werner Lemberg <wl@gnu.org>
6182
Werner Lembergbcd8c0b2013-08-27 21:36:03 +02006183 Remove `FT_SqrtFixed' function.
6184
6185 It's no longer used.
6186
6187 * include/freetype/internal/ftcalc.h, src/base/ftcalc.c: Do it.
6188
61892013-08-27 Werner Lemberg <wl@gnu.org>
6190
Werner Lemberg5e53db22013-08-27 18:37:39 +02006191 [autofit] While tracing, report script names instead of ID values.
6192
6193 * src/autofit/afglobal.c (af_script_names) [FT_DEBUG_LEVEL_TRACE]:
6194 New array.
6195 * src/autofit/afglobal.h: Updated.
6196
6197 * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
6198 af_cjk_hint_edges): Use `af_script_names'.
6199 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
6200 af_latin_hint_edges): Ditto.
6201
Werner Lemberg92f5a042013-08-26 09:22:27 +020062022013-08-26 Werner Lemberg <wl@gnu.org>
6203
Werner Lemberg278f64b2013-08-26 20:20:03 +02006204 [autofit] Report used script while hinting a glyph.
6205
6206 * src/autofit/afcjk.c (af_cjk_hint_edges), src/autofit/aflatin.c
6207 (af_latin_hint_edges): Implement it.
6208
62092013-08-26 Werner Lemberg <wl@gnu.org>
6210
Werner Lemberg371f5c32013-08-26 20:11:24 +02006211 [autofit] Add support for Hebrew script.
6212
6213 * src/autofit/afblue.dat: Add blue strings for Hebrew.
6214 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
6215
6216 * src/autofit/aflatin.c (af_hebr_uniranges): New array.
6217 (af_hebr_script_class): New script.
6218 * src/autofit/aflatin.h, src/autofit/afscript.h: Updated.
6219
62202013-08-26 Werner Lemberg <wl@gnu.org>
6221
Werner Lemberg098121d2013-08-26 18:54:05 +02006222 [autofit] Improve tracing messages.
6223
6224 * src/autofit/afcjk.c (af_cjk_metrics_init_widths): Mention script
6225 ID in tracing message.
6226 (af_cjk_metrics_init_blues): Initialize `axis' outside of the inner
6227 loop.
6228 Improve tracing messages.
6229 (af_cjk_hint_edges) [FT_DEBUG_LEVEL_TRACE]: New variable
6230 `num_actions' to count hinting actions.
6231 Improve tracing messages.
6232
6233 * src/autofit/aflatin.c (af_latin_metrics_init_widths): Mention
6234 script ID in tracing message.
6235 (af_latin_metrics_init_blues, af_latin_hint_edges): Improve tracing
6236 messages.
6237
62382013-08-26 Werner Lemberg <wl@gnu.org>
6239
Werner Lembergffee64a2013-08-26 12:55:48 +02006240 Better tracing of loaded glyphs.
6241
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02006242 Previously, the loading of a glyph was traced at level 4, if at all.
Werner Lembergffee64a2013-08-26 12:55:48 +02006243 With this change, all font loading routines emit a tracing message
6244 at level 1, making it easier to select tracing output (for example
6245 using F2_DEBUG="any:1 afhints:7 aflatin:7").
6246
6247 * src/bdf/bdfdrivr.c (BDF_Glyph_Load): Add tracing message.
6248 * src/cff/cffdrivr.c (cff_glyph_load): Ditto.
6249 * src/cff/cffgload.c (cff_decoder_prepare): Improve tracing
6250 messages.
6251 * src/cid/cidgload.c (cid_load_glyph): Use level 1 for tracing
6252 message.
6253 * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Ditto.
6254 * src/pfr/pfrobjs.c (pfr_slot_load): Add tracing message.
6255 * src/truetype/ttgload.c (TT_Load_Glyph): Ditto.
6256 * src/type1/t1gload.c (T1_Load_Glyph): Ditto.
6257 * src/type42/t42objs.c (T42_GlyphSlot_Load): Ditto.
6258 * src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto.
6259
62602013-08-26 Werner Lemberg <wl@gnu.org>
6261
Werner Lemberg33655a92013-08-26 09:58:50 +02006262 [autofit] Fix script selection.
6263
6264 * src/autofit/afglobal.c (af_face_globals_get_metrics): Use
6265 `AF_SCRIPT_DFLT', not value 0.
6266 Simplify code.
6267
6268 * src/autofit/afscript.h: Sort by script name.
6269
62702013-08-26 Werner Lemberg <wl@gnu.org>
6271
Werner Lemberg92f5a042013-08-26 09:22:27 +02006272 [autofit] Make `dummy' hinter work as expected.
6273
6274 * src/autofit/afdummy.c (af_dummy_hints_init): Properly set scaling
6275 information.
6276 (af_dummy_hints_apply): Scale the glyphs.
6277
Werner Lemberg8b8be782013-08-25 08:01:41 +020062782013-08-25 Werner Lemberg <wl@gnu.org>
6279
Werner Lembergc1eb4452013-08-25 19:47:26 +02006280 [autofit] Make `cjk' module use blue stringsets.
6281
6282 * src/autofit/afcjk.c (AF_CJK_MAX_TEST_CHARACTERS): Removed.
6283 (af_cjk_hani_blue_chars): Removed.
6284 (AF_CJK_BLUE_TYPE_*): Removed.
6285 (af_cjk_metrics_init_blues): Replace AF_CJK_MAX_TEST_CHARACTERS with
6286 AF_BLUE_STRING_MAX_LEN.
6287 Change loops to use offsets (in file `afblue.h') into the new arrays
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02006288 `af_blue_stringsets' and `af_blue_strings' (in file `afblue.c').
Werner Lembergc1eb4452013-08-25 19:47:26 +02006289 Instead of three dimensions (as used in the old blue string array)
6290 we now use properties to do the same, saving one loop nesting level.
6291
6292 * src/autofit/afcjk.h: Remove old enumeration values superseded by
6293 the new data in `afblue.h'.
6294 (AF_CJK_IS_TOP_BLUE, AF_CJK_IS_HORIZ_BLUE, AF_CJK_IS_FILLED_BLUE,
6295 AF_CJK_IS_RIGHT_BLUE): New macros, to be used in
6296 `af_cjk_metrics_init_blues'.
6297 (AF_CJK_BLUE_IS_RIGHT): Remove this now redundant enum value.
6298 (AF_CJK_BLUE_IS_TOP): Renamed to...
6299 (AF_CJK_BLUE_TOP): This.
6300 (AF_CJK_MAX_BLUES): Remove.
6301 (AF_CJKAxisRec): Updated.
6302
63032013-08-25 Werner Lemberg <wl@gnu.org>
6304
Werner Lemberg5c4a23a2013-08-25 19:29:07 +02006305 [autofit] Typo.
6306
6307 * src/autofit/afblue.hin, src/autofit/afblue.c (GET_UTF8_CHAR): Use
6308 cast.
6309
63102013-08-25 Werner Lemberg <wl@gnu.org>
6311
Werner Lemberg306f8c52013-08-25 13:07:08 +02006312 [autofit] Synchronize `cjk' with `latin' module (and vice versa).
6313
6314 * src/autofit/afcjk.c (af_cjk_metrics_init_widths): Add tracing
6315 messages.
6316 (af_cjk_metrics_init_blues): Don't pass blue string array as
6317 argument but use the global array directly.
6318 Use `outline' directly.
6319 Update and add tracing messages.
6320 (af_cjk_metrics_init): Simplify code.
6321 (af_cjk_metrics_scale_dim): Improve tracing message.
6322 (af_cjk_metrics_scale): Synchronize.
6323
6324 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
6325 af_latin_metrics_init_blues): Improve and add tracing messages.
6326
63272013-08-25 Werner Lemberg <wl@gnu.org>
6328
Werner Lemberg0975d682013-08-25 08:37:47 +02006329 [autofit] Make `latin' module use blue stringsets.
6330
6331 * src/autofit/aflatin.c (AF_LATIN_MAX_TEST_CHARACTERS): Removed.
6332 (af_latin_blue_chars): Removed.
6333 (af_latin_metrics_init_blues): Replace AF_LATIN_MAX_TEST_CHARACTERS
6334 with AF_BLUE_STRING_MAX_LEN.
6335 Change loops to use offsets (in file `afblue.h') into the new arrays
6336 `af_blue_stringsets' and `af_blue_strings' (in file `afblue.c').
6337 Use `AF_LATIN_IS_SMALL_TOP_BLUE' macro.
6338
6339 * src/autofit/aflatin.h: Remove old enumeration values superseded by
6340 the new data in `afblue.h'.
6341 (AF_LATIN_IS_TOP_BLUE): Updated definition.
6342 (AF_LATIN_IS_SMALL_TOP_BLUE): New macro.
6343 (AF_LATIN_MAX_BLUES): Remove.
6344 (AF_LatinAxisRec): Updated.
6345
63462013-08-25 Werner Lemberg <wl@gnu.org>
6347
Werner Lembergdb3e5b92013-08-25 08:23:22 +02006348 [autofit] Add blue stringsets.
6349
6350 * src/autofit/aftypes.h: Include `afblue.h'.
6351 (AF_ScriptClassRec): Add `blue_stringset' field.
6352 (AF_DEFINE_SCRIPT_CLASS): Updated.
6353
6354 * src/autofit/autofit.c: Include `afblue.c'.
6355
6356 * src/autofit/afcjk.c (af_hani_script_class), src/autofit/afdummy.c
6357 (af_dflt_script_class), src/autofit/afindic.c
6358 (af_deva_script_class), src/autofit/aflatin.c
6359 (af_latn_script_class), src/autofit/aflatin2.c
6360 (af_ltn2_script_class): Updated.
6361
6362 * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `afblue.c'.
6363
63642013-08-25 Werner Lemberg <wl@gnu.org>
6365
Werner Lemberg8b8be782013-08-25 08:01:41 +02006366 [autofit] Introduce data file for blue strings.
6367
6368 The idea is to have a central file which gets processed by a Perl
6369 script to create proper `.c' and `.h' files using templates. There
6370 are two other reasons to do that:
6371
6372 . The data file should be easily readable. We use UTF-8 encoding
6373 which then gets converted to single bytes.
6374
6375 . Since the number of supported scripts will increase soon, the
6376 current usage of blue string arrays is a waste of space. Using
6377 the Perl script it is possible to imitate jagged arrays,
6378 defining enumeration constants as offsets into the arrays.
6379
6380 This commit only adds files without changing any functionality.
6381
6382 * src/autofit/afblue.dat: New data file.
6383 * src/tools/afblue.pl: New Perl script for processing `afblue.dat'.
6384
6385 * src/autofit/afblue.cin, src/autofit/afblue.hin: New template files
6386 for...
6387 * src/autofit/afblue.c, src/autofit/afblue.c: New source files.
6388 To avoid a dependency on Perl, we add them too.
6389
Alexei Podtelezhnikovfc32e1c2013-08-19 22:57:05 -040063902013-08-19 Alexei Podtelezhnikov <apodtele@gmail.com>
6391
Werner Lemberg71c0ad62013-08-27 21:30:09 +02006392 [base] Enable new algorithm for `BBox_Cubic_Check'.
Alexei Podtelezhnikovfc32e1c2013-08-19 22:57:05 -04006393
Werner Lemberg71c0ad62013-08-27 21:30:09 +02006394 * src/base/ftbbox.c: Enable new BBox_Cubic_Check algorithm, remove
6395 the old one.
6396 Improve comments.
Alexei Podtelezhnikovfc32e1c2013-08-19 22:57:05 -04006397
Werner Lemberg6bfa2632013-08-18 18:34:05 +020063982013-08-18 Werner Lemberg <wl@gnu.org>
6399
Werner Lemberg4af44442013-08-18 18:46:30 +02006400 * builds/unix/unix-def.in (freetype2.pc): Don't set executable bit.
6401
64022013-08-18 Werner Lemberg <wl@gnu.org>
6403
Werner Lemberg6bfa2632013-08-18 18:34:05 +02006404 Fix Savannah bug #39804.
6405
6406 * builds/unix/configure.raw (LIBPNG): Define and export.
6407 * builds/unix/freetype-config.in, builds/unix/freetype2.in: Handle
6408 libpng.
6409
Alexei Podtelezhnikov32a7d872013-08-17 22:19:21 -040064102013-08-17 Alexei Podtelezhnikov <apodtele@gmail.com>
6411
6412 [base] Clean up BBox_Conic_Check.
6413
6414 * src/base/ftbbox.c (BBox_Conic_Check): Remove redundant checks for
6415 extremum at the segment ends, which are already within the bbox.
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02006416 Slightly modify calculations.
Alexei Podtelezhnikov32a7d872013-08-17 22:19:21 -04006417
Alexei Podtelezhnikov1a9c3d12013-08-15 22:51:42 -040064182013-08-15 Alexei Podtelezhnikov <apodtele@gmail.com>
6419
6420 [base] Finish experimental (disabled) BBox_Cubic_Check implementation.
6421
6422 * src/base/ftbbox.c (BBox_Cubic_Check): Scale arguments to improve
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02006423 accuracy and avoid overflows.
Alexei Podtelezhnikov1a9c3d12013-08-15 22:51:42 -04006424
Alexei Podtelezhnikov61a65512013-08-13 22:28:57 -040064252013-08-13 Alexei Podtelezhnikov <apodtele@gmail.com>
6426
6427 [base] Refactor experimental (disabled) BBox_Cubic_Check.
6428
6429 * src/base/ftbbox.c (BBox_Cubic_Check): Implement the minimum search
Alexei Podtelezhnikov1a9c3d12013-08-15 22:51:42 -04006430 as the mirror image of the maximum search implemented here...
6431 (update_max): New function.
Alexei Podtelezhnikov61a65512013-08-13 22:28:57 -04006432
John Tytgat9bcfab82013-08-06 08:55:19 +020064332013-08-06 John Tytgat <John.Tytgat@esko.com>
6434
6435 Fix Savannah bug #39702.
6436
6437 * src/cff/cffload.c (cff_index_get_pointers): Check for `cur_offset
6438 != 0'; this stronger test is mandated by the CFF specification.
6439 Fix test for INDEX structures which have one or more empty entries
6440 at the end.
6441
Werner Lembergcc25e3a2013-08-05 08:46:15 +020064422013-08-05 Werner Lemberg <wl@gnu.org>
6443
Werner Lemberga32682f2013-08-06 00:21:46 +02006444 Fix gcc pragmas, part 2.
6445
6446 * src/truetype/ttinterp.c (TT_MulFix14_long_long,
6447 TT_DotFix14_long_long): `#pragma gcc diagnostic {push,pop}' has been
6448 introduced with gcc version 4.6.
6449
64502013-08-05 Werner Lemberg <wl@gnu.org>
6451
Werner Lemberg69e524d2013-08-05 23:38:32 +02006452 Fix gcc pragmas.
6453
6454 * src/truetype/ttinterp.c (TT_MulFix14_long_long,
6455 TT_DotFix14_long_long): Older gcc versions don't accept diagnostic
6456 pragmas within a function body.
6457
64582013-08-05 Werner Lemberg <wl@gnu.org>
6459
Werner Lemberg9e6de362013-08-05 16:37:21 +02006460 Fix Savannah bug #39700.
6461
6462 * builds/unix/ftconfig.h: Synchronize with
6463 `include/freetype/config/ftconfig.h'.
6464
6465 * builds/vms/ftconfig.h: Ditto.
6466 Make the differences to the master `ftconfig.h' file as small as
6467 possible for easier maintainance.
6468
64692013-08-05 Werner Lemberg <wl@gnu.org>
6470
Werner Lembergcc25e3a2013-08-05 08:46:15 +02006471 [autofit] Improve handling of `near' points.
6472
6473 Points which are very near to each other are now marked as such.
6474 The `weak' flag is then computed by using the `in' vector of the
6475 first and the `out' vector of the last point of a group of near
6476 points.
6477
6478 For example, this fixes the rendering of glyph `Oslash' in
6479 `Roboto-Thin.ttf'.
6480
6481 * src/autofit/afhints.h (AF_Flags): New value `AF_FLAGS_NEAR'.
6482
6483 * src/autofit/afhints.c (af_glyph_hints_reload): Introduce
6484 the heuristic value `near_limit' to decide whether the current point
6485 is near to the previous one, then set `AF_FLAG_NEAR' accordingly.
6486 Store good `in' vector (of last non-near point) in
6487 `last_good_in_{x,y}' and use it as an argument to
6488 `ft_corner_is_flat' if necessary.
6489
Werner Lemberg74a9b672013-08-02 14:53:32 +020064902013-08-02 Werner Lemberg <wl@gnu.org>
6491
Werner Lemberg0d28a7d2013-08-02 22:59:43 +02006492 * include/freetype/ftcffdrv.h: Improve documentation.
6493 This is based on blog entries from David Lemon and Dave Arnold (both
6494 from Adobe) with kind permission. Dave also helped in
6495 proof-reading.
6496
64972013-08-02 Werner Lemberg <wl@gnu.org>
6498
Werner Lemberg456cc442013-08-02 20:25:21 +02006499 [autofit] Move declaration of scripts into separate file.
6500
6501 This has the benefit that we don't need to duplicate the data at
6502 different places.
6503
6504 * src/autofit/afscript.h: New file.
6505
6506 * src/autofit/aftypes.h (AF_Script): Include `afscript.h' to define
6507 the enumeration values.
6508
6509 * src/autofit/afglobal.c: Include `afscript.h' to get the script
6510 specific header files.
6511 (af_script_classes): Include `afscript.h' to fill this array.
6512
6513 * src/autofit/afpic.c: Include `afscript.h' to get the script
6514 specific header files.
6515 (autofit_module_class_pic_init): Include `afscript.h' for
6516 initialization.
6517 * src/autofit/afpic.h (AF_SCRIPT_CLASSES_COUNT,
6518 AF_SCRIPT_CLASSES_REC_COUNT): Removed. Use `AF_SCRIPT_MAX' instead.
6519
6520 * src/autofit/rules.mk (AUTOF_DRV_H): Updated.
6521
65222013-08-02 Werner Lemberg <wl@gnu.org>
6523
Werner Lemberg773601d2013-08-02 19:51:17 +02006524 [autofit] Move declaration of writing systems into separate file.
6525
6526 This has the benefit that we don't need to duplicate the data at
6527 different places.
6528
6529 * src/autofit/afwrtsys.h: New file.
6530
6531 * src/autofit/aftypes.h (AF_WritingSystem): Include `afwrtsys.h' to
6532 define the enumeration values.
6533
6534 * src/autofit/afglobal.c: Include `afwrtsys.h' to get the writing
6535 system specific header files.
6536 Include `afpic.h'.
6537 (af_writing_system_classes): Include `afwrtsys.h' to fill this
6538 array.
6539
6540 * src/autofit/afpic.c: Include `afwrtsys.h' to get the writing
6541 system specific header files.
6542 (autofit_module_class_pic_init): Include `afwrtsys.h' for
6543 initialization.
6544 * src/autofit/afpic.h (AF_WRITING_SYSTEM_CLASSES_COUNT,
6545 AF_WRITING_SYSTEM_CLASSES_REC_COUNT): Removed. Use
6546 `AF_WRITING_SYSTEM_MAX' instead.
6547
65482013-08-02 Werner Lemberg <wl@gnu.org>
6549
Werner Lemberg74a9b672013-08-02 14:53:32 +02006550 [sfnt] Fix compilation with g++.
6551
6552 * src/sfnt/pngshim.c (error_callback, read_data_from_FT_stream): Use
6553 cast.
6554 (Load_SBit_Png): Pacify compiler.
6555
Werner Lemberg89a529f2013-08-02 14:50:23 +020065562013-08-02 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6557 Werner Lemberg <wl@gnu.org>
6558
6559 [autofit] Fix `make multi'.
6560
6561 * include/freetype/config/ftconfig.h (FT_LOCAL_ARRAY,
6562 FT_LOCAL_ARRAY_DEF): New macros.
6563
6564 * src/autofit/afglobal.c (af_writing_system_classes,
6565 af_script_classes): Use FT_LOCAL_ARRAY_DEF.
6566 * src/autofit/afglobal.h: Declare `af_writing_system_classes' and
6567 `af_script_classes'.
6568 * src/autofit/afloader.c: Include `afpic.h'.
6569
Werner Lemberge8ed2d62013-08-01 12:20:20 +020065702013-08-01 Werner Lemberg <wl@gnu.org>
6571
6572 Another round of cppcheck nitpicks.
6573
6574 The call was (from the top-level of the FreeType tree):
6575
6576 cppcheck --force \
6577 --enable=all \
6578 -I /usr/include \
6579 -I /usr/local/include \
6580 -I /usr/lib/gcc/i586-suse-linux/4.7/include \
6581 -I include \
6582 -I include/freetype \
6583 -I include/freetype/config \
6584 -I include/freetype/internal \
6585 -DFT2_BUILD_LIBRARY \
6586 . &> cppcheck.log
6587
6588 using cppcheck git commit f7e93f99.
6589
6590 Note that cppcheck still can't handle `#include FOO' (with `FOO' a
6591 macro).
6592
6593 */* Improve variable scopes.
6594 */* Remove redundant initializations which get overwritten.
6595
6596 * src/gxvalid/*: Comment out redundant code or guard it with
6597 FT_DEBUG_LEVEL_TRACE.
6598
Werner Lemberg5d6a3602013-07-30 23:17:04 +020065992013-07-30 Werner Lemberg <wl@gnu.org>
6600
Werner Lemberg72f5ff52013-07-31 22:49:29 +02006601 [autofit] Introduce `writing systems'.
6602
6603 This patch adds a new top level to the auto-hinter's script class
6604 hierarchy. It defines `writing systems' which can contain multiple
6605 scripts.
6606
6607 For example, the `latin' writing system (in file `aflatin.c') is
6608 able to support scripts like Latin, Cyrillic, Armenian, etc., which
6609 can be handled similarly.
6610
6611 Scripts are now named using four-letter OpenType tags.
6612
6613 * src/autofit/aftypes.h (AF_ScriptClassRec): Move relevant members
6614 to...
6615 (AF_WritingSystemClassRec): This new structure. It holds pointers
6616 to functions which can be shared among related scripts.
6617 (AF_WritingSystem): New enumeration.
6618 (AF_Script): Revised values using four-letter tags.
6619 (AF_DEFINE_WRITING_SYSTEM_CLASS): New macro.
6620 (AF_DEFINE_SCRIPT_CLASS): Updated.
6621
6622 * src/autofit/afglobal.c (af_writing_system_classes): New global,
6623 constant array.
6624 (af_script_classes): Updated.
6625 (af_face_globals_free): Updated.
6626 Remove assertion.
6627 (af_face_globals_get_metrics): Updated.
6628
6629 * src/autofit/afglobal.h (AF_SCRIPT_FALLBACK)
6630 [!AF_CONFIG_OPTION_CJK]: Handle this case.
6631
6632 * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph):
6633 Updated.
6634
6635 * src/autofit/afpic.c (autofit_module_class_pic_init): Updated;
6636 initialize structures for both writing systems and scripts.
6637 * src/autofit/afpic.h: Updated.
6638 (AF_WRITING_SYSTEM_CLASSES_GET): New macro.
6639
6640 * src/autofit/afcjk.c (af_cjk_writing_system_class): New writing
6641 system.
6642 (af_cjk_uniranges): Renamed to...
6643 (af_hani_uniranges): This.
6644 (af_cjk_script_class): Reduced and renamed to...
6645 (af_hani_script_class): This.
6646 * src/autofit/afcjk.h: Updated.
6647
6648 * src/autofit/afdummy.c (af_dummy_writing_system_class): New writing
6649 system.
6650 (af_dummy_script_class): Reduced and renamed to...
6651 (af_dflt_script_class): This.
6652 * src/autofit/afdummy.h: Updated.
6653
6654 * src/autofit/afindic.c (af_indic_writing_system_class): New writing
6655 system.
6656 (af_indic_uniranges): Renamed to...
6657 (af_deva_uniranges): This.
6658 (af_indic_script_class): Reduced and renamed to...
6659 (af_deva_script_class): This.
6660 * src/autofit/afcjk.h: Updated.
6661
6662 * src/autofit/aflatin.c (af_latin_writing_system_class): New writing
6663 system.
6664 (af_latin_uniranges): Renamed to...
6665 (af_latn_uniranges): This.
6666 (af_latin_script_class): Reduced and renamed to...
6667 (af_latn_script_class): This.
6668 * src/autofit/aflatin.h: Updated.
6669
6670 * src/autofit/aflatin2.c (af_latin2_writing_system_class): New
6671 writing system.
6672 (af_latin2_uniranges): Renamed to...
6673 (af_ltn2_uniranges): This.
6674 Synchronize ranges with `latin'.
6675 (af_latin2_script_class): Reduced and renamed to...
6676 (af_ltn2_script_class): This.
6677 * src/autofit/aflatin2.h: Updated.
6678
66792013-07-30 Werner Lemberg <wl@gnu.org>
6680
Werner Lemberg5d6a3602013-07-30 23:17:04 +02006681 [autofit] Variable renaming.
6682
6683 * src/autofit/aftypes.h (AF_ScriptMetricsRec):
6684 s/clazz/script_class/.
6685 Update all users.
6686
suzuki toshiya2b29ed62013-07-30 13:55:29 +090066872013-07-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6688
6689 Ignore libpng-config under cross-building configuration,
6690 because it will return the flags for the hosting environment.
6691
6692 * builds/unix/configure.raw: Ignore libpng-config when
6693 `cross_compiling' == yes.
6694
suzuki toshiyaf2e7f1e2013-07-30 13:32:57 +090066952013-07-30 Behdad Esfahbod <behdad@google.com>
6696
6697 Prevent division by zero by a transparent color.
6698
6699 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra):
6700 Return 0 immediately, when alpha channel is zero.
6701
Behdad Esfahbod21c32b02013-07-25 21:53:18 +020067022013-07-25 Behdad Esfahbod <behdad@google.com>
6703
6704 Add FT_FACE_FLAG_COLOR and FT_HAS_COLOR.
6705
6706 Also disambiguate Google's color bitmap tables.
6707
6708 * include/freetype/freetype.h (FT_FACE_FLAG_COLOR, FT_HAS_COLOR):
6709 New macros.
6710
6711 * include/freetype/internal/tttypes.h (TT_SbitTableType): Add
6712 TT_SBIT_TABLE_TYPE_CBLC.
6713
6714 * src/sfnt/sfobjs.c (sfnt_load_face): Handle FT_FACE_FLAG_COLOR.
6715
6716 * src/sfnt/ttsbit.c (tt_face_load_sbit,
6717 tt_face_load_strike_metrics, tt_face_load_sbit_image): Handle
6718 TT_SBIT_TABLE_TYPE_CBLC.
6719
suzuki toshiyab4725cb2013-07-24 14:25:39 +090067202013-07-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6721
6722 [sfnt] Fix for `make multi' target.
6723
6724 * src/sfnt/pngshim.c (Load_SBit_Png): Use FT_LOCAL_DEF().
6725
Werner Lemberg6a7df622013-07-20 10:48:37 +020067262013-07-20 Werner Lemberg <wl@gnu.org>
6727
6728 * docs/INSTALL.GNU: Updated.
6729
Behdad Esfahbodff269522013-07-20 08:02:39 +020067302013-07-20 Behdad Esfahbod <behdad@google.com>
6731
6732 [sfnt] Fix `sbix' table version handling.
6733
6734 * src/sfnt/ttsbit.c (tt_face_load_sbit) [TT_SBIT_TABLE_TYPE_SBIX]:
6735 USHORT version numbers are to be considered as `minor'.
6736
Werner Lemberg05c14212013-07-19 23:11:23 +020067372013-07-19 Werner Lemberg <wl@gnu.org>
6738
6739 [autofit] Fix segment classification for blue zones.
6740
6741 The old code (essentially unchanged since the very beginning)
6742 incorrectly handled this configuration
6743
6744 x -o- x
6745 / \
6746 / \
6747 / \
6748 o o
6749
6750 as flat and this
6751
6752 o o
6753 / /
6754 x| x|
6755 | |
6756 o---------------o
6757
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02006758 as round. (`o' and `x' are on and off points, respectively).
Werner Lemberg05c14212013-07-19 23:11:23 +02006759
6760 This is a major change which should improve the rendering results
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02006761 enormously for many TrueType fonts, especially in the range approx.
Werner Lemberg05c14212013-07-19 23:11:23 +02006762 20-40ppem, fixing the appearance of many overshoots.
6763
6764 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Look at the
6765 first and last points of the segment, not the points right before
6766 and after.
6767
67682013-07-19 Behdad Esfahbod <behdad@google.com>
Werner Lemberg01705392013-07-18 13:13:12 +02006769
Behdad Esfahbod778a7e62013-07-19 14:28:28 +02006770 [sfnt] `sbix' fix-ups.
6771
6772 * src/sfnt/sfobjs.c (sfnt_load_face): Apple's `sbix' color bitmaps
6773 are rendered scaled and then the `glyf' outline rendered on top. We
6774 don't support that yet, so just ignore the `glyf' outline and
6775 advertise it as a bitmap-only font.
6776
6777 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
6778 [TT_SBIT_TABLE_TYPE_SBIX]: Return metrics in 26.6 units.
6779 (tt_face_load_sbix_image): Typo.
6780
67812013-07-18 Behdad Esfahbod <behdad@google.com>
6782
Werner Lemberg01705392013-07-18 13:13:12 +02006783 [sfnt] Add support for Apple's `sbix' color bitmap table.
6784
6785 * include/freetype/internal/tttypes.h (TT_SBit_MetricsRec): Widen
6786 fields to FT_Short and FT_UShort, respectively.
6787 (TT_SBitTableType): New enumeration.
6788 (TT_FaceRec): Add `sbit_table_type' field.
6789
6790 * include/freetype/tttags.h (TTAG_sbix): New macro.
6791
6792 * src/sfnt/pngshim.c (Load_SBit_Png): Pass a more generic
6793 FT_GlyphSlot argument instead FT_Bitmap.
6794 Add flag to control map and metrics handling.
6795 Update all users.
6796
6797 * src/sfnt/ttsbit.c: Include `ttmtx.h'.
6798 (tt_face_load_eblc): Renamed to...
6799 (tt_face_load_sbit): This.
6800 Handlic `sbix' bitmaps.
6801 (tt_face_free_eblc): Renamed to...
6802 (tt_face_load_sbit): This.
6803 Updated.
6804 (tt_face_load_strike_metrics): Handle `sbix' bitmaps.
6805 (tt_face_load_sbix_image): New function.
6806 (tt_sbit_decoder_alloc_bitmap, tt_sbit_decoder_load_image,
6807 tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned,
6808 tt_sbit_decoder_load_compound, tt_sbit_decoder_load_png,
6809 tt_sbit_decoder_load_image, tt_sbit_decoder_load_bitmap): Don't pass
6810 and handle load flags.
6811 (tt_sbit_decoder_load_bitmap) [!FT_CONFIG_OPTION_USE_PNG]: Better
6812 handle formats 17-19.
6813 Move color to grayscale conversion to...
6814 (tt_face_load_sbit_image): Here.
6815 Handle `sbix' bitmaps.
6816
6817 * src/sfnt/pngshim.h: Updated.
6818 * src/sfnt/ttsbit.h: Updated.
6819 * src/sfnt/sfdriver.c: Updated.
6820
Werner Lemberg274207e2013-07-18 12:38:57 +020068212013-07-18 Werner Lemberg <wl@gnu.org>
6822
6823 [sfnt] Ignore invalid magic number in `head' or `bhed'.
6824
6825 Other font engines seem to ignore it also. Problem reported by
6826 Hin-Tak Leung <htl10@users.sourceforge.net>.
6827
6828 * src/sfnt/ttload.c (check_table_dir): Don't abort but warn only if
6829 we have an invalid magic number.
6830
Werner Lemberg9a7951d2013-07-16 15:25:24 +020068312013-07-16 Werner Lemberg <wl@gnu.org>
6832
6833 [smooth] Fix segfault caused by previous commit.
6834
6835 * src/smooth/ftgrays.c (gray_set_cell): Always compute
6836 `ras.invalid'.
6837
David Turnera5f33ee2013-07-16 12:40:03 +020068382013-07-16 David Turner <digit@google.com>
6839
David Turner89929ec2013-07-16 13:36:07 +02006840 [smooth] Improve performance.
6841
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02006842 Provide a work-around for an ARM-specific performance bug in GCC.
David Turner89929ec2013-07-16 13:36:07 +02006843 This speeds up the rasterizer by more than 5%.
6844
6845 Also slightly optimize `set_gray_cell' and `gray_record_cell' (which
6846 also improves performance on other platforms by a tiny bit (<1%).
6847
6848 * src/smooth/ftgrays.c (FT_DIV_MOD): New macro.
6849 Use it where appropriate.
6850
6851 (gray_record_cell, gray_set_cell, gray_move_to,
6852 gray_convert_glyph_inner): Streamline condition handling.
6853
68542013-07-16 David Turner <digit@google.com>
6855
David Turnerf66d48e2013-07-16 13:18:00 +02006856 [truetype] Add assembler code for TT_MulFix14 and TT_DotFix14.
6857
6858 This patch provides slightly optimized versions for ARM, x86, and
6859 x86_64 CPUs if built with GCC.
6860
6861 Also remove some dead code.
6862
6863 * src/truetype/ttinterp.c (TT_MulFix14_arm, TT_MulFix14_long_long,
6864 TT_DotFix14_long_long): New functions.
6865
68662013-07-16 David Turner <digit@google.com>
6867
David Turnerb2890882013-07-16 12:52:18 +02006868 Optimize FT_MulFix for x86_64 GCC builds.
6869
6870 This patch provides an optimized `FT_MulFix' implementation for
6871 x86_64 machines when FreeType is built with GCC, or compatible
6872 compilers like Clang.
6873
6874 Example:
6875 bin/ftbench -p -t 5 -s 14 -f 0008 Arial.ttf
6876
6877 Before:
6878
6879 Load 4.863 us/op
6880 Load_Advances (Normal) 4.816 us/op
6881 Load_Advances (Fast) 0.028 us/op
6882 Render 2.753 us/op
6883 Get_Glyph 0.463 us/op
6884 Get_CBox 0.077 us/op
6885 Get_Char_Index 0.023 us/op
6886 Iterate CMap 13.898 us/op
6887 New_Face 12.368 us/op
6888 Embolden 0.028 us/op
6889 Get_BBox 0.302 us/op
6890
6891 After:
6892
6893 Load 4.617 us/op
6894 Load_Advances (Normal) 4.645 us/op
6895 Load_Advances (Fast) 0.027 us/op
6896 Render 2.789 us/op
6897 Get_Glyph 0.460 us/op
6898 Get_CBox 0.077 us/op
6899 Get_Char_Index 0.024 us/op
6900 Iterate CMap 13.403 us/op
6901 New_Face 12.278 us/op
6902 Embolden 0.028 us/op
6903 Get_BBox 0.301 us/op
6904
6905 * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h
6906 (FT_MulFix_x86_64): New function.
6907
69082013-07-16 David Turner <digit@google.com>
6909
David Turnera5f33ee2013-07-16 12:40:03 +02006910 Speed up ARMv7 support.
6911
6912 When building for ARMv7 with thumb2 instructions, the optimized
6913 `FT_MulFix_arm' assembly routine was not being used.
6914
6915 The reason for this is in the `ftconfig.h' header, namely:
6916
6917 - The assembly routine uses the `smull' instruction which is not
6918 available when generating Thumb-1 machine code. It is available
6919 in Thumb-2 mode, though.
6920
6921 - The header was written a long time ago before Thumb-2 became
6922 widely popular (e.g. with Android). So it simply doesn't use the
6923 assembly routine if the `__thumb__' built-in macro is defined.
6924
6925 - When compiling in Thumb-2 mode, the compiler will define both
6926 `__thumb__' and `__thumb2__'.
6927
6928 By checking for `(__thumb2__ || !__thumb__)', we ensure that the
6929 assembly routine is only avoided when generating Thumb-1 code.
6930
6931 Given that this is performance-sensitive function, this improves
6932 `ftbench' as follows on a Galaxy Nexus:
6933
6934 Before (us/op) After (us/op)
6935
6936 - loading Arial.ttf glyphs at 14 ppem [1]
6937
6938 Load 34.285 33.098
6939
6940 - same operation with the light auto-hinter [2]
6941
6942 Load 31.317 29.590
6943
6944 - same operation without hinting [3]
6945
6946 Load 6.143 5.376
6947
6948 - loading Arial.ttf advances at 14 ppem [4]
6949
6950 Load_Advances (normal) 34.216 33.016
6951 Load_Advances (fast) 0.176 0.176
6952
6953 [1] ftbench -t 5 -p -s 14 -b a -f 0008 Arial.ttf
6954 [2] ftbench -t 5 -p -s 14 -b a -r 1 -f 0028 Arial.ttf
6955 [3] ftbench -t 5 -p -s 14 -b a -f 000a Arial.ttf
6956 [4] ftbench -t 5 -p -s 14 -b b -f 0008 Arial.ttf
6957
6958 * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h
6959 (FT_MULFIX_ASSEMBLER): Fix handling for ARMv7.
6960
Werner Lemberge12fc772013-06-28 07:57:32 +020069612013-06-28 Werner Lemberg <wl@gnu.org>
6962
6963 * docs/CHANGES: Updated.
6964
Werner Lemberg680c1d42013-06-27 17:21:59 +020069652013-06-27 Werner Lemberg <wl@gnu.org>
6966
6967 * src/winfonts/winfnt.c (FNT_Load_Glyph): Fix bitmap width guard.
6968
Werner Lembergc7cc9eb2013-06-25 07:24:02 +020069692013-06-25 Werner Lemberg <wl@gnu.org>
6970
Werner Lembergb8850fc2013-06-26 12:22:10 +02006971 [cff] Add darkening limit to `darkening-parameters'.
6972
6973 * src/cff/cffdrivr.c (cff_property_set): Add check.
6974
69752013-06-25 Werner Lemberg <wl@gnu.org>
6976
Werner Lemberg89ca1fd2013-06-25 23:28:02 +02006977 [cff] Add `darkening-parameters' property.
6978
6979 * include/freetype/ftcffdrv.h: Document it.
6980
6981 * src/cff/cffdrivr.c (cff_property_set, cff_property_get): Handle
6982 `darkening-parameters' property.
6983
6984 * src/cff/cf2font.h (CF2_FontRec): Add `darkenParams' array.
6985
6986 * src/cff/cf2font.c (cf2_computeDarkening): Add `darkenParams'
6987 argument and use it.
6988 Update all callers.
6989
6990 * src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Copy
6991 `darken_params' values.
6992
6993 * src/cff/cffobjs.h (CFF_DriverRec): Add `darken_params' array.
6994
6995 * src/cff/cffobjs.c (cff_driver_init): Set default values for
6996 `darken_params'.
6997
69982013-06-25 Werner Lemberg <wl@gnu.org>
6999
Werner Lembergfad93262013-06-25 10:41:37 +02007000 [docmaker] Code shuffling.
7001
7002 * src/tools/docmaker/tohtml.py (re_url): Move regexp...
7003 * src/tools/docmaker/sources.py: ... to this file.
7004
70052013-06-25 Werner Lemberg <wl@gnu.org>
7006
Werner Lemberg8bdc4072013-06-25 10:20:53 +02007007 [docmaker] Remove unused functions.
7008
7009 * src/tools/docmaker/content.py (DocMarkup.get_start,
7010 DocBlock.get_markup_name): Removed.
7011 * src/tools/docmaker/tohtml.py (html_quote0, dump_html_code,
7012 HtmlFormatter.make_html_words): Removed.
7013
70142013-06-25 Werner Lemberg <wl@gnu.org>
7015
Werner Lembergffb8b472013-06-25 09:09:30 +02007016 * builds/freetype.mk (dll): Remove target.
7017
7018 Problem reported by Jörg Günnewig <joerg.guennewig@googlemail.com>.
7019
70202013-06-25 Werner Lemberg <wl@gnu.org>
7021
Werner Lembergc7cc9eb2013-06-25 07:24:02 +02007022 [docmaker] Recognise URLs.
7023
7024 * src/tools/docmaker/tohtml.py (re_url): New regular expression.
7025 (make_html_para): Use it.
7026
Werner Lemberg25b7da52013-06-19 10:23:36 +020070272013-06-19 Werner Lemberg <wl@gnu.org>
7028
Werner Lembergfe4f5712013-06-19 23:27:47 +02007029 * Version 2.5.0.1 released.
7030 ===========================
7031
7032
7033 Tag sources with `VER-2-5-0-1'.
7034
7035 * include/freetype/config/ftoption.h: Undefine
7036 CFF_CONFIG_OPTION_OLD_ENGINE.
7037 * devel/ftoption.h: Define CFF_CONFIG_OPTION_OLD_ENGINE.
7038
70392013-06-19 Werner Lemberg <wl@gnu.org>
7040
Werner Lemberg609f0ca2013-06-19 14:41:47 +02007041 * builds/unix/install.mk (install): Don't create `cache' directory.
7042
7043 Found by Peter Breitenlohner <peb@mppmu.mpg.de>.
7044
70452013-06-19 Werner Lemberg <wl@gnu.org>
7046
Werner Lemberg25b7da52013-06-19 10:23:36 +02007047 * Version 2.5.0 released.
7048 =========================
7049
7050
7051 Tag sources with `VER-2-5-0'.
7052
7053 * docs/VERSION.DLL: Update documentation and bump version number to
7054 2.5.0.
7055
7056 * README, Jamfile (RefDoc),
7057 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
7058 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
7059 builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
7060 builds/win32/visualc/freetype.dsp,
7061 builds/win32/visualc/freetype.vcproj,
7062 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
7063 builds/win32/visualce/freetype.vcproj,
7064 builds/win32/visualce/index.html,
7065 builds/wince/vc2005-ce/freetype.vcproj,
7066 builds/wince/vc2005-ce/index.html,
7067 builds/wince/vc2008-ce/freetype.vcproj,
7068 builds/wince/vc2008-ce/index.html: s/2.4.12/2.5.0/, s/2412/250/.
7069
7070 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 5.
7071 (FREETYPE_PATCH): Set to 0.
7072
7073 * builds/unix/configure.raw (version_info): Set to 16:2:10.
7074
7075 * src/base/ftobjs.c (FT_Open_Face): Pacify compiler.
7076 * src/truetype/ttinterp.c (Ins_MSIRP, Ins_MIRP): Ditto.
7077
Werner Lembergf56691a2013-06-18 10:17:48 +020070782013-06-18 Werner Lemberg <wl@gnu.org>
7079
7080 Fix Savannah bug #39269.
7081
7082 * src/base/ftgloadr.c (FT_GlyphLoader_CheckPoints): Free memory in
7083 case of reacollocation failures.
7084
Andrew Church67cf7a82013-06-18 09:35:34 +020070852013-06-18 Andrew Church <achurch+savannah@achurch.org>
7086
7087 Fix Savannah bug #39266.
7088
7089 If memory allocations fail at certain points while opening a font,
7090 FreeType can either crash due to a NULL dereference or leak memory.
7091
7092 * include/freetype/internal/ftobjs.c (FT_Face_InternalRec,
7093 FT_LibraryRec): Make `refcount' a signed integer. If, for example,
7094 FT_Open_Face() fails in a memory allocation before the face's
7095 reference count is set to 1, a subsequent `FT_Done_Library' call
7096 would otherwise loop over `FT_Done_Face' 2^32 times before freeing
7097 the face.
7098
7099 * src/base/ftobjs.c (open_face): Initialize `stream' and friends
7100 earlier.
7101 (FT_Open_Face) <Fail>: Behave correctly if `node' is NULL.
7102 (FT_Destroy_Module) <Fail>: Check that `renderer_clazz' is valid.
7103
71042013-06-14 Werner Lemberg <wl@gnu.org>
Werner Lembergd7e34442013-06-14 18:33:39 +02007105
7106 * src/smooth/ftgrays.c One final pragma to silence 64-bit MSVC.
7107
Dave Arnoldcb23a622013-06-13 07:46:32 +020071082013-06-06 Dave Arnold <darnold@adobe.com>
7109 Werner Lemberg <wl@gnu.org>
7110
7111 [cff] Add code to Adobe's engine to handle ppem > 2000.
7112
7113 * src/cff/cffgload.c (cff_slot_load): If we get
7114 FT_Err_Glyph_Too_Big, retry unhinted and scale up later on.
7115
Andrew Church67cf7a82013-06-18 09:35:34 +020071162013-06-12 Werner Lemberg <wl@gnu.org>
Werner Lemberg25b6e602013-06-12 11:06:34 +02007117
Werner Lemberg294ce112013-06-12 23:33:11 +02007118 Another try on pragmas.
7119
7120 * include/freetype/internal/ftdebug.h: Move pragmas to...
7121 * include/freetype/internal/internal.h: ... this file since it gets
7122 included by all source files.
7123 * include/freetype/internal/ftserv.h: Remove pragma which has no
7124 effect.
7125
Dave Arnoldcb23a622013-06-13 07:46:32 +020071262013-06-12 Werner Lemberg <wl@gnu.org>
Werner Lemberg294ce112013-06-12 23:33:11 +02007127
Werner Lemberg25b6e602013-06-12 11:06:34 +02007128 * include/freetype/internal/ftdebug.h: Disable MSVC warning C4127.
7129
7130 This partially undoes commit 3f6e0e0c.
7131
Werner Lembergc06889e2013-06-12 10:58:06 +020071322013-06-12 Werner Lemberg <wl@gnu.org>
7133
7134 More compiler warning fixes.
7135
7136 */*: Use cast to `FT_Bool' (or `Bool') where appropriate.
7137
Werner Lemberg99e60d82013-06-10 01:44:37 +020071382013-06-10 Werner Lemberg <wl@gnu.org>
7139
Werner Lemberg5e094c62013-06-10 14:59:21 +02007140 [truetype] Improve handling of broken sbit advance widths.
7141
7142 * src/truetype/ttgload.c (TT_Load_Glyph): Use the glyph's (scaled)
7143 `linearHoriAdvance' if the sbit's `horiAdvance' value is zero.
7144
7145 Cf. font `Fixedsys Excelsior' v3.01 (FSEX300.ttf), glyph A, 16ppem.
7146
71472013-06-10 Werner Lemberg <wl@gnu.org>
7148
Werner Lemberga25ecfd2013-06-10 12:57:16 +02007149 [sfnt] Improve embedded bitmap tracing.
7150
7151 * src/base/ftobjs.c (FT_Request_Size): Move trace message regarding
7152 bitmap strike match to...
7153 (FT_Match_Size): This function.
7154
7155 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics,
7156 tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned,
7157 tt_sbit_decoder_load_compound, tt_sbit_decoder_load_png,
7158 tt_sbit_decoder_load_image): Decorate with tracing messages.
7159
71602013-06-10 Werner Lemberg <wl@gnu.org>
7161
Werner Lemberg99e60d82013-06-10 01:44:37 +02007162 Fix Savannah bug #39160.
7163
7164 * src/truetype/ttinterp.c (Ins_SDPVTL): Set projection vector too
7165 for the degenerate case.
7166
Werner Lemberg2ba871b2013-06-09 08:20:54 +020071672013-06-09 David Turner <digit@google.com>
7168
7169 * src/cache/ftcmanag.c (FTC_Manager_Reset): Add missing cache flush.
7170
7171 This code, present since eight(!) years in the unused `CACHE'
7172 branch, has been forgotten to apply to the master branch. It's
7173 really amazing that noone has ever complained since
7174 `FTC_Manager_Reset' is pretty useless without flushing the cache.
7175
Werner Lemberg85fd84b2013-06-07 17:10:21 +020071762013-06-07 Werner Lemberg <wl@gnu.org>
7177
Werner Lemberg3f6e0e02013-06-07 18:10:40 +02007178 Add and improve pragmas for MSVC compiler.
7179
7180 * include/freetype/internal/ftdebug.h: Remove pragmas.
7181 * include/freetype/internal/ftserv.h: Use push and pop for pragmas.
7182 * include/freetype/internal/ftvalid.h: Handle warning C4324.
7183 * src/base/ftobjs.c: Use push and pop for pragmas.
7184 * src/gzip/ftgzip.c: Handle warning C4244.
7185
71862013-06-07 Werner Lemberg <wl@gnu.org>
7187
Werner Lemberg85fd84b2013-06-07 17:10:21 +02007188 [cff] s/cf2_getGlyphWidth/cf2_getGlyphOutline/.
7189
7190 * src/cff/cf2font.c, src/cff/cf2font.h, src/cff/cf2ft.c: Do it.
7191
Werner Lemberg4447b2c2013-06-06 21:28:36 +020071922013-06-06 Dave Arnold <darnold@adobe.com>
7193
7194 [cff] Add early exit feature for width-only calls.
7195
7196 This is for `FT_Get_Advance'.
7197
7198 There are 7 places where the spec says the width can be defined:
7199
7200 hstem/hstemhm
7201 vstem/vstemhm
7202 cntrmask/hintmask
7203 hmoveto
7204 vmoveto
7205 rmoveto
7206 endchar
7207
7208 * src/cff/cf2intrp.c (cf2_doStems): Exit early for width-only calls,
7209 if possible.
7210
7211 (cf2_interpT2CharString) <cf2_cmdHSTEM>, <cf2_cmdVSTEM>,
7212 <cf2_cmdVMOVETO>, <cf2_cmdENDCHAR>, <cf2_cmdHINTMASK>,
7213 <cf2_cmdRMOVETO>, <cf2_cmdHMOVETO>: Exit early for width-only calls.
7214
Werner Lembergbadf3172013-06-06 09:16:38 +020072152013-06-06 Werner Lemberg <wl@gnu.org>
7216
7217 Next round of compiler fixes.
7218
7219 * builds/win32/ftdebug.c, builds/wince/ftdebug.c (ft_debug_init):
7220 Add proper cast.
7221
7222 * include/freetype/internal/ftserv.h (FT_SERVICE_UNAVAILABLE): Fix
7223 cast.
7224 * include/freetype/internal/ftstream.h: Decorate stream and frame
7225 macros with `FT_Long' and `FT_ULong' as appropriate.
7226
7227 * src/base/ftrfork.c (raccess_guess_darwin_hfsplus,
7228 raccess_guess_darwin_newvfs): Use cast.
7229
7230 * src/bdf/bdflib.c (_bdf_set_default_spacing): Use cast.
7231
7232 * src/cache/ftcmanag.c (FTC_Manager_Check): Fix cast.
7233 * src/cache/ftcmanag.h (FTC_ManagerRec): Ditto.
7234
7235 * src/cff/cf2arrst.c (cf2_arrstack_setNum_Elements): Use cast.
7236 * src/cff/cf2ft.c (cf2_freeSeacComponent): Ditto.
7237 * src/cff/cffobjs.c (remove_subset_prefix, remove_style): Ditto.
7238
7239 * src/cid/cidparse.c (cid_parser_new): Use cast.
7240
7241 * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Use cast.
7242
7243 * src/psaux/psobjs.c (reallocate_t1_table): Fix argument type.
7244
7245 * src/raster/ftraster.c (ft_black_reset): Use cast.
7246
7247 * src/truetype/ttgxvar.c (FT_Stream_FTell): Use cast.
7248 (ALL_POINTS): Fix cast.
7249
7250 * src/type1/t1driver.c (t1_ps_get_font_value): Add casts.
7251 * src/type1/t1parse.c (T1_Get_Private_Dict): Add cast.
7252
Dave Arnoldc3782492013-06-05 19:57:55 +020072532013-06-05 Dave Arnold <darnold@adobe.com>
7254
7255 Fix more MSVC Win32 compiler warnings.
7256
7257 * src/base/ftobjs.c: Fix typo in MS pragma.
7258
7259 * src/base/bdflib.c (_bdf_set_default_spacing, _bdf_add_property):
7260 `lineno' is only used in debug mode.
7261
7262 * src/cff/cf2ft.c (cf2_builder_moveTo): `params' is only used in
7263 debug mode.
7264
Werner Lemberg45392b72013-06-05 13:43:20 +020072652013-06-05 Werner Lemberg <wl@gnu.org>
7266
7267 Fix compiler warnings.
7268
7269 * include/freetype/internal/ftmemory.h: Decorate memory allocation
7270 macros with `FT_Long' where appropriate.
7271 Remove duplicate of FT_MEM_QRENEW_ARRAY definition.
7272
7273 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Use
7274 cast.
7275
7276 * src/base/ftobjs.c: Add warning disabling pragma for MSVC while
7277 including `md5.c'.
7278
7279 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdESC>: Add
7280 cast.
7281
7282 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_compound): Fix casts.
7283 (tt_sbit_decoder_load_bitmap): Beautification.
7284
7285 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Initialize
7286 variables (earlier).
7287
7288 * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Pacify compiler.
7289
7290 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Use unsigned constants
7291 where appropriate.
7292
7293 * src/type1/t1load.c (T1_Get_MM_Var): Ditto.
7294
Werner Lembergdc624ca2013-06-04 10:30:48 +020072952013-06-04 Werner Lemberg <wl@gnu.org>
7296
Werner Lembergd9634982013-06-04 20:18:57 +02007297 * src/cff/cf2font.c (cf2_getGlyphWidth): Initialize `advWidth'.
7298
7299 Problem reported by Ingmar Sittl <ingmar.sittl@elektrobit.com>.
7300
73012013-06-04 Werner Lemberg <wl@gnu.org>
7302
Werner Lembergdc624ca2013-06-04 10:30:48 +02007303 Apply fixes for cppcheck nitpicks.
7304
7305 http://cppcheck.sourceforge.net/
7306
Werner Lemberg8d8508e2013-06-04 13:09:01 +02007307 The call was (from the top-level of the FreeType tree):
7308
7309 cppcheck --force \
7310 --enable=all \
7311 -I include \
7312 -I include/freetype/ \
7313 -I include/freetype/config/ \
7314 -I include/freetype/internal/ \
7315 . &> cppcheck.log
7316
Werner Lembergdc624ca2013-06-04 10:30:48 +02007317 Note that the current version heavily chokes on FreeType, delivering
Werner Lemberg8d8508e2013-06-04 13:09:01 +02007318 many wrong results. I will report those issues to the cppcheck team
Werner Lembergdc624ca2013-06-04 10:30:48 +02007319 so that a newer version gives improved results hopefully.
7320
7321 */* Improve variable scopes.
7322 */* Remove redundant initializations which get overwritten.
7323
Werner Lemberge8ed2d62013-08-01 12:20:20 +02007324 * src/base/ftmac.c, builds/mac/ftmac.c (count_faces_scalable):
Werner Lembergdc624ca2013-06-04 10:30:48 +02007325 Remove unused variable.
7326
7327 * src/base/ftdbgmem.c (ft_mem_table_destroy): `table' can't be zero.
7328
7329 * src/gxvalid/gxvkern.c (gxv_kern_subtable_fmt1_entry_validate):
7330 Remove functionless code.
7331
7332 * src/tools/ftrandom.c (main): Fix memory leak.
7333
Werner Lemberg2429dc32013-06-03 12:41:58 +020073342013-06-03 Werner Lemberg <wl@gnu.org>
7335
7336 Add CFF_CONFIG_OPTION_OLD_ENGINE configuration option.
7337
7338 This controls whether the old FreeType CFF engine gets compiled into
7339 FreeType. It is now disabled by default.
7340
7341 * devel/ftoption.h, include/freetype/config/ftoption.h
7342 (CFF_CONFIG_OPTION_OLD_ENGINE): New macro.
7343
7344 * src/cff/cffdrivr.c (cff_property_set), src/cff/cffgload.c
7345 (CFF_Operator, cff_argument_counts, cff_builder_add_point,
7346 cff_operator_seac, cff_decoder_parse_charstrings, cff_slot_load),
7347 src/cff/cffgload.h, src/cff/cffobjs.c (cff_driver_init): Use
7348 CFF_CONFIG_OPTION_OLD_ENGINE to guard the affected code.
7349
7350 * docs/CHANGES: Updated.
7351
Werner Lembergf9cceeb2013-06-02 23:38:13 +020073522013-06-02 Werner Lemberg <wl@gnu.org>
7353
7354 Fix PNG library handling.
7355
7356 * builds/unix/configure.raw: Don't use LIBPNG_LIBS but
7357 LIBPNG_LDFLAGS.
7358
Behdad Esfahbod760d3422013-05-29 11:36:18 +020073592013-05-23 Behdad Esfahbod <behdad@google.com>
7360
7361 Add support for color embedded bitmaps (eg. color emoji).
7362
7363 A new load flag, FT_LOAD_COLOR, makes FreeType load color
7364 embedded-bitmaps, following this draft specification
7365
7366 https://color-emoji.googlecode.com/git/specification/v1.html
7367
7368 which defines two new SFNT tables, `CBDT' and `CBLC' (named and
7369 modeled after `EBDT' and `EBLC', respectively). The color bitmaps
7370 are stored in the new FT_PIXEL_MODE_BGRA format to represent BGRA
7371 pre-multiplied sRGB images. If PNG support is available, PNG color
7372 images as defined in the same proposed specification are supported
7373 also.
7374
7375 Note that color bitmaps are converted to grayscale if client didn't
7376 ask for color.
7377
7378 * builds/unix/configure.raw: Search for libpng.
7379 Add `--without-png' option.
7380
7381 * devel/ftoption.h, include/freetype/config/ftoption.h
7382 (FT_CONFIG_OPTION_USE_PNG): New macro.
7383
7384 * include/freetype/freetype.h (FT_LOAD_COLOR): New load flag.
7385
7386 * include/freetype/ftimage.h (FT_Pixel_Mode): Add
7387 `FT_PIXEL_MODE_BGRA'.
7388
7389 * include/freetype/tttags.h (TTAG_CBDT, TTAG_CBLC): New tags.
7390
7391 * src/base/ftbitmap.c (FT_Bitmap_Embolden): Updated.
7392 (ft_gray_for_premultiplied_srgb_bgra): New function.
7393 (FT_Bitmap_Convert): Handle FT_PIXEL_MODE_BGRA.
7394
7395 * src/sfnt/pngshim.c, src/sfnt/pngshim.h: New files.
7396
7397 * src/sfnt/sfnt.c: Include `pngshim.c'.
7398
7399 * src/sfnt/ttsbit.c: Include FT_BITMAP_H and `pngshim.h'
7400 (tt_face_load_eblc): Load `CBLC'.
7401 (tt_sbit_decoder_init): Load `CBDT'.
7402 (tt_sbit_decoder_alloc_bitmap): Pass load flags to select between
7403 color and grayscale bitmaps.
7404 Set `num_grays'. This is used by `ftview' to choose the blending
7405 algorithm.
7406 (tt_sbit_decoder_load_byte_aligned,
7407 tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_compound,
7408 tt_sbit_decoder_load_image): Pass load flag.
7409 s/write/pwrite/.
7410 Don't call `tt_sbit_decoder_alloc_bitmap'.
7411 Updated.
7412 (tt_sbit_decoder_load_png) [FT_CONFIG_OPTION_USE_PNG]: New function.
7413 (tt_sbit_decoder_load_bitmap): Pass load flag.
7414 Handle new glyph formats 17, 18, and 19.
7415 Call `tt_sbit_decoder_alloc_bitmap'.
7416 Flatten color bitmaps if necessary.
7417 (tt_face_load_sbit_image): Updated.
7418
7419 * src/sfnt/rules.mk (SFNT_DRV_SRC): Add `pngshim.c'.
7420
7421 * docs/CHANGES: Updated.
7422
Guenter41e44802013-05-24 11:38:09 +020074232013-05-24 Guenter <info@gknw.net>
7424
7425 Apply Savannah patch #8055.
7426
7427 Make `apinames' create an import file for NetWare.
7428
7429 * src/tools/apinames.c (PROGRAM_VERSION): Set to 0.2.
7430 (OutputFormat): Add `OUTPUT_NETWARE_IMP'.
7431 (names_dump): Handle it.
7432 (usage): Updated.
7433 (main): Handle new command line flag `-wN'.
7434
Behdad Esfahbod2d6e1fb2013-05-23 08:01:20 +020074352013-05-23 Behdad Esfahbod <behdad@behdad.org>
7436
7437 Compilation fix.
7438
7439 * src/truetype/ttinterp.c (TT_RunIns)
7440 [!TT_CONFIG_OPTION_SUBPIXEL_HINTING]: Make it work.
7441
Infinality18f35ed2013-05-21 20:51:15 -050074422013-05-22 Infinality <infinality@infinality.net>
7443
Infinality3c783c12013-05-21 21:03:00 -05007444 [truetype] Formatting and an additional subpixel tweak.
7445
7446 * src/truetype/ttinterp.c (Ins_SHPIX): Formatting fix.
7447 * src/truetype/ttsubpix.c (SKIP_NONPIXEL_Y_MOVES_Rules):
7448 Revert previous modification for Verdana clones.
7449
74502013-05-22 Infinality <infinality@infinality.net>
7451
Infinality18f35ed2013-05-21 20:51:15 -05007452 [truetype] Adjust subpixel zp2 moves and tweak rules.
7453
7454 These modifications fix thin diagonal stems in some legacy fonts.
7455
7456 * src/truetype/ttinterp.c (Direct_Move_X): Remove unused macro.
7457 (Move_Zp2_Point): Don't always disable x moves for subpixel rendering.
7458 (Ins_SHP): Disable x moves here for subpixel rendering.
7459 (Ins_SHPIX): Only disable x moves in compatibility mode.
7460 Split out zp2 move reversals and reorder conditional respectively.
7461
7462 * src/truetype/ttsubpix.c (SKIP_NONPIXEL_Y_MOVES_Rules): Fix oversight.
7463 Only adjust Verdana clones for 17 ppem.
7464 (SKIP_NONPIXEL_Y_MOVES_Rules_Exceptions): Add Courier New.
7465 (ALWAYS_SKIP_DELTAP_Rules): Found additional cases for Arial `s'.
7466
Infinality63bfa832013-05-20 07:38:21 +020074672013-05-20 Infinality <infinality@infinality.net>
7468
7469 [truetype] Simplify and improve subpixel function detection.
7470
7471 Some small enhancements have allowed the removal of many macros and
7472 the simplification of existing rules in `ttsubpix.c'.
7473
7474 * src/truetype/ttsubpix.h (SPH_TWEAK_ALLOW_X_DMOVEX,
7475 SPH_TWEAK_ALLOW_X_MOVE_ZP2,
7476 SPH_TWEAK_DELTAP_SKIP_EXAGGERATED_VALUES,
7477 SPH_TWEAK_SKIP_INLINE_DELTAS, SPH_TWEAK_MIRP_CVT_ZERO): Removed.
7478 (SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES_DELTAP): New rule macro.
7479
7480 * src/truetype/ttsubpix.c: Updated affected rules.
7481
7482 * src/truetype/ttinterp.c (Direct_Move_X): Updated.
7483 (INS_FDEF): Add additional function detection.
7484 (INS_ENDF): Set runtime flag.
7485 (Ins_CALL): Skip the call under certain conditions.
7486 Remove bad code.
7487 (Ins_LOOPCALL): Skip the call under certain conditions.
7488 Remove bad code.
7489 (Move_Zp2_Point): Updated.
7490 (Ins_SHPIX): Updated.
7491 Skip the move under some situations.
7492 (Ins_MIAP): Improve conditions.
7493 (Ins_MIRP): Updated.
7494 (Ins_DELTAP): Skip move under certain conditions.
7495 Simplify conditions.
7496 (TT_RunIns): Updated.
7497 Add code to handle new function detection.
7498 Trace messages.
7499
Werner Lembergfd664692013-05-17 17:40:27 +020075002013-05-17 Werner Lemberg <wl@gnu.org>
7501
7502 Update more FT_Err_XXX macros using FT_ERR and FT_THROW;
7503
7504 * builds/amiga/src/base/ftsystem.c, builds/mac/ftmac.c,
7505 builds/unix/ftsystem.c, builds/vms/ftsystem.c: Do it.
7506
Werner Lembergf04951a2013-05-17 13:51:07 +020075072013-05-15 Werner Lemberg <wl@gnu.org>
7508
7509 [truetype] Add `interpreter-version' property.
7510
7511 This makes the option TT_CONFIG_OPTION_SUBPIXEL_HINTING controllable
7512 at runtime.
7513
Werner Lemberg27991332013-05-17 14:00:26 +02007514 * include/freetype/ftttdrv.h: New file.
7515
7516 * include/freetype/config/ftheader.h (FT_TRUETYPE_DRIVER_H): New
7517 macro.
7518
Werner Lembergf04951a2013-05-17 13:51:07 +02007519 * src/truetype/ttdriver.c: Include FT_TRUETYPE_DRIVER_H.
7520 (tt_property_set, tt_property_get): Fill templates.
7521
7522 * src/truetype/ttobjs.h (TT_DriverRec): Add `interpreter_version'
7523 member.
7524 Remove unused `extension_component' member.
7525
7526 * src/truetype/ttgload.c: Include FT_TRUETYPE_DRIVER_H.
7527 (tt_get_metrics, TT_Hint_Glyph, TT_Process_Simple_Glyph,
7528 compute_glyph_metrics, tt_loader_init): Use `interpreter_version'.
7529
7530 * src/truetype/ttinterp.c: Include FT_TRUETYPE_DRIVER_H.
7531 (SUBPIXEL_HINTING): New macro to check `interpreter_version' flag.
7532 Update all affected functions to use it.
7533 Use TT_INTERPRETER_VERSION_XXX where appropriate.
7534
7535 * src/truetype/ttobjs.c: Include FT_TRUETYPE_DRIVER_H.
7536 (tt_driver_init): Initialize `interpreter_version'.
7537
7538 * src/truetype/ttsubpix.c: Include FT_TRUETYPE_DRIVER_H.
7539 Use TT_INTERPRETER_VERSION_XXX where appropriate.
7540
Werner Lemberg7441dd82013-05-13 09:12:46 +020075412013-05-13 Werner Lemberg <wl@gnu.org>
7542
Werner Lemberg6650be72013-05-13 10:05:29 +02007543 [truetype] Avoid empty source file.
7544
7545 * src/truetype/ttsubpix.c [!TT_CONFIG_OPTION_SUBPIXEL_HINTING]:
7546 Provide dummy typedef.
7547
75482013-05-13 Werner Lemberg <wl@gnu.org>
7549
Werner Lemberg7441dd82013-05-13 09:12:46 +02007550 * src/cff/cf2font.c (cf2_getGlyphWidth): Fix uninitialized variable.
7551
7552 Fix suggested by Vaibhav Nagarnaik <vnagarnaik@gmail.com>.
7553
Brian Nixon8d6025c2013-05-13 09:06:42 +020075542013-05-13 Brian Nixon <bnixon@yahoo.com>
7555
7556 Fix Savannah bug #38970.
7557
7558 * src/base/ftdebug.c, builds/win32/ftdebug.c,
7559 builds/wince/ftdebug.c, builds/amiga/src/base/ftdebug.c
7560 (ft_debug_init): Don't read past the environment variable FT2_DEBUG.
7561
Werner Lembergd51ac9c2013-05-12 06:00:27 +020075622013-05-12 Werner Lemberg <wl@gnu.org>
7563
Werner Lembergcd888752013-05-12 15:08:57 +02007564 [truetype] Add framework for TrueType properties.
7565
7566 * src/truetype/ttdrivr.c: Include FT_SERVICE_PROPERTIES_H.
7567 (tt_property_set, tt_property_get): New functions, still empty.
7568 Define `tt_service_properties' service.
7569 Update `tt_services'.
7570
7571 * src/truetype/ttpic.h: Include FT_SERVICE_PROPERTIES_H.
7572 (TT_SERVICE_PROPERTIES_GET): New macro.
7573 (TTModulePIC): Add `tt_service_properties'.
7574
75752013-05-12 Werner Lemberg <wl@gnu.org>
7576
Werner Lembergb112fa42013-05-12 07:29:04 +02007577 Fix Savannah bug #38967.
7578
7579 * src/base/ftcalc.c (FT_DivFix) [FT_LONG64]: Fix cast.
7580
75812013-05-12 Werner Lemberg <wl@gnu.org>
7582
Werner Lembergcbcf33d2013-05-12 07:27:48 +02007583 Introduce unsigned 64bit type (if available).
7584
7585 * include/freetype/config/ftconfig.h: Define FT_UINT64 if available.
7586 [FT_LONG64]: Provide FT_UInt64.
7587
7588 * builds/unix/ftconfig.in: Synchronized.
7589
75902013-05-12 Werner Lemberg <wl@gnu.org>
7591
Werner Lembergd51ac9c2013-05-12 06:00:27 +02007592 Fix Savannah bug #38968.
7593
7594 * include/freetype/ftmodapi.h: Add `FT_EXPORT' to
7595 FT_Property_{Set,Get}.
7596 * src/base/ftobjs.c: Add `FT_EXPORT_DEF' to
7597 FT_Property_{Set,Get}.
7598
Werner Lembergf6aa0892013-05-10 07:58:47 +020075992013-05-10 Werner Lemberg <wl@gnu.org>
7600
Werner Lembergea2b4752013-05-10 08:04:33 +02007601 [sfnt] Clean up bitmap code.
7602
7603 * src/sfnt/ttsbit.c: Deleted.
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02007604 * src/sfnt/ttsbit0.c: Renamed to `ttsbit.c'.
Werner Lembergea2b4752013-05-10 08:04:33 +02007605 * rules.mk (SFNT_DRV_H): Updated.
7606
76072013-05-10 Werner Lemberg <wl@gnu.org>
7608
Werner Lembergf6aa0892013-05-10 07:58:47 +02007609 */* [FT_CONFIG_OPTION_OLD_INTERNALS]: Remove macro and guarded code.
7610
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00007611----------------------------------------------------------------------------
7612
Werner Lembergf57fc592015-01-17 20:41:43 +01007613Copyright 2013-2015 by
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00007614David Turner, Robert Wilhelm, and Werner Lemberg.
7615
7616This file is part of the FreeType project, and may only be used, modified,
7617and distributed under the terms of the FreeType project license,
7618LICENSE.TXT. By continuing to use, modify, or distribute this file you
7619indicate that you have read the license and understand and accept it
7620fully.
7621
7622
7623Local Variables:
7624version-control: never
Werner Lemberg4e03fe72006-04-29 06:20:09 +00007625coding: utf-8
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00007626End: