blob: a69a1a493dc47344e353bffb499312fd0d00dd6f [file] [log] [blame]
Werner Lemberg581c7e22015-09-15 06:49:06 +020012015-09-15 Werner Lemberg <wl@gnu.org>
2
3 [type1, type42] Check encoding array size (#45961).
4
5 * src/type1/t1load.c (parse_encoding), src/type42/t42parse.c
6 (t42_parse_encoding): Do it.
7
Alexei Podtelezhnikov3ea0d2c2015-09-13 23:19:34 -040082015-09-14 Alexei Podtelezhnikov <apodtele@gmail.com>
9
10 * src/base/ftcalc.c (FT_MulFix) [FT_LONG64]: Improve.
11
Werner Lemberg7962a152015-09-14 00:38:26 +0200122015-09-14 Werner Lemberg <wl@gnu.org>
13
14 [type1] Fix another potential buffer overflow (#45955).
15
16 * src/type1/t1parse (T1_Get_Private_Dict): Assure that check for
17 `eexec' doesn't exceed `limit'.
18
Werner Lemberge40e8b32015-09-13 08:05:50 +0200192015-09-13 Werner Lemberg <wl@gnu.org>
20
Werner Lembergff7d6402015-09-13 23:53:16 +020021 Replace `mkinstalldirs' with AC_PROG_MKDIR_P.
22
23 * builds/unix/mkinstalldirs: Removed, no longer needed.
24
25 * builds/unix/configure.raw: Call `AC_PROG_MKDIR_P'.
26 Update pwd call for `$INSTALL'.
27
28 * builds/unix/unix-def.in (MKINSTALLDIRS): Use `@MKDIR_P@'.
29
30 * autogen.sh: Updated.
31
322015-09-13 Werner Lemberg <wl@gnu.org>
33
Werner Lemberg3df92aa2015-09-13 09:21:52 +020034 [winfonts] Check alignment shift count for resource data (#45938).
35
36 * src/winfonts/winfnt.c (fnt_face_get_dll_font): Implement it.
37
382015-09-13 Werner Lemberg <wl@gnu.org>
39
Werner Lemberge3058612015-09-13 08:41:43 +020040 [type1] Fix potential buffer overflow (#45923).
41
42 * src/type1/t1parse.c (T1_Get_Private_Dict): Assure `cur' doesn't
43 point to end of file buffer.
44
452015-09-13 Werner Lemberg <wl@gnu.org>
46
Werner Lemberge40e8b32015-09-13 08:05:50 +020047 [gzip] Fix access of small compressed files (#45937).
48
49 * src/gzip/ftgzip.c (ft_gzip_stream_close): Avoid memory leak.
50
51 (ft_gzip_get_uncompressed_file): Correct byte order while reading
52 unsigned long value. Without this change, the whole optimization of
53 accessing small files in `FT_Stream_OpenGzip' is never executed! As
54 a consequence, access to PCF files in general (which are normally
55 small files) should be much improved now as originally intended.
56
Werner Lemberg23423bc2015-09-11 08:28:27 +0200572015-09-11 Werner Lemberg <wl@gnu.org>
58
Werner Lembergdb5a4a92015-09-12 08:32:55 +020059 [psaux] Fix potential buffer overflow (#45922).
60
61 * src/psaux/psobjs.c (ps_parser_skip_PS_token): If a token is
62 enclosed in balanced expressions, ensure that the cursor position
63 doesn't get larger than the current limit.
64
652015-09-11 Werner Lemberg <wl@gnu.org>
66
Werner Lemberg19b82cf2015-09-11 20:25:32 +020067 [base] Avoid crash while tracing `load_mac_face'.
68
69 Reported in Savannah bug #45919.
70
71 * src/base/ftobjs.c (load_mac_face): Honour FT_OPEN_MEMORY while
72 tracing.
73
742015-09-11 Werner Lemberg <wl@gnu.org>
75
Werner Lemberg23423bc2015-09-11 08:28:27 +020076 [type42] Fix endless loop (#45920).
77
78 * src/type42/t42parse.c (t42_parse_encoding): Synchronize with
79 type1's `parse_encoding'.
80
Werner Lemberge5a27a72015-09-10 07:44:11 +0200812015-09-10 Werner Lemberg <wl@gnu.org>
82
83 [docmaker] Allow `-' in bold and italic markup.
84
85 * src/tools/docmaker/sources.py (re_italic, re_bold): Adjust
86 accordingly.
87
Alexei Podtelezhnikov09948e42015-09-09 21:30:15 -0400882015-09-09 Alexei Podtelezhnikov <apodtele@gmail.com>
89
90 * src/base/ftcalc.c (FT_RoundFix): Improve.
91
Wojciech Mamrak822acb02015-09-09 07:59:10 +0200922015-09-09 Wojciech Mamrak <wmamrak@gmail.com>
93
94 * src/base/ftcalc.c (FT_CeilFix, FT_FloorFix): Normalize.
95
96 This commit makes the functions behave as expected, this is,
97 rounding towards plus or minus infinity.
98
Alexei Podtelezhnikovb002f682015-09-07 13:47:36 -0400992015-09-07 Alexei Podtelezhnikov <apodtele@gmail.com>
100
101 * src/smooth/ftgrays.c (gray_render_line): Simplify clipping.
102
Alexei Podtelezhnikov5a6dc872015-09-04 23:14:46 -04001032015-09-04 Alexei Podtelezhnikov <apodtele@gmail.com>
104
105 [raster,smooth] Microoptimizations.
106
107 * src/raster/ftraster.c (Insert_Y_Turn, Finalize_Profile_Table,
108 Beziier_Up, ): Use do-while loops.
109
110 * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line,
111 gray_convert_glyph): Ditto.
112
Werner Lemberg696b7122015-09-04 10:10:59 +02001132015-09-04 Werner Lemberg <wl@gnu.org>
114
Werner Lembergd3cba0e2015-09-04 10:28:53 +0200115 [autofit] Redesign code ranges (2/2).
116
117 This commit adds two fallback scripts (`latb', `latp') and
118 implements support for the no-base character ranges introduced in
119 the previous commit.
120
121 * src/autofit/aftypes.h (AF_ScriptClassRec): Add
122 `script_uni_nobase_ranges' field.
123 (AF_DEFINE_SCRIPT_CLASS): Updated.
124
125 * src/autofit/afscript.h, src/autofit/afstyles.h: Add `latb' and
126 `latp' fallback scripts.
127
128 * src/autofit/afblue.dat: Add blue zones for Latin subscript and
129 superscript fallback scripts.
130
131 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
132
133 * src/autofit/afglobal.h (AF_NOBASE): New style flag for no-base
134 characters.
135 (AF_STYLE_MASK): Updated.
136
137 * src/autofit/afglobal.c (SCRIPT): Updated.
138 (af_face_globals_compute_style_coverage): Handle new style flag.
139
140 * src/autofit/aflatin.c (af_latin_hints_apply): Handle new style
141 flag.
142
143 * src/autofit/afranges.h (SCRIPT): Use it to export no-base ranges.
144
1452015-09-04 Werner Lemberg <wl@gnu.org>
146
Werner Lemberg696b7122015-09-04 10:10:59 +0200147 [autofit] Redesign code ranges (1/2).
148
149 This patch introduces auxiliary code ranges that identify no-base
150 characters; they refer to glyphs of a script that should be hinted
151 without alignments to blue zones (mostly diacritics).
152
153 It also splits off ranges for fallback scripts that handle subscript
154 and superscript characters not covered by OpenType features. For
155 example, this greatly helps improve the hinting of various phonetic
156 alphabets, which contain a large amount characters that look like
157 superscript glyphs.
158
159 Finally, code ranges are updated to Unicode 8.0, and enclosed
160 characters are removed in general since they normally look better if
161 they stay unhinted.
162
163 * src/autofit/afranges.c (af_latn_uniranges): Updated to Unicode
164 8.0.
165 Split off superscript-like and subscript-like glyphs into...
166
167 (af_latb_uniranges, af_latp_uniranges): ... these two new arrays.
168
169 (af_xxxx_nobase_uniranges): New arrays that hold no-base characters
170 of the corresponding character ranges.
171
Werner Lemberg8cbbcf62015-09-03 06:47:30 +02001722015-09-03 Werner Lemberg <wl@gnu.org>
173
174 [autofit] Pass glyph index to hinting function.
175
176 No functionality change yet.
177
178 * src/autofit/aftypes.h (AF_WritingSystem_ApplyHintsFunc): Pass
179 glyph index.
180
181 * src/autofit/afcjk.c, src/autofit/afcjk.h (af_cjk_hints_apply),
182 src/autofit/afdummy.c (af_dummy_hints_apply), src/autofit/afindic.c
183 (af_indic_hints_apply), src/autofit/aflatin.c
184 (af_latin_hints_apply), src/autofit/aflatin2.c
185 (af_latin2_hints_apply), src/autofit/afloader.c (af_loader_load_g):
186 Updated.
187
Werner Lemberg87c81f02015-08-30 10:35:21 +02001882015-08-30 Werner Lemberg <wl@gnu.org>
189
Werner Lemberg40103a32015-08-31 08:51:52 +0200190 [autofit] Code clean-up.
191
192 * src/autofit/afglobal.h (AF_STYLE_MASK): New macro.
193 (AF_STYLE_UNASSIGNED): Use AF_STYLE_MASK for definition.
194
195 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
196 Updated.
197
1982015-08-30 Werner Lemberg <wl@gnu.org>
199
Werner Lemberg87c81f02015-08-30 10:35:21 +0200200 [autofit] Make glyph style array use 16bit values.
201
202 * include/freetype/ftautoh.h (FT_Prop_GlyphToScriptMap): Use
203 `FT_UShort' for `map' field.
204
205 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage,
206 af_face_globals_new), src/autofit/hbshim.c, src/autofit/hbshim.h
207 (af_get_coverage): Use FT_UShort for `glyph_styles' array.
208
209 * src/autofit/afglobal.h (AF_STYLE_UNASSIGNED, AF_DIGIT): Extend to
210 16 bits.
211 (AF_FaceGlobalsRec): Use `FT_UShort' for `glyph_styles' field.
212
Werner Lemberg633d8ed2015-08-26 06:18:47 +02002132015-08-26 Werner Lemberg <wl@gnu.org>
214
215 * builds/unix/configure.raw: Need harfbuzz >= 0.9.21 (#45828).
216
Werner Lemberg78b01402015-08-25 07:23:01 +02002172015-08-25 Werner Lemberg <wl@gnu.org>
218
219 [base] Improve kerning tracing and documentation.
220
221 * src/base/ftobjs.c (FT_Get_Kerning): Emit tracing message if
222 scaled-down kerning values differ.
223
Werner Lemberg91d59162015-08-18 06:04:36 +02002242015-08-18 Werner Lemberg <wl@gnu.org>
225
226 [raster] Remove last remnants of `raster5' driver.
227
228 * src/raster/ftrend1.h (ft_raster5_renderer_class): Removed.
229
230 * src/raster/rastpic.c, src/raster/rastpic.h
231 (ft_raster5_renderer_class_pic_init,
232 ft_raster5_renderer_class_pic_free): Removed.
233
Alexei Podtelezhnikova0172d12015-08-17 22:58:59 -04002342015-08-17 Alexei Podtelezhnikov <apodtele@gmail.com>
235
236 [base] Improve emboldener (#45596).
237
238 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Correct displacement
239 of zero-lenght segments.
240
Alexei Podtelezhnikov00d89952015-08-16 22:57:34 -04002412015-08-16 Alexei Podtelezhnikov <apodtele@gmail.com>
242
Alexei Podtelezhnikov815c3242015-08-17 21:48:46 -0400243 [base] Reoptimize arithmetic.
Alexei Podtelezhnikov00d89952015-08-16 22:57:34 -0400244
245 * src/base/ftcalc.c (FT_MulDiv, FT_MulFix) [!FT_LONG64]: Remove
246 special cases that slow down the general use.
247
pazerf0ed30e2015-08-15 06:53:09 +02002482015-08-15 pazer <ibemad@gmail.com>
249
250 Fix C++ compilation (#45762).
251
252 * src/base/ftstroke.c (ft_outline_glyph_class): Use
253 FT_CALLBACK_TABLE.
254
Alexei Podtelezhnikovae258aa2015-08-14 23:23:18 -04002552015-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
256
257 [truetype] Clean up.
258
259 * src/truetype/ttgload.c (TT_Process_Composite_Component): Use
260 `FT_Outline_Transform' and `FT_Outline_Translate'.
261 (translate_array): Dropped.
262
Werner Lembergd0d7ee02015-08-14 14:30:58 +02002632015-08-14 Andreas Enge <andreas.enge@inria.fr>
264
265 * builds/unix/detect.mk (CONFIG_SHELL): Don't handle it (#44261).
266
Werner Lemberg14d6b5d2015-08-13 15:22:17 +02002672015-08-13 Werner Lemberg <wl@gnu.org>
268
269 [truetype] Introduce named instance access to GX fonts.
270
271 For functions querying a face, bits 16-30 of the face index can hold
272 the named instance index if we have a GX font. The indices start
273 with value 1; value 0 indicates font access without GX variation
274 data.
275
276 * include/freetype/freetype.h (FT_FaceRec): Update documentation.
277 * include/freetype/internal/sfnt.h: Ditto.
278
279 * src/sfnt/sfobjs.c (sfnt_init_face)
280 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Get number of named instances and
281 do argument checks.
282 (sfnt_load_face): Updated.
283
284 * src/truetype/ttobjs.c (tt_face_init)
285 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Use named instance, overwriting
286 the style name.
287
288 * src/base/ftobjs.c (open_face_from_buffer,
289 open_face_PS_from_sfnt_stream): Updated.
290 * src/bdf/bdfdrivr.c (BDF_Face_Init): Updated.
291 * src/cff/cffload.c (cff_font_load): Updated.
292
293 * src/cff/cffobjs.c (cff_face_init): Make function exit early for
294 pure CFF fonts if `font_index < 0'.
295 Updated.
296
297 * src/cid/cidobjs.c (cid_face_init): Updated.
298 * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated.
299 * src/pfr/pfrobjs.c (pfr_face_init): Updated.
300 * src/type1/t1objs.c (T1_Face_Init): Updated.
301 * src/type42/t42objs.c (T42_Face_Init): Updated.
302 * src/winfonts/winfnt.c (fnt_face_get_dll_font, FNT_Face_Init):
303 Updated.
304
305 * docs/CHANGES: Updated.
306
Alexei Podtelezhnikov4a466862015-08-12 23:45:40 -04003072015-08-12 Alexei Podtelezhnikov <apodtele@gmail.com>
308
309 [type1,cff,cid] Streamline font matrix application.
310
311 * src/type1/t1gload.c (T1_Load_Glyph): Directly modify advances only
312 if font matrix is not trivial.
313 * src/cff/cffgload.c (cff_slot_load): Ditto.
314 * sff/cid/cidgload.c (cid_slot_load_glyph): Ditto for advances and the
315 entire outline.
316
Werner Lemberg7ebe6ac2015-08-11 06:47:25 +02003172015-08-11 Werner Lemberg <wl@gnu.org>
318
319 [builds/unix] Minor.
320
321 * builds/unix/configure.raw:
322 s/lib{priv,staticconf}/libs{priv,staticconf}/ for orthogonality with
323 similarly named uppercase variables.
324
Alexei Podtelezhnikova37da212015-08-10 23:05:02 -04003252015-08-10 Alexei Podtelezhnikov <apodtele@gmail.com>
326
327 [type1,cid,type42] Minor improvements.
328
329 * src/type1/t1load.c (t1_parse_font_matrix): Scale units per EM only
330 when necessary. Refresh comments.
331 * src/cid/cidload.c (cid_parse_font_matrix): Ditto.
332 * src/type42/t42parse.c (t42_parse_font_matrix): Refresh comments.
333
Werner Lemberge5f44692015-08-08 07:45:03 +02003342015-08-08 Werner Lemberg <wl@gnu.org>
335
Werner Lembergbd75a512015-08-08 08:39:45 +0200336 [type42] Fix glyph access.
337
338 This is a severe bug: We've missed one level of indirection, as
339 described in the Type 42 specification. As a result, ftview
340 sometimes showed incorrect glyphs for given glyph names, and even
341 displayed `error 0x0006' (invalid argument!) in case the number of
342 glyph indices differed between the Type 42 font and the embedded
343 TTF.
344
345 Apparently, noone ever noticed it; this shows how much Type 42 fonts
346 are in use...
347
348 * src/type42/t42objs.c (T42_GlyphSlot_Load): Map Type 42 glyph index
349 to embedded TTF's glyph index.
350
3512015-08-08 Werner Lemberg <wl@gnu.org>
352
Werner Lemberge5f44692015-08-08 07:45:03 +0200353 [type42] Minor clean-up.
354
355 * src/type42/t42parse.c (t42_parse_font_matrix): Remove unused
356 variable.
357
Alexei Podtelezhnikovfd705122015-08-06 21:49:08 -04003582015-08-06 Alexei Podtelezhnikov <apodtele@gmail.com>
359
360 [type42] Parse FontMatrix according to specifications.
361
362 * src/type42/t42parse.c (t42_parse_font_matrix): Type 42 FontMatrix
363 does not need scaling by 1000. Units_per_EM are taken from the
364 embedded TrueType.
365
Werner Lembergff406e22015-08-06 07:34:50 +02003662015-08-06 Werner Lemberg <wl@gnu.org>
367
368 [autofit] Improve Arabic hinting.
369
370 Problem reported by Titus Nemeth <tn@tntypography.eu> (by using
371 ttfautohint).
372
373 * src/autofit/afblue.dat: Add neutral blue zone for the tatweel
374 character.
375
376 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
377
Alexei Podtelezhnikov98e8e992015-08-06 00:06:14 -04003782015-08-05 Alexei Podtelezhnikov <apodtele@gmail.com>
379
380 [truetype] Clean up types.
381
382 * src/truetype/ttobjs.c (TT_Size): Move declaration from here.
383 * include/freetype/internal/tttypes.h (TT_Size): ... to here.
384 (TT_LoaderRec): Switch to appropriate types for `face' and `size'.
385 * src/truetype/ttgload.c: Remove corresponding type casts.
386 * src/truetype/ttsubpix.c: Ditto.
387
Werner Lemberg15e2a4f2015-08-05 21:53:50 +02003882015-08-05 Werner Lemberg <wl@gnu.org>
389
390 [autofit] Improve recognition of flat vs. rounded segments.
391
392 Lower the flatness threshold from upem/8 to upem/14, making the
393 auto-hinter accept shorter elements.
394
395 Synchronize flat/round stem selection algorithm with blue zone code.
396
397 * src/autofit/aflatin.c (FLAT_THRESHOLD): New macro.
398 (af_latin_metrics_init_blues): Use it.
399 (af_latin_hints_compute_segments): Collect information on maximum
400 and minimum coordinates of `on' points; use this to add a constraint
401 for the flat/round decision similar to
402 `af_latin_metrics_init_blues'.
403
Werner Lembergeb22ef22015-08-04 06:50:04 +02004042015-08-04 Werner Lemberg <wl@gnu.org>
405
406 Another left-shift bug (#45681).
407
408 * src/base/ftobjs.c (IsMacBinary): Only accept positive values for
409 `dlen'.
410
Alexei Podtelezhnikov7e6c3212015-08-03 23:26:13 -04004112015-08-03 Alexei Podtelezhnikov <apodtele@gmail.com>
412
413 [base] Fix `ft_corner_orientation'.
414
415 Remove casting from `FT_Long' to `FT_Int' that might change the sign
416 of the return value and make it faster too.
417
418 * src/base/ftcalc.c (ft_corner_orientation): On 32-bit systems, stay
419 with 32-bit arithmetic when safe. Use plain math on 64-bit systems.
420 * src/pshinter/pshalgo.c: Remove old unused code.
421
Werner Lembergca6a5cf2015-08-03 08:51:18 +02004222015-08-03 Werner Lemberg <wl@gnu.org>
423
Werner Lemberg8dfc7602015-08-03 12:23:30 +0200424 * src/truetype/ttgload.c (load_truetype_glyph)
425 [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Fix crash for composite glyphs
426 having a depth greater than 1.
427
4282015-08-03 Werner Lemberg <wl@gnu.org>
429
Werner Lembergca6a5cf2015-08-03 08:51:18 +0200430 Fix typo in clang bug from 2015-07-31 (#45678).
431
432 * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Fix inequality.
433
Werner Lemberg70e9d812015-08-02 09:42:12 +02004342015-08-02 Werner Lemberg <wl@gnu.org>
435
Werner Lemberga82c45d2015-08-02 18:35:49 +0200436 * CMakeLists.txt: Improve shared library support.
437
438 Based on a patch from John Cary <cary@txcorp.com>.
439
4402015-08-02 Werner Lemberg <wl@gnu.org>
441
Werner Lemberg682c2712015-08-02 15:46:26 +0200442 * builds/unix/freetype-config.in (enable_shared): Remove. Unused.
443
4442015-08-02 Werner Lemberg <wl@gnu.org>
445
Werner Lemberg70e9d812015-08-02 09:42:12 +0200446 Fix more invalid left-shifts.
447
448 * src/pfr/pfrgload.c (pfr_glyph_load_compound): Use multiplication,
449 not left-shift.
450
451 * src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar,
452 tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Use multiplication,
453 not left-shift.
454
Werner Lemberg5d1b8ab2015-07-31 21:49:07 +02004552015-07-31 Werner Lemberg <wl@gnu.org>
456
Werner Lemberg6343ba22015-08-01 07:53:48 +0200457 Fix some bugs found by clang's `-fsanitize=undefined' (#45661).
458
459 * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Only accept
460 positive values from header.
461 Check overflow.
462
463 * src/base/ftoutln.c (SCALED): Correctly handle left-shift of
464 negative values.
465
466 * src/bdf/bdf.h (_bdf_glyph_modified, _bdf_set_glyph_modified,
467 _bdf_clear_glyph_modified): Use unsigned long constant.
468
469 * src/bdf/bdfdrivr.c (BDF_Size_Select, BDF_Glyph_Load): Don't
470 left-shift values that can be negative.
471
472 * src/pcf/pcfdrivr.c (PCF_Size_Select, PCF_Glyph_Load): Don't
473 left-shift values that can be negative.
474
475 * src/raster/ftraster.c (SCALED): Correctly handle left-shift of
476 negative values.
477
478 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Don't left-shift
479 values that can be negative.
480
481 * src/truetype/ttgload.c (TT_Load_Composite_Glyph,
482 compute_glyph_metrics, load_sbit_image): Don't left-shift values
483 that can be negative.
484
4852015-07-31 Werner Lemberg <wl@gnu.org>
486
Werner Lemberg5d1b8ab2015-07-31 21:49:07 +0200487 Define FT_LONG_MAX.
488
489 * include/freetype/config/ftstdlib.h (FT_LONG_MAX): New macro.
490 * src/cff/cf2arrst.c (cf2_arrstack_setNumElements): Use it.
491
4922015-07-28 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov2b07a5a2015-07-28 23:14:30 -0400493
494 * src/base/ftcalc.c (FT_Vector_NormLen): Clarify.
495
Werner Lemberg5d1b8ab2015-07-31 21:49:07 +02004962015-07-27 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikove8b186e2015-07-27 23:22:34 -0400497
498 * src/base/ftcalc.c (FT_Vector_NormLen): Explicate type conversions.
499
Matthias Clasenb650dfb2015-07-26 21:08:34 +02005002015-07-26 Matthias Clasen <matthias.clasen@gmail.com>
501
502 [cff] Don't use `hmtx' table for LSB (#45520).
503
504 * src/cff/cffgload.c (cff_slot_load): Use `htmx' table for advance
505 width only. Bug introduced 2015-04-10.
506
Werner Lembergf9be5672015-07-09 15:10:31 +02005072015-07-09 Werner Lemberg <wl@gnu.org>
508
509 Better support of user-supplied C++ namespaces.
510
511 See
512
513 http://lists.nongnu.org/archive/html/freetype-devel/2015-07/msg00008.html
514
515 for a rationale.
516
517 * src/autofit/afpic.h, src/base/basepic.h, src/cff/cffpic.h,
518 src/pshinter/pshpic.h, src/psnames/pspic.h, src/raster/rastpic.h,
519 src/sfnt/sfntpic.h, src/smooth/ftspic.h, src/truetype/ttpic.h
520 (FT_BEGIN_HEADER, FT_END_HEADER): Move macro calls to not enclose
521 header files that contain FT_{BEGIN,END}_HEADER macros by
522 themselves.
523
524 * src/autofit/aftypes.h [FT_DEBUG_AUTOFIT]: Include
525 FT_CONFIG_STANDARD_LIBRARY_H earlier.
526
527 * src/truetype/ttpic.h: Include FT_INTERNL_PIC_H.
528
Werner Lemberg1cdac102015-07-07 14:04:44 +02005292015-07-07 Werner Lemberg <wl@gnu.org>
530
531 [sfnt] Make `tt_face_get_name' member of the SFNT interface.
532
533 * include/freetype/internal/sfnt.h (TT_Get_Name_Func): New
534 prototype.
535 (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): New member `get_name'.
536
537 * src/sfnt/sfdriver.c (sfnt_interface): Updated.
538
539 * src/sfnt/sfobjs.c (tt_face_get_name): Tag it with `LOCAL_DEF'.
540 * src/sfnt/sfobjs.h: Add prototype for it.
541
Werner Lembergeb1bba92015-06-30 09:46:39 +02005422015-06-30 Werner Lemberg <wl@gnu.org>
543
544 Fix some clang compiler warnings.
545
546 * src/base/ftoutln.c (FT_Outline_EmboldenXY), src/cff/cf2intrp.c
547 (cf2_interpT2CharString), src/truetype/ttgload.c
548 (load_truetype_glyph), src/truetype/ttgxvar.c (tt_handle_deltas),
549 src/truetype/ttinterp.c (Ins_INSTCTRL): Fix signedness issues.
550
Alexei Podtelezhnikov884e4e62015-06-29 22:32:05 -04005512015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
552
Alexei Podtelezhnikov5aaabb42015-06-29 22:46:54 -0400553 [truetype] Speed up bytecode interpreter.
554
555 * src/truetype/ttinterp.c (Normalize): Use `FT_Vector_NormLen'.
556
5572015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
558
Alexei Podtelezhnikov9ef02bd2015-06-29 22:39:10 -0400559 [base] Speed up emboldening.
560
Werner Lembergeb1bba92015-06-30 09:46:39 +0200561 * src/base/ftoutln.c (FT_Outline_EmboldenXY): Use
562 `FT_Vector_NormLen'.
Alexei Podtelezhnikov9ef02bd2015-06-29 22:39:10 -0400563
5642015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
565
Alexei Podtelezhnikov884e4e62015-06-29 22:32:05 -0400566 [base] Implement fast vector normalization.
567
568 The function uses Newton's iterations instead of dividing vector
569 components by its length, which needs a square root. This is,
570 literally, a bit less accurate but a lot faster.
571
572 * src/base/ftcalc.c (FT_Vector_NormLen): New function.
573
Werner Lemberg22479ca2015-06-28 10:26:33 +02005742015-06-28 Werner Lemberg <wl@gnu.org>
575
Werner Lemberg7cdc77f2015-06-28 11:40:02 +0200576 * CMakeLists.txt: Always create `ftconfig.h'.
577
578 For non-UNIX builds, the file stays unmodified. However, it's
579 better to have the main configuration files at the same place
580 regardless of the OS.
581
5822015-06-28 Werner Lemberg <wl@gnu.org>
583
Werner Lemberg2c89e2c2015-06-28 11:06:47 +0200584 * CMakeLists.txt: Improve MSVC support (#43737).
585
5862015-06-28 Werner Lemberg <wl@gnu.org>
587
Werner Lemberg52c9b1a2015-06-28 11:03:10 +0200588 [cmake] Check for libraries and create `ftoption.h'.
589
590 * builds/FindHarfBuzz.cmake: New file, taken from
591
592 https://trac.webkit.org/browser/trunk/Source/cmake/FindHarfBuzz.cmake
593
594 * CMakeLists.Txt: Add path to local cmake modules.
595 Find dependencies for zlib, bzip2, libpng, and harfbuzz.
596 Create `ftoption.h' file.
597 Set up include and linker stuff for libraries.
598
5992015-06-28 Werner Lemberg <wl@gnu.org>
600
Werner Lemberg97b757d2015-06-28 10:42:47 +0200601 * CMakeLists.txt: Fix creation of `ftconfig.h'.
602 Check for UNIX header files using `check_include_file'.
603 Set up correct header include directories.
604
6052015-06-28 Werner Lemberg <wl@gnu.org>
606
Werner Lemberg22479ca2015-06-28 10:26:33 +0200607 * CMakeLists.txt: Disallow in-source builds.
608
Werner Lemberg802f6a92015-06-27 07:12:42 +02006092015-06-27 Werner Lemberg <wl@gnu.org>
610
611 * src/tools/docmaker/utils.py (check_output): Add missing `\n'.
612
Werner Lemberg94c79c22015-06-26 06:46:59 +02006132015-06-26 Werner Lemberg <wl@gnu.org>
614
Werner Lemberg802f6a92015-06-27 07:12:42 +0200615 * CMakeLists.txt: Select platform-dependent `ftdebug.c'.
Werner Lemberg94c79c22015-06-26 06:46:59 +0200616
Werner Lemberg392cf222015-06-25 13:04:57 +02006172015-06-25 Werner Lemberg <wl@gnu.org>
618
Werner Lemberg68222dd2015-06-25 16:38:11 +0200619 * CMakeLists.txt: Use cmake functions for generating `ftconfig.h'.
620 Additionally, do this for UNIX only.
621
6222015-06-25 Werner Lemberg <wl@gnu.org>
623
Werner Lemberg5ef5a4f2015-06-25 15:45:13 +0200624 * CMakeLists.txt (BASE_SRCS): Use `ftbase.c' and `psnames.c'.
625
6262015-06-25 Werner Lemberg <wl@gnu.org>
627
Werner Lemberg392cf222015-06-25 13:04:57 +0200628 Another adjustment to header locations.
629
630 This change is a result of a discussion thread on freetype-devel
631
632 http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html
633
634 Re-introduce the `freetype2' subdirectory for all FreeType header
635 files after installation, and rename the `freetype2' subdirectory in
636 the git repository to `freetype'.
637
638 * include/freetype2: Renamed to...
639 * include/freetype: This.
640
641 * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
642 PRIVATE_HEADERS): Updated.
643 Update creation of `ftconfig.h'.
644 Install generated `ftconfig.h'.
645
646 * Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
647
648 * builds/amiga/include/config/ftconfig.h, builds/freetype.mk
649 (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
650 builds/unix/freetype2.in: Updated.
651
652 * builds/unix/freetype-config.in: Updated.
653 * builds/unix/configure.raw: Don't check for `rmdir'.
654 * builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable
655 according to the autoconf info manual.
656 * builds/unix/install.mk (install, uninstall,
657 distclean_project_unix): Update and simplify.
658
659 * builds/wince/*, builds/windows/*: Updated.
660
661 * devel/ft2build.h, include/ft2build.h: Updated.
662
663 * include/freetype2/config/ftheader.h,
664 include/freetype2/internal/ftserv.h,
665 include/freetype2/internal/internal.h: Update all header file
666 macros.
667
668 * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
669
670 * docs/*: Updated.
671
Werner Lemberg1982a882015-06-26 06:52:34 +02006722015-06-24 Alexei Podtelezhnikov <apodtele@gmail.com>
673
674 * src/bdf/bdflib.c (_bdf_parse_start): Disallow 0 bpp.
675
6762015-06-24 Alexei Podtelezhnikov <apodtele@gmail.com>
677
678 * src/bdf/bdflib.c (_bdf_parse_start): Simplify bpp parsing.
679
Werner Lemberg59312682015-06-23 09:24:48 +02006802015-06-23 Werner Lemberg <wl@gnu.org>
681
682 s/TYPEOF/FT_TYPEOF/ (#45376).
683
684 * builds/unix/ftconfig.in, builds/vms/ftconfig.in,
685 include/freetype2/config/ftconfig.h,
686 include/freetype2/internal/ftobjs.h, src/autofit/afwarp.h: Do it.
687
Werner Lemberg8502c982015-06-22 06:35:23 +02006882015-06-22 Werner Lemberg <wl@gnu.org>
689
690 Fix Savannah bug #45097.
691
692 We no longer `pollute' the namespace of possible header file names;
693 instead we move `ft2build.h' up by one level so that it gets
694 installed in the default include directory (e.g.,
695 /usr/local/include). After this commit, only `ft2build.h' stays in
696 the compiler's include path.
697
698 No visible changes for the user who follows the standard FreeType
699 header inclusion rules.
700
701 * include/*: Move to ...
702 * include/freetype2/*: This directory, except `ft2build.h'.
703
704 * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
705 PRIVATE_HEADERS), Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
706
707 * builds/amiga/include/config/ftconfig.h, builds/freetype.mk
708 (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
709 builds/unix/install.mk (install, uninstall),
710 builds/unix/freetype2.in: Updated.
711
712 * builds/unix/freetype-config.in: Updated.
713 Emit -I directory only if it is not `/usr/include'.
714
715 * builds/wince/*, builds/windows/*: Updated.
716
717 * devel/ft2build.h, include/ft2build.h: Updated.
718
719 * include/freetype2/config/ftheader.h,
720 include/freetype2/internal/ftserv.h,
721 include/freetype2/internal/internal.h: Update all header file
722 macros.
723
724 * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
725
Werner Lemberg31d97df2015-06-21 19:12:12 +02007262015-06-21 Werner Lemberg <wl@gnu.org>
727
728 Make Jam support work again.
729
730 This is just very basic stuff and just a little bit tested on
731 GNU/Linux only. I won't delve into this since I'm not a Jam user.
732
733 * Jamfile: Call `HDRMACRO' for `ftserv.h' also.
734 (DEFINES): Replace with...
735 (CCFLAGS): ... this.
736
737 * src/Jamfile: Don't call `HDRMACRO' for `internal.h'; this is
738 already handled in the top-level Jamfile.
739
740 * src/autofit/Jamfile (DEFINES): Replace with...
741 (CCFLAGS): ... this.
742 (_sources): Add missing files.
743
744 * src/cache/Jamfile: Don't call `HDRMACRO' for `ftcache.h'; it no
745 longer contains macro header definitions.
746
747 * src/base/Jamfile, src/cff/Jamfile, src/sfnt/Jamfile,
748 src/truetype/Jamfile (_sources): Add missing files.
749
Werner Lemberg1a147ac2015-06-16 10:20:07 +02007502015-06-16 Werner Lemberg <wl@gnu.org>
751
752 Fix Savannah bug #45326.
753
754 * src/sfnt/sfntpic.h (SFNT_SERVICES_GET): Remove duplicate
755 definitions.
756
Werner Lemberge1862302015-06-07 16:11:18 +02007572015-06-07 Werner Lemberg <wl@gnu.org>
758
759 * Version 2.6 released.
760 =======================
761
762
763 Tag sources with `VER-2-6'.
764
765 * docs/VERSION.DLL: Update documentation and bump version number to
766 2.6.
767
768 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
769 builds/windows/vc2005/index.html,
770 builds/windows/vc2008/freetype.vcproj,
771 builds/windows/vc2008/index.html,
772 builds/windows/vc2010/freetype.vcxproj,
773 builds/windows/vc2010/index.html,
774 builds/windows/visualc/freetype.dsp,
775 builds/windows/visualc/freetype.vcproj,
776 builds/windows/visualc/index.html,
777 builds/windows/visualce/freetype.dsp,
778 builds/windows/visualce/freetype.vcproj,
779 builds/windows/visualce/index.html,
780 builds/wince/vc2005-ce/freetype.vcproj,
781 builds/wince/vc2005-ce/index.html,
782 builds/wince/vc2008-ce/freetype.vcproj,
783 builds/wince/vc2008-ce/index.html: s/2.5.5/2.6/, s/255/26/.
784
785 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 6.
786 (FREETYPE_PATCH): Set to 0.
787
788 * builds/unix/configure.raw (version_info): Set to 18:0:12.
789 * CMakeLists.txt (VERSION_MINOR): Set to 0.
790 (VERSION_PATCH): Set to 6.
791
792 * src/autofit/afmodule.c [!FT_MAKE_OPTION_SINGLE_OBJECT]: Add
793 declarations for dumping functions.
794
795 * src/truetype/ttinterp.c (TT_New_Context): Pacify compiler.
796
797 * builds/toplevel.mk: Use `freetype.mk's code to compute the version
798 string.
799 Don't include a zero patch level in version string.
800 * builds/freetype.mk: Remove code for computing the version string.
801
Ashish Azad472119a2015-06-06 05:45:17 +02008022015-06-06 Ashish Azad <ashish.azad@samsung.com>
803
804 Fix Savannah bug #45260.
805
806 * src/pfr/pfrdrivr.c (pfr_get_kerning): Fix typo.
807
Werner Lemberg75534a02015-06-03 00:54:09 +02008082015-06-03 Werner Lemberg <wl@gnu.org>
809
810 [truetype] Fix memory leak.
811
812 Problem reported by Grissiom <chaos.proton@gmail.com>; in
813
814 http://lists.nongnu.org/archive/html/freetype/2015-05/msg00013.html
815
816 there is an example code to trigger the bug.
817
818 * src/truetype/ttobjs.c (tt_size_init_bytecode): Free old `size'
819 data before allocating again. Bug most probably introduced four
820 years ago in version 2.4.3.
821
8222015-06-02 Werner Lemberg <wl@gnu.org>
Werner Lemberg54d04282015-06-01 12:12:06 +0200823
Werner Lembergd1ade6d2015-06-02 11:44:52 +0200824 [raster] Add more tracing.
825
826 * src/raster/ftraster.c (FT_TRACE7) [_STANDALONE_]: Define.
827 (Vertical_Sweep_Span, Vertical_Sweep_Drop, Horizontal_Sweep_Span,
828 Horizontal_Sweep_Drop, Render_Glyph): Add tracing calls.
829
8302015-06-01 Werner Lemberg <wl@gnu.org>
831
Werner Lemberg54d04282015-06-01 12:12:06 +0200832 [truetype] While tracing opcodes, show code position and stack.
833
834 * src/truetype/ttinterp.c: Change all existing TRACE7 calls to
835 TRACE6.
836 (opcode_name): Add string lengths.
837 (TT_RunIns): Implement display of code position and stack.
838
Werner Lembergcdee7d12015-05-31 11:54:42 +02008392015-05-31 Werner Lemberg <wl@gnu.org>
840
Werner Lemberge9df4e42015-05-31 12:21:34 +0200841 [truetype] In GX, make private point numbers work correctly.
842
843 This is completely missing in Apple's documentation: If a `gvar'
844 tuple uses private point numbers (this is, deltas are specified for
845 some points only), the uncovered points must be interpolated for
846 this tuple similar to the IUP bytecode instruction. Examples that
847 need this functionality are glyphs `Oslash' and `Q' in Skia.ttf.
848
849 * src/truetype/ttgxvar.c (tt_delta_shift, tt_delta_interpolate,
850 tt_handle_deltas): New functions.
851 (TT_Vary_Get_Glyph_Deltas): Renamed to...
852 (TT_Vary_Apply_Glyph_Deltas): ... this; it directly processes the
853 points and does no longer return an array of deltas.
854 Add tracing information.
855 Call `tt_handle_deltas' to interpolate missing deltas.
856 Also fix a minor memory leak in case of error.
857
858 * src/truetype/ttgxvar.h: Updated.
859
860 * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
861 load_truetype_glyph): Updated.
862
8632015-05-31 Werner Lemberg <wl@gnu.org>
864
Werner Lemberg9845c1d2015-05-31 11:57:31 +0200865 [truetype] In GX, make intermediate tuplets work at extrema.
866
867 * src/truetype/ttgxvar.c (ft_var_apply_tuple): Fix range condition.
868
8692015-05-31 Werner Lemberg <wl@gnu.org>
870
Werner Lembergcdee7d12015-05-31 11:54:42 +0200871 [truetype] Add tracing information to GX code.
872
873 * src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar,
874 ft_var_apply_tuple, TT_Get_MM_Var, TT_Set_MM_Blend,
875 TT_Set_Var_Design, tt_face_vary_cvt): Do it.
876
Werner Lemberg366b2ea2015-05-28 10:58:40 +02008772015-05-28 Werner Lemberg <wl@gnu.org>
878
879 * src/tools/apinames.c (names_dump): Fix invalid reference.
880
881 Problem reported by Guzman Mosqueda, Jose R
882 <jose.r.guzman.mosqueda@intel.com>.
883
Werner Lemberga5e1f6f2015-05-24 23:29:23 +02008842015-05-24 Werner Lemberg <wl@gnu.org>
885
886 [truetype] Fix commit from 2015-05-22.
887
888 * src/truetype/ttgload.c, src/truetype/ttinterp.c: Guard new code
889 with `TT_CONFIG_OPTION_SUBPIXEL_HINTING'.
890
891 Problem reported by Nikolaus Waxweiler <madigens@gmail.com>.
892
Werner Lembergbb435da2015-05-23 07:21:25 +02008932015-05-23 Werner Lemberg <wl@gnu.org>
894
Werner Lemberg7f099482015-05-24 09:50:24 +0200895 [truetype] Fix return values of GETINFO bytecode instruction.
896
897 * src/truetype/ttinterp.h (TT_ExecContextRec): New fields
898 `vertical_lcd' and `gray_cleartype'.
899
900 * src/truetype/ttgload.c (tt_loader_init): Initialize new fields.
901 Change `symmetrical smoothing' to TRUE, since FreeType produces
902 exactly this.
903
904 * src/truetype/ttinterp.c (Ins_GETINFO): Fix selector/return bit
905 values for symmetrical smoothing, namely 11/18.
906 Handle bits for vertical LCD subpixels (8/15) and Gray ClearType
907 (12/19).
908
9092015-05-23 Werner Lemberg <wl@gnu.org>
910
Werner Lembergbb435da2015-05-23 07:21:25 +0200911 [truetype] Minor.
912
913 * src/truetype/ttinterp.h (TT_ExecContext):
914 s/subpixel/subpixel_hinting.
915
916 * src/truetype/ttgload.c, src/truetype/ttgload.h: Updated.
917
9182015-05-22 Werner Lemberg <wl@gnu.org>
Werner Lemberg790b8df2015-05-20 12:33:40 +0200919
Werner Lembergc61cad82015-05-22 22:02:15 +0200920 [truetype] Support selector index 3 of the INSTCTRL instruction.
921
922 This flag activates `native ClearType hinting', disabling backwards
923 compatibility mode as described in Greg Hitchcocks whitepaper. In
924 other words, it enables unrestricted functionality of all TrueType
925 instructions in ClearType.
926
927 * src/truetype/ttgload.c (tt_get_metrics): Call `sph_set_tweaks'
928 unconditionally.
929 (tt_loader_init): Unset `ignore_x_mode' flag if bit 2 of
930 `GS.instruct_control' is active.
931
932 * src/truetype/ttinterp.c (Ins_INSTCTRL): Handle selector index 3.
933 (Ins_GETINFO): Updated.
934
935 * docs/CHANGES: Document it.
936
9372015-05-20 Werner Lemberg <wl@gnu.org>
938
Werner Lemberg790b8df2015-05-20 12:33:40 +0200939 [truetype] Minor.
940
941 * src/truetype/ttinterp.h (SetSuperRound): Fix type of `GridPeriod'
942 argument.
943
Werner Lemberg0a6b6ff2015-05-17 22:54:48 +02009442015-05-17 Werner Lemberg <wl@gnu.org>
945
946 [truetype] Fix loading of composite glyphs.
947
948 * src/truetype/ttgload.c (TT_Load_Composite_Glyph): If the
949 ARGS_ARE_XY_VALUES flag is not set, handle argument values as
950 unsigned. I trust `ttx' (which has exactly such code) that it does
951 the right thing here...
952
953 The reason that noone has ever noticed this bug is probably the fact
954 that point-aligned subglyphs are rare, as are subglyphs with a
955 number of points in the range [128;255], which is quite large (or
956 even in the range [32768;65535], which is extremely unlikely).
957
Chris Liddelld65bf722015-05-12 07:16:46 +02009582015-05-12 Chris Liddell <chris.liddell@artifex.com>
959
Chris Liddella87fb8c2015-05-12 07:27:35 +0200960 [cff] Make the `*curveto' operators more tolerant.
961
962 * src/cff/cf2intrp.c (cf2_interpT2CharString): The opcodes
963 `vvcurveto', `hhcurveto', `vhcurveto', and `hvcurveto' all iterate,
964 pulling values off the stack until the stack is exhausted.
965 Implicitly the stack must be a multiple (or for subtly different
966 behaviour) a multiple plus a specific number of extra values deep.
967 If that's not the case, enforce it (as the old code did).
968
9692015-05-12 Chris Liddell <chris.liddell@artifex.com>
970
Chris Liddelld65bf722015-05-12 07:16:46 +0200971 [cff] fix incremental interface with new cff code.
972
973 * src/cff/cf2ft.c (cf2_getSeacComponent): When using the incremental
974 interface to retrieve glyph data for a SEAC, it be left to the
975 incremental interface callback to apply the encoding to raw
976 character index (as it was in the previous code).
977
Alexei Podtelezhnikov40914952015-04-29 21:57:30 -04009782015-04-29 Alexei Podtelezhnikov <apodtele@gmail.com>
979
980 [autofit] Speed up IUP.
981
982 * src/autofit/afhints.c (af_iup_interp): Separate trivial snapping to
983 the same position from true interpolation, use `scale' to reduce
984 divisions.
985
Werner Lemberg3cc076d2015-04-28 09:16:27 +02009862015-04-28 Werner Lemberg <wl@gnu.org>
987
988 [cff] Use `name' table for PS name if we have a SFNT-CFF.
989
990 This follows the OpenType 1.7 specification. See
991
992 http://tug.org/pipermail/tex-live/2015-April/036634.html
993
994 for a discussion.
995
996 * src/cff/cffdrivr.c (cff_get_ps_name): Use the `sfnt' service if we
997 have an SFNT.
998
Alexei Podtelezhnikov40623a12015-04-27 22:27:00 -04009992015-04-27 Alexei Podtelezhnikov <apodtele@gmail.com>
1000
1001 [truetype] Speed up IUP.
1002
1003 * src/truetype/ttinterp.c (_iup_worker_interpolate): Separate trivial
1004 snapping to the same position from true interpolation.
1005
Werner Lemberg12661a52015-04-21 07:13:59 +020010062015-04-21 Werner Lemberg <wl@gnu.org>
1007
Werner Lemberg14df6b12015-04-22 11:14:35 +02001008 [autofit] By default, enable warping code but switch off warping.
1009
1010 Suggested by Behdad.
1011
1012 * include/config/ftoption.h: Define AF_CONFIG_OPTION_USE_WARPER.
1013
1014 * src/autofit/afmodule.c (af_autofitter_init): Initialize `warping'
1015 with `false'.
1016
10172015-04-21 Werner Lemberg <wl@gnu.org>
1018
Werner Lembergd164f702015-04-21 07:51:41 +02001019 * docs/CHANGES: Updated.
1020
10212015-04-21 Werner Lemberg <wl@gnu.org>
1022
Werner Lemberg12661a52015-04-21 07:13:59 +02001023 [autofit] Introduce `warping' property.
1024
1025 This code replaces the debugging hook from the previous commit with
1026 a better, more generic solution.
1027
1028 * include/ftautoh.h: Document it.
1029
1030 * src/autofit/afmodule.h (AF_ModuleRec)
1031 [AF_CONFIG_OPTION_USE_WARPER]: Add `warping' field.
1032
1033 * src/autofit/afmodule.c (_af_debug_disable_warper): Remove.
1034 (af_property_set, af_property_get, af_autofitter_init)
1035 [AF_CONFIG_OPTION_USE_WARPER]: Handle `warping' option.
1036
1037 * src/autofit/afhints.h (AF_HINTS_DO_WARP): Remove use of the no
1038 longer existing `_af_debug_disable_warper'.
1039
1040 * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c
1041 (af_latin_hints_init), src/autofit/aflatin2.c (af_latin2_hints_init)
1042 [AF_CONFIG_OPTION_USE_WARPER]: Add `AF_SCALER_FLAG_NO_WARPER' to the
1043 scaler flags if warping is off.
1044
1045 * src/autofit/aftypes.h: Updated.
1046
Werner Lemberg58f48f02015-04-16 20:11:49 +020010472015-04-16 Werner Lemberg <wl@gnu.org>
1048
1049 [autofit] Add debugging hook to disable warper.
1050
1051 * src/autofit/afmodule.c (_af_debug_disable_warper)
1052 [FT_DEBUG_AUTOFIT]: New global variable.
1053
1054 * src/autofit/aftypes.h: Updated.
1055 (AF_SCALER_FLAG_NO_WARPER): New macro (not actively used yet).
1056
1057 * src/autofit/afhints.h (AF_HINTS_DO_WARP): New macro.
1058
1059 * src/autofi/aflatin.c (af_latin_hints_apply)
1060 [AF_CONFIG_OPTION_USE_WARPER]: Use `AF_HINTS_DO_WARP' to control use
1061 of warper.
1062
1063 * src/autofit/afcjk.c (af_cjk_hints_init, af_cjk_hints_apply)
1064 [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'.
1065
1066 * src/autofit/aflatin2.c (af_latin2_hints_apply)
1067 [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'.
1068
Werner Lemberg5cd21552015-04-10 07:01:01 +020010692015-04-10 Werner Lemberg <wl@gnu.org>
1070
1071 [cff] Update advance width handling to OpenType 1.7.
1072
1073 Problem reported by Behdad.
1074
1075 * src/cff/cffdrivr.c (cff_get_advances): Handle SFNT case
1076 separately.
1077
1078 * src/cff/cffgload.c (cff_slot_load): Use advance width and side
1079 bearing values from `hmtx' table if present.
1080
Alexei Podtelezhnikov67b912d2015-04-03 22:38:11 -040010812015-04-03 Alexei Podtelezhnikov <apodtele@gmail.com>
1082
1083 * src/autofit/afhints.c (af_glyph_hints_reload): Use do-while loop.
1084
Alexei Podtelezhnikov770b5d02015-04-02 23:15:36 -040010852015-04-02 Alexei Podtelezhnikov <apodtele@gmail.com>
1086
1087 * src/autofit/aflatin.c (af_latin_hint_edges): Reduce logic.
1088
10892015-04-01 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov886f4d02015-04-01 22:57:43 -04001090
1091 [autofit] Finish the thought.
1092
1093 * src/autofit/afhints.c (af_direction_compute): make sure the long arm
1094 is never negative so that its `FT_ABS' is not necessary.
1095
Werner Lemberg16217e52015-04-01 13:13:56 +020010962015-04-01 Werner Lemberg <wl@gnu.org>
1097
Werner Lemberga2fa6572015-04-01 15:55:41 +02001098 [autofit] Call dumper functions for tracing.
1099
1100 * src/autofit/afcjk.c (af_cjk_hints_apply): Remove dead code.
1101 * src/autofit/afhints.c (af_glyph_hints_dump_points): Minor
1102 improvement.
1103 * src/autofit/afmodule.c (af_autofitter_load_glyph): Implement it.
1104
11052015-04-01 Werner Lemberg <wl@gnu.org>
1106
Werner Lembergdb8df792015-04-01 13:30:55 +02001107 [autofit] Make debugging stuff work again.
1108
1109 The interface to ftgrid was broken in the series of commits starting
1110 with
1111
1112 [autofit] Allocate AF_Loader on the stack instead of AF_Module.
1113
1114 from 2015-01-14.
1115
1116 * src/autofit/afmodule.c (_af_debug_hints_rec) [FT_DEBUG_AUTOFIT]:
1117 Use a global AF_GlyphHintsRec object for debugging.
1118 (af_autofitter_done, af_autofitter_load_glyph): Updated.
1119
1120 * src/autofit/afloader.c (af_loader_init, af_loader_done): Updated.
1121
11222015-04-01 Werner Lemberg <wl@gnu.org>
1123
Werner Lemberg16217e52015-04-01 13:13:56 +02001124 * src/autofit/afhints.c (af_glyph_hints_done): Fix minor thinko.
1125
Werner Lemberg10e2bb82015-03-29 13:32:47 +020011262015-03-29 Werner Lemberg <wl@gnu.org>
1127
Werner Lembergf353a382015-03-29 14:47:49 +02001128 [cff] Fix Savannah bug #44629.
1129
1130 * src/cff/cf2font.h (CF2_MAX_SUBR), src/cff/cffgload.h
1131 (CFF_MAX_SUBRS_CALLS): Set to 16.
1132
11332015-03-29 Werner Lemberg <wl@gnu.org>
1134
Werner Lemberg10e2bb82015-03-29 13:32:47 +02001135 [type1, truetype] Make the MM API more flexible w.r.t. `num_coords'.
1136
1137 This commit allows `num_coords' to be larger or smaller than the
1138 number of available axes while selecting a design instance, either
1139 ignoring excess data or using defaults if data is missing.
1140
1141 * src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design):
1142 Implement it.
1143
1144 * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design,
1145 T1_Set_Var_Design): Ditto.
1146
11472015-03-29 Werner Lemberg <wl@gnu.org>
Werner Lemberg8ce30262015-03-27 08:33:47 +01001148
Werner Lembergdd5d6d72015-03-29 10:04:22 +02001149 [type1] Minor.
1150
1151 * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design): Use
1152 FT_THROW.
1153 (T1_Set_Var_Design): Use T1_MAX_MM_AXIS and FT_THROW.
1154
11552015-03-27 Werner Lemberg <wl@gnu.org>
1156
Werner Lemberg8ce30262015-03-27 08:33:47 +01001157 [cff] Trace charstring nesting levels.
1158
1159 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdCALLGSUBR,
1160 cf2_cmdCALLSUBR, cf2_cmdRETURN>: Implement it.
1161
1162 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
1163 <cff_op_callsubr, cff_op_callgsubr, cff_op_return>: Ditto.
1164
Alexei Podtelezhnikovdac56442015-03-21 23:30:16 -040011652015-03-21 Alexei Podtelezhnikov <apodtele@gmail.com>
1166
1167 [base] Optimize `FT_Angle_Diff'.
1168
1169 Under normal circumstances we are usually close to the desired range
1170 of angle values, so that the remainder is not really necessary.
1171
1172 * src/base/fttrigon.c (FT_Angle_Diff): Use loops instead of remainder.
1173
1174 * src/autofit/aftypes.h (AF_ANGLE_DIFF): Ditto in the unused macro.
1175
Werner Lemberg6cc425d2015-03-21 06:51:07 +010011762015-03-21 Werner Lemberg <wl@gnu.org>
1177
1178 [truetype] Improve `gvar' handling.
1179
1180 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Correctly handle
1181 single-element runs. Cf. glyph `Q' in Skia.ttf with weights larger
1182 than the default.
1183
Alexei Podtelezhnikov2d7284e2015-03-20 21:34:19 -040011842015-03-20 Alexei Podtelezhnikov <apodtele@gmail.com>
1185
1186 * src/base/fttrigon.c (FT_Vector_Rotate): Minor refactoring.
1187
Alexei Podtelezhnikov6a171722015-03-17 22:43:08 -040011882015-03-17 Alexei Podtelezhnikov <apodtele@gmail.com>
1189
1190 Fix Savannah bug #44412 (part 2).
1191
1192 * src/base/fttrigon.c (FT_Sin, FT_Cos, FT_Tan): Call `FT_Vector_Unit'.
1193
Werner Lemberg06339952015-03-11 06:30:23 +010011942015-03-11 Werner Lemberg <wl@gnu.org>
1195
Werner Lembergd3284462015-03-11 16:45:58 +01001196 [autofit] Add support for Arabic script.
1197
1198 Thanks to Titus Nemeth <tn@tntypography.eu> for guidance!
1199
1200 * src/autofit/afblue.dat: Add blue zone data for Arabic.
1201
1202 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1203
1204 * src/autofit/afscript.h: Add Arabic standard characters.
1205
1206 * src/autofit/afranges.c: Add Arabic data.
1207
1208 * src/autofit/afstyles.h: Add Arabic data.
1209
1210 * docs/CHANGES: Document it.
1211
12122015-03-11 Werner Lemberg <wl@gnu.org>
1213
Werner Lemberga4516382015-03-11 08:09:13 +01001214 Rename `svxf86nm.h' to `svfntfmt.h'; update related symbols.
1215
1216 * include/internal/ftserv.h (FT_SERVICE_XFREE86_NAME_H): Renamed
1217 to...
1218 (FT_SERVICE_FONT_FORMAT_H): This.
1219
1220 * include/internal/services/svfntfmt.h (FT_XF86_FORMAT_*): Renamed
1221 to ...
1222 (FT_FONT_FORMAT_*): This.
1223
1224 src/base/ftfntfmt.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c,
1225 src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c,
1226 src/truetype/ttdriver.c, src/type1/t1driver.c,
1227 src/type42/t42drivr.c, src/winfonts/winfnt.c: Updated.
1228
12292015-03-11 Werner Lemberg <wl@gnu.org>
1230
Werner Lembergdd7028c2015-03-11 07:45:05 +01001231 [base] Rename `FT_XFREE86_H' to `FT_FONT_FORMATS_H'.
1232
1233 * include/config/ftheader.h: Implement it.
1234 * src/base/ftfntfmt.c, docs/CHANGES: Updated.
1235
12362015-03-11 Werner Lemberg <wl@gnu.org>
1237
Werner Lembergf4d1c112015-03-11 07:32:58 +01001238 [base] Rename `FT_Get_X11_Font_Format' to `FT_Get_Font_Format'.
1239
1240 * include/ftfntfmt.h, src/base/ftfntfmt.c: Implement it.
1241
1242 * docs/CHANGES: Updated.
1243
12442015-03-11 Werner Lemberg <wl@gnu.org>
1245
Werner Lembergcb0f7b62015-03-11 06:51:27 +01001246 Fix automatic copyright updating.
1247
1248 * src/tools/update-copyright: Make scanning of `no-copyright'
1249 actually work.
1250
1251 * src/tools/no-copyright: Don't include README in general.
1252
12532015-03-11 Werner Lemberg <wl@gnu.org>
1254
Werner Lemberg06339952015-03-11 06:30:23 +01001255 Rename `ftxf86.[ch]' to `ftfntfmt.[ch]'.
1256
1257 CMakeLists.txt, builds/amiga/makefile, builds/amiga/makefile.os4,
1258 builds/amiga/smakefile, builds/mac/FreeType.m68k_cfm.make.txt,
1259 builds/mac/FreeType.m68k_far.make.txt,
1260 builds/mac/FreeType.ppc_carbon.make.txt,
1261 builds/mac/FreeType.ppc_classic.make.txt, builds/symbian/bld.inf,
1262 builds/symbian/freetype.mmp, builds/wince/vc2005-ce/freetype.vcproj,
1263 builds/wince/vc2008-ce/freetype.vcproj,
1264 builds/windows/vc2005/freetype.vcproj,
1265 builds/windows/vc2008/freetype.vcproj,
1266 builds/windows/vc2010/freetype.vcxproj,
1267 builds/windows/vc2010/freetype.vcxproj.filters,
1268 builds/windows/visualc/freetype.dsp,
1269 builds/windows/visualc/freetype.vcproj,
1270 builds/windows/visualce/freetype.dsp,
1271 builds/windows/visualce/freetype.vcproj, docs/INSTALL.ANY,
1272 include/config/ftheader.h, include/ftfntfmt.h, modules.cfg,
1273 src/base/ftfntfmt.c, vms_make.com: Updated.
1274
Alexei Podtelezhnikov6b832c82015-03-10 23:25:49 -040012752015-03-10 Alexei Podtelezhnikov <apodtele@gmail.com>
1276
1277 Fix Savannah bug #44412 (part 1).
1278
1279 * src/base/ftstroke.c (ft_stroker_inside): Handle near U-turns.
1280
Werner Lembergeee7d8b2015-03-10 11:15:15 +010012812015-03-10 Werner Lemberg <wl@gnu.org>
1282
1283 [base] Rename `FT_Bitmap_New' to `FT_Bitmap_Init'.
1284
1285 * include/ftbitmap.h, src/base/ftbitmap.c: Implement it.
1286 Update all callers.
1287
1288 * docs/CHANGES: Updated.
1289
Werner Lemberg493cc032015-03-06 05:38:31 +010012902015-03-06 Werner Lemberg <wl@gnu.org>
1291
1292 * src/sfnt/ttload.c (tt_face_load_font_dir): Fix compiler warning.
1293
1294 Found by Alexei.
1295
Alexei Podtelezhnikovdd7498d2015-03-05 22:51:36 -050012962015-03-05 Alexei Podtelezhnikov <apodtele@gmail.com>
1297
1298 * src/base/ftstroke.c: Simplify.
1299
Werner Lemberg328b7922015-03-04 08:40:23 +010013002015-03-04 Werner Lemberg <wl@gnu.org>
1301
1302 [truetype] Some fixes and code refactoring in `ttgxvar.c'.
1303
1304 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix return value
1305 of `point_cnt' if two bytes are read.
1306 Use a more vertical coding style.
1307 (ft_var_readpackeddeltas): Use FT_UInt for `delta_cnt' parameter.
1308 Use a more vertical coding style.
1309
Werner Lemberga374c9c2015-03-03 11:23:45 +010013102015-03-03 Werner Lemberg <wl@gnu.org>
1311
1312 [autofit] Fix Savannah bug #44241.
1313
1314 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Reject glyphs
1315 with less than 3 points.
1316
Werner Lemberga07029e2015-03-02 06:54:08 +010013172015-03-02 Werner Lemberg <wl@gnu.org>
1318
1319 Simplify `TYPEOF' macro.
1320
1321 No need for two arguments.
1322
1323 * include/config/ftconfig.h, builds/unix/ftconfig.in,
1324 builds/vms/ftconfig.h (TYPEOF): Updated.
1325
1326 * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
1327 src/autofit/afwarp.h (AF_WARPER_FLOOR): Updated.
1328
13292015-03-01 Werner Lemberg <wl@gnu.org>
Werner Lemberg4b9234b2015-02-25 06:31:43 +01001330
Werner Lemberg851e8152015-03-01 19:27:09 +01001331 Various compiler warning fixes for `make multi'.
1332
1333 * src/autofit/afcjk.c (af_cjk_hints_compute_blue_edges),
1334 src/autofit/aflatin.c (af_latin_hint_compute_blue_edges,
1335 af_latin_hint_edges), src/autofit/aflatin2.c
1336 (af_latin2_hints_compute_blue_edges, af_latin2_hint_edges): Declare
1337 as `static'.
1338
1339 * src/cache/ftccmap.c (FTC_CMAP_QUERY_HASH, FTC_CMAP_NODE_HASH):
1340 Removed. Unused.
1341 * src/cache/ftcimage.c: Include FT_INTERNAL_OBJECTS_H.
1342 * src/cache/ftcmanag.c (FTC_LRU_GET_MANAGER): Removed. Unused.
1343
1344 * src/cff/cf2intrp.c: Include `cf2intrp.h'.
1345 * src/cff/cffdrivr.c (PAIR_TAG): Removed. Unused.
1346
1347 * src/gzip/ftgzip.c (NO_DUMMY_DECL): Removed. Unused.
1348
1349 * src/psaux/afmparse.c (afm_parser_read_int): Declare as `static'.
1350
1351 * src/pshinter/pshalgo.c (STRONGER, PSH_ZONE_MIN, PSH_ZONE_MAX):
1352 Removed. Unused.
1353
1354 * src/raster/ftraster.c (Render_Glyph): Declare as `static'.
1355
1356 * src/sfnt/ttpost.c (load_format_20): Fix signedness warning.
1357
1358 * src/truetype/ttdriver.c (PAIR_TAG): Removed. Unused.
1359 * src/truetype/ttsubpix.c (is_member_of_family_class,
1360 is_member_of_style_class): Declare as `static'.
1361
1362 * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Declare
1363 as `static'.
1364 * src/type1/t1load.c (mm_axis_unmap, mm_weights_unmap): Declare as
1365 `static'.
1366 (T1_FIELD_COUNT): Removed. Unused.
1367 * src/type1/t1parse.h (T1_Done_Table): Removed. Unused.
1368
1369 * src/type42/t42parse.c (T1_Done_Table): Removed. Unused.
1370
13712015-02-25 Werner Lemberg <wl@gnu.org>
1372
Werner Lemberg04c22372015-02-25 11:20:20 +01001373 [psaux] Signedness fixes.
1374
1375 * include/internal/psaux.h, src/psaux/afmparse.c,
1376 src/psaux/afmparse.h, src/psaux/psconv.c, src/psaux/psobjs.c,
1377 src/psaux/t1cmap.c, src/psaux/t1decode.c: Apply.
1378
13792015-02-25 Werner Lemberg <wl@gnu.org>
1380
Werner Lembergd25ec162015-02-25 09:19:59 +01001381 [otvalid] Signedness fixes.
1382
1383 * src/otvalid/otvcommn.c, src/otvalid/otvgdef.c,
1384 src/otvalid/otvgpos.c, src/otvalid/otvgsub.c, src/otvalid/otvmath.c:
1385 Apply.
1386
13872015-02-25 Werner Lemberg <wl@gnu.org>
1388
Werner Lemberg5c9d9bf2015-02-25 08:13:40 +01001389 * src/bzip2/ftbzip2.c (ft_bzip2_alloc): Signedness fix.
1390
13912015-02-25 Werner Lemberg <wl@gnu.org>
1392
Werner Lemberg83d41812015-02-25 08:10:58 +01001393 [lzw] Signedness fixes.
1394
1395 * src/lzw/ftzopen.c, src/lzw/ftzopen.h: Apply.
1396
13972015-02-25 Werner Lemberg <wl@gnu.org>
1398
Werner Lemberg17b62912015-02-25 07:53:09 +01001399 [gxvalid] Signedness fixes.
1400
1401 * src/gxvalid/gxvbsln.c, src/gxvalid/gxvcommn.c,
1402 src/gxvalid/gxvcommn.h, src/gxvalid/gxvjust.c,
1403 src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmort.c,
1404 src/gxvalid/gxvmort1.c, src/gxvalid/gxvmort2.c,
1405 src/gxvalid/gxvmorx.c, src/gxvalid/gxvmorx1.c,
1406 src/gxvalid/gxvmorx2.c, src/gxvalid/gxvopbd.c,
1407 src/gxvalid/gxvprop.c, src/gxvalid/gxvtrak.c: Apply.
1408
14092015-02-25 Werner Lemberg <wl@gnu.org>
1410
Werner Lemberg24e4e962015-02-25 06:57:16 +01001411 [cache] Signedness fixes.
1412
1413 * src/cache/ftcbasic.c, src/cache/ftccmap.c, src/cache/ftcimage.c,
1414 src/cache/ftcmanag.c, src/cache/ftcsbits.c: Apply.
1415
14162015-02-25 Werner Lemberg <wl@gnu.org>
1417
Werner Lemberg559727d2015-02-25 06:55:00 +01001418 Change dimension fields in `FTC_ImageTypeRec' to unsigned type.
1419
1420 This doesn't break ABI.
1421
1422 * include/ftcache.h (FTC_ImageTypeRec): Use unsigned types for
1423 `width' and `height'.
1424
1425 * docs/CHANGES: Document it.
1426
14272015-02-25 Werner Lemberg <wl@gnu.org>
1428
Werner Lemberg4b9234b2015-02-25 06:31:43 +01001429 [cache] Don't use `labs'.
1430
1431 This is the only place in FreeType where this function was used.
1432
1433 * include/config/ftstdlib.h (ft_labs): Remove.
1434
1435 * src/cache/ftcimage.c (ftc_inode_weight): Replace `ft_labs' with
1436 `FT_ABS'.
1437
Werner Lemberg4d1f7af2015-02-23 07:04:36 +010014382015-02-23 Werner Lemberg <wl@gnu.org>
1439
Werner Lemberg3aaebe32015-02-23 08:20:27 +01001440 [cache] Replace `FT_PtrDist' with `FT_Offset'.
1441
1442 * src/cache/ftccache.h (FTC_NodeRec): `FT_Offset' (a.k.a. `size_t')
1443 is a better choice for `hash' to hold a pointer than `FT_PtrDist'
1444 (a.k.a. `ptrdiff_t'), especially since the latter is signed,
1445 causing zillions of signedness warnings. [Note that `hash' was of
Werner Lemberg17b62912015-02-25 07:53:09 +01001446 type `FT_UInt32' before the change to `FT_PtrDist'.]
Werner Lemberg3aaebe32015-02-23 08:20:27 +01001447 Update all users.
1448
1449 * src/cache/ftcbasic.c, src/cache/ftccache.c, src/cache/ftccmap.c,
1450 src/cache/ftcglyph.c, src/cache/ftcglyph.h: Updated.
1451
14522015-02-23 Werner Lemberg <wl@gnu.org>
1453
Werner Lemberg4d1f7af2015-02-23 07:04:36 +01001454 [smooth, raster] Re-enable standalone compilation.
1455
1456 * src/raster/ftraster.c (FT_RENDER_POOL_SIZE, FT_MAX)
1457 [_STANDALONE_]: Define macros.
1458
1459 * src/smooth/ftgrays.c (FT_RENDER_POOL_SIZE, FT_MAX, FT_ABS,
1460 FT_HYPOT) [_STANDALONE_]: Define macros.
1461
Werner Lemberg03ccfd02015-02-22 08:25:16 +010014622015-02-22 Werner Lemberg <wl@gnu.org>
1463
Werner Lembergcb13e712015-02-23 06:41:52 +01001464 [smooth] Signedness fixes.
1465
1466 * src/smooth/ftgrays.c, src/smooth/ftsmooth.c: Apply.
1467
14682015-02-22 Werner Lemberg <wl@gnu.org>
1469
Werner Lemberga974e9a2015-02-22 21:02:13 +01001470 * src/raster/ftraster.c: Use the file's typedefs everywhere.
1471
14722015-02-22 Werner Lemberg <wl@gnu.org>
1473
Werner Lembergb0ebcdc2015-02-22 20:42:49 +01001474 * src/sfnt/ttpost.c (load_format_20): Fix error tracing message.
1475
1476 Bug introduced 6 commits earlier.
1477
14782015-02-22 Werner Lemberg <wl@gnu.org>
1479
Werner Lemberg22b1d5c2015-02-22 20:41:03 +01001480 [pshinter] Fix thinko.
1481
1482 * src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Correctly
1483 check `count'.
1484 Bug introduced two commits earlier.
1485
14862015-02-22 Werner Lemberg <wl@gnu.org>
1487
Werner Lembergca96fe02015-02-22 20:05:04 +01001488 [raster] Signedness fixes.
1489
1490 * src/raster/ftraster.c, src/raster/ftrend1.c: Apply.
1491
14922015-02-22 Werner Lemberg <wl@gnu.org>
1493
Werner Lemberg452066c2015-02-22 15:59:02 +01001494 [pshinter] Signedness fixes.
1495
1496 * src/pshinter/pshalgo.c, src/pshinter/pshglob.c,
1497 src/pshinter/pshrec.c: Apply.
1498
14992015-02-22 Werner Lemberg <wl@gnu.org>
1500
Werner Lemberg41c2ed82015-02-22 15:57:47 +01001501 [pshinter] Use macros for (unsigned) flags, not enumerations.
1502
1503 * src/pshinter/pshalgo.h (PSH_Hint_Flags): Replace with macros.
1504 Updated.
1505 * src/pshinter/pshrec.h (PS_Hint_Flags): Replace with macros.
1506
15072015-02-22 Werner Lemberg <wl@gnu.org>
1508
Werner Lemberg25c2f882015-02-22 15:54:31 +01001509 * src/pshinter/pshrec.c: Simplify.
1510 (ps_hints_open, ps_hints_stem): Remove switch statement.
1511
15122015-02-22 Werner Lemberg <wl@gnu.org>
1513
Werner Lemberg01f08422015-02-22 12:03:28 +01001514 [sfnt] Signedness fixes.
1515
1516 * src/sfnt/pngshim.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap.c,
1517 src/sfnt/ttkern.c, src/sfnt/ttload.c, src/sfnt/ttpost.c,
1518 src/sfnt/ttsbit.c: Apply.
1519 * src/sfnt/sfdriver.c: Apply.
1520 (sfnt_get_ps_name): Simplify.
1521
15222015-02-22 Werner Lemberg <wl@gnu.org>
1523
Werner Lemberg3c374c82015-02-22 09:16:53 +01001524 [bdf] Signedness fixes.
1525
1526 * src/bdf/bdf.h, src/bdf/bdfdrivr.c, src/bdf/bdfdrivr.h,
1527 src/bdf/bdflib.c: Apply.
1528
15292015-02-22 Werner Lemberg <wl@gnu.org>
1530
Werner Lembergb13945a2015-02-22 09:15:47 +01001531 * src/bdf/bdflib.c (_bdf_atous): New function.
1532 (_bdf_parse_glyphs, _bdf_parse_start): Use it.
1533
15342015-02-22 Werner Lemberg <wl@gnu.org>
1535
Werner Lemberg03ccfd02015-02-22 08:25:16 +01001536 [pcf] Signedness fixes.
1537
1538 * src/pcf/pcf.h, src/pcf/pcfdrivr.c: Apply.
1539 * src/pcf/pcfread.c: Apply.
1540 (pcf_get_encodings): Ignore invalid negative encoding offsets.
1541
Werner Lemberg633a7292015-02-21 07:02:01 +010015422015-02-21 Werner Lemberg <wl@gnu.org>
1543
Werner Lemberg3d7e53f2015-02-21 11:30:54 +01001544 * src/winfonts/winfnt.c: Signedness fixes.
1545
15462015-02-21 Werner Lemberg <wl@gnu.org>
1547
Werner Lemberg7b6b4172015-02-21 10:39:34 +01001548 [type42] Signedness fixes.
1549
1550 * src/type42/t42parse.c, src/type42/t42parse.h,
1551 src/type42/t42types.h: Apply.
1552
15532015-02-21 Werner Lemberg <wl@gnu.org>
1554
Werner Lemberg8bfffb42015-02-21 09:52:29 +01001555 [pfr] Signedness fixes.
1556
1557 * src/pfr/pfrdrivr.c, src/pfr/pfrgload.c, src/pfr/pfrload.c,
1558 src/pfr/pfrload.h, src/pfr/pfrobjs.c, src/pfr/pfrsbit.c,
1559 src/pfr/pfrtypes.h: Apply.
1560
15612015-02-21 Werner Lemberg <wl@gnu.org>
1562
Werner Lemberg633a7292015-02-21 07:02:01 +01001563 [cff] Minor signedness fixes related to last commit.
1564
1565 * src/cff/cf2ft.c, src/cff/cf2intrp.c, src/cff/cffgload.c: Apply.
1566
Werner Lemberg3a8d0532015-02-20 08:35:32 +010015672015-02-20 Werner Lemberg <wl@gnu.org>
1568
Werner Lembergc00b05f2015-02-20 20:42:55 +01001569 [cff] Thinkos in bias handling.
1570
1571 Only the final result is always positive.
1572
1573 Bug introduced three commits earlier.
1574
1575 * src/cff/cffgload.c, src/cff/cffgload.h: Apply.
1576
15772015-02-20 Werner Lemberg <wl@gnu.org>
1578
Werner Lemberg2bf03eb2015-02-20 20:14:11 +01001579 [cid] Fix signedness issues and emit some better error codes.
1580
1581 * src/cid/cidgload.c, src/cid/cidload.h, src/cid/cidobjs.c,
1582 src/cid/cidparse.h: Apply.
1583 * src/cid/cidload.c: Apply.
1584 (parse_fd_array): Reject negative values for number of dictionaries.
1585 * src/cid/cidparse.c: Apply.
1586 (cid_parser_new): Reject negative values for hex data length.
1587
15882015-02-20 Werner Lemberg <wl@gnu.org>
1589
Werner Lembergeb05bfb2015-02-20 08:37:35 +01001590 [cff] Signedness fixes for new engine.
1591
1592 * src/cff/cf2arrst.c, src/cff/cf2fixed.h, src/cff/cf2ft.c,
1593 src/cff/cf2ft.h, src/cff/cf2hints.c, src/cff/cf2intrp.c: Apply.
1594
15952015-02-20 Werner Lemberg <wl@gnu.org>
1596
Werner Lemberg3a8d0532015-02-20 08:35:32 +01001597 [cff] Signedness fixes for basic infrastructure and old engine.
1598
1599 * include/internal/pshints.h, src/cff/cffdrivr.c,
1600 src/cff/cffgload.c, src/cff/cffgload.h, src/cff/cffload.c,
1601 src/cff/cffobjs.c, src/cff/cffparse.c, src/pshinter/pshrec.c: Apply.
1602
Werner Lemberg81e5ff52015-02-19 09:46:48 +010016032015-02-19 Werner Lemberg <wl@gnu.org>
1604
Werner Lemberg3a1df3e2015-02-19 15:42:48 +01001605 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Ignore `countSizePairs'.
1606
1607 This is hard-coded to value 2 in `fvar' version 1.0 (and no newer
1608 version exists), but some fonts set it incorrectly.
1609
1610 Problem reported by Adam Twardoch <adam@fontlab.com>.
1611
16122015-02-19 Werner Lemberg <wl@gnu.org>
1613
Werner Lemberg93a884c2015-02-19 14:11:16 +01001614 [cff] Emit better error code for invalid private dict size.
1615
1616 * src/cff/cffparse.c (cff_parse_private_dict): Reject negative
1617 values for size and offset.
1618
16192015-02-19 Werner Lemberg <wl@gnu.org>
1620
Werner Lembergb57bb112015-02-19 10:44:18 +01001621 [autofit] Fix signedness issues.
1622
1623 * src/autofit/afangles.c, src/autofit/afcjk.c,
1624 src/autofit/afglobal.c, src/autofit/afhints.c,
1625 src/autofit/aflatin.c, src/autofit/aflatin2.c, src/autofit/afwarp.c,
1626 src/autofit/hbshim.c: Apply.
1627
16282015-02-19 Werner Lemberg <wl@gnu.org>
1629
Werner Lemberg81e5ff52015-02-19 09:46:48 +01001630 [autofit] Use macros for (unsigned) flags, not enumerations.
1631
1632 This harmonizes with other code in FreeType (and reduces the number
1633 of necessary casts to avoid compiler warnings).
1634
1635 * src/autofit/afblue.hin: Make flag macros unsigned.
1636 * src/autofit/afblue.h: Regenerated.
1637
1638 * src/autofit/afcjk.h: Replace flag enumeration with macros.
1639 * src/autofit/afcjk.c: Updated.
1640
1641 * src/autofit/afhints.h (AF_Flags, AF_Edge_Flags): Replace with
1642 macros.
1643 * src/autofit/afhints.c: Updated.
1644
1645 * src/autofit/aflatin.h: Replace flag enumerations with macros.
1646 * src/autofit/aflatin.c, src/autofit/aflatin2.c: Updated.
1647
1648 * src/autofit/aftypes.h (AF_ScalerFlags): Replace with macros.
1649
Werner Lemberg6a0ded72015-02-18 08:51:22 +010016502015-02-18 Werner Lemberg <wl@gnu.org>
1651
Werner Lemberg3b5f3322015-02-18 11:45:22 +01001652 [type1] Fix signedness issues.
1653
1654 * include/internal/psaux.h, include/internal/t1types.h,
1655 src/psaux/psobjs.c, src/psaux/psobjs.h, src/psaux/t1decode.c,
1656 src/type1/t1gload.c, src/type1/t1load.c, src/type1/t1parse.c: Apply.
1657
16582015-02-18 Werner Lemberg <wl@gnu.org>
1659
Werner Lemberg272e3cd2015-02-18 11:38:46 +01001660 [psaux, type1] Fix minor AFM issues.
1661
1662 * include/internal/t1types.h (AFM_KernPairRec): Make indices
1663 unsigned.
1664 Update users.
1665 (AFM_FontInfoRec): Make element counters unsigned.
1666 Update users.
1667 * src/psaux/afmparse.h (AFM_ValueRec): Add union member for unsigned
1668 int.
1669
1670 * src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs):
1671 Reject negative values for number of kerning elements.
1672
1673 * src/type1/t1afm.c, src/tools/test_afm.c: Updated.
1674
16752015-02-18 Werner Lemberg <wl@gnu.org>
1676
Werner Lemberg6bd7d282015-02-18 09:22:06 +01001677 Don't use `FT_PtrDist' for lengths.
1678
1679 Use FT_UInt instead.
1680
1681 * include/internal/psaux.h (PS_Table_FuncsRec, PS_TableRec,
1682 T1_DecoderRec): Do it.
1683
1684 * include/internal/t1types.h (T1_FontRec): Ditto.
1685
1686 * src/cid/cidload.c (cid_parse_dict): Updated.
1687 * src/pfr/pfrload.c (pfr_extra_item_load_font_id): Ditto.
1688 * src/psaux/psobjs.c (ps_table_add), src/psaux/psobjs.h: Ditto.
1689 * src/type1/t1load.c (parse_blend_axis_types, parse_encoding,
1690 parse_chharstrings, parse_dict): Ditto.
1691 * src/type42/t42parse.c (t42_parse_encoding, t42_parse_charstrings,
1692 t42_parse_dict): Ditto.
1693
16942015-02-18 Werner Lemberg <wl@gnu.org>
1695
Werner Lemberg6a0ded72015-02-18 08:51:22 +01001696 * src/type1/t1driver.c (t1_ps_get_font_value): Clean up.
1697 This handles negative values better, avoiding many casts.
1698
Werner Lemberg0a33a392015-02-17 08:03:05 +010016992015-02-17 Werner Lemberg <wl@gnu.org>
1700
Werner Lembergd3240c52015-02-17 20:30:36 +01001701 [base] Fix Savannah bug #44284.
1702
1703 * src/base/ftcalc.c (FT_MulFix): Typos.
1704
17052015-02-17 Werner Lemberg <wl@gnu.org>
1706
Werner Lemberg1f7a4e12015-02-17 10:17:56 +01001707 [truetype] Finish compiler warning fixes for signedness issues.
1708
1709 * src/truetype/ttgxvar.c, src/truetype/ttsubpix.c,
1710 src/truetype/ttsubpix.h: Apply.
1711
17122015-02-17 Werner Lemberg <wl@gnu.org>
1713
Werner Lemberg9daea2c2015-02-17 09:27:56 +01001714 * src/truetype/ttsubpix.c: Adding missing `static' keywords.
1715
17162015-02-17 Werner Lemberg <wl@gnu.org>
1717
Werner Lembergd9c3f152015-02-17 09:21:26 +01001718 [truetype] More signedness fixes.
1719
1720 * include/internal/tttypes.h, src/truetype/ttinterp.h,
1721 src/truetype/ttobjs.h, src/truetype/ttinterp.c,
1722 src/truetype/ttobjs.c: Apply.
1723
17242015-02-17 Werner Lemberg <wl@gnu.org>
1725
Werner Lemberg0a33a392015-02-17 08:03:05 +01001726 [truetype] Various signedness fixes.
1727
1728 * include/internal/ftgloadr.h, src/truetype/ttpload.c: Apply.
1729
1730 * src/truetype/ttgload.c: Apply.
1731 (TT_Get_VMetrics): Protect against invalid ascenders and descenders
1732 while constructing advance height.
1733
Werner Lemberg587351b2015-02-16 07:03:22 +010017342015-02-16 Werner Lemberg <wl@gnu.org>
1735
Werner Lemberg76abc752015-02-16 22:00:27 +01001736 [base] Finish compiler warning fixes for signedness issues.
1737
1738 * src/base/ftglyph.c, src/base/ftlcdfil.c, src/base/ftstroke.c:
1739 Apply.
1740
17412015-02-16 Werner Lemberg <wl@gnu.org>
1742
Werner Lemberg10aa8582015-02-16 20:12:54 +01001743 * include/tttables.h (TT_OS2): `fsType' must be FT_UShort.
1744
17452015-02-16 Werner Lemberg <wl@gnu.org>
1746
Werner Lemberg2e814fc2015-02-16 20:05:08 +01001747 More minor signedness warning fixes.
1748
1749 * src/base/ftbbox.c, src/base/ftbitmap.c, src/base/fttrigon.c,
1750 src/base/ftutil.c: Apply.
1751
17522015-02-16 Werner Lemberg <wl@gnu.org>
1753
Werner Lemberg82235d02015-02-16 19:35:16 +01001754 Next round of minor compiler warning fixes.
1755
1756 * include/internal/ftrfork.h (FT_RFork_Ref): Change `offset' member
1757 type to `FT_Long'.
1758 (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Add `static' keyword.
1759
Werner Lemberg3aaebe32015-02-23 08:20:27 +01001760 * include/internal/ftstream.h (FT_Stream_Pos): Return `FT_ULong'.
Werner Lemberg82235d02015-02-16 19:35:16 +01001761
1762 * src/base/ftoutln.c, src/base/ftrfork.c, src/base/ftstream.c:
1763 Signedess fixes.
1764
17652015-02-16 Werner Lemberg <wl@gnu.org>
1766
Werner Lemberg3cfa4d12015-02-16 17:59:06 +01001767 Various minor signedness fixes.
1768
1769 * include/ftadvanc.h, include/internal/ftobjs.h,
1770 src/base/ftgloadr.c, src/base/ftobjs.c: Apply.
1771
17722015-02-16 Werner Lemberg <wl@gnu.org>
1773
Werner Lemberg6f325c22015-02-16 11:31:32 +01001774 New `TYPEOF' macro.
1775
1776 This helps suppress signedness warnings, avoiding issues with
1777 implicit conversion changes.
1778
1779 * include/config/ftconfig.h, builds/unix/ftconfig.in,
1780 builds/vms/ftconfig.h (TYPEOF): Define.
1781
1782 * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
1783 src/autofit/afwarp.h (AF_WARPER_FLOOR): Use it.
1784
17852015-02-16 Werner Lemberg <wl@gnu.org>
1786
Werner Lemberg1f377f02015-02-16 08:37:09 +01001787 * src/base/ftsystem.c: Use casts in standard C function wrappers.
1788 (ft_alloc, ft_realloc, ft_ansi_stream_io, FT_Stream_Open): Do it.
1789
17902015-02-16 Werner Lemberg <wl@gnu.org>
1791
Werner Lemberg0814b802015-02-16 07:29:53 +01001792 Fix Savannah bug #44261.
1793
1794 * builds/unix/detect.mk (setup) [unix]: Set `CONFIG_SHELL' in the
1795 environment also while calling the configure script.
1796
17972015-02-16 Werner Lemberg <wl@gnu.org>
1798
Werner Lemberg587351b2015-02-16 07:03:22 +01001799 * include/internal/ftmemory.h: Add some `FT_Offset' casts.
1800 (FT_MEM_SET, FT_MEM_COPY, FT_MEM_MOVE, FT_ARRAY_ZERO, FT_ARRAY_COPY,
1801 FT_MEM_MOVE): Do it.
1802
Werner Lemberg6d7d6362015-02-15 12:30:42 +010018032015-02-15 Werner Lemberg <wl@gnu.org>
1804
Werner Lemberg48186b82015-02-16 06:37:36 +01001805 [base] Clean up signedness issues in `ftdbgmem.c'.
1806
1807 Also fix other minor issues.
1808
1809 * src/base/ftdbgmem.c (FT_MemTableRec): Replace all FT_ULong types
1810 with FT_Long for consistency.
1811 (ft_mem_primes): Change type to `FT_Int'.
1812 (ft_mem_closest_prime, ft_mem_table_set): Updated.
1813
1814 (ft_mem_debug_panic, ft_mem_debug_alloc, ft_mem_debug_free,
1815 ft_mem_debug_realloc): Use `static' keyword and fix signedness
1816 warnings where necessary.
1817
1818 (ft_mem_table_resize, ft_mem_table_new, ft_mem_table_destroy,
1819 ft_mem_table_get_nodep, ft_mem_debug_init, FT_DumpMemory): Fix types
1820 and add or remove casts to avoid signedness warnings.
1821
18222015-02-15 Werner Lemberg <wl@gnu.org>
1823
Werner Lemberg6d7d6362015-02-15 12:30:42 +01001824 [base] Clean up signedness in arithmetic functions.
1825
1826 This makes the code more readable and reduces compiler warnings.
1827
1828 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round, FT_MulFix,
1829 FT_DivFix): Convert input parameters to unsigned, do the
1830 computation, then convert the result back to signed.
1831 (ft_corner_orientation): Fix casts.
1832
Werner Lemberg92359bd2015-02-07 09:47:23 +010018332015-02-07 Werner Lemberg <wl@gnu.org>
1834
1835 [sfnt] Fix Savannah bug #44184.
1836
1837 * src/sfnt/ttload.c (check_table_dir, tt_face_load_font_dir): No
1838 longer reject `htmx' and `vmtx' tables with invalid length but
1839 sanitize them.
1840
Jon Anderson416d8792015-02-06 10:16:45 +010018412015-02-06 Jon Anderson <jon@websupergoo.com>
1842
1843 [truetype] Fix regression in the incremental glyph loader.
1844
1845 * src/truetype/ttgload.c (load_truetype_glyph): For incremental
1846 fonts, the glyph index may be greater than the number of glyphs
1847 indicated, so guard the check with a preprocessor conditional.
1848
Werner Lembergb6cb4992015-02-06 08:46:06 +010018492015-02-06 Werner Lemberg <wl@gnu.org>
1850
1851 [autofit] Fix potential memory leak.
1852
1853 While this doesn't show up with FreeType, exactly the same code
1854 leaks with ttfautohint's modified auto-hinter code (which gets used
1855 in a slightly different way).
1856
1857 It certainly doesn't harm since it is similar to already existing
1858 checks in the code for embedded arrays.
1859
1860 * src/autofit/afhints.c (af_glyph_hints_reload): Set `max_contours'
1861 and `max_points' for all cases.
1862
Werner Lemberg19146a52015-01-31 11:01:33 +010018632015-01-31 Werner Lemberg <wl@gnu.org>
1864
1865 [autofit] Add support for Thai script.
1866
1867 Thanks to Ben Mitchell <ben@rosettatype.com> for guidance with blue
1868 zone characters!
1869
1870 * src/autofit/afblue.dat: Add blue zone data for Thai.
1871
1872 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1873
1874 * src/autofit/afscript.h: Add Thai standard characters.
1875
1876 * src/autofit/afranges.c: Add Thai data.
1877
1878 * src/autofit/afstyles.h: Add Thai data.
1879
Behdad Esfahbod264b5e42015-01-23 21:23:55 +010018802015-01-23 Behdad Esfahbod <behdad@behdad.org>
1881
1882 [raster] Handle `FT_RASTER_FLAG_AA' correctly.
1883
1884 This fixes a breakage caused by the commit `[raster] Remove
1885 5-level gray AA mode from monochrome rasterizer.'.
1886
Werner Lembergd2c531e2015-01-23 22:37:42 +01001887 Problem reported by Markus Trippelsdorf <markus@trippelsdorf.de>.
Behdad Esfahbod264b5e42015-01-23 21:23:55 +01001888
1889 * src/raster/ftraster.c (ft_black_render): Handle
1890 `FT_RASTER_FLAG_AA'.
1891
1892 * src/raster/ftrend1.c (ft_raster1_render): Remove gray AA mode
1893 remnants.
1894
Werner Lemberg79a5ac62015-01-18 07:30:04 +010018952015-01-18 Werner Lemberg <wl@gnu.org>
1896
1897 * src/base/ftobjs.c (FT_New_Library): Fix compiler warning.
1898
Chris Liddell942aa5f2015-01-18 07:29:48 +010018992015-01-18 Chris Liddell <chris.liddell@artifex.com>
1900
1901 [raster] Fix Savannah bug #44022.
1902
1903 Add fallback for glyphs with degenerate bounding boxes.
1904
1905 If a glyph has only one very narrow feature, the bbox can end up
1906 with either the width or height of the bbox being 0, in which case
1907 no raster memory is allocated and no attempt is made to render the
1908 glyph. This is less than ideal when the drop-out compensation in
1909 the rendering code would actually result in the glyph being
1910 rendered.
1911
1912 This problem can be observed with the `I' glyph (gid 47) in the
1913 Autodesk RomanS TrueType font.
1914
1915 * src/raster/ftrend1.c (ft_raster1_render): Add a fallback if either
1916 dimension is zero to explicitly round up/down (instead of simply
1917 round).
1918
Werner Lemberg50be00d2015-01-17 20:38:31 +010019192015-01-17 Werner Lemberg <wl@gnu.org>
1920
1921 Add some tools to handle yearly copyright notice updates.
1922
1923 We are now following the GNU guidelines: A new release automatically
1924 means that the copyright year of all affected files gets updated; it
1925 is no longer used to track years of modification changes.
1926
1927 * src/tools/update-copyright-year: New Perl script.
1928 * src/tools/update-copyright: New shell script that calls
1929 `update-copyright-year' on all files.
1930 * src/tools/no-copyright: Exceptions that should not be handled by
1931 `update-copyright'
1932
Werner Lemberg4eff8542015-01-14 20:06:19 +010019332015-01-14 Werner Lemberg <wl@gnu.org>
1934
1935 * docs/CHANGES: Updated, using a description from Behdad.
1936
Behdad Esfahbod3f9b3d82015-01-14 15:48:12 +010019372015-01-14 Behdad Esfahbod <behdad@behdad.org>
1938
Behdad Esfahbod48c86622015-01-14 19:38:36 +01001939 * src/autofit/afmodule.c (af_autofitter_done): Fix compiler warning.
1940
19412015-01-14 Behdad Esfahbod <behdad@behdad.org>
1942
Behdad Esfahbod56ddafa2015-01-14 19:36:02 +01001943 [autofit] Add embedded array of segments and edges.
1944
1945 Avoids multiple mallocs per typical glyphs.
1946
1947 With this and recent changes to avoid mallocs, the thread-safe
1948 stack-based loader is now as fast as the previous model that had one
1949 cached singleton.
1950
1951 * src/autofit/afhints.h (AF_SEGMENTS_EMBEDDED, AF_EDGES_EMBEDDED):
1952 New macros.
1953 (AF_AxisHintsRec): Add two arrays for segments and edges.
1954
1955 * src/autofit/afhints.c (af_axis_hints_new_segment): Only allocate
1956 data if number of segments exceeds given threshold value.
1957 (af_axis_hints_new_edge): Only allocate data if number of edges
1958 exceeds given threshold value.
1959 (af_glyph_hints_done): Updated.
1960
19612015-01-14 Behdad Esfahbod <behdad@behdad.org>
1962
Behdad Esfahbod6f16b102015-01-14 19:26:49 +01001963 [autofit] Add embedded arrays for points and contours.
1964
1965 This avoids at least two malloc calls for typical glyphs.
1966
1967 * src/autofit/afhints.h (AF_POINTS_EMBEDDED, AF_CONTOURS_EMBEDDED):
1968 New macros.
1969 (AF_GlyphHintsRec): Add two arrays for contours and points.
1970
1971 * src/autofit/afhints.c (af_glyph_hints_init, af_glyph_hints_done):
1972 Updated.
1973 (af_glyph_hints_reload): Only allocate data if number of contours or
1974 points exceeds given threshold values.
1975
19762015-01-14 Behdad Esfahbod <behdad@behdad.org>
1977
Behdad Esfahbodc2733652015-01-14 19:16:12 +01001978 [autofit] Allocate hints object on the stack.
1979
1980 This avoids one malloc per load.
1981
1982 * src/autofit/afloader.h (AF_LoaderRec): Change type of `hints' to
1983 `AF_GlyphHints'.
1984 Update prototype.
1985
1986 * src/autofit/afloader.c (af_loader_init): Use `AF_GlyphHints'
1987 parameter instead of `FT_Memory'.
1988 (af_loader_done): Directly reset `load_hints'.
1989 (af_loader_load_g): Updated.
1990
1991 * src/autofit/afmodule.c (af_autofitter_load_glyph): Use local
1992 `hints' object.
1993
19942015-01-14 Behdad Esfahbod <behdad@behdad.org>
1995
Behdad Esfahboda4117fb2015-01-14 19:07:54 +01001996 [autofit] Reuse slot glyph loader.
1997
1998 No need to create a new glyph loader; we can reuse the one from
1999 `slot->internal->loader'. It's hard to tell why it was written that
2000 way originally, but new code looks sound and correct to me, and
2001 avoids lots of allocations.
2002
2003 * src/autofit/afloader.c (af_loader_init): Change return type to
2004 `void'.
2005 Don't call `FT_GlyphLoader_New'.
2006 (af_loader_reset): Don't call `FT_GlyphLoader_Rewind'.
2007 (af_loader_load_g): Update code to use `internal->loader', which
2008 doesn't need copying of data.
2009
2010 * src/autofit/afloader.h (AF_LoaderRec): Remove `gloader' member.
2011 Update prototype.
2012
2013 * src/autofit/afmodule.c (af_autofitter_load_glyph): Updated.
2014
20152015-01-14 Behdad Esfahbod <behdad@behdad.org>
2016
Behdad Esfahbodae6699f2015-01-14 18:55:39 +01002017 [autofit] Remove (unused) support for composite glyphs.
2018
2019 We never have to deal with composite glyphs in the autohinter, as
2020 those will be loaded into FORMAT_OUTLINE by the recursed
2021 `FT_Load_Glyph' function.
2022
2023 In the rare cases that FT_LOAD_NO_RECURSE is set, it will imply
2024 FT_LOAD_NO_SCALE as per `FT_Load_Glyph', which then implies
2025 FT_LOAD_NO_HINTING:
2026
2027 /* resolve load flags dependencies */
2028
2029 if ( load_flags & FT_LOAD_NO_RECURSE )
2030 load_flags |= FT_LOAD_NO_SCALE |
2031 FT_LOAD_IGNORE_TRANSFORM;
2032
2033 if ( load_flags & FT_LOAD_NO_SCALE )
2034 {
2035 load_flags |= FT_LOAD_NO_HINTING |
2036 FT_LOAD_NO_BITMAP;
2037
2038 load_flags &= ~FT_LOAD_RENDER;
2039 }
2040
2041 and as such the auto-hinter is never called. Thus, the recursion in
2042 `af_loader_load_g' never actually happens. So remove the depth
2043 counter as well.
2044
2045 * src/autofit/afloader.c (af_loader_load_g): Remove `depth'
2046 parameter.
2047 <FT_GLYPH_FORMAT_COMPOSITE>: Remove associated code.
2048 (af_loader_load_glyph): Updated.
2049
20502015-01-14 Behdad Esfahbod <behdad@behdad.org>
2051
Behdad Esfahbodc242fe42015-01-14 18:48:14 +01002052 [raster] Fix uninitialized memory access.
2053
2054 Apparently `ras.cProfile' might be uninitialized. This will be the
2055 case if `ras.top == ras.cProfile->offset', as can be seen in
2056 `End_Profile'. The overshoot code introduced in a change `Fix B/W
2057 rasterization of subglyphs with different drop-out modes.' (from
2058 2009-06-18) violated this, accessing `ras.cProfile->flags'
2059 unconditionally just before calling `End_Profile' (which then
2060 detected that `cProfile' is uninitialized and didn't touch it).
2061
2062 This was harmless, and was not detected by valgrind before because
2063 the objects were allocated on the `raster_pool', which was always
2064 initialized. With recent change to allocate raster buffers on the
2065 stack, valgrind now reported this invalid access.
2066
2067 * src/raster/ftraster.c (Convert_Glyph): Don't access an
2068 uninitialized `cProfile'.
2069
20702015-01-14 Behdad Esfahbod <behdad@behdad.org>
2071
Behdad Esfahbodb2ba6862015-01-14 18:43:13 +01002072 [smooth] Fix uninitialized memory access.
2073
2074 Looks like `ras.span_y' could always be used without initialization.
2075 This was never detected by valgrind before because the library-wide
2076 `raster_pool' was used for the worker object and `raster_pool' was
2077 originally zero'ed. But subsequent reuses of it were using `span_y'
2078 uninitialized. With the recent change to not use `render_pool' and
2079 allocate worker and buffer on the stack, valgrind now detects this
2080 uninitialized access.
2081
2082 * src/smooth/ftgrays.c (gray_raster_render): Initialize
2083 `ras.span_y'.
2084
20852015-01-14 Behdad Esfahbod <behdad@behdad.org>
2086
Behdad Esfahbod603292d2015-01-14 18:35:56 +01002087 [base] Don't initialize unused `driver->glyph_loader'.
2088
2089 * src/base/ftobjs.c (Destroy_Driver): Don't call
2090 `FT_GlyphLoader_Done'.
2091 (FT_Add_Module): Don't call `FT_GlyphLoader_New'.
2092
20932015-01-14 Behdad Esfahbod <behdad@behdad.org>
2094
Behdad Esfahbod51634252015-01-14 18:30:59 +01002095 [base] Don't allocate `library->raster_pool' anymore.
2096
2097 It's unused after the following commits:
2098
2099 [raster] Allocate render pool for mono rasterizer on the stack.
2100 [raster] Remove 5-level gray AA mode from monochrome rasterizer.
2101
2102 The value of FT_RENDER_POOL_SIZE still serves the purpose it used to
2103 serve, which is, to adjust the pool size. But the pool is now
2104 allocated on the stack on demand.
2105
2106 * src/base/ftobjs.c (FT_New_Library, FT_Done_Library): Implement.
2107
21082015-01-14 Behdad Esfahbod <behdad@behdad.org>
2109
Behdad Esfahbod6dfdaf42015-01-14 18:21:13 +01002110 [base] Do not reorder library->renderers upon use.
2111
2112 Instead of keeping `library->renderers' in a MRU order, just leave
2113 it as-is. The MRU machinery wasn't thread-safe.
2114
2115 With this patch, rasterizing glyphs from different faces from
2116 different threads doesn't fail choosing rasterizer
2117 (FT_Err_Cannot_Render_Glyph).
2118
2119 Easiest to see that crash was to add a `printf' (or otherwise let
2120 thread yield in FT_Throw with debugging enabled).
2121
2122 * src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c
2123 (FT_Outline_Render): Don't call `FT_Set_Renderer'.
2124
21252015-01-14 Behdad Esfahbod <behdad@behdad.org>
2126
Behdad Esfahboda773c302015-01-14 18:16:20 +01002127 [raster] Allocate render pool for mono rasterizer on the stack.
2128
2129 Instead of using the `render_pool' member of `FT_Library' that is
2130 provided down to the rasterizer, completely ignore that and allocate
2131 needed objects on the stack instead.
2132
2133 With this patch, rasterizing glyphs from different faces from
2134 different threads doesn't crash in the monochrome rasterizer.
2135
2136 * src/raster/ftraster.c (black_TRaster): Remove `buffer',
2137 `buffer_size', and `worker' members.
2138
2139 (ft_black_render): Create `buffer' locally.
2140 (ft_black_reset): Updated.
2141
21422015-01-14 Behdad Esfahbod <behdad@behdad.org>
2143
Behdad Esfahbod8dc86352015-01-14 18:06:22 +01002144 [raster] Remove 5-level gray AA mode from monochrome rasterizer.
2145
2146 It was off by default and couldn't be turned on at runtime. And the
2147 smooth rasterizer superceded it over ten years ago. No point in
2148 keeping. Comments suggested that it was there for compatibility
2149 with FreeType 1.
2150
2151 550 lines down.
2152
2153 * src/raster/ftraster.c (FT_RASTER_OPTION_ANTI_ALIASING,
2154 RASTER_GRAY_LINES): Remove macros and all associated code.
2155
2156 (black_TWorker): Remove `gray_min_x' and `gray_max_x'.
2157 (black_TRaster): Remove `grays' and `gray_width'.
2158
2159 (Vertical_Sweep_Init, Vertical_Sweep_Span, Vertical_Sweep_Drop,
2160 ft_black_render): Updated.
2161
2162 * src/raster/ftrend1.c (ft_raster1_render): Simplify code.
2163 (ft_raster5_renderer_class): Removed.
2164
21652015-01-14 Behdad Esfahbod <behdad@behdad.org>
2166
Behdad Esfahbod747ae2c2015-01-14 17:54:26 +01002167 [smooth] Allocate render pool for smooth rasterizer on the stack.
2168
2169 Instead of using the `render_pool' member of `FT_Library' that is
2170 provided down to the rasterizer, completely ignore that and allocate
2171 needed objects on the stack instead.
2172
2173 With this patch, rasterizing glyphs from different faces from
2174 different threads doesn't crash in the smooth rasterizer.
2175
2176 Bugs:
2177
2178 https://bugzilla.redhat.com/show_bug.cgi?id=678397
2179 https://bugzilla.redhat.com/show_bug.cgi?id=1004315
2180 https://bugzilla.redhat.com/show_bug.cgi?id=1165471
2181 https://bugs.freedesktop.org/show_bug.cgi?id=69034
2182
2183 * src/smooth/ftgrays.c (gray_TRaster): Remove `buffer',
2184 `buffer_size', `band_size', and `worker' members.
2185
2186 (gray_raster_render): Create `buffer', `buffer_size', and
2187 `band_size' locally.
2188 (gray_raster_reset): Updated.
2189
21902015-01-14 Behdad Esfahbod <behdad@behdad.org>
2191
Behdad Esfahbod531d4632015-01-14 17:46:55 +01002192 [truetype] Allocate TT_ExecContext in TT_Size instead of TT_Driver.
2193
2194 Previously the code had stipulation for using a per-TT_Size exec
2195 context if `size->debug' was true. But there was no way that
2196 `size->debug' could *ever* be true. As such, the code was always
2197 using the singleton `TT_ExecContext' that was stored in `TT_Driver'.
2198 This was, clearly, not threadsafe.
2199
2200 With this patch, loading glyphs from different faces from different
2201 threads doesn't crash in the bytecode loader code.
2202
2203 * src/truetype/ttobjs.h (TT_SizeRec): Remove `debug' member.
2204 (TT_DriverRec): Remove `context' member.
2205
2206 * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Remove
2207 `TT_ExecContext' code related to a global `TT_Driver' object.
2208
2209 (tt_driver_done): Don't remove `TT_ExecContext' object here but ...
2210 (tt_size_done_bytecode): ... here.
2211
2212 (tt_driver_init): Don't create `TT_ExecContext' object here but ...
2213 (tt_size_init_bytecode): ... here, only on demand.
2214
2215 * src/truetype/ttinterp.c (TT_Run_Context): Remove defunct debug
2216 code.
2217 (TT_New_Context): Remove `TT_ExecContext' code related to a global
2218 `TT_Driver' object.
2219
2220 * src/truetype/ttinterp.h: Updated.
2221
2222 * src/truetype/ttgload.c (TT_Hint_Glyph, tt_loader_init): Updated.
2223
22242015-01-14 Behdad Esfahbod <behdad@behdad.org>
2225
Behdad Esfahbod89bc8d42015-01-14 16:01:19 +01002226 [autofit] Allocate AF_Loader on the stack instead of AF_Module.
2227
2228 Stop sharing a global `AF_Loader'. Allocate one on the stack during
2229 glyph load.
2230
2231 Right now this results in about 25% slowdown, to be fixed in a
2232 following commit.
2233
2234 With this patch loading glyphs from different faces from different
2235 threads doesn't immediately crash in the autohinting loader code.
2236
2237 Bugs:
2238
2239 https://bugzilla.redhat.com/show_bug.cgi?id=1164941
2240
2241 * src/autofit/afloader.c (af_loader_init): Pass
2242 `AF_Loader' and `FT_Memory' instead of `AF_Module' as arguments.
2243 (af_loader_reset, af_loader_load_glyph): Also pass `loader' as
2244 argument.
2245 (af_loader_done): Use `AF_Loader' instead of `AF_Module' as
2246 argument.
2247
2248 * src/autofit/afmodule.c (af_autofitter_init): Don't call
2249 `af_loader_init'.
2250 (af_autofitter_done): Don't call `af_loader_done'.
2251 (af_autofitter_load_glyph): Use a local `AF_Loader' object.
2252
2253 * src/autofit/afloader.h: Include `afmodule.h'.
2254 Update prototypes.
2255 Move typedef for `AF_Module' to...
2256
2257 * src/autofit/afmodule.h: ... this place.
2258 No longer include `afloader.h'.
2259
22602015-01-14 Behdad Esfahbod <behdad@behdad.org>
2261
Behdad Esfahbod3f9b3d82015-01-14 15:48:12 +01002262 * src/type42/t42objs.h (T42_DriverRec): Remove unused member.
2263
Werner Lemberg36d03c92015-01-12 11:26:30 +010022642015-01-12 Werner Lemberg <wl@gnu.org>
2265
2266 Fix Savannah bug #43976.
2267
2268 Assure that FreeType's internal include directories are found before
2269 `CPPFLAGS' (which might be set by the user in the environment), and
2270 `CPPFLAGS' before `CFLAGS'.
2271
2272 * builds/freetype.mk (FT_CFLAGS): Don't add `INCLUDE_FLAGS'.
2273 (FT_COMPILE): Make this a special variable for compiling only the
2274 files handled in `freetype.mk'.
2275 (.c.$O): Removed, unused.
2276
2277 * src/*/rules.mk (*_COMPILE): Fix order of include directories.
2278
Werner Lembergd03a67a2015-01-11 08:39:14 +010022792015-01-11 Werner Lemberg <wl@gnu.org>
2280
Werner Lemberg95b57052015-01-11 09:50:49 +01002281 [truetype] Prettyfing.
2282
2283 * src/truetype/ttinterp.c (project, dualproj, fast_project,
2284 fast_dualproj): Rename to...
2285 (PROJECT, DUALPROJ, FAST_PROJECT, FAST_DUALPROJ): ... this.
2286
22872015-01-11 Werner Lemberg <wl@gnu.org>
2288
Werner Lembergea173c02015-01-11 08:58:54 +01002289 * src/truetype/ttinterp.c (Ins_JROT, Ins_JROF): Simplify.
2290
2291 Based on a patch from Behdad.
2292
22932015-01-11 Werner Lemberg <wl@gnu.org>
2294
Werner Lemberg628578c2015-01-11 08:53:31 +01002295 * src/truetype/ttinterp.c (Ins_SxVTL): Simplify function call.
2296
22972015-01-11 Werner Lemberg <wl@gnu.org>
2298
Werner Lemberg08e79092015-01-11 08:45:50 +01002299 * src/truetype/ttinterp.c (Normalize): Remove unused argument.
2300
23012015-01-11 Werner Lemberg <wl@gnu.org>
2302
Werner Lembergd03a67a2015-01-11 08:39:14 +01002303 [truetype] More macro expansions.
2304
Werner Lemberg4aaadf42015-01-11 08:42:28 +01002305 * src/truetype/ttinterp.c (FT_UNUSED_EXEC): Remove macro by
2306 expansion.
2307
23082015-01-11 Werner Lemberg <wl@gnu.org>
2309
2310 [truetype] More macro expansions.
2311
Werner Lembergd03a67a2015-01-11 08:39:14 +01002312 * src/truetype/ttinterp.c (INS_ARG): Remove macro by expansion,
2313 adjusting funtion calls where necessary.
2314 (FT_UNUSED_ARG): Removed, no longer needed.
2315
Werner Lemberg1b4d68c2015-01-10 19:56:28 +010023162015-01-10 Werner Lemberg <wl@gnu.org>
2317
Werner Lembergeb341362015-01-11 00:23:27 +01002318 [truetype] More macro expansions.
2319
2320 Based on a patch from Behdad.
2321
2322 * src/truetype/ttinterp.c (DO_*): Expand macros into corresponding
2323 `Ins_*' functions.
2324 (TT_RunIns): Replace `DO_*' macros with `Ins_*' function calls.
2325 (ARRAY_BOUND_ERROR): Remove second definition, which is no longer
2326 needed.
2327 (Ins_SVTCA, Ins_SPVTCA, Ins_SFVTCA): Replaced with...
2328 (Ins_SxyTCA): New function.
2329
23302015-01-10 Werner Lemberg <wl@gnu.org>
2331
Werner Lemberg01be1302015-01-10 23:05:37 +01002332 [truetype] Remove TT_CONFIG_OPTION_INTERPRETER_SWITCH.
2333
2334 Behdad suggested this code simplification, and nobody objected...
2335
2336 * include/config/ftoption.h, devel/ftoption.h
2337 (TT_CONFIG_OPTION_INTERPRETER_SWITCH): Remove.
2338
2339 * src/truetype/ttinterp.c [TT_CONFIG_OPTION_INTERPRETER_SWITCH]:
2340 Remove related code.
2341 (ARRAY_BOUND_ERROR): Use do-while loop.
2342
23432015-01-10 Werner Lemberg <wl@gnu.org>
2344
Werner Lembergfae0c812015-01-10 20:23:10 +01002345 [truetype] More macro expansions.
2346
Werner Lemberg6cc1f122015-01-10 21:56:59 +01002347 * src/truetype/ttinterp.c, src/truetype/ttinterp.h (EXEC_ARG_,
2348 EXEC_ARG): Remove by replacing with expansion.
2349
23502015-01-10 Werner Lemberg <wl@gnu.org>
2351
2352 [truetype] More macro expansions.
2353
Werner Lemberg24681452015-01-10 21:53:48 +01002354 Based on a patch from Behdad.
2355
2356 * src/truetype/ttinterp.c (SKIP_Code, GET_ShortIns, NORMalize,
2357 SET_SuperRound, ROUND_None, INS_Goto_CodeRange, CUR_Func_move,
2358 CUR_Func_move_orig, CUR_Func_round, CUR_Func_cur_ppem,
2359 CUR_Func_read_cvt, CUR_Func_write_cvt, CUR_Func_move_cvt,
2360 CURRENT_Ratio, INS_SxVTL, COMPUTE_Funcs, COMPUTE_Round,
2361 COMPUTE_Point_Displacement, MOVE_Zp2_Point): Remove by replacing
2362 with expansion.
2363
2364 (Cur_Func_project, CUR_Func_dualproj, CUR_fast_project,
2365 CUR_fast_dualproj): Replace with macros `project', `dualproj',
2366 `fast_project', `fast_dualproj'.
2367
23682015-01-10 Werner Lemberg <wl@gnu.org>
2369
2370 [truetype] More macro expansions.
2371
Werner Lembergfae0c812015-01-10 20:23:10 +01002372 * src/truetype/ttinterp.c (EXEC_OP_, EXEC_OP): Remove by replacing
2373 with expansion.
2374
23752015-01-10 Werner Lemberg <wl@gnu.org>
2376
Werner Lemberg5a752f32015-01-10 20:08:35 +01002377 [truetype] Remove code for static TrueType interpreter.
2378
2379 This is a follow-up patch.
2380
2381 * src/truetype/ttinterp.c, src/truetype/ttinterp.h
2382 [TT_CONFIG_OPTION_STATIC_INTERPRETER,
2383 TT_CONFIG_OPTION_STATIC_RASTER]: Remove macros and related code.
2384
23852015-01-10 Werner Lemberg <wl@gnu.org>
2386
Werner Lemberg1b4d68c2015-01-10 19:56:28 +01002387 * src/truetype/ttinterp.c (CUR): Remove by replacing with expansion.
2388
2389 This starts a series of patches that simplifies the code of the
2390 bytecode interpreter.
2391
Werner Lemberg232bd942014-12-30 21:44:51 +010023922014-12-30 Werner Lemberg <wl@gnu.org>
2393
2394 * Version 2.5.5 released.
2395 =========================
2396
2397
2398 Tag sources with `VER-2-5-5'.
2399
2400 * docs/VERSION.DLL: Update documentation and bump version number to
2401 2.5.5.
2402
2403 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
2404 builds/windows/vc2005/index.html,
2405 builds/windows/vc2008/freetype.vcproj,
2406 builds/windows/vc2008/index.html,
2407 builds/windows/vc2010/freetype.vcxproj,
2408 builds/windows/vc2010/index.html,
2409 builds/windows/visualc/freetype.dsp,
2410 builds/windows/visualc/freetype.vcproj,
2411 builds/windows/visualc/index.html,
2412 builds/windows/visualce/freetype.dsp,
2413 builds/windows/visualce/freetype.vcproj,
2414 builds/windows/visualce/index.html,
2415 builds/wince/vc2005-ce/freetype.vcproj,
2416 builds/wince/vc2005-ce/index.html,
2417 builds/wince/vc2008-ce/freetype.vcproj,
2418 builds/wince/vc2008-ce/index.html: s/2.5.4/2.5.5/, s/254/255/.
2419
2420 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 5.
2421
2422 * builds/unix/configure.raw (version_info): Set to 17:4:11.
2423 * CMakeLists.txt (VERSION_PATCH): Set to 5.
2424 * docs/CHANGES: Updated.
2425
2426 * builds/toplevel.mk (dist): Fix typos.
2427
Alexei Podtelezhnikov70241552014-12-24 12:11:46 -050024282014-12-24 Alexei Podtelezhnikov <apodtele@gmail.com>
2429
2430 [base] Formatting and nanooptimizations.
2431
2432 * src/base/ftcalc.c,
2433 * src/base/fttrigon.c: Revise sign restoration.
2434
Werner Lemberg06842c72014-12-13 07:42:51 +010024352014-12-13 Werner Lemberg <wl@gnu.org>
2436
2437 * src/pcf/pcfread.c (pcf_read_TOC): Improve fix from 2014-12-08.
2438
Werner Lembergb9438112014-12-11 13:33:14 +010024392014-12-11 Werner Lemberg <wl@gnu.org>
2440
Werner Lemberg82119502014-12-11 22:27:06 +01002441 * builds/toplevel.mk (dist): Use older POSIX standard for `tar'.
2442
2443 Apparently, BSD tar isn't capable yet of handling POSIX-1.2001
2444 (contrary to GNU tar), so force the POSIX-1.1988 format.
2445
2446 Problem reported by Stephen Fisher <sfisher@SDF.ORG>.
2447
24482014-12-11 Werner Lemberg <wl@gnu.org>
2449
Werner Lemberg812ed342014-12-11 14:07:29 +01002450 * src/type42/t42parse.c (t42_parse_sfnts): Reject invalid TTF size.
2451
24522014-12-11 Werner Lemberg <wl@gnu.org>
2453
Werner Lembergc9ca6ff2014-12-11 13:39:39 +01002454 * src/base/ftobjs.c (FT_Get_Glyph_Name): Fix off-by-one check.
2455
2456 Problem reported by Dennis Felsing <dennis@felsin9.de>.
2457
24582014-12-11 Werner Lemberg <wl@gnu.org>
2459
Werner Lembergb9438112014-12-11 13:33:14 +01002460 * src/type42/t42parse.c (t42_parse_sfnts): Check `string_size'.
2461
2462 Problem reported by Dennis Felsing <dennis@felsin9.de>.
2463
suzuki toshiya2b592822014-12-10 00:27:41 +090024642014-12-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2465
suzuki toshiya9bd1e552014-12-09 14:51:52 +09002466 [gxvalid] Fix a naming convention conflicting with ftvalid.
2467
2468 See previous changeset for otvalid.
2469
2470 * src/gxvalid/{gxvcommn.h, gxvmort.h, gxvmorx.h}: Replace
2471 `valid' by `gxvalid'.
2472 * src/gxvalid/{gxvbsln.c, gxvcommn.c, gxvfeat.c, gxvjust.c,
2473 gxvkern.c, gxvlcar.c, gxvmort.c, gxvmort0.c, gxvmort1.c,
2474 gxvmort2.c, gxvmort4.c, gxvmort5.c, gxvmorx.c, gxvmorx0.c,
2475 gxvmorx1.c, gxvmorx2.c, gxvmorx4.c, gxvmorx5.c, gxvopbd.c,
2476 gxvprop.c, gxvtrak.c}: Replace `valid' by `gxvalid' if
2477 it is typed as GXV_Validator.
2478
24792014-12-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2480
suzuki toshiya51abdf62014-12-09 00:58:04 +09002481 [otvalid] Fix a naming convention conflicting with ftvalid.
2482
2483 Some prototypes in ftvalid.h use `valid' for the variables
2484 typed as FT_Validator. Their implementations in src/base/
2485 ftobjs.c and utilizations in src/sfnt/ttcmap.c do similar.
2486
2487 Some macros in otvcommn.h assume the exist of the variable
2488 `valid' typed as OTV_Validator in the caller.
2489
2490 Mixing these two conventions cause invalid pointer conversion
2491 and unexpected SEGV in longjmp. To prevent it, all variables
2492 typed as OTV_Validator are renamed to `otvalid'.
2493
2494 * src/otvalid/otvcommn.h: Replace `valid' by `otvalid'.
2495 * src/otvalid/{otvcommn.c, otvbase.c, otvgdef.c, otvgpos.c,
2496 otvgsub.c, otvjstf.c, otvmath.c}: Replace `valid' by `otvalid'
2497 if it is typed as OTV_Validator.
2498
24992014-12-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2500
suzuki toshiya2b592822014-12-10 00:27:41 +09002501 [ftvalid] Introduce FT_THROW() in FT_INVALID_XXX macros.
2502
2503 Original patch is designed by Werner Lemberg. Extra part
2504 for otvalid and gxvalid are added by suzuki toshiya, see
2505 discussion:
2506 http://lists.nongnu.org/archive/html/freetype-devel/2014-12/msg00002.html
2507 http://lists.nongnu.org/archive/html/freetype-devel/2014-12/msg00007.html
2508
2509 * include/internal/ftvalid.h: Introduce FT_THROW() in FT_INVALID_().
2510 * src/gxvalid/gxvcommn.h: Ditto.
2511 * src/otvalid/otvcommn.h: Ditto.
2512
Werner Lemberg74af85c2014-12-08 16:01:50 +010025132014-12-08 Werner Lemberg <wl@gnu.org>
2514
2515 [pcf] Fix Savannah bug #43774.
2516
2517 Work around `features' of X11's `pcfWriteFont' and `pcfReadFont'
2518 functions. Since the PCF format doesn't have an official
2519 specification, we have to exactly follow these functions' behaviour.
2520
2521 The problem was unveiled with a patch from 2014-11-06, fixing issue
2522 #43547.
2523
2524 * src/pcf/pcfread.c (pcf_read_TOC): Don't check table size for last
2525 element. Instead, assign real size.
2526
Werner Lemberg66883b52014-12-07 09:17:06 +010025272014-12-07 Werner Lemberg <wl@gnu.org>
2528
Werner Lemberg553c9672014-12-07 19:29:52 +01002529 Work around a bug in Borland's C++ compiler.
2530
2531 See
2532
2533 http://qc.embarcadero.com/wc/qcmain.aspx?d=118998
2534
2535 for Borland's bug tracker entry.
2536
2537 Reported by Yuliana Zigangirova <zigangirova@inbox.ru>,
2538 http://lists.gnu.org/archive/html/freetype-devel/2014-04/msg00001.html.
2539
2540 * include/internal/ftvalid.h (FT_ValidatorRec), src/smooth/ftgrays.c
2541 (gray_TWorker_): Move `ft_jmp_buf' field to be the first element.
2542
25432014-12-07 Werner Lemberg <wl@gnu.org>
2544
Werner Lemberg9870d6d2014-12-07 09:40:47 +01002545 */*: Decorate hex constants with `U' and `L' where appropriate.
2546
25472014-12-07 Werner Lemberg <wl@gnu.org>
2548
Werner Lemberg66883b52014-12-07 09:17:06 +01002549 [truetype] Prevent memory leak for buggy fonts.
2550
2551 * src/truetype/ttobjs.c (tt_size_done): Unconditionally call
2552 `tt_size_done_bytecode'.
2553
Werner Lemberg94926682014-12-06 07:11:44 +010025542014-12-06 Werner Lemberg <wl@gnu.org>
2555
2556 * Version 2.5.4 released.
2557 =========================
2558
2559
2560 Tag sources with `VER-2-5-4'.
2561
2562 * docs/VERSION.DLL: Update documentation and bump version number to
2563 2.5.4.
2564
2565 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
2566 builds/windows/vc2005/index.html,
2567 builds/windows/vc2008/freetype.vcproj,
2568 builds/windows/vc2008/index.html,
2569 builds/windows/vc2010/freetype.vcxproj,
2570 builds/windows/vc2010/index.html,
2571 builds/windows/visualc/freetype.dsp,
2572 builds/windows/visualc/freetype.vcproj,
2573 builds/windows/visualc/index.html,
2574 builds/windows/visualce/freetype.dsp,
2575 builds/windows/visualce/freetype.vcproj,
2576 builds/windows/visualce/index.html,
2577 builds/wince/vc2005-ce/freetype.vcproj,
2578 builds/wince/vc2005-ce/index.html,
2579 builds/wince/vc2008-ce/freetype.vcproj,
2580 builds/wince/vc2008-ce/index.html: s/2.5.3/2.5.4/, s/253/254/.
2581
2582 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4.
2583
2584 * builds/unix/configure.raw (version_info): Set to 17:3:11.
2585 * CMakeLists.txt (VERSION_PATCH): Set to 4.
2586 * docs/CHANGES: Updated.
2587
Werner Lemberg934ef382014-12-04 06:38:51 +010025882014-12-04 Werner Lemberg <wl@gnu.org>
2589
2590 docs/CHANGES: Updated, formatted.
2591
Dave Arnold2cdc4562014-12-04 06:10:16 +010025922014-12-04 Dave Arnold <darnold@adobe.com>
2593
Dave Arnoldf89396c2014-12-04 06:17:26 +01002594 [cff] Modify an FT_ASSERT.
2595
2596 * src/cff/cf2hints.c (cf2_hintmap_map): After the fix for Savannah
2597 bug #43661, the test font `...aspartam.otf' still triggers an
2598 FT_ASSERT. Since hintmap still works with count==0, ...
2599 (cf2_glyphpath_lineTo, cf2_glyphpath_curveTo): ... add that term to
2600 suppress the assert.
2601
26022014-12-04 Dave Arnold <darnold@adobe.com>
2603
Dave Arnold2cdc4562014-12-04 06:10:16 +01002604 [cff] Fix Savannah bug #43661.
2605
2606 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdHSTEM,
2607 cf2_cmdVSTEM, cf2_cmdHINTMASK>: Don't append to stem arrays after
2608 hintmask is constructed.
2609
2610 * src/cff/cf2hints.c (cf2_hintmap_build): Add defensive code to
2611 avoid reading past end of hintmask.
2612
Werner Lemberg16188eb2014-12-03 10:18:34 +010026132014-12-03 Werner Lemberg <wl@gnu.org>
2614
Werner Lemberg8fa69a82014-12-03 20:07:14 +01002615 docs/CHANGES: Updated.
2616
26172014-12-03 Werner Lemberg <wl@gnu.org>
2618
Werner Lemberga632b5f2014-12-03 19:30:44 +01002619 [autofit] Better fix for conversion specifiers in debug messages.
2620
2621 Using `%ld' for pointer differences causes warnings on 32bit
2622 platforms. The correct type would be (the relatively new) `%td',
2623 however, this is missing on some important platforms.
2624
2625 This patch improves the change from 2014-11-28.
2626
2627 * src/autofit/afhints.c (AF_INDEX_NUM): Use `int' typecast. Our
2628 pointer differences are always sufficiently small.
2629 (af_glyph_hints_dump_points, af_glyph_hints_dump_segments,
2630 af_glyph_hints_dump_edge): Revert to `%d' and use `AF_INDEX_NUM'.
2631
26322014-12-03 Werner Lemberg <wl@gnu.org>
2633
Werner Lemberg16188eb2014-12-03 10:18:34 +01002634 FT_Sfnt_Tag: s/ft_sfnt_xxx/FT_SFNT_XXX/ for orthogonality.
2635
2636 All public FreeType enumeration and flag values are uppercase...
2637
2638 * include/tttables.h (FT_Sfnt_Tag): Implement it. For backwards
2639 compatilibity, retain the old values as macros.
2640
2641 * src/base/ftfstype.c (FT_Get_FSType_Flags), src/sfnt/sfdriver.c
2642 (get_sfnt_table): Updated.
2643
Werner Lemberg2af25ac2014-12-02 08:38:57 +010026442014-12-02 Werner Lemberg <wl@gnu.org>
2645
Werner Lembergde43ace2014-12-02 23:06:04 +01002646 * include/*: Improve structure of documentation.
2647
2648 . Add and update many `<Order>' tags.
2649 . Apply various documentation fixes.
2650 . Remove details to deprecated (or never implemented) data.
2651
26522014-12-02 Werner Lemberg <wl@gnu.org>
2653
Werner Lembergca1f5cc2014-12-02 22:49:25 +01002654 [docmaker] Always handle `<Order>' section elements.
2655
2656 Previously, those elements were handled only for sections present in
2657 a `<Sections>' chapter element.
2658
2659 * src/tools/docmaker/content.py (ContentProcessor::finish):
2660 Implement it.
2661
26622014-12-02 Werner Lemberg <wl@gnu.org>
2663
Werner Lembergef6a3522014-12-02 21:16:59 +01002664 [docmaker] Properly handle empty rows in Synopsis.
2665
2666 * src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Emit
2667 `&nbsp;' for empty fields.
2668
26692014-12-02 Werner Lemberg <wl@gnu.org>
2670
Werner Lemberg0e96f052014-12-02 11:08:31 +01002671 [docmaker] Thinko.
2672
2673 * src/tools/docmaker/content.py (DocBlock::get_markup_words_all):
2674 Emit `/empty/' string for first element also.
2675
26762014-12-02 Werner Lemberg <wl@gnu.org>
2677
Werner Lemberg102d4a72014-12-02 10:27:40 +01002678 [docmaker] Honour empty lines in `<Order>' section element.
2679
2680 This greatly improves the readability of the `Synopsis' links.
2681
2682 * src/tools/docmaker/content.py (DocBlock::get_markup_words_all):
2683 Insert string `/empty/' between items.
2684
2685 * src/tools/docmaker/formatter.py (Formatter::section_dump): Make it
2686 robust against nonexistent keys.
2687
2688 * src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Emit
2689 empty <td> elements for `/empty/'.
2690
26912014-12-02 Werner Lemberg <wl@gnu.org>
2692
Werner Lemberg2af25ac2014-12-02 08:38:57 +01002693 [docmaker] Ensure Python 3 compatibility.
2694
2695 * src/tools/docmaker/content.py (ContentProcessor::set_section,
2696 ContentProcessor::finish): Replace `has_key' function with `in'
2697 keyword.
2698
2699 * src/tools/docmaker/formatter.py (Formatter::__init__): Replace
2700 sorting function with a key generator.
2701 (Formatter::add_identifier): Replace `has_key' function with `in'
2702 keyword.
2703
2704 * src/tools/docmaker/tohtml.py (HtmlFormatter::html_source_quote):
2705 Replace `has_key' function with `in' keyword.
2706 (HtmlFormatter::index_exit, HtmlFormatter::section_enter): Use
2707 integer division.
2708 s/<>/>/.
2709
2710 * src/tools/docmaker/utils.py: Import `itertools'.
2711 (index_sort): Replaced by...
2712 (index_key): ... this new key generator (doing exactly the same).
2713
Werner Lemberg8f795112014-11-29 06:49:15 +010027142014-11-29 Werner Lemberg <wl@gnu.org>
2715
Werner Lemberg80bfeb12014-12-01 10:07:52 +01002716 [docmaker] Don't output a block multiple times.
2717
2718 This bug was hidden by not processing all lines of `<Order>' blocks.
2719
2720 * src/tools/docmaker/formatter.py (Formatter::section_dump): Filter
2721 out field names.
2722
27232014-11-29 Werner Lemberg <wl@gnu.org>
2724
Werner Lemberg0dbad762014-12-01 08:44:48 +01002725 [docmaker] Use field values as HTML link targets where possible.
2726
2727 * src/tools/docmaker/tohtml.py (HtmlFormatter::make_block_url):
2728 Accept second, optional argument to specify a name.
2729 (HtmlFormatter::html_source_quote): Link to field ID if possible.
2730 (HtmlFormatter::print_html_field_list): Emit `id' attribute.
2731
27322014-11-29 Werner Lemberg <wl@gnu.org>
2733
Werner Lemberg785b1d02014-11-30 22:16:34 +01002734 [docmaker] Allow empty lines in `<Order>' blocks.
2735
2736 Before this patch, the suggested order of entries stopped at the
2737 first empty line.
2738
2739 Obviously, nobody noticed that this problem caused a much reduced
2740 set of links in the `Synopsis' sections; in particular, the
2741 `<Order>' blocks contain a lot of entries that wouldn't be listed
2742 otherwise...
2743
2744 * src/tools/docmaker/content.py (DocBlock::get_markup_words_all):
2745 New function to iterate over all items.
2746 (DocSection::process): Use it.
2747
27482014-11-29 Werner Lemberg <wl@gnu.org>
2749
Werner Lemberg16b3e622014-11-30 20:58:27 +01002750 * src/tools/docmaker/sources.py (column) [Format 2]: Fix regexp.
2751
2752 After the single asterisk there must be no other immediately following
2753 asterisk.
2754
27552014-11-29 Werner Lemberg <wl@gnu.org>
2756
Werner Lemberg434bc692014-11-29 23:12:55 +01002757 * src/tools/docmaker/tohtml.py: Improve CSS for vertical spacing.
Werner Lemberg51987ea2014-11-29 22:19:29 +01002758
Werner Lemberg434bc692014-11-29 23:12:55 +010027592014-11-29 Werner Lemberg <wl@gnu.org>
2760
2761 [docmaker] Improve HTML code for table of contents.
2762
2763 * src/tools/docmaker/tohtml.py: Introduce a new table class `toc',
Werner Lemberg51987ea2014-11-29 22:19:29 +01002764 together with proper CSS.
2765
27662014-11-29 Werner Lemberg <wl@gnu.org>
2767
Werner Lembergaa834ce2014-11-29 20:08:29 +01002768 [docmaker] Provide higher-level markup and simplify HTML.
2769
2770 * src/tools/docmaker/tohtml.py: Instead of using extraneous `<div>'
2771 elements, use CSS descendants (of class `section') to format the
2772 data.
2773
2774 Also remove reduntant <p> and <br> elements, replacing them with
2775 proper CSS.
2776
2777 Globally reduce page width to 75%.
2778
2779 (block_header): Rename <div> class to `section'.
2780
27812014-11-29 Werner Lemberg <wl@gnu.org>
2782
Werner Lemberg3bb97022014-11-29 16:12:37 +01002783 [docmaker] Add `top' links after blocks.
2784
2785 * src/tools/docmaker/tohtml.py (block_footer_middle): Implement it.
2786
27872014-11-29 Werner Lemberg <wl@gnu.org>
2788
Werner Lemberga31f9712014-11-29 07:18:44 +01002789 * src/tools/docmaker/tohtml.py: Improve CSS for fields.
2790
Werner Lemberg3bb97022014-11-29 16:12:37 +01002791 Make fields align horizontally relative to full line width.
Werner Lemberga31f9712014-11-29 07:18:44 +01002792
27932014-11-29 Werner Lemberg <wl@gnu.org>
2794
Werner Lemberg8f795112014-11-29 06:49:15 +01002795 * src/tools/docmaker/tohtml.py: Fix index and TOC templates.
2796
2797 This thinko was introduced 2014-11-27.
2798
Werner Lembergba1ba0c2014-11-28 22:04:14 +010027992014-11-28 Werner Lemberg <wl@gnu.org>
2800
2801 [docmaker] Format field lists with CSS.
2802
2803 This also simplifies the inserted HTML code.
2804
2805 * src/tools/docmaker/tohtml.py
2806 (HtmlFormatter::print_html_field_list): Do it.
2807
suzuki toshiya348fffa2014-11-28 16:05:59 +090028082014-11-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2809
2810 Fix compiler warning to the comparison between signed and
2811 unsigned variable.
2812
2813 * src/pfr/pfrsbit.c (pfr_slot_load_bitmap): Fix the comparison
2814 between `ypos + ysize' and FT_INT_{MAX,MIN}.
2815
Werner Lembergba1ba0c2014-11-28 22:04:14 +010028162014-11-28 Werner Lemberg <wl@gnu.org>
Werner Lemberg984e0712014-11-28 05:33:58 +01002817
Werner Lembergba1ba0c2014-11-28 22:04:14 +01002818 [docmaker] Replace empty `<td>' with CSS.
Werner Lemberg46d4dc82014-11-28 05:49:56 +01002819
2820 * src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Do
2821 it.
2822
Werner Lembergba1ba0c2014-11-28 22:04:14 +010028232014-11-28 Werner Lemberg <wl@gnu.org>
Werner Lemberg46d4dc82014-11-28 05:49:56 +01002824
Werner Lemberg984e0712014-11-28 05:33:58 +01002825 [docmaker] Replace some `<table>' tags with `<h4>' and `<div>'.
2826
2827 * src/tools/docmaker/tohtml.py (marker_*): Use `<h4>'.
2828 (source_*): Use `<div>'.
2829 (HtmlFormatter::block_enter): s/<h4>/<h3>/.
2830
suzuki toshiya9ee6a0a2014-11-28 11:14:18 +090028312014-11-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2832
2833 Fix compiler warning to conversion specifiers in debug messages.
2834
2835 * src/autofit/afhints.c (af_glyph_hints_dump_points): Add length
Werner Lemberga632b5f2014-12-03 19:30:44 +01002836 modifier to dump long integers.
2837 (af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Ditto.
suzuki toshiya9ee6a0a2014-11-28 11:14:18 +09002838
Werner Lemberg26d699e2014-11-27 19:22:52 +010028392014-11-27 Werner Lemberg <wl@gnu.org>
2840
Werner Lemberg984e0712014-11-28 05:33:58 +01002841 * src/tools/docmaker/tohtml.py: Use more CSS for index.
Werner Lemberg7ea36342014-11-27 19:38:31 +01002842
28432014-11-27 Werner Lemberg <wl@gnu.org>
2844
Werner Lembergedcf8172014-11-27 19:28:48 +01002845 [docmaker] Replace `name' attribute of `<a>' with `id'.
2846
2847 * src/tools/docmaker/tohtml.py (HtmlFormatter::block_enter): Do it.
2848
28492014-11-27 Werner Lemberg <wl@gnu.org>
2850
Werner Lemberg26d699e2014-11-27 19:22:52 +01002851 * src/tools/docmaker/tohtml.py: Remove remaining `width' attributes.
2852
2853 For `Index' and `TOC' links, we now simply use the `text-align' CSS
2854 property of `<td>' to enforce flush-left and flush-right,
2855 eliminating the hack with an empty, full-width `<td>' element
2856 inbetween.
2857
2858 The change also enforces the same (smaller) size for all index and
2859 TOC links.
2860
suzuki toshiya2676e072014-11-28 00:58:25 +090028612014-11-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2862
suzuki toshiya1b12f5d2014-11-28 01:22:26 +09002863 * src/cff/cf2font.c: Include `ftcalc.h' to use FT_MSB(),
2864 cf2font.c could not find it under `make multi' build.
2865
28662014-11-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2867
suzuki toshiya2676e072014-11-28 00:58:25 +09002868 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Remove
2869 unrequired negative value check for `width' and `height'.
2870
Werner Lemberg8585cf52014-11-27 10:49:05 +010028712014-11-27 Werner Lemberg <wl@gnu.org>
2872
Werner Lembergdd3fee02014-11-27 13:20:52 +01002873 * src/tools/docmaker/tohtml.py: More HTML table refactoring.
2874
2875 Replace some `<table>' tags with `<div>' to simplify structure.
2876
2877 Move `bgcolor' attribute to CSS.
2878
2879 Replace most `width' attributes with CSS. The remaining instances
2880 (providing a similar effect as LaTeX's `\hfill' command) are removed
2881 in a later patch.
2882
28832014-11-27 Werner Lemberg <wl@gnu.org>
2884
Werner Lemberga5ad26a2014-11-27 10:52:24 +01002885 * src/tools/docmaker/tohtml.py: Replace <font> with CSS.
2886
28872014-11-27 Werner Lemberg <wl@gnu.org>
2888
Werner Lembergba67c612014-11-27 10:51:49 +01002889 * src/tools/docmaker/tohtml.py: Center <table> with CSS.
2890
28912014-11-27 Werner Lemberg <wl@gnu.org>
2892
Werner Lemberg5594fa52014-11-27 10:50:50 +01002893 * src/tools/docmaker/tohtml.py: Replace `<center>' with `<div>'.
2894
28952014-11-27 Werner Lemberg <wl@gnu.org>
2896
Werner Lemberg8585cf52014-11-27 10:49:05 +01002897 * src/tools/docmaker/tohtml.py: Remove redundant `<center>' tags.
2898
2899 This starts a series of commits into the direction of generating
2900 valid HTML 5 code, especially using much more CSS.
2901
suzuki toshiya1b057042014-11-27 17:53:20 +090029022014-11-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2903
2904 Prevent too negative values (< FT_INT_MIN) in bitmap metrics,
2905 suggested by Alexei.
2906
2907 * src/pfr/pfrsbit.c (pfr_slot_load_bitmap): Prevent too
2908 negative values in `xpos' and `ypos + ysize'.
2909 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Prevent
2910 too negative values in `x_left' and `y_top'. Either negative
2911 values in `width' and `height' are checked.
2912
Werner Lemberg3d167cb2014-11-27 05:19:41 +010029132014-11-27 Werner Lemberg <wl@gnu.org>
2914
Werner Lembergc52882a2014-11-27 08:01:25 +01002915 [docmaker] Produce better HTML code.
2916
2917 * src/tools/docmaker/tohtml.py: Always use double quotes for
2918 attribute values.
2919 (source_footer): Close `td' and `tr' groups.
2920
29212014-11-27 Werner Lemberg <wl@gnu.org>
2922
Werner Lembergdbb93152014-11-27 07:20:48 +01002923 Use better way to disable creation of .pyc files for `make refdoc'.
2924
2925 Python 2.6 was released in 2008...
2926
2927 * builds/freetype.mk (refdoc): Use python's `-B' option.
2928
2929 * builds/detect.mk (std_setup, dos_setup): Mention required python
2930 version for `refdoc' target.
2931
29322014-11-27 Werner Lemberg <wl@gnu.org>
2933
Werner Lemberge8a5c332014-11-27 06:48:37 +01002934 * src/tools/docmaker/sources.py (re_bold, re_italic): Use
2935 non-grouping parentheses.
2936 * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word):
2937 Updated.
2938
29392014-11-27 Werner Lemberg <wl@gnu.org>
2940
Werner Lemberg3d167cb2014-11-27 05:19:41 +01002941 * src/base/ftobjs.c (FT_Get_Glyph_Name): Fix compiler warning.
2942
2943 Introdruced in previous change. Reported by Alexei.
2944
Werner Lemberga593a042014-11-26 18:42:48 +010029452014-11-26 Werner Lemberg <wl@gnu.org>
2946
Werner Lembergf34f1922014-11-26 21:59:21 +01002947 * src/*: Add checks for parameters of API functions where missing.
2948
2949 `API functions' are functions tagged with `FT_EXPORT_DEF'.
2950
2951 Besides trivial fixes, the following changes are included, too.
2952
2953 * src/base/ftbdf.c (FT_Get_BDF_Charset_ID, FT_Get_BDF_Property): Set
2954 error code if no service is available.
2955
2956 * src/base/ftinit.c (FT_Done_FreeType): Change return value for
2957 invalid `library' parameter to `Invalid_Library_Handle'.
2958
2959 * src/base/ftobjs.c (FT_New_Size): Change return value for invalid
2960 `asize' parameter to `Invalid_Argument'.
2961
2962 * src/base/ftoutln.c (FT_Outline_Copy): Change return value for
2963 invalid `source' and `target' parameters to `Invalid_Outline'.
2964 (FT_Outline_Done_Internal): Change return value for invalid
2965 `outline' parameter to `Invalid_Outline'.
2966
29672014-11-26 Werner Lemberg <wl@gnu.org>
2968
Werner Lemberga593a042014-11-26 18:42:48 +01002969 * src/cache/ftcbasic.c: Use single calls to `FT_TRACE'.
2970
suzuki toshiya5aff8532014-11-26 14:36:12 +090029712014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2972
suzuki toshiyacd4a5a22014-11-27 00:20:48 +09002973 * src/base/ftobj.c (Mac_Read_POST_Resource): Additional
2974 overflow check in the summation of POST fragment lengths,
2975 suggested by Mateusz Jurczyk <mjurczyk@google.com>.
2976
29772014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2978
suzuki toshiya1720e812014-11-26 16:39:00 +09002979 * src/base/ftobjs.c (Mac_Read_POST_Resource): Insert comments
2980 and fold too long tracing messages.
2981
29822014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2983
suzuki toshiya18a8f0d2014-11-26 16:11:38 +09002984 Fix Savannah bug #43540.
2985
2986 * src/base/ftmac.c (parse_fond): Prevent a buffer overrun
2987 caused by a font including too many (> 63) strings to store
2988 names[] table.
2989
29902014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2991
suzuki toshiya45331672014-11-26 16:02:17 +09002992 * src/base/ftobjs.c (Mac_Read_POST_Resource): Use unsigned long
2993 variables to read the lengths in POST fragments. Suggested by
2994 Mateusz Jurczyk <mjurczyk@google.com>.
2995
29962014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2997
suzuki toshiya35252ae2014-11-26 15:52:23 +09002998 Fix Savannah bug #43539.
2999
3000 * src/base/ftobjs.c (Mac_Read_POST_Resource): Fix integer overflow
3001 by a broken POST table in resource-fork.
3002
30032014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3004
suzuki toshiya240c94a2014-11-26 15:43:29 +09003005 Fix Savannah bug #43538.
3006
3007 * src/base/ftobjs.c (Mac_Read_POST_Resource): Fix integer overflow
3008 by a broken POST table in resource-fork.
3009
30102014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3011
suzuki toshiya5aff8532014-11-26 14:36:12 +09003012 * src/base/ftobjs.c (Mac_Read_POST_Resource): Avoid memory leak
3013 by a broken POST table in resource-fork. Return after freeing
3014 the buffered POST table when it is found to be broken.
3015
Werner Lemberg04edbbd2014-11-25 10:21:13 +010030162014-11-25 Werner Lemberg <wl@gnu.org>
3017
Werner Lemberg02b8e7e2014-11-25 11:31:51 +01003018 */*: s/Invalid_Argument/Invalid_Size_Handle/ where appropriate.
3019
30202014-11-25 Werner Lemberg <wl@gnu.org>
3021
Werner Lemberg0d4aa232014-11-25 11:26:14 +01003022 */*: s/Invalid_Argument/Invalid_Stream_Handle/ where appropriate.
3023
30242014-11-25 Werner Lemberg <wl@gnu.org>
3025
Werner Lembergf4f9e682014-11-25 11:11:55 +01003026 */*: s/Invalid_Argument/Invalid_Library_Handle/ where appropriate.
3027
30282014-11-25 Werner Lemberg <wl@gnu.org>
3029
Werner Lemberg04c2aa12014-11-25 10:22:12 +01003030 */*: s/Invalid_Argument/Invalid_Outline/ where appropriate.
3031
30322014-11-25 Werner Lemberg <wl@gnu.org>
3033
Werner Lemberg04edbbd2014-11-25 10:21:13 +01003034 */*: s/Invalid_Argument/Invalid_Face_Handle/ where appropriate.
3035
Werner Lembergeca0f062014-11-24 10:22:08 +010030362014-11-24 Werner Lemberg <wl@gnu.org>
3037
Werner Lemberg3e867112014-11-25 09:01:07 +01003038 [Savannah bug #43682] Adjust some renderer callbacks.
3039
3040 * src/raster/ftraster.c (ft_black_set_mode): Change return type to
3041 `int' to stay in sync with `FT_Renderer_SetModeFunc' prototype.
3042
3043 * src/smooth/ftgrays.c (gray_raster_set_mode): New dummy function
3044 for orthogonality.
3045 (ft_grays_raster): Use it.
3046
Werner Lemberg04edbbd2014-11-25 10:21:13 +010030472014-11-25 Werner Lemberg <wl@gnu.org>
Werner Lemberg3e867112014-11-25 09:01:07 +01003048
Werner Lemberg6689a002014-11-25 08:53:09 +01003049 [Savannah bug #43682] Properly handle missing return errors.
3050
3051 The functions in this patch *do* return non-trivial errors that must
3052 be taken care of.
3053
3054 * src/autofit/afloader.c (af_loader_load_g), src/base/ftobjs.c
3055 (FT_Render_Glyph_Internal), src/base/ftoutln.c (FT_Outline_Render),
3056 src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_endchar>,
3057 src/psaux/psobjs.c (ps_parser_load_field_table), src/psaux/t1decode
3058 (t1_decoder_parse_charstrings) <op_endchar>, src/truetype/ttgload.c
3059 (load_truetype_glyph <subglyph loop>, tt_loader_init,
3060 TT_Load_Glyph), src/truetype/ttgxvar.c (TT_Set_MM_Blend),
3061 src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Do it.
3062
Werner Lemberg04edbbd2014-11-25 10:21:13 +010030632014-11-25 Werner Lemberg <wl@gnu.org>
Werner Lemberg6689a002014-11-25 08:53:09 +01003064
Werner Lembergb24e8ba2014-11-25 08:30:49 +01003065 [Savannah bug #43682] Add/remove `void' casts to some functions.
3066
3067 We use a cast to indicate that we intentionally ignore a function's
3068 return value. However, this doesn't apply to API functions where
3069 errors can only happen for trivially invalid input.
3070
3071 * src/base/ftstroke.c (FT_Glyph_Stroke, FT_Glyph_StrokeBorder),
3072 src/base/ftsynth.c (FT_GlyphSlot_Embolden), src/cff/cffgload.c
3073 (cff_slot_load), src/pfr/pfrdrivr.c (pfr_get_kerning),
3074 src/type1/t1load.c (parse_encoding), src/type42/t42parse.c
3075 (t42_parse_encoding): Do it.
3076
Werner Lemberg04edbbd2014-11-25 10:21:13 +010030772014-11-25 Werner Lemberg <wl@gnu.org>
Werner Lembergb24e8ba2014-11-25 08:30:49 +01003078
Werner Lembergef439fd2014-11-25 08:14:15 +01003079 [Savannah bug #43682] Change some signatures to `void' return type.
3080
3081 * include/internal/pshints.h (PSH_Globals_SetScaleFunc),
3082 include/internal/sfnt.h (TT_Get_Metrics_Func),
3083 src/pshinter/pshglob.c (psh_globals_set_scale),
3084 src/pshinter/pshrec.c (ps_hints_init), src/sfnt/ttmtx.c
3085 (tt_face_get_metrics), src/truetype/ttinterp.c (TT_Goto_CodeRange,
3086 TT_Set_CodeRange, TT_Clear_CodeRange, TT_Done_Context,
3087 TT_Save_Context): Do it.
3088
3089 * src/pshinter/pshglob.h, src/pshinter/pshrec.h, src/sfnt/ttmtx.h,
3090 src/truetype/ttgload.c (TT_Hint_Glyph), src/truetype/ttinterp.c
3091 (TT_Run_Context), src/truetype/ttinterp.h, src/truetype/ttobjs.c
3092 (tt_size_run_fpgm, tt_size_run_prep): Updated.
3093
30942014-11-24 Werner Lemberg <wl@gnu.org>
3095
Werner Lemberg6889f7b2014-11-24 17:16:08 +01003096 Remove all code related to FT_MAX_CHARMAP_CACHEABLE.
3097
3098 This is no longer used.
3099
3100 * src/base/ftobjs.c, src/cache/ftccmap.c, src/cff/cffobjs.c,
3101 src/sfnt/ttcmap.c: Do it.
3102
31032014-11-24 Werner Lemberg <wl@gnu.org>
3104
Werner Lembergf0292bb2014-11-24 10:51:21 +01003105 [sfnt] Fix Savannah bug #43680.
3106
3107 This adds an additional constraint to make the fix from 2013-01-25
3108 really work.
3109
3110 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_image) <index_format==4>:
3111 Check `p' before `num_glyphs'.
3112
31132014-11-24 Werner Lemberg <wl@gnu.org>
3114
Werner Lembergeca0f062014-11-24 10:22:08 +01003115 [truetype] Fix Savannah bug #43679.
3116
3117 * src/truetype/ttpload.c (tt_face_load_hdmx): Check minimum size of
3118 `record_size'.
3119
Jarkko Pöyry96341dc2014-11-24 09:53:07 +010031202014-11-24 Jarkko Pöyry <jarkko.poyry@gmail.com>
3121
3122 [cff, pfr, psaux, winfonts] Fix Savannah bug #43676.
3123
Werner Lemberged6a9df2014-12-06 23:28:58 +01003124 Don't cast cmap init function pointers to an incompatible type.
Jarkko Pöyry96341dc2014-11-24 09:53:07 +01003125
3126 Without this patch, the number of parameters between declaration and
3127 the real signature differs. Calling such a function results in
3128 undefined behavior.
3129
3130 ISO/IEC 9899:TC3 (Committee Draft September 7, 2007)
3131 6.5.2.2 Function calls
3132 9 If the function is defined with a type that is not
3133 compatible with the type (of the expression) pointed to by
3134 the expression that denotes the called function, the
3135 behavior is undefined.
3136
3137 On certain platforms (c -> js with emscripten) this causes
3138 termination of execution or invalid calls because in the emscripten
3139 implementation, function pointers of different types are stored in
3140 different pointer arrays. Incorrect pointer type here results in
3141 indexing of an incorrect array.
3142
3143 * src/cff/cffcmap.c (cff_cmap_encoding_init, cff_cmap_unicode_init),
3144 src/pfr/pfrcmap.c (pfr_cmap_init), src/psaux/t1cmap.c
3145 t1_cmap_standard_init, t1_cmap_expert_init, t1_cmap_custom_init,
3146 t1_cmap_unicode_init), src/winfonts/winfnt.c (fnt_cmap_init): Fix
3147 signature.
3148
Werner Lemberga7a42072014-11-24 06:44:45 +010031492014-11-24 Werner Lemberg <wl@gnu.org>
3150
Werner Lembergf70d9342014-11-24 09:31:32 +01003151 [sfnt] Fix Savannah bug #43672.
3152
3153 * src/sfnt/ttkern.c (tt_face_load_kern): Use correct value for
3154 minimum table length test.
3155
31562014-11-24 Werner Lemberg <wl@gnu.org>
3157
Werner Lemberg73be9f92014-11-24 07:30:05 +01003158 [type1, type42] Another fix for Savannah bug #43655.
3159
3160 * src/type1/t1load.c (parse_charstrings), src/type42/t42parse.c
3161 (t42_parse_charstrings): Add another boundary testing.
3162
31632014-11-24 Werner Lemberg <wl@gnu.org>
3164
Werner Lemberga7a42072014-11-24 06:44:45 +01003165 [docmaker] Formatting, copyright, improved documentation.
3166
3167 * src/tools/docmaker/*: No code changes besides trivial
3168 modifications.
3169
Werner Lemberg9bd20b72014-11-22 06:24:45 +010031702014-11-22 Werner Lemberg <wl@gnu.org>
3171
Werner Lembergaf834612014-11-22 13:29:10 +01003172 [bdf] Fix Savannah bug #43660.
3173
3174 * src/bdf/bdflib.c (_bdf_parse_glyphs) <"ENDFONT">: Check
3175 `_BDF_GLYPH_BITS'.
3176
31772014-11-22 Werner Lemberg <wl@gnu.org>
3178
Werner Lemberg42fcd662014-11-22 12:44:33 +01003179 [type42] Allow only embedded TrueType fonts.
3180
3181 This is a follow-up to Savannah bug #43659.
3182
3183 * src/type42/t42objs.c (T42_Face_Init): Exclusively use the
3184 `truetype' font driver for loading the font contained in the `sfnts'
3185 array.
3186
31872014-11-22 Werner Lemberg <wl@gnu.org>
3188
Werner Lemberg37881872014-11-22 10:46:47 +01003189 [type42] Fix Savannah bug #43659.
3190
3191 * src/type42/t42objs.c (T42_Open_Face): Initialize `face->ttf_size'.
3192
3193 * src/type42/t42parse.c (t42_parse_sfnts): Always set
3194 `face->ttf_size' directly. This ensures a correct stream size in
3195 the call to `FT_Open_Face', which follows after parsing, even for
3196 buggy input data.
3197 Fix error messages.
3198
31992014-11-22 Werner Lemberg <wl@gnu.org>
3200
Werner Lemberg5f201ab2014-11-22 09:16:39 +01003201 [cff] Fix Savannah bug #43658.
3202
3203 * src/cff/cf2ft.c (cf2_builder_lineTo, cf2_builder_cubeTo): Handle
3204 return values of point allocation routines.
3205
32062014-11-22 Werner Lemberg <wl@gnu.org>
3207
Werner Lemberg9bd20b72014-11-22 06:24:45 +01003208 [sfnt] Fix Savannah bug #43656.
3209
3210 * src/sfnt/ttcmap.c (tt_cmap4_validate): Fix order of validity
3211 tests.
3212
Werner Lemberg6de76172014-11-21 06:05:49 +010032132014-11-21 Werner Lemberg <wl@gnu.org>
3214
Werner Lembergdd897102014-11-21 22:19:28 +01003215 [type1, type42] Fix Savannah bug #43655.
3216
3217 * src/type1/t1load.c (parse_charstrings), src/type42/t42parse.c
3218 (t42_parse_charstrings): Fix boundary testing.
3219
32202014-11-21 Werner Lemberg <wl@gnu.org>
3221
Werner Lembergb1fc00d2014-11-21 12:06:40 +01003222 * src/pcf/pcfread.c (pcf_get_metrics): Sanitize invalid metrics.
3223
32242014-11-21 Werner Lemberg <wl@gnu.org>
3225
Werner Lemberg9154dab2014-11-21 08:03:51 +01003226 [ftlcdfil] Obey flow direction.
3227
3228 * src/base/ftlcdfil.c (_ft_lcd_filter_fir, _ft_lcd_filter_legacy):
3229 Handle `up' flow.
3230
32312014-11-21 Werner Lemberg <wl@gnu.org>
3232
Werner Lemberg644d6fa2014-11-21 07:28:50 +01003233 * src/base/ftbitmap.c (FT_Bitmap_Convert): Improve.
3234
3235 This commit completes argument checks and adds support for different
3236 flow directions.
3237
32382014-11-21 Werner Lemberg <wl@gnu.org>
3239
Werner Lemberg6de76172014-11-21 06:05:49 +01003240 * src/base/ftbitmap.c (FT_Bitmap_Copy): Improve.
3241
3242 This commit adds argument checks and support for different flow
3243 directions.
3244
Werner Lemberg1e6e1b82014-11-20 21:07:56 +010032452014-11-20 Werner Lemberg <wl@gnu.org>
3246
3247 * src/base/ftbitmap.c (FT_Bitmap_New): Check argument.
3248
Werner Lembergd6061212014-11-19 21:13:23 +010032492014-11-19 Werner Lemberg <wl@gnu.org>
3250
Werner Lembergb3500af2014-11-19 21:28:21 +01003251 Change some fields in `FT_Bitmap' to unsigned type.
3252
3253 This doesn't break ABI.
3254
3255 * include/ftimage.h (FT_Bitmap): Make `rows', `width', `num_grays',
3256 `pixel_mode', and `palette_mode' unsigned types.
3257
3258 * src/base/ftbitmap.c: Updated.
3259 (FT_Bitmap_Copy): Fix casts.
3260
3261 * src/cache/ftcsbits.c, src/raster/ftraster.c, src/sfnt/pngshim.c:
3262 Updated.
3263
32642014-11-19 Werner Lemberg <wl@gnu.org>
3265
Werner Lembergdf485772014-11-19 21:21:23 +01003266 Make `FT_Bitmap_Convert' correctly handle negative `pitch' values.
3267
3268 * src/base/ftbitmap.c (FT_Bitmap_Convert): Always use positive value
3269 for the pitch while copying data.
3270 Correctly set pitch sign in target bitmap.
3271
32722014-11-19 Werner Lemberg <wl@gnu.org>
3273
Werner Lembergd6061212014-11-19 21:13:23 +01003274 Minor code improvement in `FT_Bitmap_Embolden'.
3275
3276 * src/base/ftbitmap.c (FT_Bitmap_Embolden) <FT_PIXEL_MODE_GRAY[24]>:
3277 Fix thinko.
3278
Alexei Podtelezhnikovf841ad32014-11-19 21:19:06 -050032792014-11-19 Alexei Podtelezhnikov <apodtele@gmail.com>
3280
3281 * src/base/fttrigon.c: Use dedicated `FT_Angle' for arctan table.
3282
Werner Lemberga67c43e2014-11-19 06:46:23 +010032832014-11-19 Behdad Esfahbod <behdad@behdad.org>
3284
3285 Avoid compiler warnings on x86-64 for `FT_MulFix'.
3286
3287 `FT_MulFix' takes `FT_Long' parameters as defined in `freetype.h',
3288 but several inline implementations of it in `ftcalc.h' take
3289 `FT_Int32' arguments. This is causing compiler warnings on x86-64:
3290 If parameters of type `FT_Fixed' (= `FT_Long') are passed to the
3291 inline implementation of this function, integer values are truncated
3292 from 64bit to 32bit.
3293
3294 * include/internal/ftcalc.h (FT_MulFix) [FT_MULFIX_ASSEMBLER]: Add
3295 casts.
3296
Werner Lemberg54abd222014-11-15 09:05:22 +010032972014-11-15 Werner Lemberg <wl@gnu.org>
3298
3299 [sfnt] Fix Savannah bug #43597.
3300
3301 * src/sfnt/pngshim.c (Load_SBit_Png): Protect against too large
3302 bitmaps.
3303
Werner Lemberg602040b2014-11-12 20:51:20 +010033042014-11-12 Werner Lemberg <wl@gnu.org>
3305
Werner Lemberg257c2702014-11-12 21:42:13 +01003306 [sfnt] Fix Savannah bug #43591.
3307
3308 * src/sfnt/ttsbit.c (tt_sbit_decoder_init): Protect against addition
3309 and multiplication overflow.
3310
33112014-11-12 Werner Lemberg <wl@gnu.org>
3312
Werner Lemberg677ddf42014-11-12 21:26:44 +01003313 [sfnt] Fix Savannah bug #43590.
3314
3315 * src/sfnt/ttload.c (check_table_dir, tt_face_load_font_dir):
3316 Protect against addition overflow.
3317
33182014-11-12 Werner Lemberg <wl@gnu.org>
3319
Werner Lembergf46add12014-11-12 21:06:08 +01003320 [sfnt] Fix Savannah bug #43589.
3321
3322 * src/sfnt/sfobjs.c (woff_open_font): Protect against addition
3323 overflow.
3324
33252014-11-12 Werner Lemberg <wl@gnu.org>
3326
Werner Lemberg602040b2014-11-12 20:51:20 +01003327 [sfnt] Fix Savannah bug #43588.
3328
3329 * src/sfnt/ttcmap.c (tt_cmap8_validate, tt_cmap10_validate,
3330 tt_cmap12_validate, tt_cmap13_validate, tt_cmap14_validate): Protect
3331 against overflow in additions and multiplications.
3332
Alexei Podtelezhnikov2e73a1b2014-11-09 23:22:43 -050033332014-11-10 Alexei Podtelezhnikov <apodtele@gmail.com>
3334
3335 [base] CORDIC improvements.
3336
3337 The scaling between the hypotenuse and its CORDIC approximation is
3338 based on regression analysis. The smaller padding for `theta' is
3339 justifed by its maximum error of less than 6.
3340
3341 * src/base/fttrigon.c (ft_trig_downscale): Borrow code from
3342 ./ftcalc.c (ft_multo64), change linear intercept.
3343 (ft_trig_pseudo_polarize): Decrease `theta' padding.
3344
Werner Lemberg0e73d212014-11-09 01:27:38 +010033452014-11-09 Werner Lemberg <wl@gnu.org>
3346
3347 * src/base/ftstroke.c (ft_stroker_inside): Fix border intersections.
3348
3349 One more place to check whether `radius' is zero.
3350
3351 Problem reported by Marco Wertz <marco.wertz@gmx.de>.
3352
Werner Lemberg2c4832d2014-11-07 07:42:33 +010033532014-11-07 Werner Lemberg <wl@gnu.org>
3354
Werner Lemberg602040b2014-11-12 20:51:20 +01003355 [bdf] Fix Savannah bug #43535.
Werner Lemberg2c4832d2014-11-07 07:42:33 +01003356
3357 * src/bdf/bdflib.c (_bdf_strncmp): New macro that checks one
3358 character more than `strncmp'.
3359 s/ft_strncmp/_bdf_strncmp/ everywhere.
3360
Werner Lembergf49a1002014-11-06 13:30:28 +010033612014-11-06 Werner Lemberg <wl@gnu.org>
3362
Werner Lemberg602040b2014-11-12 20:51:20 +01003363 [pcf] Fix Savannah bug #43548.
Werner Lembergef1eba72014-11-06 23:25:05 +01003364
Werner Lemberg2c4832d2014-11-07 07:42:33 +01003365 * src/pcf/pcfread.c (pcf_get_encodings): Add sanity checks for row
3366 and column values.
Werner Lembergef1eba72014-11-06 23:25:05 +01003367
33682014-11-06 Werner Lemberg <wl@gnu.org>
3369
Werner Lemberg602040b2014-11-12 20:51:20 +01003370 [pcf] Fix Savannah bug #43547.
Werner Lemberg0e2f5d52014-11-06 22:32:46 +01003371
3372 * src/pcf/pcfread.c (pcf_read_TOC): Check `size' and `offset'
3373 values.
3374
33752014-11-06 Werner Lemberg <wl@gnu.org>
3376
Werner Lembergf49a1002014-11-06 13:30:28 +01003377 * src/pcf/pcfread.c (pcf_read_TOC): Avoid memory leak.
3378
Infinalityfacfc792014-11-03 07:24:59 +010033792014-11-03 Infinality <infinality@infinality.net>
3380
3381 * src/truetype/ttsubpix.c (COMPATIBILITY_MODE_Rules): Updated.
3382
3383 The previous commit deteriorates rendering of DejaVu and similar
3384 fonts; this gets compensated with this rule.
3385
Werner Lemberg706f7522014-11-03 07:20:57 +010033862014-11-03 Werner Lemberg <wl@gnu.org>
3387
3388 * src/truetype/ttinterp.c (Ins_DELTAP): Fix subpixel hinting.
3389
3390 Before this patch, it was impossible to ever call DELTAP[123] in
3391 subpixel hinting mode as described in the ClearType whitepaper; it
3392 only worked if in `compatibility mode'. However, compatibility mode
3393 essentially disables SHPIX, completely ruining hinting of
3394 ttfautohint output, for example.
3395
3396 We now follow the whitepaper more closely so that DELTAP[123]
3397 instructions for touched points in the non-subpixel direction are
3398 executed.
3399
Alexei Podtelezhnikove1efe0a2014-10-31 00:07:14 -040034002014-10-31 Alexei Podtelezhnikov <apodtele@gmail.com>
3401
Alexei Podtelezhnikov525d4872014-10-31 22:12:37 -04003402 [smooth] Improve code readability.
3403
3404 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Rearrange code.
3405
34062014-10-31 Alexei Podtelezhnikov <apodtele@gmail.com>
3407
Alexei Podtelezhnikove1efe0a2014-10-31 00:07:14 -04003408 [smooth] Reduce outline translations during rendering.
3409
3410 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Translate origin
3411 virtually by modifying cbox, actually translate outline if cumulative
3412 shift is not zero.
3413
Alexei Podtelezhnikovc7fd9352014-10-30 22:43:01 -040034142014-10-30 Alexei Podtelezhnikov <apodtele@gmail.com>
3415
3416 [smooth] Fix Savannah bug #35604 (cont'd).
3417
3418 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Remove checks and
3419 casts that became unnecessary after the variable type upgrades.
3420
Alexei Podtelezhnikov74916992014-10-29 22:24:24 -040034212014-10-29 Alexei Podtelezhnikov <apodtele@gmail.com>
3422
Alexei Podtelezhnikov465ab992014-10-29 23:45:23 -04003423 [smooth] Improve code readability.
3424
3425 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Rearrange code.
3426
34272014-10-29 Alexei Podtelezhnikov <apodtele@gmail.com>
3428
Alexei Podtelezhnikov74916992014-10-29 22:24:24 -04003429 Unify hypotenuse approximations.
3430
3431 * include/internal/ftcalc.h (FT_HYPOT): Move macro from here...
3432 * include/internal/ftobjs.h: ... to here, next to required `FT_ABS'.
3433 * src/smooth/ftgrays.c (gray_render_cubic): Use it here.
3434
Werner Lembergfe151522014-10-25 05:56:59 +020034352014-10-25 Werner Lemberg <wl@gnu.org>
3436
3437 [cff] Test valid darkening parameter macros in `ftoption.h'.
3438
3439 We no longer need an otherwise unused typedef that can cause a gcc
3440 warning.
3441 Problem reported by Alexei.
3442
3443 * src/cff/cffobjs.c (cff_driver_init): Use
3444 `CFF_CONFIG_OPTION_DARKENING_PARAMETER_XXX' macros directly.
3445 (SET_DARKENING_PARAMETERS): Removed.
3446 Compile time tests are now ...
3447
3448 * devel/ftoption.h, include/config/ftoption.h: ... here.
3449
Alexei Podtelezhnikovaba0f492014-10-24 23:50:57 -040034502014-10-25 Alexei Podtelezhnikov <apodtele@gmail.com>
3451
3452 Improve flat corner definition.
3453
3454 * include/internal/ftcalc.h (FT_HYPOT): Macro to approximate Euclidean
3455 distance with the alpha max plus beta min algorithm.
3456 * src/base/ftcalc.c (ft_corner_is_flat): Use it instead of Taxicab
3457 metric.
3458
David Weißdd8de1a2014-10-23 20:01:48 +020034592014-10-23 David Weiß <David.Weiss@ptvgroup.com>
3460
3461 [build] Improve property file for vc2010.
3462
3463 User-defined properties should be empty by default to prevent linker
3464 failures.
3465
3466 * builds/windows/vc2010/freetype.user.props,
3467 builds/windows/vc2010/freetype.vcxproj:
3468 s/OptionsDirectory/UserOptionDirectory/.
3469 Comment out all user options.
3470
Werner Lembergdd570e92014-10-23 19:57:37 +020034712014-10-23 Werner Lemberg <wl@gnu.org>
3472
3473 [cff] Work around bug in preprocessor of MSVC 2010.
3474
3475 We have been hit by
3476
3477 https://connect.microsoft.com/VisualStudio/feedback/details/718976/msvc-pr
3478
3479 * devel/ftoption.h, include/config/ftoption.h: Replace
3480 `CFF_CONFIG_OPTION_DARKENING_PARAMETERS' with eight macros
3481 `CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4}'.
3482
3483 * src/cff/cffobjs.c (SET_DARKENING_PARAMETERS): Removed. We no
3484 longer need double expansion.
3485 (SET_DARKENING_PARAMETERS_0): Renamed to ...
3486 (SET_DARKENING_PARAMETERS): ... this.
3487 Update call.
3488
Werner Lembergcc7bb802014-10-20 08:35:50 +020034892014-10-20 Werner Lemberg <wl@gnu.org>
3490
3491 [sbit] Minor fixes.
3492
3493 * src/sfnt/ttsbit.c (tt_face_load_sbit) [TT_SBIT_TABLE_TYPE_SBIX]:
3494 Accept overlay format also, but emit warning message in that case.
3495 (tt_sbit_decoder_load_metrics): Add missing newline to error
3496 message.
3497 (tt_sbit_load_sbix_image): Add `rgbl' graphic type (as used on iOS
3498 7.1) to the list of unsupported formats.
3499
Alexei Podtelezhnikov118e6512014-10-19 23:31:08 -040035002014-10-19 Alexei Podtelezhnikov <apodtele@gmail.com>
3501
3502 [truetype] Clean up bytecode rounding.
3503
3504 Zero distance does not have to be treated specially if you follow
3505 specifications and check the sign as the very last step of rounding.
3506
3507 * src/truetype/ttinterp.c (Round_None, Round_To_Grid,
3508 Round_Down_To_Grid, Round_Up_To_Grid, Round_To_Double_Grid): Use
3509 macros when available, do not check for non-zero distance.
3510 (Round_To_Half_Grid, Round_Super, Round_Super_45): Ditto, return phase
3511 if sign changed.
3512
Alexei Podtelezhnikovd4aabda2014-10-18 10:10:04 -040035132014-10-18 Alexei Podtelezhnikov <apodtele@gmail.com>
3514
3515 [truetype] Unwrap engine compensation settings.
3516
3517 * src/truetype/ttobjs.c (tt_size_init_bytecode): Updated.
3518
David Weißfede19e2014-10-18 14:59:20 +020035192014-10-18 David Weiß <David.Weiss@ptvgroup.com>
3520
3521 [build] Add property file to vc2010 project.
3522
3523 This simplifies custom build configurations, especially for
3524 automated build environments.
3525
3526 * builds/windows/vc2010/freetype.user.props: New configuration file.
3527
3528 * builds/windows/vc2010/freetype.vcxproj: Include
3529 `freetype.user.props' and use its data fields.
3530
3531 * builds/windows/vc2010/index.html: Updated.
3532
Werner Lembergc9c33f22014-10-18 11:01:14 +020035332014-10-18 Werner Lemberg <wl@gnu.org>
3534
3535 [autofit] Add blue-zone support for Telugu.
3536
3537 This essentially moves the Telugu script from the `Indic' hinter to
3538 the `Latin' hinter.
3539
3540 Note that this is a first shot and quite certainly needs
3541 refinements.
3542
3543 * src/autofit/afblue.dat: Add blue zone data for Telugu.
3544
3545 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3546
3547 * src/autofit/afscript.h: Add Telugu standard characters and move
3548 data out of AF_CONFIG_OPTION_INDIC block.
3549
3550 * src/autofit/afranges.c: Move Telugu data out of
3551 AF_CONFIG_OPTION_INDIC block.
3552
3553 * src/autofit/afstyles.h: Update Telugu data; in particular, use
3554 AF_WRITING_SYSTEM_LATIN.
3555
Werner Lemberg54306f52014-10-18 10:42:28 +020035562014-10-18 David Wimsey <david@wimsey.us>
3557
3558 [cmake] Add iOS build support.
Werner Lemberg1050aa92014-10-18 10:45:09 +02003559 From Savannah patch #8497.
Werner Lemberg54306f52014-10-18 10:42:28 +02003560
3561 * builds/cmake/iOS.cmake: New file. Universal binaries are built
3562 with both 32 and 64 bit arm architectures.
3563
3564 * CMakeLists.txt (IOS_PLATFORM): New variable for running the iOS
3565 toolchain. Possible values are `OS' to build on iOS, or
3566 `SIMULATOR' to build on APPLE.
3567
Werner Lemberg1a1750f2014-10-16 22:54:01 +020035682014-10-16 Behdad Esfahbod <behdad@behdad.org>
3569 Werner Lemberg <wl@gnu.org>
3570
3571 [cff] Add `CFF_CONFIG_OPTION_DARKENING_PARAMETERS' config macro.
3572
3573 * devel/ftoption.h, include/config/ftoption.h
3574 (CFF_CONFIG_OPTION_DARKENING_PARAMETERS): New macro.
3575
3576 * src/cff/cffobjs.c (SET_DARKENING_PARAMETERS,
3577 SET_DARKENING_PARAMETERS_0): New macros.
3578 (cff_driver_init): Use new macros.
3579
Alexei Podtelezhnikov7e83f062014-10-14 23:03:56 -040035802014-10-14 Alexei Podtelezhnikov <apodtele@gmail.com>
3581
3582 [truetype] Limit delta shift range.
3583
Werner Lembergdf3d67e2014-10-16 07:24:44 +02003584 The valid range for delta shift is zero through six. Negative values
3585 are invalid according to
3586
Alexei Podtelezhnikov7e83f062014-10-14 23:03:56 -04003587 https://developer.apple.com/fonts/TrueType-Reference-Manual/RM04/Chap4.html#delta%20shift
3588
3589 * src/truetype/ttobjs.h (delta_shift, delta_base): Make unsigned.
Werner Lembergdf3d67e2014-10-16 07:24:44 +02003590 * src/truetype/ttinterp.h (DO_SDS): Throw an error if `delta_shift'
3591 is out of range.
3592 (Ins_DELTAP, Ins_DELTAC): Optimize for valid `delta_shift'.
Alexei Podtelezhnikov7e83f062014-10-14 23:03:56 -04003593
Werner Lemberg03987bf2014-10-16 07:19:46 +020035942014-10-16 Werner Lemberg <wl@gnu.org>
3595
3596 A better fix for Savannah bug #43392.
3597 Suggested by Doug Felt <dougfelt@gmail.com>.
3598
Werner Lembergdf3d67e2014-10-16 07:24:44 +02003599 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics): Set
Werner Lemberg03987bf2014-10-16 07:19:46 +02003600 `vertAdvance' to zero...
3601
3602 * src/truetype/ttgload.c (TT_Load_Glyph): ... and set here a default
3603 value for `vertAdvance' based on `linearVertAdvance' in case
3604 `vertAdvance' is zero. Note that the previous computed ad-hoc value
3605 for `linearVertAdvance' was apparently not tested in a real-life
3606 situation.
3607
David Weiß3889cb22014-10-14 11:35:16 +020036082014-10-14 David Weiß <David.Weiss@ptvgroup.com>
3609
3610 [build] Better optimization settings for vc2010 solution file.
3611
3612 * builds/windows/vc2010/freetype.sln,
3613 builds/windows/vc2010/freetype.vcxproj: Updated.
3614
Werner Lemberg8f178092014-10-14 08:28:09 +020036152014-10-14 Werner Lemberg <wl@gnu.org>
3616
3617 [autofit] Adjust Devenagari character range.
3618
3619 * src/autofit/afranges.c (af_deva_uniranges): Omit characters that
3620 are common to all other Indic scripts.
3621
Werner Lemberg1ca5fa12014-10-12 08:31:32 +020036222014-10-12 Werner Lemberg <wl@gnu.org>
3623
3624 [sfnt] Fix Savannah bug #43392.
3625
3626 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics): Don't let
3627 vertical metrics uninitialized.
3628
Alexei Podtelezhnikov673a28e2014-10-11 14:40:51 -040036292014-10-11 Alexei Podtelezhnikov <apodtele@gmail.com>
3630
3631 [base] Small bbox correction.
3632
3633 * src/base/ftbbox.c (FT_Outline_Get_BBox): Start from nonsense bbox
Werner Lembergdf3d67e2014-10-16 07:24:44 +02003634 instead of initial point that could be `off' in conic outlines.
Alexei Podtelezhnikov673a28e2014-10-11 14:40:51 -04003635
Alexei Podtelezhnikov2ffcf172014-10-08 22:01:08 -040036362014-10-08 Alexei Podtelezhnikov <apodtele@gmail.com>
3637
Alexei Podtelezhnikov40dac112014-10-09 00:58:14 -04003638 [base] Fix Savannah bug #43356.
3639
3640 * src/base/ftbbox.c (BBox_Move_To, BBox_Conic_To): Update bbox in case
Werner Lembergdf3d67e2014-10-16 07:24:44 +02003641 of implicit `to'.
Alexei Podtelezhnikov40dac112014-10-09 00:58:14 -04003642 (BBox_Line_To): New emitter that does not update bbox.
3643
36442014-10-08 Alexei Podtelezhnikov <apodtele@gmail.com>
3645
Alexei Podtelezhnikov2ffcf172014-10-08 22:01:08 -04003646 [base] Introduce and use new macro `FT_UPDATE_BBOX'
3647
3648 * src/base/ftbbox.c (FT_UPDATE_BBOX): New macro.
3649 (FT_Outline_Get_BBox): Use it here.
3650
Alexei Podtelezhnikov7abdb8c2014-10-02 23:13:33 -040036512014-10-02 Alexei Podtelezhnikov <apodtele@gmail.com>
3652
3653 [base] Significant optimization of `ft_div64by32'
3654
3655 We shift as many bits as we can into the high register, perform
3656 32-bit division with modulo there, then work through the remaining
3657 bits with long division. This optimization is especially noticeable
3658 for smaller dividends that barely use the high register.
3659
3660 * src/base/ftcalc.c (ft_div64by32): Updated.
3661
Dave Arnold537c55d2014-10-02 06:32:32 +020036622014-10-02 Dave Arnold <darnold@adobe.com>
3663
3664 [cff] Fix Savannah bug #43271.
3665
3666 * src/cff/cf2font.c (cf2_computeDarkening): Change overflow
3667 detection to use logarithms and clamp `scaledStem'.
3668
Alexei Podtelezhnikov418e18f2014-10-01 22:36:40 -040036692014-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
3670
Alexei Podtelezhnikov74d0aad2014-10-01 23:27:15 -04003671 * src/base/ftcalc.c: Remove miscellaneous type casts.
3672
36732014-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
3674
Alexei Podtelezhnikov418e18f2014-10-01 22:36:40 -04003675 [base] Use more common `FT_MSB' implementation with masks.
3676
3677 * src/base/ftcalc.c (FT_MSB): Updated.
3678
Alexei Podtelezhnikov955aff12014-09-30 23:09:39 -040036792014-09-30 Alexei Podtelezhnikov <apodtele@gmail.com>
3680
3681 [base] Clean up.
3682
3683 * src/base/ftcalc.c (FT_MOVE_SIGN): New macro for frequently used
3684 code.
3685
Alexei Podtelezhnikov7f491112014-09-25 22:54:38 -040036862014-09-25 Alexei Podtelezhnikov <apodtele@gmail.com>
3687
3688 [base] Avoid unnecessary long division.
3689
3690 This applies to `FT_MulDiv' but not to `FT_DivFix', where overflows or
3691 lack thereof are predicted accurately.
3692
3693 * src/base/ftcalc.c (ft_div64by32): Improve readability.
3694 (FT_MulDiv, FT_MulDiv_No_Round) [!FT_LONG64]: Use straight division
3695 when multiplication stayed within 32 bits.
3696
Werner Lemberg5b68e4f2014-09-24 19:06:13 +020036972014-09-24 Werner Lemberg <wl@gnu.org>
3698
3699 [autofit] Minor clean-ups.
3700
3701 * src/autofit/afhints.c (AF_FLAGS): Remove obsolete values.
3702
3703 * src/autofit/afhints.c (af_glyph_hints_dump_points,
3704 af_glyph_hints_align_strong_points): Updated.
3705
3706 * src/autofit/aflatin.c (af_latin_hints_link_segments,
3707 af_latin_hints_compute_segments), src/autofit/afcjk.c
3708 (af_cjk_hints_link_segments), src/autofit/aflatin2.c
3709 (af_latin2_hints_link_segments, af_latin2_hints_compute_segments):
3710 There are no longer fake segments since more than 10 years...
3711
Werner Lemberg387a9fe2014-09-22 06:42:24 +020037122014-09-22 Werner Lemberg <wl@gnu.org>
3713
3714 [autofit] Minor code streamlining.
3715
3716 * src/autofit/afhints.c (af_axis_hints_new_edge): Remove redundant
3717 initialization.
3718
Alexei Podtelezhnikov5c894842014-09-19 22:03:15 -040037192014-09-19 Alexei Podtelezhnikov <apodtele@gmail.com>
3720
3721 * src/base/ftcalc.c: Harmonize code.
3722
37232014-09-15 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikovbc12d9e2014-09-08 21:27:43 -04003724
Alexei Podtelezhnikovef070d42014-09-15 22:06:19 -04003725 [base] Tighten the overflow check in `FT_MulDiv'.
3726
3727 * src/base/ftcalc.c (FT_MulDiv) [!FT_LONG64]: Updated.
3728
37292014-09-08 Alexei Podtelezhnikov <apodtele@gmail.com>
3730
Alexei Podtelezhnikovbc12d9e2014-09-08 21:27:43 -04003731 Fix Savannah bug #43153.
3732
3733 * src/psaux/psconv.c (PS_Conv_ToFixed): Add protection against
Alexei Podtelezhnikov7abdb8c2014-10-02 23:13:33 -04003734 overflow in `divider'.
Alexei Podtelezhnikovbc12d9e2014-09-08 21:27:43 -04003735
Alexei Podtelezhnikov32128522014-09-03 21:57:42 -040037362014-09-03 Alexei Podtelezhnikov <apodtele@gmail.com>
3737
Alexei Podtelezhnikov336735d2014-09-03 22:55:26 -04003738 [base] Tighten the overflow check in `FT_DivFix'.
3739
3740 This fixes a 13-year old bug. The original overflow check should have
3741 been updated when rounding was introduced into this function
3742 (c2cd00443b).
3743
3744 * src/base/ftcalc.c (FT_DivFix) [!FT_LONG64]: Updated.
3745 * include/freetype.h (FT_DivFix): Updated documentation.
3746
37472014-09-03 Alexei Podtelezhnikov <apodtele@gmail.com>
3748
Alexei Podtelezhnikov32128522014-09-03 21:57:42 -04003749 [base] Tighten the overflow check in `FT_MulFix'.
3750
3751 * src/base/ftcalc.c (FT_MulFix) [!FT_LONG64]: Updated.
3752
Alexei Podtelezhnikov125c3ca2014-09-02 22:38:59 -040037532014-09-02 Alexei Podtelezhnikov <apodtele@gmail.com>
3754
3755 [truetype] Shortcut ppem calculations for square pixels.
3756
3757 * src/truetype/ttinterp.h (TT_ExecContextRec): New field
3758 `cur_ppem_func' with a function pointer.
3759 * src/truetype/ttinterp.c (TT_RunIns): Initialize `cur_ppem_func'
3760 depending on the pixel geometry to either...
3761 (Current_Ppem_Stretched): ... this for stretched pixels.
3762 (Current_Ppem): ... or this for square pixels.
3763 (DO_MPPEM, DO_MPS, Ins_DELTAP, Ins_DELTAC): Use `cur_ppem_func'.
3764
Behdad Esfahbod1ec98b22014-08-31 08:47:11 +020037652014-08-31 Behdad Esfahbod <behdad@behdad.org>
3766
3767 Don't use `register' keyword. Fixes compiler warnings.
3768
3769 * src/base/ftcalc.c (FT_Add64) [!FT_LONG64]: Do it.
3770 * src/gzip/inftrees.c (huft_build): Ditto.
3771 * src/truetype/ttinterp.c (TT_MulFix14_arm): Ditto.
3772
Alexei Podtelezhnikova8bc49e2014-08-24 22:14:01 -040037732014-08-24 Alexei Podtelezhnikov <apodtele@gmail.com>
3774
Alexei Podtelezhnikov125c3ca2014-09-02 22:38:59 -04003775 [truetype] Optimize DELTAP and DELTAC.
Alexei Podtelezhnikova8bc49e2014-08-24 22:14:01 -04003776
3777 * src/truetype/ttinterp.c (Ins_DELTAP, Ins_DELTAC): Move ppem
3778 calculations outside of the loop.
3779
Alexei Podtelezhnikov98688592014-08-21 23:28:52 -040037802014-08-21 Alexei Podtelezhnikov <apodtele@gmail.com>
3781
3782 Fix Savannah bug #43033.
3783
3784 * include/config/ftconfig.h, builds/unix/ftconfig.in,
3785 builds/vms/ftconfig.h [FT_LONG64]: Do not disable the macro when
3786 64-bit type is `long'.
3787
Alexei Podtelezhnikov8fd87d42014-08-20 00:57:22 -040037882014-08-20 Alexei Podtelezhnikov <apodtele@gmail.com>
3789
3790 [base] Small optimization of `FT_MulFix'.
3791
3792 * src/base/ftcalc.c (FT_MulFix): Loosen up the condition for direct
3793 32-bit calculations.
3794
Alexei Podtelezhnikovf09326a2014-08-20 00:08:38 -040037952014-08-19 Alexei Podtelezhnikov <apodtele@gmail.com>
3796
3797 [base] Use unsigned calculation in `FT_MulDiv'.
3798
3799 * src/base/ftcalc.c (FT_MulDiv): Updated to expand 32-bit range.
3800
Alexei Podtelezhnikov382f3152014-08-18 23:16:15 -040038012014-08-18 Alexei Podtelezhnikov <apodtele@gmail.com>
3802
3803 [base] Remove truncation in `FT_DivFix'.
3804
3805 * src/base/ftcalc.c (FT_DivFix): Updated.
3806
Alexei Podtelezhnikov5ef20232014-08-14 23:21:46 -040038072014-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
3808
3809 Minor refactoring.
3810
3811 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round): Updated.
3812
38132014-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikovc7022462014-08-14 23:01:01 -04003814
3815 Turn FT_MSB into a macro when using gcc builtins.
3816
3817 * src/base/ftcalc.c, include/internal/ftcalc.h: Updated.
3818
Alexei Podtelezhnikovf8efbcf2014-08-12 23:22:17 -040038192014-08-12 Alexei Podtelezhnikov <apodtele@gmail.com>
3820
3821 [base] Avoid undefined FT_MSB in `BBox_Cubic_Check'.
3822
3823 * src/base/ftbbox.c (BBox_Cubic_Check): Update.
3824 (update_cubic_max): Repalce with...
3825 (cubic_peak): ... this, which now handles upscaling.
3826
Alexei Podtelezhnikov47289932014-08-11 23:39:34 -040038272014-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
3828
Alexei Podtelezhnikov28018d42014-08-12 00:26:16 -04003829 [base] Handle collapsed outlines to avoid undefined FT_MSB.
3830
3831 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Update.
3832
38332014-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
3834
Alexei Podtelezhnikov47289932014-08-11 23:39:34 -04003835 [base] Restore FT_MulFix inlining.
3836
3837 * include/freetype.h (FT_MulFix): Unconditionally defined.
3838
3839 * src/base/ftcalc.c [FT_MULFIX_ASSEMBLER]: Move code from here...
3840
3841 * include/internal/ftcalc.h [FT_MULFIX_ASSEMBLER]: ... to here,
3842 which conditionally replaces the function with an inline version
3843 through the macro.
3844
Alexei Podtelezhnikov90be4b62014-08-08 22:27:10 -040038452014-08-08 Alexei Podtelezhnikov <apodtele@gmail.com>
3846
3847 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Refactor.
3848
Werner Lembergd17cabf2014-07-26 09:53:50 +090038492014-07-26 Werner Lemberg <wl@gnu.org>
3850
3851 [cff] Fix typo.
3852
3853 * src/cff/cf2hints.c (cf2_glyphpath_computeOffset): Use correct
3854 offsets in third quadrant.
3855
3856 Reported by maks <maksqwe1@ukr.net>.
3857
Werner Lemberg4e754132014-07-17 17:34:49 +090038582014-07-17 Werner Lemberg <wl@gnu.org>
3859
3860 Fix Savannah bug #42788.
3861
3862 * src/pfr/pfrobjs.c: Include `ftcalc.h'.
3863
Alexei Podtelezhnikovc0a6f202014-07-16 22:05:56 -040038642014-07-16 Alexei Podtelezhnikov <apodtele@gmail.com>
3865
3866 Replace `ft_highpow2' function.
3867
3868 * src/pfr/pfrobjs.c (pfr_face_get_kerning): Use `FT_MSB' instead of
3869 `ft_highpow2'.
3870
3871 * src/base/ftutil.c, include/internal/ftobjs.h (ft_highpow2): Remove
3872 it.
3873
Alexei Podtelezhnikov71330ce2014-07-15 23:30:45 -040038742014-07-15 Alexei Podtelezhnikov <apodtele@gmail.com>
3875
Werner Lembergcbbf26b2014-07-17 17:27:12 +09003876 * src/base/ftcalc.c (FT_MSB): Utilize gcc builtins.
Alexei Podtelezhnikov177982e2014-07-15 23:54:34 -04003877
38782014-07-15 Alexei Podtelezhnikov <apodtele@gmail.com>
3879
Alexei Podtelezhnikov71330ce2014-07-15 23:30:45 -04003880 [base] Move assembler code back in the source file.
3881
3882 FT_MulFix assembler used to reside in ftcalc.c before f47d263f1b.
3883
3884 * include/config/ftconfig.h, builds/unix/ftconfig.in,
3885 builds/vms/ftconfig.h [FT_MULFIX_ASSEMBLER]: Move code from here...
3886
3887 * src/base/ftcalc.c [FT_MULFIX_ASSEMBLER]: ... to here.
3888
38892014-07-14 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov1183cd42014-07-14 22:30:55 -04003890
3891 [base] Further clean up color bitmap conversion.
3892
3893 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Stop
3894 using FT_MulFix and FT_DivFix since all calculations fit into 32 bits.
3895
Werner Lemberg441b3f32014-07-13 02:28:14 +090038962014-07-13 Werner Lemberg <wl@gnu.org>
3897
3898 [truetype] Improve handling of buggy `prep' tables.
3899
3900 In case of an error in the `prep' table, no longer try to execute it
3901 again and again. This makes FreeType handle endless loops in buggy
3902 fonts much faster.
3903
3904 * src/truetype/ttobjs.h (TT_SizeRec): The fields `bytecode_ready'
3905 and `cvt_ready' are now negative if not initialized yet, otherwise
3906 they indicate the error code of the last run.
3907
3908 * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep,
3909 tt_size_done_bytecode, tt_size_init_bytecode,
3910 tt_size_ready_bytecode, tt_size_init, tt_size_done, tt_size_reset):
3911 Updated.
3912
3913 * src/truetype/ttgload.c (tt_loader_init): Updated.
3914 * src/truetype/ttinterp.c (TT_RunIns): Force reexecution of `fpgm'
3915 and `prep' only if we are in the `glyf' table.
3916
Werner Lemberge98e2bc2014-07-12 16:37:39 +090039172014-07-12 Werner Lemberg <wl@gnu.org>
3918
3919 * builds/vms/ftconfig.h: Synchronize.
3920 Problem reported by Alexei.
3921
Alexei Podtelezhnikov35576bf2014-07-11 22:40:34 -040039222014-07-11 Alexei Podtelezhnikov <apodtele@gmail.com>
3923
3924 [base] Clean up bitmap conversion.
3925
3926 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Use
3927 appropriate FT_DivFix and remove superfluous upscaling.
3928
Alexei Podtelezhnikovceab95a2014-07-04 23:01:32 -040039292014-07-04 Alexei Podtelezhnikov <apodtele@gmail.com>
3930
3931 [base] Small optimization of the ancient code.
3932
3933 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round): Loosen up the
3934 condition for direct 32-bit calculations.
3935
Werner Lemberg38975562014-06-27 06:55:56 +020039362014-06-27 Werner Lemberg <wl@gnu.org>
3937
3938 Fix Apple standard glyph names.
3939
3940 * src/sfnt/ttpost.c (tt_post_default_names): Synchronize with
3941 `tools/glnames.py'
3942
3943 Problem reported by Adam Twardoch <adam@fontlab.com>.
3944
Werner Lembergcf2347c2014-06-17 09:01:04 +020039452014-06-17 Werner Lemberg <wl@gnu.org>
3946
Werner Lemberg231171f2014-06-17 09:14:32 +02003947 Partially revert commit from 2014-06-13.
3948
3949 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Move
3950 declaration of `p_first' and `p_last' out of the loop.
3951
39522014-06-17 Werner Lemberg <wl@gnu.org>
3953
Werner Lembergcf2347c2014-06-17 09:01:04 +02003954 * builds/unix/freetype2.m4: s/AC_PATH_PROG/AC_PATH_TOOL/.
3955
3956 This simplifies cross-compiling.
3957
Werner Lemberg6497b9c2014-06-13 09:28:00 +020039582014-06-13 Werner Lemberg <wl@gnu.org>
3959
Werner Lemberge5c0fff2014-06-13 14:01:20 +02003960 Fix more compiler warnings.
3961 Reported by Wojciech Mamrak <wmamrak@gmail.com>.
3962
3963 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
3964 Make integer constant unsigned.
3965
3966 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
3967 <TT_SBIT_TABLE_TYPE_SBIX>: Fix types.
3968 (tt_sbit_decoder_load_compound, tt_face_load_sbix_image): Add proper
3969 casts.
3970
39712014-06-13 Werner Lemberg <wl@gnu.org>
3972
Werner Lemberg6497b9c2014-06-13 09:28:00 +02003973 Fix compiler warnings.
3974 Reported by Wojciech Mamrak <wmamrak@gmail.com>.
3975
3976 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage),
Werner Lembergcbbf26b2014-07-17 17:27:12 +09003977 src/autofit/afmodule.c (af_property_set): Fix `signed' vs.
Werner Lemberg6497b9c2014-06-13 09:28:00 +02003978 `unsigned' issues.
3979
3980 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Make compiler
3981 happy.
3982
3983 * src/base/ftlcdfil.c (_ft_lcd_filter_fir): Use only four elements
3984 for `fir'.
3985 Fix `signed' vs. `unsigned' issues.
3986
3987 * src/sfnt/sfobjs.c (WRITE_BYTE): Removed, unused.
3988 (WRITE_USHORT, WRITE_ULONG): Add proper casts.
3989
3990 * src/truetype/ttgload.c (TT_Get_VMetrics): Add proper casts.
3991
3992 * src/truetype/ttinterp.c (Ins_DELTAP): Add proper casts for `B1'
3993 and `B2'.
3994
Alexey Petruchik02f21702014-05-16 08:09:43 +020039952014-05-16 Alexey Petruchik <alexey.petruchik@gmail.com>
3996
3997 [cmake] Add option to build OS X framework.
3998
3999 * CMakeLists.txt: Update accordingly.
4000
4001 * builds/mac/freetype-Info.plist: New file.
4002
Pavel Koshevoy15da66a2014-05-13 07:33:48 +020040032014-05-13 Pavel Koshevoy <pkoshevoy@gmail.com>
4004
4005 * CMakeLists.txt (BASE_SRCS): Add missing `ftbdf.c'.
4006
Werner Lemberg07e7b8a2014-05-11 08:00:25 +020040072014-05-11 Werner Lemberg <wl@gnu.org>
4008
Werner Lembergfaa21472014-05-11 12:44:00 +02004009 [autofit] Fix variable initializations.
4010
4011 * src/autofit/afhints.c (af_glyph_hints_reload): Assign default
4012 values to `in_dir' and `out_dir' for all points.
4013
40142014-05-11 Werner Lemberg <wl@gnu.org>
4015
Werner Lemberg07e7b8a2014-05-11 08:00:25 +02004016 [autofit] Fix crash with font `CabinSketch-Bold.ttf'.
4017
4018 Problem reported by Ralf S. Engelschall <rse@engelschall.com>.
4019
4020 * src/autofit/afhints.c (af_glyph_hints_reload): Fix threshold for
4021 finding first non-near point.
4022 Properly initialize non-near point deltas.
4023
Werner Lemberg63bef9a2014-05-01 07:16:05 +020040242014-05-01 Werner Lemberg <wl@gnu.org>
4025
Werner Lembergc576bb02014-05-01 17:24:19 +02004026 [autofit] Add blue-zone support for Devanagari.
4027
4028 This essentially moves the Devanagari script from the `Indic' hinter
4029 to the `Latin' hinter. Thanks to Girish Dalvi
4030 <girish.dalvi@gmail.com> for guidance with blue zone characters!
4031
4032 * src/autofit/afblue.dat: Add blue zone data for Devanagari.
4033
4034 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
4035
4036 * src/autofit/afscript.h: Add Devanagari standard characters and
4037 move data out of AF_CONFIG_OPTION_INDIC block.
4038
4039 * src/autofit/afranges.c: Move Devanagari data out of
4040 AF_CONFIG_OPTION_INDIC block.
4041 Move U+20B9, (new) Rupee sign, from Latin to Devanagari.
4042
4043 * src/autofit/afstyles.h: Update Devanagari data; in particular, use
4044 AF_WRITING_SYSTEM_LATIN.
4045
40462014-05-01 Werner Lemberg <wl@gnu.org>
4047
Werner Lemberg63bef9a2014-05-01 07:16:05 +02004048 [autofit] Fix handling of neutral blue zones in stems.
4049
4050 * src/autofit/afhints.h (AF_Edge_Flags): New value
4051 `AF_EDGE_NEUTRAL'.
4052
4053 * src/autofit/aflatin.c (af_latin_hints_compute_blue_edges): Trace
4054 neutral blue zones with AF_EDGE_NEUTRAL.
4055 (af_latin_hint_edges): Skip neutral blue zones if necessary.
4056
Werner Lembergccfc4b42014-04-28 21:13:14 +020040572014-04-28 Werner Lemberg <wl@gnu.org>
4058
4059 [autofit] Introduce neutral blue zones to the latin module.
4060
4061 Such blue zones match either the top or the bottom of a contour. We
4062 need them for scripts where accent-like elements directly touch the
4063 base character (for example, some vowel signs in Devanagari, cf.
4064 U+0913 or U+0914).
4065
4066 * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_NEUTRAL): New
4067 property.
4068
4069 * src/autofit/afblue.h: Regenerated.
4070
4071 * src/autofit/aflatin.h (AF_LATIN_IS_NEUTRAL_BLUE): New macro.
4072 (AF_LATIN_BLUE_NEUTRAL): New enumeration value.
4073
4074 * src/autofit/aflatin.c (af_latin_metrics_init_blues,
4075 af_latin_hints_compute_blue_edges): Handle neutral blue zones.
4076
Werner Lembergabb3fca2014-04-25 22:13:32 +020040772014-04-25 Werner Lemberg <wl@gnu.org>
4078
4079 * src/autofit/hbshim.c: Partially revert commit from 2014-04-17.
4080
4081 Using input glyph coverage data is simply wrong.
4082
4083 Problem reported by Nikolaus Waxweiler <madigens@gmail.com> and
4084 Mantas MikulÄ—nas <grawity@gmail.com>.
4085
Werner Lembergf1936372014-04-23 08:22:33 +020040862014-04-23 Werner Lemberg <wl@gnu.org>
4087
4088 * src/raster/ftraster.c (Vertical_Sweep_Span): Use drop-out mode.
4089
4090 This spot has been missed while introducing support for various
4091 drop-out modes years ago (including no drop-out mode, which this
4092 commit fixes).
4093
4094 Problem reported by Patrick Thomas <pthomas505@gmail.com>.
4095
Werner Lembergd9b44702014-04-22 07:33:07 +020040962014-04-22 Werner Lemberg <wl@gnu.org>
4097
4098 * src/sfnt/pngshim.c (error_callback): s/longjmp/ft_longjmp/.
4099
Werner Lemberg98e510e2014-04-20 22:11:27 +020041002014-04-20 Werner Lemberg <wl@gnu.org>
4101
4102 [autofit] Fix Savannah bug #42148.
4103
4104 The adaptation of the cjk auto-hinter module to blue stringsets in
4105 2013-08-25 had three severe bugs. Mea culpa.
4106
4107 1. Contrary to the latin auto-hinter, characters for reference and
4108 overshoot values of a blue zone are specified separately. Due to
4109 the screwed-up change it didn't work at all.
4110
4111 2. A boolean comparison was erroneously replaced with a cast,
4112 causing invalid results with the `^' operator later on. The
4113 visual artifact caused by this problem is the topic of the bug
4114 report.
4115
4116 3. Two flag values were inverted, causing incorrect assignment of
4117 reference and overshoot values.
4118
4119 * src/autofit/afblue.dat: Fix CJK bluestrings, introducing a new
4120 syntax to have both reference and overshoot characters in a single
4121 string. This is error #1.
4122 Add extensive comments.
4123
4124 * src/autofit/afblue.hin (AF_BLUE_PROPERTY_CJK_FILL): Removed, no
4125 longer used.
Werner Lembergccfc4b42014-04-28 21:13:14 +02004126 (AF_BLUE_PROPERTY_CJK_TOP, AF_BLUE_PROPERTY_CJK_HORIZ): Fix values.
Werner Lemberg98e510e2014-04-20 22:11:27 +02004127 This is error #3.
4128
4129 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
4130
4131 * src/autofit/afcjk.c (af_cjk_metrics_init_blues): Correct error #1.
4132 Use character `|' to separate characters for reference and overshoot
4133 values.
4134 Improve tracing messages, synchronizing them with the latin
4135 auto-hinter.
Werner Lembergccfc4b42014-04-28 21:13:14 +02004136 (af_cjk_hints_compute_blue_edges): Fix value of `is_top_right_blue'.
Werner Lemberg98e510e2014-04-20 22:11:27 +02004137 This is error #2.
4138 (af_cjk_align_linked_edge): Add tracing message.
4139
4140 * src/autofit/afcjk.h (AF_CJK_IS_FILLED_BLUE): Removed, no longer
4141 used.
4142
Werner Lembergbbd83132014-04-17 01:24:36 +020041432014-04-17 Werner Lemberg <wl@gnu.org>
4144
Werner Lemberg8c7fb782014-04-17 15:53:25 +02004145 [autofit] More coverage fixes for complex scripts.
4146
4147 * src/autofit/hbshim.c (af_get_coverage): Merge input glyph coverage
4148 of GSUB lookups into output coverage. Otherwise, ligatures are not
4149 handled properly.
4150 Don't check blue zone characters for default coverage.
4151
41522014-04-17 Werner Lemberg <wl@gnu.org>
4153
Werner Lembergbbd83132014-04-17 01:24:36 +02004154 Make `FT_Get_SubGlyph_Info' actually work.
4155
4156 * src/base/ftobjs.c (FT_Get_SubGlyph_Info): Return FT_Err_Ok
4157 if there is no error.
4158
Werner Lemberg181fd072014-04-15 16:47:05 +020041592014-04-15 Werner Lemberg <wl@gnu.org>
4160
4161 [afblue.pl]: Minor improvements.
4162
4163 * src/tools/afblue.pl: Allow whitespace before comments.
4164 Ignore whitespace in strings.
4165
Werner Lemberg8b1f2a62014-04-14 07:58:19 +020041662014-04-14 Werner Lemberg <wl@gnu.org>
4167
4168 [autofit] Improve coverage handling.
4169
4170 * src/autofit/hbshim.c (af_get_coverage): Don't exclude glyphs
4171 appearing in the GPOS table if we are processing the default
4172 coverage.
4173
David Weber76307872014-04-13 15:41:13 +020041742014-04-13 David Weber <weber.aulendorf@googlemail.com>
4175
4176 [smooth] Fix stand-alone compilation.
4177
4178 * src/smooth/ftgrays.c (FT_BEGIN_STMNT, FT_END_STMNT): Define.
4179
Werner Lemberg8a94b1e2014-04-12 20:44:33 +020041802014-04-12 Werner Lemberg <wl@gnu.org>
4181
4182 [autofit] Redesign the recognition algorithm of strong points.
4183
4184 In particular, local extrema without horizontal or vertical segments
4185 are better recognized:
4186
4187 + A + D
4188 \ /
4189 \ /
4190 \ /
4191 \ /
4192 \ + C
4193 \ /
4194 B +/
4195
4196 If the distances AB and CD are large, point B wasn't previously
4197 detected as an extremum since the `ft_corner_is_flat' function
4198 `swallowed' BC regardless of its direction, tagging point B as weak.
4199 The next iteration started at B and made `ft_corner_is_flat' swallow
4200 point C, tagging it as weak also, et voilà.
4201
4202 To improve that, another pass gets now performed before calling
4203 `ft_corner_is_flat' to improve the `topology' of an outline: A
4204 sequence of non-horizontal or non-vertical vectors that point into
4205 the same quadrant are handled as a single, large vector.
4206
4207 Additionally, distances of near points are now accumulated, which
4208 makes the auto-hinter handle them as if they were prepended to the
4209 next non-near vector.
4210
4211 This generally improves the auto-hinter's rendering results.
4212
4213 * src/autofit/afhints.c (af_glyph_hints_reload): Implement it.
4214
4215 * src/autofit/afhints.h (AF_FLAGS): Remove no longer used flag
4216 `AF_FLAG_NEAR'.
4217
Werner Lemberg71f53e12014-04-05 16:27:19 +020042182014-04-05 Werner Lemberg <wl@gnu.org>
4219
4220 [autofit] Improve scoring algorithm for identifying stems.
4221
4222 Problem reported by Karsten Lücke <karsten.luecke@kltf.de>.
4223
4224 The new algorithm takes care of the width of stems: If the distance
4225 between two segments is larger than the largest stem width, the
4226 demerits quickly increase for larger distances. This improves
4227 hinting of slanted fonts (especially if the inner parts of serifs
4228 have non-horizontal `shoulders'), avoiding false stem links.
4229
4230 * src/autofit/aflatin.c (af_latin_hints_link_segments): Use largest
4231 stem width (if available) to compute better demerits for distances
4232 between stems.
4233 (af_latin_hints_detect_features): Pass stem width array and array
4234 size.
4235 (af_latin_metrics_init_widths): Updated to use original algorithm.
4236 (af_latin_hints_apply): Updated to use new algorithm.
4237
4238 * src/autofit/aflatin.h: Updated.
4239 * src/autofit/afcjk.c: Updated.
4240
Werner Lembergf8555b52014-04-03 05:45:38 +020042412014-04-03 Werner Lemberg <wl@gnu.org>
4242
4243 Don't require `gzip' module for `sfnt'.
4244
4245 Reported by Preet <prismatic.project@gmail.com>.
4246
4247 * src/sfnt/sfobjs.c (woff_open_font): Guard use of
4248 FT_Gzip_Uncompress with FT_CONFIG_OPTION_USE_ZLIB.
4249
Werner Lembergf41070f2014-03-27 17:38:23 +010042502014-03-27 Werner Lemberg <wl@gnu.org>
4251
4252 Fix Savannah bug #38235.
4253
4254 Work around a bug in pkg-config version 0.28 and earlier: If a
4255 variable value gets surrounded by doublequotes (in particular values
4256 for the `prefix' variable), the prefix override mechanism fails.
4257
4258 * builds/unix/freetype2.in: Don't use doublequotes.
4259 * builds/unix/unix-def.in (freetype.pc): Escape spaces in directory
4260 names with backslashes.
4261
Werner Lembergab76d972014-03-24 19:45:03 +010042622014-03-24 Werner Lemberg <wl@gnu.org>
4263
4264 Fix Savannah bug #41946.
4265
4266 Based on a patch from Marek Kašík <mkasik@redhat.com>.
4267
4268 * builds/unix/configure.raw (LIBS_CONFIG): Remove.
4269 * builds/unix/freetype-config.in (libs): Hard-code value.
4270 * builds/unix/unix-def.in: Updated.
4271
Werner Lembergd5159922014-03-22 06:20:54 +010042722014-03-22 Werner Lemberg <wl@gnu.org>
4273
4274 Another revert for the change from 2014-03-18.
4275
4276 Problem reported by Nikolaus Waxweiler <madigens@gmail.com>.
4277
4278 * src/base/ftcalc.c (FT_MulFix): Ensure that an `FT_MulFix' symbol
4279 gets always exported.
4280
Werner Lembergf0c471a2014-03-20 07:13:12 +010042812014-03-20 Werner Lemberg <wl@gnu.org>
4282
4283 CMakeLists.txt: Another fix for include directories.
4284
4285 Problem reported by Taylor Holberton <taylorcholberton@gmail.com>.
4286
Werner Lembergcc7cf2c2014-03-19 07:35:35 +010042872014-03-19 Werner Lemberg <wl@gnu.org>
4288
Werner Lemberg606c74f2014-03-19 23:46:42 +01004289 CMakeLists.txt: Fix include directories.
4290
4291 Problem reported by Taylor Holberton <taylorcholberton@gmail.com>.
4292
42932014-03-19 Werner Lemberg <wl@gnu.org>
4294
Werner Lembergcc7cf2c2014-03-19 07:35:35 +01004295 Partially revert last commit.
4296
4297 Found by Alexei.
4298
4299 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Initializing
4300 those variables is plain wrong, since we are in a loop.
4301
Sean McBride87628722014-03-18 08:39:35 +010043022014-03-18 Sean McBride <sean@rogue-research.com>
4303 Werner Lemberg <wl@gnu.org>
4304
4305 Fix clang warnings.
4306
4307 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Initialize
4308 some variables.
4309
4310 * src/base/ftcalc.c (FT_MulFix): Only use code if
4311 `FT_MULFIX_INLINED' is not defined.
4312
4313 * src/bdf/bdfdrivr.c (bdf_cmap_class), src/cache/ftcbasic.c
4314 (ftc_basic_image_family_class, ftc_basic_image_cache_class,
4315 ftc_basic_sbit_family_class, ftc_basic_sbit_cache_class),
4316 src/cache/ftccmap.c (ftc_cmap_cache_class), src/cache/ftcmanag.c
4317 (ftc_size_list_class, ftc_face_list_class), src/pcf/pcfdrivr.c
4318 (pcf_cmap_class), src/pfr/pfrdrivr.c (pfr_metrics_service_rec): Make
4319 function static.
4320
4321 * src/type1/t1driver.c (t1_ps_get_font_value): Remove redundant
4322 code.
4323
Werner Lemberg23367ff2014-03-17 07:33:14 +010043242014-03-17 Werner Lemberg <wl@gnu.org>
4325
4326 Fix Savannah bug #41869.
4327
4328 This works around a problem with HarfBuzz (<= 0.9.26), which doesn't
4329 validate glyph indices returned by
4330 `hb_ot_layout_lookup_collect_glyphs'.
4331
4332 * src/autofit/hbshim.c (af_get_coverage): Guard `idx'.
4333
4334 * docs/CHANGES: Updated.
4335
Werner Lemberg03181682014-03-14 08:06:06 +010043362014-03-14 Werner Lemberg <wl@gnu.org>
4337
4338 * builds/unix/configure.raw: Don't show error messages of `which'.
4339
Alan Coopersmithed372b72014-03-09 06:14:12 +010043402014-03-09 Alan Coopersmith <alan.coopersmith@oracle.com>
4341
4342 Fix cppcheck 1.64 warning.
4343
4344 * src/autofit/afglobal.c (af_face_globals_new): Catch NULL pointer
4345 dereference in case of error.
4346
Werner Lemberg1a69dc72014-03-09 06:06:58 +010043472014-03-09 Sean McBride <sean@rogue-research.com>
4348
4349 * src/sfnt/ttcmap.c (tt_face_build_cmaps): Remove clang warning.
4350
Werner Lemberg05565362014-03-06 18:56:58 +010043512014-03-06 Werner Lemberg <wl@gnu.org>
4352
Werner Lembergec8853c2014-03-06 19:13:45 +01004353 * Version 2.5.3 released.
4354 =========================
4355
4356
4357 Tag sources with `VER-2-5-3'.
4358
4359 * docs/VERSION.DLL: Update documentation and bump version number to
4360 2.5.3.
4361
4362 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
4363 builds/windows/vc2005/index.html,
4364 builds/windows/vc2008/freetype.vcproj,
4365 builds/windows/vc2008/index.html,
4366 builds/windows/vc2010/freetype.vcxproj,
4367 builds/windows/vc2010/index.html,
4368 builds/windows/visualc/freetype.dsp,
4369 builds/windows/visualc/freetype.vcproj,
4370 builds/windows/visualc/index.html,
4371 builds/windows/visualce/freetype.dsp,
4372 builds/windows/visualce/freetype.vcproj,
4373 builds/windows/visualce/index.html,
4374 builds/wince/vc2005-ce/freetype.vcproj,
4375 builds/wince/vc2005-ce/index.html,
4376 builds/wince/vc2008-ce/freetype.vcproj,
4377 builds/wince/vc2008-ce/index.html: s/2.5.2/2.5.3/, s/252/253/.
4378
4379 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
4380
4381 * builds/unix/configure.raw (version_info): Set to 17:2:11.
4382 * CMakeLists.txt (VERSION_PATCH): Set to 3.
4383 * docs/CHANGES: Updated.
4384
43852014-03-06 Werner Lemberg <wl@gnu.org>
4386
Werner Lemberg05565362014-03-06 18:56:58 +01004387 Fixes for compilation with C++.
4388
4389 * src/autofit/hbshim.c (scripts): Change type to `hb_script_t'.
4390 (af_get_coverage): Updated.
4391 (COVERAGE): Add cast.
4392
Sean McBrideb24e8d32014-03-06 14:54:22 +010043932014-03-06 Sean McBride <sean@rogue-research.com>
4394
4395 Remove more clang analyzer warnings.
4396
4397 * src/bdf/bdflib.c (_bdf_readstream), src/truetype/ttgload.c
4398 (TT_Load_Glyph): Remove dead stores.
4399
Werner Lemberga32758f2014-03-05 08:02:46 +010044002014-03-05 Werner Lemberg <wl@gnu.org>
4401
4402 * builds/unix/configure.raw: Simplify.
4403
suzuki toshiya382f3ef2014-03-05 10:19:15 +090044042014-03-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4405
4406 Fix a bug in configure in library dependency setting
Werner Lemberga32758f2014-03-05 08:02:46 +01004407 Reported in https://bugs.freedesktop.org/show_bug.cgi?id=75652.
suzuki toshiya382f3ef2014-03-05 10:19:15 +09004408
4409 * builds/unix/configure.raw: Use `x"${xxx}" != xno' style.
4410
Werner Lembergf48f7dc2014-03-04 04:40:07 +010044112014-03-04 Werner Lemberg <wl@gnu.org>
4412
4413 Minor fix for `make devel'.
4414
4415 * builds/freetype.mk (INCLUDE_FLAGS) [DEVEL_DIR]: Don't use
4416 pkg-config for bzip2 since not all GNU/Linux distributions have
4417 `bzip2.pc' (and the header file `bzlib.h' is located in /usr/include
4418 normally).
4419
Werner Lemberg7ac76b52014-03-04 04:29:17 +010044202014-03-04 Sean McBride <sean@rogue-research.com>
4421
4422 Fix several clang static analyzer dead store warnings.
4423
4424 * src/autofit/afhints.c (af_glyph_hints_reload,
4425 af_glyph_hints_align_weak_points): Remove unnecessary assignments.
4426
4427 * src/bdf/bdflib.c (bdf_font_load): Ditto.
4428
4429 * src/pshinter/pshalgo.c (psh_glyph_compute_extrema,
4430 psh_glyph_interpolate_other_points): Ditto.
4431
4432 * src/type1/t1load.c (T1_Set_MM_Blend): Ditto.
4433
Werner Lemberg93ebcbd2014-03-03 07:13:45 +010044342014-03-03 Werner Lemberg <wl@gnu.org>
4435
4436 Rewrite library option handling in `configure'.
4437
4438 o Introduce `auto' value for `--with-XXX' library options; this is
4439 now the default.
4440
4441 o First use `pkg-config' for library detection, then fall back to
4442 other tests.
4443
4444 * builds/unix/configure.raw (--with-zlib, --with-bzip2, --with-png,
4445 --with-harfbuzz): Rewrite.
4446 Use new `xxx_reqpriv', `xxx_libpriv', and `xxx_libstaticconf'
4447 variables to collect data for `freetype2.pc' and `freetype-config'.
4448 (FT2_EXTRA_LIBS): Renamed to ...
4449 (ft2_extra_libs): This since it gets no longer substituted.
4450 (REQUIRES_PRIVATE, LIBS_PRIVATE, LIBS_CONFIG, LIBSSTATIC_CONFIG):
4451 New output variables, replacing `XXX_PKG' and `LIBXXX'.
4452 Add notice at the end of `configure' showing the library
4453 configuration.
4454
4455 * builds/unix/freetype-config.in (--static): New command line
4456 option.
4457 (libs): Updated.
4458 (staticlibs): New variable, to be used if `--static' is given.
Werner Lemberg8fa69a82014-12-03 20:07:14 +01004459 * docs/freetype-config.1: Document `--static'.
Werner Lemberg93ebcbd2014-03-03 07:13:45 +01004460
4461 * builds/unix/freetype2.in, builds/unix/unix-def.in: Updated.
4462
Werner Lemberg86026a42014-03-01 06:57:19 +010044632014-03-01 Werner Lemberg <wl@gnu.org>
4464
Werner Lemberge962a912014-03-01 21:00:02 +01004465 Avoid `long long' warnings with older gcc compilers.
4466 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
4467
4468 * builds/unix/configure.raw: Don't use gcc's `-pedantic' flag for
4469 versions < 4.6. This is especially needed for Max OS X since this
4470 OS runs a gcc variant (or emulation) based on version 4.2.1.
4471
44722014-03-01 Werner Lemberg <wl@gnu.org>
4473
Werner Lemberg6030a9f2014-03-01 14:01:12 +01004474 * docs/INSTALL.CROSS: Revised and updated.
4475
44762014-03-01 Werner Lemberg <wl@gnu.org>
4477
Werner Lemberg646db052014-03-01 12:48:07 +01004478 Make `make clean' remove `freetype2.pc'.
4479
4480 This is a generated file at build time, not configure time.
4481
4482 * builds/unix/unix-def.in (DISTCLEAN): Move `freetype2.pc' to ...
4483 (CLEAN): This variable.
4484
44852014-03-01 Werner Lemberg <wl@gnu.org>
4486
Werner Lemberg00c79ed2014-03-01 12:32:20 +01004487 Use pkg-config for detecting libpng and libbz2 also.
4488
4489 * builds/unix/configure.raw (HAVE_PKG): New variable.
4490 Search for libbz2 using `pkg-config'; s/BZ2/BZIP2/.
4491 Search for libpng using `pkg-config'.
4492 Fix definition of `LIBHARFBUZZ' variable.
4493 * builds/unix/freetype-config.in ($libs): Updated.
4494 * builds/unix/freetype2.in: Add `URL' field.
4495 Update `Requires.private' and `Libs.private'.
4496 * builds/unix/unix-def.in: Updated.
4497
44982014-03-01 Werner Lemberg <wl@gnu.org>
4499
Werner Lemberg86026a42014-03-01 06:57:19 +01004500 Add configure support for HarfBuzz.
4501
4502 * builds/unix/pkg.m4: New file.
4503 * builds/unix/configure.raw: Search for libharfbuzz using
4504 `pkg-config'.
4505 Add `--without-harfbuzz' option.
4506 * builds/unix/freetype-config.in, builds/unix/freetype2.in,
4507 builds/unix/unix-def.in (freetype-config, freetype2.pc): Handle
4508 HarfBuzz.
4509
4510 * docs/INSTALL.UNIX: Document interdependency of Freetype with
4511 HarfBuzz.
4512
Alexei Podtelezhnikov6adda682014-02-28 09:24:26 +010045132014-02-28 Alexei Podtelezhnikov <apodtele@gmail.com>
4514
4515 [cff] Math simplifications.
4516
4517 * src/cf2blues.c (cf2_blues_init): Use `FT_MulDiv'.
4518 * src/cf2ft.c (cf2_getScaleAndHintFlag): Use simple division.
4519
Dave Arnold0eae6eb2014-02-28 07:40:01 +010045202014-02-28 Dave Arnold <darnold@adobe.com>
4521
Dave Arnold135c3fa2014-02-28 07:42:42 +01004522 [cff] Fix Savannah bug #41697, part 2.
4523
4524 * src/cff/cf2ft.c (cf2_initLocalRegionBuffer,
4525 cf2_initGlobalRegionBuffer): It is possible for a charstring to call
4526 a subroutine if no subroutines exist. This is an error but should
4527 not trigger an assert. Split the assert to account for this.
4528
45292014-02-28 Dave Arnold <darnold@adobe.com>
4530
Dave Arnold0eae6eb2014-02-28 07:40:01 +01004531 [cff] Fix Savannah bug #41697, part 1.
4532
4533 * src/cff/cf2hints.c (cf2_hintmap_build): Return when `hintMask' is
4534 invalid. In this case, it is not safe to use the length of
4535 `hStemHintArray'; the exception has already been recorded in
4536 `hintMask'.
4537
Werner Lembergeee4ff82014-02-26 18:12:36 +010045382014-02-26 Werner Lemberg <wl@gnu.org>
4539
Werner Lemberga2b5f662014-02-26 19:50:18 +01004540 [sfnt] Fix Savannah bug #41696.
4541
4542 * src/sfnt/ttcmap.c (tt_cmap0_validate, tt_cmap2_validate,
4543 tt_cmap4_validate, tt_cmap14_validate): Fix limit tests.
4544
45452014-02-26 Werner Lemberg <wl@gnu.org>
4546
Werner Lembergeee4ff82014-02-26 18:12:36 +01004547 [winfnt] Fix Savannah bug #41694.
4548
4549 * src/winfonts/winfnt.c (FNT_Load_Glyph): Check glyph offset.
4550
45512014-02-26 Werner Lemberg <wl@gnu.org>
Werner Lemberg9a567642014-02-26 13:08:07 +01004552
Werner Lemberg08c628d2014-02-26 14:18:03 +01004553 [cff] Fix Savannah bug #41693.
4554
4555 * src/cff/cffload.c (CFF_Load_FD_Select): Reject empty array.
4556
Werner Lembergeee4ff82014-02-26 18:12:36 +010045572014-02-26 Werner Lemberg <wl@gnu.org>
Werner Lemberg08c628d2014-02-26 14:18:03 +01004558
Werner Lemberg9a567642014-02-26 13:08:07 +01004559 [bdf] Fix Savannah bug #41692.
4560
4561 bdflib puts data from the input stream into a buffer in chunks of
4562 1024 bytes. The data itself gets then parsed line by line, simply
4563 increasing the current pointer into the buffer; if the search for
4564 the final newline character exceeds the buffer size, more data gets
4565 read.
4566
4567 However, in case the current line's end is very near to the buffer
4568 end, and the keyword to compare with is longer than the current
4569 line's length, an out-of-bounds read might happen since `memcmp'
4570 doesn't stop properly at the string end.
4571
4572 * src/bdf/bdflib.c: s/ft_memcmp/ft_strncmp/ to make comparisons
4573 stop at string ends.
4574
suzuki toshiya91c7a972014-02-17 16:38:31 +090045752014-02-17 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4576
4577 [autofit] Fix `make multi' compilation.
4578
suzuki toshiyacc9a0c22014-02-17 16:43:54 +09004579 * src/autofit/hbshim.c: Include `afglobal.h' and `aftypes.h'.
suzuki toshiya91c7a972014-02-17 16:38:31 +09004580
Werner Lemberg6b290fd2014-02-19 09:26:54 +010045812014-02-19 Werner Lemberg <wl@gnu.org>
4582 Simon Bünzli <zeniko@gmail.com>
4583
4584 Fix Savannah bug #32902.
4585
4586 Patch taken from
4587
4588 https://code.google.com/p/sumatrapdf/source/browse/trunk/ext/_patches/freetype2.patch?spec=svn8620&r=8620#87
4589
4590 with slight modifications.
4591
4592 * src/type1/t1parse.c (T1_Get_Private_Dict): Add heuristic test to
4593 handle fonts that incorrectly use \r at the beginning of an eexec
4594 block.
4595
Simon Bünzlidf14e6c2014-02-19 08:42:52 +010045962014-02-19 Simon Bünzli <zeniko@gmail.com>
4597
4598 Fix Savannah bug #41590.
4599
4600 * src/type1/t1load.c (parse_encoding): Protect against invalid
4601 number.
4602
Dave Arnold89a94d42014-02-12 23:45:47 +010046032014-02-12 Dave Arnold <darnold@adobe.com>
4604
4605 [cff] Optimize by using `FT_MulDiv'.
4606 Suggested by Alexei.
4607
4608 * src/cff/cf2font.c (cf2_computeDarkening): Do it.
4609
Werner Lemberg85ee27a2014-02-12 23:27:41 +010046102014-02-12 Werner Lemberg <wl@gnu.org>
4611
4612 Fix Savannah bug #41465.
4613
4614 * builds/unix/unix-def.in (CLEAN): Add `freetype-config'.
4615 (DISTCLEAN): Remove `freetype-config'.
4616
Sean McBride7be2a942014-02-08 13:55:38 +010046172014-02-08 Sean McBride <sean@rogue-research.com>
4618
4619 Fix clang static analyzer and compiler warnings.
4620
4621 * src/autofit/afhints.c (af_glyph_hints_align_weak_points),
4622 src/autofit/afloader (af_loader_load_g) <FT_GLYPH_FORMAT_COMPOSITE>,
4623 src/base/ftcalc.c (FT_MSB), src/base/ftoutln.c
4624 (FT_Outline_Decompose), src/bdf/bdfdrivr.c (bdf_interpret_style),
4625 src/cff/cffparse.c (cff_parse_integer), src/cid/cidparse.c
4626 (cid_parser_new), src/pfr/pfrload.c (pfr_phy_font_load),
4627 src/raster/ftraster.c (Decompose_Curve), src/sfnt/sfdriver.c
4628 (sfnt_get_ps_name), src/sfnt/ttcmap.c (tt_cmap12_next,
4629 tt_cmap13_next), src/smooth/ftgrays.c (gray_hline): Remove dead
4630 code.
4631
4632 * src/autofit/afmodule.c (af_property_get_face_globals,
4633 af_property_set, af_property_get), src/base/ftbitmap.c
4634 (ft_gray_for_premultiplied_srgb_bgra): Make functions static.
4635
4636 * src/base/ftobjs.c (ft_remove_renderer): Protect against
4637 library == NULL.
4638 (ft_property_do): Make function static.
4639
4640 * src/base/ftrfork.c: Include `ftbase.h'.
4641
4642 * src/sfnt/ttsbit.c (tt_face_load_sbix_image)
4643 [!FT_CONFIG_OPTION_USE_PNG], src/type1/t1gload.c
4644 (T1_Compute_Max_Advance): Avoid compiler warning.
4645
4646 * src/truetype/ttinterp.c (TT_New_Context): Reduce scope of
4647 variable.
4648
Werner Lembergab98c5e2014-02-08 11:34:33 +010046492014-02-08 Werner Lemberg <wl@gnu.org>
4650
4651 Fix Windows build directories.
4652
4653 The build target is now `windows' instead of `win32'.
4654
4655 Problem reported by Nickolas George <darknova.clan@gmail.com>.
4656
4657 * builds/modules.mk: Don't use `win32' and `win16' (!) but
4658 `windows'.
4659
4660 * builds/windows/detect.mk, builds/windows/win32-def.mk:
4661 s/win32/windows/.
4662
Eugen Sawina8ceae42014-02-08 06:30:06 +010046632014-02-08 Eugen Sawin <esawin@mozilla.com>
4664
4665 Fix Savannah bug #41507.
4666
4667 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap)
4668 [!FT_CONFIG_OPTION_USE_PNG] <17, 17, 19>: Fix error handling.
4669
Dave Arnold355b3592014-02-08 06:23:04 +010046702014-02-08 Dave Arnold <darnold@adobe.com>
4671
4672 [cff] Fix minor performance bug.
4673
4674 * src/cff/cf2font.c (cf2_font_setup): Darkening amount and blue zone
4675 calculations are now cached and not recomputed on each glyph.
4676
Werner Lemberg6dce1362014-02-05 15:40:47 +010046772014-02-05 Werner Lemberg <wl@gnu.org>
4678
4679 Fix problems with perl 5.8.8 as distributed with current MinGW.
4680
4681 * src/tools/afblue.pl: Work-around for Perl bug #63402.
4682 (string_re): Avoid `possessive quantifiers', which have been
4683 introduced in Perl version 5.10.
4684
Werner Lemberga8772912014-02-04 11:36:08 +010046852014-02-04 Werner Lemberg <wl@gnu.org>
4686
Werner Lembergd87f9a62014-02-04 16:14:09 +01004687 Fix compilation with MinGW.
4688
4689 Right now, compilation out of the box with latest MinGW is broken
4690 due to bugs in header files of mingwrt 4.0.3 in strict ANSI mode,
4691 cf.
4692
4693 https://sourceforge.net/p/mingw/bugs/2024/
4694 https://sourceforge.net/p/mingw/bugs/2046/
4695
4696 * builds/unix/configure.raw: Don't set `-ansi' flag for MinGW.
4697
46982014-02-04 Werner Lemberg <wl@gnu.org>
4699
Werner Lemberga8772912014-02-04 11:36:08 +01004700 [autofit] Minor fix.
4701
4702 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
4703 src/autofit/aflatin.c (af_latin_metrics_init_widths): Fix handling
4704 of alternative standard characters.
4705 This also fixes a compilation warning in non-debug mode.
4706
Werner Lembergee3778d2014-02-03 11:16:47 +010047072014-02-03 Werner Lemberg <wl@gnu.org>
4708
4709 [cff] Fix Savannah bug #41363.
4710
4711 * src/cff/cf2ft.c (cf2_checkTransform): Convert assertion into
4712 parameter check.
4713 (cf2_decoder_parse_charstrings): Call `cf2_checkTransform' only if
4714 we are scaling the outline.
4715 (cf2_getPpemY): Remove problematic assertion.
4716
Werner Lemberga3364002014-01-26 09:45:23 +010047172014-01-26 Werner Lemberg <wl@gnu.org>
4718
4719 [autofit] Introduce two more slots for standard characters.
4720
4721 This is useful for OpenType features like `c2sc' (caps to small
4722 caps) that don't have lowercase letters by definition, or other
4723 features that mainly operate on numerals.
4724
4725 * src/autofit/afscript.h: Add more standard characters.
4726
4727 * src/autofit/aftypes.h: Update use of `SCRIPT' macro.
4728 (AF_ScriptClassRec): Add members to hold two more standard
4729 characters.
4730 (AF_DEFINE_SCRIPT_CLASS): Updated.
4731
4732 * src/autofit/afglobal.c, src/autofit/afglobal.h,
4733 * src/autofit/afpic.c, src/autofit/afranges.h, src/autofit/hbshim.c:
4734 Update use of `SCRIPT' macro.
4735
4736 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
4737 src/autofit/aflatin.c (af_latin_metrics_init_widths): Scan two more
4738 standard characters.
4739
Werner Lembergeb7691c2014-01-24 19:04:22 +010047402014-01-24 Werner Lemberg <wl@gnu.org>
4741
4742 Fix Savannah bug #41320.
4743
4744 * src/autofit/aflatin.c (af_latin_metrics_init_blues)
4745 <AF_LATIN_IS_LONG_BLUE>: Avoid negative index of `last'.
4746
Werner Lemberg8b281f82014-01-23 08:14:53 +010047472014-01-23 Werner Lemberg <wl@gnu.org>
4748
Werner Lemberg752f3912014-01-23 09:14:25 +01004749 Fix Savannah bug #41310.
4750
4751 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap) <glyph_format==5>:
4752 Don't check metrics, which this format doesn't have.
4753 This is another correction to the commit from 2013-11-21.
4754
47552014-01-23 Werner Lemberg <wl@gnu.org>
4756
Werner Lemberg8b281f82014-01-23 08:14:53 +01004757 Fix Savannah bug #41309.
4758
4759 * src/type1/t1load.c (t1_parse_font_matrix): Properly handle result
4760 of `T1_ToFixedArray'.
4761
4762 * src/cid/cidload.c (cid_parse_font_matrix): Synchronize with
4763 `t1_parse_font_matrix'.
4764
4765 * src/type42/t42parse.c (t42_parse_font_matrix): Synchronize with
4766 `t1_parse_font_matrix'.
4767 (t42_parse_encoding): Synchronize with `t1_parse_encoding'.
4768
4769 * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_BBOX>,
4770 <T1_FIELD_TYPE_MMOX>: Properly handle result of `ps_tofixedarray'.
4771
Werner Lembergff8dc312014-01-22 09:19:57 +010047722014-01-22 Werner Lemberg <wl@gnu.org>
4773
4774 * src/autofit/hbshim.c (af_get_coverage): Fix memory leaks.
4775
Werner Lemberg6a700782014-01-16 08:55:40 +010047762014-01-16 Werner Lemberg <wl@gnu.org>
4777
4778 [autofit] Improve tracing of style coverages.
4779
4780 * include/internal/fttrace.h: Add `afglobal' for tracing style
4781 coverages.
4782
4783 * src/autofit/afglobal.c: Include FT_INTERNAL_DEBUG_H.
4784 (FT_COMPONENT): Define.
4785 (af_face_globals_compute_style_coverage): Trace `gstyles' array
4786 data.
4787
Werner Lemberg7cbfdff2014-01-09 07:26:06 +010047882014-01-09 Werner Lemberg <wl@gnu.org>
4789
4790 Fix Savannah bug #41158.
4791
4792 * builds/unix/install.mk (install): Create man page directory.
4793
Chongyu Zhu94c66942014-01-08 08:52:59 +010047942014-01-08 Chongyu Zhu <lembacon@gmail.com>
4795
4796 [arm] Fix Savannah bug #41138, part 2.
4797
4798 * builds/unix/ftconfig.in (FT_MulFix_arm), include/config/ftconfig.h
4799 (FT_MulFix_arm), src/truetype/ttinterp.c (TT_MulFix14_arm): Fix
4800 preprocessor conditionals for `add.w'.
4801
Werner Lembergc46fa862014-01-08 08:45:40 +010048022014-01-08 Werner Lemberg <wl@gnu.org>
4803
4804 [autofit] Fix Savannah bug #41138, part 1.
4805
4806 * src/tools/afblue.pl <Handling #endif>: Produce correct auxiliary
4807 enumeration names for generated `#else'.
4808
4809 * src/autofit/afblue.h: Regenerated.
4810
Werner Lemberg3e5a3742014-01-06 07:53:10 +010048112014-01-06 Werner Lemberg <wl@gnu.org>
4812
4813 Add manual page for `freetype-config'.
4814 Contributed by Nis Martensen <nis.martensen@web.de>.
4815
4816 * docs/freetype-config.1: New file.
4817
4818 * builds/unix/unix-def.in (mandir): Define.
4819 * builds/unix/install.mk (install, uninstall): Handle manpage.
4820
Werner Lemberg991cbcc2014-01-05 13:24:56 +010048212014-01-05 Werner Lemberg <wl@gnu.org>
4822
4823 [autofit] Minor fixes for `afblue.pl'.
4824
4825 * src/tools/afblue.pl (aux_name): Don't use `reverse'.
4826 <Handling #endif>: Use proper indentation for generated `#else'.
4827
4828 * src/autofit/afblue.h: Regenerated.
4829
Werner Lemberg0d977442014-01-04 11:46:34 +010048302014-01-04 Werner Lemberg <wl@gnu.org>
4831
4832 [autofit] Fix Indic scripts.
4833
4834 Split the single, incorrect Indic entry into separate scripts so
4835 that the covered ranges are the same: Bengali, Devanagari, Gujarati,
4836 Gurmukhi, Kannada, Limbu, Malayalam, Oriya, Sinhala, Sundanese,
4837 Syloti Nagri, Tamil, Telugu, and Tibetan. At the same time, remove
4838 entries for Meetai Mayak and Sharada – the Unicode ranges were
4839 incorrect (and nobody has complained about that), fonts are scarce
4840 for those scripts, and the Indic auto-hinter support is rudimentary
4841 anyways.
4842
4843 * src/autofit/afscript.h: Updated, using AF_CONFIG_OPTION_INDIC and
4844 AF_CONFIG_OPTION_CJK.
4845
4846 * src/autofit/afstyles.h (STYLE_DEFAULT_INDIC): New auxiliary macro.
4847 Use it, together with AF_CONFIG_OPTION_INDIC and
4848 AF_CONFIG_OPTION_CJK, to update.
4849
4850 * src/autofit/afranges.c [AF_CONFIG_OPTION_INDIC]: Updated.
4851 [!AF_CONFIG_OPTION_INDIC, !AF_CONFIG_OPTION_CJK]: Removed.
4852 Sort entries by tags.
4853
Werner Lemberg5c7f5502014-01-03 10:48:26 +010048542014-01-03 Werner Lemberg <wl@gnu.org>
4855
Werner Lembergecdb0e32014-01-03 20:49:31 +01004856 [autofit] Thinko.
4857
4858 * src/autofit/hbshim.c (af_get_char_index): Similar to
4859 `af_get_coverage', reject glyphs which are not substituted.
4860
48612014-01-03 Werner Lemberg <wl@gnu.org>
4862
Werner Lemberga42f9182014-01-03 18:29:41 +01004863 [autofit] Fix handling of default coverages.
4864
Werner Lemberg1b5bc892014-01-03 18:33:24 +01004865 With this commit, the implementation of coverage handling is
4866 completed.
4867
4868 * src/autofit/hbshim.c (af_get_coverage): Exit early if nothing to
4869 do.
4870 Reject coverages which don't contain appropriate glyphs for blue
4871 zones.
4872
48732014-01-03 Werner Lemberg <wl@gnu.org>
4874
4875 [autofit] Fix handling of default coverages.
4876
Werner Lemberga42f9182014-01-03 18:29:41 +01004877 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
4878 First handle non-default coverages, then the default coverage of the
4879 default script, and finally the other default coverages.
4880
48812014-01-03 Werner Lemberg <wl@gnu.org>
4882
Werner Lembergf45749b2014-01-03 18:09:36 +01004883 [autofit] Fix scaling of HarfBuzz shaping.
4884
4885 * src/autofit/hbshim.c (af_get_char_index): Scale to units per EM.
4886
48872014-01-03 Werner Lemberg <wl@gnu.org>
4888
Werner Lemberg5c7f5502014-01-03 10:48:26 +01004889 [autofit] Better ftgrid support.
4890
4891 * src/autofit/afhints.c (af_glyph_hints_get_segment_offset): Add
4892 parameters `is_blue' and `blue_offset'.
4893
Werner Lemberg73cc8332014-01-01 07:10:36 +010048942014-01-01 Werner Lemberg <wl@gnu.org>
4895
Werner Lemberg55cd7e02014-01-02 13:07:48 +01004896 [autofit] Remove some styles.
4897
4898 * src/autofit/afcover.h: Remove coverages for alternative fractions,
4899 denominators, numerators, and fractions.
4900
4901 * src/autofit/afstyles.h (META_STYLE_LATIN): Updated.
4902
49032014-01-01 Werner Lemberg <wl@gnu.org>
4904
Werner Lembergc973e672014-01-01 16:34:42 +01004905 [autofit] Add more styles.
4906
4907 * src/autofit/afstyles.h (STYLE_LATIN, META_STYLE_LATIN): New
4908 auxiliary macros; use them to define styles for Cyrillic, Greek, and
4909 Latin.
4910
4911 * src/autofit/afcover.h: Remove coverage for oldstyle figures.
4912 Since those digits are used in combination with ordinary letters, it
4913 makes no sense to handle them separately.
4914
4915 * src/autofit/afglobal.c (af_face_globals_get_metrics): Don't limit
4916 `options' parameter to 4 bits.
4917
49182014-01-01 Werner Lemberg <wl@gnu.org>
4919
Werner Lembergabb2f732014-01-01 08:00:16 +01004920 [autofit] Fix style assignments to glyphs.
4921
4922 * src/autofit/hbshim.c (af_get_coverage)
4923 [FT_CONFIG_OPTION_USE_HARFBUZZ]: Scan GPOS coverage of features also
4924 so that we can skip glyphs that have both GSUB and GPOS data.
4925
49262014-01-01 Werner Lemberg <wl@gnu.org>
4927
Werner Lemberg0950f3a2014-01-01 07:48:20 +01004928 * src/autofit/hbshim.c: s/{lookups,glyphs}/gsub_{lookups,glyphs}/.
4929
49302014-01-01 Werner Lemberg <wl@gnu.org>
4931
Werner Lemberg73cc8332014-01-01 07:10:36 +01004932 [autofit] Implement and use `af_get_char_index' with HarfBuzz.
4933
4934 * src/autofit/hbshim.c (COVERAGE) [FT_CONFIG_OPTION_USE_HARFBUZZ]:
4935 Redefine to construct HarfBuzz features.
4936 (af_get_char_index) [FT_CONFIG_OPTION_USE_HARFBUZZ]: Rewritten.
4937
4938 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Use
4939 `y_offset' to adjust `best_y'.
4940
Werner Lembergc9d99472013-12-31 08:16:57 +010049412013-12-31 Werner Lemberg <wl@gnu.org>
4942
Werner Lemberg785f3852013-12-31 09:45:10 +01004943 [autofit] s/AF_STYLE_...._DEFAULT/AF_STYLE_...._DFLT/i.
4944
49452013-12-31 Werner Lemberg <wl@gnu.org>
4946
Werner Lembergc9d99472013-12-31 08:16:57 +01004947 [autofit] Fix interface of `af_get_char_index'.
4948
4949 * src/autofit/hbshim.c (af_get_char_index): Return error value.
4950 Add argument for y offset (to be used in a yet-to-come patch).
4951
4952 * src/autofit/hbshim.h, src/autofit/afcjk.c,
4953 src/autofit/aflatin.c: Updated.
4954
Werner Lemberg44aa7e02013-12-30 07:41:22 +010049552013-12-30 Werner Lemberg <wl@gnu.org>
4956
4957 [autofit] Don't combine multiple features into one set.
4958
4959 Combining them, as originally envisioned, would lead to much more
4960 complicated code, as investigations have shown meanwhile. The major
4961 drawback is that we run out of available style slots much earlier.
4962 However, this is only a theoretical issue since we don't support a
4963 large number of scripts currently.
4964
4965 * src/autofit/afcover.h: Replace `COVERAGE_{1,2,3}' macros with
4966 a single-element `COVERAGE' macro, sort the elements by the feature
4967 tags, and add entry for `ruby'.
4968
4969 * src/autofit/aftypes.h: Updated.
4970 * src/autofit/hbshim.c: Updated.
4971
Werner Lemberg6af01a02013-12-28 08:55:24 +010049722013-12-28 Werner Lemberg <wl@gnu.org>
4973
Werner Lemberg072dc452013-12-28 12:26:21 +01004974 [autofit] Code shuffling to reduce use of cpp macros.
4975
4976 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
4977 Call `af_get_coverage' unconditionally.
4978
4979 * src/autofit/autofit.c: Include `hbshim.c' unconditionally.
4980
4981 * src/autofit/hbshim.c (af_get_coverage)
4982 [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Provide dummy function.
4983
4984 * src/autofit/hbshim.h: Provide function declarations
4985 unconditionally.
4986
49872013-12-28 Werner Lemberg <wl@gnu.org>
4988
Werner Lemberg17af5862013-12-28 10:33:01 +01004989 [autofit] Add wrapper function for `FT_Get_Char_Index'.
4990
4991 Yet-to-come changes will provide HarfBuzz functionality for the new
4992 function.
4993
4994 * src/autofit/hbshim.c (af_get_char_index): New function.
4995 * src/autofit/hbshim.h: Updated.
4996
4997 * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
4998 af_cjk_metrics_init_blues, af_cjk_metrics_check_digits): Updated.
4999
5000 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
5001 af_latin_metrics_init_blues, af_latin_metrics_check_digits):
5002 Updated.
5003
50042013-12-28 Werner Lemberg <wl@gnu.org>
5005
Werner Lemberg6af01a02013-12-28 08:55:24 +01005006 [autofit] Use `global' HarfBuzz font object.
5007
5008 We now use `hb_font' instead of `hb_face' since yet-to-come changes
5009 need this.
5010
5011 * src/autofit/afglobal.h: Include `hbshim.h'.
5012 (AF_FaceGlobalsRec) [FT_CONFIG_OPTION_USE_HARFBUZZ]: New member
5013 `hb_font'.
5014
5015 * src/autofit/afglobal.c (af_face_globals_new)
5016 [FT_CONFIG_OPTION_USE_HARFBUZZ]: Create `hb_font'.
5017 (af_face_globals_free) [FT_CONFIG_OPTION_USE_HARFBUZZ]: Destroy
5018 `hb_font'.
5019
5020 * src/autofit/hbshim.h: Include HarfBuzz headers.
5021
5022 * src/autofit/hbshim.c: Include `hbshim.h' instead of HarfBuzz
5023 headers.
5024 (af_get_coverage): Updated.
5025
Werner Lembergd32a7d32013-12-27 19:26:04 +010050262013-12-27 Werner Lemberg <wl@gnu.org>
5027
5028 [autofit] Handle `DFLT' OpenType script for coverages.
5029
5030 * include/ftautoh.h: Document new `default-script' property.
5031
5032 * src/autofit/hbshim.c (af_get_coverage): Use `AF_FaceGlobals' for
5033 type of first parameter.
5034 (script_tags): Add one more element.
5035 (af_get_coverage): Adjust `script_tags' to handle `DFLT' script tag.
5036
5037 * src/autofit/hbshim.h: Updated.
5038
5039 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
5040 Updated.
5041
5042 * src/autofit/afglobal.h (AF_SCRIPT_DEFAULT): New macro.
5043
5044 * src/autofit/afmodule.h (AF_ModuleRec): New `default_script'
5045 member.
5046
5047 * src/autofit/afmodule.c (af_property_set, af_property_get): Handle
5048 `default-script' property.
5049 (af_autofitter_init): Updated.
5050
suzuki toshiyae2d2b152013-12-27 16:44:24 +090050512013-12-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5052
5053 [ftrfork] Fix the face order difference between POSIX and Carbon.
5054
5055 The fragmented resources in Suitcase and .dfont should be reordered
Werner Lemberg00a7b512013-12-27 19:18:49 +01005056 when `POST' resource for Type1 is being restored, but reordering of
suzuki toshiyae2d2b152013-12-27 16:44:24 +09005057 sfnt resources induces the different face order. Now the ordering
Werner Lemberg00a7b512013-12-27 19:18:49 +01005058 is restricted to `POST' resource only, to prevent the different
5059 order issue (e.g. the face index in the fontconfig cache generated
5060 with Carbon framework is incompatible with that by FreeType 2
5061 without Carbon framework.) Found by Khaled Hosny and Hin-Tak Leung.
5062
suzuki toshiyae2d2b152013-12-27 16:44:24 +09005063 http://lists.gnu.org/archive/html/freetype-devel/2013-02/msg00035.html
5064 http://lists.gnu.org/archive/html/freetype-devel/2013-12/msg00027.html
5065
5066 * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Add a switch
Werner Lemberg44aa7e02013-12-30 07:41:22 +01005067 `sort_by_res_id' to control the fragmented resource ordering.
Werner Lemberg00a7b512013-12-27 19:18:49 +01005068 * include/internal/ftrfork.h: Declare new switch.
5069 * src/base/ftobjs.c (IsMacResource): Enable the sorting for `POST'
5070 resource, and disable the sorting for `sfnt' resource.
suzuki toshiyae2d2b152013-12-27 16:44:24 +09005071
Werner Lemberg5f577462013-12-25 08:50:50 +010050722013-12-25 Werner Lemberg <wl@gnu.org>
5073
5074 Fix Savannah bug #40997.
5075
5076 * src/bdf/bdfdrivr.c (BDF_Face_Init): Only use OR operator to
5077 adjust face flags since FT_FACE_FLAG_EXTERNAL_STREAM might already
5078 be set.
5079 * src/cff/cffobjs.c (cff_face_init): Ditto.
5080 * src/cid/cidobjs.c (cid_face_init): Ditto.
5081 * src/pcf/pcfread.c (pcf_load_font): Ditto.
5082 * src/pfr/pfrobjs.c (pfr_face_init): Ditto.
5083 * src/type1/t1objs.c (T1_Face_Init): Ditto.
5084 * src/type42/t42objs.c (T42_Face_Init): Ditto.
5085 * src/winfonts/winfnt.c (FNT_Face_Init): Ditto.
5086
Werner Lembergc4e968e2013-12-21 07:23:08 +010050872013-12-21 Werner Lemberg <wl@gnu.org>
5088
Werner Lemberg19241342013-12-21 21:31:38 +01005089 [autofit] Introduce `coverages'.
5090
5091 Coverages are the interface to the HarfBuzz library to acces
5092 OpenType features for handling glyphs not addressable by the cmap.
5093
5094 Right now, compilation of HarfBuzz is only added to the development
5095 build. A solution for standard build mode will be delayed until
5096 HarfBuzz gets split into two libraries to avoid mutual dependencies
5097 between FreeType and HarfBuzz.
5098
5099 Note that this is only a first step in handling coverages, basically
5100 providing the framework only. Code for handling selected OpenType
5101 features (this is, actually using the data in `afcover.h') will
5102 follow.
5103
5104 * devel/ftoption.h, include/config/ftoption.h
5105 (FT_CONFIG_OPTION_USE_HARFBUZZ): New macro.
5106
5107 * src/autofit/hbshim.c, src/autofit/hbshim.h, src/autofit/afcover.h:
5108 New files.
5109
5110 * src/autofit/afscript.h: Add HarfBuzz script name tags.
5111
5112 * src/autofit/afstyles.h: Add default coverage enumeration values.
5113
5114 * src/autofit/aftypes.h: Update use of `SCRIPT' and `STYLE' macros.
5115 (AF_Coverage): New enumeration (generated by `afcover.h').
5116 (AF_StyleClassRec): New member `coverage'.
5117 (AF_DEFINE_STYLE_CLASS): Updated.
5118
5119 * include/internal/fttrace.h: Add `afharfbuzz' for tracing coverage
5120 data.
5121
5122 * src/autofit/afglobal.h: Update use of `SCRIPT' and `STYLE' macros.
5123 (AF_SCRIPT_FALLBACK): Renamed to ...
5124 (AF_STYLE_FALLBACK): ... this.
5125
5126 * src/autofit/afglobal.c: Include `hbshim.c'.
5127 Update use of `SCRIPT' and `STYLE' macros.
5128 (af_face_globals_compute_style_coverage)
5129 [FT_CONFIG_OPTION_USE_HARFBUZZ]: Call `af_get_coverage'.
5130 Update.
5131
5132 * src/autofit/afmodule.h (AF_ModuleRec):
5133 s/fallback_script/fallback_style/.
5134
5135 * src/autofit/afmodule.c (af_property_set): Adapt handling of
5136 `fallback-script' property to set a fallback style.
5137 (af_property_get, af_autofitter_init): Updated.
5138
5139 * src/autofit/afpic.c: Update use of `SCRIPT' and `STYLE' macros.
5140
5141 * src/autofit/afranges.h: Update use of `SCRIPT' macro.
5142
5143 * src/autofit/autofit.c [FT_CONFIG_OPTION_USE_HARFBUZZ]: Include
5144 `hbshim.c'.
5145
5146 * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `hbshim.c'.
5147 (AUTOF_DRV_H): Add `afcover.h'.
5148
5149 * builds/freetype.mk (INCLUDE_FLAGS) [DEVEL_DIR]: Use pkg-config for
5150 all libraries needed by FreeType.
5151
51522013-12-21 Werner Lemberg <wl@gnu.org>
5153
Werner Lembergb337fa22013-12-21 19:33:15 +01005154 Fix Savannah bug #40975 (sort of).
5155
5156 * src/truetype/ttinterp.c (Ins_IP): Fix sign typo to make FreeType
5157 behave the same as the Windows TrueType engine for the invalid case.
5158
51592013-12-21 Werner Lemberg <wl@gnu.org>
5160
Werner Lemberg3bf60952013-12-21 08:49:11 +01005161 [autofit] Make PIC mode work actually.
5162
5163 * src/autofit/afpic.h (AFModulePIC): Fix array sizes to fit the
5164 enumeration values automatically generated by including `afscript.h'
5165 and friends.
5166
5167 * src/autofit/afpic.c (autofit_module_class_pic_init): Updated.
5168
51692013-12-21 Werner Lemberg <wl@gnu.org>
5170
Werner Lembergbd413862013-12-21 08:14:25 +01005171 Fix PIC linking.
5172
5173 * include/internal/ftrfork.h (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Fix
5174 generated function name.
5175
5176 * src/base/basepic.c (FT_Init_Table_raccess_guess_table): Rename
5177 to ...
5178 (FT_Init_Table_ft_raccess_guess_table): ... this so that the
5179 function name correctly corresponds to what the macro framework
5180 expects.
5181
5182 * src/psnames/rules.mk (PSNAMES_DRV_SRC_S): Use correct file name so
5183 that PIC functions are compiled also.
5184
51852013-12-21 Werner Lemberg <wl@gnu.org>
5186
Werner Lembergc4e968e2013-12-21 07:23:08 +01005187 [base] Add missing dependencies to Makefile.
5188
5189 * src/base/rules.mk (BASE_SRC): Add `basepic.c' and `ftpic.c'.
5190 (BASE_H): Add `basepic.h'.
5191
Werner Lemberg974b1932013-12-20 17:26:26 +010051922013-12-20 Werner Lemberg <wl@gnu.org>
5193
Werner Lemberg8a8f3752013-12-20 18:35:35 +01005194 [autofit] Fix PIC compilation.
5195
5196 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
5197 src/autofit/aflatin.c (af_latin_metrics_init_widths)
5198 [FT_CONFIG_OPTION_PIC]: Declare `globals'.
5199
5200 * src/autofit/afglobal.c: Always call AF_DEFINE_SCRIPT_CLASS, and
5201 AF_DEFINE_STYLE_CLASS.
5202
5203 * src/autofit/afpic.c: Include `afglobal.h'.
5204 (autofit_module_class_pic_init): Typo.
5205
5206 * src/autofit/aftypes.h (AF_DEFINE_SCRIPT_CLASS,
5207 AF_DEFINE_STYLE_CLASS): Don't use the same identifier for macro
5208 parameter and structure member.
5209
52102013-12-20 Werner Lemberg <wl@gnu.org>
5211
Werner Lemberg974b1932013-12-20 17:26:26 +01005212 [autofit] Introduce `styles'.
5213
5214 This is the new top-level structure for handling glyph input data;
5215 scripts are now defined separately.
5216
5217 * src/autofit/aftypes.h (SCRIPT): Updated.
5218 (AF_ScriptClassRec): Move `blue_stringset' and `writing_system'
5219 members to ...
5220 (AF_Style_ClassRec): ... this new structure.
5221 (AF_Style): New enumeration.
5222 (AF_StyleMetricsRec): Replace `script' enumeration with
5223 `style_class' pointer.
5224 (AF_DEFINE_SCRIPT_CLASS, AF_DECLARE_SCRIPT_CLASS): Updated.
5225 (AF_DEFINE_STYLE_CLASS, AF_DECLARE_STYLE_CLASS): New macros.
5226
5227 * src/autofit/afstyles.h: New file, using data from `afscript.h'.
5228 * src/autofit/afscript.h: Updated.
5229
5230 * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
5231 af_cjk_metrics_init_blues, af_cjk_hint_edges): Updated.
5232
5233 * src/autofit/afglobal.c (SCRIPT): Updated.
5234 (STYLE): Redefine macro to load `afstyles.h'.
5235 (af_script_names) [FT_DEBUG_LEVEL_TRACE]: Replace with...
5236 (af_style_names): ... this array.
5237 (af_face_globals_compute_script_coverage): Renamed to...
5238 (af_face_globals_compute_style_coverage): ... this.
5239 Updated.
5240 (af_face_globals_new, af_face_globals_free,
5241 af_face_globals_get_metrics): Updated.
5242
5243 * src/autofit/afglobal.h (SCRIPT): Updated.
5244 (STYLE): Redefine macro to load `afstyles.h'.
5245 (AF_SCRIPT_FALLBACK): Update definition. This will get more
5246 refinements with later on.
5247 (AF_SCRIPT_UNASSIGNED): Replace with...
5248 (AF_STYLE_UNASSIGNED): ... this macro.
5249 (AF_FaceGlobalsRec): Updated.
5250
5251 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
5252 af_latin_metrics_init_blues, af_latin_metrics_scale_dim,
5253 af_latin_hint_edges): Updated.
5254
5255 * src/autofit/aflatin2.c (af_latin2_metrics_init_widths): Updated.
5256 (af_ltn2_uniranges): Removed.
5257
5258 * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph):
5259 Updated.
5260
5261 * src/autofit/afpic.c (autofit_module_class_pic_init): Updated.
5262 * src/autofit/afpic.h (AF_STYLE_CLASSES_GET): New macro.
5263 (AFModulePIC): Add `af_style_classes' and `af_style_classes_rec'
5264 members.
5265
5266 * src/autofit/afranges.h: Updated.
5267
5268 * src/autofit/rules.mk (AUTOF_DRV_H): Add `afstyles.h'.
5269
Werner Lembergd8324572013-12-19 15:45:24 +010052702013-12-19 Werner Lemberg <wl@gnu.org>
5271
5272 [autofit] Factor scripts and uniranges out of writing system files.
5273
5274 * src/autofit/afranges.c, src/autofit/afranges.h: New files.
5275
5276 * src/autofit/afscript.h: Extend `SCRIPT' macro with more
5277 parameters, taking data from the writing system files.
5278
5279 * src/autofit/aftypes.h: Updated.
5280
5281 * src/autofit/afglobal.c: Include `afranges.h'.
5282 Load `afscript.h' to call AF_DEFINE_SCRIPT_CLASS.
5283 * src/autofit/afglobal.c: Include `afranges.h'.
5284 Load `afscript.h' to call AF_DECLARE_SCRIPT_CLASS.
5285
5286 * src/autofit/afcjk.c, src/autofit/afcjk.h: Updated.
5287 * src/autofit/afdummy.c, src/autofit/afdummy.h: Updated.
5288 * src/autofit/afindic.c, src/autofit/afindic.h: Updated.
5289 * src/autofit/aflatin.c, src/autofit/aflatin.h: Updated.
5290 * src/autofit/aflatn2.c, src/autofit/aflatn2.h: Updated.
5291
5292 * src/autofit/afpic.c: Updated.
5293
5294 * src/autofir/autofit.c: Include `afranges.c'.
5295 * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `afranges.c'.
5296
Werner Lemberg9a354552013-12-18 10:36:06 +010052972013-12-18 Werner Lemberg <wl@gnu.org>
5298
Werner Lemberg73f31982013-12-19 15:24:17 +01005299 [autofit] More code orthogonality.
5300
5301 * src/autofit/aftypes.h (AF_StyleMetrics): Replace `script_class'
5302 pointer to an `AF_ScriptClass' structure with `script' index of type
5303 `AF_Script'.
5304 Move some code around.
5305
5306 * src/autofit/afcjk.c: Include `afpic.h'.
5307 (af_cjk_metrics_init_widths, af_cjk_metrics_init_blues,
5308 af_cjk_hint_edges): Updated.
5309
5310 * src/autofit/aflatin.c: Include `afpic.h'.
5311 (af_latin_metrics_init_widths, af_latin_metrics_init_blues,
5312 af_latin_metrics_scale_dim, af_latin_hint_edges): Updated.
5313
5314 * src/autofit/afglobal.c (af_face_globals_get_metrics): Updated.
5315
5316 * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph):
5317 Updated.
5318
53192013-12-18 Werner Lemberg <wl@gnu.org>
5320
Werner Lemberg3f91cb32013-12-18 12:59:35 +01005321 [autofit] s/ScriptMetrics/StyleMetrics/.
5322
53232013-12-18 Werner Lemberg <wl@gnu.org>
5324
Werner Lemberg4fccc212013-12-18 12:53:01 +01005325 [autofit] s/script_{metrics,hints}/style_{metrics,hints}/
5326
53272013-12-18 Werner Lemberg <wl@gnu.org>
5328
Werner Lembergf4df4072013-12-18 10:39:30 +01005329 [autofit] s/gscripts/gstyles/.
5330
53312013-12-18 Werner Lemberg <wl@gnu.org>
5332
Werner Lemberg9a354552013-12-18 10:36:06 +01005333 [autofit] s/glyph_scripts/glyph_styles/.
5334
5335 This is the first commit of a series to create a new top-level
5336 structure (a `style') for handling scripts, writing_systems, and
5337 soon-to-be-added coverages.
5338
Werner Lemberg7a5fc2f2013-12-17 13:29:53 +010053392013-12-17 Werner Lemberg <wl@gnu.org>
5340
5341 [autofit] s/AF_Script_/AF_WritingSystem_/ where appropriate.
5342
Infinality8bb09b02013-12-11 09:01:13 +010053432013-12-11 Infinality <infinality@infinality.net>
5344
5345 [truetype] Simplify logic of rendering modes.
5346
5347 This patch unifies the subpixel and non-subpixel cases.
5348
5349 * src/truetype/ttinterp.h (TT_ExecContextRec): Remove
5350 `grayscale_hinting'; all code should refer to `grayscale' instead.
5351 Remove unused `native_hinting' member.
5352 Rename `subpixel_hinting' member to `subpixel.
5353
5354 * src/truetype/ttgload.c (TT_LOADER_SET_PP): Updated.
5355 (tt_loader_init): Updated.
5356
5357 * src/truetype/ttinterp.c (Ins_GETINFO): Simplify.
5358 Updated.
5359
Werner Lemberge9d95aa2013-12-11 07:48:51 +010053602013-12-11 Werner Lemberg <wl@gnu.org>
5361
5362 [documentation] Add section how to include FreeType header files.
5363 Problem reported by David Kastrup <dak@gnu.org>.
5364
5365 Surprisingly, a description how to do that was completely missing in
5366 the API reference.
5367
5368 * include/freetype.h, include/ftchapters.h: New documentation
5369 section `header_inclusion'.
5370
Werner Lemberg05c786d2013-12-10 08:38:57 +010053712013-12-10 Werner Lemberg <wl@gnu.org>
5372
Werner Lemberg91932592013-12-10 13:24:07 +01005373 [autofit] s/DFLT/NONE/, s/dflt/none/.
5374
53752013-12-10 Werner Lemberg <wl@gnu.org>
5376
Werner Lemberg45244f82013-12-10 13:18:11 +01005377 [autofit] s/AF_SCRIPT_NONE/AF_SCRIPT_UNASSIGNED/.
5378
53792013-12-10 Werner Lemberg <wl@gnu.org>
5380
Werner Lemberg69d1a362013-12-10 10:12:27 +01005381 [truetype] Fix scaling of vertical phantom points.
5382
5383 * src/truetype/ttgload.c (load_truetype_glyph): Scale pp3.x and
5384 pp4.x also.
5385
53862013-12-10 Werner Lemberg <wl@gnu.org>
5387
Werner Lemberg05c786d2013-12-10 08:38:57 +01005388 [truetype] Fix positioning of composite glyphs.
5389 Problem reported by Nigel Tao <nigeltao@golang.org>.
5390
5391 * src/truetype/ttgload.c (TT_Hint_Glyph): Remove code that shifts
5392 the glyph (component) by a fractional value computed from the LSB
5393 phantom point. This is wrong, since the horizontal phantom points
5394 get rounded horizontally later on.
5395
Werner Lembergdd8050a2013-12-08 23:14:46 +010053962013-12-08 Werner Lemberg <wl@gnu.org>
5397
5398 * Version 2.5.2 released.
5399 =========================
5400
5401
5402 Tag sources with `VER-2-5-2'.
5403
5404 * docs/VERSION.DLL: Update documentation and bump version number to
5405 2.5.2.
5406
5407 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
5408 builds/windows/vc2005/index.html,
5409 builds/windows/vc2008/freetype.vcproj,
5410 builds/windows/vc2008/index.html,
5411 builds/windows/vc2010/freetype.vcxproj,
5412 builds/windows/vc2010/index.html,
5413 builds/windows/visualc/freetype.dsp,
5414 builds/windows/visualc/freetype.vcproj,
5415 builds/windows/visualc/index.html,
5416 builds/windows/visualce/freetype.dsp,
5417 builds/windows/visualce/freetype.vcproj,
5418 builds/windows/visualce/index.html,
5419 builds/wince/vc2005-ce/freetype.vcproj,
5420 builds/wince/vc2005-ce/index.html,
5421 builds/wince/vc2008-ce/freetype.vcproj,
5422 builds/wince/vc2008-ce/index.html: s/2.5.1/2.5.2/, s/251/252/.
5423
Werner Lembergec8853c2014-03-06 19:13:45 +01005424 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
Werner Lembergdd8050a2013-12-08 23:14:46 +01005425
5426 * builds/unix/configure.raw (version_info): Set to 17:1:11.
Werner Lembergec8853c2014-03-06 19:13:45 +01005427 * CMakeLists.txt (VERSION_PATCH): Set to 2.
Werner Lembergdd8050a2013-12-08 23:14:46 +01005428 * docs/CHANGES: Updated.
5429
Werner Lemberg98d185c2013-12-07 09:26:55 +010054302013-12-07 Werner Lemberg <wl@gnu.org>
5431
5432 [truetype] Next round in phantom point handling.
5433
5434 Greg Hitchcock provided very interesting insights into the
5435 complicated history of the horizontal positions of the TSB and BSB
5436 phantom points.
5437
5438 * src/truetype/ttgload.c (TT_LOADER_SET_PP)
5439 [TT_CONFIG_OPTION_SUBPIXEL_HINTING]: Use `subpixel_hinting' and
5440 `grayscale_hinting' flags as conditionals for the x position of TSB
5441 and BSB.
5442
Werner Lembergfcdb7842013-12-05 15:53:27 +010054432013-12-05 Werner Lemberg <wl@gnu.org>
5444
5445 * builds/freetype.mk (FT_CC): Removed. Unused.
5446
Werner Lemberg64b395c2013-12-04 06:18:56 +010054472013-12-04 Werner Lemberg <wl@gnu.org>
5448
5449 [sfnt] Fix handling of embedded bitmap strikes.
5450
5451 This corrects the commit from 2013-11-21. Problem reported by
5452 Andrey Panov <panov@canopus.iacp.dvo.ru>.
5453
5454 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Fix logic to
5455 detect excessive bytes for bit-aligned bitmaps.
5456
Werner Lembergbdd5e752013-12-03 06:57:02 +010054572013-12-03 Werner Lemberg <wl@gnu.org>
5458
Werner Lembergc2b47532013-12-03 07:01:57 +01005459 [truetype] Remove dead code.
5460
5461 Reported by Nigel Tao <nigeltao@golang.org>.
5462
5463 * include/internal/tttypes.h (TT_LoaderRec): Remove unused
5464 `preserve_pps' field.
5465 * src/truetype/ttgload.c (TT_Hint_Glyph): Updated.
5466
54672013-12-03 Werner Lemberg <wl@gnu.org>
5468
Werner Lembergbdd5e752013-12-03 06:57:02 +01005469 [truetype] Fix phantom point handling.
5470
5471 This is a further improvement to the changes from 2013-11-06.
5472
5473 * src/truetype/ttgload.c (TT_Hint_Glyph): Horizontal phantom points
5474 are rounded horizontally, vertical ones are rounded vertically.
5475 (TT_LOADER_SET_PP): The horizontal position of vertical phantom
5476 points in pre-ClearType mode is zero, as shown in the OpenType
5477 specification.
5478
Werner Lemberg64872a52013-12-02 07:51:17 +010054792013-12-02 Werner Lemberg <wl@gnu.org>
5480
5481 [truetype] Fix change from 2013-11-20.
5482
5483 Problem reported by Akira Kakuto <kakuto@fuk.kindai.ac.jp>.
5484
5485 * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Protect call to
5486 `Update_Max' with both a TT_USE_BYTECODE_INTERPRETER guard and a
5487 `IS_HINTED' clause.
5488 Also remove redundant check using `maxSizeOfInstructions' – in
5489 simple glyphs, the bytecode data comes before the outline data, and
5490 a validity test for this is already present.
5491
Werner Lemberg52166ab2013-11-27 10:10:16 +010054922013-11-27 Werner Lemberg <wl@gnu.org>
5493
5494 [autofit] Fix use of dumping functions in `ftgrid' demo program.
5495
5496 * src/autofit/afhints.c (AF_DUMP) [FT_DEBUG_AUTOFIT]: New macro.
5497 (af_glyph_hints_dump_points, af_glyph_hints_dump_segments,
5498 af_glyph_hints_dump_edges) [FT_DEBUG_AUTOFIT]: Add parameter to
5499 handle output to stdout.
5500 Use AF_DUMP.
5501 (af_glyph_hints_dump_points, af_glyph_hints_dump_segments,
5502 af_glyph_hints_dump_edges) [!FT_DEBUG_AUTOFIT]: Removed.
5503
Werner Lemberg3aee4292013-11-25 00:28:11 +010055042013-11-25 Werner Lemberg <wl@gnu.org>
5505
5506 * Version 2.5.1 released.
5507 =========================
5508
5509
5510 Tag sources with `VER-2-5-1'.
5511
5512 * docs/VERSION.DLL: Update documentation and bump version number to
5513 2.5.1.
5514
5515 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
5516 builds/windows/vc2005/index.html,
5517 builds/windows/vc2008/freetype.vcproj,
5518 builds/windows/vc2008/index.html,
5519 builds/windows/vc2010/freetype.vcxproj,
5520 builds/windows/vc2010/index.html,
5521 builds/windows/visualc/freetype.dsp,
5522 builds/windows/visualc/freetype.vcproj,
5523 builds/windows/visualc/index.html,
5524 builds/windows/visualce/freetype.dsp,
5525 builds/windows/visualce/freetype.vcproj,
5526 builds/windows/visualce/index.html,
5527 builds/wince/vc2005-ce/freetype.vcproj,
5528 builds/wince/vc2005-ce/index.html,
5529 builds/wince/vc2008-ce/freetype.vcproj,
5530 builds/wince/vc2008-ce/index.html: s/2.5.0/2.5.1/, s/250/251/.
5531
5532 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
5533
5534 * builds/unix/configure.raw (version_info): Set to 17:0:11.
Werner Lembergec8853c2014-03-06 19:13:45 +01005535 * CMakeLists.txt (VERSION_PATCH): Set to 1.
Werner Lemberg3aee4292013-11-25 00:28:11 +01005536 * docs/CHANGES, docs/release: Updated.
5537
Werner Lemberg9326caf2013-11-23 23:59:25 +010055382013-11-23 Werner Lemberg <wl@gnu.org>
5539
Werner Lemberg063ee6b2013-11-24 00:19:17 +01005540 [truetype]: Add tricky font names `hkscsiic.ttf' and `iicore.ttf'.
5541
5542 * src/truetype/ttobjs.c (TRICK_NAMES_MAX_CHARACTERS,
5543 TRICK_NAMES_COUNT): Updated.
5544 (trick_names): Add family name for the two fonts.
5545
55462013-11-23 Werner Lemberg <wl@gnu.org>
5547
Werner Lemberg9326caf2013-11-23 23:59:25 +01005548 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Typo.
5549
Werner Lemberg427b1762013-11-21 13:10:56 +010055502013-11-21 Werner Lemberg <wl@gnu.org>
5551
Werner Lemberg9326caf2013-11-23 23:59:25 +01005552 [sfnt] Typo.
Werner Lemberg8af2a1c2013-11-21 13:13:12 +01005553
5554 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
5555
5556 * src/sfnt/sfobjs.c (sfnt_load_face): Return correct `bsize->width'
5557 value if the font lacks an `OS/2' table.
5558
55592013-11-21 Werner Lemberg <wl@gnu.org>
5560
Werner Lemberg64b395c2013-12-04 06:18:56 +01005561 [sfnt] Improve handling of buggy embedded bitmap strikes.
Werner Lemberg427b1762013-11-21 13:10:56 +01005562
5563 We are now able to successfully load `AppleMyoungJo.ttf'.
5564 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
5565
5566 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Don't trust glyph
5567 format.
5568
Werner Lemberg28626862013-11-20 21:06:18 +010055692013-11-20 Werner Lemberg <wl@gnu.org>
5570
5571 [truetype] Don't trust `maxp's `maxSizeOfInstructions'.
5572
5573 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>; see
5574
5575 http://lists.nongnu.org/archive/html/freetype-devel/2013-08/msg00005.html
5576
5577 for details.
5578
5579 * src/base/ftobjs.c (FT_Load_Glyph): Check size of `fpgm' and `prep'
5580 tables also for setting `autohint'.
5581
5582 * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Use code from
5583 `TT_Process_Composite_Glyph' for handling unreliable values of
5584 `maxSizeOfInstructions'.
5585
Werner Lembergbc25de62013-11-16 07:52:20 +010055862013-11-16 Werner Lemberg <wl@gnu.org>
5587
5588 [sfnt] Fix `OS/2' table version 5 support.
5589
5590 We now follow the `official' announcement from Microsoft (on the
5591 OpenType mailing list, which unfortunately hasn't a public archive).
5592
5593 * include/freetype/tttables.h (TT_OS2):
5594 s/usLowerPointSize/usLowerOpticalPointSize/,
5595 s/usUpperPointSize/usUpperOpticalPointSize/.
5596
5597 * src/sfnt/ttload.c (tt_face_load_os2): Update, and set correct
5598 default values.
5599
Werner Lembergfae38202013-11-13 08:55:46 +010056002013-11-13 Werner Lemberg <wl@gnu.org>
5601
Werner Lembergc52b1292013-11-13 10:06:00 +01005602 * builds/unix/ft2unix.h: Remove. No longer necessary.
5603
5604 * builds/unix/install.mk (install): Updated.
5605
56062013-11-13 Werner Lemberg <wl@gnu.org>
5607
Werner Lembergfae38202013-11-13 08:55:46 +01005608 Simplify header file hierarchy.
5609
5610 This large patch changes the header file directory layout from
5611 `include/freetype/...' to `include/...', effectively removing one
5612 level. Since the file `ft2build.h' is also located in `include'
5613 (and it stays there even after installation), all FreeType header
5614 files are now in a single directory.
5615
5616 Applications that use (a) `freetype-config' or FreeType's
5617 `pkg-config' file to get the include directory for the compiler, and
5618 (b) the documented way for header inclusion like
5619
5620 #include <ft2build.h>
5621 #include FT_FREETYPE_H
5622 ...
5623
5624 don't need any change to the source code.
5625
5626 * include/freetype/*: Move up to...
5627 * include/*: ... this directory.
5628
5629 * builds/amiga/include/freetype/*: Move up to...
5630 * builds/amiga/include/*: ... this directory.
5631
5632 */*: Essentially do `s@/freetype/@/@' where appropriate.
5633
5634 * CMakeList.txt: Simplify.
5635 * builds/unix/freetype-config.in, builds/unix/freetype2.in: For
5636 `--cflags', return a single directory.
5637 * builds/unix/install.mk (install): No longer try to remove `cache'
5638 and `internal' subdirectories; instead, remove the `freetype'
5639 subdirectory.
5640
Werner Lembergea5c7812013-11-12 08:55:26 +010056412013-11-12 Werner Lemberg <wl@gnu.org>
5642
5643 [truetype] Fix last `truetype' commit.
5644
5645 * src/truetype/ttgload.c (tt_get_metrics): Preserve stream position.
5646 Return error value.
5647 (load_truetype_glyph): Updated.
5648
Werner Lemberg78333282013-11-10 06:26:52 +010056492013-11-10 Werner Lemberg <wl@gnu.org>
5650
5651 * docs/CMAKE: New dummy file.
5652
Dave Arnolddd213012013-11-08 10:52:51 +010056532013-11-08 Dave Arnold <darnold@adobe.com>
5654
5655 [cff] Fix for hints that touch.
5656
5657 * src/cff/cf2hints.c (cf2_hintmap_insertHint): Fix condition for
5658 finding index value of insertion point.
5659
Werner Lemberg7e4b0fb2013-11-06 07:14:49 +010056602013-11-06 Werner Lemberg <wl@gnu.org>
5661
Werner Lemberg5e225b72013-11-06 08:41:59 +01005662 [truetype] Fix handling of phantom points in composite glyphs.
5663 Problem reported by Nigel Tao <nigeltao@golang.org>.
5664
5665 This is a follow-up commit to the previous one.
5666
5667 * src/truetype/ttgload.c (load_truetype_glyph): Call
5668 `tt_get_metrics' after loading the glyph header.
5669
56702013-11-06 Werner Lemberg <wl@gnu.org>
5671
Werner Lemberg7e4b0fb2013-11-06 07:14:49 +01005672 [truetype] Improve emulation of vertical metrics.
5673
5674 This commit also improves the start values of vertical phantom
5675 points. Kudos to Greg Hitchcock for help.
5676
5677 * src/truetype/ttgload.c (TT_Get_VMetrics): Add parameter to pass
5678 `yMax' value. Replace code with fixed Microsoft definition.
5679 (tt_get_metrics): Updated.
5680 (TT_LOADER_SET_PP): Add explanation how to initialize phantom
5681 points, taken from both the OpenType specification and private
5682 communication with Greg (which will eventually be added to the
5683 standard).
5684 Fix horizontal position of `pp3' and `pp4'.
5685
5686 * src/truetype/ttgload.h: Updated.
5687
5688 * src/truetype/ttdriver.c (tt_get_advances): Updated.
5689
5690 * docs/CHANGES: Updated.
5691
Werner Lembergc6064282013-11-05 13:29:15 +010056922013-11-05 Werner Lemberg <wl@gnu.org>
5693
Werner Lemberg50740532013-11-05 23:19:18 +01005694 * builds/windows/vc2010/freetype.vcxproj: s/v110/v100/.
5695 PlatformToolSet version 110 is for VC2012.
5696
5697 Problem reported (with solution) by Dave Arnold <darnold@adobe.com>.
5698
56992013-11-05 Werner Lemberg <wl@gnu.org>
5700
Werner Lembergc6064282013-11-05 13:29:15 +01005701 [truetype] Correctly reset point tags for glyph components.
5702 Problem reported by Nigel Tao <nigeltao@golang.org>.
5703
5704 * src/truetype/ttgload.c (TT_Process_Composite_Glyph): Fix loop.
5705
Werner Lemberg35b08182013-11-02 08:28:41 +010057062013-11-02 Werner Lemberg <wl@gnu.org>
5707
Werner Lemberg7d449432013-11-02 11:36:37 +01005708 [truetype] Fix GETINFO opcode handling of subpixel hinting bits.
5709
5710 * src/truetype/ttinterp.c (Ins_GETINFO): Don't request bit 6 set to
5711 get info on subpixel hinting.
5712
5713 * docs/CHANGES: Updated.
5714
57152013-11-02 Werner Lemberg <wl@gnu.org>
5716
Werner Lemberg35b08182013-11-02 08:28:41 +01005717 Fix Savannah bug #40451.
5718
5719 Simply apply the patch from the bug report.
5720
5721 * builds/unix/ftconfig.in, builds/vms/ftconfig.h,
5722 include/freetype/config/ftconfig.h: The used #pragma directives only
5723 work with gcc versions 4.6 and higher.
5724
Werner Lembergebf52d62013-11-01 13:26:28 +010057252013-11-01 Werner Lemberg <wl@gnu.org>
5726
Werner Lembergafa0d592013-11-01 22:27:27 +01005727 * docs/CHANGES: Updated.
5728
57292013-11-01 Werner Lemberg <wl@gnu.org>
5730
Werner Lembergebf52d62013-11-01 13:26:28 +01005731 [truetype] Minor code refactoring.
5732
5733 Two benefits: The allocated FDEF (and IDEF) array gets slightly
5734 smaller, and the `ttdebug' demo program has access to function
5735 numbers without additional costs.
5736
5737 Fortunately, no changes to FontForge are necessary – this is the
5738 only external TrueType debugger I know of, but others may exist and
5739 should check the code accordingly.
5740
5741 * src/truetype/ttinterp.h (TT_CallRec): Replace `Cur_Restart' and
5742 `Cur_End' with a pointer to the corresponding `TT_DefRecord'
5743 structure.
5744
5745 * src/truetype/ttinterp.c (DO_JROT, DO_JMPR, DO_JROF, Ins_ENDF,
5746 Ins_CALL, Ins_LOOPCALL, Ins_UNKNOWN, TT_RunIns <Invalid_Opcode>):
5747 Updated.
5748
Werner Lembergee510512013-10-27 07:25:35 +010057492013-10-27 Werner Lemberg <wl@gnu.org>
5750
5751 [sfnt] Implement support for `OS/2' table version 5.
5752
5753 See
5754
5755 http://typedrawers.com/discussion/470/new-microsoft-size-specific-design-selection-mechanism
5756
5757 for the announcement.
5758
5759 * include/freetype/tttables.h (TT_OS2): Add fields
5760 `usLowerPointSize' and `usUpperPointSize'. Since FreeType returns
5761 this structure only as a pointer through `FT_Get_Sfnt_Table', there
5762 shouldn't be any ABI problems.
5763
5764 * src/sfnt/ttload.c (tt_face_load_os2): Implement it.
5765
5766 * docs/CHANGES: Updated.
5767
Werner Lemberg994a8592013-10-24 08:50:34 +020057682013-10-24 Werner Lemberg <wl@gnu.org>
5769
5770 * README.git, docs/CHANGES, docs/INSTALL: Updated.
5771
John Carya0e4a732013-10-24 08:49:08 +020057722013-10-24 John Cary <cary@txcorp.com>
5773
5774 Provide cmake support.
5775
5776 * CMakeLists.txt: New file.
5777
Kenneth Miller4d87ac82013-10-23 20:10:56 +020057782013-10-23 Kenneth Miller <kennethadammiller@yahoo.com>
5779 Werner Lemberg <wl@gnu.org>
5780
5781 Provide support for x64 builds in Visual C++ project files.
5782
5783 * src/builds/win32: Renamed to...
5784 * src/builds/windows: This.
5785
5786 * src/builds/windows/vc2010/*: Updated to handle x64 target.
5787
5788 * src/builds/windows/*.mk, docs/INSTALL.GNU: s/win32/windows/ where
5789 appropriate.
5790
Werner Lemberg604838d2013-10-22 01:10:10 +020057912013-10-22 Werner Lemberg <wl@gnu.org>
5792
5793 * src/base/md5.c, src/base/md5.h: Updated to recent version.
5794
5795 * src/base/ftobjs.c: Updated; `md5.c' no longer uses `free'.
5796
Werner Lembergdb9159c2013-10-22 10:27:50 +02005797 The canonical URL to get updates for this file is
5798
5799 http://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/popa3d/popa3d/md5/
5800
5801 as the author told me in private communication.
5802
Werner Lemberg34efe052013-10-19 21:14:40 +020058032013-10-19 Werner Lemberg <wl@gnu.org>
5804
Werner Lemberg75efc2d2013-10-19 21:46:03 +02005805 [autofit] s/SMALL_TOP/X_HEIGHT/.
5806
5807 * src/autofit/afblue.dat: Updated.
5808
5809 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
5810
5811 * src/autofit/aflatin.c, src/autofit/aflatin.h,
5812 src/autofit/atlatin2.c: Updated.
5813
58142013-10-19 Werner Lemberg <wl@gnu.org>
5815
Werner Lemberg34efe052013-10-19 21:14:40 +02005816 * src/autofit/afblue.dat: s/MINOR/DESCENDER/.
5817
5818 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
5819
Werner Lemberg955f6a82013-10-16 19:47:57 +020058202013-10-16 Werner Lemberg <wl@gnu.org>
5821
Werner Lemberga5f22a92013-10-17 11:08:25 +02005822 [autofit] Add description strings to script entries.
5823
5824 Currently, this is unused.
5825
5826 * src/autofit/afscript.h: Do it.
5827 * src/autofit/afglobal.c, src/autofit/afpic.c,
5828 src/autofit/aftypes.h: Updated.
5829
58302013-10-16 Werner Lemberg <wl@gnu.org>
5831
Werner Lemberg955f6a82013-10-16 19:47:57 +02005832 [autofit] Improve tracing message for extra light flag.
5833
5834 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Do it.
5835
Chongyu Zhu41632b52013-10-15 11:40:34 +020058362013-10-15 Chongyu Zhu <lembacon@gmail.com>
5837
5838 [arm] Fix thumb2 inline assembly under LLVM.
5839
5840 When using `ADD' with an immediate operand, the instruction is
5841 actually `ADD Rd, Rn, #<imm12>', that is, the maximum of the
5842 immediate operand cannot exceed 4095. It will fail to compile with
5843 LLVM.
5844
5845 However, in GCC, due to some legacy compatibility considerations,
5846 `ADD.W' will be automatically emitted when the immediate operand is
5847 larger than 4095.
5848
5849 * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h
5850 (FT_MulFix_arm) [__GNUC__]: Support clang compiler.
5851
5852 * src/truetype/ttinterp.c (TT_MulFix14_arm) [__GNUC__]: Ditto.
5853
Werner Lembergb6695242013-10-12 10:33:04 +020058542013-10-12 Werner Lemberg <wl@gnu.org>
5855
5856 [autofit] Improve tracing of `latin' hinter.
5857
5858 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Report blue
5859 zone types.
5860 (af_latin_metrics_scale_dim): Report scaling changes due to x height
5861 alignment.
5862 Report scaled stroke width and blue zone values.
5863
Dave Arnolde845a852013-10-03 23:04:29 +020058642013-10-03 Dave Arnold <darnold@adobe.com>
5865
5866 * src/cff/cf2font.c (cf2_computeDarkening): Avoid division by zero.
5867
Werner Lemberg2c56f2a2013-10-07 22:01:00 +02005868 Note that the old code avoided using a region of the piecewise
5869 linear function where the slope was zero. The recovery was to use a
5870 different section of the function, which produced a different,
5871 incorrect amount of darkening.
5872
Darrell Bellert01af71d2013-10-02 22:04:07 +020058732013-10-02 Darrell Bellert <darrell.bellert@hl.konicaminolta.us>
5874
5875 * src/sfnt/ttload.c (tt_face_load_pclt): Fix `pclt_fields'.
5876
Dave Arnold0b330452013-10-02 11:04:06 +020058772013-10-02 Dave Arnold <darnold@adobe.com>
5878
5879 * src/cff/cf2font.c (cf2_computeDarkening): Initialize darkenAmount.
5880
5881 This line was lost in commit 89ca1fd6 (from 2013-06-25). The effect
5882 is to use a previous darkening amount when producing an unhinted,
5883 unscaled outline. This can cause autohint samples in ftgrid and
5884 ftview to be based on darkened CFF outlines instead of unhinted,
5885 undarkened ones.
5886
Dave Arnold3a2cb0f2013-09-29 16:17:02 +020058872013-09-29 Dave Arnold <darnold@adobe.com>
5888
5889 Fix Savannah bug #39295.
5890
5891 The bug was caused by switching to the initial hintmap (the one in
5892 effect when `moveto' executes) just before drawing the final element
5893 in the charstring. This ensured that the path was closed (in both
5894 Character Space and Device Space). But if the final element was a
5895 curve and if the final hintmap was different enough from the initial
5896 one, then the curve was visibly distorted.
5897
5898 The first part of the fix is to draw the final curve using the final
5899 hintmap as specified by the charstring. This corrects the
5900 distortion but does not ensure closing in Device Space. It may
5901 require the rasterizer to automatically generate an extra closing
5902 line. Depending on the hintmap differences, this line could be from
5903 zero to a couple pixels in length.
5904
5905 The second part of the fix covers the case where the charstring
5906 subpath is closed with an explicit line. We now modify that line's
5907 end point to avoid the distortion.
5908
5909 Some glyphs in the bug report font (TexGyreHeros-Regular) that show
5910 the change are:
5911
5912 25ppem S (98)
5913 24ppem eight (52)
5914 25.5ppem p (85)
5915
5916 Curves at the *end* of a subpath are no longer distorted. However,
5917 some of these glyphs have bad hint substitutions in the middle of a
5918 subpath, and these are not affected.
5919
5920 The patch has been tested with a set of 106 fonts that shipped with
5921 Adobe Creative Suite 4, together with 756 Open Source CFF fonts from
5922 Google Fonts. There are 1.5 million glyphs, of which some 20k are
5923 changed with the fix. A sampling of a few hundred of these changes
5924 have been examined more closely, and the changes look good (or at
5925 least acceptable).
5926
5927 * src/cff/cf2hints.h (CF2_GlyphPathRec): New element `pathIsClosing'
5928 to indicate that we synthesize a closepath line.
5929
5930 * src/cff/cf2hints.c (cf2_glyphpath_init): Updated.
5931 (cf2_glyphpath_pushPrevElem): If closing, use first hint map (for
5932 `lineto' operator) and adjust hint zone.
5933 For synthesized closing lines, use end point in first hint zone.
5934 (cf2_glyphpath_lineTo): Take care of synthesized closing lines. In
5935 particular, shift the detection of zero-length lines from character
5936 space to device space.
5937 (cf2_glyphpath_closeOpenPath): Remove assertion.
5938 Updated.
5939
Werner Lembergb75a8b82013-09-25 09:46:36 +020059402013-09-25 Werner Lemberg <wl@gnu.org>
5941
5942 * src/autofit/aflatin.c (af_{grek,cyrl}_uniranges): Fix arrays.
5943
suzuki toshiyaac0f4452013-09-25 10:57:17 +090059442013-09-25 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5945
5946 [bdf, pcf] Refuse non-zero face_index.
Werner Lemberg964317e2013-09-25 09:22:40 +02005947
suzuki toshiyaac0f4452013-09-25 10:57:17 +09005948 Suggested by Akira Tagoh, see
5949
5950 http://lists.gnu.org/archive/html/freetype/2013-09/msg00030.html
5951
Werner Lemberg964317e2013-09-25 09:22:40 +02005952 * src/bdf/bdfdrivr.c (BDF_Face_Init): Return `Invalid_Argument'
5953 error if the font could be opened but non-zero `face_index' is
5954 given.
suzuki toshiyaac0f4452013-09-25 10:57:17 +09005955 * src/pcf/pcfdrivr.c (PCF_Face_Init): Ditto.
5956
5957 * src/type42/t42objs.c (T42_Face_Init): Remove unrequired FT_UNUSED
Werner Lemberg964317e2013-09-25 09:22:40 +02005958 macro for `face_index' because it is validated later.
suzuki toshiyaac0f4452013-09-25 10:57:17 +09005959
Werner Lemberg4de77872013-09-23 22:10:08 +020059602013-09-23 Werner Lemberg <wl@gnu.org>
5961
5962 Fix Savannah bug #40090.
5963
5964 * src/autofit/afcjk.c (af_cjk_metrics_scale): Revert commit
5965 306f8c5d (from 2013-08-25) affecting this function.
5966
Werner Lemberg5a4c5a52013-09-22 22:37:26 +020059672013-09-22 Werner Lemberg <wl@gnu.org>
5968
5969 [autofit] Disunify Cyrillic and Greek handling from Latin.
5970
5971 * src/autofit/afscript.h: Add Cyrillic and Greek.
5972
5973 * src/autofit/afblue.dat (AF_BLUE_STRINGSET_GREK,
5974 AF_BLUE_STRINGSET_CYRL): Add blue zones for Greek and Cyrillic.
5975 (AF_BLUE_STRINGSET_LATN): Fix typo.
5976 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
5977
5978 * src/autofit/aflatin.c (af_grek_uniranges, af_cyrl_uniranges): New
5979 arrays.
5980 (af_grek_script_class, af_cyrl_script_class): New scripts.
5981 * src/autofit/aflatin.h: Updated.
5982
Werner Lemberg2cca9662013-09-20 07:23:34 +020059832013-09-20 Werner Lemberg <wl@gnu.org>
5984
5985 * docs/CHANGES: Updated.
5986
Behdad Esfahbod31e726d2013-09-20 07:20:53 +020059872013-09-20 Behdad Esfahbod <behdad@behdad.org>
5988
5989 Fix vertical size of emboldened glyphs.
5990
5991 Cf. https://bugzilla.gnome.org/show_bug.cgi?id=686709
5992
5993 * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Adjust `horiBearingY'
5994 also.
5995
Alexei Podtelezhnikov52381c12013-09-11 23:25:56 -040059962013-09-11 Alexei Podtelezhnikov <apodtele@gmail.com>
5997
5998 * include/freetype/ftoutln.h: Correct FT_Outline_Get_Orientation
5999 algorithm description.
6000
Werner Lemberg3f542492013-09-11 23:08:31 +020060012013-09-11 Werner Lemberg <wl@gnu.org>
6002
6003 [autofit] Improve Hebrew rendering.
6004
6005 This change introduces a new blue zone property
6006 `AF_BLUE_PROPERTY_LATIN_LONG' to make the auto-hinter ignore short
6007 top segments.
6008
6009 * src/autofit/afblue.dat: Fix Hebrew blue strings.
6010 Use AF_BLUE_PROPERTY_LATIN_LONG for AF_BLUE_STRING_HEBREW_TOP.
6011
6012 * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_LONG): New macro.
6013
6014 * src/autofit/afblue.c, src/autofit/afblue.h: Updated.
6015
6016 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Handle
6017 `AF_LATIN_IS_LONG_BLUE'.
6018
6019 * src/autofit/aflatin.h (AF_LATIN_IS_LONG_BLUE): New macro.
6020
Werner Lemberg85a7fdf2013-08-29 21:03:05 +020060212013-08-28 Behdad Esfahbod <behdad@google.com>
6022
6023 [sfnt] Fix frame access while reading WOFF table directory.
6024
6025 * src/sfnt/sfobjs.c (woff_open_font): Using single memory frame
6026 while reading the directory entries for the whole loop.
6027
60282013-08-29 Werner Lemberg <wl@gnu.org>
Werner Lembergd689d1c2013-08-29 17:53:40 +02006029 Behdad Esfahbod <behdad@google.com>
6030
6031 Implement support for WOFF containers.
6032
6033 We simply synthesize a SFNT from the WOFF, create a memory stream
6034 for the new data, and load the SFNT as usual.
6035
6036 Does NOT add any API to access WOFF metadata or private blocks.
6037
6038 * include/freetype/internal/tttypes.h (WOFF_HeaderRec,
6039 WOFF_TableRec): New structures.
6040
6041 * include/freetype/tttags.h (TTAG_wOFF): New macro.
6042
6043 * src/base/ftobjs.c (FT_Open_Face): Set `stream' after calling
6044 `open_face'.
6045
6046 * src/sfnt/sfobjs.c [FT_CONFIG_OPTION_SYSTEM_ZLIB]: Include
6047 `FT_GZIP_H'.
6048 (WRITE_BYTE, WRITE_USHORT, WRITE_ULONG): New temporary macros for
6049 writing to a stream.
6050 (sfnt_stream_close, compare_offsets, woff_open_font): New functions.
6051 (sfnt_open_font): Handle `TTAG_wOFF'.
6052 (sfnt_init_face): Set `stream' after calling `sfnt_open_font'.
6053
6054 * src/truetype/ttobjs.c (tt_face_init): Set `stream' after calling
6055 `sfnt->init_face'.
6056
6057 * src/base/ftobjs.c (open_face): Use a pointer to FT_Stream as an
6058 argument so that a changed stream survives.
6059 Update callers.
6060
60612013-08-28 Werner Lemberg <wl@gnu.org>
Werner Lemberge0f39ae2013-08-28 17:34:01 +02006062
Werner Lembergdc240522013-08-29 17:53:24 +02006063 [gzip] New function `FT_Gzip_Uncompress'.
6064
6065 This is modeled after zlib's `uncompress' function. We need this
6066 for WOFF support.
6067
6068 * include/freetype/ftgzip.h, src/gzip/ftgzip.c (FT_Gzip_Uncompress):
6069 New function.
6070
6071 * src/gzip/rules.mk: Rewrite to better reflect dependencies.
6072
60732013-08-28 Werner Lemberg <wl@gnu.org>
6074
Werner Lemberg5195ecd2013-08-28 17:41:21 +02006075 [autofit] Fix `make multi' compilation.
6076
6077 * src/autofit/afblue.cin, src/autofit/afblue.c: Don't include
6078 `afblue.h' but `aftypes.h'.
6079 * src/autofit/afcjk.c: Don't include `aftypes.h' but `afglobal.h'.
6080
60812013-08-28 Werner Lemberg <wl@gnu.org>
6082
Werner Lemberge0f39ae2013-08-28 17:34:01 +02006083 [autofit] Fix C++ compilation.
6084
6085 * src/autofit/afglobal.c (af_face_globals_get_metrics),
6086 src/autofit/afdummy.c (af_dflt_script_class), src/autofit/afindic.c
6087 (af_deva_script_class): Use proper casts.
6088
Behdad Esfahbodbd3849e2013-08-27 21:43:38 +020060892013-08-27 Behdad Esfahbod <behdad@google.com>
6090
Behdad Esfahbodc799dd62013-08-27 21:46:03 +02006091 * src/sfnt/ttload.c (tt_face_load_font_dir): Fix sign typos.
6092
60932013-08-27 Behdad Esfahbod <behdad@google.com>
6094
Behdad Esfahbodbd3849e2013-08-27 21:43:38 +02006095 FT_Open_Face: Improve external stream handling.
6096
6097 If the font's `clazz->init_face' function wants to swap to new
6098 stream, handling of whether original stream was external could
6099 result to either memory leak or double free. Mark externality into
6100 face flags before calling `init_face' such that the clazz can handle
6101 external streams properly.
6102
6103 * src/base/ftobjs.c (FT_Open_Face): Move code to set
6104 FT_FACE_FLAG_EXTERNAL_STREAM to...
6105 (open_face): This function.
6106
Werner Lemberg5e53db22013-08-27 18:37:39 +020061072013-08-27 Werner Lemberg <wl@gnu.org>
6108
Werner Lembergbcd8c0b2013-08-27 21:36:03 +02006109 Remove `FT_SqrtFixed' function.
6110
6111 It's no longer used.
6112
6113 * include/freetype/internal/ftcalc.h, src/base/ftcalc.c: Do it.
6114
61152013-08-27 Werner Lemberg <wl@gnu.org>
6116
Werner Lemberg5e53db22013-08-27 18:37:39 +02006117 [autofit] While tracing, report script names instead of ID values.
6118
6119 * src/autofit/afglobal.c (af_script_names) [FT_DEBUG_LEVEL_TRACE]:
6120 New array.
6121 * src/autofit/afglobal.h: Updated.
6122
6123 * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
6124 af_cjk_hint_edges): Use `af_script_names'.
6125 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
6126 af_latin_hint_edges): Ditto.
6127
Werner Lemberg92f5a042013-08-26 09:22:27 +020061282013-08-26 Werner Lemberg <wl@gnu.org>
6129
Werner Lemberg278f64b2013-08-26 20:20:03 +02006130 [autofit] Report used script while hinting a glyph.
6131
6132 * src/autofit/afcjk.c (af_cjk_hint_edges), src/autofit/aflatin.c
6133 (af_latin_hint_edges): Implement it.
6134
61352013-08-26 Werner Lemberg <wl@gnu.org>
6136
Werner Lemberg371f5c32013-08-26 20:11:24 +02006137 [autofit] Add support for Hebrew script.
6138
6139 * src/autofit/afblue.dat: Add blue strings for Hebrew.
6140 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
6141
6142 * src/autofit/aflatin.c (af_hebr_uniranges): New array.
6143 (af_hebr_script_class): New script.
6144 * src/autofit/aflatin.h, src/autofit/afscript.h: Updated.
6145
61462013-08-26 Werner Lemberg <wl@gnu.org>
6147
Werner Lemberg098121d2013-08-26 18:54:05 +02006148 [autofit] Improve tracing messages.
6149
6150 * src/autofit/afcjk.c (af_cjk_metrics_init_widths): Mention script
6151 ID in tracing message.
6152 (af_cjk_metrics_init_blues): Initialize `axis' outside of the inner
6153 loop.
6154 Improve tracing messages.
6155 (af_cjk_hint_edges) [FT_DEBUG_LEVEL_TRACE]: New variable
6156 `num_actions' to count hinting actions.
6157 Improve tracing messages.
6158
6159 * src/autofit/aflatin.c (af_latin_metrics_init_widths): Mention
6160 script ID in tracing message.
6161 (af_latin_metrics_init_blues, af_latin_hint_edges): Improve tracing
6162 messages.
6163
61642013-08-26 Werner Lemberg <wl@gnu.org>
6165
Werner Lembergffee64a2013-08-26 12:55:48 +02006166 Better tracing of loaded glyphs.
6167
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02006168 Previously, the loading of a glyph was traced at level 4, if at all.
Werner Lembergffee64a2013-08-26 12:55:48 +02006169 With this change, all font loading routines emit a tracing message
6170 at level 1, making it easier to select tracing output (for example
6171 using F2_DEBUG="any:1 afhints:7 aflatin:7").
6172
6173 * src/bdf/bdfdrivr.c (BDF_Glyph_Load): Add tracing message.
6174 * src/cff/cffdrivr.c (cff_glyph_load): Ditto.
6175 * src/cff/cffgload.c (cff_decoder_prepare): Improve tracing
6176 messages.
6177 * src/cid/cidgload.c (cid_load_glyph): Use level 1 for tracing
6178 message.
6179 * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Ditto.
6180 * src/pfr/pfrobjs.c (pfr_slot_load): Add tracing message.
6181 * src/truetype/ttgload.c (TT_Load_Glyph): Ditto.
6182 * src/type1/t1gload.c (T1_Load_Glyph): Ditto.
6183 * src/type42/t42objs.c (T42_GlyphSlot_Load): Ditto.
6184 * src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto.
6185
61862013-08-26 Werner Lemberg <wl@gnu.org>
6187
Werner Lemberg33655a92013-08-26 09:58:50 +02006188 [autofit] Fix script selection.
6189
6190 * src/autofit/afglobal.c (af_face_globals_get_metrics): Use
6191 `AF_SCRIPT_DFLT', not value 0.
6192 Simplify code.
6193
6194 * src/autofit/afscript.h: Sort by script name.
6195
61962013-08-26 Werner Lemberg <wl@gnu.org>
6197
Werner Lemberg92f5a042013-08-26 09:22:27 +02006198 [autofit] Make `dummy' hinter work as expected.
6199
6200 * src/autofit/afdummy.c (af_dummy_hints_init): Properly set scaling
6201 information.
6202 (af_dummy_hints_apply): Scale the glyphs.
6203
Werner Lemberg8b8be782013-08-25 08:01:41 +020062042013-08-25 Werner Lemberg <wl@gnu.org>
6205
Werner Lembergc1eb4452013-08-25 19:47:26 +02006206 [autofit] Make `cjk' module use blue stringsets.
6207
6208 * src/autofit/afcjk.c (AF_CJK_MAX_TEST_CHARACTERS): Removed.
6209 (af_cjk_hani_blue_chars): Removed.
6210 (AF_CJK_BLUE_TYPE_*): Removed.
6211 (af_cjk_metrics_init_blues): Replace AF_CJK_MAX_TEST_CHARACTERS with
6212 AF_BLUE_STRING_MAX_LEN.
6213 Change loops to use offsets (in file `afblue.h') into the new arrays
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02006214 `af_blue_stringsets' and `af_blue_strings' (in file `afblue.c').
Werner Lembergc1eb4452013-08-25 19:47:26 +02006215 Instead of three dimensions (as used in the old blue string array)
6216 we now use properties to do the same, saving one loop nesting level.
6217
6218 * src/autofit/afcjk.h: Remove old enumeration values superseded by
6219 the new data in `afblue.h'.
6220 (AF_CJK_IS_TOP_BLUE, AF_CJK_IS_HORIZ_BLUE, AF_CJK_IS_FILLED_BLUE,
6221 AF_CJK_IS_RIGHT_BLUE): New macros, to be used in
6222 `af_cjk_metrics_init_blues'.
6223 (AF_CJK_BLUE_IS_RIGHT): Remove this now redundant enum value.
6224 (AF_CJK_BLUE_IS_TOP): Renamed to...
6225 (AF_CJK_BLUE_TOP): This.
6226 (AF_CJK_MAX_BLUES): Remove.
6227 (AF_CJKAxisRec): Updated.
6228
62292013-08-25 Werner Lemberg <wl@gnu.org>
6230
Werner Lemberg5c4a23a2013-08-25 19:29:07 +02006231 [autofit] Typo.
6232
6233 * src/autofit/afblue.hin, src/autofit/afblue.c (GET_UTF8_CHAR): Use
6234 cast.
6235
62362013-08-25 Werner Lemberg <wl@gnu.org>
6237
Werner Lemberg306f8c52013-08-25 13:07:08 +02006238 [autofit] Synchronize `cjk' with `latin' module (and vice versa).
6239
6240 * src/autofit/afcjk.c (af_cjk_metrics_init_widths): Add tracing
6241 messages.
6242 (af_cjk_metrics_init_blues): Don't pass blue string array as
6243 argument but use the global array directly.
6244 Use `outline' directly.
6245 Update and add tracing messages.
6246 (af_cjk_metrics_init): Simplify code.
6247 (af_cjk_metrics_scale_dim): Improve tracing message.
6248 (af_cjk_metrics_scale): Synchronize.
6249
6250 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
6251 af_latin_metrics_init_blues): Improve and add tracing messages.
6252
62532013-08-25 Werner Lemberg <wl@gnu.org>
6254
Werner Lemberg0975d682013-08-25 08:37:47 +02006255 [autofit] Make `latin' module use blue stringsets.
6256
6257 * src/autofit/aflatin.c (AF_LATIN_MAX_TEST_CHARACTERS): Removed.
6258 (af_latin_blue_chars): Removed.
6259 (af_latin_metrics_init_blues): Replace AF_LATIN_MAX_TEST_CHARACTERS
6260 with AF_BLUE_STRING_MAX_LEN.
6261 Change loops to use offsets (in file `afblue.h') into the new arrays
6262 `af_blue_stringsets' and `af_blue_strings' (in file `afblue.c').
6263 Use `AF_LATIN_IS_SMALL_TOP_BLUE' macro.
6264
6265 * src/autofit/aflatin.h: Remove old enumeration values superseded by
6266 the new data in `afblue.h'.
6267 (AF_LATIN_IS_TOP_BLUE): Updated definition.
6268 (AF_LATIN_IS_SMALL_TOP_BLUE): New macro.
6269 (AF_LATIN_MAX_BLUES): Remove.
6270 (AF_LatinAxisRec): Updated.
6271
62722013-08-25 Werner Lemberg <wl@gnu.org>
6273
Werner Lembergdb3e5b92013-08-25 08:23:22 +02006274 [autofit] Add blue stringsets.
6275
6276 * src/autofit/aftypes.h: Include `afblue.h'.
6277 (AF_ScriptClassRec): Add `blue_stringset' field.
6278 (AF_DEFINE_SCRIPT_CLASS): Updated.
6279
6280 * src/autofit/autofit.c: Include `afblue.c'.
6281
6282 * src/autofit/afcjk.c (af_hani_script_class), src/autofit/afdummy.c
6283 (af_dflt_script_class), src/autofit/afindic.c
6284 (af_deva_script_class), src/autofit/aflatin.c
6285 (af_latn_script_class), src/autofit/aflatin2.c
6286 (af_ltn2_script_class): Updated.
6287
6288 * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `afblue.c'.
6289
62902013-08-25 Werner Lemberg <wl@gnu.org>
6291
Werner Lemberg8b8be782013-08-25 08:01:41 +02006292 [autofit] Introduce data file for blue strings.
6293
6294 The idea is to have a central file which gets processed by a Perl
6295 script to create proper `.c' and `.h' files using templates. There
6296 are two other reasons to do that:
6297
6298 . The data file should be easily readable. We use UTF-8 encoding
6299 which then gets converted to single bytes.
6300
6301 . Since the number of supported scripts will increase soon, the
6302 current usage of blue string arrays is a waste of space. Using
6303 the Perl script it is possible to imitate jagged arrays,
6304 defining enumeration constants as offsets into the arrays.
6305
6306 This commit only adds files without changing any functionality.
6307
6308 * src/autofit/afblue.dat: New data file.
6309 * src/tools/afblue.pl: New Perl script for processing `afblue.dat'.
6310
6311 * src/autofit/afblue.cin, src/autofit/afblue.hin: New template files
6312 for...
6313 * src/autofit/afblue.c, src/autofit/afblue.c: New source files.
6314 To avoid a dependency on Perl, we add them too.
6315
Alexei Podtelezhnikovfc32e1c2013-08-19 22:57:05 -040063162013-08-19 Alexei Podtelezhnikov <apodtele@gmail.com>
6317
Werner Lemberg71c0ad62013-08-27 21:30:09 +02006318 [base] Enable new algorithm for `BBox_Cubic_Check'.
Alexei Podtelezhnikovfc32e1c2013-08-19 22:57:05 -04006319
Werner Lemberg71c0ad62013-08-27 21:30:09 +02006320 * src/base/ftbbox.c: Enable new BBox_Cubic_Check algorithm, remove
6321 the old one.
6322 Improve comments.
Alexei Podtelezhnikovfc32e1c2013-08-19 22:57:05 -04006323
Werner Lemberg6bfa2632013-08-18 18:34:05 +020063242013-08-18 Werner Lemberg <wl@gnu.org>
6325
Werner Lemberg4af44442013-08-18 18:46:30 +02006326 * builds/unix/unix-def.in (freetype2.pc): Don't set executable bit.
6327
63282013-08-18 Werner Lemberg <wl@gnu.org>
6329
Werner Lemberg6bfa2632013-08-18 18:34:05 +02006330 Fix Savannah bug #39804.
6331
6332 * builds/unix/configure.raw (LIBPNG): Define and export.
6333 * builds/unix/freetype-config.in, builds/unix/freetype2.in: Handle
6334 libpng.
6335
Alexei Podtelezhnikov32a7d872013-08-17 22:19:21 -040063362013-08-17 Alexei Podtelezhnikov <apodtele@gmail.com>
6337
6338 [base] Clean up BBox_Conic_Check.
6339
6340 * src/base/ftbbox.c (BBox_Conic_Check): Remove redundant checks for
6341 extremum at the segment ends, which are already within the bbox.
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02006342 Slightly modify calculations.
Alexei Podtelezhnikov32a7d872013-08-17 22:19:21 -04006343
Alexei Podtelezhnikov1a9c3d12013-08-15 22:51:42 -040063442013-08-15 Alexei Podtelezhnikov <apodtele@gmail.com>
6345
6346 [base] Finish experimental (disabled) BBox_Cubic_Check implementation.
6347
6348 * src/base/ftbbox.c (BBox_Cubic_Check): Scale arguments to improve
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02006349 accuracy and avoid overflows.
Alexei Podtelezhnikov1a9c3d12013-08-15 22:51:42 -04006350
Alexei Podtelezhnikov61a65512013-08-13 22:28:57 -040063512013-08-13 Alexei Podtelezhnikov <apodtele@gmail.com>
6352
6353 [base] Refactor experimental (disabled) BBox_Cubic_Check.
6354
6355 * src/base/ftbbox.c (BBox_Cubic_Check): Implement the minimum search
Alexei Podtelezhnikov1a9c3d12013-08-15 22:51:42 -04006356 as the mirror image of the maximum search implemented here...
6357 (update_max): New function.
Alexei Podtelezhnikov61a65512013-08-13 22:28:57 -04006358
John Tytgat9bcfab82013-08-06 08:55:19 +020063592013-08-06 John Tytgat <John.Tytgat@esko.com>
6360
6361 Fix Savannah bug #39702.
6362
6363 * src/cff/cffload.c (cff_index_get_pointers): Check for `cur_offset
6364 != 0'; this stronger test is mandated by the CFF specification.
6365 Fix test for INDEX structures which have one or more empty entries
6366 at the end.
6367
Werner Lembergcc25e3a2013-08-05 08:46:15 +020063682013-08-05 Werner Lemberg <wl@gnu.org>
6369
Werner Lemberga32682f2013-08-06 00:21:46 +02006370 Fix gcc pragmas, part 2.
6371
6372 * src/truetype/ttinterp.c (TT_MulFix14_long_long,
6373 TT_DotFix14_long_long): `#pragma gcc diagnostic {push,pop}' has been
6374 introduced with gcc version 4.6.
6375
63762013-08-05 Werner Lemberg <wl@gnu.org>
6377
Werner Lemberg69e524d2013-08-05 23:38:32 +02006378 Fix gcc pragmas.
6379
6380 * src/truetype/ttinterp.c (TT_MulFix14_long_long,
6381 TT_DotFix14_long_long): Older gcc versions don't accept diagnostic
6382 pragmas within a function body.
6383
63842013-08-05 Werner Lemberg <wl@gnu.org>
6385
Werner Lemberg9e6de362013-08-05 16:37:21 +02006386 Fix Savannah bug #39700.
6387
6388 * builds/unix/ftconfig.h: Synchronize with
6389 `include/freetype/config/ftconfig.h'.
6390
6391 * builds/vms/ftconfig.h: Ditto.
6392 Make the differences to the master `ftconfig.h' file as small as
6393 possible for easier maintainance.
6394
63952013-08-05 Werner Lemberg <wl@gnu.org>
6396
Werner Lembergcc25e3a2013-08-05 08:46:15 +02006397 [autofit] Improve handling of `near' points.
6398
6399 Points which are very near to each other are now marked as such.
6400 The `weak' flag is then computed by using the `in' vector of the
6401 first and the `out' vector of the last point of a group of near
6402 points.
6403
6404 For example, this fixes the rendering of glyph `Oslash' in
6405 `Roboto-Thin.ttf'.
6406
6407 * src/autofit/afhints.h (AF_Flags): New value `AF_FLAGS_NEAR'.
6408
6409 * src/autofit/afhints.c (af_glyph_hints_reload): Introduce
6410 the heuristic value `near_limit' to decide whether the current point
6411 is near to the previous one, then set `AF_FLAG_NEAR' accordingly.
6412 Store good `in' vector (of last non-near point) in
6413 `last_good_in_{x,y}' and use it as an argument to
6414 `ft_corner_is_flat' if necessary.
6415
Werner Lemberg74a9b672013-08-02 14:53:32 +020064162013-08-02 Werner Lemberg <wl@gnu.org>
6417
Werner Lemberg0d28a7d2013-08-02 22:59:43 +02006418 * include/freetype/ftcffdrv.h: Improve documentation.
6419 This is based on blog entries from David Lemon and Dave Arnold (both
6420 from Adobe) with kind permission. Dave also helped in
6421 proof-reading.
6422
64232013-08-02 Werner Lemberg <wl@gnu.org>
6424
Werner Lemberg456cc442013-08-02 20:25:21 +02006425 [autofit] Move declaration of scripts into separate file.
6426
6427 This has the benefit that we don't need to duplicate the data at
6428 different places.
6429
6430 * src/autofit/afscript.h: New file.
6431
6432 * src/autofit/aftypes.h (AF_Script): Include `afscript.h' to define
6433 the enumeration values.
6434
6435 * src/autofit/afglobal.c: Include `afscript.h' to get the script
6436 specific header files.
6437 (af_script_classes): Include `afscript.h' to fill this array.
6438
6439 * src/autofit/afpic.c: Include `afscript.h' to get the script
6440 specific header files.
6441 (autofit_module_class_pic_init): Include `afscript.h' for
6442 initialization.
6443 * src/autofit/afpic.h (AF_SCRIPT_CLASSES_COUNT,
6444 AF_SCRIPT_CLASSES_REC_COUNT): Removed. Use `AF_SCRIPT_MAX' instead.
6445
6446 * src/autofit/rules.mk (AUTOF_DRV_H): Updated.
6447
64482013-08-02 Werner Lemberg <wl@gnu.org>
6449
Werner Lemberg773601d2013-08-02 19:51:17 +02006450 [autofit] Move declaration of writing systems into separate file.
6451
6452 This has the benefit that we don't need to duplicate the data at
6453 different places.
6454
6455 * src/autofit/afwrtsys.h: New file.
6456
6457 * src/autofit/aftypes.h (AF_WritingSystem): Include `afwrtsys.h' to
6458 define the enumeration values.
6459
6460 * src/autofit/afglobal.c: Include `afwrtsys.h' to get the writing
6461 system specific header files.
6462 Include `afpic.h'.
6463 (af_writing_system_classes): Include `afwrtsys.h' to fill this
6464 array.
6465
6466 * src/autofit/afpic.c: Include `afwrtsys.h' to get the writing
6467 system specific header files.
6468 (autofit_module_class_pic_init): Include `afwrtsys.h' for
6469 initialization.
6470 * src/autofit/afpic.h (AF_WRITING_SYSTEM_CLASSES_COUNT,
6471 AF_WRITING_SYSTEM_CLASSES_REC_COUNT): Removed. Use
6472 `AF_WRITING_SYSTEM_MAX' instead.
6473
64742013-08-02 Werner Lemberg <wl@gnu.org>
6475
Werner Lemberg74a9b672013-08-02 14:53:32 +02006476 [sfnt] Fix compilation with g++.
6477
6478 * src/sfnt/pngshim.c (error_callback, read_data_from_FT_stream): Use
6479 cast.
6480 (Load_SBit_Png): Pacify compiler.
6481
Werner Lemberg89a529f2013-08-02 14:50:23 +020064822013-08-02 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6483 Werner Lemberg <wl@gnu.org>
6484
6485 [autofit] Fix `make multi'.
6486
6487 * include/freetype/config/ftconfig.h (FT_LOCAL_ARRAY,
6488 FT_LOCAL_ARRAY_DEF): New macros.
6489
6490 * src/autofit/afglobal.c (af_writing_system_classes,
6491 af_script_classes): Use FT_LOCAL_ARRAY_DEF.
6492 * src/autofit/afglobal.h: Declare `af_writing_system_classes' and
6493 `af_script_classes'.
6494 * src/autofit/afloader.c: Include `afpic.h'.
6495
Werner Lemberge8ed2d62013-08-01 12:20:20 +020064962013-08-01 Werner Lemberg <wl@gnu.org>
6497
6498 Another round of cppcheck nitpicks.
6499
6500 The call was (from the top-level of the FreeType tree):
6501
6502 cppcheck --force \
6503 --enable=all \
6504 -I /usr/include \
6505 -I /usr/local/include \
6506 -I /usr/lib/gcc/i586-suse-linux/4.7/include \
6507 -I include \
6508 -I include/freetype \
6509 -I include/freetype/config \
6510 -I include/freetype/internal \
6511 -DFT2_BUILD_LIBRARY \
6512 . &> cppcheck.log
6513
6514 using cppcheck git commit f7e93f99.
6515
6516 Note that cppcheck still can't handle `#include FOO' (with `FOO' a
6517 macro).
6518
6519 */* Improve variable scopes.
6520 */* Remove redundant initializations which get overwritten.
6521
6522 * src/gxvalid/*: Comment out redundant code or guard it with
6523 FT_DEBUG_LEVEL_TRACE.
6524
Werner Lemberg5d6a3602013-07-30 23:17:04 +020065252013-07-30 Werner Lemberg <wl@gnu.org>
6526
Werner Lemberg72f5ff52013-07-31 22:49:29 +02006527 [autofit] Introduce `writing systems'.
6528
6529 This patch adds a new top level to the auto-hinter's script class
6530 hierarchy. It defines `writing systems' which can contain multiple
6531 scripts.
6532
6533 For example, the `latin' writing system (in file `aflatin.c') is
6534 able to support scripts like Latin, Cyrillic, Armenian, etc., which
6535 can be handled similarly.
6536
6537 Scripts are now named using four-letter OpenType tags.
6538
6539 * src/autofit/aftypes.h (AF_ScriptClassRec): Move relevant members
6540 to...
6541 (AF_WritingSystemClassRec): This new structure. It holds pointers
6542 to functions which can be shared among related scripts.
6543 (AF_WritingSystem): New enumeration.
6544 (AF_Script): Revised values using four-letter tags.
6545 (AF_DEFINE_WRITING_SYSTEM_CLASS): New macro.
6546 (AF_DEFINE_SCRIPT_CLASS): Updated.
6547
6548 * src/autofit/afglobal.c (af_writing_system_classes): New global,
6549 constant array.
6550 (af_script_classes): Updated.
6551 (af_face_globals_free): Updated.
6552 Remove assertion.
6553 (af_face_globals_get_metrics): Updated.
6554
6555 * src/autofit/afglobal.h (AF_SCRIPT_FALLBACK)
6556 [!AF_CONFIG_OPTION_CJK]: Handle this case.
6557
6558 * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph):
6559 Updated.
6560
6561 * src/autofit/afpic.c (autofit_module_class_pic_init): Updated;
6562 initialize structures for both writing systems and scripts.
6563 * src/autofit/afpic.h: Updated.
6564 (AF_WRITING_SYSTEM_CLASSES_GET): New macro.
6565
6566 * src/autofit/afcjk.c (af_cjk_writing_system_class): New writing
6567 system.
6568 (af_cjk_uniranges): Renamed to...
6569 (af_hani_uniranges): This.
6570 (af_cjk_script_class): Reduced and renamed to...
6571 (af_hani_script_class): This.
6572 * src/autofit/afcjk.h: Updated.
6573
6574 * src/autofit/afdummy.c (af_dummy_writing_system_class): New writing
6575 system.
6576 (af_dummy_script_class): Reduced and renamed to...
6577 (af_dflt_script_class): This.
6578 * src/autofit/afdummy.h: Updated.
6579
6580 * src/autofit/afindic.c (af_indic_writing_system_class): New writing
6581 system.
6582 (af_indic_uniranges): Renamed to...
6583 (af_deva_uniranges): This.
6584 (af_indic_script_class): Reduced and renamed to...
6585 (af_deva_script_class): This.
6586 * src/autofit/afcjk.h: Updated.
6587
6588 * src/autofit/aflatin.c (af_latin_writing_system_class): New writing
6589 system.
6590 (af_latin_uniranges): Renamed to...
6591 (af_latn_uniranges): This.
6592 (af_latin_script_class): Reduced and renamed to...
6593 (af_latn_script_class): This.
6594 * src/autofit/aflatin.h: Updated.
6595
6596 * src/autofit/aflatin2.c (af_latin2_writing_system_class): New
6597 writing system.
6598 (af_latin2_uniranges): Renamed to...
6599 (af_ltn2_uniranges): This.
6600 Synchronize ranges with `latin'.
6601 (af_latin2_script_class): Reduced and renamed to...
6602 (af_ltn2_script_class): This.
6603 * src/autofit/aflatin2.h: Updated.
6604
66052013-07-30 Werner Lemberg <wl@gnu.org>
6606
Werner Lemberg5d6a3602013-07-30 23:17:04 +02006607 [autofit] Variable renaming.
6608
6609 * src/autofit/aftypes.h (AF_ScriptMetricsRec):
6610 s/clazz/script_class/.
6611 Update all users.
6612
suzuki toshiya2b29ed62013-07-30 13:55:29 +090066132013-07-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6614
6615 Ignore libpng-config under cross-building configuration,
6616 because it will return the flags for the hosting environment.
6617
6618 * builds/unix/configure.raw: Ignore libpng-config when
6619 `cross_compiling' == yes.
6620
suzuki toshiyaf2e7f1e2013-07-30 13:32:57 +090066212013-07-30 Behdad Esfahbod <behdad@google.com>
6622
6623 Prevent division by zero by a transparent color.
6624
6625 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra):
6626 Return 0 immediately, when alpha channel is zero.
6627
Behdad Esfahbod21c32b02013-07-25 21:53:18 +020066282013-07-25 Behdad Esfahbod <behdad@google.com>
6629
6630 Add FT_FACE_FLAG_COLOR and FT_HAS_COLOR.
6631
6632 Also disambiguate Google's color bitmap tables.
6633
6634 * include/freetype/freetype.h (FT_FACE_FLAG_COLOR, FT_HAS_COLOR):
6635 New macros.
6636
6637 * include/freetype/internal/tttypes.h (TT_SbitTableType): Add
6638 TT_SBIT_TABLE_TYPE_CBLC.
6639
6640 * src/sfnt/sfobjs.c (sfnt_load_face): Handle FT_FACE_FLAG_COLOR.
6641
6642 * src/sfnt/ttsbit.c (tt_face_load_sbit,
6643 tt_face_load_strike_metrics, tt_face_load_sbit_image): Handle
6644 TT_SBIT_TABLE_TYPE_CBLC.
6645
suzuki toshiyab4725cb2013-07-24 14:25:39 +090066462013-07-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
6647
6648 [sfnt] Fix for `make multi' target.
6649
6650 * src/sfnt/pngshim.c (Load_SBit_Png): Use FT_LOCAL_DEF().
6651
Werner Lemberg6a7df622013-07-20 10:48:37 +020066522013-07-20 Werner Lemberg <wl@gnu.org>
6653
6654 * docs/INSTALL.GNU: Updated.
6655
Behdad Esfahbodff269522013-07-20 08:02:39 +020066562013-07-20 Behdad Esfahbod <behdad@google.com>
6657
6658 [sfnt] Fix `sbix' table version handling.
6659
6660 * src/sfnt/ttsbit.c (tt_face_load_sbit) [TT_SBIT_TABLE_TYPE_SBIX]:
6661 USHORT version numbers are to be considered as `minor'.
6662
Werner Lemberg05c14212013-07-19 23:11:23 +020066632013-07-19 Werner Lemberg <wl@gnu.org>
6664
6665 [autofit] Fix segment classification for blue zones.
6666
6667 The old code (essentially unchanged since the very beginning)
6668 incorrectly handled this configuration
6669
6670 x -o- x
6671 / \
6672 / \
6673 / \
6674 o o
6675
6676 as flat and this
6677
6678 o o
6679 / /
6680 x| x|
6681 | |
6682 o---------------o
6683
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02006684 as round. (`o' and `x' are on and off points, respectively).
Werner Lemberg05c14212013-07-19 23:11:23 +02006685
6686 This is a major change which should improve the rendering results
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02006687 enormously for many TrueType fonts, especially in the range approx.
Werner Lemberg05c14212013-07-19 23:11:23 +02006688 20-40ppem, fixing the appearance of many overshoots.
6689
6690 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Look at the
6691 first and last points of the segment, not the points right before
6692 and after.
6693
66942013-07-19 Behdad Esfahbod <behdad@google.com>
Werner Lemberg01705392013-07-18 13:13:12 +02006695
Behdad Esfahbod778a7e62013-07-19 14:28:28 +02006696 [sfnt] `sbix' fix-ups.
6697
6698 * src/sfnt/sfobjs.c (sfnt_load_face): Apple's `sbix' color bitmaps
6699 are rendered scaled and then the `glyf' outline rendered on top. We
6700 don't support that yet, so just ignore the `glyf' outline and
6701 advertise it as a bitmap-only font.
6702
6703 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
6704 [TT_SBIT_TABLE_TYPE_SBIX]: Return metrics in 26.6 units.
6705 (tt_face_load_sbix_image): Typo.
6706
67072013-07-18 Behdad Esfahbod <behdad@google.com>
6708
Werner Lemberg01705392013-07-18 13:13:12 +02006709 [sfnt] Add support for Apple's `sbix' color bitmap table.
6710
6711 * include/freetype/internal/tttypes.h (TT_SBit_MetricsRec): Widen
6712 fields to FT_Short and FT_UShort, respectively.
6713 (TT_SBitTableType): New enumeration.
6714 (TT_FaceRec): Add `sbit_table_type' field.
6715
6716 * include/freetype/tttags.h (TTAG_sbix): New macro.
6717
6718 * src/sfnt/pngshim.c (Load_SBit_Png): Pass a more generic
6719 FT_GlyphSlot argument instead FT_Bitmap.
6720 Add flag to control map and metrics handling.
6721 Update all users.
6722
6723 * src/sfnt/ttsbit.c: Include `ttmtx.h'.
6724 (tt_face_load_eblc): Renamed to...
6725 (tt_face_load_sbit): This.
6726 Handlic `sbix' bitmaps.
6727 (tt_face_free_eblc): Renamed to...
6728 (tt_face_load_sbit): This.
6729 Updated.
6730 (tt_face_load_strike_metrics): Handle `sbix' bitmaps.
6731 (tt_face_load_sbix_image): New function.
6732 (tt_sbit_decoder_alloc_bitmap, tt_sbit_decoder_load_image,
6733 tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned,
6734 tt_sbit_decoder_load_compound, tt_sbit_decoder_load_png,
6735 tt_sbit_decoder_load_image, tt_sbit_decoder_load_bitmap): Don't pass
6736 and handle load flags.
6737 (tt_sbit_decoder_load_bitmap) [!FT_CONFIG_OPTION_USE_PNG]: Better
6738 handle formats 17-19.
6739 Move color to grayscale conversion to...
6740 (tt_face_load_sbit_image): Here.
6741 Handle `sbix' bitmaps.
6742
6743 * src/sfnt/pngshim.h: Updated.
6744 * src/sfnt/ttsbit.h: Updated.
6745 * src/sfnt/sfdriver.c: Updated.
6746
Werner Lemberg274207e2013-07-18 12:38:57 +020067472013-07-18 Werner Lemberg <wl@gnu.org>
6748
6749 [sfnt] Ignore invalid magic number in `head' or `bhed'.
6750
6751 Other font engines seem to ignore it also. Problem reported by
6752 Hin-Tak Leung <htl10@users.sourceforge.net>.
6753
6754 * src/sfnt/ttload.c (check_table_dir): Don't abort but warn only if
6755 we have an invalid magic number.
6756
Werner Lemberg9a7951d2013-07-16 15:25:24 +020067572013-07-16 Werner Lemberg <wl@gnu.org>
6758
6759 [smooth] Fix segfault caused by previous commit.
6760
6761 * src/smooth/ftgrays.c (gray_set_cell): Always compute
6762 `ras.invalid'.
6763
David Turnera5f33ee2013-07-16 12:40:03 +020067642013-07-16 David Turner <digit@google.com>
6765
David Turner89929ec2013-07-16 13:36:07 +02006766 [smooth] Improve performance.
6767
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02006768 Provide a work-around for an ARM-specific performance bug in GCC.
David Turner89929ec2013-07-16 13:36:07 +02006769 This speeds up the rasterizer by more than 5%.
6770
6771 Also slightly optimize `set_gray_cell' and `gray_record_cell' (which
6772 also improves performance on other platforms by a tiny bit (<1%).
6773
6774 * src/smooth/ftgrays.c (FT_DIV_MOD): New macro.
6775 Use it where appropriate.
6776
6777 (gray_record_cell, gray_set_cell, gray_move_to,
6778 gray_convert_glyph_inner): Streamline condition handling.
6779
67802013-07-16 David Turner <digit@google.com>
6781
David Turnerf66d48e2013-07-16 13:18:00 +02006782 [truetype] Add assembler code for TT_MulFix14 and TT_DotFix14.
6783
6784 This patch provides slightly optimized versions for ARM, x86, and
6785 x86_64 CPUs if built with GCC.
6786
6787 Also remove some dead code.
6788
6789 * src/truetype/ttinterp.c (TT_MulFix14_arm, TT_MulFix14_long_long,
6790 TT_DotFix14_long_long): New functions.
6791
67922013-07-16 David Turner <digit@google.com>
6793
David Turnerb2890882013-07-16 12:52:18 +02006794 Optimize FT_MulFix for x86_64 GCC builds.
6795
6796 This patch provides an optimized `FT_MulFix' implementation for
6797 x86_64 machines when FreeType is built with GCC, or compatible
6798 compilers like Clang.
6799
6800 Example:
6801 bin/ftbench -p -t 5 -s 14 -f 0008 Arial.ttf
6802
6803 Before:
6804
6805 Load 4.863 us/op
6806 Load_Advances (Normal) 4.816 us/op
6807 Load_Advances (Fast) 0.028 us/op
6808 Render 2.753 us/op
6809 Get_Glyph 0.463 us/op
6810 Get_CBox 0.077 us/op
6811 Get_Char_Index 0.023 us/op
6812 Iterate CMap 13.898 us/op
6813 New_Face 12.368 us/op
6814 Embolden 0.028 us/op
6815 Get_BBox 0.302 us/op
6816
6817 After:
6818
6819 Load 4.617 us/op
6820 Load_Advances (Normal) 4.645 us/op
6821 Load_Advances (Fast) 0.027 us/op
6822 Render 2.789 us/op
6823 Get_Glyph 0.460 us/op
6824 Get_CBox 0.077 us/op
6825 Get_Char_Index 0.024 us/op
6826 Iterate CMap 13.403 us/op
6827 New_Face 12.278 us/op
6828 Embolden 0.028 us/op
6829 Get_BBox 0.301 us/op
6830
6831 * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h
6832 (FT_MulFix_x86_64): New function.
6833
68342013-07-16 David Turner <digit@google.com>
6835
David Turnera5f33ee2013-07-16 12:40:03 +02006836 Speed up ARMv7 support.
6837
6838 When building for ARMv7 with thumb2 instructions, the optimized
6839 `FT_MulFix_arm' assembly routine was not being used.
6840
6841 The reason for this is in the `ftconfig.h' header, namely:
6842
6843 - The assembly routine uses the `smull' instruction which is not
6844 available when generating Thumb-1 machine code. It is available
6845 in Thumb-2 mode, though.
6846
6847 - The header was written a long time ago before Thumb-2 became
6848 widely popular (e.g. with Android). So it simply doesn't use the
6849 assembly routine if the `__thumb__' built-in macro is defined.
6850
6851 - When compiling in Thumb-2 mode, the compiler will define both
6852 `__thumb__' and `__thumb2__'.
6853
6854 By checking for `(__thumb2__ || !__thumb__)', we ensure that the
6855 assembly routine is only avoided when generating Thumb-1 code.
6856
6857 Given that this is performance-sensitive function, this improves
6858 `ftbench' as follows on a Galaxy Nexus:
6859
6860 Before (us/op) After (us/op)
6861
6862 - loading Arial.ttf glyphs at 14 ppem [1]
6863
6864 Load 34.285 33.098
6865
6866 - same operation with the light auto-hinter [2]
6867
6868 Load 31.317 29.590
6869
6870 - same operation without hinting [3]
6871
6872 Load 6.143 5.376
6873
6874 - loading Arial.ttf advances at 14 ppem [4]
6875
6876 Load_Advances (normal) 34.216 33.016
6877 Load_Advances (fast) 0.176 0.176
6878
6879 [1] ftbench -t 5 -p -s 14 -b a -f 0008 Arial.ttf
6880 [2] ftbench -t 5 -p -s 14 -b a -r 1 -f 0028 Arial.ttf
6881 [3] ftbench -t 5 -p -s 14 -b a -f 000a Arial.ttf
6882 [4] ftbench -t 5 -p -s 14 -b b -f 0008 Arial.ttf
6883
6884 * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h
6885 (FT_MULFIX_ASSEMBLER): Fix handling for ARMv7.
6886
Werner Lemberge12fc772013-06-28 07:57:32 +020068872013-06-28 Werner Lemberg <wl@gnu.org>
6888
6889 * docs/CHANGES: Updated.
6890
Werner Lemberg680c1d42013-06-27 17:21:59 +020068912013-06-27 Werner Lemberg <wl@gnu.org>
6892
6893 * src/winfonts/winfnt.c (FNT_Load_Glyph): Fix bitmap width guard.
6894
Werner Lembergc7cc9eb2013-06-25 07:24:02 +020068952013-06-25 Werner Lemberg <wl@gnu.org>
6896
Werner Lembergb8850fc2013-06-26 12:22:10 +02006897 [cff] Add darkening limit to `darkening-parameters'.
6898
6899 * src/cff/cffdrivr.c (cff_property_set): Add check.
6900
69012013-06-25 Werner Lemberg <wl@gnu.org>
6902
Werner Lemberg89ca1fd2013-06-25 23:28:02 +02006903 [cff] Add `darkening-parameters' property.
6904
6905 * include/freetype/ftcffdrv.h: Document it.
6906
6907 * src/cff/cffdrivr.c (cff_property_set, cff_property_get): Handle
6908 `darkening-parameters' property.
6909
6910 * src/cff/cf2font.h (CF2_FontRec): Add `darkenParams' array.
6911
6912 * src/cff/cf2font.c (cf2_computeDarkening): Add `darkenParams'
6913 argument and use it.
6914 Update all callers.
6915
6916 * src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Copy
6917 `darken_params' values.
6918
6919 * src/cff/cffobjs.h (CFF_DriverRec): Add `darken_params' array.
6920
6921 * src/cff/cffobjs.c (cff_driver_init): Set default values for
6922 `darken_params'.
6923
69242013-06-25 Werner Lemberg <wl@gnu.org>
6925
Werner Lembergfad93262013-06-25 10:41:37 +02006926 [docmaker] Code shuffling.
6927
6928 * src/tools/docmaker/tohtml.py (re_url): Move regexp...
6929 * src/tools/docmaker/sources.py: ... to this file.
6930
69312013-06-25 Werner Lemberg <wl@gnu.org>
6932
Werner Lemberg8bdc4072013-06-25 10:20:53 +02006933 [docmaker] Remove unused functions.
6934
6935 * src/tools/docmaker/content.py (DocMarkup.get_start,
6936 DocBlock.get_markup_name): Removed.
6937 * src/tools/docmaker/tohtml.py (html_quote0, dump_html_code,
6938 HtmlFormatter.make_html_words): Removed.
6939
69402013-06-25 Werner Lemberg <wl@gnu.org>
6941
Werner Lembergffb8b472013-06-25 09:09:30 +02006942 * builds/freetype.mk (dll): Remove target.
6943
6944 Problem reported by Jörg Günnewig <joerg.guennewig@googlemail.com>.
6945
69462013-06-25 Werner Lemberg <wl@gnu.org>
6947
Werner Lembergc7cc9eb2013-06-25 07:24:02 +02006948 [docmaker] Recognise URLs.
6949
6950 * src/tools/docmaker/tohtml.py (re_url): New regular expression.
6951 (make_html_para): Use it.
6952
Werner Lemberg25b7da52013-06-19 10:23:36 +020069532013-06-19 Werner Lemberg <wl@gnu.org>
6954
Werner Lembergfe4f5712013-06-19 23:27:47 +02006955 * Version 2.5.0.1 released.
6956 ===========================
6957
6958
6959 Tag sources with `VER-2-5-0-1'.
6960
6961 * include/freetype/config/ftoption.h: Undefine
6962 CFF_CONFIG_OPTION_OLD_ENGINE.
6963 * devel/ftoption.h: Define CFF_CONFIG_OPTION_OLD_ENGINE.
6964
69652013-06-19 Werner Lemberg <wl@gnu.org>
6966
Werner Lemberg609f0ca2013-06-19 14:41:47 +02006967 * builds/unix/install.mk (install): Don't create `cache' directory.
6968
6969 Found by Peter Breitenlohner <peb@mppmu.mpg.de>.
6970
69712013-06-19 Werner Lemberg <wl@gnu.org>
6972
Werner Lemberg25b7da52013-06-19 10:23:36 +02006973 * Version 2.5.0 released.
6974 =========================
6975
6976
6977 Tag sources with `VER-2-5-0'.
6978
6979 * docs/VERSION.DLL: Update documentation and bump version number to
6980 2.5.0.
6981
6982 * README, Jamfile (RefDoc),
6983 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
6984 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
6985 builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
6986 builds/win32/visualc/freetype.dsp,
6987 builds/win32/visualc/freetype.vcproj,
6988 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
6989 builds/win32/visualce/freetype.vcproj,
6990 builds/win32/visualce/index.html,
6991 builds/wince/vc2005-ce/freetype.vcproj,
6992 builds/wince/vc2005-ce/index.html,
6993 builds/wince/vc2008-ce/freetype.vcproj,
6994 builds/wince/vc2008-ce/index.html: s/2.4.12/2.5.0/, s/2412/250/.
6995
6996 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 5.
6997 (FREETYPE_PATCH): Set to 0.
6998
6999 * builds/unix/configure.raw (version_info): Set to 16:2:10.
7000
7001 * src/base/ftobjs.c (FT_Open_Face): Pacify compiler.
7002 * src/truetype/ttinterp.c (Ins_MSIRP, Ins_MIRP): Ditto.
7003
Werner Lembergf56691a2013-06-18 10:17:48 +020070042013-06-18 Werner Lemberg <wl@gnu.org>
7005
7006 Fix Savannah bug #39269.
7007
7008 * src/base/ftgloadr.c (FT_GlyphLoader_CheckPoints): Free memory in
7009 case of reacollocation failures.
7010
Andrew Church67cf7a82013-06-18 09:35:34 +020070112013-06-18 Andrew Church <achurch+savannah@achurch.org>
7012
7013 Fix Savannah bug #39266.
7014
7015 If memory allocations fail at certain points while opening a font,
7016 FreeType can either crash due to a NULL dereference or leak memory.
7017
7018 * include/freetype/internal/ftobjs.c (FT_Face_InternalRec,
7019 FT_LibraryRec): Make `refcount' a signed integer. If, for example,
7020 FT_Open_Face() fails in a memory allocation before the face's
7021 reference count is set to 1, a subsequent `FT_Done_Library' call
7022 would otherwise loop over `FT_Done_Face' 2^32 times before freeing
7023 the face.
7024
7025 * src/base/ftobjs.c (open_face): Initialize `stream' and friends
7026 earlier.
7027 (FT_Open_Face) <Fail>: Behave correctly if `node' is NULL.
7028 (FT_Destroy_Module) <Fail>: Check that `renderer_clazz' is valid.
7029
70302013-06-14 Werner Lemberg <wl@gnu.org>
Werner Lembergd7e34442013-06-14 18:33:39 +02007031
7032 * src/smooth/ftgrays.c One final pragma to silence 64-bit MSVC.
7033
Dave Arnoldcb23a622013-06-13 07:46:32 +020070342013-06-06 Dave Arnold <darnold@adobe.com>
7035 Werner Lemberg <wl@gnu.org>
7036
7037 [cff] Add code to Adobe's engine to handle ppem > 2000.
7038
7039 * src/cff/cffgload.c (cff_slot_load): If we get
7040 FT_Err_Glyph_Too_Big, retry unhinted and scale up later on.
7041
Andrew Church67cf7a82013-06-18 09:35:34 +020070422013-06-12 Werner Lemberg <wl@gnu.org>
Werner Lemberg25b6e602013-06-12 11:06:34 +02007043
Werner Lemberg294ce112013-06-12 23:33:11 +02007044 Another try on pragmas.
7045
7046 * include/freetype/internal/ftdebug.h: Move pragmas to...
7047 * include/freetype/internal/internal.h: ... this file since it gets
7048 included by all source files.
7049 * include/freetype/internal/ftserv.h: Remove pragma which has no
7050 effect.
7051
Dave Arnoldcb23a622013-06-13 07:46:32 +020070522013-06-12 Werner Lemberg <wl@gnu.org>
Werner Lemberg294ce112013-06-12 23:33:11 +02007053
Werner Lemberg25b6e602013-06-12 11:06:34 +02007054 * include/freetype/internal/ftdebug.h: Disable MSVC warning C4127.
7055
7056 This partially undoes commit 3f6e0e0c.
7057
Werner Lembergc06889e2013-06-12 10:58:06 +020070582013-06-12 Werner Lemberg <wl@gnu.org>
7059
7060 More compiler warning fixes.
7061
7062 */*: Use cast to `FT_Bool' (or `Bool') where appropriate.
7063
Werner Lemberg99e60d82013-06-10 01:44:37 +020070642013-06-10 Werner Lemberg <wl@gnu.org>
7065
Werner Lemberg5e094c62013-06-10 14:59:21 +02007066 [truetype] Improve handling of broken sbit advance widths.
7067
7068 * src/truetype/ttgload.c (TT_Load_Glyph): Use the glyph's (scaled)
7069 `linearHoriAdvance' if the sbit's `horiAdvance' value is zero.
7070
7071 Cf. font `Fixedsys Excelsior' v3.01 (FSEX300.ttf), glyph A, 16ppem.
7072
70732013-06-10 Werner Lemberg <wl@gnu.org>
7074
Werner Lemberga25ecfd2013-06-10 12:57:16 +02007075 [sfnt] Improve embedded bitmap tracing.
7076
7077 * src/base/ftobjs.c (FT_Request_Size): Move trace message regarding
7078 bitmap strike match to...
7079 (FT_Match_Size): This function.
7080
7081 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics,
7082 tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned,
7083 tt_sbit_decoder_load_compound, tt_sbit_decoder_load_png,
7084 tt_sbit_decoder_load_image): Decorate with tracing messages.
7085
70862013-06-10 Werner Lemberg <wl@gnu.org>
7087
Werner Lemberg99e60d82013-06-10 01:44:37 +02007088 Fix Savannah bug #39160.
7089
7090 * src/truetype/ttinterp.c (Ins_SDPVTL): Set projection vector too
7091 for the degenerate case.
7092
Werner Lemberg2ba871b2013-06-09 08:20:54 +020070932013-06-09 David Turner <digit@google.com>
7094
7095 * src/cache/ftcmanag.c (FTC_Manager_Reset): Add missing cache flush.
7096
7097 This code, present since eight(!) years in the unused `CACHE'
7098 branch, has been forgotten to apply to the master branch. It's
7099 really amazing that noone has ever complained since
7100 `FTC_Manager_Reset' is pretty useless without flushing the cache.
7101
Werner Lemberg85fd84b2013-06-07 17:10:21 +020071022013-06-07 Werner Lemberg <wl@gnu.org>
7103
Werner Lemberg3f6e0e02013-06-07 18:10:40 +02007104 Add and improve pragmas for MSVC compiler.
7105
7106 * include/freetype/internal/ftdebug.h: Remove pragmas.
7107 * include/freetype/internal/ftserv.h: Use push and pop for pragmas.
7108 * include/freetype/internal/ftvalid.h: Handle warning C4324.
7109 * src/base/ftobjs.c: Use push and pop for pragmas.
7110 * src/gzip/ftgzip.c: Handle warning C4244.
7111
71122013-06-07 Werner Lemberg <wl@gnu.org>
7113
Werner Lemberg85fd84b2013-06-07 17:10:21 +02007114 [cff] s/cf2_getGlyphWidth/cf2_getGlyphOutline/.
7115
7116 * src/cff/cf2font.c, src/cff/cf2font.h, src/cff/cf2ft.c: Do it.
7117
Werner Lemberg4447b2c2013-06-06 21:28:36 +020071182013-06-06 Dave Arnold <darnold@adobe.com>
7119
7120 [cff] Add early exit feature for width-only calls.
7121
7122 This is for `FT_Get_Advance'.
7123
7124 There are 7 places where the spec says the width can be defined:
7125
7126 hstem/hstemhm
7127 vstem/vstemhm
7128 cntrmask/hintmask
7129 hmoveto
7130 vmoveto
7131 rmoveto
7132 endchar
7133
7134 * src/cff/cf2intrp.c (cf2_doStems): Exit early for width-only calls,
7135 if possible.
7136
7137 (cf2_interpT2CharString) <cf2_cmdHSTEM>, <cf2_cmdVSTEM>,
7138 <cf2_cmdVMOVETO>, <cf2_cmdENDCHAR>, <cf2_cmdHINTMASK>,
7139 <cf2_cmdRMOVETO>, <cf2_cmdHMOVETO>: Exit early for width-only calls.
7140
Werner Lembergbadf3172013-06-06 09:16:38 +020071412013-06-06 Werner Lemberg <wl@gnu.org>
7142
7143 Next round of compiler fixes.
7144
7145 * builds/win32/ftdebug.c, builds/wince/ftdebug.c (ft_debug_init):
7146 Add proper cast.
7147
7148 * include/freetype/internal/ftserv.h (FT_SERVICE_UNAVAILABLE): Fix
7149 cast.
7150 * include/freetype/internal/ftstream.h: Decorate stream and frame
7151 macros with `FT_Long' and `FT_ULong' as appropriate.
7152
7153 * src/base/ftrfork.c (raccess_guess_darwin_hfsplus,
7154 raccess_guess_darwin_newvfs): Use cast.
7155
7156 * src/bdf/bdflib.c (_bdf_set_default_spacing): Use cast.
7157
7158 * src/cache/ftcmanag.c (FTC_Manager_Check): Fix cast.
7159 * src/cache/ftcmanag.h (FTC_ManagerRec): Ditto.
7160
7161 * src/cff/cf2arrst.c (cf2_arrstack_setNum_Elements): Use cast.
7162 * src/cff/cf2ft.c (cf2_freeSeacComponent): Ditto.
7163 * src/cff/cffobjs.c (remove_subset_prefix, remove_style): Ditto.
7164
7165 * src/cid/cidparse.c (cid_parser_new): Use cast.
7166
7167 * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Use cast.
7168
7169 * src/psaux/psobjs.c (reallocate_t1_table): Fix argument type.
7170
7171 * src/raster/ftraster.c (ft_black_reset): Use cast.
7172
7173 * src/truetype/ttgxvar.c (FT_Stream_FTell): Use cast.
7174 (ALL_POINTS): Fix cast.
7175
7176 * src/type1/t1driver.c (t1_ps_get_font_value): Add casts.
7177 * src/type1/t1parse.c (T1_Get_Private_Dict): Add cast.
7178
Dave Arnoldc3782492013-06-05 19:57:55 +020071792013-06-05 Dave Arnold <darnold@adobe.com>
7180
7181 Fix more MSVC Win32 compiler warnings.
7182
7183 * src/base/ftobjs.c: Fix typo in MS pragma.
7184
7185 * src/base/bdflib.c (_bdf_set_default_spacing, _bdf_add_property):
7186 `lineno' is only used in debug mode.
7187
7188 * src/cff/cf2ft.c (cf2_builder_moveTo): `params' is only used in
7189 debug mode.
7190
Werner Lemberg45392b72013-06-05 13:43:20 +020071912013-06-05 Werner Lemberg <wl@gnu.org>
7192
7193 Fix compiler warnings.
7194
7195 * include/freetype/internal/ftmemory.h: Decorate memory allocation
7196 macros with `FT_Long' where appropriate.
7197 Remove duplicate of FT_MEM_QRENEW_ARRAY definition.
7198
7199 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Use
7200 cast.
7201
7202 * src/base/ftobjs.c: Add warning disabling pragma for MSVC while
7203 including `md5.c'.
7204
7205 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdESC>: Add
7206 cast.
7207
7208 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_compound): Fix casts.
7209 (tt_sbit_decoder_load_bitmap): Beautification.
7210
7211 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Initialize
7212 variables (earlier).
7213
7214 * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Pacify compiler.
7215
7216 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Use unsigned constants
7217 where appropriate.
7218
7219 * src/type1/t1load.c (T1_Get_MM_Var): Ditto.
7220
Werner Lembergdc624ca2013-06-04 10:30:48 +020072212013-06-04 Werner Lemberg <wl@gnu.org>
7222
Werner Lembergd9634982013-06-04 20:18:57 +02007223 * src/cff/cf2font.c (cf2_getGlyphWidth): Initialize `advWidth'.
7224
7225 Problem reported by Ingmar Sittl <ingmar.sittl@elektrobit.com>.
7226
72272013-06-04 Werner Lemberg <wl@gnu.org>
7228
Werner Lembergdc624ca2013-06-04 10:30:48 +02007229 Apply fixes for cppcheck nitpicks.
7230
7231 http://cppcheck.sourceforge.net/
7232
Werner Lemberg8d8508e2013-06-04 13:09:01 +02007233 The call was (from the top-level of the FreeType tree):
7234
7235 cppcheck --force \
7236 --enable=all \
7237 -I include \
7238 -I include/freetype/ \
7239 -I include/freetype/config/ \
7240 -I include/freetype/internal/ \
7241 . &> cppcheck.log
7242
Werner Lembergdc624ca2013-06-04 10:30:48 +02007243 Note that the current version heavily chokes on FreeType, delivering
Werner Lemberg8d8508e2013-06-04 13:09:01 +02007244 many wrong results. I will report those issues to the cppcheck team
Werner Lembergdc624ca2013-06-04 10:30:48 +02007245 so that a newer version gives improved results hopefully.
7246
7247 */* Improve variable scopes.
7248 */* Remove redundant initializations which get overwritten.
7249
Werner Lemberge8ed2d62013-08-01 12:20:20 +02007250 * src/base/ftmac.c, builds/mac/ftmac.c (count_faces_scalable):
Werner Lembergdc624ca2013-06-04 10:30:48 +02007251 Remove unused variable.
7252
7253 * src/base/ftdbgmem.c (ft_mem_table_destroy): `table' can't be zero.
7254
7255 * src/gxvalid/gxvkern.c (gxv_kern_subtable_fmt1_entry_validate):
7256 Remove functionless code.
7257
7258 * src/tools/ftrandom.c (main): Fix memory leak.
7259
Werner Lemberg2429dc32013-06-03 12:41:58 +020072602013-06-03 Werner Lemberg <wl@gnu.org>
7261
7262 Add CFF_CONFIG_OPTION_OLD_ENGINE configuration option.
7263
7264 This controls whether the old FreeType CFF engine gets compiled into
7265 FreeType. It is now disabled by default.
7266
7267 * devel/ftoption.h, include/freetype/config/ftoption.h
7268 (CFF_CONFIG_OPTION_OLD_ENGINE): New macro.
7269
7270 * src/cff/cffdrivr.c (cff_property_set), src/cff/cffgload.c
7271 (CFF_Operator, cff_argument_counts, cff_builder_add_point,
7272 cff_operator_seac, cff_decoder_parse_charstrings, cff_slot_load),
7273 src/cff/cffgload.h, src/cff/cffobjs.c (cff_driver_init): Use
7274 CFF_CONFIG_OPTION_OLD_ENGINE to guard the affected code.
7275
7276 * docs/CHANGES: Updated.
7277
Werner Lembergf9cceeb2013-06-02 23:38:13 +020072782013-06-02 Werner Lemberg <wl@gnu.org>
7279
7280 Fix PNG library handling.
7281
7282 * builds/unix/configure.raw: Don't use LIBPNG_LIBS but
7283 LIBPNG_LDFLAGS.
7284
Behdad Esfahbod760d3422013-05-29 11:36:18 +020072852013-05-23 Behdad Esfahbod <behdad@google.com>
7286
7287 Add support for color embedded bitmaps (eg. color emoji).
7288
7289 A new load flag, FT_LOAD_COLOR, makes FreeType load color
7290 embedded-bitmaps, following this draft specification
7291
7292 https://color-emoji.googlecode.com/git/specification/v1.html
7293
7294 which defines two new SFNT tables, `CBDT' and `CBLC' (named and
7295 modeled after `EBDT' and `EBLC', respectively). The color bitmaps
7296 are stored in the new FT_PIXEL_MODE_BGRA format to represent BGRA
7297 pre-multiplied sRGB images. If PNG support is available, PNG color
7298 images as defined in the same proposed specification are supported
7299 also.
7300
7301 Note that color bitmaps are converted to grayscale if client didn't
7302 ask for color.
7303
7304 * builds/unix/configure.raw: Search for libpng.
7305 Add `--without-png' option.
7306
7307 * devel/ftoption.h, include/freetype/config/ftoption.h
7308 (FT_CONFIG_OPTION_USE_PNG): New macro.
7309
7310 * include/freetype/freetype.h (FT_LOAD_COLOR): New load flag.
7311
7312 * include/freetype/ftimage.h (FT_Pixel_Mode): Add
7313 `FT_PIXEL_MODE_BGRA'.
7314
7315 * include/freetype/tttags.h (TTAG_CBDT, TTAG_CBLC): New tags.
7316
7317 * src/base/ftbitmap.c (FT_Bitmap_Embolden): Updated.
7318 (ft_gray_for_premultiplied_srgb_bgra): New function.
7319 (FT_Bitmap_Convert): Handle FT_PIXEL_MODE_BGRA.
7320
7321 * src/sfnt/pngshim.c, src/sfnt/pngshim.h: New files.
7322
7323 * src/sfnt/sfnt.c: Include `pngshim.c'.
7324
7325 * src/sfnt/ttsbit.c: Include FT_BITMAP_H and `pngshim.h'
7326 (tt_face_load_eblc): Load `CBLC'.
7327 (tt_sbit_decoder_init): Load `CBDT'.
7328 (tt_sbit_decoder_alloc_bitmap): Pass load flags to select between
7329 color and grayscale bitmaps.
7330 Set `num_grays'. This is used by `ftview' to choose the blending
7331 algorithm.
7332 (tt_sbit_decoder_load_byte_aligned,
7333 tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_compound,
7334 tt_sbit_decoder_load_image): Pass load flag.
7335 s/write/pwrite/.
7336 Don't call `tt_sbit_decoder_alloc_bitmap'.
7337 Updated.
7338 (tt_sbit_decoder_load_png) [FT_CONFIG_OPTION_USE_PNG]: New function.
7339 (tt_sbit_decoder_load_bitmap): Pass load flag.
7340 Handle new glyph formats 17, 18, and 19.
7341 Call `tt_sbit_decoder_alloc_bitmap'.
7342 Flatten color bitmaps if necessary.
7343 (tt_face_load_sbit_image): Updated.
7344
7345 * src/sfnt/rules.mk (SFNT_DRV_SRC): Add `pngshim.c'.
7346
7347 * docs/CHANGES: Updated.
7348
Guenter41e44802013-05-24 11:38:09 +020073492013-05-24 Guenter <info@gknw.net>
7350
7351 Apply Savannah patch #8055.
7352
7353 Make `apinames' create an import file for NetWare.
7354
7355 * src/tools/apinames.c (PROGRAM_VERSION): Set to 0.2.
7356 (OutputFormat): Add `OUTPUT_NETWARE_IMP'.
7357 (names_dump): Handle it.
7358 (usage): Updated.
7359 (main): Handle new command line flag `-wN'.
7360
Behdad Esfahbod2d6e1fb2013-05-23 08:01:20 +020073612013-05-23 Behdad Esfahbod <behdad@behdad.org>
7362
7363 Compilation fix.
7364
7365 * src/truetype/ttinterp.c (TT_RunIns)
7366 [!TT_CONFIG_OPTION_SUBPIXEL_HINTING]: Make it work.
7367
Infinality18f35ed2013-05-21 20:51:15 -050073682013-05-22 Infinality <infinality@infinality.net>
7369
Infinality3c783c12013-05-21 21:03:00 -05007370 [truetype] Formatting and an additional subpixel tweak.
7371
7372 * src/truetype/ttinterp.c (Ins_SHPIX): Formatting fix.
7373 * src/truetype/ttsubpix.c (SKIP_NONPIXEL_Y_MOVES_Rules):
7374 Revert previous modification for Verdana clones.
7375
73762013-05-22 Infinality <infinality@infinality.net>
7377
Infinality18f35ed2013-05-21 20:51:15 -05007378 [truetype] Adjust subpixel zp2 moves and tweak rules.
7379
7380 These modifications fix thin diagonal stems in some legacy fonts.
7381
7382 * src/truetype/ttinterp.c (Direct_Move_X): Remove unused macro.
7383 (Move_Zp2_Point): Don't always disable x moves for subpixel rendering.
7384 (Ins_SHP): Disable x moves here for subpixel rendering.
7385 (Ins_SHPIX): Only disable x moves in compatibility mode.
7386 Split out zp2 move reversals and reorder conditional respectively.
7387
7388 * src/truetype/ttsubpix.c (SKIP_NONPIXEL_Y_MOVES_Rules): Fix oversight.
7389 Only adjust Verdana clones for 17 ppem.
7390 (SKIP_NONPIXEL_Y_MOVES_Rules_Exceptions): Add Courier New.
7391 (ALWAYS_SKIP_DELTAP_Rules): Found additional cases for Arial `s'.
7392
Infinality63bfa832013-05-20 07:38:21 +020073932013-05-20 Infinality <infinality@infinality.net>
7394
7395 [truetype] Simplify and improve subpixel function detection.
7396
7397 Some small enhancements have allowed the removal of many macros and
7398 the simplification of existing rules in `ttsubpix.c'.
7399
7400 * src/truetype/ttsubpix.h (SPH_TWEAK_ALLOW_X_DMOVEX,
7401 SPH_TWEAK_ALLOW_X_MOVE_ZP2,
7402 SPH_TWEAK_DELTAP_SKIP_EXAGGERATED_VALUES,
7403 SPH_TWEAK_SKIP_INLINE_DELTAS, SPH_TWEAK_MIRP_CVT_ZERO): Removed.
7404 (SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES_DELTAP): New rule macro.
7405
7406 * src/truetype/ttsubpix.c: Updated affected rules.
7407
7408 * src/truetype/ttinterp.c (Direct_Move_X): Updated.
7409 (INS_FDEF): Add additional function detection.
7410 (INS_ENDF): Set runtime flag.
7411 (Ins_CALL): Skip the call under certain conditions.
7412 Remove bad code.
7413 (Ins_LOOPCALL): Skip the call under certain conditions.
7414 Remove bad code.
7415 (Move_Zp2_Point): Updated.
7416 (Ins_SHPIX): Updated.
7417 Skip the move under some situations.
7418 (Ins_MIAP): Improve conditions.
7419 (Ins_MIRP): Updated.
7420 (Ins_DELTAP): Skip move under certain conditions.
7421 Simplify conditions.
7422 (TT_RunIns): Updated.
7423 Add code to handle new function detection.
7424 Trace messages.
7425
Werner Lembergfd664692013-05-17 17:40:27 +020074262013-05-17 Werner Lemberg <wl@gnu.org>
7427
7428 Update more FT_Err_XXX macros using FT_ERR and FT_THROW;
7429
7430 * builds/amiga/src/base/ftsystem.c, builds/mac/ftmac.c,
7431 builds/unix/ftsystem.c, builds/vms/ftsystem.c: Do it.
7432
Werner Lembergf04951a2013-05-17 13:51:07 +020074332013-05-15 Werner Lemberg <wl@gnu.org>
7434
7435 [truetype] Add `interpreter-version' property.
7436
7437 This makes the option TT_CONFIG_OPTION_SUBPIXEL_HINTING controllable
7438 at runtime.
7439
Werner Lemberg27991332013-05-17 14:00:26 +02007440 * include/freetype/ftttdrv.h: New file.
7441
7442 * include/freetype/config/ftheader.h (FT_TRUETYPE_DRIVER_H): New
7443 macro.
7444
Werner Lembergf04951a2013-05-17 13:51:07 +02007445 * src/truetype/ttdriver.c: Include FT_TRUETYPE_DRIVER_H.
7446 (tt_property_set, tt_property_get): Fill templates.
7447
7448 * src/truetype/ttobjs.h (TT_DriverRec): Add `interpreter_version'
7449 member.
7450 Remove unused `extension_component' member.
7451
7452 * src/truetype/ttgload.c: Include FT_TRUETYPE_DRIVER_H.
7453 (tt_get_metrics, TT_Hint_Glyph, TT_Process_Simple_Glyph,
7454 compute_glyph_metrics, tt_loader_init): Use `interpreter_version'.
7455
7456 * src/truetype/ttinterp.c: Include FT_TRUETYPE_DRIVER_H.
7457 (SUBPIXEL_HINTING): New macro to check `interpreter_version' flag.
7458 Update all affected functions to use it.
7459 Use TT_INTERPRETER_VERSION_XXX where appropriate.
7460
7461 * src/truetype/ttobjs.c: Include FT_TRUETYPE_DRIVER_H.
7462 (tt_driver_init): Initialize `interpreter_version'.
7463
7464 * src/truetype/ttsubpix.c: Include FT_TRUETYPE_DRIVER_H.
7465 Use TT_INTERPRETER_VERSION_XXX where appropriate.
7466
Werner Lemberg7441dd82013-05-13 09:12:46 +020074672013-05-13 Werner Lemberg <wl@gnu.org>
7468
Werner Lemberg6650be72013-05-13 10:05:29 +02007469 [truetype] Avoid empty source file.
7470
7471 * src/truetype/ttsubpix.c [!TT_CONFIG_OPTION_SUBPIXEL_HINTING]:
7472 Provide dummy typedef.
7473
74742013-05-13 Werner Lemberg <wl@gnu.org>
7475
Werner Lemberg7441dd82013-05-13 09:12:46 +02007476 * src/cff/cf2font.c (cf2_getGlyphWidth): Fix uninitialized variable.
7477
7478 Fix suggested by Vaibhav Nagarnaik <vnagarnaik@gmail.com>.
7479
Brian Nixon8d6025c2013-05-13 09:06:42 +020074802013-05-13 Brian Nixon <bnixon@yahoo.com>
7481
7482 Fix Savannah bug #38970.
7483
7484 * src/base/ftdebug.c, builds/win32/ftdebug.c,
7485 builds/wince/ftdebug.c, builds/amiga/src/base/ftdebug.c
7486 (ft_debug_init): Don't read past the environment variable FT2_DEBUG.
7487
Werner Lembergd51ac9c2013-05-12 06:00:27 +020074882013-05-12 Werner Lemberg <wl@gnu.org>
7489
Werner Lembergcd888752013-05-12 15:08:57 +02007490 [truetype] Add framework for TrueType properties.
7491
7492 * src/truetype/ttdrivr.c: Include FT_SERVICE_PROPERTIES_H.
7493 (tt_property_set, tt_property_get): New functions, still empty.
7494 Define `tt_service_properties' service.
7495 Update `tt_services'.
7496
7497 * src/truetype/ttpic.h: Include FT_SERVICE_PROPERTIES_H.
7498 (TT_SERVICE_PROPERTIES_GET): New macro.
7499 (TTModulePIC): Add `tt_service_properties'.
7500
75012013-05-12 Werner Lemberg <wl@gnu.org>
7502
Werner Lembergb112fa42013-05-12 07:29:04 +02007503 Fix Savannah bug #38967.
7504
7505 * src/base/ftcalc.c (FT_DivFix) [FT_LONG64]: Fix cast.
7506
75072013-05-12 Werner Lemberg <wl@gnu.org>
7508
Werner Lembergcbcf33d2013-05-12 07:27:48 +02007509 Introduce unsigned 64bit type (if available).
7510
7511 * include/freetype/config/ftconfig.h: Define FT_UINT64 if available.
7512 [FT_LONG64]: Provide FT_UInt64.
7513
7514 * builds/unix/ftconfig.in: Synchronized.
7515
75162013-05-12 Werner Lemberg <wl@gnu.org>
7517
Werner Lembergd51ac9c2013-05-12 06:00:27 +02007518 Fix Savannah bug #38968.
7519
7520 * include/freetype/ftmodapi.h: Add `FT_EXPORT' to
7521 FT_Property_{Set,Get}.
7522 * src/base/ftobjs.c: Add `FT_EXPORT_DEF' to
7523 FT_Property_{Set,Get}.
7524
Werner Lembergf6aa0892013-05-10 07:58:47 +020075252013-05-10 Werner Lemberg <wl@gnu.org>
7526
Werner Lembergea2b4752013-05-10 08:04:33 +02007527 [sfnt] Clean up bitmap code.
7528
7529 * src/sfnt/ttsbit.c: Deleted.
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02007530 * src/sfnt/ttsbit0.c: Renamed to `ttsbit.c'.
Werner Lembergea2b4752013-05-10 08:04:33 +02007531 * rules.mk (SFNT_DRV_H): Updated.
7532
75332013-05-10 Werner Lemberg <wl@gnu.org>
7534
Werner Lembergf6aa0892013-05-10 07:58:47 +02007535 */* [FT_CONFIG_OPTION_OLD_INTERNALS]: Remove macro and guarded code.
7536
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00007537----------------------------------------------------------------------------
7538
Werner Lembergf57fc592015-01-17 20:41:43 +01007539Copyright 2013-2015 by
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00007540David Turner, Robert Wilhelm, and Werner Lemberg.
7541
7542This file is part of the FreeType project, and may only be used, modified,
7543and distributed under the terms of the FreeType project license,
7544LICENSE.TXT. By continuing to use, modify, or distribute this file you
7545indicate that you have read the license and understand and accept it
7546fully.
7547
7548
7549Local Variables:
7550version-control: never
Werner Lemberg4e03fe72006-04-29 06:20:09 +00007551coding: utf-8
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00007552End: