blob: d49e88a45c27f1aa06f59696150497c955333bad [file] [log] [blame]
Werner Lemberg12661a52015-04-21 07:13:59 +020012015-04-21 Werner Lemberg <wl@gnu.org>
2
Werner Lembergd164f702015-04-21 07:51:41 +02003 * docs/CHANGES: Updated.
4
52015-04-21 Werner Lemberg <wl@gnu.org>
6
Werner Lemberg12661a52015-04-21 07:13:59 +02007 [autofit] Introduce `warping' property.
8
9 This code replaces the debugging hook from the previous commit with
10 a better, more generic solution.
11
12 * include/ftautoh.h: Document it.
13
14 * src/autofit/afmodule.h (AF_ModuleRec)
15 [AF_CONFIG_OPTION_USE_WARPER]: Add `warping' field.
16
17 * src/autofit/afmodule.c (_af_debug_disable_warper): Remove.
18 (af_property_set, af_property_get, af_autofitter_init)
19 [AF_CONFIG_OPTION_USE_WARPER]: Handle `warping' option.
20
21 * src/autofit/afhints.h (AF_HINTS_DO_WARP): Remove use of the no
22 longer existing `_af_debug_disable_warper'.
23
24 * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c
25 (af_latin_hints_init), src/autofit/aflatin2.c (af_latin2_hints_init)
26 [AF_CONFIG_OPTION_USE_WARPER]: Add `AF_SCALER_FLAG_NO_WARPER' to the
27 scaler flags if warping is off.
28
29 * src/autofit/aftypes.h: Updated.
30
Werner Lemberg58f48f02015-04-16 20:11:49 +0200312015-04-16 Werner Lemberg <wl@gnu.org>
32
33 [autofit] Add debugging hook to disable warper.
34
35 * src/autofit/afmodule.c (_af_debug_disable_warper)
36 [FT_DEBUG_AUTOFIT]: New global variable.
37
38 * src/autofit/aftypes.h: Updated.
39 (AF_SCALER_FLAG_NO_WARPER): New macro (not actively used yet).
40
41 * src/autofit/afhints.h (AF_HINTS_DO_WARP): New macro.
42
43 * src/autofi/aflatin.c (af_latin_hints_apply)
44 [AF_CONFIG_OPTION_USE_WARPER]: Use `AF_HINTS_DO_WARP' to control use
45 of warper.
46
47 * src/autofit/afcjk.c (af_cjk_hints_init, af_cjk_hints_apply)
48 [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'.
49
50 * src/autofit/aflatin2.c (af_latin2_hints_apply)
51 [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'.
52
Werner Lemberg5cd21552015-04-10 07:01:01 +0200532015-04-10 Werner Lemberg <wl@gnu.org>
54
55 [cff] Update advance width handling to OpenType 1.7.
56
57 Problem reported by Behdad.
58
59 * src/cff/cffdrivr.c (cff_get_advances): Handle SFNT case
60 separately.
61
62 * src/cff/cffgload.c (cff_slot_load): Use advance width and side
63 bearing values from `hmtx' table if present.
64
Alexei Podtelezhnikov67b912d2015-04-03 22:38:11 -0400652015-04-03 Alexei Podtelezhnikov <apodtele@gmail.com>
66
67 * src/autofit/afhints.c (af_glyph_hints_reload): Use do-while loop.
68
Alexei Podtelezhnikov770b5d02015-04-02 23:15:36 -0400692015-04-02 Alexei Podtelezhnikov <apodtele@gmail.com>
70
71 * src/autofit/aflatin.c (af_latin_hint_edges): Reduce logic.
72
732015-04-01 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov886f4d02015-04-01 22:57:43 -040074
75 [autofit] Finish the thought.
76
77 * src/autofit/afhints.c (af_direction_compute): make sure the long arm
78 is never negative so that its `FT_ABS' is not necessary.
79
Werner Lemberg16217e52015-04-01 13:13:56 +0200802015-04-01 Werner Lemberg <wl@gnu.org>
81
Werner Lemberga2fa6572015-04-01 15:55:41 +020082 [autofit] Call dumper functions for tracing.
83
84 * src/autofit/afcjk.c (af_cjk_hints_apply): Remove dead code.
85 * src/autofit/afhints.c (af_glyph_hints_dump_points): Minor
86 improvement.
87 * src/autofit/afmodule.c (af_autofitter_load_glyph): Implement it.
88
892015-04-01 Werner Lemberg <wl@gnu.org>
90
Werner Lembergdb8df792015-04-01 13:30:55 +020091 [autofit] Make debugging stuff work again.
92
93 The interface to ftgrid was broken in the series of commits starting
94 with
95
96 [autofit] Allocate AF_Loader on the stack instead of AF_Module.
97
98 from 2015-01-14.
99
100 * src/autofit/afmodule.c (_af_debug_hints_rec) [FT_DEBUG_AUTOFIT]:
101 Use a global AF_GlyphHintsRec object for debugging.
102 (af_autofitter_done, af_autofitter_load_glyph): Updated.
103
104 * src/autofit/afloader.c (af_loader_init, af_loader_done): Updated.
105
1062015-04-01 Werner Lemberg <wl@gnu.org>
107
Werner Lemberg16217e52015-04-01 13:13:56 +0200108 * src/autofit/afhints.c (af_glyph_hints_done): Fix minor thinko.
109
Werner Lemberg10e2bb82015-03-29 13:32:47 +02001102015-03-29 Werner Lemberg <wl@gnu.org>
111
Werner Lembergf353a382015-03-29 14:47:49 +0200112 [cff] Fix Savannah bug #44629.
113
114 * src/cff/cf2font.h (CF2_MAX_SUBR), src/cff/cffgload.h
115 (CFF_MAX_SUBRS_CALLS): Set to 16.
116
1172015-03-29 Werner Lemberg <wl@gnu.org>
118
Werner Lemberg10e2bb82015-03-29 13:32:47 +0200119 [type1, truetype] Make the MM API more flexible w.r.t. `num_coords'.
120
121 This commit allows `num_coords' to be larger or smaller than the
122 number of available axes while selecting a design instance, either
123 ignoring excess data or using defaults if data is missing.
124
125 * src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design):
126 Implement it.
127
128 * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design,
129 T1_Set_Var_Design): Ditto.
130
1312015-03-29 Werner Lemberg <wl@gnu.org>
Werner Lemberg8ce30262015-03-27 08:33:47 +0100132
Werner Lembergdd5d6d72015-03-29 10:04:22 +0200133 [type1] Minor.
134
135 * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design): Use
136 FT_THROW.
137 (T1_Set_Var_Design): Use T1_MAX_MM_AXIS and FT_THROW.
138
1392015-03-27 Werner Lemberg <wl@gnu.org>
140
Werner Lemberg8ce30262015-03-27 08:33:47 +0100141 [cff] Trace charstring nesting levels.
142
143 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdCALLGSUBR,
144 cf2_cmdCALLSUBR, cf2_cmdRETURN>: Implement it.
145
146 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
147 <cff_op_callsubr, cff_op_callgsubr, cff_op_return>: Ditto.
148
Alexei Podtelezhnikovdac56442015-03-21 23:30:16 -04001492015-03-21 Alexei Podtelezhnikov <apodtele@gmail.com>
150
151 [base] Optimize `FT_Angle_Diff'.
152
153 Under normal circumstances we are usually close to the desired range
154 of angle values, so that the remainder is not really necessary.
155
156 * src/base/fttrigon.c (FT_Angle_Diff): Use loops instead of remainder.
157
158 * src/autofit/aftypes.h (AF_ANGLE_DIFF): Ditto in the unused macro.
159
Werner Lemberg6cc425d2015-03-21 06:51:07 +01001602015-03-21 Werner Lemberg <wl@gnu.org>
161
162 [truetype] Improve `gvar' handling.
163
164 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Correctly handle
165 single-element runs. Cf. glyph `Q' in Skia.ttf with weights larger
166 than the default.
167
Alexei Podtelezhnikov2d7284e2015-03-20 21:34:19 -04001682015-03-20 Alexei Podtelezhnikov <apodtele@gmail.com>
169
170 * src/base/fttrigon.c (FT_Vector_Rotate): Minor refactoring.
171
Alexei Podtelezhnikov6a171722015-03-17 22:43:08 -04001722015-03-17 Alexei Podtelezhnikov <apodtele@gmail.com>
173
174 Fix Savannah bug #44412 (part 2).
175
176 * src/base/fttrigon.c (FT_Sin, FT_Cos, FT_Tan): Call `FT_Vector_Unit'.
177
Werner Lemberg06339952015-03-11 06:30:23 +01001782015-03-11 Werner Lemberg <wl@gnu.org>
179
Werner Lembergd3284462015-03-11 16:45:58 +0100180 [autofit] Add support for Arabic script.
181
182 Thanks to Titus Nemeth <tn@tntypography.eu> for guidance!
183
184 * src/autofit/afblue.dat: Add blue zone data for Arabic.
185
186 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
187
188 * src/autofit/afscript.h: Add Arabic standard characters.
189
190 * src/autofit/afranges.c: Add Arabic data.
191
192 * src/autofit/afstyles.h: Add Arabic data.
193
194 * docs/CHANGES: Document it.
195
1962015-03-11 Werner Lemberg <wl@gnu.org>
197
Werner Lemberga4516382015-03-11 08:09:13 +0100198 Rename `svxf86nm.h' to `svfntfmt.h'; update related symbols.
199
200 * include/internal/ftserv.h (FT_SERVICE_XFREE86_NAME_H): Renamed
201 to...
202 (FT_SERVICE_FONT_FORMAT_H): This.
203
204 * include/internal/services/svfntfmt.h (FT_XF86_FORMAT_*): Renamed
205 to ...
206 (FT_FONT_FORMAT_*): This.
207
208 src/base/ftfntfmt.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c,
209 src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c,
210 src/truetype/ttdriver.c, src/type1/t1driver.c,
211 src/type42/t42drivr.c, src/winfonts/winfnt.c: Updated.
212
2132015-03-11 Werner Lemberg <wl@gnu.org>
214
Werner Lembergdd7028c2015-03-11 07:45:05 +0100215 [base] Rename `FT_XFREE86_H' to `FT_FONT_FORMATS_H'.
216
217 * include/config/ftheader.h: Implement it.
218 * src/base/ftfntfmt.c, docs/CHANGES: Updated.
219
2202015-03-11 Werner Lemberg <wl@gnu.org>
221
Werner Lembergf4d1c112015-03-11 07:32:58 +0100222 [base] Rename `FT_Get_X11_Font_Format' to `FT_Get_Font_Format'.
223
224 * include/ftfntfmt.h, src/base/ftfntfmt.c: Implement it.
225
226 * docs/CHANGES: Updated.
227
2282015-03-11 Werner Lemberg <wl@gnu.org>
229
Werner Lembergcb0f7b62015-03-11 06:51:27 +0100230 Fix automatic copyright updating.
231
232 * src/tools/update-copyright: Make scanning of `no-copyright'
233 actually work.
234
235 * src/tools/no-copyright: Don't include README in general.
236
2372015-03-11 Werner Lemberg <wl@gnu.org>
238
Werner Lemberg06339952015-03-11 06:30:23 +0100239 Rename `ftxf86.[ch]' to `ftfntfmt.[ch]'.
240
241 CMakeLists.txt, builds/amiga/makefile, builds/amiga/makefile.os4,
242 builds/amiga/smakefile, builds/mac/FreeType.m68k_cfm.make.txt,
243 builds/mac/FreeType.m68k_far.make.txt,
244 builds/mac/FreeType.ppc_carbon.make.txt,
245 builds/mac/FreeType.ppc_classic.make.txt, builds/symbian/bld.inf,
246 builds/symbian/freetype.mmp, builds/wince/vc2005-ce/freetype.vcproj,
247 builds/wince/vc2008-ce/freetype.vcproj,
248 builds/windows/vc2005/freetype.vcproj,
249 builds/windows/vc2008/freetype.vcproj,
250 builds/windows/vc2010/freetype.vcxproj,
251 builds/windows/vc2010/freetype.vcxproj.filters,
252 builds/windows/visualc/freetype.dsp,
253 builds/windows/visualc/freetype.vcproj,
254 builds/windows/visualce/freetype.dsp,
255 builds/windows/visualce/freetype.vcproj, docs/INSTALL.ANY,
256 include/config/ftheader.h, include/ftfntfmt.h, modules.cfg,
257 src/base/ftfntfmt.c, vms_make.com: Updated.
258
Alexei Podtelezhnikov6b832c82015-03-10 23:25:49 -04002592015-03-10 Alexei Podtelezhnikov <apodtele@gmail.com>
260
261 Fix Savannah bug #44412 (part 1).
262
263 * src/base/ftstroke.c (ft_stroker_inside): Handle near U-turns.
264
Werner Lembergeee7d8b2015-03-10 11:15:15 +01002652015-03-10 Werner Lemberg <wl@gnu.org>
266
267 [base] Rename `FT_Bitmap_New' to `FT_Bitmap_Init'.
268
269 * include/ftbitmap.h, src/base/ftbitmap.c: Implement it.
270 Update all callers.
271
272 * docs/CHANGES: Updated.
273
Werner Lemberg493cc032015-03-06 05:38:31 +01002742015-03-06 Werner Lemberg <wl@gnu.org>
275
276 * src/sfnt/ttload.c (tt_face_load_font_dir): Fix compiler warning.
277
278 Found by Alexei.
279
Alexei Podtelezhnikovdd7498d2015-03-05 22:51:36 -05002802015-03-05 Alexei Podtelezhnikov <apodtele@gmail.com>
281
282 * src/base/ftstroke.c: Simplify.
283
Werner Lemberg328b7922015-03-04 08:40:23 +01002842015-03-04 Werner Lemberg <wl@gnu.org>
285
286 [truetype] Some fixes and code refactoring in `ttgxvar.c'.
287
288 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix return value
289 of `point_cnt' if two bytes are read.
290 Use a more vertical coding style.
291 (ft_var_readpackeddeltas): Use FT_UInt for `delta_cnt' parameter.
292 Use a more vertical coding style.
293
Werner Lemberga374c9c2015-03-03 11:23:45 +01002942015-03-03 Werner Lemberg <wl@gnu.org>
295
296 [autofit] Fix Savannah bug #44241.
297
298 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Reject glyphs
299 with less than 3 points.
300
Werner Lemberga07029e2015-03-02 06:54:08 +01003012015-03-02 Werner Lemberg <wl@gnu.org>
302
303 Simplify `TYPEOF' macro.
304
305 No need for two arguments.
306
307 * include/config/ftconfig.h, builds/unix/ftconfig.in,
308 builds/vms/ftconfig.h (TYPEOF): Updated.
309
310 * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
311 src/autofit/afwarp.h (AF_WARPER_FLOOR): Updated.
312
3132015-03-01 Werner Lemberg <wl@gnu.org>
Werner Lemberg4b9234b2015-02-25 06:31:43 +0100314
Werner Lemberg851e8152015-03-01 19:27:09 +0100315 Various compiler warning fixes for `make multi'.
316
317 * src/autofit/afcjk.c (af_cjk_hints_compute_blue_edges),
318 src/autofit/aflatin.c (af_latin_hint_compute_blue_edges,
319 af_latin_hint_edges), src/autofit/aflatin2.c
320 (af_latin2_hints_compute_blue_edges, af_latin2_hint_edges): Declare
321 as `static'.
322
323 * src/cache/ftccmap.c (FTC_CMAP_QUERY_HASH, FTC_CMAP_NODE_HASH):
324 Removed. Unused.
325 * src/cache/ftcimage.c: Include FT_INTERNAL_OBJECTS_H.
326 * src/cache/ftcmanag.c (FTC_LRU_GET_MANAGER): Removed. Unused.
327
328 * src/cff/cf2intrp.c: Include `cf2intrp.h'.
329 * src/cff/cffdrivr.c (PAIR_TAG): Removed. Unused.
330
331 * src/gzip/ftgzip.c (NO_DUMMY_DECL): Removed. Unused.
332
333 * src/psaux/afmparse.c (afm_parser_read_int): Declare as `static'.
334
335 * src/pshinter/pshalgo.c (STRONGER, PSH_ZONE_MIN, PSH_ZONE_MAX):
336 Removed. Unused.
337
338 * src/raster/ftraster.c (Render_Glyph): Declare as `static'.
339
340 * src/sfnt/ttpost.c (load_format_20): Fix signedness warning.
341
342 * src/truetype/ttdriver.c (PAIR_TAG): Removed. Unused.
343 * src/truetype/ttsubpix.c (is_member_of_family_class,
344 is_member_of_style_class): Declare as `static'.
345
346 * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Declare
347 as `static'.
348 * src/type1/t1load.c (mm_axis_unmap, mm_weights_unmap): Declare as
349 `static'.
350 (T1_FIELD_COUNT): Removed. Unused.
351 * src/type1/t1parse.h (T1_Done_Table): Removed. Unused.
352
353 * src/type42/t42parse.c (T1_Done_Table): Removed. Unused.
354
3552015-02-25 Werner Lemberg <wl@gnu.org>
356
Werner Lemberg04c22372015-02-25 11:20:20 +0100357 [psaux] Signedness fixes.
358
359 * include/internal/psaux.h, src/psaux/afmparse.c,
360 src/psaux/afmparse.h, src/psaux/psconv.c, src/psaux/psobjs.c,
361 src/psaux/t1cmap.c, src/psaux/t1decode.c: Apply.
362
3632015-02-25 Werner Lemberg <wl@gnu.org>
364
Werner Lembergd25ec162015-02-25 09:19:59 +0100365 [otvalid] Signedness fixes.
366
367 * src/otvalid/otvcommn.c, src/otvalid/otvgdef.c,
368 src/otvalid/otvgpos.c, src/otvalid/otvgsub.c, src/otvalid/otvmath.c:
369 Apply.
370
3712015-02-25 Werner Lemberg <wl@gnu.org>
372
Werner Lemberg5c9d9bf2015-02-25 08:13:40 +0100373 * src/bzip2/ftbzip2.c (ft_bzip2_alloc): Signedness fix.
374
3752015-02-25 Werner Lemberg <wl@gnu.org>
376
Werner Lemberg83d41812015-02-25 08:10:58 +0100377 [lzw] Signedness fixes.
378
379 * src/lzw/ftzopen.c, src/lzw/ftzopen.h: Apply.
380
3812015-02-25 Werner Lemberg <wl@gnu.org>
382
Werner Lemberg17b62912015-02-25 07:53:09 +0100383 [gxvalid] Signedness fixes.
384
385 * src/gxvalid/gxvbsln.c, src/gxvalid/gxvcommn.c,
386 src/gxvalid/gxvcommn.h, src/gxvalid/gxvjust.c,
387 src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmort.c,
388 src/gxvalid/gxvmort1.c, src/gxvalid/gxvmort2.c,
389 src/gxvalid/gxvmorx.c, src/gxvalid/gxvmorx1.c,
390 src/gxvalid/gxvmorx2.c, src/gxvalid/gxvopbd.c,
391 src/gxvalid/gxvprop.c, src/gxvalid/gxvtrak.c: Apply.
392
3932015-02-25 Werner Lemberg <wl@gnu.org>
394
Werner Lemberg24e4e962015-02-25 06:57:16 +0100395 [cache] Signedness fixes.
396
397 * src/cache/ftcbasic.c, src/cache/ftccmap.c, src/cache/ftcimage.c,
398 src/cache/ftcmanag.c, src/cache/ftcsbits.c: Apply.
399
4002015-02-25 Werner Lemberg <wl@gnu.org>
401
Werner Lemberg559727d2015-02-25 06:55:00 +0100402 Change dimension fields in `FTC_ImageTypeRec' to unsigned type.
403
404 This doesn't break ABI.
405
406 * include/ftcache.h (FTC_ImageTypeRec): Use unsigned types for
407 `width' and `height'.
408
409 * docs/CHANGES: Document it.
410
4112015-02-25 Werner Lemberg <wl@gnu.org>
412
Werner Lemberg4b9234b2015-02-25 06:31:43 +0100413 [cache] Don't use `labs'.
414
415 This is the only place in FreeType where this function was used.
416
417 * include/config/ftstdlib.h (ft_labs): Remove.
418
419 * src/cache/ftcimage.c (ftc_inode_weight): Replace `ft_labs' with
420 `FT_ABS'.
421
Werner Lemberg4d1f7af2015-02-23 07:04:36 +01004222015-02-23 Werner Lemberg <wl@gnu.org>
423
Werner Lemberg3aaebe32015-02-23 08:20:27 +0100424 [cache] Replace `FT_PtrDist' with `FT_Offset'.
425
426 * src/cache/ftccache.h (FTC_NodeRec): `FT_Offset' (a.k.a. `size_t')
427 is a better choice for `hash' to hold a pointer than `FT_PtrDist'
428 (a.k.a. `ptrdiff_t'), especially since the latter is signed,
429 causing zillions of signedness warnings. [Note that `hash' was of
Werner Lemberg17b62912015-02-25 07:53:09 +0100430 type `FT_UInt32' before the change to `FT_PtrDist'.]
Werner Lemberg3aaebe32015-02-23 08:20:27 +0100431 Update all users.
432
433 * src/cache/ftcbasic.c, src/cache/ftccache.c, src/cache/ftccmap.c,
434 src/cache/ftcglyph.c, src/cache/ftcglyph.h: Updated.
435
4362015-02-23 Werner Lemberg <wl@gnu.org>
437
Werner Lemberg4d1f7af2015-02-23 07:04:36 +0100438 [smooth, raster] Re-enable standalone compilation.
439
440 * src/raster/ftraster.c (FT_RENDER_POOL_SIZE, FT_MAX)
441 [_STANDALONE_]: Define macros.
442
443 * src/smooth/ftgrays.c (FT_RENDER_POOL_SIZE, FT_MAX, FT_ABS,
444 FT_HYPOT) [_STANDALONE_]: Define macros.
445
Werner Lemberg03ccfd02015-02-22 08:25:16 +01004462015-02-22 Werner Lemberg <wl@gnu.org>
447
Werner Lembergcb13e712015-02-23 06:41:52 +0100448 [smooth] Signedness fixes.
449
450 * src/smooth/ftgrays.c, src/smooth/ftsmooth.c: Apply.
451
4522015-02-22 Werner Lemberg <wl@gnu.org>
453
Werner Lemberga974e9a2015-02-22 21:02:13 +0100454 * src/raster/ftraster.c: Use the file's typedefs everywhere.
455
4562015-02-22 Werner Lemberg <wl@gnu.org>
457
Werner Lembergb0ebcdc2015-02-22 20:42:49 +0100458 * src/sfnt/ttpost.c (load_format_20): Fix error tracing message.
459
460 Bug introduced 6 commits earlier.
461
4622015-02-22 Werner Lemberg <wl@gnu.org>
463
Werner Lemberg22b1d5c2015-02-22 20:41:03 +0100464 [pshinter] Fix thinko.
465
466 * src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Correctly
467 check `count'.
468 Bug introduced two commits earlier.
469
4702015-02-22 Werner Lemberg <wl@gnu.org>
471
Werner Lembergca96fe02015-02-22 20:05:04 +0100472 [raster] Signedness fixes.
473
474 * src/raster/ftraster.c, src/raster/ftrend1.c: Apply.
475
4762015-02-22 Werner Lemberg <wl@gnu.org>
477
Werner Lemberg452066c2015-02-22 15:59:02 +0100478 [pshinter] Signedness fixes.
479
480 * src/pshinter/pshalgo.c, src/pshinter/pshglob.c,
481 src/pshinter/pshrec.c: Apply.
482
4832015-02-22 Werner Lemberg <wl@gnu.org>
484
Werner Lemberg41c2ed82015-02-22 15:57:47 +0100485 [pshinter] Use macros for (unsigned) flags, not enumerations.
486
487 * src/pshinter/pshalgo.h (PSH_Hint_Flags): Replace with macros.
488 Updated.
489 * src/pshinter/pshrec.h (PS_Hint_Flags): Replace with macros.
490
4912015-02-22 Werner Lemberg <wl@gnu.org>
492
Werner Lemberg25c2f882015-02-22 15:54:31 +0100493 * src/pshinter/pshrec.c: Simplify.
494 (ps_hints_open, ps_hints_stem): Remove switch statement.
495
4962015-02-22 Werner Lemberg <wl@gnu.org>
497
Werner Lemberg01f08422015-02-22 12:03:28 +0100498 [sfnt] Signedness fixes.
499
500 * src/sfnt/pngshim.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap.c,
501 src/sfnt/ttkern.c, src/sfnt/ttload.c, src/sfnt/ttpost.c,
502 src/sfnt/ttsbit.c: Apply.
503 * src/sfnt/sfdriver.c: Apply.
504 (sfnt_get_ps_name): Simplify.
505
5062015-02-22 Werner Lemberg <wl@gnu.org>
507
Werner Lemberg3c374c82015-02-22 09:16:53 +0100508 [bdf] Signedness fixes.
509
510 * src/bdf/bdf.h, src/bdf/bdfdrivr.c, src/bdf/bdfdrivr.h,
511 src/bdf/bdflib.c: Apply.
512
5132015-02-22 Werner Lemberg <wl@gnu.org>
514
Werner Lembergb13945a2015-02-22 09:15:47 +0100515 * src/bdf/bdflib.c (_bdf_atous): New function.
516 (_bdf_parse_glyphs, _bdf_parse_start): Use it.
517
5182015-02-22 Werner Lemberg <wl@gnu.org>
519
Werner Lemberg03ccfd02015-02-22 08:25:16 +0100520 [pcf] Signedness fixes.
521
522 * src/pcf/pcf.h, src/pcf/pcfdrivr.c: Apply.
523 * src/pcf/pcfread.c: Apply.
524 (pcf_get_encodings): Ignore invalid negative encoding offsets.
525
Werner Lemberg633a7292015-02-21 07:02:01 +01005262015-02-21 Werner Lemberg <wl@gnu.org>
527
Werner Lemberg3d7e53f2015-02-21 11:30:54 +0100528 * src/winfonts/winfnt.c: Signedness fixes.
529
5302015-02-21 Werner Lemberg <wl@gnu.org>
531
Werner Lemberg7b6b4172015-02-21 10:39:34 +0100532 [type42] Signedness fixes.
533
534 * src/type42/t42parse.c, src/type42/t42parse.h,
535 src/type42/t42types.h: Apply.
536
5372015-02-21 Werner Lemberg <wl@gnu.org>
538
Werner Lemberg8bfffb42015-02-21 09:52:29 +0100539 [pfr] Signedness fixes.
540
541 * src/pfr/pfrdrivr.c, src/pfr/pfrgload.c, src/pfr/pfrload.c,
542 src/pfr/pfrload.h, src/pfr/pfrobjs.c, src/pfr/pfrsbit.c,
543 src/pfr/pfrtypes.h: Apply.
544
5452015-02-21 Werner Lemberg <wl@gnu.org>
546
Werner Lemberg633a7292015-02-21 07:02:01 +0100547 [cff] Minor signedness fixes related to last commit.
548
549 * src/cff/cf2ft.c, src/cff/cf2intrp.c, src/cff/cffgload.c: Apply.
550
Werner Lemberg3a8d0532015-02-20 08:35:32 +01005512015-02-20 Werner Lemberg <wl@gnu.org>
552
Werner Lembergc00b05f2015-02-20 20:42:55 +0100553 [cff] Thinkos in bias handling.
554
555 Only the final result is always positive.
556
557 Bug introduced three commits earlier.
558
559 * src/cff/cffgload.c, src/cff/cffgload.h: Apply.
560
5612015-02-20 Werner Lemberg <wl@gnu.org>
562
Werner Lemberg2bf03eb2015-02-20 20:14:11 +0100563 [cid] Fix signedness issues and emit some better error codes.
564
565 * src/cid/cidgload.c, src/cid/cidload.h, src/cid/cidobjs.c,
566 src/cid/cidparse.h: Apply.
567 * src/cid/cidload.c: Apply.
568 (parse_fd_array): Reject negative values for number of dictionaries.
569 * src/cid/cidparse.c: Apply.
570 (cid_parser_new): Reject negative values for hex data length.
571
5722015-02-20 Werner Lemberg <wl@gnu.org>
573
Werner Lembergeb05bfb2015-02-20 08:37:35 +0100574 [cff] Signedness fixes for new engine.
575
576 * src/cff/cf2arrst.c, src/cff/cf2fixed.h, src/cff/cf2ft.c,
577 src/cff/cf2ft.h, src/cff/cf2hints.c, src/cff/cf2intrp.c: Apply.
578
5792015-02-20 Werner Lemberg <wl@gnu.org>
580
Werner Lemberg3a8d0532015-02-20 08:35:32 +0100581 [cff] Signedness fixes for basic infrastructure and old engine.
582
583 * include/internal/pshints.h, src/cff/cffdrivr.c,
584 src/cff/cffgload.c, src/cff/cffgload.h, src/cff/cffload.c,
585 src/cff/cffobjs.c, src/cff/cffparse.c, src/pshinter/pshrec.c: Apply.
586
Werner Lemberg81e5ff52015-02-19 09:46:48 +01005872015-02-19 Werner Lemberg <wl@gnu.org>
588
Werner Lemberg3a1df3e2015-02-19 15:42:48 +0100589 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Ignore `countSizePairs'.
590
591 This is hard-coded to value 2 in `fvar' version 1.0 (and no newer
592 version exists), but some fonts set it incorrectly.
593
594 Problem reported by Adam Twardoch <adam@fontlab.com>.
595
5962015-02-19 Werner Lemberg <wl@gnu.org>
597
Werner Lemberg93a884c2015-02-19 14:11:16 +0100598 [cff] Emit better error code for invalid private dict size.
599
600 * src/cff/cffparse.c (cff_parse_private_dict): Reject negative
601 values for size and offset.
602
6032015-02-19 Werner Lemberg <wl@gnu.org>
604
Werner Lembergb57bb112015-02-19 10:44:18 +0100605 [autofit] Fix signedness issues.
606
607 * src/autofit/afangles.c, src/autofit/afcjk.c,
608 src/autofit/afglobal.c, src/autofit/afhints.c,
609 src/autofit/aflatin.c, src/autofit/aflatin2.c, src/autofit/afwarp.c,
610 src/autofit/hbshim.c: Apply.
611
6122015-02-19 Werner Lemberg <wl@gnu.org>
613
Werner Lemberg81e5ff52015-02-19 09:46:48 +0100614 [autofit] Use macros for (unsigned) flags, not enumerations.
615
616 This harmonizes with other code in FreeType (and reduces the number
617 of necessary casts to avoid compiler warnings).
618
619 * src/autofit/afblue.hin: Make flag macros unsigned.
620 * src/autofit/afblue.h: Regenerated.
621
622 * src/autofit/afcjk.h: Replace flag enumeration with macros.
623 * src/autofit/afcjk.c: Updated.
624
625 * src/autofit/afhints.h (AF_Flags, AF_Edge_Flags): Replace with
626 macros.
627 * src/autofit/afhints.c: Updated.
628
629 * src/autofit/aflatin.h: Replace flag enumerations with macros.
630 * src/autofit/aflatin.c, src/autofit/aflatin2.c: Updated.
631
632 * src/autofit/aftypes.h (AF_ScalerFlags): Replace with macros.
633
Werner Lemberg6a0ded72015-02-18 08:51:22 +01006342015-02-18 Werner Lemberg <wl@gnu.org>
635
Werner Lemberg3b5f3322015-02-18 11:45:22 +0100636 [type1] Fix signedness issues.
637
638 * include/internal/psaux.h, include/internal/t1types.h,
639 src/psaux/psobjs.c, src/psaux/psobjs.h, src/psaux/t1decode.c,
640 src/type1/t1gload.c, src/type1/t1load.c, src/type1/t1parse.c: Apply.
641
6422015-02-18 Werner Lemberg <wl@gnu.org>
643
Werner Lemberg272e3cd2015-02-18 11:38:46 +0100644 [psaux, type1] Fix minor AFM issues.
645
646 * include/internal/t1types.h (AFM_KernPairRec): Make indices
647 unsigned.
648 Update users.
649 (AFM_FontInfoRec): Make element counters unsigned.
650 Update users.
651 * src/psaux/afmparse.h (AFM_ValueRec): Add union member for unsigned
652 int.
653
654 * src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs):
655 Reject negative values for number of kerning elements.
656
657 * src/type1/t1afm.c, src/tools/test_afm.c: Updated.
658
6592015-02-18 Werner Lemberg <wl@gnu.org>
660
Werner Lemberg6bd7d282015-02-18 09:22:06 +0100661 Don't use `FT_PtrDist' for lengths.
662
663 Use FT_UInt instead.
664
665 * include/internal/psaux.h (PS_Table_FuncsRec, PS_TableRec,
666 T1_DecoderRec): Do it.
667
668 * include/internal/t1types.h (T1_FontRec): Ditto.
669
670 * src/cid/cidload.c (cid_parse_dict): Updated.
671 * src/pfr/pfrload.c (pfr_extra_item_load_font_id): Ditto.
672 * src/psaux/psobjs.c (ps_table_add), src/psaux/psobjs.h: Ditto.
673 * src/type1/t1load.c (parse_blend_axis_types, parse_encoding,
674 parse_chharstrings, parse_dict): Ditto.
675 * src/type42/t42parse.c (t42_parse_encoding, t42_parse_charstrings,
676 t42_parse_dict): Ditto.
677
6782015-02-18 Werner Lemberg <wl@gnu.org>
679
Werner Lemberg6a0ded72015-02-18 08:51:22 +0100680 * src/type1/t1driver.c (t1_ps_get_font_value): Clean up.
681 This handles negative values better, avoiding many casts.
682
Werner Lemberg0a33a392015-02-17 08:03:05 +01006832015-02-17 Werner Lemberg <wl@gnu.org>
684
Werner Lembergd3240c52015-02-17 20:30:36 +0100685 [base] Fix Savannah bug #44284.
686
687 * src/base/ftcalc.c (FT_MulFix): Typos.
688
6892015-02-17 Werner Lemberg <wl@gnu.org>
690
Werner Lemberg1f7a4e12015-02-17 10:17:56 +0100691 [truetype] Finish compiler warning fixes for signedness issues.
692
693 * src/truetype/ttgxvar.c, src/truetype/ttsubpix.c,
694 src/truetype/ttsubpix.h: Apply.
695
6962015-02-17 Werner Lemberg <wl@gnu.org>
697
Werner Lemberg9daea2c2015-02-17 09:27:56 +0100698 * src/truetype/ttsubpix.c: Adding missing `static' keywords.
699
7002015-02-17 Werner Lemberg <wl@gnu.org>
701
Werner Lembergd9c3f152015-02-17 09:21:26 +0100702 [truetype] More signedness fixes.
703
704 * include/internal/tttypes.h, src/truetype/ttinterp.h,
705 src/truetype/ttobjs.h, src/truetype/ttinterp.c,
706 src/truetype/ttobjs.c: Apply.
707
7082015-02-17 Werner Lemberg <wl@gnu.org>
709
Werner Lemberg0a33a392015-02-17 08:03:05 +0100710 [truetype] Various signedness fixes.
711
712 * include/internal/ftgloadr.h, src/truetype/ttpload.c: Apply.
713
714 * src/truetype/ttgload.c: Apply.
715 (TT_Get_VMetrics): Protect against invalid ascenders and descenders
716 while constructing advance height.
717
Werner Lemberg587351b2015-02-16 07:03:22 +01007182015-02-16 Werner Lemberg <wl@gnu.org>
719
Werner Lemberg76abc752015-02-16 22:00:27 +0100720 [base] Finish compiler warning fixes for signedness issues.
721
722 * src/base/ftglyph.c, src/base/ftlcdfil.c, src/base/ftstroke.c:
723 Apply.
724
7252015-02-16 Werner Lemberg <wl@gnu.org>
726
Werner Lemberg10aa8582015-02-16 20:12:54 +0100727 * include/tttables.h (TT_OS2): `fsType' must be FT_UShort.
728
7292015-02-16 Werner Lemberg <wl@gnu.org>
730
Werner Lemberg2e814fc2015-02-16 20:05:08 +0100731 More minor signedness warning fixes.
732
733 * src/base/ftbbox.c, src/base/ftbitmap.c, src/base/fttrigon.c,
734 src/base/ftutil.c: Apply.
735
7362015-02-16 Werner Lemberg <wl@gnu.org>
737
Werner Lemberg82235d02015-02-16 19:35:16 +0100738 Next round of minor compiler warning fixes.
739
740 * include/internal/ftrfork.h (FT_RFork_Ref): Change `offset' member
741 type to `FT_Long'.
742 (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Add `static' keyword.
743
Werner Lemberg3aaebe32015-02-23 08:20:27 +0100744 * include/internal/ftstream.h (FT_Stream_Pos): Return `FT_ULong'.
Werner Lemberg82235d02015-02-16 19:35:16 +0100745
746 * src/base/ftoutln.c, src/base/ftrfork.c, src/base/ftstream.c:
747 Signedess fixes.
748
7492015-02-16 Werner Lemberg <wl@gnu.org>
750
Werner Lemberg3cfa4d12015-02-16 17:59:06 +0100751 Various minor signedness fixes.
752
753 * include/ftadvanc.h, include/internal/ftobjs.h,
754 src/base/ftgloadr.c, src/base/ftobjs.c: Apply.
755
7562015-02-16 Werner Lemberg <wl@gnu.org>
757
Werner Lemberg6f325c22015-02-16 11:31:32 +0100758 New `TYPEOF' macro.
759
760 This helps suppress signedness warnings, avoiding issues with
761 implicit conversion changes.
762
763 * include/config/ftconfig.h, builds/unix/ftconfig.in,
764 builds/vms/ftconfig.h (TYPEOF): Define.
765
766 * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
767 src/autofit/afwarp.h (AF_WARPER_FLOOR): Use it.
768
7692015-02-16 Werner Lemberg <wl@gnu.org>
770
Werner Lemberg1f377f02015-02-16 08:37:09 +0100771 * src/base/ftsystem.c: Use casts in standard C function wrappers.
772 (ft_alloc, ft_realloc, ft_ansi_stream_io, FT_Stream_Open): Do it.
773
7742015-02-16 Werner Lemberg <wl@gnu.org>
775
Werner Lemberg0814b802015-02-16 07:29:53 +0100776 Fix Savannah bug #44261.
777
778 * builds/unix/detect.mk (setup) [unix]: Set `CONFIG_SHELL' in the
779 environment also while calling the configure script.
780
7812015-02-16 Werner Lemberg <wl@gnu.org>
782
Werner Lemberg587351b2015-02-16 07:03:22 +0100783 * include/internal/ftmemory.h: Add some `FT_Offset' casts.
784 (FT_MEM_SET, FT_MEM_COPY, FT_MEM_MOVE, FT_ARRAY_ZERO, FT_ARRAY_COPY,
785 FT_MEM_MOVE): Do it.
786
Werner Lemberg6d7d6362015-02-15 12:30:42 +01007872015-02-15 Werner Lemberg <wl@gnu.org>
788
Werner Lemberg48186b82015-02-16 06:37:36 +0100789 [base] Clean up signedness issues in `ftdbgmem.c'.
790
791 Also fix other minor issues.
792
793 * src/base/ftdbgmem.c (FT_MemTableRec): Replace all FT_ULong types
794 with FT_Long for consistency.
795 (ft_mem_primes): Change type to `FT_Int'.
796 (ft_mem_closest_prime, ft_mem_table_set): Updated.
797
798 (ft_mem_debug_panic, ft_mem_debug_alloc, ft_mem_debug_free,
799 ft_mem_debug_realloc): Use `static' keyword and fix signedness
800 warnings where necessary.
801
802 (ft_mem_table_resize, ft_mem_table_new, ft_mem_table_destroy,
803 ft_mem_table_get_nodep, ft_mem_debug_init, FT_DumpMemory): Fix types
804 and add or remove casts to avoid signedness warnings.
805
8062015-02-15 Werner Lemberg <wl@gnu.org>
807
Werner Lemberg6d7d6362015-02-15 12:30:42 +0100808 [base] Clean up signedness in arithmetic functions.
809
810 This makes the code more readable and reduces compiler warnings.
811
812 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round, FT_MulFix,
813 FT_DivFix): Convert input parameters to unsigned, do the
814 computation, then convert the result back to signed.
815 (ft_corner_orientation): Fix casts.
816
Werner Lemberg92359bd2015-02-07 09:47:23 +01008172015-02-07 Werner Lemberg <wl@gnu.org>
818
819 [sfnt] Fix Savannah bug #44184.
820
821 * src/sfnt/ttload.c (check_table_dir, tt_face_load_font_dir): No
822 longer reject `htmx' and `vmtx' tables with invalid length but
823 sanitize them.
824
Jon Anderson416d8792015-02-06 10:16:45 +01008252015-02-06 Jon Anderson <jon@websupergoo.com>
826
827 [truetype] Fix regression in the incremental glyph loader.
828
829 * src/truetype/ttgload.c (load_truetype_glyph): For incremental
830 fonts, the glyph index may be greater than the number of glyphs
831 indicated, so guard the check with a preprocessor conditional.
832
Werner Lembergb6cb4992015-02-06 08:46:06 +01008332015-02-06 Werner Lemberg <wl@gnu.org>
834
835 [autofit] Fix potential memory leak.
836
837 While this doesn't show up with FreeType, exactly the same code
838 leaks with ttfautohint's modified auto-hinter code (which gets used
839 in a slightly different way).
840
841 It certainly doesn't harm since it is similar to already existing
842 checks in the code for embedded arrays.
843
844 * src/autofit/afhints.c (af_glyph_hints_reload): Set `max_contours'
845 and `max_points' for all cases.
846
Werner Lemberg19146a52015-01-31 11:01:33 +01008472015-01-31 Werner Lemberg <wl@gnu.org>
848
849 [autofit] Add support for Thai script.
850
851 Thanks to Ben Mitchell <ben@rosettatype.com> for guidance with blue
852 zone characters!
853
854 * src/autofit/afblue.dat: Add blue zone data for Thai.
855
856 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
857
858 * src/autofit/afscript.h: Add Thai standard characters.
859
860 * src/autofit/afranges.c: Add Thai data.
861
862 * src/autofit/afstyles.h: Add Thai data.
863
Behdad Esfahbod264b5e42015-01-23 21:23:55 +01008642015-01-23 Behdad Esfahbod <behdad@behdad.org>
865
866 [raster] Handle `FT_RASTER_FLAG_AA' correctly.
867
868 This fixes a breakage caused by the commit `[raster] Remove
869 5-level gray AA mode from monochrome rasterizer.'.
870
Werner Lembergd2c531e2015-01-23 22:37:42 +0100871 Problem reported by Markus Trippelsdorf <markus@trippelsdorf.de>.
Behdad Esfahbod264b5e42015-01-23 21:23:55 +0100872
873 * src/raster/ftraster.c (ft_black_render): Handle
874 `FT_RASTER_FLAG_AA'.
875
876 * src/raster/ftrend1.c (ft_raster1_render): Remove gray AA mode
877 remnants.
878
Werner Lemberg79a5ac62015-01-18 07:30:04 +01008792015-01-18 Werner Lemberg <wl@gnu.org>
880
881 * src/base/ftobjs.c (FT_New_Library): Fix compiler warning.
882
Chris Liddell942aa5f2015-01-18 07:29:48 +01008832015-01-18 Chris Liddell <chris.liddell@artifex.com>
884
885 [raster] Fix Savannah bug #44022.
886
887 Add fallback for glyphs with degenerate bounding boxes.
888
889 If a glyph has only one very narrow feature, the bbox can end up
890 with either the width or height of the bbox being 0, in which case
891 no raster memory is allocated and no attempt is made to render the
892 glyph. This is less than ideal when the drop-out compensation in
893 the rendering code would actually result in the glyph being
894 rendered.
895
896 This problem can be observed with the `I' glyph (gid 47) in the
897 Autodesk RomanS TrueType font.
898
899 * src/raster/ftrend1.c (ft_raster1_render): Add a fallback if either
900 dimension is zero to explicitly round up/down (instead of simply
901 round).
902
Werner Lemberg50be00d2015-01-17 20:38:31 +01009032015-01-17 Werner Lemberg <wl@gnu.org>
904
905 Add some tools to handle yearly copyright notice updates.
906
907 We are now following the GNU guidelines: A new release automatically
908 means that the copyright year of all affected files gets updated; it
909 is no longer used to track years of modification changes.
910
911 * src/tools/update-copyright-year: New Perl script.
912 * src/tools/update-copyright: New shell script that calls
913 `update-copyright-year' on all files.
914 * src/tools/no-copyright: Exceptions that should not be handled by
915 `update-copyright'
916
Werner Lemberg4eff8542015-01-14 20:06:19 +01009172015-01-14 Werner Lemberg <wl@gnu.org>
918
919 * docs/CHANGES: Updated, using a description from Behdad.
920
Behdad Esfahbod3f9b3d82015-01-14 15:48:12 +01009212015-01-14 Behdad Esfahbod <behdad@behdad.org>
922
Behdad Esfahbod48c86622015-01-14 19:38:36 +0100923 * src/autofit/afmodule.c (af_autofitter_done): Fix compiler warning.
924
9252015-01-14 Behdad Esfahbod <behdad@behdad.org>
926
Behdad Esfahbod56ddafa2015-01-14 19:36:02 +0100927 [autofit] Add embedded array of segments and edges.
928
929 Avoids multiple mallocs per typical glyphs.
930
931 With this and recent changes to avoid mallocs, the thread-safe
932 stack-based loader is now as fast as the previous model that had one
933 cached singleton.
934
935 * src/autofit/afhints.h (AF_SEGMENTS_EMBEDDED, AF_EDGES_EMBEDDED):
936 New macros.
937 (AF_AxisHintsRec): Add two arrays for segments and edges.
938
939 * src/autofit/afhints.c (af_axis_hints_new_segment): Only allocate
940 data if number of segments exceeds given threshold value.
941 (af_axis_hints_new_edge): Only allocate data if number of edges
942 exceeds given threshold value.
943 (af_glyph_hints_done): Updated.
944
9452015-01-14 Behdad Esfahbod <behdad@behdad.org>
946
Behdad Esfahbod6f16b102015-01-14 19:26:49 +0100947 [autofit] Add embedded arrays for points and contours.
948
949 This avoids at least two malloc calls for typical glyphs.
950
951 * src/autofit/afhints.h (AF_POINTS_EMBEDDED, AF_CONTOURS_EMBEDDED):
952 New macros.
953 (AF_GlyphHintsRec): Add two arrays for contours and points.
954
955 * src/autofit/afhints.c (af_glyph_hints_init, af_glyph_hints_done):
956 Updated.
957 (af_glyph_hints_reload): Only allocate data if number of contours or
958 points exceeds given threshold values.
959
9602015-01-14 Behdad Esfahbod <behdad@behdad.org>
961
Behdad Esfahbodc2733652015-01-14 19:16:12 +0100962 [autofit] Allocate hints object on the stack.
963
964 This avoids one malloc per load.
965
966 * src/autofit/afloader.h (AF_LoaderRec): Change type of `hints' to
967 `AF_GlyphHints'.
968 Update prototype.
969
970 * src/autofit/afloader.c (af_loader_init): Use `AF_GlyphHints'
971 parameter instead of `FT_Memory'.
972 (af_loader_done): Directly reset `load_hints'.
973 (af_loader_load_g): Updated.
974
975 * src/autofit/afmodule.c (af_autofitter_load_glyph): Use local
976 `hints' object.
977
9782015-01-14 Behdad Esfahbod <behdad@behdad.org>
979
Behdad Esfahboda4117fb2015-01-14 19:07:54 +0100980 [autofit] Reuse slot glyph loader.
981
982 No need to create a new glyph loader; we can reuse the one from
983 `slot->internal->loader'. It's hard to tell why it was written that
984 way originally, but new code looks sound and correct to me, and
985 avoids lots of allocations.
986
987 * src/autofit/afloader.c (af_loader_init): Change return type to
988 `void'.
989 Don't call `FT_GlyphLoader_New'.
990 (af_loader_reset): Don't call `FT_GlyphLoader_Rewind'.
991 (af_loader_load_g): Update code to use `internal->loader', which
992 doesn't need copying of data.
993
994 * src/autofit/afloader.h (AF_LoaderRec): Remove `gloader' member.
995 Update prototype.
996
997 * src/autofit/afmodule.c (af_autofitter_load_glyph): Updated.
998
9992015-01-14 Behdad Esfahbod <behdad@behdad.org>
1000
Behdad Esfahbodae6699f2015-01-14 18:55:39 +01001001 [autofit] Remove (unused) support for composite glyphs.
1002
1003 We never have to deal with composite glyphs in the autohinter, as
1004 those will be loaded into FORMAT_OUTLINE by the recursed
1005 `FT_Load_Glyph' function.
1006
1007 In the rare cases that FT_LOAD_NO_RECURSE is set, it will imply
1008 FT_LOAD_NO_SCALE as per `FT_Load_Glyph', which then implies
1009 FT_LOAD_NO_HINTING:
1010
1011 /* resolve load flags dependencies */
1012
1013 if ( load_flags & FT_LOAD_NO_RECURSE )
1014 load_flags |= FT_LOAD_NO_SCALE |
1015 FT_LOAD_IGNORE_TRANSFORM;
1016
1017 if ( load_flags & FT_LOAD_NO_SCALE )
1018 {
1019 load_flags |= FT_LOAD_NO_HINTING |
1020 FT_LOAD_NO_BITMAP;
1021
1022 load_flags &= ~FT_LOAD_RENDER;
1023 }
1024
1025 and as such the auto-hinter is never called. Thus, the recursion in
1026 `af_loader_load_g' never actually happens. So remove the depth
1027 counter as well.
1028
1029 * src/autofit/afloader.c (af_loader_load_g): Remove `depth'
1030 parameter.
1031 <FT_GLYPH_FORMAT_COMPOSITE>: Remove associated code.
1032 (af_loader_load_glyph): Updated.
1033
10342015-01-14 Behdad Esfahbod <behdad@behdad.org>
1035
Behdad Esfahbodc242fe42015-01-14 18:48:14 +01001036 [raster] Fix uninitialized memory access.
1037
1038 Apparently `ras.cProfile' might be uninitialized. This will be the
1039 case if `ras.top == ras.cProfile->offset', as can be seen in
1040 `End_Profile'. The overshoot code introduced in a change `Fix B/W
1041 rasterization of subglyphs with different drop-out modes.' (from
1042 2009-06-18) violated this, accessing `ras.cProfile->flags'
1043 unconditionally just before calling `End_Profile' (which then
1044 detected that `cProfile' is uninitialized and didn't touch it).
1045
1046 This was harmless, and was not detected by valgrind before because
1047 the objects were allocated on the `raster_pool', which was always
1048 initialized. With recent change to allocate raster buffers on the
1049 stack, valgrind now reported this invalid access.
1050
1051 * src/raster/ftraster.c (Convert_Glyph): Don't access an
1052 uninitialized `cProfile'.
1053
10542015-01-14 Behdad Esfahbod <behdad@behdad.org>
1055
Behdad Esfahbodb2ba6862015-01-14 18:43:13 +01001056 [smooth] Fix uninitialized memory access.
1057
1058 Looks like `ras.span_y' could always be used without initialization.
1059 This was never detected by valgrind before because the library-wide
1060 `raster_pool' was used for the worker object and `raster_pool' was
1061 originally zero'ed. But subsequent reuses of it were using `span_y'
1062 uninitialized. With the recent change to not use `render_pool' and
1063 allocate worker and buffer on the stack, valgrind now detects this
1064 uninitialized access.
1065
1066 * src/smooth/ftgrays.c (gray_raster_render): Initialize
1067 `ras.span_y'.
1068
10692015-01-14 Behdad Esfahbod <behdad@behdad.org>
1070
Behdad Esfahbod603292d2015-01-14 18:35:56 +01001071 [base] Don't initialize unused `driver->glyph_loader'.
1072
1073 * src/base/ftobjs.c (Destroy_Driver): Don't call
1074 `FT_GlyphLoader_Done'.
1075 (FT_Add_Module): Don't call `FT_GlyphLoader_New'.
1076
10772015-01-14 Behdad Esfahbod <behdad@behdad.org>
1078
Behdad Esfahbod51634252015-01-14 18:30:59 +01001079 [base] Don't allocate `library->raster_pool' anymore.
1080
1081 It's unused after the following commits:
1082
1083 [raster] Allocate render pool for mono rasterizer on the stack.
1084 [raster] Remove 5-level gray AA mode from monochrome rasterizer.
1085
1086 The value of FT_RENDER_POOL_SIZE still serves the purpose it used to
1087 serve, which is, to adjust the pool size. But the pool is now
1088 allocated on the stack on demand.
1089
1090 * src/base/ftobjs.c (FT_New_Library, FT_Done_Library): Implement.
1091
10922015-01-14 Behdad Esfahbod <behdad@behdad.org>
1093
Behdad Esfahbod6dfdaf42015-01-14 18:21:13 +01001094 [base] Do not reorder library->renderers upon use.
1095
1096 Instead of keeping `library->renderers' in a MRU order, just leave
1097 it as-is. The MRU machinery wasn't thread-safe.
1098
1099 With this patch, rasterizing glyphs from different faces from
1100 different threads doesn't fail choosing rasterizer
1101 (FT_Err_Cannot_Render_Glyph).
1102
1103 Easiest to see that crash was to add a `printf' (or otherwise let
1104 thread yield in FT_Throw with debugging enabled).
1105
1106 * src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c
1107 (FT_Outline_Render): Don't call `FT_Set_Renderer'.
1108
11092015-01-14 Behdad Esfahbod <behdad@behdad.org>
1110
Behdad Esfahboda773c302015-01-14 18:16:20 +01001111 [raster] Allocate render pool for mono rasterizer on the stack.
1112
1113 Instead of using the `render_pool' member of `FT_Library' that is
1114 provided down to the rasterizer, completely ignore that and allocate
1115 needed objects on the stack instead.
1116
1117 With this patch, rasterizing glyphs from different faces from
1118 different threads doesn't crash in the monochrome rasterizer.
1119
1120 * src/raster/ftraster.c (black_TRaster): Remove `buffer',
1121 `buffer_size', and `worker' members.
1122
1123 (ft_black_render): Create `buffer' locally.
1124 (ft_black_reset): Updated.
1125
11262015-01-14 Behdad Esfahbod <behdad@behdad.org>
1127
Behdad Esfahbod8dc86352015-01-14 18:06:22 +01001128 [raster] Remove 5-level gray AA mode from monochrome rasterizer.
1129
1130 It was off by default and couldn't be turned on at runtime. And the
1131 smooth rasterizer superceded it over ten years ago. No point in
1132 keeping. Comments suggested that it was there for compatibility
1133 with FreeType 1.
1134
1135 550 lines down.
1136
1137 * src/raster/ftraster.c (FT_RASTER_OPTION_ANTI_ALIASING,
1138 RASTER_GRAY_LINES): Remove macros and all associated code.
1139
1140 (black_TWorker): Remove `gray_min_x' and `gray_max_x'.
1141 (black_TRaster): Remove `grays' and `gray_width'.
1142
1143 (Vertical_Sweep_Init, Vertical_Sweep_Span, Vertical_Sweep_Drop,
1144 ft_black_render): Updated.
1145
1146 * src/raster/ftrend1.c (ft_raster1_render): Simplify code.
1147 (ft_raster5_renderer_class): Removed.
1148
11492015-01-14 Behdad Esfahbod <behdad@behdad.org>
1150
Behdad Esfahbod747ae2c2015-01-14 17:54:26 +01001151 [smooth] Allocate render pool for smooth rasterizer on the stack.
1152
1153 Instead of using the `render_pool' member of `FT_Library' that is
1154 provided down to the rasterizer, completely ignore that and allocate
1155 needed objects on the stack instead.
1156
1157 With this patch, rasterizing glyphs from different faces from
1158 different threads doesn't crash in the smooth rasterizer.
1159
1160 Bugs:
1161
1162 https://bugzilla.redhat.com/show_bug.cgi?id=678397
1163 https://bugzilla.redhat.com/show_bug.cgi?id=1004315
1164 https://bugzilla.redhat.com/show_bug.cgi?id=1165471
1165 https://bugs.freedesktop.org/show_bug.cgi?id=69034
1166
1167 * src/smooth/ftgrays.c (gray_TRaster): Remove `buffer',
1168 `buffer_size', `band_size', and `worker' members.
1169
1170 (gray_raster_render): Create `buffer', `buffer_size', and
1171 `band_size' locally.
1172 (gray_raster_reset): Updated.
1173
11742015-01-14 Behdad Esfahbod <behdad@behdad.org>
1175
Behdad Esfahbod531d4632015-01-14 17:46:55 +01001176 [truetype] Allocate TT_ExecContext in TT_Size instead of TT_Driver.
1177
1178 Previously the code had stipulation for using a per-TT_Size exec
1179 context if `size->debug' was true. But there was no way that
1180 `size->debug' could *ever* be true. As such, the code was always
1181 using the singleton `TT_ExecContext' that was stored in `TT_Driver'.
1182 This was, clearly, not threadsafe.
1183
1184 With this patch, loading glyphs from different faces from different
1185 threads doesn't crash in the bytecode loader code.
1186
1187 * src/truetype/ttobjs.h (TT_SizeRec): Remove `debug' member.
1188 (TT_DriverRec): Remove `context' member.
1189
1190 * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Remove
1191 `TT_ExecContext' code related to a global `TT_Driver' object.
1192
1193 (tt_driver_done): Don't remove `TT_ExecContext' object here but ...
1194 (tt_size_done_bytecode): ... here.
1195
1196 (tt_driver_init): Don't create `TT_ExecContext' object here but ...
1197 (tt_size_init_bytecode): ... here, only on demand.
1198
1199 * src/truetype/ttinterp.c (TT_Run_Context): Remove defunct debug
1200 code.
1201 (TT_New_Context): Remove `TT_ExecContext' code related to a global
1202 `TT_Driver' object.
1203
1204 * src/truetype/ttinterp.h: Updated.
1205
1206 * src/truetype/ttgload.c (TT_Hint_Glyph, tt_loader_init): Updated.
1207
12082015-01-14 Behdad Esfahbod <behdad@behdad.org>
1209
Behdad Esfahbod89bc8d42015-01-14 16:01:19 +01001210 [autofit] Allocate AF_Loader on the stack instead of AF_Module.
1211
1212 Stop sharing a global `AF_Loader'. Allocate one on the stack during
1213 glyph load.
1214
1215 Right now this results in about 25% slowdown, to be fixed in a
1216 following commit.
1217
1218 With this patch loading glyphs from different faces from different
1219 threads doesn't immediately crash in the autohinting loader code.
1220
1221 Bugs:
1222
1223 https://bugzilla.redhat.com/show_bug.cgi?id=1164941
1224
1225 * src/autofit/afloader.c (af_loader_init): Pass
1226 `AF_Loader' and `FT_Memory' instead of `AF_Module' as arguments.
1227 (af_loader_reset, af_loader_load_glyph): Also pass `loader' as
1228 argument.
1229 (af_loader_done): Use `AF_Loader' instead of `AF_Module' as
1230 argument.
1231
1232 * src/autofit/afmodule.c (af_autofitter_init): Don't call
1233 `af_loader_init'.
1234 (af_autofitter_done): Don't call `af_loader_done'.
1235 (af_autofitter_load_glyph): Use a local `AF_Loader' object.
1236
1237 * src/autofit/afloader.h: Include `afmodule.h'.
1238 Update prototypes.
1239 Move typedef for `AF_Module' to...
1240
1241 * src/autofit/afmodule.h: ... this place.
1242 No longer include `afloader.h'.
1243
12442015-01-14 Behdad Esfahbod <behdad@behdad.org>
1245
Behdad Esfahbod3f9b3d82015-01-14 15:48:12 +01001246 * src/type42/t42objs.h (T42_DriverRec): Remove unused member.
1247
Werner Lemberg36d03c92015-01-12 11:26:30 +010012482015-01-12 Werner Lemberg <wl@gnu.org>
1249
1250 Fix Savannah bug #43976.
1251
1252 Assure that FreeType's internal include directories are found before
1253 `CPPFLAGS' (which might be set by the user in the environment), and
1254 `CPPFLAGS' before `CFLAGS'.
1255
1256 * builds/freetype.mk (FT_CFLAGS): Don't add `INCLUDE_FLAGS'.
1257 (FT_COMPILE): Make this a special variable for compiling only the
1258 files handled in `freetype.mk'.
1259 (.c.$O): Removed, unused.
1260
1261 * src/*/rules.mk (*_COMPILE): Fix order of include directories.
1262
Werner Lembergd03a67a2015-01-11 08:39:14 +010012632015-01-11 Werner Lemberg <wl@gnu.org>
1264
Werner Lemberg95b57052015-01-11 09:50:49 +01001265 [truetype] Prettyfing.
1266
1267 * src/truetype/ttinterp.c (project, dualproj, fast_project,
1268 fast_dualproj): Rename to...
1269 (PROJECT, DUALPROJ, FAST_PROJECT, FAST_DUALPROJ): ... this.
1270
12712015-01-11 Werner Lemberg <wl@gnu.org>
1272
Werner Lembergea173c02015-01-11 08:58:54 +01001273 * src/truetype/ttinterp.c (Ins_JROT, Ins_JROF): Simplify.
1274
1275 Based on a patch from Behdad.
1276
12772015-01-11 Werner Lemberg <wl@gnu.org>
1278
Werner Lemberg628578c2015-01-11 08:53:31 +01001279 * src/truetype/ttinterp.c (Ins_SxVTL): Simplify function call.
1280
12812015-01-11 Werner Lemberg <wl@gnu.org>
1282
Werner Lemberg08e79092015-01-11 08:45:50 +01001283 * src/truetype/ttinterp.c (Normalize): Remove unused argument.
1284
12852015-01-11 Werner Lemberg <wl@gnu.org>
1286
Werner Lembergd03a67a2015-01-11 08:39:14 +01001287 [truetype] More macro expansions.
1288
Werner Lemberg4aaadf42015-01-11 08:42:28 +01001289 * src/truetype/ttinterp.c (FT_UNUSED_EXEC): Remove macro by
1290 expansion.
1291
12922015-01-11 Werner Lemberg <wl@gnu.org>
1293
1294 [truetype] More macro expansions.
1295
Werner Lembergd03a67a2015-01-11 08:39:14 +01001296 * src/truetype/ttinterp.c (INS_ARG): Remove macro by expansion,
1297 adjusting funtion calls where necessary.
1298 (FT_UNUSED_ARG): Removed, no longer needed.
1299
Werner Lemberg1b4d68c2015-01-10 19:56:28 +010013002015-01-10 Werner Lemberg <wl@gnu.org>
1301
Werner Lembergeb341362015-01-11 00:23:27 +01001302 [truetype] More macro expansions.
1303
1304 Based on a patch from Behdad.
1305
1306 * src/truetype/ttinterp.c (DO_*): Expand macros into corresponding
1307 `Ins_*' functions.
1308 (TT_RunIns): Replace `DO_*' macros with `Ins_*' function calls.
1309 (ARRAY_BOUND_ERROR): Remove second definition, which is no longer
1310 needed.
1311 (Ins_SVTCA, Ins_SPVTCA, Ins_SFVTCA): Replaced with...
1312 (Ins_SxyTCA): New function.
1313
13142015-01-10 Werner Lemberg <wl@gnu.org>
1315
Werner Lemberg01be1302015-01-10 23:05:37 +01001316 [truetype] Remove TT_CONFIG_OPTION_INTERPRETER_SWITCH.
1317
1318 Behdad suggested this code simplification, and nobody objected...
1319
1320 * include/config/ftoption.h, devel/ftoption.h
1321 (TT_CONFIG_OPTION_INTERPRETER_SWITCH): Remove.
1322
1323 * src/truetype/ttinterp.c [TT_CONFIG_OPTION_INTERPRETER_SWITCH]:
1324 Remove related code.
1325 (ARRAY_BOUND_ERROR): Use do-while loop.
1326
13272015-01-10 Werner Lemberg <wl@gnu.org>
1328
Werner Lembergfae0c812015-01-10 20:23:10 +01001329 [truetype] More macro expansions.
1330
Werner Lemberg6cc1f122015-01-10 21:56:59 +01001331 * src/truetype/ttinterp.c, src/truetype/ttinterp.h (EXEC_ARG_,
1332 EXEC_ARG): Remove by replacing with expansion.
1333
13342015-01-10 Werner Lemberg <wl@gnu.org>
1335
1336 [truetype] More macro expansions.
1337
Werner Lemberg24681452015-01-10 21:53:48 +01001338 Based on a patch from Behdad.
1339
1340 * src/truetype/ttinterp.c (SKIP_Code, GET_ShortIns, NORMalize,
1341 SET_SuperRound, ROUND_None, INS_Goto_CodeRange, CUR_Func_move,
1342 CUR_Func_move_orig, CUR_Func_round, CUR_Func_cur_ppem,
1343 CUR_Func_read_cvt, CUR_Func_write_cvt, CUR_Func_move_cvt,
1344 CURRENT_Ratio, INS_SxVTL, COMPUTE_Funcs, COMPUTE_Round,
1345 COMPUTE_Point_Displacement, MOVE_Zp2_Point): Remove by replacing
1346 with expansion.
1347
1348 (Cur_Func_project, CUR_Func_dualproj, CUR_fast_project,
1349 CUR_fast_dualproj): Replace with macros `project', `dualproj',
1350 `fast_project', `fast_dualproj'.
1351
13522015-01-10 Werner Lemberg <wl@gnu.org>
1353
1354 [truetype] More macro expansions.
1355
Werner Lembergfae0c812015-01-10 20:23:10 +01001356 * src/truetype/ttinterp.c (EXEC_OP_, EXEC_OP): Remove by replacing
1357 with expansion.
1358
13592015-01-10 Werner Lemberg <wl@gnu.org>
1360
Werner Lemberg5a752f32015-01-10 20:08:35 +01001361 [truetype] Remove code for static TrueType interpreter.
1362
1363 This is a follow-up patch.
1364
1365 * src/truetype/ttinterp.c, src/truetype/ttinterp.h
1366 [TT_CONFIG_OPTION_STATIC_INTERPRETER,
1367 TT_CONFIG_OPTION_STATIC_RASTER]: Remove macros and related code.
1368
13692015-01-10 Werner Lemberg <wl@gnu.org>
1370
Werner Lemberg1b4d68c2015-01-10 19:56:28 +01001371 * src/truetype/ttinterp.c (CUR): Remove by replacing with expansion.
1372
1373 This starts a series of patches that simplifies the code of the
1374 bytecode interpreter.
1375
Werner Lemberg232bd942014-12-30 21:44:51 +010013762014-12-30 Werner Lemberg <wl@gnu.org>
1377
1378 * Version 2.5.5 released.
1379 =========================
1380
1381
1382 Tag sources with `VER-2-5-5'.
1383
1384 * docs/VERSION.DLL: Update documentation and bump version number to
1385 2.5.5.
1386
1387 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
1388 builds/windows/vc2005/index.html,
1389 builds/windows/vc2008/freetype.vcproj,
1390 builds/windows/vc2008/index.html,
1391 builds/windows/vc2010/freetype.vcxproj,
1392 builds/windows/vc2010/index.html,
1393 builds/windows/visualc/freetype.dsp,
1394 builds/windows/visualc/freetype.vcproj,
1395 builds/windows/visualc/index.html,
1396 builds/windows/visualce/freetype.dsp,
1397 builds/windows/visualce/freetype.vcproj,
1398 builds/windows/visualce/index.html,
1399 builds/wince/vc2005-ce/freetype.vcproj,
1400 builds/wince/vc2005-ce/index.html,
1401 builds/wince/vc2008-ce/freetype.vcproj,
1402 builds/wince/vc2008-ce/index.html: s/2.5.4/2.5.5/, s/254/255/.
1403
1404 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 5.
1405
1406 * builds/unix/configure.raw (version_info): Set to 17:4:11.
1407 * CMakeLists.txt (VERSION_PATCH): Set to 5.
1408 * docs/CHANGES: Updated.
1409
1410 * builds/toplevel.mk (dist): Fix typos.
1411
Alexei Podtelezhnikov70241552014-12-24 12:11:46 -050014122014-12-24 Alexei Podtelezhnikov <apodtele@gmail.com>
1413
1414 [base] Formatting and nanooptimizations.
1415
1416 * src/base/ftcalc.c,
1417 * src/base/fttrigon.c: Revise sign restoration.
1418
Werner Lemberg06842c72014-12-13 07:42:51 +010014192014-12-13 Werner Lemberg <wl@gnu.org>
1420
1421 * src/pcf/pcfread.c (pcf_read_TOC): Improve fix from 2014-12-08.
1422
Werner Lembergb9438112014-12-11 13:33:14 +010014232014-12-11 Werner Lemberg <wl@gnu.org>
1424
Werner Lemberg82119502014-12-11 22:27:06 +01001425 * builds/toplevel.mk (dist): Use older POSIX standard for `tar'.
1426
1427 Apparently, BSD tar isn't capable yet of handling POSIX-1.2001
1428 (contrary to GNU tar), so force the POSIX-1.1988 format.
1429
1430 Problem reported by Stephen Fisher <sfisher@SDF.ORG>.
1431
14322014-12-11 Werner Lemberg <wl@gnu.org>
1433
Werner Lemberg812ed342014-12-11 14:07:29 +01001434 * src/type42/t42parse.c (t42_parse_sfnts): Reject invalid TTF size.
1435
14362014-12-11 Werner Lemberg <wl@gnu.org>
1437
Werner Lembergc9ca6ff2014-12-11 13:39:39 +01001438 * src/base/ftobjs.c (FT_Get_Glyph_Name): Fix off-by-one check.
1439
1440 Problem reported by Dennis Felsing <dennis@felsin9.de>.
1441
14422014-12-11 Werner Lemberg <wl@gnu.org>
1443
Werner Lembergb9438112014-12-11 13:33:14 +01001444 * src/type42/t42parse.c (t42_parse_sfnts): Check `string_size'.
1445
1446 Problem reported by Dennis Felsing <dennis@felsin9.de>.
1447
suzuki toshiya2b592822014-12-10 00:27:41 +090014482014-12-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1449
suzuki toshiya9bd1e552014-12-09 14:51:52 +09001450 [gxvalid] Fix a naming convention conflicting with ftvalid.
1451
1452 See previous changeset for otvalid.
1453
1454 * src/gxvalid/{gxvcommn.h, gxvmort.h, gxvmorx.h}: Replace
1455 `valid' by `gxvalid'.
1456 * src/gxvalid/{gxvbsln.c, gxvcommn.c, gxvfeat.c, gxvjust.c,
1457 gxvkern.c, gxvlcar.c, gxvmort.c, gxvmort0.c, gxvmort1.c,
1458 gxvmort2.c, gxvmort4.c, gxvmort5.c, gxvmorx.c, gxvmorx0.c,
1459 gxvmorx1.c, gxvmorx2.c, gxvmorx4.c, gxvmorx5.c, gxvopbd.c,
1460 gxvprop.c, gxvtrak.c}: Replace `valid' by `gxvalid' if
1461 it is typed as GXV_Validator.
1462
14632014-12-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1464
suzuki toshiya51abdf62014-12-09 00:58:04 +09001465 [otvalid] Fix a naming convention conflicting with ftvalid.
1466
1467 Some prototypes in ftvalid.h use `valid' for the variables
1468 typed as FT_Validator. Their implementations in src/base/
1469 ftobjs.c and utilizations in src/sfnt/ttcmap.c do similar.
1470
1471 Some macros in otvcommn.h assume the exist of the variable
1472 `valid' typed as OTV_Validator in the caller.
1473
1474 Mixing these two conventions cause invalid pointer conversion
1475 and unexpected SEGV in longjmp. To prevent it, all variables
1476 typed as OTV_Validator are renamed to `otvalid'.
1477
1478 * src/otvalid/otvcommn.h: Replace `valid' by `otvalid'.
1479 * src/otvalid/{otvcommn.c, otvbase.c, otvgdef.c, otvgpos.c,
1480 otvgsub.c, otvjstf.c, otvmath.c}: Replace `valid' by `otvalid'
1481 if it is typed as OTV_Validator.
1482
14832014-12-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1484
suzuki toshiya2b592822014-12-10 00:27:41 +09001485 [ftvalid] Introduce FT_THROW() in FT_INVALID_XXX macros.
1486
1487 Original patch is designed by Werner Lemberg. Extra part
1488 for otvalid and gxvalid are added by suzuki toshiya, see
1489 discussion:
1490 http://lists.nongnu.org/archive/html/freetype-devel/2014-12/msg00002.html
1491 http://lists.nongnu.org/archive/html/freetype-devel/2014-12/msg00007.html
1492
1493 * include/internal/ftvalid.h: Introduce FT_THROW() in FT_INVALID_().
1494 * src/gxvalid/gxvcommn.h: Ditto.
1495 * src/otvalid/otvcommn.h: Ditto.
1496
Werner Lemberg74af85c2014-12-08 16:01:50 +010014972014-12-08 Werner Lemberg <wl@gnu.org>
1498
1499 [pcf] Fix Savannah bug #43774.
1500
1501 Work around `features' of X11's `pcfWriteFont' and `pcfReadFont'
1502 functions. Since the PCF format doesn't have an official
1503 specification, we have to exactly follow these functions' behaviour.
1504
1505 The problem was unveiled with a patch from 2014-11-06, fixing issue
1506 #43547.
1507
1508 * src/pcf/pcfread.c (pcf_read_TOC): Don't check table size for last
1509 element. Instead, assign real size.
1510
Werner Lemberg66883b52014-12-07 09:17:06 +010015112014-12-07 Werner Lemberg <wl@gnu.org>
1512
Werner Lemberg553c9672014-12-07 19:29:52 +01001513 Work around a bug in Borland's C++ compiler.
1514
1515 See
1516
1517 http://qc.embarcadero.com/wc/qcmain.aspx?d=118998
1518
1519 for Borland's bug tracker entry.
1520
1521 Reported by Yuliana Zigangirova <zigangirova@inbox.ru>,
1522 http://lists.gnu.org/archive/html/freetype-devel/2014-04/msg00001.html.
1523
1524 * include/internal/ftvalid.h (FT_ValidatorRec), src/smooth/ftgrays.c
1525 (gray_TWorker_): Move `ft_jmp_buf' field to be the first element.
1526
15272014-12-07 Werner Lemberg <wl@gnu.org>
1528
Werner Lemberg9870d6d2014-12-07 09:40:47 +01001529 */*: Decorate hex constants with `U' and `L' where appropriate.
1530
15312014-12-07 Werner Lemberg <wl@gnu.org>
1532
Werner Lemberg66883b52014-12-07 09:17:06 +01001533 [truetype] Prevent memory leak for buggy fonts.
1534
1535 * src/truetype/ttobjs.c (tt_size_done): Unconditionally call
1536 `tt_size_done_bytecode'.
1537
Werner Lemberg94926682014-12-06 07:11:44 +010015382014-12-06 Werner Lemberg <wl@gnu.org>
1539
1540 * Version 2.5.4 released.
1541 =========================
1542
1543
1544 Tag sources with `VER-2-5-4'.
1545
1546 * docs/VERSION.DLL: Update documentation and bump version number to
1547 2.5.4.
1548
1549 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
1550 builds/windows/vc2005/index.html,
1551 builds/windows/vc2008/freetype.vcproj,
1552 builds/windows/vc2008/index.html,
1553 builds/windows/vc2010/freetype.vcxproj,
1554 builds/windows/vc2010/index.html,
1555 builds/windows/visualc/freetype.dsp,
1556 builds/windows/visualc/freetype.vcproj,
1557 builds/windows/visualc/index.html,
1558 builds/windows/visualce/freetype.dsp,
1559 builds/windows/visualce/freetype.vcproj,
1560 builds/windows/visualce/index.html,
1561 builds/wince/vc2005-ce/freetype.vcproj,
1562 builds/wince/vc2005-ce/index.html,
1563 builds/wince/vc2008-ce/freetype.vcproj,
1564 builds/wince/vc2008-ce/index.html: s/2.5.3/2.5.4/, s/253/254/.
1565
1566 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4.
1567
1568 * builds/unix/configure.raw (version_info): Set to 17:3:11.
1569 * CMakeLists.txt (VERSION_PATCH): Set to 4.
1570 * docs/CHANGES: Updated.
1571
Werner Lemberg934ef382014-12-04 06:38:51 +010015722014-12-04 Werner Lemberg <wl@gnu.org>
1573
1574 docs/CHANGES: Updated, formatted.
1575
Dave Arnold2cdc4562014-12-04 06:10:16 +010015762014-12-04 Dave Arnold <darnold@adobe.com>
1577
Dave Arnoldf89396c2014-12-04 06:17:26 +01001578 [cff] Modify an FT_ASSERT.
1579
1580 * src/cff/cf2hints.c (cf2_hintmap_map): After the fix for Savannah
1581 bug #43661, the test font `...aspartam.otf' still triggers an
1582 FT_ASSERT. Since hintmap still works with count==0, ...
1583 (cf2_glyphpath_lineTo, cf2_glyphpath_curveTo): ... add that term to
1584 suppress the assert.
1585
15862014-12-04 Dave Arnold <darnold@adobe.com>
1587
Dave Arnold2cdc4562014-12-04 06:10:16 +01001588 [cff] Fix Savannah bug #43661.
1589
1590 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdHSTEM,
1591 cf2_cmdVSTEM, cf2_cmdHINTMASK>: Don't append to stem arrays after
1592 hintmask is constructed.
1593
1594 * src/cff/cf2hints.c (cf2_hintmap_build): Add defensive code to
1595 avoid reading past end of hintmask.
1596
Werner Lemberg16188eb2014-12-03 10:18:34 +010015972014-12-03 Werner Lemberg <wl@gnu.org>
1598
Werner Lemberg8fa69a82014-12-03 20:07:14 +01001599 docs/CHANGES: Updated.
1600
16012014-12-03 Werner Lemberg <wl@gnu.org>
1602
Werner Lemberga632b5f2014-12-03 19:30:44 +01001603 [autofit] Better fix for conversion specifiers in debug messages.
1604
1605 Using `%ld' for pointer differences causes warnings on 32bit
1606 platforms. The correct type would be (the relatively new) `%td',
1607 however, this is missing on some important platforms.
1608
1609 This patch improves the change from 2014-11-28.
1610
1611 * src/autofit/afhints.c (AF_INDEX_NUM): Use `int' typecast. Our
1612 pointer differences are always sufficiently small.
1613 (af_glyph_hints_dump_points, af_glyph_hints_dump_segments,
1614 af_glyph_hints_dump_edge): Revert to `%d' and use `AF_INDEX_NUM'.
1615
16162014-12-03 Werner Lemberg <wl@gnu.org>
1617
Werner Lemberg16188eb2014-12-03 10:18:34 +01001618 FT_Sfnt_Tag: s/ft_sfnt_xxx/FT_SFNT_XXX/ for orthogonality.
1619
1620 All public FreeType enumeration and flag values are uppercase...
1621
1622 * include/tttables.h (FT_Sfnt_Tag): Implement it. For backwards
1623 compatilibity, retain the old values as macros.
1624
1625 * src/base/ftfstype.c (FT_Get_FSType_Flags), src/sfnt/sfdriver.c
1626 (get_sfnt_table): Updated.
1627
Werner Lemberg2af25ac2014-12-02 08:38:57 +010016282014-12-02 Werner Lemberg <wl@gnu.org>
1629
Werner Lembergde43ace2014-12-02 23:06:04 +01001630 * include/*: Improve structure of documentation.
1631
1632 . Add and update many `<Order>' tags.
1633 . Apply various documentation fixes.
1634 . Remove details to deprecated (or never implemented) data.
1635
16362014-12-02 Werner Lemberg <wl@gnu.org>
1637
Werner Lembergca1f5cc2014-12-02 22:49:25 +01001638 [docmaker] Always handle `<Order>' section elements.
1639
1640 Previously, those elements were handled only for sections present in
1641 a `<Sections>' chapter element.
1642
1643 * src/tools/docmaker/content.py (ContentProcessor::finish):
1644 Implement it.
1645
16462014-12-02 Werner Lemberg <wl@gnu.org>
1647
Werner Lembergef6a3522014-12-02 21:16:59 +01001648 [docmaker] Properly handle empty rows in Synopsis.
1649
1650 * src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Emit
1651 `&nbsp;' for empty fields.
1652
16532014-12-02 Werner Lemberg <wl@gnu.org>
1654
Werner Lemberg0e96f052014-12-02 11:08:31 +01001655 [docmaker] Thinko.
1656
1657 * src/tools/docmaker/content.py (DocBlock::get_markup_words_all):
1658 Emit `/empty/' string for first element also.
1659
16602014-12-02 Werner Lemberg <wl@gnu.org>
1661
Werner Lemberg102d4a72014-12-02 10:27:40 +01001662 [docmaker] Honour empty lines in `<Order>' section element.
1663
1664 This greatly improves the readability of the `Synopsis' links.
1665
1666 * src/tools/docmaker/content.py (DocBlock::get_markup_words_all):
1667 Insert string `/empty/' between items.
1668
1669 * src/tools/docmaker/formatter.py (Formatter::section_dump): Make it
1670 robust against nonexistent keys.
1671
1672 * src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Emit
1673 empty <td> elements for `/empty/'.
1674
16752014-12-02 Werner Lemberg <wl@gnu.org>
1676
Werner Lemberg2af25ac2014-12-02 08:38:57 +01001677 [docmaker] Ensure Python 3 compatibility.
1678
1679 * src/tools/docmaker/content.py (ContentProcessor::set_section,
1680 ContentProcessor::finish): Replace `has_key' function with `in'
1681 keyword.
1682
1683 * src/tools/docmaker/formatter.py (Formatter::__init__): Replace
1684 sorting function with a key generator.
1685 (Formatter::add_identifier): Replace `has_key' function with `in'
1686 keyword.
1687
1688 * src/tools/docmaker/tohtml.py (HtmlFormatter::html_source_quote):
1689 Replace `has_key' function with `in' keyword.
1690 (HtmlFormatter::index_exit, HtmlFormatter::section_enter): Use
1691 integer division.
1692 s/<>/>/.
1693
1694 * src/tools/docmaker/utils.py: Import `itertools'.
1695 (index_sort): Replaced by...
1696 (index_key): ... this new key generator (doing exactly the same).
1697
Werner Lemberg8f795112014-11-29 06:49:15 +010016982014-11-29 Werner Lemberg <wl@gnu.org>
1699
Werner Lemberg80bfeb12014-12-01 10:07:52 +01001700 [docmaker] Don't output a block multiple times.
1701
1702 This bug was hidden by not processing all lines of `<Order>' blocks.
1703
1704 * src/tools/docmaker/formatter.py (Formatter::section_dump): Filter
1705 out field names.
1706
17072014-11-29 Werner Lemberg <wl@gnu.org>
1708
Werner Lemberg0dbad762014-12-01 08:44:48 +01001709 [docmaker] Use field values as HTML link targets where possible.
1710
1711 * src/tools/docmaker/tohtml.py (HtmlFormatter::make_block_url):
1712 Accept second, optional argument to specify a name.
1713 (HtmlFormatter::html_source_quote): Link to field ID if possible.
1714 (HtmlFormatter::print_html_field_list): Emit `id' attribute.
1715
17162014-11-29 Werner Lemberg <wl@gnu.org>
1717
Werner Lemberg785b1d02014-11-30 22:16:34 +01001718 [docmaker] Allow empty lines in `<Order>' blocks.
1719
1720 Before this patch, the suggested order of entries stopped at the
1721 first empty line.
1722
1723 Obviously, nobody noticed that this problem caused a much reduced
1724 set of links in the `Synopsis' sections; in particular, the
1725 `<Order>' blocks contain a lot of entries that wouldn't be listed
1726 otherwise...
1727
1728 * src/tools/docmaker/content.py (DocBlock::get_markup_words_all):
1729 New function to iterate over all items.
1730 (DocSection::process): Use it.
1731
17322014-11-29 Werner Lemberg <wl@gnu.org>
1733
Werner Lemberg16b3e622014-11-30 20:58:27 +01001734 * src/tools/docmaker/sources.py (column) [Format 2]: Fix regexp.
1735
1736 After the single asterisk there must be no other immediately following
1737 asterisk.
1738
17392014-11-29 Werner Lemberg <wl@gnu.org>
1740
Werner Lemberg434bc692014-11-29 23:12:55 +01001741 * src/tools/docmaker/tohtml.py: Improve CSS for vertical spacing.
Werner Lemberg51987ea2014-11-29 22:19:29 +01001742
Werner Lemberg434bc692014-11-29 23:12:55 +010017432014-11-29 Werner Lemberg <wl@gnu.org>
1744
1745 [docmaker] Improve HTML code for table of contents.
1746
1747 * src/tools/docmaker/tohtml.py: Introduce a new table class `toc',
Werner Lemberg51987ea2014-11-29 22:19:29 +01001748 together with proper CSS.
1749
17502014-11-29 Werner Lemberg <wl@gnu.org>
1751
Werner Lembergaa834ce2014-11-29 20:08:29 +01001752 [docmaker] Provide higher-level markup and simplify HTML.
1753
1754 * src/tools/docmaker/tohtml.py: Instead of using extraneous `<div>'
1755 elements, use CSS descendants (of class `section') to format the
1756 data.
1757
1758 Also remove reduntant <p> and <br> elements, replacing them with
1759 proper CSS.
1760
1761 Globally reduce page width to 75%.
1762
1763 (block_header): Rename <div> class to `section'.
1764
17652014-11-29 Werner Lemberg <wl@gnu.org>
1766
Werner Lemberg3bb97022014-11-29 16:12:37 +01001767 [docmaker] Add `top' links after blocks.
1768
1769 * src/tools/docmaker/tohtml.py (block_footer_middle): Implement it.
1770
17712014-11-29 Werner Lemberg <wl@gnu.org>
1772
Werner Lemberga31f9712014-11-29 07:18:44 +01001773 * src/tools/docmaker/tohtml.py: Improve CSS for fields.
1774
Werner Lemberg3bb97022014-11-29 16:12:37 +01001775 Make fields align horizontally relative to full line width.
Werner Lemberga31f9712014-11-29 07:18:44 +01001776
17772014-11-29 Werner Lemberg <wl@gnu.org>
1778
Werner Lemberg8f795112014-11-29 06:49:15 +01001779 * src/tools/docmaker/tohtml.py: Fix index and TOC templates.
1780
1781 This thinko was introduced 2014-11-27.
1782
Werner Lembergba1ba0c2014-11-28 22:04:14 +010017832014-11-28 Werner Lemberg <wl@gnu.org>
1784
1785 [docmaker] Format field lists with CSS.
1786
1787 This also simplifies the inserted HTML code.
1788
1789 * src/tools/docmaker/tohtml.py
1790 (HtmlFormatter::print_html_field_list): Do it.
1791
suzuki toshiya348fffa2014-11-28 16:05:59 +090017922014-11-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1793
1794 Fix compiler warning to the comparison between signed and
1795 unsigned variable.
1796
1797 * src/pfr/pfrsbit.c (pfr_slot_load_bitmap): Fix the comparison
1798 between `ypos + ysize' and FT_INT_{MAX,MIN}.
1799
Werner Lembergba1ba0c2014-11-28 22:04:14 +010018002014-11-28 Werner Lemberg <wl@gnu.org>
Werner Lemberg984e0712014-11-28 05:33:58 +01001801
Werner Lembergba1ba0c2014-11-28 22:04:14 +01001802 [docmaker] Replace empty `<td>' with CSS.
Werner Lemberg46d4dc82014-11-28 05:49:56 +01001803
1804 * src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Do
1805 it.
1806
Werner Lembergba1ba0c2014-11-28 22:04:14 +010018072014-11-28 Werner Lemberg <wl@gnu.org>
Werner Lemberg46d4dc82014-11-28 05:49:56 +01001808
Werner Lemberg984e0712014-11-28 05:33:58 +01001809 [docmaker] Replace some `<table>' tags with `<h4>' and `<div>'.
1810
1811 * src/tools/docmaker/tohtml.py (marker_*): Use `<h4>'.
1812 (source_*): Use `<div>'.
1813 (HtmlFormatter::block_enter): s/<h4>/<h3>/.
1814
suzuki toshiya9ee6a0a2014-11-28 11:14:18 +090018152014-11-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1816
1817 Fix compiler warning to conversion specifiers in debug messages.
1818
1819 * src/autofit/afhints.c (af_glyph_hints_dump_points): Add length
Werner Lemberga632b5f2014-12-03 19:30:44 +01001820 modifier to dump long integers.
1821 (af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Ditto.
suzuki toshiya9ee6a0a2014-11-28 11:14:18 +09001822
Werner Lemberg26d699e2014-11-27 19:22:52 +010018232014-11-27 Werner Lemberg <wl@gnu.org>
1824
Werner Lemberg984e0712014-11-28 05:33:58 +01001825 * src/tools/docmaker/tohtml.py: Use more CSS for index.
Werner Lemberg7ea36342014-11-27 19:38:31 +01001826
18272014-11-27 Werner Lemberg <wl@gnu.org>
1828
Werner Lembergedcf8172014-11-27 19:28:48 +01001829 [docmaker] Replace `name' attribute of `<a>' with `id'.
1830
1831 * src/tools/docmaker/tohtml.py (HtmlFormatter::block_enter): Do it.
1832
18332014-11-27 Werner Lemberg <wl@gnu.org>
1834
Werner Lemberg26d699e2014-11-27 19:22:52 +01001835 * src/tools/docmaker/tohtml.py: Remove remaining `width' attributes.
1836
1837 For `Index' and `TOC' links, we now simply use the `text-align' CSS
1838 property of `<td>' to enforce flush-left and flush-right,
1839 eliminating the hack with an empty, full-width `<td>' element
1840 inbetween.
1841
1842 The change also enforces the same (smaller) size for all index and
1843 TOC links.
1844
suzuki toshiya2676e072014-11-28 00:58:25 +090018452014-11-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1846
suzuki toshiya1b12f5d2014-11-28 01:22:26 +09001847 * src/cff/cf2font.c: Include `ftcalc.h' to use FT_MSB(),
1848 cf2font.c could not find it under `make multi' build.
1849
18502014-11-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1851
suzuki toshiya2676e072014-11-28 00:58:25 +09001852 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Remove
1853 unrequired negative value check for `width' and `height'.
1854
Werner Lemberg8585cf52014-11-27 10:49:05 +010018552014-11-27 Werner Lemberg <wl@gnu.org>
1856
Werner Lembergdd3fee02014-11-27 13:20:52 +01001857 * src/tools/docmaker/tohtml.py: More HTML table refactoring.
1858
1859 Replace some `<table>' tags with `<div>' to simplify structure.
1860
1861 Move `bgcolor' attribute to CSS.
1862
1863 Replace most `width' attributes with CSS. The remaining instances
1864 (providing a similar effect as LaTeX's `\hfill' command) are removed
1865 in a later patch.
1866
18672014-11-27 Werner Lemberg <wl@gnu.org>
1868
Werner Lemberga5ad26a2014-11-27 10:52:24 +01001869 * src/tools/docmaker/tohtml.py: Replace <font> with CSS.
1870
18712014-11-27 Werner Lemberg <wl@gnu.org>
1872
Werner Lembergba67c612014-11-27 10:51:49 +01001873 * src/tools/docmaker/tohtml.py: Center <table> with CSS.
1874
18752014-11-27 Werner Lemberg <wl@gnu.org>
1876
Werner Lemberg5594fa52014-11-27 10:50:50 +01001877 * src/tools/docmaker/tohtml.py: Replace `<center>' with `<div>'.
1878
18792014-11-27 Werner Lemberg <wl@gnu.org>
1880
Werner Lemberg8585cf52014-11-27 10:49:05 +01001881 * src/tools/docmaker/tohtml.py: Remove redundant `<center>' tags.
1882
1883 This starts a series of commits into the direction of generating
1884 valid HTML 5 code, especially using much more CSS.
1885
suzuki toshiya1b057042014-11-27 17:53:20 +090018862014-11-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1887
1888 Prevent too negative values (< FT_INT_MIN) in bitmap metrics,
1889 suggested by Alexei.
1890
1891 * src/pfr/pfrsbit.c (pfr_slot_load_bitmap): Prevent too
1892 negative values in `xpos' and `ypos + ysize'.
1893 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Prevent
1894 too negative values in `x_left' and `y_top'. Either negative
1895 values in `width' and `height' are checked.
1896
Werner Lemberg3d167cb2014-11-27 05:19:41 +010018972014-11-27 Werner Lemberg <wl@gnu.org>
1898
Werner Lembergc52882a2014-11-27 08:01:25 +01001899 [docmaker] Produce better HTML code.
1900
1901 * src/tools/docmaker/tohtml.py: Always use double quotes for
1902 attribute values.
1903 (source_footer): Close `td' and `tr' groups.
1904
19052014-11-27 Werner Lemberg <wl@gnu.org>
1906
Werner Lembergdbb93152014-11-27 07:20:48 +01001907 Use better way to disable creation of .pyc files for `make refdoc'.
1908
1909 Python 2.6 was released in 2008...
1910
1911 * builds/freetype.mk (refdoc): Use python's `-B' option.
1912
1913 * builds/detect.mk (std_setup, dos_setup): Mention required python
1914 version for `refdoc' target.
1915
19162014-11-27 Werner Lemberg <wl@gnu.org>
1917
Werner Lemberge8a5c332014-11-27 06:48:37 +01001918 * src/tools/docmaker/sources.py (re_bold, re_italic): Use
1919 non-grouping parentheses.
1920 * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word):
1921 Updated.
1922
19232014-11-27 Werner Lemberg <wl@gnu.org>
1924
Werner Lemberg3d167cb2014-11-27 05:19:41 +01001925 * src/base/ftobjs.c (FT_Get_Glyph_Name): Fix compiler warning.
1926
1927 Introdruced in previous change. Reported by Alexei.
1928
Werner Lemberga593a042014-11-26 18:42:48 +010019292014-11-26 Werner Lemberg <wl@gnu.org>
1930
Werner Lembergf34f1922014-11-26 21:59:21 +01001931 * src/*: Add checks for parameters of API functions where missing.
1932
1933 `API functions' are functions tagged with `FT_EXPORT_DEF'.
1934
1935 Besides trivial fixes, the following changes are included, too.
1936
1937 * src/base/ftbdf.c (FT_Get_BDF_Charset_ID, FT_Get_BDF_Property): Set
1938 error code if no service is available.
1939
1940 * src/base/ftinit.c (FT_Done_FreeType): Change return value for
1941 invalid `library' parameter to `Invalid_Library_Handle'.
1942
1943 * src/base/ftobjs.c (FT_New_Size): Change return value for invalid
1944 `asize' parameter to `Invalid_Argument'.
1945
1946 * src/base/ftoutln.c (FT_Outline_Copy): Change return value for
1947 invalid `source' and `target' parameters to `Invalid_Outline'.
1948 (FT_Outline_Done_Internal): Change return value for invalid
1949 `outline' parameter to `Invalid_Outline'.
1950
19512014-11-26 Werner Lemberg <wl@gnu.org>
1952
Werner Lemberga593a042014-11-26 18:42:48 +01001953 * src/cache/ftcbasic.c: Use single calls to `FT_TRACE'.
1954
suzuki toshiya5aff8532014-11-26 14:36:12 +090019552014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1956
suzuki toshiyacd4a5a22014-11-27 00:20:48 +09001957 * src/base/ftobj.c (Mac_Read_POST_Resource): Additional
1958 overflow check in the summation of POST fragment lengths,
1959 suggested by Mateusz Jurczyk <mjurczyk@google.com>.
1960
19612014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1962
suzuki toshiya1720e812014-11-26 16:39:00 +09001963 * src/base/ftobjs.c (Mac_Read_POST_Resource): Insert comments
1964 and fold too long tracing messages.
1965
19662014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1967
suzuki toshiya18a8f0d2014-11-26 16:11:38 +09001968 Fix Savannah bug #43540.
1969
1970 * src/base/ftmac.c (parse_fond): Prevent a buffer overrun
1971 caused by a font including too many (> 63) strings to store
1972 names[] table.
1973
19742014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1975
suzuki toshiya45331672014-11-26 16:02:17 +09001976 * src/base/ftobjs.c (Mac_Read_POST_Resource): Use unsigned long
1977 variables to read the lengths in POST fragments. Suggested by
1978 Mateusz Jurczyk <mjurczyk@google.com>.
1979
19802014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1981
suzuki toshiya35252ae2014-11-26 15:52:23 +09001982 Fix Savannah bug #43539.
1983
1984 * src/base/ftobjs.c (Mac_Read_POST_Resource): Fix integer overflow
1985 by a broken POST table in resource-fork.
1986
19872014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1988
suzuki toshiya240c94a2014-11-26 15:43:29 +09001989 Fix Savannah bug #43538.
1990
1991 * src/base/ftobjs.c (Mac_Read_POST_Resource): Fix integer overflow
1992 by a broken POST table in resource-fork.
1993
19942014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1995
suzuki toshiya5aff8532014-11-26 14:36:12 +09001996 * src/base/ftobjs.c (Mac_Read_POST_Resource): Avoid memory leak
1997 by a broken POST table in resource-fork. Return after freeing
1998 the buffered POST table when it is found to be broken.
1999
Werner Lemberg04edbbd2014-11-25 10:21:13 +010020002014-11-25 Werner Lemberg <wl@gnu.org>
2001
Werner Lemberg02b8e7e2014-11-25 11:31:51 +01002002 */*: s/Invalid_Argument/Invalid_Size_Handle/ where appropriate.
2003
20042014-11-25 Werner Lemberg <wl@gnu.org>
2005
Werner Lemberg0d4aa232014-11-25 11:26:14 +01002006 */*: s/Invalid_Argument/Invalid_Stream_Handle/ where appropriate.
2007
20082014-11-25 Werner Lemberg <wl@gnu.org>
2009
Werner Lembergf4f9e682014-11-25 11:11:55 +01002010 */*: s/Invalid_Argument/Invalid_Library_Handle/ where appropriate.
2011
20122014-11-25 Werner Lemberg <wl@gnu.org>
2013
Werner Lemberg04c2aa12014-11-25 10:22:12 +01002014 */*: s/Invalid_Argument/Invalid_Outline/ where appropriate.
2015
20162014-11-25 Werner Lemberg <wl@gnu.org>
2017
Werner Lemberg04edbbd2014-11-25 10:21:13 +01002018 */*: s/Invalid_Argument/Invalid_Face_Handle/ where appropriate.
2019
Werner Lembergeca0f062014-11-24 10:22:08 +010020202014-11-24 Werner Lemberg <wl@gnu.org>
2021
Werner Lemberg3e867112014-11-25 09:01:07 +01002022 [Savannah bug #43682] Adjust some renderer callbacks.
2023
2024 * src/raster/ftraster.c (ft_black_set_mode): Change return type to
2025 `int' to stay in sync with `FT_Renderer_SetModeFunc' prototype.
2026
2027 * src/smooth/ftgrays.c (gray_raster_set_mode): New dummy function
2028 for orthogonality.
2029 (ft_grays_raster): Use it.
2030
Werner Lemberg04edbbd2014-11-25 10:21:13 +010020312014-11-25 Werner Lemberg <wl@gnu.org>
Werner Lemberg3e867112014-11-25 09:01:07 +01002032
Werner Lemberg6689a002014-11-25 08:53:09 +01002033 [Savannah bug #43682] Properly handle missing return errors.
2034
2035 The functions in this patch *do* return non-trivial errors that must
2036 be taken care of.
2037
2038 * src/autofit/afloader.c (af_loader_load_g), src/base/ftobjs.c
2039 (FT_Render_Glyph_Internal), src/base/ftoutln.c (FT_Outline_Render),
2040 src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_endchar>,
2041 src/psaux/psobjs.c (ps_parser_load_field_table), src/psaux/t1decode
2042 (t1_decoder_parse_charstrings) <op_endchar>, src/truetype/ttgload.c
2043 (load_truetype_glyph <subglyph loop>, tt_loader_init,
2044 TT_Load_Glyph), src/truetype/ttgxvar.c (TT_Set_MM_Blend),
2045 src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Do it.
2046
Werner Lemberg04edbbd2014-11-25 10:21:13 +010020472014-11-25 Werner Lemberg <wl@gnu.org>
Werner Lemberg6689a002014-11-25 08:53:09 +01002048
Werner Lembergb24e8ba2014-11-25 08:30:49 +01002049 [Savannah bug #43682] Add/remove `void' casts to some functions.
2050
2051 We use a cast to indicate that we intentionally ignore a function's
2052 return value. However, this doesn't apply to API functions where
2053 errors can only happen for trivially invalid input.
2054
2055 * src/base/ftstroke.c (FT_Glyph_Stroke, FT_Glyph_StrokeBorder),
2056 src/base/ftsynth.c (FT_GlyphSlot_Embolden), src/cff/cffgload.c
2057 (cff_slot_load), src/pfr/pfrdrivr.c (pfr_get_kerning),
2058 src/type1/t1load.c (parse_encoding), src/type42/t42parse.c
2059 (t42_parse_encoding): Do it.
2060
Werner Lemberg04edbbd2014-11-25 10:21:13 +010020612014-11-25 Werner Lemberg <wl@gnu.org>
Werner Lembergb24e8ba2014-11-25 08:30:49 +01002062
Werner Lembergef439fd2014-11-25 08:14:15 +01002063 [Savannah bug #43682] Change some signatures to `void' return type.
2064
2065 * include/internal/pshints.h (PSH_Globals_SetScaleFunc),
2066 include/internal/sfnt.h (TT_Get_Metrics_Func),
2067 src/pshinter/pshglob.c (psh_globals_set_scale),
2068 src/pshinter/pshrec.c (ps_hints_init), src/sfnt/ttmtx.c
2069 (tt_face_get_metrics), src/truetype/ttinterp.c (TT_Goto_CodeRange,
2070 TT_Set_CodeRange, TT_Clear_CodeRange, TT_Done_Context,
2071 TT_Save_Context): Do it.
2072
2073 * src/pshinter/pshglob.h, src/pshinter/pshrec.h, src/sfnt/ttmtx.h,
2074 src/truetype/ttgload.c (TT_Hint_Glyph), src/truetype/ttinterp.c
2075 (TT_Run_Context), src/truetype/ttinterp.h, src/truetype/ttobjs.c
2076 (tt_size_run_fpgm, tt_size_run_prep): Updated.
2077
20782014-11-24 Werner Lemberg <wl@gnu.org>
2079
Werner Lemberg6889f7b2014-11-24 17:16:08 +01002080 Remove all code related to FT_MAX_CHARMAP_CACHEABLE.
2081
2082 This is no longer used.
2083
2084 * src/base/ftobjs.c, src/cache/ftccmap.c, src/cff/cffobjs.c,
2085 src/sfnt/ttcmap.c: Do it.
2086
20872014-11-24 Werner Lemberg <wl@gnu.org>
2088
Werner Lembergf0292bb2014-11-24 10:51:21 +01002089 [sfnt] Fix Savannah bug #43680.
2090
2091 This adds an additional constraint to make the fix from 2013-01-25
2092 really work.
2093
2094 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_image) <index_format==4>:
2095 Check `p' before `num_glyphs'.
2096
20972014-11-24 Werner Lemberg <wl@gnu.org>
2098
Werner Lembergeca0f062014-11-24 10:22:08 +01002099 [truetype] Fix Savannah bug #43679.
2100
2101 * src/truetype/ttpload.c (tt_face_load_hdmx): Check minimum size of
2102 `record_size'.
2103
Jarkko Pöyry96341dc2014-11-24 09:53:07 +010021042014-11-24 Jarkko Pöyry <jarkko.poyry@gmail.com>
2105
2106 [cff, pfr, psaux, winfonts] Fix Savannah bug #43676.
2107
Werner Lemberged6a9df2014-12-06 23:28:58 +01002108 Don't cast cmap init function pointers to an incompatible type.
Jarkko Pöyry96341dc2014-11-24 09:53:07 +01002109
2110 Without this patch, the number of parameters between declaration and
2111 the real signature differs. Calling such a function results in
2112 undefined behavior.
2113
2114 ISO/IEC 9899:TC3 (Committee Draft September 7, 2007)
2115 6.5.2.2 Function calls
2116 9 If the function is defined with a type that is not
2117 compatible with the type (of the expression) pointed to by
2118 the expression that denotes the called function, the
2119 behavior is undefined.
2120
2121 On certain platforms (c -> js with emscripten) this causes
2122 termination of execution or invalid calls because in the emscripten
2123 implementation, function pointers of different types are stored in
2124 different pointer arrays. Incorrect pointer type here results in
2125 indexing of an incorrect array.
2126
2127 * src/cff/cffcmap.c (cff_cmap_encoding_init, cff_cmap_unicode_init),
2128 src/pfr/pfrcmap.c (pfr_cmap_init), src/psaux/t1cmap.c
2129 t1_cmap_standard_init, t1_cmap_expert_init, t1_cmap_custom_init,
2130 t1_cmap_unicode_init), src/winfonts/winfnt.c (fnt_cmap_init): Fix
2131 signature.
2132
Werner Lemberga7a42072014-11-24 06:44:45 +010021332014-11-24 Werner Lemberg <wl@gnu.org>
2134
Werner Lembergf70d9342014-11-24 09:31:32 +01002135 [sfnt] Fix Savannah bug #43672.
2136
2137 * src/sfnt/ttkern.c (tt_face_load_kern): Use correct value for
2138 minimum table length test.
2139
21402014-11-24 Werner Lemberg <wl@gnu.org>
2141
Werner Lemberg73be9f92014-11-24 07:30:05 +01002142 [type1, type42] Another fix for Savannah bug #43655.
2143
2144 * src/type1/t1load.c (parse_charstrings), src/type42/t42parse.c
2145 (t42_parse_charstrings): Add another boundary testing.
2146
21472014-11-24 Werner Lemberg <wl@gnu.org>
2148
Werner Lemberga7a42072014-11-24 06:44:45 +01002149 [docmaker] Formatting, copyright, improved documentation.
2150
2151 * src/tools/docmaker/*: No code changes besides trivial
2152 modifications.
2153
Werner Lemberg9bd20b72014-11-22 06:24:45 +010021542014-11-22 Werner Lemberg <wl@gnu.org>
2155
Werner Lembergaf834612014-11-22 13:29:10 +01002156 [bdf] Fix Savannah bug #43660.
2157
2158 * src/bdf/bdflib.c (_bdf_parse_glyphs) <"ENDFONT">: Check
2159 `_BDF_GLYPH_BITS'.
2160
21612014-11-22 Werner Lemberg <wl@gnu.org>
2162
Werner Lemberg42fcd662014-11-22 12:44:33 +01002163 [type42] Allow only embedded TrueType fonts.
2164
2165 This is a follow-up to Savannah bug #43659.
2166
2167 * src/type42/t42objs.c (T42_Face_Init): Exclusively use the
2168 `truetype' font driver for loading the font contained in the `sfnts'
2169 array.
2170
21712014-11-22 Werner Lemberg <wl@gnu.org>
2172
Werner Lemberg37881872014-11-22 10:46:47 +01002173 [type42] Fix Savannah bug #43659.
2174
2175 * src/type42/t42objs.c (T42_Open_Face): Initialize `face->ttf_size'.
2176
2177 * src/type42/t42parse.c (t42_parse_sfnts): Always set
2178 `face->ttf_size' directly. This ensures a correct stream size in
2179 the call to `FT_Open_Face', which follows after parsing, even for
2180 buggy input data.
2181 Fix error messages.
2182
21832014-11-22 Werner Lemberg <wl@gnu.org>
2184
Werner Lemberg5f201ab2014-11-22 09:16:39 +01002185 [cff] Fix Savannah bug #43658.
2186
2187 * src/cff/cf2ft.c (cf2_builder_lineTo, cf2_builder_cubeTo): Handle
2188 return values of point allocation routines.
2189
21902014-11-22 Werner Lemberg <wl@gnu.org>
2191
Werner Lemberg9bd20b72014-11-22 06:24:45 +01002192 [sfnt] Fix Savannah bug #43656.
2193
2194 * src/sfnt/ttcmap.c (tt_cmap4_validate): Fix order of validity
2195 tests.
2196
Werner Lemberg6de76172014-11-21 06:05:49 +010021972014-11-21 Werner Lemberg <wl@gnu.org>
2198
Werner Lembergdd897102014-11-21 22:19:28 +01002199 [type1, type42] Fix Savannah bug #43655.
2200
2201 * src/type1/t1load.c (parse_charstrings), src/type42/t42parse.c
2202 (t42_parse_charstrings): Fix boundary testing.
2203
22042014-11-21 Werner Lemberg <wl@gnu.org>
2205
Werner Lembergb1fc00d2014-11-21 12:06:40 +01002206 * src/pcf/pcfread.c (pcf_get_metrics): Sanitize invalid metrics.
2207
22082014-11-21 Werner Lemberg <wl@gnu.org>
2209
Werner Lemberg9154dab2014-11-21 08:03:51 +01002210 [ftlcdfil] Obey flow direction.
2211
2212 * src/base/ftlcdfil.c (_ft_lcd_filter_fir, _ft_lcd_filter_legacy):
2213 Handle `up' flow.
2214
22152014-11-21 Werner Lemberg <wl@gnu.org>
2216
Werner Lemberg644d6fa2014-11-21 07:28:50 +01002217 * src/base/ftbitmap.c (FT_Bitmap_Convert): Improve.
2218
2219 This commit completes argument checks and adds support for different
2220 flow directions.
2221
22222014-11-21 Werner Lemberg <wl@gnu.org>
2223
Werner Lemberg6de76172014-11-21 06:05:49 +01002224 * src/base/ftbitmap.c (FT_Bitmap_Copy): Improve.
2225
2226 This commit adds argument checks and support for different flow
2227 directions.
2228
Werner Lemberg1e6e1b82014-11-20 21:07:56 +010022292014-11-20 Werner Lemberg <wl@gnu.org>
2230
2231 * src/base/ftbitmap.c (FT_Bitmap_New): Check argument.
2232
Werner Lembergd6061212014-11-19 21:13:23 +010022332014-11-19 Werner Lemberg <wl@gnu.org>
2234
Werner Lembergb3500af2014-11-19 21:28:21 +01002235 Change some fields in `FT_Bitmap' to unsigned type.
2236
2237 This doesn't break ABI.
2238
2239 * include/ftimage.h (FT_Bitmap): Make `rows', `width', `num_grays',
2240 `pixel_mode', and `palette_mode' unsigned types.
2241
2242 * src/base/ftbitmap.c: Updated.
2243 (FT_Bitmap_Copy): Fix casts.
2244
2245 * src/cache/ftcsbits.c, src/raster/ftraster.c, src/sfnt/pngshim.c:
2246 Updated.
2247
22482014-11-19 Werner Lemberg <wl@gnu.org>
2249
Werner Lembergdf485772014-11-19 21:21:23 +01002250 Make `FT_Bitmap_Convert' correctly handle negative `pitch' values.
2251
2252 * src/base/ftbitmap.c (FT_Bitmap_Convert): Always use positive value
2253 for the pitch while copying data.
2254 Correctly set pitch sign in target bitmap.
2255
22562014-11-19 Werner Lemberg <wl@gnu.org>
2257
Werner Lembergd6061212014-11-19 21:13:23 +01002258 Minor code improvement in `FT_Bitmap_Embolden'.
2259
2260 * src/base/ftbitmap.c (FT_Bitmap_Embolden) <FT_PIXEL_MODE_GRAY[24]>:
2261 Fix thinko.
2262
Alexei Podtelezhnikovf841ad32014-11-19 21:19:06 -050022632014-11-19 Alexei Podtelezhnikov <apodtele@gmail.com>
2264
2265 * src/base/fttrigon.c: Use dedicated `FT_Angle' for arctan table.
2266
Werner Lemberga67c43e2014-11-19 06:46:23 +010022672014-11-19 Behdad Esfahbod <behdad@behdad.org>
2268
2269 Avoid compiler warnings on x86-64 for `FT_MulFix'.
2270
2271 `FT_MulFix' takes `FT_Long' parameters as defined in `freetype.h',
2272 but several inline implementations of it in `ftcalc.h' take
2273 `FT_Int32' arguments. This is causing compiler warnings on x86-64:
2274 If parameters of type `FT_Fixed' (= `FT_Long') are passed to the
2275 inline implementation of this function, integer values are truncated
2276 from 64bit to 32bit.
2277
2278 * include/internal/ftcalc.h (FT_MulFix) [FT_MULFIX_ASSEMBLER]: Add
2279 casts.
2280
Werner Lemberg54abd222014-11-15 09:05:22 +010022812014-11-15 Werner Lemberg <wl@gnu.org>
2282
2283 [sfnt] Fix Savannah bug #43597.
2284
2285 * src/sfnt/pngshim.c (Load_SBit_Png): Protect against too large
2286 bitmaps.
2287
Werner Lemberg602040b2014-11-12 20:51:20 +010022882014-11-12 Werner Lemberg <wl@gnu.org>
2289
Werner Lemberg257c2702014-11-12 21:42:13 +01002290 [sfnt] Fix Savannah bug #43591.
2291
2292 * src/sfnt/ttsbit.c (tt_sbit_decoder_init): Protect against addition
2293 and multiplication overflow.
2294
22952014-11-12 Werner Lemberg <wl@gnu.org>
2296
Werner Lemberg677ddf42014-11-12 21:26:44 +01002297 [sfnt] Fix Savannah bug #43590.
2298
2299 * src/sfnt/ttload.c (check_table_dir, tt_face_load_font_dir):
2300 Protect against addition overflow.
2301
23022014-11-12 Werner Lemberg <wl@gnu.org>
2303
Werner Lembergf46add12014-11-12 21:06:08 +01002304 [sfnt] Fix Savannah bug #43589.
2305
2306 * src/sfnt/sfobjs.c (woff_open_font): Protect against addition
2307 overflow.
2308
23092014-11-12 Werner Lemberg <wl@gnu.org>
2310
Werner Lemberg602040b2014-11-12 20:51:20 +01002311 [sfnt] Fix Savannah bug #43588.
2312
2313 * src/sfnt/ttcmap.c (tt_cmap8_validate, tt_cmap10_validate,
2314 tt_cmap12_validate, tt_cmap13_validate, tt_cmap14_validate): Protect
2315 against overflow in additions and multiplications.
2316
Alexei Podtelezhnikov2e73a1b2014-11-09 23:22:43 -050023172014-11-10 Alexei Podtelezhnikov <apodtele@gmail.com>
2318
2319 [base] CORDIC improvements.
2320
2321 The scaling between the hypotenuse and its CORDIC approximation is
2322 based on regression analysis. The smaller padding for `theta' is
2323 justifed by its maximum error of less than 6.
2324
2325 * src/base/fttrigon.c (ft_trig_downscale): Borrow code from
2326 ./ftcalc.c (ft_multo64), change linear intercept.
2327 (ft_trig_pseudo_polarize): Decrease `theta' padding.
2328
Werner Lemberg0e73d212014-11-09 01:27:38 +010023292014-11-09 Werner Lemberg <wl@gnu.org>
2330
2331 * src/base/ftstroke.c (ft_stroker_inside): Fix border intersections.
2332
2333 One more place to check whether `radius' is zero.
2334
2335 Problem reported by Marco Wertz <marco.wertz@gmx.de>.
2336
Werner Lemberg2c4832d2014-11-07 07:42:33 +010023372014-11-07 Werner Lemberg <wl@gnu.org>
2338
Werner Lemberg602040b2014-11-12 20:51:20 +01002339 [bdf] Fix Savannah bug #43535.
Werner Lemberg2c4832d2014-11-07 07:42:33 +01002340
2341 * src/bdf/bdflib.c (_bdf_strncmp): New macro that checks one
2342 character more than `strncmp'.
2343 s/ft_strncmp/_bdf_strncmp/ everywhere.
2344
Werner Lembergf49a1002014-11-06 13:30:28 +010023452014-11-06 Werner Lemberg <wl@gnu.org>
2346
Werner Lemberg602040b2014-11-12 20:51:20 +01002347 [pcf] Fix Savannah bug #43548.
Werner Lembergef1eba72014-11-06 23:25:05 +01002348
Werner Lemberg2c4832d2014-11-07 07:42:33 +01002349 * src/pcf/pcfread.c (pcf_get_encodings): Add sanity checks for row
2350 and column values.
Werner Lembergef1eba72014-11-06 23:25:05 +01002351
23522014-11-06 Werner Lemberg <wl@gnu.org>
2353
Werner Lemberg602040b2014-11-12 20:51:20 +01002354 [pcf] Fix Savannah bug #43547.
Werner Lemberg0e2f5d52014-11-06 22:32:46 +01002355
2356 * src/pcf/pcfread.c (pcf_read_TOC): Check `size' and `offset'
2357 values.
2358
23592014-11-06 Werner Lemberg <wl@gnu.org>
2360
Werner Lembergf49a1002014-11-06 13:30:28 +01002361 * src/pcf/pcfread.c (pcf_read_TOC): Avoid memory leak.
2362
Infinalityfacfc792014-11-03 07:24:59 +010023632014-11-03 Infinality <infinality@infinality.net>
2364
2365 * src/truetype/ttsubpix.c (COMPATIBILITY_MODE_Rules): Updated.
2366
2367 The previous commit deteriorates rendering of DejaVu and similar
2368 fonts; this gets compensated with this rule.
2369
Werner Lemberg706f7522014-11-03 07:20:57 +010023702014-11-03 Werner Lemberg <wl@gnu.org>
2371
2372 * src/truetype/ttinterp.c (Ins_DELTAP): Fix subpixel hinting.
2373
2374 Before this patch, it was impossible to ever call DELTAP[123] in
2375 subpixel hinting mode as described in the ClearType whitepaper; it
2376 only worked if in `compatibility mode'. However, compatibility mode
2377 essentially disables SHPIX, completely ruining hinting of
2378 ttfautohint output, for example.
2379
2380 We now follow the whitepaper more closely so that DELTAP[123]
2381 instructions for touched points in the non-subpixel direction are
2382 executed.
2383
Alexei Podtelezhnikove1efe0a2014-10-31 00:07:14 -040023842014-10-31 Alexei Podtelezhnikov <apodtele@gmail.com>
2385
Alexei Podtelezhnikov525d4872014-10-31 22:12:37 -04002386 [smooth] Improve code readability.
2387
2388 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Rearrange code.
2389
23902014-10-31 Alexei Podtelezhnikov <apodtele@gmail.com>
2391
Alexei Podtelezhnikove1efe0a2014-10-31 00:07:14 -04002392 [smooth] Reduce outline translations during rendering.
2393
2394 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Translate origin
2395 virtually by modifying cbox, actually translate outline if cumulative
2396 shift is not zero.
2397
Alexei Podtelezhnikovc7fd9352014-10-30 22:43:01 -040023982014-10-30 Alexei Podtelezhnikov <apodtele@gmail.com>
2399
2400 [smooth] Fix Savannah bug #35604 (cont'd).
2401
2402 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Remove checks and
2403 casts that became unnecessary after the variable type upgrades.
2404
Alexei Podtelezhnikov74916992014-10-29 22:24:24 -040024052014-10-29 Alexei Podtelezhnikov <apodtele@gmail.com>
2406
Alexei Podtelezhnikov465ab992014-10-29 23:45:23 -04002407 [smooth] Improve code readability.
2408
2409 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Rearrange code.
2410
24112014-10-29 Alexei Podtelezhnikov <apodtele@gmail.com>
2412
Alexei Podtelezhnikov74916992014-10-29 22:24:24 -04002413 Unify hypotenuse approximations.
2414
2415 * include/internal/ftcalc.h (FT_HYPOT): Move macro from here...
2416 * include/internal/ftobjs.h: ... to here, next to required `FT_ABS'.
2417 * src/smooth/ftgrays.c (gray_render_cubic): Use it here.
2418
Werner Lembergfe151522014-10-25 05:56:59 +020024192014-10-25 Werner Lemberg <wl@gnu.org>
2420
2421 [cff] Test valid darkening parameter macros in `ftoption.h'.
2422
2423 We no longer need an otherwise unused typedef that can cause a gcc
2424 warning.
2425 Problem reported by Alexei.
2426
2427 * src/cff/cffobjs.c (cff_driver_init): Use
2428 `CFF_CONFIG_OPTION_DARKENING_PARAMETER_XXX' macros directly.
2429 (SET_DARKENING_PARAMETERS): Removed.
2430 Compile time tests are now ...
2431
2432 * devel/ftoption.h, include/config/ftoption.h: ... here.
2433
Alexei Podtelezhnikovaba0f492014-10-24 23:50:57 -040024342014-10-25 Alexei Podtelezhnikov <apodtele@gmail.com>
2435
2436 Improve flat corner definition.
2437
2438 * include/internal/ftcalc.h (FT_HYPOT): Macro to approximate Euclidean
2439 distance with the alpha max plus beta min algorithm.
2440 * src/base/ftcalc.c (ft_corner_is_flat): Use it instead of Taxicab
2441 metric.
2442
David Weißdd8de1a2014-10-23 20:01:48 +020024432014-10-23 David Weiß <David.Weiss@ptvgroup.com>
2444
2445 [build] Improve property file for vc2010.
2446
2447 User-defined properties should be empty by default to prevent linker
2448 failures.
2449
2450 * builds/windows/vc2010/freetype.user.props,
2451 builds/windows/vc2010/freetype.vcxproj:
2452 s/OptionsDirectory/UserOptionDirectory/.
2453 Comment out all user options.
2454
Werner Lembergdd570e92014-10-23 19:57:37 +020024552014-10-23 Werner Lemberg <wl@gnu.org>
2456
2457 [cff] Work around bug in preprocessor of MSVC 2010.
2458
2459 We have been hit by
2460
2461 https://connect.microsoft.com/VisualStudio/feedback/details/718976/msvc-pr
2462
2463 * devel/ftoption.h, include/config/ftoption.h: Replace
2464 `CFF_CONFIG_OPTION_DARKENING_PARAMETERS' with eight macros
2465 `CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4}'.
2466
2467 * src/cff/cffobjs.c (SET_DARKENING_PARAMETERS): Removed. We no
2468 longer need double expansion.
2469 (SET_DARKENING_PARAMETERS_0): Renamed to ...
2470 (SET_DARKENING_PARAMETERS): ... this.
2471 Update call.
2472
Werner Lembergcc7bb802014-10-20 08:35:50 +020024732014-10-20 Werner Lemberg <wl@gnu.org>
2474
2475 [sbit] Minor fixes.
2476
2477 * src/sfnt/ttsbit.c (tt_face_load_sbit) [TT_SBIT_TABLE_TYPE_SBIX]:
2478 Accept overlay format also, but emit warning message in that case.
2479 (tt_sbit_decoder_load_metrics): Add missing newline to error
2480 message.
2481 (tt_sbit_load_sbix_image): Add `rgbl' graphic type (as used on iOS
2482 7.1) to the list of unsupported formats.
2483
Alexei Podtelezhnikov118e6512014-10-19 23:31:08 -040024842014-10-19 Alexei Podtelezhnikov <apodtele@gmail.com>
2485
2486 [truetype] Clean up bytecode rounding.
2487
2488 Zero distance does not have to be treated specially if you follow
2489 specifications and check the sign as the very last step of rounding.
2490
2491 * src/truetype/ttinterp.c (Round_None, Round_To_Grid,
2492 Round_Down_To_Grid, Round_Up_To_Grid, Round_To_Double_Grid): Use
2493 macros when available, do not check for non-zero distance.
2494 (Round_To_Half_Grid, Round_Super, Round_Super_45): Ditto, return phase
2495 if sign changed.
2496
Alexei Podtelezhnikovd4aabda2014-10-18 10:10:04 -040024972014-10-18 Alexei Podtelezhnikov <apodtele@gmail.com>
2498
2499 [truetype] Unwrap engine compensation settings.
2500
2501 * src/truetype/ttobjs.c (tt_size_init_bytecode): Updated.
2502
David Weißfede19e2014-10-18 14:59:20 +020025032014-10-18 David Weiß <David.Weiss@ptvgroup.com>
2504
2505 [build] Add property file to vc2010 project.
2506
2507 This simplifies custom build configurations, especially for
2508 automated build environments.
2509
2510 * builds/windows/vc2010/freetype.user.props: New configuration file.
2511
2512 * builds/windows/vc2010/freetype.vcxproj: Include
2513 `freetype.user.props' and use its data fields.
2514
2515 * builds/windows/vc2010/index.html: Updated.
2516
Werner Lembergc9c33f22014-10-18 11:01:14 +020025172014-10-18 Werner Lemberg <wl@gnu.org>
2518
2519 [autofit] Add blue-zone support for Telugu.
2520
2521 This essentially moves the Telugu script from the `Indic' hinter to
2522 the `Latin' hinter.
2523
2524 Note that this is a first shot and quite certainly needs
2525 refinements.
2526
2527 * src/autofit/afblue.dat: Add blue zone data for Telugu.
2528
2529 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2530
2531 * src/autofit/afscript.h: Add Telugu standard characters and move
2532 data out of AF_CONFIG_OPTION_INDIC block.
2533
2534 * src/autofit/afranges.c: Move Telugu data out of
2535 AF_CONFIG_OPTION_INDIC block.
2536
2537 * src/autofit/afstyles.h: Update Telugu data; in particular, use
2538 AF_WRITING_SYSTEM_LATIN.
2539
Werner Lemberg54306f52014-10-18 10:42:28 +020025402014-10-18 David Wimsey <david@wimsey.us>
2541
2542 [cmake] Add iOS build support.
Werner Lemberg1050aa92014-10-18 10:45:09 +02002543 From Savannah patch #8497.
Werner Lemberg54306f52014-10-18 10:42:28 +02002544
2545 * builds/cmake/iOS.cmake: New file. Universal binaries are built
2546 with both 32 and 64 bit arm architectures.
2547
2548 * CMakeLists.txt (IOS_PLATFORM): New variable for running the iOS
2549 toolchain. Possible values are `OS' to build on iOS, or
2550 `SIMULATOR' to build on APPLE.
2551
Werner Lemberg1a1750f2014-10-16 22:54:01 +020025522014-10-16 Behdad Esfahbod <behdad@behdad.org>
2553 Werner Lemberg <wl@gnu.org>
2554
2555 [cff] Add `CFF_CONFIG_OPTION_DARKENING_PARAMETERS' config macro.
2556
2557 * devel/ftoption.h, include/config/ftoption.h
2558 (CFF_CONFIG_OPTION_DARKENING_PARAMETERS): New macro.
2559
2560 * src/cff/cffobjs.c (SET_DARKENING_PARAMETERS,
2561 SET_DARKENING_PARAMETERS_0): New macros.
2562 (cff_driver_init): Use new macros.
2563
Alexei Podtelezhnikov7e83f062014-10-14 23:03:56 -040025642014-10-14 Alexei Podtelezhnikov <apodtele@gmail.com>
2565
2566 [truetype] Limit delta shift range.
2567
Werner Lembergdf3d67e2014-10-16 07:24:44 +02002568 The valid range for delta shift is zero through six. Negative values
2569 are invalid according to
2570
Alexei Podtelezhnikov7e83f062014-10-14 23:03:56 -04002571 https://developer.apple.com/fonts/TrueType-Reference-Manual/RM04/Chap4.html#delta%20shift
2572
2573 * src/truetype/ttobjs.h (delta_shift, delta_base): Make unsigned.
Werner Lembergdf3d67e2014-10-16 07:24:44 +02002574 * src/truetype/ttinterp.h (DO_SDS): Throw an error if `delta_shift'
2575 is out of range.
2576 (Ins_DELTAP, Ins_DELTAC): Optimize for valid `delta_shift'.
Alexei Podtelezhnikov7e83f062014-10-14 23:03:56 -04002577
Werner Lemberg03987bf2014-10-16 07:19:46 +020025782014-10-16 Werner Lemberg <wl@gnu.org>
2579
2580 A better fix for Savannah bug #43392.
2581 Suggested by Doug Felt <dougfelt@gmail.com>.
2582
Werner Lembergdf3d67e2014-10-16 07:24:44 +02002583 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics): Set
Werner Lemberg03987bf2014-10-16 07:19:46 +02002584 `vertAdvance' to zero...
2585
2586 * src/truetype/ttgload.c (TT_Load_Glyph): ... and set here a default
2587 value for `vertAdvance' based on `linearVertAdvance' in case
2588 `vertAdvance' is zero. Note that the previous computed ad-hoc value
2589 for `linearVertAdvance' was apparently not tested in a real-life
2590 situation.
2591
David Weiß3889cb22014-10-14 11:35:16 +020025922014-10-14 David Weiß <David.Weiss@ptvgroup.com>
2593
2594 [build] Better optimization settings for vc2010 solution file.
2595
2596 * builds/windows/vc2010/freetype.sln,
2597 builds/windows/vc2010/freetype.vcxproj: Updated.
2598
Werner Lemberg8f178092014-10-14 08:28:09 +020025992014-10-14 Werner Lemberg <wl@gnu.org>
2600
2601 [autofit] Adjust Devenagari character range.
2602
2603 * src/autofit/afranges.c (af_deva_uniranges): Omit characters that
2604 are common to all other Indic scripts.
2605
Werner Lemberg1ca5fa12014-10-12 08:31:32 +020026062014-10-12 Werner Lemberg <wl@gnu.org>
2607
2608 [sfnt] Fix Savannah bug #43392.
2609
2610 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics): Don't let
2611 vertical metrics uninitialized.
2612
Alexei Podtelezhnikov673a28e2014-10-11 14:40:51 -040026132014-10-11 Alexei Podtelezhnikov <apodtele@gmail.com>
2614
2615 [base] Small bbox correction.
2616
2617 * src/base/ftbbox.c (FT_Outline_Get_BBox): Start from nonsense bbox
Werner Lembergdf3d67e2014-10-16 07:24:44 +02002618 instead of initial point that could be `off' in conic outlines.
Alexei Podtelezhnikov673a28e2014-10-11 14:40:51 -04002619
Alexei Podtelezhnikov2ffcf172014-10-08 22:01:08 -040026202014-10-08 Alexei Podtelezhnikov <apodtele@gmail.com>
2621
Alexei Podtelezhnikov40dac112014-10-09 00:58:14 -04002622 [base] Fix Savannah bug #43356.
2623
2624 * src/base/ftbbox.c (BBox_Move_To, BBox_Conic_To): Update bbox in case
Werner Lembergdf3d67e2014-10-16 07:24:44 +02002625 of implicit `to'.
Alexei Podtelezhnikov40dac112014-10-09 00:58:14 -04002626 (BBox_Line_To): New emitter that does not update bbox.
2627
26282014-10-08 Alexei Podtelezhnikov <apodtele@gmail.com>
2629
Alexei Podtelezhnikov2ffcf172014-10-08 22:01:08 -04002630 [base] Introduce and use new macro `FT_UPDATE_BBOX'
2631
2632 * src/base/ftbbox.c (FT_UPDATE_BBOX): New macro.
2633 (FT_Outline_Get_BBox): Use it here.
2634
Alexei Podtelezhnikov7abdb8c2014-10-02 23:13:33 -040026352014-10-02 Alexei Podtelezhnikov <apodtele@gmail.com>
2636
2637 [base] Significant optimization of `ft_div64by32'
2638
2639 We shift as many bits as we can into the high register, perform
2640 32-bit division with modulo there, then work through the remaining
2641 bits with long division. This optimization is especially noticeable
2642 for smaller dividends that barely use the high register.
2643
2644 * src/base/ftcalc.c (ft_div64by32): Updated.
2645
Dave Arnold537c55d2014-10-02 06:32:32 +020026462014-10-02 Dave Arnold <darnold@adobe.com>
2647
2648 [cff] Fix Savannah bug #43271.
2649
2650 * src/cff/cf2font.c (cf2_computeDarkening): Change overflow
2651 detection to use logarithms and clamp `scaledStem'.
2652
Alexei Podtelezhnikov418e18f2014-10-01 22:36:40 -040026532014-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
2654
Alexei Podtelezhnikov74d0aad2014-10-01 23:27:15 -04002655 * src/base/ftcalc.c: Remove miscellaneous type casts.
2656
26572014-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
2658
Alexei Podtelezhnikov418e18f2014-10-01 22:36:40 -04002659 [base] Use more common `FT_MSB' implementation with masks.
2660
2661 * src/base/ftcalc.c (FT_MSB): Updated.
2662
Alexei Podtelezhnikov955aff12014-09-30 23:09:39 -040026632014-09-30 Alexei Podtelezhnikov <apodtele@gmail.com>
2664
2665 [base] Clean up.
2666
2667 * src/base/ftcalc.c (FT_MOVE_SIGN): New macro for frequently used
2668 code.
2669
Alexei Podtelezhnikov7f491112014-09-25 22:54:38 -040026702014-09-25 Alexei Podtelezhnikov <apodtele@gmail.com>
2671
2672 [base] Avoid unnecessary long division.
2673
2674 This applies to `FT_MulDiv' but not to `FT_DivFix', where overflows or
2675 lack thereof are predicted accurately.
2676
2677 * src/base/ftcalc.c (ft_div64by32): Improve readability.
2678 (FT_MulDiv, FT_MulDiv_No_Round) [!FT_LONG64]: Use straight division
2679 when multiplication stayed within 32 bits.
2680
Werner Lemberg5b68e4f2014-09-24 19:06:13 +020026812014-09-24 Werner Lemberg <wl@gnu.org>
2682
2683 [autofit] Minor clean-ups.
2684
2685 * src/autofit/afhints.c (AF_FLAGS): Remove obsolete values.
2686
2687 * src/autofit/afhints.c (af_glyph_hints_dump_points,
2688 af_glyph_hints_align_strong_points): Updated.
2689
2690 * src/autofit/aflatin.c (af_latin_hints_link_segments,
2691 af_latin_hints_compute_segments), src/autofit/afcjk.c
2692 (af_cjk_hints_link_segments), src/autofit/aflatin2.c
2693 (af_latin2_hints_link_segments, af_latin2_hints_compute_segments):
2694 There are no longer fake segments since more than 10 years...
2695
Werner Lemberg387a9fe2014-09-22 06:42:24 +020026962014-09-22 Werner Lemberg <wl@gnu.org>
2697
2698 [autofit] Minor code streamlining.
2699
2700 * src/autofit/afhints.c (af_axis_hints_new_edge): Remove redundant
2701 initialization.
2702
Alexei Podtelezhnikov5c894842014-09-19 22:03:15 -040027032014-09-19 Alexei Podtelezhnikov <apodtele@gmail.com>
2704
2705 * src/base/ftcalc.c: Harmonize code.
2706
27072014-09-15 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikovbc12d9e2014-09-08 21:27:43 -04002708
Alexei Podtelezhnikovef070d42014-09-15 22:06:19 -04002709 [base] Tighten the overflow check in `FT_MulDiv'.
2710
2711 * src/base/ftcalc.c (FT_MulDiv) [!FT_LONG64]: Updated.
2712
27132014-09-08 Alexei Podtelezhnikov <apodtele@gmail.com>
2714
Alexei Podtelezhnikovbc12d9e2014-09-08 21:27:43 -04002715 Fix Savannah bug #43153.
2716
2717 * src/psaux/psconv.c (PS_Conv_ToFixed): Add protection against
Alexei Podtelezhnikov7abdb8c2014-10-02 23:13:33 -04002718 overflow in `divider'.
Alexei Podtelezhnikovbc12d9e2014-09-08 21:27:43 -04002719
Alexei Podtelezhnikov32128522014-09-03 21:57:42 -040027202014-09-03 Alexei Podtelezhnikov <apodtele@gmail.com>
2721
Alexei Podtelezhnikov336735d2014-09-03 22:55:26 -04002722 [base] Tighten the overflow check in `FT_DivFix'.
2723
2724 This fixes a 13-year old bug. The original overflow check should have
2725 been updated when rounding was introduced into this function
2726 (c2cd00443b).
2727
2728 * src/base/ftcalc.c (FT_DivFix) [!FT_LONG64]: Updated.
2729 * include/freetype.h (FT_DivFix): Updated documentation.
2730
27312014-09-03 Alexei Podtelezhnikov <apodtele@gmail.com>
2732
Alexei Podtelezhnikov32128522014-09-03 21:57:42 -04002733 [base] Tighten the overflow check in `FT_MulFix'.
2734
2735 * src/base/ftcalc.c (FT_MulFix) [!FT_LONG64]: Updated.
2736
Alexei Podtelezhnikov125c3ca2014-09-02 22:38:59 -040027372014-09-02 Alexei Podtelezhnikov <apodtele@gmail.com>
2738
2739 [truetype] Shortcut ppem calculations for square pixels.
2740
2741 * src/truetype/ttinterp.h (TT_ExecContextRec): New field
2742 `cur_ppem_func' with a function pointer.
2743 * src/truetype/ttinterp.c (TT_RunIns): Initialize `cur_ppem_func'
2744 depending on the pixel geometry to either...
2745 (Current_Ppem_Stretched): ... this for stretched pixels.
2746 (Current_Ppem): ... or this for square pixels.
2747 (DO_MPPEM, DO_MPS, Ins_DELTAP, Ins_DELTAC): Use `cur_ppem_func'.
2748
Behdad Esfahbod1ec98b22014-08-31 08:47:11 +020027492014-08-31 Behdad Esfahbod <behdad@behdad.org>
2750
2751 Don't use `register' keyword. Fixes compiler warnings.
2752
2753 * src/base/ftcalc.c (FT_Add64) [!FT_LONG64]: Do it.
2754 * src/gzip/inftrees.c (huft_build): Ditto.
2755 * src/truetype/ttinterp.c (TT_MulFix14_arm): Ditto.
2756
Alexei Podtelezhnikova8bc49e2014-08-24 22:14:01 -040027572014-08-24 Alexei Podtelezhnikov <apodtele@gmail.com>
2758
Alexei Podtelezhnikov125c3ca2014-09-02 22:38:59 -04002759 [truetype] Optimize DELTAP and DELTAC.
Alexei Podtelezhnikova8bc49e2014-08-24 22:14:01 -04002760
2761 * src/truetype/ttinterp.c (Ins_DELTAP, Ins_DELTAC): Move ppem
2762 calculations outside of the loop.
2763
Alexei Podtelezhnikov98688592014-08-21 23:28:52 -040027642014-08-21 Alexei Podtelezhnikov <apodtele@gmail.com>
2765
2766 Fix Savannah bug #43033.
2767
2768 * include/config/ftconfig.h, builds/unix/ftconfig.in,
2769 builds/vms/ftconfig.h [FT_LONG64]: Do not disable the macro when
2770 64-bit type is `long'.
2771
Alexei Podtelezhnikov8fd87d42014-08-20 00:57:22 -040027722014-08-20 Alexei Podtelezhnikov <apodtele@gmail.com>
2773
2774 [base] Small optimization of `FT_MulFix'.
2775
2776 * src/base/ftcalc.c (FT_MulFix): Loosen up the condition for direct
2777 32-bit calculations.
2778
Alexei Podtelezhnikovf09326a2014-08-20 00:08:38 -040027792014-08-19 Alexei Podtelezhnikov <apodtele@gmail.com>
2780
2781 [base] Use unsigned calculation in `FT_MulDiv'.
2782
2783 * src/base/ftcalc.c (FT_MulDiv): Updated to expand 32-bit range.
2784
Alexei Podtelezhnikov382f3152014-08-18 23:16:15 -040027852014-08-18 Alexei Podtelezhnikov <apodtele@gmail.com>
2786
2787 [base] Remove truncation in `FT_DivFix'.
2788
2789 * src/base/ftcalc.c (FT_DivFix): Updated.
2790
Alexei Podtelezhnikov5ef20232014-08-14 23:21:46 -040027912014-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
2792
2793 Minor refactoring.
2794
2795 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round): Updated.
2796
27972014-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikovc7022462014-08-14 23:01:01 -04002798
2799 Turn FT_MSB into a macro when using gcc builtins.
2800
2801 * src/base/ftcalc.c, include/internal/ftcalc.h: Updated.
2802
Alexei Podtelezhnikovf8efbcf2014-08-12 23:22:17 -040028032014-08-12 Alexei Podtelezhnikov <apodtele@gmail.com>
2804
2805 [base] Avoid undefined FT_MSB in `BBox_Cubic_Check'.
2806
2807 * src/base/ftbbox.c (BBox_Cubic_Check): Update.
2808 (update_cubic_max): Repalce with...
2809 (cubic_peak): ... this, which now handles upscaling.
2810
Alexei Podtelezhnikov47289932014-08-11 23:39:34 -040028112014-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
2812
Alexei Podtelezhnikov28018d42014-08-12 00:26:16 -04002813 [base] Handle collapsed outlines to avoid undefined FT_MSB.
2814
2815 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Update.
2816
28172014-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
2818
Alexei Podtelezhnikov47289932014-08-11 23:39:34 -04002819 [base] Restore FT_MulFix inlining.
2820
2821 * include/freetype.h (FT_MulFix): Unconditionally defined.
2822
2823 * src/base/ftcalc.c [FT_MULFIX_ASSEMBLER]: Move code from here...
2824
2825 * include/internal/ftcalc.h [FT_MULFIX_ASSEMBLER]: ... to here,
2826 which conditionally replaces the function with an inline version
2827 through the macro.
2828
Alexei Podtelezhnikov90be4b62014-08-08 22:27:10 -040028292014-08-08 Alexei Podtelezhnikov <apodtele@gmail.com>
2830
2831 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Refactor.
2832
Werner Lembergd17cabf2014-07-26 09:53:50 +090028332014-07-26 Werner Lemberg <wl@gnu.org>
2834
2835 [cff] Fix typo.
2836
2837 * src/cff/cf2hints.c (cf2_glyphpath_computeOffset): Use correct
2838 offsets in third quadrant.
2839
2840 Reported by maks <maksqwe1@ukr.net>.
2841
Werner Lemberg4e754132014-07-17 17:34:49 +090028422014-07-17 Werner Lemberg <wl@gnu.org>
2843
2844 Fix Savannah bug #42788.
2845
2846 * src/pfr/pfrobjs.c: Include `ftcalc.h'.
2847
Alexei Podtelezhnikovc0a6f202014-07-16 22:05:56 -040028482014-07-16 Alexei Podtelezhnikov <apodtele@gmail.com>
2849
2850 Replace `ft_highpow2' function.
2851
2852 * src/pfr/pfrobjs.c (pfr_face_get_kerning): Use `FT_MSB' instead of
2853 `ft_highpow2'.
2854
2855 * src/base/ftutil.c, include/internal/ftobjs.h (ft_highpow2): Remove
2856 it.
2857
Alexei Podtelezhnikov71330ce2014-07-15 23:30:45 -040028582014-07-15 Alexei Podtelezhnikov <apodtele@gmail.com>
2859
Werner Lembergcbbf26b2014-07-17 17:27:12 +09002860 * src/base/ftcalc.c (FT_MSB): Utilize gcc builtins.
Alexei Podtelezhnikov177982e2014-07-15 23:54:34 -04002861
28622014-07-15 Alexei Podtelezhnikov <apodtele@gmail.com>
2863
Alexei Podtelezhnikov71330ce2014-07-15 23:30:45 -04002864 [base] Move assembler code back in the source file.
2865
2866 FT_MulFix assembler used to reside in ftcalc.c before f47d263f1b.
2867
2868 * include/config/ftconfig.h, builds/unix/ftconfig.in,
2869 builds/vms/ftconfig.h [FT_MULFIX_ASSEMBLER]: Move code from here...
2870
2871 * src/base/ftcalc.c [FT_MULFIX_ASSEMBLER]: ... to here.
2872
28732014-07-14 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov1183cd42014-07-14 22:30:55 -04002874
2875 [base] Further clean up color bitmap conversion.
2876
2877 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Stop
2878 using FT_MulFix and FT_DivFix since all calculations fit into 32 bits.
2879
Werner Lemberg441b3f32014-07-13 02:28:14 +090028802014-07-13 Werner Lemberg <wl@gnu.org>
2881
2882 [truetype] Improve handling of buggy `prep' tables.
2883
2884 In case of an error in the `prep' table, no longer try to execute it
2885 again and again. This makes FreeType handle endless loops in buggy
2886 fonts much faster.
2887
2888 * src/truetype/ttobjs.h (TT_SizeRec): The fields `bytecode_ready'
2889 and `cvt_ready' are now negative if not initialized yet, otherwise
2890 they indicate the error code of the last run.
2891
2892 * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep,
2893 tt_size_done_bytecode, tt_size_init_bytecode,
2894 tt_size_ready_bytecode, tt_size_init, tt_size_done, tt_size_reset):
2895 Updated.
2896
2897 * src/truetype/ttgload.c (tt_loader_init): Updated.
2898 * src/truetype/ttinterp.c (TT_RunIns): Force reexecution of `fpgm'
2899 and `prep' only if we are in the `glyf' table.
2900
Werner Lemberge98e2bc2014-07-12 16:37:39 +090029012014-07-12 Werner Lemberg <wl@gnu.org>
2902
2903 * builds/vms/ftconfig.h: Synchronize.
2904 Problem reported by Alexei.
2905
Alexei Podtelezhnikov35576bf2014-07-11 22:40:34 -040029062014-07-11 Alexei Podtelezhnikov <apodtele@gmail.com>
2907
2908 [base] Clean up bitmap conversion.
2909
2910 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Use
2911 appropriate FT_DivFix and remove superfluous upscaling.
2912
Alexei Podtelezhnikovceab95a2014-07-04 23:01:32 -040029132014-07-04 Alexei Podtelezhnikov <apodtele@gmail.com>
2914
2915 [base] Small optimization of the ancient code.
2916
2917 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round): Loosen up the
2918 condition for direct 32-bit calculations.
2919
Werner Lemberg38975562014-06-27 06:55:56 +020029202014-06-27 Werner Lemberg <wl@gnu.org>
2921
2922 Fix Apple standard glyph names.
2923
2924 * src/sfnt/ttpost.c (tt_post_default_names): Synchronize with
2925 `tools/glnames.py'
2926
2927 Problem reported by Adam Twardoch <adam@fontlab.com>.
2928
Werner Lembergcf2347c2014-06-17 09:01:04 +020029292014-06-17 Werner Lemberg <wl@gnu.org>
2930
Werner Lemberg231171f2014-06-17 09:14:32 +02002931 Partially revert commit from 2014-06-13.
2932
2933 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Move
2934 declaration of `p_first' and `p_last' out of the loop.
2935
29362014-06-17 Werner Lemberg <wl@gnu.org>
2937
Werner Lembergcf2347c2014-06-17 09:01:04 +02002938 * builds/unix/freetype2.m4: s/AC_PATH_PROG/AC_PATH_TOOL/.
2939
2940 This simplifies cross-compiling.
2941
Werner Lemberg6497b9c2014-06-13 09:28:00 +020029422014-06-13 Werner Lemberg <wl@gnu.org>
2943
Werner Lemberge5c0fff2014-06-13 14:01:20 +02002944 Fix more compiler warnings.
2945 Reported by Wojciech Mamrak <wmamrak@gmail.com>.
2946
2947 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
2948 Make integer constant unsigned.
2949
2950 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
2951 <TT_SBIT_TABLE_TYPE_SBIX>: Fix types.
2952 (tt_sbit_decoder_load_compound, tt_face_load_sbix_image): Add proper
2953 casts.
2954
29552014-06-13 Werner Lemberg <wl@gnu.org>
2956
Werner Lemberg6497b9c2014-06-13 09:28:00 +02002957 Fix compiler warnings.
2958 Reported by Wojciech Mamrak <wmamrak@gmail.com>.
2959
2960 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage),
Werner Lembergcbbf26b2014-07-17 17:27:12 +09002961 src/autofit/afmodule.c (af_property_set): Fix `signed' vs.
Werner Lemberg6497b9c2014-06-13 09:28:00 +02002962 `unsigned' issues.
2963
2964 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Make compiler
2965 happy.
2966
2967 * src/base/ftlcdfil.c (_ft_lcd_filter_fir): Use only four elements
2968 for `fir'.
2969 Fix `signed' vs. `unsigned' issues.
2970
2971 * src/sfnt/sfobjs.c (WRITE_BYTE): Removed, unused.
2972 (WRITE_USHORT, WRITE_ULONG): Add proper casts.
2973
2974 * src/truetype/ttgload.c (TT_Get_VMetrics): Add proper casts.
2975
2976 * src/truetype/ttinterp.c (Ins_DELTAP): Add proper casts for `B1'
2977 and `B2'.
2978
Alexey Petruchik02f21702014-05-16 08:09:43 +020029792014-05-16 Alexey Petruchik <alexey.petruchik@gmail.com>
2980
2981 [cmake] Add option to build OS X framework.
2982
2983 * CMakeLists.txt: Update accordingly.
2984
2985 * builds/mac/freetype-Info.plist: New file.
2986
Pavel Koshevoy15da66a2014-05-13 07:33:48 +020029872014-05-13 Pavel Koshevoy <pkoshevoy@gmail.com>
2988
2989 * CMakeLists.txt (BASE_SRCS): Add missing `ftbdf.c'.
2990
Werner Lemberg07e7b8a2014-05-11 08:00:25 +020029912014-05-11 Werner Lemberg <wl@gnu.org>
2992
Werner Lembergfaa21472014-05-11 12:44:00 +02002993 [autofit] Fix variable initializations.
2994
2995 * src/autofit/afhints.c (af_glyph_hints_reload): Assign default
2996 values to `in_dir' and `out_dir' for all points.
2997
29982014-05-11 Werner Lemberg <wl@gnu.org>
2999
Werner Lemberg07e7b8a2014-05-11 08:00:25 +02003000 [autofit] Fix crash with font `CabinSketch-Bold.ttf'.
3001
3002 Problem reported by Ralf S. Engelschall <rse@engelschall.com>.
3003
3004 * src/autofit/afhints.c (af_glyph_hints_reload): Fix threshold for
3005 finding first non-near point.
3006 Properly initialize non-near point deltas.
3007
Werner Lemberg63bef9a2014-05-01 07:16:05 +020030082014-05-01 Werner Lemberg <wl@gnu.org>
3009
Werner Lembergc576bb02014-05-01 17:24:19 +02003010 [autofit] Add blue-zone support for Devanagari.
3011
3012 This essentially moves the Devanagari script from the `Indic' hinter
3013 to the `Latin' hinter. Thanks to Girish Dalvi
3014 <girish.dalvi@gmail.com> for guidance with blue zone characters!
3015
3016 * src/autofit/afblue.dat: Add blue zone data for Devanagari.
3017
3018 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3019
3020 * src/autofit/afscript.h: Add Devanagari standard characters and
3021 move data out of AF_CONFIG_OPTION_INDIC block.
3022
3023 * src/autofit/afranges.c: Move Devanagari data out of
3024 AF_CONFIG_OPTION_INDIC block.
3025 Move U+20B9, (new) Rupee sign, from Latin to Devanagari.
3026
3027 * src/autofit/afstyles.h: Update Devanagari data; in particular, use
3028 AF_WRITING_SYSTEM_LATIN.
3029
30302014-05-01 Werner Lemberg <wl@gnu.org>
3031
Werner Lemberg63bef9a2014-05-01 07:16:05 +02003032 [autofit] Fix handling of neutral blue zones in stems.
3033
3034 * src/autofit/afhints.h (AF_Edge_Flags): New value
3035 `AF_EDGE_NEUTRAL'.
3036
3037 * src/autofit/aflatin.c (af_latin_hints_compute_blue_edges): Trace
3038 neutral blue zones with AF_EDGE_NEUTRAL.
3039 (af_latin_hint_edges): Skip neutral blue zones if necessary.
3040
Werner Lembergccfc4b42014-04-28 21:13:14 +020030412014-04-28 Werner Lemberg <wl@gnu.org>
3042
3043 [autofit] Introduce neutral blue zones to the latin module.
3044
3045 Such blue zones match either the top or the bottom of a contour. We
3046 need them for scripts where accent-like elements directly touch the
3047 base character (for example, some vowel signs in Devanagari, cf.
3048 U+0913 or U+0914).
3049
3050 * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_NEUTRAL): New
3051 property.
3052
3053 * src/autofit/afblue.h: Regenerated.
3054
3055 * src/autofit/aflatin.h (AF_LATIN_IS_NEUTRAL_BLUE): New macro.
3056 (AF_LATIN_BLUE_NEUTRAL): New enumeration value.
3057
3058 * src/autofit/aflatin.c (af_latin_metrics_init_blues,
3059 af_latin_hints_compute_blue_edges): Handle neutral blue zones.
3060
Werner Lembergabb3fca2014-04-25 22:13:32 +020030612014-04-25 Werner Lemberg <wl@gnu.org>
3062
3063 * src/autofit/hbshim.c: Partially revert commit from 2014-04-17.
3064
3065 Using input glyph coverage data is simply wrong.
3066
3067 Problem reported by Nikolaus Waxweiler <madigens@gmail.com> and
3068 Mantas MikulÄ—nas <grawity@gmail.com>.
3069
Werner Lembergf1936372014-04-23 08:22:33 +020030702014-04-23 Werner Lemberg <wl@gnu.org>
3071
3072 * src/raster/ftraster.c (Vertical_Sweep_Span): Use drop-out mode.
3073
3074 This spot has been missed while introducing support for various
3075 drop-out modes years ago (including no drop-out mode, which this
3076 commit fixes).
3077
3078 Problem reported by Patrick Thomas <pthomas505@gmail.com>.
3079
Werner Lembergd9b44702014-04-22 07:33:07 +020030802014-04-22 Werner Lemberg <wl@gnu.org>
3081
3082 * src/sfnt/pngshim.c (error_callback): s/longjmp/ft_longjmp/.
3083
Werner Lemberg98e510e2014-04-20 22:11:27 +020030842014-04-20 Werner Lemberg <wl@gnu.org>
3085
3086 [autofit] Fix Savannah bug #42148.
3087
3088 The adaptation of the cjk auto-hinter module to blue stringsets in
3089 2013-08-25 had three severe bugs. Mea culpa.
3090
3091 1. Contrary to the latin auto-hinter, characters for reference and
3092 overshoot values of a blue zone are specified separately. Due to
3093 the screwed-up change it didn't work at all.
3094
3095 2. A boolean comparison was erroneously replaced with a cast,
3096 causing invalid results with the `^' operator later on. The
3097 visual artifact caused by this problem is the topic of the bug
3098 report.
3099
3100 3. Two flag values were inverted, causing incorrect assignment of
3101 reference and overshoot values.
3102
3103 * src/autofit/afblue.dat: Fix CJK bluestrings, introducing a new
3104 syntax to have both reference and overshoot characters in a single
3105 string. This is error #1.
3106 Add extensive comments.
3107
3108 * src/autofit/afblue.hin (AF_BLUE_PROPERTY_CJK_FILL): Removed, no
3109 longer used.
Werner Lembergccfc4b42014-04-28 21:13:14 +02003110 (AF_BLUE_PROPERTY_CJK_TOP, AF_BLUE_PROPERTY_CJK_HORIZ): Fix values.
Werner Lemberg98e510e2014-04-20 22:11:27 +02003111 This is error #3.
3112
3113 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3114
3115 * src/autofit/afcjk.c (af_cjk_metrics_init_blues): Correct error #1.
3116 Use character `|' to separate characters for reference and overshoot
3117 values.
3118 Improve tracing messages, synchronizing them with the latin
3119 auto-hinter.
Werner Lembergccfc4b42014-04-28 21:13:14 +02003120 (af_cjk_hints_compute_blue_edges): Fix value of `is_top_right_blue'.
Werner Lemberg98e510e2014-04-20 22:11:27 +02003121 This is error #2.
3122 (af_cjk_align_linked_edge): Add tracing message.
3123
3124 * src/autofit/afcjk.h (AF_CJK_IS_FILLED_BLUE): Removed, no longer
3125 used.
3126
Werner Lembergbbd83132014-04-17 01:24:36 +020031272014-04-17 Werner Lemberg <wl@gnu.org>
3128
Werner Lemberg8c7fb782014-04-17 15:53:25 +02003129 [autofit] More coverage fixes for complex scripts.
3130
3131 * src/autofit/hbshim.c (af_get_coverage): Merge input glyph coverage
3132 of GSUB lookups into output coverage. Otherwise, ligatures are not
3133 handled properly.
3134 Don't check blue zone characters for default coverage.
3135
31362014-04-17 Werner Lemberg <wl@gnu.org>
3137
Werner Lembergbbd83132014-04-17 01:24:36 +02003138 Make `FT_Get_SubGlyph_Info' actually work.
3139
3140 * src/base/ftobjs.c (FT_Get_SubGlyph_Info): Return FT_Err_Ok
3141 if there is no error.
3142
Werner Lemberg181fd072014-04-15 16:47:05 +020031432014-04-15 Werner Lemberg <wl@gnu.org>
3144
3145 [afblue.pl]: Minor improvements.
3146
3147 * src/tools/afblue.pl: Allow whitespace before comments.
3148 Ignore whitespace in strings.
3149
Werner Lemberg8b1f2a62014-04-14 07:58:19 +020031502014-04-14 Werner Lemberg <wl@gnu.org>
3151
3152 [autofit] Improve coverage handling.
3153
3154 * src/autofit/hbshim.c (af_get_coverage): Don't exclude glyphs
3155 appearing in the GPOS table if we are processing the default
3156 coverage.
3157
David Weber76307872014-04-13 15:41:13 +020031582014-04-13 David Weber <weber.aulendorf@googlemail.com>
3159
3160 [smooth] Fix stand-alone compilation.
3161
3162 * src/smooth/ftgrays.c (FT_BEGIN_STMNT, FT_END_STMNT): Define.
3163
Werner Lemberg8a94b1e2014-04-12 20:44:33 +020031642014-04-12 Werner Lemberg <wl@gnu.org>
3165
3166 [autofit] Redesign the recognition algorithm of strong points.
3167
3168 In particular, local extrema without horizontal or vertical segments
3169 are better recognized:
3170
3171 + A + D
3172 \ /
3173 \ /
3174 \ /
3175 \ /
3176 \ + C
3177 \ /
3178 B +/
3179
3180 If the distances AB and CD are large, point B wasn't previously
3181 detected as an extremum since the `ft_corner_is_flat' function
3182 `swallowed' BC regardless of its direction, tagging point B as weak.
3183 The next iteration started at B and made `ft_corner_is_flat' swallow
3184 point C, tagging it as weak also, et voilà.
3185
3186 To improve that, another pass gets now performed before calling
3187 `ft_corner_is_flat' to improve the `topology' of an outline: A
3188 sequence of non-horizontal or non-vertical vectors that point into
3189 the same quadrant are handled as a single, large vector.
3190
3191 Additionally, distances of near points are now accumulated, which
3192 makes the auto-hinter handle them as if they were prepended to the
3193 next non-near vector.
3194
3195 This generally improves the auto-hinter's rendering results.
3196
3197 * src/autofit/afhints.c (af_glyph_hints_reload): Implement it.
3198
3199 * src/autofit/afhints.h (AF_FLAGS): Remove no longer used flag
3200 `AF_FLAG_NEAR'.
3201
Werner Lemberg71f53e12014-04-05 16:27:19 +020032022014-04-05 Werner Lemberg <wl@gnu.org>
3203
3204 [autofit] Improve scoring algorithm for identifying stems.
3205
3206 Problem reported by Karsten Lücke <karsten.luecke@kltf.de>.
3207
3208 The new algorithm takes care of the width of stems: If the distance
3209 between two segments is larger than the largest stem width, the
3210 demerits quickly increase for larger distances. This improves
3211 hinting of slanted fonts (especially if the inner parts of serifs
3212 have non-horizontal `shoulders'), avoiding false stem links.
3213
3214 * src/autofit/aflatin.c (af_latin_hints_link_segments): Use largest
3215 stem width (if available) to compute better demerits for distances
3216 between stems.
3217 (af_latin_hints_detect_features): Pass stem width array and array
3218 size.
3219 (af_latin_metrics_init_widths): Updated to use original algorithm.
3220 (af_latin_hints_apply): Updated to use new algorithm.
3221
3222 * src/autofit/aflatin.h: Updated.
3223 * src/autofit/afcjk.c: Updated.
3224
Werner Lembergf8555b52014-04-03 05:45:38 +020032252014-04-03 Werner Lemberg <wl@gnu.org>
3226
3227 Don't require `gzip' module for `sfnt'.
3228
3229 Reported by Preet <prismatic.project@gmail.com>.
3230
3231 * src/sfnt/sfobjs.c (woff_open_font): Guard use of
3232 FT_Gzip_Uncompress with FT_CONFIG_OPTION_USE_ZLIB.
3233
Werner Lembergf41070f2014-03-27 17:38:23 +010032342014-03-27 Werner Lemberg <wl@gnu.org>
3235
3236 Fix Savannah bug #38235.
3237
3238 Work around a bug in pkg-config version 0.28 and earlier: If a
3239 variable value gets surrounded by doublequotes (in particular values
3240 for the `prefix' variable), the prefix override mechanism fails.
3241
3242 * builds/unix/freetype2.in: Don't use doublequotes.
3243 * builds/unix/unix-def.in (freetype.pc): Escape spaces in directory
3244 names with backslashes.
3245
Werner Lembergab76d972014-03-24 19:45:03 +010032462014-03-24 Werner Lemberg <wl@gnu.org>
3247
3248 Fix Savannah bug #41946.
3249
3250 Based on a patch from Marek Kašík <mkasik@redhat.com>.
3251
3252 * builds/unix/configure.raw (LIBS_CONFIG): Remove.
3253 * builds/unix/freetype-config.in (libs): Hard-code value.
3254 * builds/unix/unix-def.in: Updated.
3255
Werner Lembergd5159922014-03-22 06:20:54 +010032562014-03-22 Werner Lemberg <wl@gnu.org>
3257
3258 Another revert for the change from 2014-03-18.
3259
3260 Problem reported by Nikolaus Waxweiler <madigens@gmail.com>.
3261
3262 * src/base/ftcalc.c (FT_MulFix): Ensure that an `FT_MulFix' symbol
3263 gets always exported.
3264
Werner Lembergf0c471a2014-03-20 07:13:12 +010032652014-03-20 Werner Lemberg <wl@gnu.org>
3266
3267 CMakeLists.txt: Another fix for include directories.
3268
3269 Problem reported by Taylor Holberton <taylorcholberton@gmail.com>.
3270
Werner Lembergcc7cf2c2014-03-19 07:35:35 +010032712014-03-19 Werner Lemberg <wl@gnu.org>
3272
Werner Lemberg606c74f2014-03-19 23:46:42 +01003273 CMakeLists.txt: Fix include directories.
3274
3275 Problem reported by Taylor Holberton <taylorcholberton@gmail.com>.
3276
32772014-03-19 Werner Lemberg <wl@gnu.org>
3278
Werner Lembergcc7cf2c2014-03-19 07:35:35 +01003279 Partially revert last commit.
3280
3281 Found by Alexei.
3282
3283 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Initializing
3284 those variables is plain wrong, since we are in a loop.
3285
Sean McBride87628722014-03-18 08:39:35 +010032862014-03-18 Sean McBride <sean@rogue-research.com>
3287 Werner Lemberg <wl@gnu.org>
3288
3289 Fix clang warnings.
3290
3291 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Initialize
3292 some variables.
3293
3294 * src/base/ftcalc.c (FT_MulFix): Only use code if
3295 `FT_MULFIX_INLINED' is not defined.
3296
3297 * src/bdf/bdfdrivr.c (bdf_cmap_class), src/cache/ftcbasic.c
3298 (ftc_basic_image_family_class, ftc_basic_image_cache_class,
3299 ftc_basic_sbit_family_class, ftc_basic_sbit_cache_class),
3300 src/cache/ftccmap.c (ftc_cmap_cache_class), src/cache/ftcmanag.c
3301 (ftc_size_list_class, ftc_face_list_class), src/pcf/pcfdrivr.c
3302 (pcf_cmap_class), src/pfr/pfrdrivr.c (pfr_metrics_service_rec): Make
3303 function static.
3304
3305 * src/type1/t1driver.c (t1_ps_get_font_value): Remove redundant
3306 code.
3307
Werner Lemberg23367ff2014-03-17 07:33:14 +010033082014-03-17 Werner Lemberg <wl@gnu.org>
3309
3310 Fix Savannah bug #41869.
3311
3312 This works around a problem with HarfBuzz (<= 0.9.26), which doesn't
3313 validate glyph indices returned by
3314 `hb_ot_layout_lookup_collect_glyphs'.
3315
3316 * src/autofit/hbshim.c (af_get_coverage): Guard `idx'.
3317
3318 * docs/CHANGES: Updated.
3319
Werner Lemberg03181682014-03-14 08:06:06 +010033202014-03-14 Werner Lemberg <wl@gnu.org>
3321
3322 * builds/unix/configure.raw: Don't show error messages of `which'.
3323
Alan Coopersmithed372b72014-03-09 06:14:12 +010033242014-03-09 Alan Coopersmith <alan.coopersmith@oracle.com>
3325
3326 Fix cppcheck 1.64 warning.
3327
3328 * src/autofit/afglobal.c (af_face_globals_new): Catch NULL pointer
3329 dereference in case of error.
3330
Werner Lemberg1a69dc72014-03-09 06:06:58 +010033312014-03-09 Sean McBride <sean@rogue-research.com>
3332
3333 * src/sfnt/ttcmap.c (tt_face_build_cmaps): Remove clang warning.
3334
Werner Lemberg05565362014-03-06 18:56:58 +010033352014-03-06 Werner Lemberg <wl@gnu.org>
3336
Werner Lembergec8853c2014-03-06 19:13:45 +01003337 * Version 2.5.3 released.
3338 =========================
3339
3340
3341 Tag sources with `VER-2-5-3'.
3342
3343 * docs/VERSION.DLL: Update documentation and bump version number to
3344 2.5.3.
3345
3346 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
3347 builds/windows/vc2005/index.html,
3348 builds/windows/vc2008/freetype.vcproj,
3349 builds/windows/vc2008/index.html,
3350 builds/windows/vc2010/freetype.vcxproj,
3351 builds/windows/vc2010/index.html,
3352 builds/windows/visualc/freetype.dsp,
3353 builds/windows/visualc/freetype.vcproj,
3354 builds/windows/visualc/index.html,
3355 builds/windows/visualce/freetype.dsp,
3356 builds/windows/visualce/freetype.vcproj,
3357 builds/windows/visualce/index.html,
3358 builds/wince/vc2005-ce/freetype.vcproj,
3359 builds/wince/vc2005-ce/index.html,
3360 builds/wince/vc2008-ce/freetype.vcproj,
3361 builds/wince/vc2008-ce/index.html: s/2.5.2/2.5.3/, s/252/253/.
3362
3363 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
3364
3365 * builds/unix/configure.raw (version_info): Set to 17:2:11.
3366 * CMakeLists.txt (VERSION_PATCH): Set to 3.
3367 * docs/CHANGES: Updated.
3368
33692014-03-06 Werner Lemberg <wl@gnu.org>
3370
Werner Lemberg05565362014-03-06 18:56:58 +01003371 Fixes for compilation with C++.
3372
3373 * src/autofit/hbshim.c (scripts): Change type to `hb_script_t'.
3374 (af_get_coverage): Updated.
3375 (COVERAGE): Add cast.
3376
Sean McBrideb24e8d32014-03-06 14:54:22 +010033772014-03-06 Sean McBride <sean@rogue-research.com>
3378
3379 Remove more clang analyzer warnings.
3380
3381 * src/bdf/bdflib.c (_bdf_readstream), src/truetype/ttgload.c
3382 (TT_Load_Glyph): Remove dead stores.
3383
Werner Lemberga32758f2014-03-05 08:02:46 +010033842014-03-05 Werner Lemberg <wl@gnu.org>
3385
3386 * builds/unix/configure.raw: Simplify.
3387
suzuki toshiya382f3ef2014-03-05 10:19:15 +090033882014-03-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3389
3390 Fix a bug in configure in library dependency setting
Werner Lemberga32758f2014-03-05 08:02:46 +01003391 Reported in https://bugs.freedesktop.org/show_bug.cgi?id=75652.
suzuki toshiya382f3ef2014-03-05 10:19:15 +09003392
3393 * builds/unix/configure.raw: Use `x"${xxx}" != xno' style.
3394
Werner Lembergf48f7dc2014-03-04 04:40:07 +010033952014-03-04 Werner Lemberg <wl@gnu.org>
3396
3397 Minor fix for `make devel'.
3398
3399 * builds/freetype.mk (INCLUDE_FLAGS) [DEVEL_DIR]: Don't use
3400 pkg-config for bzip2 since not all GNU/Linux distributions have
3401 `bzip2.pc' (and the header file `bzlib.h' is located in /usr/include
3402 normally).
3403
Werner Lemberg7ac76b52014-03-04 04:29:17 +010034042014-03-04 Sean McBride <sean@rogue-research.com>
3405
3406 Fix several clang static analyzer dead store warnings.
3407
3408 * src/autofit/afhints.c (af_glyph_hints_reload,
3409 af_glyph_hints_align_weak_points): Remove unnecessary assignments.
3410
3411 * src/bdf/bdflib.c (bdf_font_load): Ditto.
3412
3413 * src/pshinter/pshalgo.c (psh_glyph_compute_extrema,
3414 psh_glyph_interpolate_other_points): Ditto.
3415
3416 * src/type1/t1load.c (T1_Set_MM_Blend): Ditto.
3417
Werner Lemberg93ebcbd2014-03-03 07:13:45 +010034182014-03-03 Werner Lemberg <wl@gnu.org>
3419
3420 Rewrite library option handling in `configure'.
3421
3422 o Introduce `auto' value for `--with-XXX' library options; this is
3423 now the default.
3424
3425 o First use `pkg-config' for library detection, then fall back to
3426 other tests.
3427
3428 * builds/unix/configure.raw (--with-zlib, --with-bzip2, --with-png,
3429 --with-harfbuzz): Rewrite.
3430 Use new `xxx_reqpriv', `xxx_libpriv', and `xxx_libstaticconf'
3431 variables to collect data for `freetype2.pc' and `freetype-config'.
3432 (FT2_EXTRA_LIBS): Renamed to ...
3433 (ft2_extra_libs): This since it gets no longer substituted.
3434 (REQUIRES_PRIVATE, LIBS_PRIVATE, LIBS_CONFIG, LIBSSTATIC_CONFIG):
3435 New output variables, replacing `XXX_PKG' and `LIBXXX'.
3436 Add notice at the end of `configure' showing the library
3437 configuration.
3438
3439 * builds/unix/freetype-config.in (--static): New command line
3440 option.
3441 (libs): Updated.
3442 (staticlibs): New variable, to be used if `--static' is given.
Werner Lemberg8fa69a82014-12-03 20:07:14 +01003443 * docs/freetype-config.1: Document `--static'.
Werner Lemberg93ebcbd2014-03-03 07:13:45 +01003444
3445 * builds/unix/freetype2.in, builds/unix/unix-def.in: Updated.
3446
Werner Lemberg86026a42014-03-01 06:57:19 +010034472014-03-01 Werner Lemberg <wl@gnu.org>
3448
Werner Lemberge962a912014-03-01 21:00:02 +01003449 Avoid `long long' warnings with older gcc compilers.
3450 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
3451
3452 * builds/unix/configure.raw: Don't use gcc's `-pedantic' flag for
3453 versions < 4.6. This is especially needed for Max OS X since this
3454 OS runs a gcc variant (or emulation) based on version 4.2.1.
3455
34562014-03-01 Werner Lemberg <wl@gnu.org>
3457
Werner Lemberg6030a9f2014-03-01 14:01:12 +01003458 * docs/INSTALL.CROSS: Revised and updated.
3459
34602014-03-01 Werner Lemberg <wl@gnu.org>
3461
Werner Lemberg646db052014-03-01 12:48:07 +01003462 Make `make clean' remove `freetype2.pc'.
3463
3464 This is a generated file at build time, not configure time.
3465
3466 * builds/unix/unix-def.in (DISTCLEAN): Move `freetype2.pc' to ...
3467 (CLEAN): This variable.
3468
34692014-03-01 Werner Lemberg <wl@gnu.org>
3470
Werner Lemberg00c79ed2014-03-01 12:32:20 +01003471 Use pkg-config for detecting libpng and libbz2 also.
3472
3473 * builds/unix/configure.raw (HAVE_PKG): New variable.
3474 Search for libbz2 using `pkg-config'; s/BZ2/BZIP2/.
3475 Search for libpng using `pkg-config'.
3476 Fix definition of `LIBHARFBUZZ' variable.
3477 * builds/unix/freetype-config.in ($libs): Updated.
3478 * builds/unix/freetype2.in: Add `URL' field.
3479 Update `Requires.private' and `Libs.private'.
3480 * builds/unix/unix-def.in: Updated.
3481
34822014-03-01 Werner Lemberg <wl@gnu.org>
3483
Werner Lemberg86026a42014-03-01 06:57:19 +01003484 Add configure support for HarfBuzz.
3485
3486 * builds/unix/pkg.m4: New file.
3487 * builds/unix/configure.raw: Search for libharfbuzz using
3488 `pkg-config'.
3489 Add `--without-harfbuzz' option.
3490 * builds/unix/freetype-config.in, builds/unix/freetype2.in,
3491 builds/unix/unix-def.in (freetype-config, freetype2.pc): Handle
3492 HarfBuzz.
3493
3494 * docs/INSTALL.UNIX: Document interdependency of Freetype with
3495 HarfBuzz.
3496
Alexei Podtelezhnikov6adda682014-02-28 09:24:26 +010034972014-02-28 Alexei Podtelezhnikov <apodtele@gmail.com>
3498
3499 [cff] Math simplifications.
3500
3501 * src/cf2blues.c (cf2_blues_init): Use `FT_MulDiv'.
3502 * src/cf2ft.c (cf2_getScaleAndHintFlag): Use simple division.
3503
Dave Arnold0eae6eb2014-02-28 07:40:01 +010035042014-02-28 Dave Arnold <darnold@adobe.com>
3505
Dave Arnold135c3fa2014-02-28 07:42:42 +01003506 [cff] Fix Savannah bug #41697, part 2.
3507
3508 * src/cff/cf2ft.c (cf2_initLocalRegionBuffer,
3509 cf2_initGlobalRegionBuffer): It is possible for a charstring to call
3510 a subroutine if no subroutines exist. This is an error but should
3511 not trigger an assert. Split the assert to account for this.
3512
35132014-02-28 Dave Arnold <darnold@adobe.com>
3514
Dave Arnold0eae6eb2014-02-28 07:40:01 +01003515 [cff] Fix Savannah bug #41697, part 1.
3516
3517 * src/cff/cf2hints.c (cf2_hintmap_build): Return when `hintMask' is
3518 invalid. In this case, it is not safe to use the length of
3519 `hStemHintArray'; the exception has already been recorded in
3520 `hintMask'.
3521
Werner Lembergeee4ff82014-02-26 18:12:36 +010035222014-02-26 Werner Lemberg <wl@gnu.org>
3523
Werner Lemberga2b5f662014-02-26 19:50:18 +01003524 [sfnt] Fix Savannah bug #41696.
3525
3526 * src/sfnt/ttcmap.c (tt_cmap0_validate, tt_cmap2_validate,
3527 tt_cmap4_validate, tt_cmap14_validate): Fix limit tests.
3528
35292014-02-26 Werner Lemberg <wl@gnu.org>
3530
Werner Lembergeee4ff82014-02-26 18:12:36 +01003531 [winfnt] Fix Savannah bug #41694.
3532
3533 * src/winfonts/winfnt.c (FNT_Load_Glyph): Check glyph offset.
3534
35352014-02-26 Werner Lemberg <wl@gnu.org>
Werner Lemberg9a567642014-02-26 13:08:07 +01003536
Werner Lemberg08c628d2014-02-26 14:18:03 +01003537 [cff] Fix Savannah bug #41693.
3538
3539 * src/cff/cffload.c (CFF_Load_FD_Select): Reject empty array.
3540
Werner Lembergeee4ff82014-02-26 18:12:36 +010035412014-02-26 Werner Lemberg <wl@gnu.org>
Werner Lemberg08c628d2014-02-26 14:18:03 +01003542
Werner Lemberg9a567642014-02-26 13:08:07 +01003543 [bdf] Fix Savannah bug #41692.
3544
3545 bdflib puts data from the input stream into a buffer in chunks of
3546 1024 bytes. The data itself gets then parsed line by line, simply
3547 increasing the current pointer into the buffer; if the search for
3548 the final newline character exceeds the buffer size, more data gets
3549 read.
3550
3551 However, in case the current line's end is very near to the buffer
3552 end, and the keyword to compare with is longer than the current
3553 line's length, an out-of-bounds read might happen since `memcmp'
3554 doesn't stop properly at the string end.
3555
3556 * src/bdf/bdflib.c: s/ft_memcmp/ft_strncmp/ to make comparisons
3557 stop at string ends.
3558
suzuki toshiya91c7a972014-02-17 16:38:31 +090035592014-02-17 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3560
3561 [autofit] Fix `make multi' compilation.
3562
suzuki toshiyacc9a0c22014-02-17 16:43:54 +09003563 * src/autofit/hbshim.c: Include `afglobal.h' and `aftypes.h'.
suzuki toshiya91c7a972014-02-17 16:38:31 +09003564
Werner Lemberg6b290fd2014-02-19 09:26:54 +010035652014-02-19 Werner Lemberg <wl@gnu.org>
3566 Simon Bünzli <zeniko@gmail.com>
3567
3568 Fix Savannah bug #32902.
3569
3570 Patch taken from
3571
3572 https://code.google.com/p/sumatrapdf/source/browse/trunk/ext/_patches/freetype2.patch?spec=svn8620&r=8620#87
3573
3574 with slight modifications.
3575
3576 * src/type1/t1parse.c (T1_Get_Private_Dict): Add heuristic test to
3577 handle fonts that incorrectly use \r at the beginning of an eexec
3578 block.
3579
Simon Bünzlidf14e6c2014-02-19 08:42:52 +010035802014-02-19 Simon Bünzli <zeniko@gmail.com>
3581
3582 Fix Savannah bug #41590.
3583
3584 * src/type1/t1load.c (parse_encoding): Protect against invalid
3585 number.
3586
Dave Arnold89a94d42014-02-12 23:45:47 +010035872014-02-12 Dave Arnold <darnold@adobe.com>
3588
3589 [cff] Optimize by using `FT_MulDiv'.
3590 Suggested by Alexei.
3591
3592 * src/cff/cf2font.c (cf2_computeDarkening): Do it.
3593
Werner Lemberg85ee27a2014-02-12 23:27:41 +010035942014-02-12 Werner Lemberg <wl@gnu.org>
3595
3596 Fix Savannah bug #41465.
3597
3598 * builds/unix/unix-def.in (CLEAN): Add `freetype-config'.
3599 (DISTCLEAN): Remove `freetype-config'.
3600
Sean McBride7be2a942014-02-08 13:55:38 +010036012014-02-08 Sean McBride <sean@rogue-research.com>
3602
3603 Fix clang static analyzer and compiler warnings.
3604
3605 * src/autofit/afhints.c (af_glyph_hints_align_weak_points),
3606 src/autofit/afloader (af_loader_load_g) <FT_GLYPH_FORMAT_COMPOSITE>,
3607 src/base/ftcalc.c (FT_MSB), src/base/ftoutln.c
3608 (FT_Outline_Decompose), src/bdf/bdfdrivr.c (bdf_interpret_style),
3609 src/cff/cffparse.c (cff_parse_integer), src/cid/cidparse.c
3610 (cid_parser_new), src/pfr/pfrload.c (pfr_phy_font_load),
3611 src/raster/ftraster.c (Decompose_Curve), src/sfnt/sfdriver.c
3612 (sfnt_get_ps_name), src/sfnt/ttcmap.c (tt_cmap12_next,
3613 tt_cmap13_next), src/smooth/ftgrays.c (gray_hline): Remove dead
3614 code.
3615
3616 * src/autofit/afmodule.c (af_property_get_face_globals,
3617 af_property_set, af_property_get), src/base/ftbitmap.c
3618 (ft_gray_for_premultiplied_srgb_bgra): Make functions static.
3619
3620 * src/base/ftobjs.c (ft_remove_renderer): Protect against
3621 library == NULL.
3622 (ft_property_do): Make function static.
3623
3624 * src/base/ftrfork.c: Include `ftbase.h'.
3625
3626 * src/sfnt/ttsbit.c (tt_face_load_sbix_image)
3627 [!FT_CONFIG_OPTION_USE_PNG], src/type1/t1gload.c
3628 (T1_Compute_Max_Advance): Avoid compiler warning.
3629
3630 * src/truetype/ttinterp.c (TT_New_Context): Reduce scope of
3631 variable.
3632
Werner Lembergab98c5e2014-02-08 11:34:33 +010036332014-02-08 Werner Lemberg <wl@gnu.org>
3634
3635 Fix Windows build directories.
3636
3637 The build target is now `windows' instead of `win32'.
3638
3639 Problem reported by Nickolas George <darknova.clan@gmail.com>.
3640
3641 * builds/modules.mk: Don't use `win32' and `win16' (!) but
3642 `windows'.
3643
3644 * builds/windows/detect.mk, builds/windows/win32-def.mk:
3645 s/win32/windows/.
3646
Eugen Sawina8ceae42014-02-08 06:30:06 +010036472014-02-08 Eugen Sawin <esawin@mozilla.com>
3648
3649 Fix Savannah bug #41507.
3650
3651 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap)
3652 [!FT_CONFIG_OPTION_USE_PNG] <17, 17, 19>: Fix error handling.
3653
Dave Arnold355b3592014-02-08 06:23:04 +010036542014-02-08 Dave Arnold <darnold@adobe.com>
3655
3656 [cff] Fix minor performance bug.
3657
3658 * src/cff/cf2font.c (cf2_font_setup): Darkening amount and blue zone
3659 calculations are now cached and not recomputed on each glyph.
3660
Werner Lemberg6dce1362014-02-05 15:40:47 +010036612014-02-05 Werner Lemberg <wl@gnu.org>
3662
3663 Fix problems with perl 5.8.8 as distributed with current MinGW.
3664
3665 * src/tools/afblue.pl: Work-around for Perl bug #63402.
3666 (string_re): Avoid `possessive quantifiers', which have been
3667 introduced in Perl version 5.10.
3668
Werner Lemberga8772912014-02-04 11:36:08 +010036692014-02-04 Werner Lemberg <wl@gnu.org>
3670
Werner Lembergd87f9a62014-02-04 16:14:09 +01003671 Fix compilation with MinGW.
3672
3673 Right now, compilation out of the box with latest MinGW is broken
3674 due to bugs in header files of mingwrt 4.0.3 in strict ANSI mode,
3675 cf.
3676
3677 https://sourceforge.net/p/mingw/bugs/2024/
3678 https://sourceforge.net/p/mingw/bugs/2046/
3679
3680 * builds/unix/configure.raw: Don't set `-ansi' flag for MinGW.
3681
36822014-02-04 Werner Lemberg <wl@gnu.org>
3683
Werner Lemberga8772912014-02-04 11:36:08 +01003684 [autofit] Minor fix.
3685
3686 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
3687 src/autofit/aflatin.c (af_latin_metrics_init_widths): Fix handling
3688 of alternative standard characters.
3689 This also fixes a compilation warning in non-debug mode.
3690
Werner Lembergee3778d2014-02-03 11:16:47 +010036912014-02-03 Werner Lemberg <wl@gnu.org>
3692
3693 [cff] Fix Savannah bug #41363.
3694
3695 * src/cff/cf2ft.c (cf2_checkTransform): Convert assertion into
3696 parameter check.
3697 (cf2_decoder_parse_charstrings): Call `cf2_checkTransform' only if
3698 we are scaling the outline.
3699 (cf2_getPpemY): Remove problematic assertion.
3700
Werner Lemberga3364002014-01-26 09:45:23 +010037012014-01-26 Werner Lemberg <wl@gnu.org>
3702
3703 [autofit] Introduce two more slots for standard characters.
3704
3705 This is useful for OpenType features like `c2sc' (caps to small
3706 caps) that don't have lowercase letters by definition, or other
3707 features that mainly operate on numerals.
3708
3709 * src/autofit/afscript.h: Add more standard characters.
3710
3711 * src/autofit/aftypes.h: Update use of `SCRIPT' macro.
3712 (AF_ScriptClassRec): Add members to hold two more standard
3713 characters.
3714 (AF_DEFINE_SCRIPT_CLASS): Updated.
3715
3716 * src/autofit/afglobal.c, src/autofit/afglobal.h,
3717 * src/autofit/afpic.c, src/autofit/afranges.h, src/autofit/hbshim.c:
3718 Update use of `SCRIPT' macro.
3719
3720 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
3721 src/autofit/aflatin.c (af_latin_metrics_init_widths): Scan two more
3722 standard characters.
3723
Werner Lembergeb7691c2014-01-24 19:04:22 +010037242014-01-24 Werner Lemberg <wl@gnu.org>
3725
3726 Fix Savannah bug #41320.
3727
3728 * src/autofit/aflatin.c (af_latin_metrics_init_blues)
3729 <AF_LATIN_IS_LONG_BLUE>: Avoid negative index of `last'.
3730
Werner Lemberg8b281f82014-01-23 08:14:53 +010037312014-01-23 Werner Lemberg <wl@gnu.org>
3732
Werner Lemberg752f3912014-01-23 09:14:25 +01003733 Fix Savannah bug #41310.
3734
3735 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap) <glyph_format==5>:
3736 Don't check metrics, which this format doesn't have.
3737 This is another correction to the commit from 2013-11-21.
3738
37392014-01-23 Werner Lemberg <wl@gnu.org>
3740
Werner Lemberg8b281f82014-01-23 08:14:53 +01003741 Fix Savannah bug #41309.
3742
3743 * src/type1/t1load.c (t1_parse_font_matrix): Properly handle result
3744 of `T1_ToFixedArray'.
3745
3746 * src/cid/cidload.c (cid_parse_font_matrix): Synchronize with
3747 `t1_parse_font_matrix'.
3748
3749 * src/type42/t42parse.c (t42_parse_font_matrix): Synchronize with
3750 `t1_parse_font_matrix'.
3751 (t42_parse_encoding): Synchronize with `t1_parse_encoding'.
3752
3753 * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_BBOX>,
3754 <T1_FIELD_TYPE_MMOX>: Properly handle result of `ps_tofixedarray'.
3755
Werner Lembergff8dc312014-01-22 09:19:57 +010037562014-01-22 Werner Lemberg <wl@gnu.org>
3757
3758 * src/autofit/hbshim.c (af_get_coverage): Fix memory leaks.
3759
Werner Lemberg6a700782014-01-16 08:55:40 +010037602014-01-16 Werner Lemberg <wl@gnu.org>
3761
3762 [autofit] Improve tracing of style coverages.
3763
3764 * include/internal/fttrace.h: Add `afglobal' for tracing style
3765 coverages.
3766
3767 * src/autofit/afglobal.c: Include FT_INTERNAL_DEBUG_H.
3768 (FT_COMPONENT): Define.
3769 (af_face_globals_compute_style_coverage): Trace `gstyles' array
3770 data.
3771
Werner Lemberg7cbfdff2014-01-09 07:26:06 +010037722014-01-09 Werner Lemberg <wl@gnu.org>
3773
3774 Fix Savannah bug #41158.
3775
3776 * builds/unix/install.mk (install): Create man page directory.
3777
Chongyu Zhu94c66942014-01-08 08:52:59 +010037782014-01-08 Chongyu Zhu <lembacon@gmail.com>
3779
3780 [arm] Fix Savannah bug #41138, part 2.
3781
3782 * builds/unix/ftconfig.in (FT_MulFix_arm), include/config/ftconfig.h
3783 (FT_MulFix_arm), src/truetype/ttinterp.c (TT_MulFix14_arm): Fix
3784 preprocessor conditionals for `add.w'.
3785
Werner Lembergc46fa862014-01-08 08:45:40 +010037862014-01-08 Werner Lemberg <wl@gnu.org>
3787
3788 [autofit] Fix Savannah bug #41138, part 1.
3789
3790 * src/tools/afblue.pl <Handling #endif>: Produce correct auxiliary
3791 enumeration names for generated `#else'.
3792
3793 * src/autofit/afblue.h: Regenerated.
3794
Werner Lemberg3e5a3742014-01-06 07:53:10 +010037952014-01-06 Werner Lemberg <wl@gnu.org>
3796
3797 Add manual page for `freetype-config'.
3798 Contributed by Nis Martensen <nis.martensen@web.de>.
3799
3800 * docs/freetype-config.1: New file.
3801
3802 * builds/unix/unix-def.in (mandir): Define.
3803 * builds/unix/install.mk (install, uninstall): Handle manpage.
3804
Werner Lemberg991cbcc2014-01-05 13:24:56 +010038052014-01-05 Werner Lemberg <wl@gnu.org>
3806
3807 [autofit] Minor fixes for `afblue.pl'.
3808
3809 * src/tools/afblue.pl (aux_name): Don't use `reverse'.
3810 <Handling #endif>: Use proper indentation for generated `#else'.
3811
3812 * src/autofit/afblue.h: Regenerated.
3813
Werner Lemberg0d977442014-01-04 11:46:34 +010038142014-01-04 Werner Lemberg <wl@gnu.org>
3815
3816 [autofit] Fix Indic scripts.
3817
3818 Split the single, incorrect Indic entry into separate scripts so
3819 that the covered ranges are the same: Bengali, Devanagari, Gujarati,
3820 Gurmukhi, Kannada, Limbu, Malayalam, Oriya, Sinhala, Sundanese,
3821 Syloti Nagri, Tamil, Telugu, and Tibetan. At the same time, remove
3822 entries for Meetai Mayak and Sharada – the Unicode ranges were
3823 incorrect (and nobody has complained about that), fonts are scarce
3824 for those scripts, and the Indic auto-hinter support is rudimentary
3825 anyways.
3826
3827 * src/autofit/afscript.h: Updated, using AF_CONFIG_OPTION_INDIC and
3828 AF_CONFIG_OPTION_CJK.
3829
3830 * src/autofit/afstyles.h (STYLE_DEFAULT_INDIC): New auxiliary macro.
3831 Use it, together with AF_CONFIG_OPTION_INDIC and
3832 AF_CONFIG_OPTION_CJK, to update.
3833
3834 * src/autofit/afranges.c [AF_CONFIG_OPTION_INDIC]: Updated.
3835 [!AF_CONFIG_OPTION_INDIC, !AF_CONFIG_OPTION_CJK]: Removed.
3836 Sort entries by tags.
3837
Werner Lemberg5c7f5502014-01-03 10:48:26 +010038382014-01-03 Werner Lemberg <wl@gnu.org>
3839
Werner Lembergecdb0e32014-01-03 20:49:31 +01003840 [autofit] Thinko.
3841
3842 * src/autofit/hbshim.c (af_get_char_index): Similar to
3843 `af_get_coverage', reject glyphs which are not substituted.
3844
38452014-01-03 Werner Lemberg <wl@gnu.org>
3846
Werner Lemberga42f9182014-01-03 18:29:41 +01003847 [autofit] Fix handling of default coverages.
3848
Werner Lemberg1b5bc892014-01-03 18:33:24 +01003849 With this commit, the implementation of coverage handling is
3850 completed.
3851
3852 * src/autofit/hbshim.c (af_get_coverage): Exit early if nothing to
3853 do.
3854 Reject coverages which don't contain appropriate glyphs for blue
3855 zones.
3856
38572014-01-03 Werner Lemberg <wl@gnu.org>
3858
3859 [autofit] Fix handling of default coverages.
3860
Werner Lemberga42f9182014-01-03 18:29:41 +01003861 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
3862 First handle non-default coverages, then the default coverage of the
3863 default script, and finally the other default coverages.
3864
38652014-01-03 Werner Lemberg <wl@gnu.org>
3866
Werner Lembergf45749b2014-01-03 18:09:36 +01003867 [autofit] Fix scaling of HarfBuzz shaping.
3868
3869 * src/autofit/hbshim.c (af_get_char_index): Scale to units per EM.
3870
38712014-01-03 Werner Lemberg <wl@gnu.org>
3872
Werner Lemberg5c7f5502014-01-03 10:48:26 +01003873 [autofit] Better ftgrid support.
3874
3875 * src/autofit/afhints.c (af_glyph_hints_get_segment_offset): Add
3876 parameters `is_blue' and `blue_offset'.
3877
Werner Lemberg73cc8332014-01-01 07:10:36 +010038782014-01-01 Werner Lemberg <wl@gnu.org>
3879
Werner Lemberg55cd7e02014-01-02 13:07:48 +01003880 [autofit] Remove some styles.
3881
3882 * src/autofit/afcover.h: Remove coverages for alternative fractions,
3883 denominators, numerators, and fractions.
3884
3885 * src/autofit/afstyles.h (META_STYLE_LATIN): Updated.
3886
38872014-01-01 Werner Lemberg <wl@gnu.org>
3888
Werner Lembergc973e672014-01-01 16:34:42 +01003889 [autofit] Add more styles.
3890
3891 * src/autofit/afstyles.h (STYLE_LATIN, META_STYLE_LATIN): New
3892 auxiliary macros; use them to define styles for Cyrillic, Greek, and
3893 Latin.
3894
3895 * src/autofit/afcover.h: Remove coverage for oldstyle figures.
3896 Since those digits are used in combination with ordinary letters, it
3897 makes no sense to handle them separately.
3898
3899 * src/autofit/afglobal.c (af_face_globals_get_metrics): Don't limit
3900 `options' parameter to 4 bits.
3901
39022014-01-01 Werner Lemberg <wl@gnu.org>
3903
Werner Lembergabb2f732014-01-01 08:00:16 +01003904 [autofit] Fix style assignments to glyphs.
3905
3906 * src/autofit/hbshim.c (af_get_coverage)
3907 [FT_CONFIG_OPTION_USE_HARFBUZZ]: Scan GPOS coverage of features also
3908 so that we can skip glyphs that have both GSUB and GPOS data.
3909
39102014-01-01 Werner Lemberg <wl@gnu.org>
3911
Werner Lemberg0950f3a2014-01-01 07:48:20 +01003912 * src/autofit/hbshim.c: s/{lookups,glyphs}/gsub_{lookups,glyphs}/.
3913
39142014-01-01 Werner Lemberg <wl@gnu.org>
3915
Werner Lemberg73cc8332014-01-01 07:10:36 +01003916 [autofit] Implement and use `af_get_char_index' with HarfBuzz.
3917
3918 * src/autofit/hbshim.c (COVERAGE) [FT_CONFIG_OPTION_USE_HARFBUZZ]:
3919 Redefine to construct HarfBuzz features.
3920 (af_get_char_index) [FT_CONFIG_OPTION_USE_HARFBUZZ]: Rewritten.
3921
3922 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Use
3923 `y_offset' to adjust `best_y'.
3924
Werner Lembergc9d99472013-12-31 08:16:57 +010039252013-12-31 Werner Lemberg <wl@gnu.org>
3926
Werner Lemberg785f3852013-12-31 09:45:10 +01003927 [autofit] s/AF_STYLE_...._DEFAULT/AF_STYLE_...._DFLT/i.
3928
39292013-12-31 Werner Lemberg <wl@gnu.org>
3930
Werner Lembergc9d99472013-12-31 08:16:57 +01003931 [autofit] Fix interface of `af_get_char_index'.
3932
3933 * src/autofit/hbshim.c (af_get_char_index): Return error value.
3934 Add argument for y offset (to be used in a yet-to-come patch).
3935
3936 * src/autofit/hbshim.h, src/autofit/afcjk.c,
3937 src/autofit/aflatin.c: Updated.
3938
Werner Lemberg44aa7e02013-12-30 07:41:22 +010039392013-12-30 Werner Lemberg <wl@gnu.org>
3940
3941 [autofit] Don't combine multiple features into one set.
3942
3943 Combining them, as originally envisioned, would lead to much more
3944 complicated code, as investigations have shown meanwhile. The major
3945 drawback is that we run out of available style slots much earlier.
3946 However, this is only a theoretical issue since we don't support a
3947 large number of scripts currently.
3948
3949 * src/autofit/afcover.h: Replace `COVERAGE_{1,2,3}' macros with
3950 a single-element `COVERAGE' macro, sort the elements by the feature
3951 tags, and add entry for `ruby'.
3952
3953 * src/autofit/aftypes.h: Updated.
3954 * src/autofit/hbshim.c: Updated.
3955
Werner Lemberg6af01a02013-12-28 08:55:24 +010039562013-12-28 Werner Lemberg <wl@gnu.org>
3957
Werner Lemberg072dc452013-12-28 12:26:21 +01003958 [autofit] Code shuffling to reduce use of cpp macros.
3959
3960 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
3961 Call `af_get_coverage' unconditionally.
3962
3963 * src/autofit/autofit.c: Include `hbshim.c' unconditionally.
3964
3965 * src/autofit/hbshim.c (af_get_coverage)
3966 [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Provide dummy function.
3967
3968 * src/autofit/hbshim.h: Provide function declarations
3969 unconditionally.
3970
39712013-12-28 Werner Lemberg <wl@gnu.org>
3972
Werner Lemberg17af5862013-12-28 10:33:01 +01003973 [autofit] Add wrapper function for `FT_Get_Char_Index'.
3974
3975 Yet-to-come changes will provide HarfBuzz functionality for the new
3976 function.
3977
3978 * src/autofit/hbshim.c (af_get_char_index): New function.
3979 * src/autofit/hbshim.h: Updated.
3980
3981 * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
3982 af_cjk_metrics_init_blues, af_cjk_metrics_check_digits): Updated.
3983
3984 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
3985 af_latin_metrics_init_blues, af_latin_metrics_check_digits):
3986 Updated.
3987
39882013-12-28 Werner Lemberg <wl@gnu.org>
3989
Werner Lemberg6af01a02013-12-28 08:55:24 +01003990 [autofit] Use `global' HarfBuzz font object.
3991
3992 We now use `hb_font' instead of `hb_face' since yet-to-come changes
3993 need this.
3994
3995 * src/autofit/afglobal.h: Include `hbshim.h'.
3996 (AF_FaceGlobalsRec) [FT_CONFIG_OPTION_USE_HARFBUZZ]: New member
3997 `hb_font'.
3998
3999 * src/autofit/afglobal.c (af_face_globals_new)
4000 [FT_CONFIG_OPTION_USE_HARFBUZZ]: Create `hb_font'.
4001 (af_face_globals_free) [FT_CONFIG_OPTION_USE_HARFBUZZ]: Destroy
4002 `hb_font'.
4003
4004 * src/autofit/hbshim.h: Include HarfBuzz headers.
4005
4006 * src/autofit/hbshim.c: Include `hbshim.h' instead of HarfBuzz
4007 headers.
4008 (af_get_coverage): Updated.
4009
Werner Lembergd32a7d32013-12-27 19:26:04 +010040102013-12-27 Werner Lemberg <wl@gnu.org>
4011
4012 [autofit] Handle `DFLT' OpenType script for coverages.
4013
4014 * include/ftautoh.h: Document new `default-script' property.
4015
4016 * src/autofit/hbshim.c (af_get_coverage): Use `AF_FaceGlobals' for
4017 type of first parameter.
4018 (script_tags): Add one more element.
4019 (af_get_coverage): Adjust `script_tags' to handle `DFLT' script tag.
4020
4021 * src/autofit/hbshim.h: Updated.
4022
4023 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
4024 Updated.
4025
4026 * src/autofit/afglobal.h (AF_SCRIPT_DEFAULT): New macro.
4027
4028 * src/autofit/afmodule.h (AF_ModuleRec): New `default_script'
4029 member.
4030
4031 * src/autofit/afmodule.c (af_property_set, af_property_get): Handle
4032 `default-script' property.
4033 (af_autofitter_init): Updated.
4034
suzuki toshiyae2d2b152013-12-27 16:44:24 +090040352013-12-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4036
4037 [ftrfork] Fix the face order difference between POSIX and Carbon.
4038
4039 The fragmented resources in Suitcase and .dfont should be reordered
Werner Lemberg00a7b512013-12-27 19:18:49 +01004040 when `POST' resource for Type1 is being restored, but reordering of
suzuki toshiyae2d2b152013-12-27 16:44:24 +09004041 sfnt resources induces the different face order. Now the ordering
Werner Lemberg00a7b512013-12-27 19:18:49 +01004042 is restricted to `POST' resource only, to prevent the different
4043 order issue (e.g. the face index in the fontconfig cache generated
4044 with Carbon framework is incompatible with that by FreeType 2
4045 without Carbon framework.) Found by Khaled Hosny and Hin-Tak Leung.
4046
suzuki toshiyae2d2b152013-12-27 16:44:24 +09004047 http://lists.gnu.org/archive/html/freetype-devel/2013-02/msg00035.html
4048 http://lists.gnu.org/archive/html/freetype-devel/2013-12/msg00027.html
4049
4050 * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Add a switch
Werner Lemberg44aa7e02013-12-30 07:41:22 +01004051 `sort_by_res_id' to control the fragmented resource ordering.
Werner Lemberg00a7b512013-12-27 19:18:49 +01004052 * include/internal/ftrfork.h: Declare new switch.
4053 * src/base/ftobjs.c (IsMacResource): Enable the sorting for `POST'
4054 resource, and disable the sorting for `sfnt' resource.
suzuki toshiyae2d2b152013-12-27 16:44:24 +09004055
Werner Lemberg5f577462013-12-25 08:50:50 +010040562013-12-25 Werner Lemberg <wl@gnu.org>
4057
4058 Fix Savannah bug #40997.
4059
4060 * src/bdf/bdfdrivr.c (BDF_Face_Init): Only use OR operator to
4061 adjust face flags since FT_FACE_FLAG_EXTERNAL_STREAM might already
4062 be set.
4063 * src/cff/cffobjs.c (cff_face_init): Ditto.
4064 * src/cid/cidobjs.c (cid_face_init): Ditto.
4065 * src/pcf/pcfread.c (pcf_load_font): Ditto.
4066 * src/pfr/pfrobjs.c (pfr_face_init): Ditto.
4067 * src/type1/t1objs.c (T1_Face_Init): Ditto.
4068 * src/type42/t42objs.c (T42_Face_Init): Ditto.
4069 * src/winfonts/winfnt.c (FNT_Face_Init): Ditto.
4070
Werner Lembergc4e968e2013-12-21 07:23:08 +010040712013-12-21 Werner Lemberg <wl@gnu.org>
4072
Werner Lemberg19241342013-12-21 21:31:38 +01004073 [autofit] Introduce `coverages'.
4074
4075 Coverages are the interface to the HarfBuzz library to acces
4076 OpenType features for handling glyphs not addressable by the cmap.
4077
4078 Right now, compilation of HarfBuzz is only added to the development
4079 build. A solution for standard build mode will be delayed until
4080 HarfBuzz gets split into two libraries to avoid mutual dependencies
4081 between FreeType and HarfBuzz.
4082
4083 Note that this is only a first step in handling coverages, basically
4084 providing the framework only. Code for handling selected OpenType
4085 features (this is, actually using the data in `afcover.h') will
4086 follow.
4087
4088 * devel/ftoption.h, include/config/ftoption.h
4089 (FT_CONFIG_OPTION_USE_HARFBUZZ): New macro.
4090
4091 * src/autofit/hbshim.c, src/autofit/hbshim.h, src/autofit/afcover.h:
4092 New files.
4093
4094 * src/autofit/afscript.h: Add HarfBuzz script name tags.
4095
4096 * src/autofit/afstyles.h: Add default coverage enumeration values.
4097
4098 * src/autofit/aftypes.h: Update use of `SCRIPT' and `STYLE' macros.
4099 (AF_Coverage): New enumeration (generated by `afcover.h').
4100 (AF_StyleClassRec): New member `coverage'.
4101 (AF_DEFINE_STYLE_CLASS): Updated.
4102
4103 * include/internal/fttrace.h: Add `afharfbuzz' for tracing coverage
4104 data.
4105
4106 * src/autofit/afglobal.h: Update use of `SCRIPT' and `STYLE' macros.
4107 (AF_SCRIPT_FALLBACK): Renamed to ...
4108 (AF_STYLE_FALLBACK): ... this.
4109
4110 * src/autofit/afglobal.c: Include `hbshim.c'.
4111 Update use of `SCRIPT' and `STYLE' macros.
4112 (af_face_globals_compute_style_coverage)
4113 [FT_CONFIG_OPTION_USE_HARFBUZZ]: Call `af_get_coverage'.
4114 Update.
4115
4116 * src/autofit/afmodule.h (AF_ModuleRec):
4117 s/fallback_script/fallback_style/.
4118
4119 * src/autofit/afmodule.c (af_property_set): Adapt handling of
4120 `fallback-script' property to set a fallback style.
4121 (af_property_get, af_autofitter_init): Updated.
4122
4123 * src/autofit/afpic.c: Update use of `SCRIPT' and `STYLE' macros.
4124
4125 * src/autofit/afranges.h: Update use of `SCRIPT' macro.
4126
4127 * src/autofit/autofit.c [FT_CONFIG_OPTION_USE_HARFBUZZ]: Include
4128 `hbshim.c'.
4129
4130 * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `hbshim.c'.
4131 (AUTOF_DRV_H): Add `afcover.h'.
4132
4133 * builds/freetype.mk (INCLUDE_FLAGS) [DEVEL_DIR]: Use pkg-config for
4134 all libraries needed by FreeType.
4135
41362013-12-21 Werner Lemberg <wl@gnu.org>
4137
Werner Lembergb337fa22013-12-21 19:33:15 +01004138 Fix Savannah bug #40975 (sort of).
4139
4140 * src/truetype/ttinterp.c (Ins_IP): Fix sign typo to make FreeType
4141 behave the same as the Windows TrueType engine for the invalid case.
4142
41432013-12-21 Werner Lemberg <wl@gnu.org>
4144
Werner Lemberg3bf60952013-12-21 08:49:11 +01004145 [autofit] Make PIC mode work actually.
4146
4147 * src/autofit/afpic.h (AFModulePIC): Fix array sizes to fit the
4148 enumeration values automatically generated by including `afscript.h'
4149 and friends.
4150
4151 * src/autofit/afpic.c (autofit_module_class_pic_init): Updated.
4152
41532013-12-21 Werner Lemberg <wl@gnu.org>
4154
Werner Lembergbd413862013-12-21 08:14:25 +01004155 Fix PIC linking.
4156
4157 * include/internal/ftrfork.h (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Fix
4158 generated function name.
4159
4160 * src/base/basepic.c (FT_Init_Table_raccess_guess_table): Rename
4161 to ...
4162 (FT_Init_Table_ft_raccess_guess_table): ... this so that the
4163 function name correctly corresponds to what the macro framework
4164 expects.
4165
4166 * src/psnames/rules.mk (PSNAMES_DRV_SRC_S): Use correct file name so
4167 that PIC functions are compiled also.
4168
41692013-12-21 Werner Lemberg <wl@gnu.org>
4170
Werner Lembergc4e968e2013-12-21 07:23:08 +01004171 [base] Add missing dependencies to Makefile.
4172
4173 * src/base/rules.mk (BASE_SRC): Add `basepic.c' and `ftpic.c'.
4174 (BASE_H): Add `basepic.h'.
4175
Werner Lemberg974b1932013-12-20 17:26:26 +010041762013-12-20 Werner Lemberg <wl@gnu.org>
4177
Werner Lemberg8a8f3752013-12-20 18:35:35 +01004178 [autofit] Fix PIC compilation.
4179
4180 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
4181 src/autofit/aflatin.c (af_latin_metrics_init_widths)
4182 [FT_CONFIG_OPTION_PIC]: Declare `globals'.
4183
4184 * src/autofit/afglobal.c: Always call AF_DEFINE_SCRIPT_CLASS, and
4185 AF_DEFINE_STYLE_CLASS.
4186
4187 * src/autofit/afpic.c: Include `afglobal.h'.
4188 (autofit_module_class_pic_init): Typo.
4189
4190 * src/autofit/aftypes.h (AF_DEFINE_SCRIPT_CLASS,
4191 AF_DEFINE_STYLE_CLASS): Don't use the same identifier for macro
4192 parameter and structure member.
4193
41942013-12-20 Werner Lemberg <wl@gnu.org>
4195
Werner Lemberg974b1932013-12-20 17:26:26 +01004196 [autofit] Introduce `styles'.
4197
4198 This is the new top-level structure for handling glyph input data;
4199 scripts are now defined separately.
4200
4201 * src/autofit/aftypes.h (SCRIPT): Updated.
4202 (AF_ScriptClassRec): Move `blue_stringset' and `writing_system'
4203 members to ...
4204 (AF_Style_ClassRec): ... this new structure.
4205 (AF_Style): New enumeration.
4206 (AF_StyleMetricsRec): Replace `script' enumeration with
4207 `style_class' pointer.
4208 (AF_DEFINE_SCRIPT_CLASS, AF_DECLARE_SCRIPT_CLASS): Updated.
4209 (AF_DEFINE_STYLE_CLASS, AF_DECLARE_STYLE_CLASS): New macros.
4210
4211 * src/autofit/afstyles.h: New file, using data from `afscript.h'.
4212 * src/autofit/afscript.h: Updated.
4213
4214 * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
4215 af_cjk_metrics_init_blues, af_cjk_hint_edges): Updated.
4216
4217 * src/autofit/afglobal.c (SCRIPT): Updated.
4218 (STYLE): Redefine macro to load `afstyles.h'.
4219 (af_script_names) [FT_DEBUG_LEVEL_TRACE]: Replace with...
4220 (af_style_names): ... this array.
4221 (af_face_globals_compute_script_coverage): Renamed to...
4222 (af_face_globals_compute_style_coverage): ... this.
4223 Updated.
4224 (af_face_globals_new, af_face_globals_free,
4225 af_face_globals_get_metrics): Updated.
4226
4227 * src/autofit/afglobal.h (SCRIPT): Updated.
4228 (STYLE): Redefine macro to load `afstyles.h'.
4229 (AF_SCRIPT_FALLBACK): Update definition. This will get more
4230 refinements with later on.
4231 (AF_SCRIPT_UNASSIGNED): Replace with...
4232 (AF_STYLE_UNASSIGNED): ... this macro.
4233 (AF_FaceGlobalsRec): Updated.
4234
4235 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
4236 af_latin_metrics_init_blues, af_latin_metrics_scale_dim,
4237 af_latin_hint_edges): Updated.
4238
4239 * src/autofit/aflatin2.c (af_latin2_metrics_init_widths): Updated.
4240 (af_ltn2_uniranges): Removed.
4241
4242 * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph):
4243 Updated.
4244
4245 * src/autofit/afpic.c (autofit_module_class_pic_init): Updated.
4246 * src/autofit/afpic.h (AF_STYLE_CLASSES_GET): New macro.
4247 (AFModulePIC): Add `af_style_classes' and `af_style_classes_rec'
4248 members.
4249
4250 * src/autofit/afranges.h: Updated.
4251
4252 * src/autofit/rules.mk (AUTOF_DRV_H): Add `afstyles.h'.
4253
Werner Lembergd8324572013-12-19 15:45:24 +010042542013-12-19 Werner Lemberg <wl@gnu.org>
4255
4256 [autofit] Factor scripts and uniranges out of writing system files.
4257
4258 * src/autofit/afranges.c, src/autofit/afranges.h: New files.
4259
4260 * src/autofit/afscript.h: Extend `SCRIPT' macro with more
4261 parameters, taking data from the writing system files.
4262
4263 * src/autofit/aftypes.h: Updated.
4264
4265 * src/autofit/afglobal.c: Include `afranges.h'.
4266 Load `afscript.h' to call AF_DEFINE_SCRIPT_CLASS.
4267 * src/autofit/afglobal.c: Include `afranges.h'.
4268 Load `afscript.h' to call AF_DECLARE_SCRIPT_CLASS.
4269
4270 * src/autofit/afcjk.c, src/autofit/afcjk.h: Updated.
4271 * src/autofit/afdummy.c, src/autofit/afdummy.h: Updated.
4272 * src/autofit/afindic.c, src/autofit/afindic.h: Updated.
4273 * src/autofit/aflatin.c, src/autofit/aflatin.h: Updated.
4274 * src/autofit/aflatn2.c, src/autofit/aflatn2.h: Updated.
4275
4276 * src/autofit/afpic.c: Updated.
4277
4278 * src/autofir/autofit.c: Include `afranges.c'.
4279 * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `afranges.c'.
4280
Werner Lemberg9a354552013-12-18 10:36:06 +010042812013-12-18 Werner Lemberg <wl@gnu.org>
4282
Werner Lemberg73f31982013-12-19 15:24:17 +01004283 [autofit] More code orthogonality.
4284
4285 * src/autofit/aftypes.h (AF_StyleMetrics): Replace `script_class'
4286 pointer to an `AF_ScriptClass' structure with `script' index of type
4287 `AF_Script'.
4288 Move some code around.
4289
4290 * src/autofit/afcjk.c: Include `afpic.h'.
4291 (af_cjk_metrics_init_widths, af_cjk_metrics_init_blues,
4292 af_cjk_hint_edges): Updated.
4293
4294 * src/autofit/aflatin.c: Include `afpic.h'.
4295 (af_latin_metrics_init_widths, af_latin_metrics_init_blues,
4296 af_latin_metrics_scale_dim, af_latin_hint_edges): Updated.
4297
4298 * src/autofit/afglobal.c (af_face_globals_get_metrics): Updated.
4299
4300 * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph):
4301 Updated.
4302
43032013-12-18 Werner Lemberg <wl@gnu.org>
4304
Werner Lemberg3f91cb32013-12-18 12:59:35 +01004305 [autofit] s/ScriptMetrics/StyleMetrics/.
4306
43072013-12-18 Werner Lemberg <wl@gnu.org>
4308
Werner Lemberg4fccc212013-12-18 12:53:01 +01004309 [autofit] s/script_{metrics,hints}/style_{metrics,hints}/
4310
43112013-12-18 Werner Lemberg <wl@gnu.org>
4312
Werner Lembergf4df4072013-12-18 10:39:30 +01004313 [autofit] s/gscripts/gstyles/.
4314
43152013-12-18 Werner Lemberg <wl@gnu.org>
4316
Werner Lemberg9a354552013-12-18 10:36:06 +01004317 [autofit] s/glyph_scripts/glyph_styles/.
4318
4319 This is the first commit of a series to create a new top-level
4320 structure (a `style') for handling scripts, writing_systems, and
4321 soon-to-be-added coverages.
4322
Werner Lemberg7a5fc2f2013-12-17 13:29:53 +010043232013-12-17 Werner Lemberg <wl@gnu.org>
4324
4325 [autofit] s/AF_Script_/AF_WritingSystem_/ where appropriate.
4326
Infinality8bb09b02013-12-11 09:01:13 +010043272013-12-11 Infinality <infinality@infinality.net>
4328
4329 [truetype] Simplify logic of rendering modes.
4330
4331 This patch unifies the subpixel and non-subpixel cases.
4332
4333 * src/truetype/ttinterp.h (TT_ExecContextRec): Remove
4334 `grayscale_hinting'; all code should refer to `grayscale' instead.
4335 Remove unused `native_hinting' member.
4336 Rename `subpixel_hinting' member to `subpixel.
4337
4338 * src/truetype/ttgload.c (TT_LOADER_SET_PP): Updated.
4339 (tt_loader_init): Updated.
4340
4341 * src/truetype/ttinterp.c (Ins_GETINFO): Simplify.
4342 Updated.
4343
Werner Lemberge9d95aa2013-12-11 07:48:51 +010043442013-12-11 Werner Lemberg <wl@gnu.org>
4345
4346 [documentation] Add section how to include FreeType header files.
4347 Problem reported by David Kastrup <dak@gnu.org>.
4348
4349 Surprisingly, a description how to do that was completely missing in
4350 the API reference.
4351
4352 * include/freetype.h, include/ftchapters.h: New documentation
4353 section `header_inclusion'.
4354
Werner Lemberg05c786d2013-12-10 08:38:57 +010043552013-12-10 Werner Lemberg <wl@gnu.org>
4356
Werner Lemberg91932592013-12-10 13:24:07 +01004357 [autofit] s/DFLT/NONE/, s/dflt/none/.
4358
43592013-12-10 Werner Lemberg <wl@gnu.org>
4360
Werner Lemberg45244f82013-12-10 13:18:11 +01004361 [autofit] s/AF_SCRIPT_NONE/AF_SCRIPT_UNASSIGNED/.
4362
43632013-12-10 Werner Lemberg <wl@gnu.org>
4364
Werner Lemberg69d1a362013-12-10 10:12:27 +01004365 [truetype] Fix scaling of vertical phantom points.
4366
4367 * src/truetype/ttgload.c (load_truetype_glyph): Scale pp3.x and
4368 pp4.x also.
4369
43702013-12-10 Werner Lemberg <wl@gnu.org>
4371
Werner Lemberg05c786d2013-12-10 08:38:57 +01004372 [truetype] Fix positioning of composite glyphs.
4373 Problem reported by Nigel Tao <nigeltao@golang.org>.
4374
4375 * src/truetype/ttgload.c (TT_Hint_Glyph): Remove code that shifts
4376 the glyph (component) by a fractional value computed from the LSB
4377 phantom point. This is wrong, since the horizontal phantom points
4378 get rounded horizontally later on.
4379
Werner Lembergdd8050a2013-12-08 23:14:46 +010043802013-12-08 Werner Lemberg <wl@gnu.org>
4381
4382 * Version 2.5.2 released.
4383 =========================
4384
4385
4386 Tag sources with `VER-2-5-2'.
4387
4388 * docs/VERSION.DLL: Update documentation and bump version number to
4389 2.5.2.
4390
4391 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
4392 builds/windows/vc2005/index.html,
4393 builds/windows/vc2008/freetype.vcproj,
4394 builds/windows/vc2008/index.html,
4395 builds/windows/vc2010/freetype.vcxproj,
4396 builds/windows/vc2010/index.html,
4397 builds/windows/visualc/freetype.dsp,
4398 builds/windows/visualc/freetype.vcproj,
4399 builds/windows/visualc/index.html,
4400 builds/windows/visualce/freetype.dsp,
4401 builds/windows/visualce/freetype.vcproj,
4402 builds/windows/visualce/index.html,
4403 builds/wince/vc2005-ce/freetype.vcproj,
4404 builds/wince/vc2005-ce/index.html,
4405 builds/wince/vc2008-ce/freetype.vcproj,
4406 builds/wince/vc2008-ce/index.html: s/2.5.1/2.5.2/, s/251/252/.
4407
Werner Lembergec8853c2014-03-06 19:13:45 +01004408 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
Werner Lembergdd8050a2013-12-08 23:14:46 +01004409
4410 * builds/unix/configure.raw (version_info): Set to 17:1:11.
Werner Lembergec8853c2014-03-06 19:13:45 +01004411 * CMakeLists.txt (VERSION_PATCH): Set to 2.
Werner Lembergdd8050a2013-12-08 23:14:46 +01004412 * docs/CHANGES: Updated.
4413
Werner Lemberg98d185c2013-12-07 09:26:55 +010044142013-12-07 Werner Lemberg <wl@gnu.org>
4415
4416 [truetype] Next round in phantom point handling.
4417
4418 Greg Hitchcock provided very interesting insights into the
4419 complicated history of the horizontal positions of the TSB and BSB
4420 phantom points.
4421
4422 * src/truetype/ttgload.c (TT_LOADER_SET_PP)
4423 [TT_CONFIG_OPTION_SUBPIXEL_HINTING]: Use `subpixel_hinting' and
4424 `grayscale_hinting' flags as conditionals for the x position of TSB
4425 and BSB.
4426
Werner Lembergfcdb7842013-12-05 15:53:27 +010044272013-12-05 Werner Lemberg <wl@gnu.org>
4428
4429 * builds/freetype.mk (FT_CC): Removed. Unused.
4430
Werner Lemberg64b395c2013-12-04 06:18:56 +010044312013-12-04 Werner Lemberg <wl@gnu.org>
4432
4433 [sfnt] Fix handling of embedded bitmap strikes.
4434
4435 This corrects the commit from 2013-11-21. Problem reported by
4436 Andrey Panov <panov@canopus.iacp.dvo.ru>.
4437
4438 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Fix logic to
4439 detect excessive bytes for bit-aligned bitmaps.
4440
Werner Lembergbdd5e752013-12-03 06:57:02 +010044412013-12-03 Werner Lemberg <wl@gnu.org>
4442
Werner Lembergc2b47532013-12-03 07:01:57 +01004443 [truetype] Remove dead code.
4444
4445 Reported by Nigel Tao <nigeltao@golang.org>.
4446
4447 * include/internal/tttypes.h (TT_LoaderRec): Remove unused
4448 `preserve_pps' field.
4449 * src/truetype/ttgload.c (TT_Hint_Glyph): Updated.
4450
44512013-12-03 Werner Lemberg <wl@gnu.org>
4452
Werner Lembergbdd5e752013-12-03 06:57:02 +01004453 [truetype] Fix phantom point handling.
4454
4455 This is a further improvement to the changes from 2013-11-06.
4456
4457 * src/truetype/ttgload.c (TT_Hint_Glyph): Horizontal phantom points
4458 are rounded horizontally, vertical ones are rounded vertically.
4459 (TT_LOADER_SET_PP): The horizontal position of vertical phantom
4460 points in pre-ClearType mode is zero, as shown in the OpenType
4461 specification.
4462
Werner Lemberg64872a52013-12-02 07:51:17 +010044632013-12-02 Werner Lemberg <wl@gnu.org>
4464
4465 [truetype] Fix change from 2013-11-20.
4466
4467 Problem reported by Akira Kakuto <kakuto@fuk.kindai.ac.jp>.
4468
4469 * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Protect call to
4470 `Update_Max' with both a TT_USE_BYTECODE_INTERPRETER guard and a
4471 `IS_HINTED' clause.
4472 Also remove redundant check using `maxSizeOfInstructions' – in
4473 simple glyphs, the bytecode data comes before the outline data, and
4474 a validity test for this is already present.
4475
Werner Lemberg52166ab2013-11-27 10:10:16 +010044762013-11-27 Werner Lemberg <wl@gnu.org>
4477
4478 [autofit] Fix use of dumping functions in `ftgrid' demo program.
4479
4480 * src/autofit/afhints.c (AF_DUMP) [FT_DEBUG_AUTOFIT]: New macro.
4481 (af_glyph_hints_dump_points, af_glyph_hints_dump_segments,
4482 af_glyph_hints_dump_edges) [FT_DEBUG_AUTOFIT]: Add parameter to
4483 handle output to stdout.
4484 Use AF_DUMP.
4485 (af_glyph_hints_dump_points, af_glyph_hints_dump_segments,
4486 af_glyph_hints_dump_edges) [!FT_DEBUG_AUTOFIT]: Removed.
4487
Werner Lemberg3aee4292013-11-25 00:28:11 +010044882013-11-25 Werner Lemberg <wl@gnu.org>
4489
4490 * Version 2.5.1 released.
4491 =========================
4492
4493
4494 Tag sources with `VER-2-5-1'.
4495
4496 * docs/VERSION.DLL: Update documentation and bump version number to
4497 2.5.1.
4498
4499 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
4500 builds/windows/vc2005/index.html,
4501 builds/windows/vc2008/freetype.vcproj,
4502 builds/windows/vc2008/index.html,
4503 builds/windows/vc2010/freetype.vcxproj,
4504 builds/windows/vc2010/index.html,
4505 builds/windows/visualc/freetype.dsp,
4506 builds/windows/visualc/freetype.vcproj,
4507 builds/windows/visualc/index.html,
4508 builds/windows/visualce/freetype.dsp,
4509 builds/windows/visualce/freetype.vcproj,
4510 builds/windows/visualce/index.html,
4511 builds/wince/vc2005-ce/freetype.vcproj,
4512 builds/wince/vc2005-ce/index.html,
4513 builds/wince/vc2008-ce/freetype.vcproj,
4514 builds/wince/vc2008-ce/index.html: s/2.5.0/2.5.1/, s/250/251/.
4515
4516 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
4517
4518 * builds/unix/configure.raw (version_info): Set to 17:0:11.
Werner Lembergec8853c2014-03-06 19:13:45 +01004519 * CMakeLists.txt (VERSION_PATCH): Set to 1.
Werner Lemberg3aee4292013-11-25 00:28:11 +01004520 * docs/CHANGES, docs/release: Updated.
4521
Werner Lemberg9326caf2013-11-23 23:59:25 +010045222013-11-23 Werner Lemberg <wl@gnu.org>
4523
Werner Lemberg063ee6b2013-11-24 00:19:17 +01004524 [truetype]: Add tricky font names `hkscsiic.ttf' and `iicore.ttf'.
4525
4526 * src/truetype/ttobjs.c (TRICK_NAMES_MAX_CHARACTERS,
4527 TRICK_NAMES_COUNT): Updated.
4528 (trick_names): Add family name for the two fonts.
4529
45302013-11-23 Werner Lemberg <wl@gnu.org>
4531
Werner Lemberg9326caf2013-11-23 23:59:25 +01004532 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Typo.
4533
Werner Lemberg427b1762013-11-21 13:10:56 +010045342013-11-21 Werner Lemberg <wl@gnu.org>
4535
Werner Lemberg9326caf2013-11-23 23:59:25 +01004536 [sfnt] Typo.
Werner Lemberg8af2a1c2013-11-21 13:13:12 +01004537
4538 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
4539
4540 * src/sfnt/sfobjs.c (sfnt_load_face): Return correct `bsize->width'
4541 value if the font lacks an `OS/2' table.
4542
45432013-11-21 Werner Lemberg <wl@gnu.org>
4544
Werner Lemberg64b395c2013-12-04 06:18:56 +01004545 [sfnt] Improve handling of buggy embedded bitmap strikes.
Werner Lemberg427b1762013-11-21 13:10:56 +01004546
4547 We are now able to successfully load `AppleMyoungJo.ttf'.
4548 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
4549
4550 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Don't trust glyph
4551 format.
4552
Werner Lemberg28626862013-11-20 21:06:18 +010045532013-11-20 Werner Lemberg <wl@gnu.org>
4554
4555 [truetype] Don't trust `maxp's `maxSizeOfInstructions'.
4556
4557 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>; see
4558
4559 http://lists.nongnu.org/archive/html/freetype-devel/2013-08/msg00005.html
4560
4561 for details.
4562
4563 * src/base/ftobjs.c (FT_Load_Glyph): Check size of `fpgm' and `prep'
4564 tables also for setting `autohint'.
4565
4566 * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Use code from
4567 `TT_Process_Composite_Glyph' for handling unreliable values of
4568 `maxSizeOfInstructions'.
4569
Werner Lembergbc25de62013-11-16 07:52:20 +010045702013-11-16 Werner Lemberg <wl@gnu.org>
4571
4572 [sfnt] Fix `OS/2' table version 5 support.
4573
4574 We now follow the `official' announcement from Microsoft (on the
4575 OpenType mailing list, which unfortunately hasn't a public archive).
4576
4577 * include/freetype/tttables.h (TT_OS2):
4578 s/usLowerPointSize/usLowerOpticalPointSize/,
4579 s/usUpperPointSize/usUpperOpticalPointSize/.
4580
4581 * src/sfnt/ttload.c (tt_face_load_os2): Update, and set correct
4582 default values.
4583
Werner Lembergfae38202013-11-13 08:55:46 +010045842013-11-13 Werner Lemberg <wl@gnu.org>
4585
Werner Lembergc52b1292013-11-13 10:06:00 +01004586 * builds/unix/ft2unix.h: Remove. No longer necessary.
4587
4588 * builds/unix/install.mk (install): Updated.
4589
45902013-11-13 Werner Lemberg <wl@gnu.org>
4591
Werner Lembergfae38202013-11-13 08:55:46 +01004592 Simplify header file hierarchy.
4593
4594 This large patch changes the header file directory layout from
4595 `include/freetype/...' to `include/...', effectively removing one
4596 level. Since the file `ft2build.h' is also located in `include'
4597 (and it stays there even after installation), all FreeType header
4598 files are now in a single directory.
4599
4600 Applications that use (a) `freetype-config' or FreeType's
4601 `pkg-config' file to get the include directory for the compiler, and
4602 (b) the documented way for header inclusion like
4603
4604 #include <ft2build.h>
4605 #include FT_FREETYPE_H
4606 ...
4607
4608 don't need any change to the source code.
4609
4610 * include/freetype/*: Move up to...
4611 * include/*: ... this directory.
4612
4613 * builds/amiga/include/freetype/*: Move up to...
4614 * builds/amiga/include/*: ... this directory.
4615
4616 */*: Essentially do `s@/freetype/@/@' where appropriate.
4617
4618 * CMakeList.txt: Simplify.
4619 * builds/unix/freetype-config.in, builds/unix/freetype2.in: For
4620 `--cflags', return a single directory.
4621 * builds/unix/install.mk (install): No longer try to remove `cache'
4622 and `internal' subdirectories; instead, remove the `freetype'
4623 subdirectory.
4624
Werner Lembergea5c7812013-11-12 08:55:26 +010046252013-11-12 Werner Lemberg <wl@gnu.org>
4626
4627 [truetype] Fix last `truetype' commit.
4628
4629 * src/truetype/ttgload.c (tt_get_metrics): Preserve stream position.
4630 Return error value.
4631 (load_truetype_glyph): Updated.
4632
Werner Lemberg78333282013-11-10 06:26:52 +010046332013-11-10 Werner Lemberg <wl@gnu.org>
4634
4635 * docs/CMAKE: New dummy file.
4636
Dave Arnolddd213012013-11-08 10:52:51 +010046372013-11-08 Dave Arnold <darnold@adobe.com>
4638
4639 [cff] Fix for hints that touch.
4640
4641 * src/cff/cf2hints.c (cf2_hintmap_insertHint): Fix condition for
4642 finding index value of insertion point.
4643
Werner Lemberg7e4b0fb2013-11-06 07:14:49 +010046442013-11-06 Werner Lemberg <wl@gnu.org>
4645
Werner Lemberg5e225b72013-11-06 08:41:59 +01004646 [truetype] Fix handling of phantom points in composite glyphs.
4647 Problem reported by Nigel Tao <nigeltao@golang.org>.
4648
4649 This is a follow-up commit to the previous one.
4650
4651 * src/truetype/ttgload.c (load_truetype_glyph): Call
4652 `tt_get_metrics' after loading the glyph header.
4653
46542013-11-06 Werner Lemberg <wl@gnu.org>
4655
Werner Lemberg7e4b0fb2013-11-06 07:14:49 +01004656 [truetype] Improve emulation of vertical metrics.
4657
4658 This commit also improves the start values of vertical phantom
4659 points. Kudos to Greg Hitchcock for help.
4660
4661 * src/truetype/ttgload.c (TT_Get_VMetrics): Add parameter to pass
4662 `yMax' value. Replace code with fixed Microsoft definition.
4663 (tt_get_metrics): Updated.
4664 (TT_LOADER_SET_PP): Add explanation how to initialize phantom
4665 points, taken from both the OpenType specification and private
4666 communication with Greg (which will eventually be added to the
4667 standard).
4668 Fix horizontal position of `pp3' and `pp4'.
4669
4670 * src/truetype/ttgload.h: Updated.
4671
4672 * src/truetype/ttdriver.c (tt_get_advances): Updated.
4673
4674 * docs/CHANGES: Updated.
4675
Werner Lembergc6064282013-11-05 13:29:15 +010046762013-11-05 Werner Lemberg <wl@gnu.org>
4677
Werner Lemberg50740532013-11-05 23:19:18 +01004678 * builds/windows/vc2010/freetype.vcxproj: s/v110/v100/.
4679 PlatformToolSet version 110 is for VC2012.
4680
4681 Problem reported (with solution) by Dave Arnold <darnold@adobe.com>.
4682
46832013-11-05 Werner Lemberg <wl@gnu.org>
4684
Werner Lembergc6064282013-11-05 13:29:15 +01004685 [truetype] Correctly reset point tags for glyph components.
4686 Problem reported by Nigel Tao <nigeltao@golang.org>.
4687
4688 * src/truetype/ttgload.c (TT_Process_Composite_Glyph): Fix loop.
4689
Werner Lemberg35b08182013-11-02 08:28:41 +010046902013-11-02 Werner Lemberg <wl@gnu.org>
4691
Werner Lemberg7d449432013-11-02 11:36:37 +01004692 [truetype] Fix GETINFO opcode handling of subpixel hinting bits.
4693
4694 * src/truetype/ttinterp.c (Ins_GETINFO): Don't request bit 6 set to
4695 get info on subpixel hinting.
4696
4697 * docs/CHANGES: Updated.
4698
46992013-11-02 Werner Lemberg <wl@gnu.org>
4700
Werner Lemberg35b08182013-11-02 08:28:41 +01004701 Fix Savannah bug #40451.
4702
4703 Simply apply the patch from the bug report.
4704
4705 * builds/unix/ftconfig.in, builds/vms/ftconfig.h,
4706 include/freetype/config/ftconfig.h: The used #pragma directives only
4707 work with gcc versions 4.6 and higher.
4708
Werner Lembergebf52d62013-11-01 13:26:28 +010047092013-11-01 Werner Lemberg <wl@gnu.org>
4710
Werner Lembergafa0d592013-11-01 22:27:27 +01004711 * docs/CHANGES: Updated.
4712
47132013-11-01 Werner Lemberg <wl@gnu.org>
4714
Werner Lembergebf52d62013-11-01 13:26:28 +01004715 [truetype] Minor code refactoring.
4716
4717 Two benefits: The allocated FDEF (and IDEF) array gets slightly
4718 smaller, and the `ttdebug' demo program has access to function
4719 numbers without additional costs.
4720
4721 Fortunately, no changes to FontForge are necessary – this is the
4722 only external TrueType debugger I know of, but others may exist and
4723 should check the code accordingly.
4724
4725 * src/truetype/ttinterp.h (TT_CallRec): Replace `Cur_Restart' and
4726 `Cur_End' with a pointer to the corresponding `TT_DefRecord'
4727 structure.
4728
4729 * src/truetype/ttinterp.c (DO_JROT, DO_JMPR, DO_JROF, Ins_ENDF,
4730 Ins_CALL, Ins_LOOPCALL, Ins_UNKNOWN, TT_RunIns <Invalid_Opcode>):
4731 Updated.
4732
Werner Lembergee510512013-10-27 07:25:35 +010047332013-10-27 Werner Lemberg <wl@gnu.org>
4734
4735 [sfnt] Implement support for `OS/2' table version 5.
4736
4737 See
4738
4739 http://typedrawers.com/discussion/470/new-microsoft-size-specific-design-selection-mechanism
4740
4741 for the announcement.
4742
4743 * include/freetype/tttables.h (TT_OS2): Add fields
4744 `usLowerPointSize' and `usUpperPointSize'. Since FreeType returns
4745 this structure only as a pointer through `FT_Get_Sfnt_Table', there
4746 shouldn't be any ABI problems.
4747
4748 * src/sfnt/ttload.c (tt_face_load_os2): Implement it.
4749
4750 * docs/CHANGES: Updated.
4751
Werner Lemberg994a8592013-10-24 08:50:34 +020047522013-10-24 Werner Lemberg <wl@gnu.org>
4753
4754 * README.git, docs/CHANGES, docs/INSTALL: Updated.
4755
John Carya0e4a732013-10-24 08:49:08 +020047562013-10-24 John Cary <cary@txcorp.com>
4757
4758 Provide cmake support.
4759
4760 * CMakeLists.txt: New file.
4761
Kenneth Miller4d87ac82013-10-23 20:10:56 +020047622013-10-23 Kenneth Miller <kennethadammiller@yahoo.com>
4763 Werner Lemberg <wl@gnu.org>
4764
4765 Provide support for x64 builds in Visual C++ project files.
4766
4767 * src/builds/win32: Renamed to...
4768 * src/builds/windows: This.
4769
4770 * src/builds/windows/vc2010/*: Updated to handle x64 target.
4771
4772 * src/builds/windows/*.mk, docs/INSTALL.GNU: s/win32/windows/ where
4773 appropriate.
4774
Werner Lemberg604838d2013-10-22 01:10:10 +020047752013-10-22 Werner Lemberg <wl@gnu.org>
4776
4777 * src/base/md5.c, src/base/md5.h: Updated to recent version.
4778
4779 * src/base/ftobjs.c: Updated; `md5.c' no longer uses `free'.
4780
Werner Lembergdb9159c2013-10-22 10:27:50 +02004781 The canonical URL to get updates for this file is
4782
4783 http://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/popa3d/popa3d/md5/
4784
4785 as the author told me in private communication.
4786
Werner Lemberg34efe052013-10-19 21:14:40 +020047872013-10-19 Werner Lemberg <wl@gnu.org>
4788
Werner Lemberg75efc2d2013-10-19 21:46:03 +02004789 [autofit] s/SMALL_TOP/X_HEIGHT/.
4790
4791 * src/autofit/afblue.dat: Updated.
4792
4793 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
4794
4795 * src/autofit/aflatin.c, src/autofit/aflatin.h,
4796 src/autofit/atlatin2.c: Updated.
4797
47982013-10-19 Werner Lemberg <wl@gnu.org>
4799
Werner Lemberg34efe052013-10-19 21:14:40 +02004800 * src/autofit/afblue.dat: s/MINOR/DESCENDER/.
4801
4802 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
4803
Werner Lemberg955f6a82013-10-16 19:47:57 +020048042013-10-16 Werner Lemberg <wl@gnu.org>
4805
Werner Lemberga5f22a92013-10-17 11:08:25 +02004806 [autofit] Add description strings to script entries.
4807
4808 Currently, this is unused.
4809
4810 * src/autofit/afscript.h: Do it.
4811 * src/autofit/afglobal.c, src/autofit/afpic.c,
4812 src/autofit/aftypes.h: Updated.
4813
48142013-10-16 Werner Lemberg <wl@gnu.org>
4815
Werner Lemberg955f6a82013-10-16 19:47:57 +02004816 [autofit] Improve tracing message for extra light flag.
4817
4818 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Do it.
4819
Chongyu Zhu41632b52013-10-15 11:40:34 +020048202013-10-15 Chongyu Zhu <lembacon@gmail.com>
4821
4822 [arm] Fix thumb2 inline assembly under LLVM.
4823
4824 When using `ADD' with an immediate operand, the instruction is
4825 actually `ADD Rd, Rn, #<imm12>', that is, the maximum of the
4826 immediate operand cannot exceed 4095. It will fail to compile with
4827 LLVM.
4828
4829 However, in GCC, due to some legacy compatibility considerations,
4830 `ADD.W' will be automatically emitted when the immediate operand is
4831 larger than 4095.
4832
4833 * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h
4834 (FT_MulFix_arm) [__GNUC__]: Support clang compiler.
4835
4836 * src/truetype/ttinterp.c (TT_MulFix14_arm) [__GNUC__]: Ditto.
4837
Werner Lembergb6695242013-10-12 10:33:04 +020048382013-10-12 Werner Lemberg <wl@gnu.org>
4839
4840 [autofit] Improve tracing of `latin' hinter.
4841
4842 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Report blue
4843 zone types.
4844 (af_latin_metrics_scale_dim): Report scaling changes due to x height
4845 alignment.
4846 Report scaled stroke width and blue zone values.
4847
Dave Arnolde845a852013-10-03 23:04:29 +020048482013-10-03 Dave Arnold <darnold@adobe.com>
4849
4850 * src/cff/cf2font.c (cf2_computeDarkening): Avoid division by zero.
4851
Werner Lemberg2c56f2a2013-10-07 22:01:00 +02004852 Note that the old code avoided using a region of the piecewise
4853 linear function where the slope was zero. The recovery was to use a
4854 different section of the function, which produced a different,
4855 incorrect amount of darkening.
4856
Darrell Bellert01af71d2013-10-02 22:04:07 +020048572013-10-02 Darrell Bellert <darrell.bellert@hl.konicaminolta.us>
4858
4859 * src/sfnt/ttload.c (tt_face_load_pclt): Fix `pclt_fields'.
4860
Dave Arnold0b330452013-10-02 11:04:06 +020048612013-10-02 Dave Arnold <darnold@adobe.com>
4862
4863 * src/cff/cf2font.c (cf2_computeDarkening): Initialize darkenAmount.
4864
4865 This line was lost in commit 89ca1fd6 (from 2013-06-25). The effect
4866 is to use a previous darkening amount when producing an unhinted,
4867 unscaled outline. This can cause autohint samples in ftgrid and
4868 ftview to be based on darkened CFF outlines instead of unhinted,
4869 undarkened ones.
4870
Dave Arnold3a2cb0f2013-09-29 16:17:02 +020048712013-09-29 Dave Arnold <darnold@adobe.com>
4872
4873 Fix Savannah bug #39295.
4874
4875 The bug was caused by switching to the initial hintmap (the one in
4876 effect when `moveto' executes) just before drawing the final element
4877 in the charstring. This ensured that the path was closed (in both
4878 Character Space and Device Space). But if the final element was a
4879 curve and if the final hintmap was different enough from the initial
4880 one, then the curve was visibly distorted.
4881
4882 The first part of the fix is to draw the final curve using the final
4883 hintmap as specified by the charstring. This corrects the
4884 distortion but does not ensure closing in Device Space. It may
4885 require the rasterizer to automatically generate an extra closing
4886 line. Depending on the hintmap differences, this line could be from
4887 zero to a couple pixels in length.
4888
4889 The second part of the fix covers the case where the charstring
4890 subpath is closed with an explicit line. We now modify that line's
4891 end point to avoid the distortion.
4892
4893 Some glyphs in the bug report font (TexGyreHeros-Regular) that show
4894 the change are:
4895
4896 25ppem S (98)
4897 24ppem eight (52)
4898 25.5ppem p (85)
4899
4900 Curves at the *end* of a subpath are no longer distorted. However,
4901 some of these glyphs have bad hint substitutions in the middle of a
4902 subpath, and these are not affected.
4903
4904 The patch has been tested with a set of 106 fonts that shipped with
4905 Adobe Creative Suite 4, together with 756 Open Source CFF fonts from
4906 Google Fonts. There are 1.5 million glyphs, of which some 20k are
4907 changed with the fix. A sampling of a few hundred of these changes
4908 have been examined more closely, and the changes look good (or at
4909 least acceptable).
4910
4911 * src/cff/cf2hints.h (CF2_GlyphPathRec): New element `pathIsClosing'
4912 to indicate that we synthesize a closepath line.
4913
4914 * src/cff/cf2hints.c (cf2_glyphpath_init): Updated.
4915 (cf2_glyphpath_pushPrevElem): If closing, use first hint map (for
4916 `lineto' operator) and adjust hint zone.
4917 For synthesized closing lines, use end point in first hint zone.
4918 (cf2_glyphpath_lineTo): Take care of synthesized closing lines. In
4919 particular, shift the detection of zero-length lines from character
4920 space to device space.
4921 (cf2_glyphpath_closeOpenPath): Remove assertion.
4922 Updated.
4923
Werner Lembergb75a8b82013-09-25 09:46:36 +020049242013-09-25 Werner Lemberg <wl@gnu.org>
4925
4926 * src/autofit/aflatin.c (af_{grek,cyrl}_uniranges): Fix arrays.
4927
suzuki toshiyaac0f4452013-09-25 10:57:17 +090049282013-09-25 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4929
4930 [bdf, pcf] Refuse non-zero face_index.
Werner Lemberg964317e2013-09-25 09:22:40 +02004931
suzuki toshiyaac0f4452013-09-25 10:57:17 +09004932 Suggested by Akira Tagoh, see
4933
4934 http://lists.gnu.org/archive/html/freetype/2013-09/msg00030.html
4935
Werner Lemberg964317e2013-09-25 09:22:40 +02004936 * src/bdf/bdfdrivr.c (BDF_Face_Init): Return `Invalid_Argument'
4937 error if the font could be opened but non-zero `face_index' is
4938 given.
suzuki toshiyaac0f4452013-09-25 10:57:17 +09004939 * src/pcf/pcfdrivr.c (PCF_Face_Init): Ditto.
4940
4941 * src/type42/t42objs.c (T42_Face_Init): Remove unrequired FT_UNUSED
Werner Lemberg964317e2013-09-25 09:22:40 +02004942 macro for `face_index' because it is validated later.
suzuki toshiyaac0f4452013-09-25 10:57:17 +09004943
Werner Lemberg4de77872013-09-23 22:10:08 +020049442013-09-23 Werner Lemberg <wl@gnu.org>
4945
4946 Fix Savannah bug #40090.
4947
4948 * src/autofit/afcjk.c (af_cjk_metrics_scale): Revert commit
4949 306f8c5d (from 2013-08-25) affecting this function.
4950
Werner Lemberg5a4c5a52013-09-22 22:37:26 +020049512013-09-22 Werner Lemberg <wl@gnu.org>
4952
4953 [autofit] Disunify Cyrillic and Greek handling from Latin.
4954
4955 * src/autofit/afscript.h: Add Cyrillic and Greek.
4956
4957 * src/autofit/afblue.dat (AF_BLUE_STRINGSET_GREK,
4958 AF_BLUE_STRINGSET_CYRL): Add blue zones for Greek and Cyrillic.
4959 (AF_BLUE_STRINGSET_LATN): Fix typo.
4960 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
4961
4962 * src/autofit/aflatin.c (af_grek_uniranges, af_cyrl_uniranges): New
4963 arrays.
4964 (af_grek_script_class, af_cyrl_script_class): New scripts.
4965 * src/autofit/aflatin.h: Updated.
4966
Werner Lemberg2cca9662013-09-20 07:23:34 +020049672013-09-20 Werner Lemberg <wl@gnu.org>
4968
4969 * docs/CHANGES: Updated.
4970
Behdad Esfahbod31e726d2013-09-20 07:20:53 +020049712013-09-20 Behdad Esfahbod <behdad@behdad.org>
4972
4973 Fix vertical size of emboldened glyphs.
4974
4975 Cf. https://bugzilla.gnome.org/show_bug.cgi?id=686709
4976
4977 * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Adjust `horiBearingY'
4978 also.
4979
Alexei Podtelezhnikov52381c12013-09-11 23:25:56 -040049802013-09-11 Alexei Podtelezhnikov <apodtele@gmail.com>
4981
4982 * include/freetype/ftoutln.h: Correct FT_Outline_Get_Orientation
4983 algorithm description.
4984
Werner Lemberg3f542492013-09-11 23:08:31 +020049852013-09-11 Werner Lemberg <wl@gnu.org>
4986
4987 [autofit] Improve Hebrew rendering.
4988
4989 This change introduces a new blue zone property
4990 `AF_BLUE_PROPERTY_LATIN_LONG' to make the auto-hinter ignore short
4991 top segments.
4992
4993 * src/autofit/afblue.dat: Fix Hebrew blue strings.
4994 Use AF_BLUE_PROPERTY_LATIN_LONG for AF_BLUE_STRING_HEBREW_TOP.
4995
4996 * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_LONG): New macro.
4997
4998 * src/autofit/afblue.c, src/autofit/afblue.h: Updated.
4999
5000 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Handle
5001 `AF_LATIN_IS_LONG_BLUE'.
5002
5003 * src/autofit/aflatin.h (AF_LATIN_IS_LONG_BLUE): New macro.
5004
Werner Lemberg85a7fdf2013-08-29 21:03:05 +020050052013-08-28 Behdad Esfahbod <behdad@google.com>
5006
5007 [sfnt] Fix frame access while reading WOFF table directory.
5008
5009 * src/sfnt/sfobjs.c (woff_open_font): Using single memory frame
5010 while reading the directory entries for the whole loop.
5011
50122013-08-29 Werner Lemberg <wl@gnu.org>
Werner Lembergd689d1c2013-08-29 17:53:40 +02005013 Behdad Esfahbod <behdad@google.com>
5014
5015 Implement support for WOFF containers.
5016
5017 We simply synthesize a SFNT from the WOFF, create a memory stream
5018 for the new data, and load the SFNT as usual.
5019
5020 Does NOT add any API to access WOFF metadata or private blocks.
5021
5022 * include/freetype/internal/tttypes.h (WOFF_HeaderRec,
5023 WOFF_TableRec): New structures.
5024
5025 * include/freetype/tttags.h (TTAG_wOFF): New macro.
5026
5027 * src/base/ftobjs.c (FT_Open_Face): Set `stream' after calling
5028 `open_face'.
5029
5030 * src/sfnt/sfobjs.c [FT_CONFIG_OPTION_SYSTEM_ZLIB]: Include
5031 `FT_GZIP_H'.
5032 (WRITE_BYTE, WRITE_USHORT, WRITE_ULONG): New temporary macros for
5033 writing to a stream.
5034 (sfnt_stream_close, compare_offsets, woff_open_font): New functions.
5035 (sfnt_open_font): Handle `TTAG_wOFF'.
5036 (sfnt_init_face): Set `stream' after calling `sfnt_open_font'.
5037
5038 * src/truetype/ttobjs.c (tt_face_init): Set `stream' after calling
5039 `sfnt->init_face'.
5040
5041 * src/base/ftobjs.c (open_face): Use a pointer to FT_Stream as an
5042 argument so that a changed stream survives.
5043 Update callers.
5044
50452013-08-28 Werner Lemberg <wl@gnu.org>
Werner Lemberge0f39ae2013-08-28 17:34:01 +02005046
Werner Lembergdc240522013-08-29 17:53:24 +02005047 [gzip] New function `FT_Gzip_Uncompress'.
5048
5049 This is modeled after zlib's `uncompress' function. We need this
5050 for WOFF support.
5051
5052 * include/freetype/ftgzip.h, src/gzip/ftgzip.c (FT_Gzip_Uncompress):
5053 New function.
5054
5055 * src/gzip/rules.mk: Rewrite to better reflect dependencies.
5056
50572013-08-28 Werner Lemberg <wl@gnu.org>
5058
Werner Lemberg5195ecd2013-08-28 17:41:21 +02005059 [autofit] Fix `make multi' compilation.
5060
5061 * src/autofit/afblue.cin, src/autofit/afblue.c: Don't include
5062 `afblue.h' but `aftypes.h'.
5063 * src/autofit/afcjk.c: Don't include `aftypes.h' but `afglobal.h'.
5064
50652013-08-28 Werner Lemberg <wl@gnu.org>
5066
Werner Lemberge0f39ae2013-08-28 17:34:01 +02005067 [autofit] Fix C++ compilation.
5068
5069 * src/autofit/afglobal.c (af_face_globals_get_metrics),
5070 src/autofit/afdummy.c (af_dflt_script_class), src/autofit/afindic.c
5071 (af_deva_script_class): Use proper casts.
5072
Behdad Esfahbodbd3849e2013-08-27 21:43:38 +020050732013-08-27 Behdad Esfahbod <behdad@google.com>
5074
Behdad Esfahbodc799dd62013-08-27 21:46:03 +02005075 * src/sfnt/ttload.c (tt_face_load_font_dir): Fix sign typos.
5076
50772013-08-27 Behdad Esfahbod <behdad@google.com>
5078
Behdad Esfahbodbd3849e2013-08-27 21:43:38 +02005079 FT_Open_Face: Improve external stream handling.
5080
5081 If the font's `clazz->init_face' function wants to swap to new
5082 stream, handling of whether original stream was external could
5083 result to either memory leak or double free. Mark externality into
5084 face flags before calling `init_face' such that the clazz can handle
5085 external streams properly.
5086
5087 * src/base/ftobjs.c (FT_Open_Face): Move code to set
5088 FT_FACE_FLAG_EXTERNAL_STREAM to...
5089 (open_face): This function.
5090
Werner Lemberg5e53db22013-08-27 18:37:39 +020050912013-08-27 Werner Lemberg <wl@gnu.org>
5092
Werner Lembergbcd8c0b2013-08-27 21:36:03 +02005093 Remove `FT_SqrtFixed' function.
5094
5095 It's no longer used.
5096
5097 * include/freetype/internal/ftcalc.h, src/base/ftcalc.c: Do it.
5098
50992013-08-27 Werner Lemberg <wl@gnu.org>
5100
Werner Lemberg5e53db22013-08-27 18:37:39 +02005101 [autofit] While tracing, report script names instead of ID values.
5102
5103 * src/autofit/afglobal.c (af_script_names) [FT_DEBUG_LEVEL_TRACE]:
5104 New array.
5105 * src/autofit/afglobal.h: Updated.
5106
5107 * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
5108 af_cjk_hint_edges): Use `af_script_names'.
5109 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
5110 af_latin_hint_edges): Ditto.
5111
Werner Lemberg92f5a042013-08-26 09:22:27 +020051122013-08-26 Werner Lemberg <wl@gnu.org>
5113
Werner Lemberg278f64b2013-08-26 20:20:03 +02005114 [autofit] Report used script while hinting a glyph.
5115
5116 * src/autofit/afcjk.c (af_cjk_hint_edges), src/autofit/aflatin.c
5117 (af_latin_hint_edges): Implement it.
5118
51192013-08-26 Werner Lemberg <wl@gnu.org>
5120
Werner Lemberg371f5c32013-08-26 20:11:24 +02005121 [autofit] Add support for Hebrew script.
5122
5123 * src/autofit/afblue.dat: Add blue strings for Hebrew.
5124 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
5125
5126 * src/autofit/aflatin.c (af_hebr_uniranges): New array.
5127 (af_hebr_script_class): New script.
5128 * src/autofit/aflatin.h, src/autofit/afscript.h: Updated.
5129
51302013-08-26 Werner Lemberg <wl@gnu.org>
5131
Werner Lemberg098121d2013-08-26 18:54:05 +02005132 [autofit] Improve tracing messages.
5133
5134 * src/autofit/afcjk.c (af_cjk_metrics_init_widths): Mention script
5135 ID in tracing message.
5136 (af_cjk_metrics_init_blues): Initialize `axis' outside of the inner
5137 loop.
5138 Improve tracing messages.
5139 (af_cjk_hint_edges) [FT_DEBUG_LEVEL_TRACE]: New variable
5140 `num_actions' to count hinting actions.
5141 Improve tracing messages.
5142
5143 * src/autofit/aflatin.c (af_latin_metrics_init_widths): Mention
5144 script ID in tracing message.
5145 (af_latin_metrics_init_blues, af_latin_hint_edges): Improve tracing
5146 messages.
5147
51482013-08-26 Werner Lemberg <wl@gnu.org>
5149
Werner Lembergffee64a2013-08-26 12:55:48 +02005150 Better tracing of loaded glyphs.
5151
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02005152 Previously, the loading of a glyph was traced at level 4, if at all.
Werner Lembergffee64a2013-08-26 12:55:48 +02005153 With this change, all font loading routines emit a tracing message
5154 at level 1, making it easier to select tracing output (for example
5155 using F2_DEBUG="any:1 afhints:7 aflatin:7").
5156
5157 * src/bdf/bdfdrivr.c (BDF_Glyph_Load): Add tracing message.
5158 * src/cff/cffdrivr.c (cff_glyph_load): Ditto.
5159 * src/cff/cffgload.c (cff_decoder_prepare): Improve tracing
5160 messages.
5161 * src/cid/cidgload.c (cid_load_glyph): Use level 1 for tracing
5162 message.
5163 * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Ditto.
5164 * src/pfr/pfrobjs.c (pfr_slot_load): Add tracing message.
5165 * src/truetype/ttgload.c (TT_Load_Glyph): Ditto.
5166 * src/type1/t1gload.c (T1_Load_Glyph): Ditto.
5167 * src/type42/t42objs.c (T42_GlyphSlot_Load): Ditto.
5168 * src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto.
5169
51702013-08-26 Werner Lemberg <wl@gnu.org>
5171
Werner Lemberg33655a92013-08-26 09:58:50 +02005172 [autofit] Fix script selection.
5173
5174 * src/autofit/afglobal.c (af_face_globals_get_metrics): Use
5175 `AF_SCRIPT_DFLT', not value 0.
5176 Simplify code.
5177
5178 * src/autofit/afscript.h: Sort by script name.
5179
51802013-08-26 Werner Lemberg <wl@gnu.org>
5181
Werner Lemberg92f5a042013-08-26 09:22:27 +02005182 [autofit] Make `dummy' hinter work as expected.
5183
5184 * src/autofit/afdummy.c (af_dummy_hints_init): Properly set scaling
5185 information.
5186 (af_dummy_hints_apply): Scale the glyphs.
5187
Werner Lemberg8b8be782013-08-25 08:01:41 +020051882013-08-25 Werner Lemberg <wl@gnu.org>
5189
Werner Lembergc1eb4452013-08-25 19:47:26 +02005190 [autofit] Make `cjk' module use blue stringsets.
5191
5192 * src/autofit/afcjk.c (AF_CJK_MAX_TEST_CHARACTERS): Removed.
5193 (af_cjk_hani_blue_chars): Removed.
5194 (AF_CJK_BLUE_TYPE_*): Removed.
5195 (af_cjk_metrics_init_blues): Replace AF_CJK_MAX_TEST_CHARACTERS with
5196 AF_BLUE_STRING_MAX_LEN.
5197 Change loops to use offsets (in file `afblue.h') into the new arrays
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02005198 `af_blue_stringsets' and `af_blue_strings' (in file `afblue.c').
Werner Lembergc1eb4452013-08-25 19:47:26 +02005199 Instead of three dimensions (as used in the old blue string array)
5200 we now use properties to do the same, saving one loop nesting level.
5201
5202 * src/autofit/afcjk.h: Remove old enumeration values superseded by
5203 the new data in `afblue.h'.
5204 (AF_CJK_IS_TOP_BLUE, AF_CJK_IS_HORIZ_BLUE, AF_CJK_IS_FILLED_BLUE,
5205 AF_CJK_IS_RIGHT_BLUE): New macros, to be used in
5206 `af_cjk_metrics_init_blues'.
5207 (AF_CJK_BLUE_IS_RIGHT): Remove this now redundant enum value.
5208 (AF_CJK_BLUE_IS_TOP): Renamed to...
5209 (AF_CJK_BLUE_TOP): This.
5210 (AF_CJK_MAX_BLUES): Remove.
5211 (AF_CJKAxisRec): Updated.
5212
52132013-08-25 Werner Lemberg <wl@gnu.org>
5214
Werner Lemberg5c4a23a2013-08-25 19:29:07 +02005215 [autofit] Typo.
5216
5217 * src/autofit/afblue.hin, src/autofit/afblue.c (GET_UTF8_CHAR): Use
5218 cast.
5219
52202013-08-25 Werner Lemberg <wl@gnu.org>
5221
Werner Lemberg306f8c52013-08-25 13:07:08 +02005222 [autofit] Synchronize `cjk' with `latin' module (and vice versa).
5223
5224 * src/autofit/afcjk.c (af_cjk_metrics_init_widths): Add tracing
5225 messages.
5226 (af_cjk_metrics_init_blues): Don't pass blue string array as
5227 argument but use the global array directly.
5228 Use `outline' directly.
5229 Update and add tracing messages.
5230 (af_cjk_metrics_init): Simplify code.
5231 (af_cjk_metrics_scale_dim): Improve tracing message.
5232 (af_cjk_metrics_scale): Synchronize.
5233
5234 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
5235 af_latin_metrics_init_blues): Improve and add tracing messages.
5236
52372013-08-25 Werner Lemberg <wl@gnu.org>
5238
Werner Lemberg0975d682013-08-25 08:37:47 +02005239 [autofit] Make `latin' module use blue stringsets.
5240
5241 * src/autofit/aflatin.c (AF_LATIN_MAX_TEST_CHARACTERS): Removed.
5242 (af_latin_blue_chars): Removed.
5243 (af_latin_metrics_init_blues): Replace AF_LATIN_MAX_TEST_CHARACTERS
5244 with AF_BLUE_STRING_MAX_LEN.
5245 Change loops to use offsets (in file `afblue.h') into the new arrays
5246 `af_blue_stringsets' and `af_blue_strings' (in file `afblue.c').
5247 Use `AF_LATIN_IS_SMALL_TOP_BLUE' macro.
5248
5249 * src/autofit/aflatin.h: Remove old enumeration values superseded by
5250 the new data in `afblue.h'.
5251 (AF_LATIN_IS_TOP_BLUE): Updated definition.
5252 (AF_LATIN_IS_SMALL_TOP_BLUE): New macro.
5253 (AF_LATIN_MAX_BLUES): Remove.
5254 (AF_LatinAxisRec): Updated.
5255
52562013-08-25 Werner Lemberg <wl@gnu.org>
5257
Werner Lembergdb3e5b92013-08-25 08:23:22 +02005258 [autofit] Add blue stringsets.
5259
5260 * src/autofit/aftypes.h: Include `afblue.h'.
5261 (AF_ScriptClassRec): Add `blue_stringset' field.
5262 (AF_DEFINE_SCRIPT_CLASS): Updated.
5263
5264 * src/autofit/autofit.c: Include `afblue.c'.
5265
5266 * src/autofit/afcjk.c (af_hani_script_class), src/autofit/afdummy.c
5267 (af_dflt_script_class), src/autofit/afindic.c
5268 (af_deva_script_class), src/autofit/aflatin.c
5269 (af_latn_script_class), src/autofit/aflatin2.c
5270 (af_ltn2_script_class): Updated.
5271
5272 * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `afblue.c'.
5273
52742013-08-25 Werner Lemberg <wl@gnu.org>
5275
Werner Lemberg8b8be782013-08-25 08:01:41 +02005276 [autofit] Introduce data file for blue strings.
5277
5278 The idea is to have a central file which gets processed by a Perl
5279 script to create proper `.c' and `.h' files using templates. There
5280 are two other reasons to do that:
5281
5282 . The data file should be easily readable. We use UTF-8 encoding
5283 which then gets converted to single bytes.
5284
5285 . Since the number of supported scripts will increase soon, the
5286 current usage of blue string arrays is a waste of space. Using
5287 the Perl script it is possible to imitate jagged arrays,
5288 defining enumeration constants as offsets into the arrays.
5289
5290 This commit only adds files without changing any functionality.
5291
5292 * src/autofit/afblue.dat: New data file.
5293 * src/tools/afblue.pl: New Perl script for processing `afblue.dat'.
5294
5295 * src/autofit/afblue.cin, src/autofit/afblue.hin: New template files
5296 for...
5297 * src/autofit/afblue.c, src/autofit/afblue.c: New source files.
5298 To avoid a dependency on Perl, we add them too.
5299
Alexei Podtelezhnikovfc32e1c2013-08-19 22:57:05 -040053002013-08-19 Alexei Podtelezhnikov <apodtele@gmail.com>
5301
Werner Lemberg71c0ad62013-08-27 21:30:09 +02005302 [base] Enable new algorithm for `BBox_Cubic_Check'.
Alexei Podtelezhnikovfc32e1c2013-08-19 22:57:05 -04005303
Werner Lemberg71c0ad62013-08-27 21:30:09 +02005304 * src/base/ftbbox.c: Enable new BBox_Cubic_Check algorithm, remove
5305 the old one.
5306 Improve comments.
Alexei Podtelezhnikovfc32e1c2013-08-19 22:57:05 -04005307
Werner Lemberg6bfa2632013-08-18 18:34:05 +020053082013-08-18 Werner Lemberg <wl@gnu.org>
5309
Werner Lemberg4af44442013-08-18 18:46:30 +02005310 * builds/unix/unix-def.in (freetype2.pc): Don't set executable bit.
5311
53122013-08-18 Werner Lemberg <wl@gnu.org>
5313
Werner Lemberg6bfa2632013-08-18 18:34:05 +02005314 Fix Savannah bug #39804.
5315
5316 * builds/unix/configure.raw (LIBPNG): Define and export.
5317 * builds/unix/freetype-config.in, builds/unix/freetype2.in: Handle
5318 libpng.
5319
Alexei Podtelezhnikov32a7d872013-08-17 22:19:21 -040053202013-08-17 Alexei Podtelezhnikov <apodtele@gmail.com>
5321
5322 [base] Clean up BBox_Conic_Check.
5323
5324 * src/base/ftbbox.c (BBox_Conic_Check): Remove redundant checks for
5325 extremum at the segment ends, which are already within the bbox.
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02005326 Slightly modify calculations.
Alexei Podtelezhnikov32a7d872013-08-17 22:19:21 -04005327
Alexei Podtelezhnikov1a9c3d12013-08-15 22:51:42 -040053282013-08-15 Alexei Podtelezhnikov <apodtele@gmail.com>
5329
5330 [base] Finish experimental (disabled) BBox_Cubic_Check implementation.
5331
5332 * src/base/ftbbox.c (BBox_Cubic_Check): Scale arguments to improve
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02005333 accuracy and avoid overflows.
Alexei Podtelezhnikov1a9c3d12013-08-15 22:51:42 -04005334
Alexei Podtelezhnikov61a65512013-08-13 22:28:57 -040053352013-08-13 Alexei Podtelezhnikov <apodtele@gmail.com>
5336
5337 [base] Refactor experimental (disabled) BBox_Cubic_Check.
5338
5339 * src/base/ftbbox.c (BBox_Cubic_Check): Implement the minimum search
Alexei Podtelezhnikov1a9c3d12013-08-15 22:51:42 -04005340 as the mirror image of the maximum search implemented here...
5341 (update_max): New function.
Alexei Podtelezhnikov61a65512013-08-13 22:28:57 -04005342
John Tytgat9bcfab82013-08-06 08:55:19 +020053432013-08-06 John Tytgat <John.Tytgat@esko.com>
5344
5345 Fix Savannah bug #39702.
5346
5347 * src/cff/cffload.c (cff_index_get_pointers): Check for `cur_offset
5348 != 0'; this stronger test is mandated by the CFF specification.
5349 Fix test for INDEX structures which have one or more empty entries
5350 at the end.
5351
Werner Lembergcc25e3a2013-08-05 08:46:15 +020053522013-08-05 Werner Lemberg <wl@gnu.org>
5353
Werner Lemberga32682f2013-08-06 00:21:46 +02005354 Fix gcc pragmas, part 2.
5355
5356 * src/truetype/ttinterp.c (TT_MulFix14_long_long,
5357 TT_DotFix14_long_long): `#pragma gcc diagnostic {push,pop}' has been
5358 introduced with gcc version 4.6.
5359
53602013-08-05 Werner Lemberg <wl@gnu.org>
5361
Werner Lemberg69e524d2013-08-05 23:38:32 +02005362 Fix gcc pragmas.
5363
5364 * src/truetype/ttinterp.c (TT_MulFix14_long_long,
5365 TT_DotFix14_long_long): Older gcc versions don't accept diagnostic
5366 pragmas within a function body.
5367
53682013-08-05 Werner Lemberg <wl@gnu.org>
5369
Werner Lemberg9e6de362013-08-05 16:37:21 +02005370 Fix Savannah bug #39700.
5371
5372 * builds/unix/ftconfig.h: Synchronize with
5373 `include/freetype/config/ftconfig.h'.
5374
5375 * builds/vms/ftconfig.h: Ditto.
5376 Make the differences to the master `ftconfig.h' file as small as
5377 possible for easier maintainance.
5378
53792013-08-05 Werner Lemberg <wl@gnu.org>
5380
Werner Lembergcc25e3a2013-08-05 08:46:15 +02005381 [autofit] Improve handling of `near' points.
5382
5383 Points which are very near to each other are now marked as such.
5384 The `weak' flag is then computed by using the `in' vector of the
5385 first and the `out' vector of the last point of a group of near
5386 points.
5387
5388 For example, this fixes the rendering of glyph `Oslash' in
5389 `Roboto-Thin.ttf'.
5390
5391 * src/autofit/afhints.h (AF_Flags): New value `AF_FLAGS_NEAR'.
5392
5393 * src/autofit/afhints.c (af_glyph_hints_reload): Introduce
5394 the heuristic value `near_limit' to decide whether the current point
5395 is near to the previous one, then set `AF_FLAG_NEAR' accordingly.
5396 Store good `in' vector (of last non-near point) in
5397 `last_good_in_{x,y}' and use it as an argument to
5398 `ft_corner_is_flat' if necessary.
5399
Werner Lemberg74a9b672013-08-02 14:53:32 +020054002013-08-02 Werner Lemberg <wl@gnu.org>
5401
Werner Lemberg0d28a7d2013-08-02 22:59:43 +02005402 * include/freetype/ftcffdrv.h: Improve documentation.
5403 This is based on blog entries from David Lemon and Dave Arnold (both
5404 from Adobe) with kind permission. Dave also helped in
5405 proof-reading.
5406
54072013-08-02 Werner Lemberg <wl@gnu.org>
5408
Werner Lemberg456cc442013-08-02 20:25:21 +02005409 [autofit] Move declaration of scripts into separate file.
5410
5411 This has the benefit that we don't need to duplicate the data at
5412 different places.
5413
5414 * src/autofit/afscript.h: New file.
5415
5416 * src/autofit/aftypes.h (AF_Script): Include `afscript.h' to define
5417 the enumeration values.
5418
5419 * src/autofit/afglobal.c: Include `afscript.h' to get the script
5420 specific header files.
5421 (af_script_classes): Include `afscript.h' to fill this array.
5422
5423 * src/autofit/afpic.c: Include `afscript.h' to get the script
5424 specific header files.
5425 (autofit_module_class_pic_init): Include `afscript.h' for
5426 initialization.
5427 * src/autofit/afpic.h (AF_SCRIPT_CLASSES_COUNT,
5428 AF_SCRIPT_CLASSES_REC_COUNT): Removed. Use `AF_SCRIPT_MAX' instead.
5429
5430 * src/autofit/rules.mk (AUTOF_DRV_H): Updated.
5431
54322013-08-02 Werner Lemberg <wl@gnu.org>
5433
Werner Lemberg773601d2013-08-02 19:51:17 +02005434 [autofit] Move declaration of writing systems into separate file.
5435
5436 This has the benefit that we don't need to duplicate the data at
5437 different places.
5438
5439 * src/autofit/afwrtsys.h: New file.
5440
5441 * src/autofit/aftypes.h (AF_WritingSystem): Include `afwrtsys.h' to
5442 define the enumeration values.
5443
5444 * src/autofit/afglobal.c: Include `afwrtsys.h' to get the writing
5445 system specific header files.
5446 Include `afpic.h'.
5447 (af_writing_system_classes): Include `afwrtsys.h' to fill this
5448 array.
5449
5450 * src/autofit/afpic.c: Include `afwrtsys.h' to get the writing
5451 system specific header files.
5452 (autofit_module_class_pic_init): Include `afwrtsys.h' for
5453 initialization.
5454 * src/autofit/afpic.h (AF_WRITING_SYSTEM_CLASSES_COUNT,
5455 AF_WRITING_SYSTEM_CLASSES_REC_COUNT): Removed. Use
5456 `AF_WRITING_SYSTEM_MAX' instead.
5457
54582013-08-02 Werner Lemberg <wl@gnu.org>
5459
Werner Lemberg74a9b672013-08-02 14:53:32 +02005460 [sfnt] Fix compilation with g++.
5461
5462 * src/sfnt/pngshim.c (error_callback, read_data_from_FT_stream): Use
5463 cast.
5464 (Load_SBit_Png): Pacify compiler.
5465
Werner Lemberg89a529f2013-08-02 14:50:23 +020054662013-08-02 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5467 Werner Lemberg <wl@gnu.org>
5468
5469 [autofit] Fix `make multi'.
5470
5471 * include/freetype/config/ftconfig.h (FT_LOCAL_ARRAY,
5472 FT_LOCAL_ARRAY_DEF): New macros.
5473
5474 * src/autofit/afglobal.c (af_writing_system_classes,
5475 af_script_classes): Use FT_LOCAL_ARRAY_DEF.
5476 * src/autofit/afglobal.h: Declare `af_writing_system_classes' and
5477 `af_script_classes'.
5478 * src/autofit/afloader.c: Include `afpic.h'.
5479
Werner Lemberge8ed2d62013-08-01 12:20:20 +020054802013-08-01 Werner Lemberg <wl@gnu.org>
5481
5482 Another round of cppcheck nitpicks.
5483
5484 The call was (from the top-level of the FreeType tree):
5485
5486 cppcheck --force \
5487 --enable=all \
5488 -I /usr/include \
5489 -I /usr/local/include \
5490 -I /usr/lib/gcc/i586-suse-linux/4.7/include \
5491 -I include \
5492 -I include/freetype \
5493 -I include/freetype/config \
5494 -I include/freetype/internal \
5495 -DFT2_BUILD_LIBRARY \
5496 . &> cppcheck.log
5497
5498 using cppcheck git commit f7e93f99.
5499
5500 Note that cppcheck still can't handle `#include FOO' (with `FOO' a
5501 macro).
5502
5503 */* Improve variable scopes.
5504 */* Remove redundant initializations which get overwritten.
5505
5506 * src/gxvalid/*: Comment out redundant code or guard it with
5507 FT_DEBUG_LEVEL_TRACE.
5508
Werner Lemberg5d6a3602013-07-30 23:17:04 +020055092013-07-30 Werner Lemberg <wl@gnu.org>
5510
Werner Lemberg72f5ff52013-07-31 22:49:29 +02005511 [autofit] Introduce `writing systems'.
5512
5513 This patch adds a new top level to the auto-hinter's script class
5514 hierarchy. It defines `writing systems' which can contain multiple
5515 scripts.
5516
5517 For example, the `latin' writing system (in file `aflatin.c') is
5518 able to support scripts like Latin, Cyrillic, Armenian, etc., which
5519 can be handled similarly.
5520
5521 Scripts are now named using four-letter OpenType tags.
5522
5523 * src/autofit/aftypes.h (AF_ScriptClassRec): Move relevant members
5524 to...
5525 (AF_WritingSystemClassRec): This new structure. It holds pointers
5526 to functions which can be shared among related scripts.
5527 (AF_WritingSystem): New enumeration.
5528 (AF_Script): Revised values using four-letter tags.
5529 (AF_DEFINE_WRITING_SYSTEM_CLASS): New macro.
5530 (AF_DEFINE_SCRIPT_CLASS): Updated.
5531
5532 * src/autofit/afglobal.c (af_writing_system_classes): New global,
5533 constant array.
5534 (af_script_classes): Updated.
5535 (af_face_globals_free): Updated.
5536 Remove assertion.
5537 (af_face_globals_get_metrics): Updated.
5538
5539 * src/autofit/afglobal.h (AF_SCRIPT_FALLBACK)
5540 [!AF_CONFIG_OPTION_CJK]: Handle this case.
5541
5542 * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph):
5543 Updated.
5544
5545 * src/autofit/afpic.c (autofit_module_class_pic_init): Updated;
5546 initialize structures for both writing systems and scripts.
5547 * src/autofit/afpic.h: Updated.
5548 (AF_WRITING_SYSTEM_CLASSES_GET): New macro.
5549
5550 * src/autofit/afcjk.c (af_cjk_writing_system_class): New writing
5551 system.
5552 (af_cjk_uniranges): Renamed to...
5553 (af_hani_uniranges): This.
5554 (af_cjk_script_class): Reduced and renamed to...
5555 (af_hani_script_class): This.
5556 * src/autofit/afcjk.h: Updated.
5557
5558 * src/autofit/afdummy.c (af_dummy_writing_system_class): New writing
5559 system.
5560 (af_dummy_script_class): Reduced and renamed to...
5561 (af_dflt_script_class): This.
5562 * src/autofit/afdummy.h: Updated.
5563
5564 * src/autofit/afindic.c (af_indic_writing_system_class): New writing
5565 system.
5566 (af_indic_uniranges): Renamed to...
5567 (af_deva_uniranges): This.
5568 (af_indic_script_class): Reduced and renamed to...
5569 (af_deva_script_class): This.
5570 * src/autofit/afcjk.h: Updated.
5571
5572 * src/autofit/aflatin.c (af_latin_writing_system_class): New writing
5573 system.
5574 (af_latin_uniranges): Renamed to...
5575 (af_latn_uniranges): This.
5576 (af_latin_script_class): Reduced and renamed to...
5577 (af_latn_script_class): This.
5578 * src/autofit/aflatin.h: Updated.
5579
5580 * src/autofit/aflatin2.c (af_latin2_writing_system_class): New
5581 writing system.
5582 (af_latin2_uniranges): Renamed to...
5583 (af_ltn2_uniranges): This.
5584 Synchronize ranges with `latin'.
5585 (af_latin2_script_class): Reduced and renamed to...
5586 (af_ltn2_script_class): This.
5587 * src/autofit/aflatin2.h: Updated.
5588
55892013-07-30 Werner Lemberg <wl@gnu.org>
5590
Werner Lemberg5d6a3602013-07-30 23:17:04 +02005591 [autofit] Variable renaming.
5592
5593 * src/autofit/aftypes.h (AF_ScriptMetricsRec):
5594 s/clazz/script_class/.
5595 Update all users.
5596
suzuki toshiya2b29ed62013-07-30 13:55:29 +090055972013-07-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5598
5599 Ignore libpng-config under cross-building configuration,
5600 because it will return the flags for the hosting environment.
5601
5602 * builds/unix/configure.raw: Ignore libpng-config when
5603 `cross_compiling' == yes.
5604
suzuki toshiyaf2e7f1e2013-07-30 13:32:57 +090056052013-07-30 Behdad Esfahbod <behdad@google.com>
5606
5607 Prevent division by zero by a transparent color.
5608
5609 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra):
5610 Return 0 immediately, when alpha channel is zero.
5611
Behdad Esfahbod21c32b02013-07-25 21:53:18 +020056122013-07-25 Behdad Esfahbod <behdad@google.com>
5613
5614 Add FT_FACE_FLAG_COLOR and FT_HAS_COLOR.
5615
5616 Also disambiguate Google's color bitmap tables.
5617
5618 * include/freetype/freetype.h (FT_FACE_FLAG_COLOR, FT_HAS_COLOR):
5619 New macros.
5620
5621 * include/freetype/internal/tttypes.h (TT_SbitTableType): Add
5622 TT_SBIT_TABLE_TYPE_CBLC.
5623
5624 * src/sfnt/sfobjs.c (sfnt_load_face): Handle FT_FACE_FLAG_COLOR.
5625
5626 * src/sfnt/ttsbit.c (tt_face_load_sbit,
5627 tt_face_load_strike_metrics, tt_face_load_sbit_image): Handle
5628 TT_SBIT_TABLE_TYPE_CBLC.
5629
suzuki toshiyab4725cb2013-07-24 14:25:39 +090056302013-07-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5631
5632 [sfnt] Fix for `make multi' target.
5633
5634 * src/sfnt/pngshim.c (Load_SBit_Png): Use FT_LOCAL_DEF().
5635
Werner Lemberg6a7df622013-07-20 10:48:37 +020056362013-07-20 Werner Lemberg <wl@gnu.org>
5637
5638 * docs/INSTALL.GNU: Updated.
5639
Behdad Esfahbodff269522013-07-20 08:02:39 +020056402013-07-20 Behdad Esfahbod <behdad@google.com>
5641
5642 [sfnt] Fix `sbix' table version handling.
5643
5644 * src/sfnt/ttsbit.c (tt_face_load_sbit) [TT_SBIT_TABLE_TYPE_SBIX]:
5645 USHORT version numbers are to be considered as `minor'.
5646
Werner Lemberg05c14212013-07-19 23:11:23 +020056472013-07-19 Werner Lemberg <wl@gnu.org>
5648
5649 [autofit] Fix segment classification for blue zones.
5650
5651 The old code (essentially unchanged since the very beginning)
5652 incorrectly handled this configuration
5653
5654 x -o- x
5655 / \
5656 / \
5657 / \
5658 o o
5659
5660 as flat and this
5661
5662 o o
5663 / /
5664 x| x|
5665 | |
5666 o---------------o
5667
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02005668 as round. (`o' and `x' are on and off points, respectively).
Werner Lemberg05c14212013-07-19 23:11:23 +02005669
5670 This is a major change which should improve the rendering results
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02005671 enormously for many TrueType fonts, especially in the range approx.
Werner Lemberg05c14212013-07-19 23:11:23 +02005672 20-40ppem, fixing the appearance of many overshoots.
5673
5674 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Look at the
5675 first and last points of the segment, not the points right before
5676 and after.
5677
56782013-07-19 Behdad Esfahbod <behdad@google.com>
Werner Lemberg01705392013-07-18 13:13:12 +02005679
Behdad Esfahbod778a7e62013-07-19 14:28:28 +02005680 [sfnt] `sbix' fix-ups.
5681
5682 * src/sfnt/sfobjs.c (sfnt_load_face): Apple's `sbix' color bitmaps
5683 are rendered scaled and then the `glyf' outline rendered on top. We
5684 don't support that yet, so just ignore the `glyf' outline and
5685 advertise it as a bitmap-only font.
5686
5687 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
5688 [TT_SBIT_TABLE_TYPE_SBIX]: Return metrics in 26.6 units.
5689 (tt_face_load_sbix_image): Typo.
5690
56912013-07-18 Behdad Esfahbod <behdad@google.com>
5692
Werner Lemberg01705392013-07-18 13:13:12 +02005693 [sfnt] Add support for Apple's `sbix' color bitmap table.
5694
5695 * include/freetype/internal/tttypes.h (TT_SBit_MetricsRec): Widen
5696 fields to FT_Short and FT_UShort, respectively.
5697 (TT_SBitTableType): New enumeration.
5698 (TT_FaceRec): Add `sbit_table_type' field.
5699
5700 * include/freetype/tttags.h (TTAG_sbix): New macro.
5701
5702 * src/sfnt/pngshim.c (Load_SBit_Png): Pass a more generic
5703 FT_GlyphSlot argument instead FT_Bitmap.
5704 Add flag to control map and metrics handling.
5705 Update all users.
5706
5707 * src/sfnt/ttsbit.c: Include `ttmtx.h'.
5708 (tt_face_load_eblc): Renamed to...
5709 (tt_face_load_sbit): This.
5710 Handlic `sbix' bitmaps.
5711 (tt_face_free_eblc): Renamed to...
5712 (tt_face_load_sbit): This.
5713 Updated.
5714 (tt_face_load_strike_metrics): Handle `sbix' bitmaps.
5715 (tt_face_load_sbix_image): New function.
5716 (tt_sbit_decoder_alloc_bitmap, tt_sbit_decoder_load_image,
5717 tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned,
5718 tt_sbit_decoder_load_compound, tt_sbit_decoder_load_png,
5719 tt_sbit_decoder_load_image, tt_sbit_decoder_load_bitmap): Don't pass
5720 and handle load flags.
5721 (tt_sbit_decoder_load_bitmap) [!FT_CONFIG_OPTION_USE_PNG]: Better
5722 handle formats 17-19.
5723 Move color to grayscale conversion to...
5724 (tt_face_load_sbit_image): Here.
5725 Handle `sbix' bitmaps.
5726
5727 * src/sfnt/pngshim.h: Updated.
5728 * src/sfnt/ttsbit.h: Updated.
5729 * src/sfnt/sfdriver.c: Updated.
5730
Werner Lemberg274207e2013-07-18 12:38:57 +020057312013-07-18 Werner Lemberg <wl@gnu.org>
5732
5733 [sfnt] Ignore invalid magic number in `head' or `bhed'.
5734
5735 Other font engines seem to ignore it also. Problem reported by
5736 Hin-Tak Leung <htl10@users.sourceforge.net>.
5737
5738 * src/sfnt/ttload.c (check_table_dir): Don't abort but warn only if
5739 we have an invalid magic number.
5740
Werner Lemberg9a7951d2013-07-16 15:25:24 +020057412013-07-16 Werner Lemberg <wl@gnu.org>
5742
5743 [smooth] Fix segfault caused by previous commit.
5744
5745 * src/smooth/ftgrays.c (gray_set_cell): Always compute
5746 `ras.invalid'.
5747
David Turnera5f33ee2013-07-16 12:40:03 +020057482013-07-16 David Turner <digit@google.com>
5749
David Turner89929ec2013-07-16 13:36:07 +02005750 [smooth] Improve performance.
5751
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02005752 Provide a work-around for an ARM-specific performance bug in GCC.
David Turner89929ec2013-07-16 13:36:07 +02005753 This speeds up the rasterizer by more than 5%.
5754
5755 Also slightly optimize `set_gray_cell' and `gray_record_cell' (which
5756 also improves performance on other platforms by a tiny bit (<1%).
5757
5758 * src/smooth/ftgrays.c (FT_DIV_MOD): New macro.
5759 Use it where appropriate.
5760
5761 (gray_record_cell, gray_set_cell, gray_move_to,
5762 gray_convert_glyph_inner): Streamline condition handling.
5763
57642013-07-16 David Turner <digit@google.com>
5765
David Turnerf66d48e2013-07-16 13:18:00 +02005766 [truetype] Add assembler code for TT_MulFix14 and TT_DotFix14.
5767
5768 This patch provides slightly optimized versions for ARM, x86, and
5769 x86_64 CPUs if built with GCC.
5770
5771 Also remove some dead code.
5772
5773 * src/truetype/ttinterp.c (TT_MulFix14_arm, TT_MulFix14_long_long,
5774 TT_DotFix14_long_long): New functions.
5775
57762013-07-16 David Turner <digit@google.com>
5777
David Turnerb2890882013-07-16 12:52:18 +02005778 Optimize FT_MulFix for x86_64 GCC builds.
5779
5780 This patch provides an optimized `FT_MulFix' implementation for
5781 x86_64 machines when FreeType is built with GCC, or compatible
5782 compilers like Clang.
5783
5784 Example:
5785 bin/ftbench -p -t 5 -s 14 -f 0008 Arial.ttf
5786
5787 Before:
5788
5789 Load 4.863 us/op
5790 Load_Advances (Normal) 4.816 us/op
5791 Load_Advances (Fast) 0.028 us/op
5792 Render 2.753 us/op
5793 Get_Glyph 0.463 us/op
5794 Get_CBox 0.077 us/op
5795 Get_Char_Index 0.023 us/op
5796 Iterate CMap 13.898 us/op
5797 New_Face 12.368 us/op
5798 Embolden 0.028 us/op
5799 Get_BBox 0.302 us/op
5800
5801 After:
5802
5803 Load 4.617 us/op
5804 Load_Advances (Normal) 4.645 us/op
5805 Load_Advances (Fast) 0.027 us/op
5806 Render 2.789 us/op
5807 Get_Glyph 0.460 us/op
5808 Get_CBox 0.077 us/op
5809 Get_Char_Index 0.024 us/op
5810 Iterate CMap 13.403 us/op
5811 New_Face 12.278 us/op
5812 Embolden 0.028 us/op
5813 Get_BBox 0.301 us/op
5814
5815 * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h
5816 (FT_MulFix_x86_64): New function.
5817
58182013-07-16 David Turner <digit@google.com>
5819
David Turnera5f33ee2013-07-16 12:40:03 +02005820 Speed up ARMv7 support.
5821
5822 When building for ARMv7 with thumb2 instructions, the optimized
5823 `FT_MulFix_arm' assembly routine was not being used.
5824
5825 The reason for this is in the `ftconfig.h' header, namely:
5826
5827 - The assembly routine uses the `smull' instruction which is not
5828 available when generating Thumb-1 machine code. It is available
5829 in Thumb-2 mode, though.
5830
5831 - The header was written a long time ago before Thumb-2 became
5832 widely popular (e.g. with Android). So it simply doesn't use the
5833 assembly routine if the `__thumb__' built-in macro is defined.
5834
5835 - When compiling in Thumb-2 mode, the compiler will define both
5836 `__thumb__' and `__thumb2__'.
5837
5838 By checking for `(__thumb2__ || !__thumb__)', we ensure that the
5839 assembly routine is only avoided when generating Thumb-1 code.
5840
5841 Given that this is performance-sensitive function, this improves
5842 `ftbench' as follows on a Galaxy Nexus:
5843
5844 Before (us/op) After (us/op)
5845
5846 - loading Arial.ttf glyphs at 14 ppem [1]
5847
5848 Load 34.285 33.098
5849
5850 - same operation with the light auto-hinter [2]
5851
5852 Load 31.317 29.590
5853
5854 - same operation without hinting [3]
5855
5856 Load 6.143 5.376
5857
5858 - loading Arial.ttf advances at 14 ppem [4]
5859
5860 Load_Advances (normal) 34.216 33.016
5861 Load_Advances (fast) 0.176 0.176
5862
5863 [1] ftbench -t 5 -p -s 14 -b a -f 0008 Arial.ttf
5864 [2] ftbench -t 5 -p -s 14 -b a -r 1 -f 0028 Arial.ttf
5865 [3] ftbench -t 5 -p -s 14 -b a -f 000a Arial.ttf
5866 [4] ftbench -t 5 -p -s 14 -b b -f 0008 Arial.ttf
5867
5868 * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h
5869 (FT_MULFIX_ASSEMBLER): Fix handling for ARMv7.
5870
Werner Lemberge12fc772013-06-28 07:57:32 +020058712013-06-28 Werner Lemberg <wl@gnu.org>
5872
5873 * docs/CHANGES: Updated.
5874
Werner Lemberg680c1d42013-06-27 17:21:59 +020058752013-06-27 Werner Lemberg <wl@gnu.org>
5876
5877 * src/winfonts/winfnt.c (FNT_Load_Glyph): Fix bitmap width guard.
5878
Werner Lembergc7cc9eb2013-06-25 07:24:02 +020058792013-06-25 Werner Lemberg <wl@gnu.org>
5880
Werner Lembergb8850fc2013-06-26 12:22:10 +02005881 [cff] Add darkening limit to `darkening-parameters'.
5882
5883 * src/cff/cffdrivr.c (cff_property_set): Add check.
5884
58852013-06-25 Werner Lemberg <wl@gnu.org>
5886
Werner Lemberg89ca1fd2013-06-25 23:28:02 +02005887 [cff] Add `darkening-parameters' property.
5888
5889 * include/freetype/ftcffdrv.h: Document it.
5890
5891 * src/cff/cffdrivr.c (cff_property_set, cff_property_get): Handle
5892 `darkening-parameters' property.
5893
5894 * src/cff/cf2font.h (CF2_FontRec): Add `darkenParams' array.
5895
5896 * src/cff/cf2font.c (cf2_computeDarkening): Add `darkenParams'
5897 argument and use it.
5898 Update all callers.
5899
5900 * src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Copy
5901 `darken_params' values.
5902
5903 * src/cff/cffobjs.h (CFF_DriverRec): Add `darken_params' array.
5904
5905 * src/cff/cffobjs.c (cff_driver_init): Set default values for
5906 `darken_params'.
5907
59082013-06-25 Werner Lemberg <wl@gnu.org>
5909
Werner Lembergfad93262013-06-25 10:41:37 +02005910 [docmaker] Code shuffling.
5911
5912 * src/tools/docmaker/tohtml.py (re_url): Move regexp...
5913 * src/tools/docmaker/sources.py: ... to this file.
5914
59152013-06-25 Werner Lemberg <wl@gnu.org>
5916
Werner Lemberg8bdc4072013-06-25 10:20:53 +02005917 [docmaker] Remove unused functions.
5918
5919 * src/tools/docmaker/content.py (DocMarkup.get_start,
5920 DocBlock.get_markup_name): Removed.
5921 * src/tools/docmaker/tohtml.py (html_quote0, dump_html_code,
5922 HtmlFormatter.make_html_words): Removed.
5923
59242013-06-25 Werner Lemberg <wl@gnu.org>
5925
Werner Lembergffb8b472013-06-25 09:09:30 +02005926 * builds/freetype.mk (dll): Remove target.
5927
5928 Problem reported by Jörg Günnewig <joerg.guennewig@googlemail.com>.
5929
59302013-06-25 Werner Lemberg <wl@gnu.org>
5931
Werner Lembergc7cc9eb2013-06-25 07:24:02 +02005932 [docmaker] Recognise URLs.
5933
5934 * src/tools/docmaker/tohtml.py (re_url): New regular expression.
5935 (make_html_para): Use it.
5936
Werner Lemberg25b7da52013-06-19 10:23:36 +020059372013-06-19 Werner Lemberg <wl@gnu.org>
5938
Werner Lembergfe4f5712013-06-19 23:27:47 +02005939 * Version 2.5.0.1 released.
5940 ===========================
5941
5942
5943 Tag sources with `VER-2-5-0-1'.
5944
5945 * include/freetype/config/ftoption.h: Undefine
5946 CFF_CONFIG_OPTION_OLD_ENGINE.
5947 * devel/ftoption.h: Define CFF_CONFIG_OPTION_OLD_ENGINE.
5948
59492013-06-19 Werner Lemberg <wl@gnu.org>
5950
Werner Lemberg609f0ca2013-06-19 14:41:47 +02005951 * builds/unix/install.mk (install): Don't create `cache' directory.
5952
5953 Found by Peter Breitenlohner <peb@mppmu.mpg.de>.
5954
59552013-06-19 Werner Lemberg <wl@gnu.org>
5956
Werner Lemberg25b7da52013-06-19 10:23:36 +02005957 * Version 2.5.0 released.
5958 =========================
5959
5960
5961 Tag sources with `VER-2-5-0'.
5962
5963 * docs/VERSION.DLL: Update documentation and bump version number to
5964 2.5.0.
5965
5966 * README, Jamfile (RefDoc),
5967 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
5968 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
5969 builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
5970 builds/win32/visualc/freetype.dsp,
5971 builds/win32/visualc/freetype.vcproj,
5972 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
5973 builds/win32/visualce/freetype.vcproj,
5974 builds/win32/visualce/index.html,
5975 builds/wince/vc2005-ce/freetype.vcproj,
5976 builds/wince/vc2005-ce/index.html,
5977 builds/wince/vc2008-ce/freetype.vcproj,
5978 builds/wince/vc2008-ce/index.html: s/2.4.12/2.5.0/, s/2412/250/.
5979
5980 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 5.
5981 (FREETYPE_PATCH): Set to 0.
5982
5983 * builds/unix/configure.raw (version_info): Set to 16:2:10.
5984
5985 * src/base/ftobjs.c (FT_Open_Face): Pacify compiler.
5986 * src/truetype/ttinterp.c (Ins_MSIRP, Ins_MIRP): Ditto.
5987
Werner Lembergf56691a2013-06-18 10:17:48 +020059882013-06-18 Werner Lemberg <wl@gnu.org>
5989
5990 Fix Savannah bug #39269.
5991
5992 * src/base/ftgloadr.c (FT_GlyphLoader_CheckPoints): Free memory in
5993 case of reacollocation failures.
5994
Andrew Church67cf7a82013-06-18 09:35:34 +020059952013-06-18 Andrew Church <achurch+savannah@achurch.org>
5996
5997 Fix Savannah bug #39266.
5998
5999 If memory allocations fail at certain points while opening a font,
6000 FreeType can either crash due to a NULL dereference or leak memory.
6001
6002 * include/freetype/internal/ftobjs.c (FT_Face_InternalRec,
6003 FT_LibraryRec): Make `refcount' a signed integer. If, for example,
6004 FT_Open_Face() fails in a memory allocation before the face's
6005 reference count is set to 1, a subsequent `FT_Done_Library' call
6006 would otherwise loop over `FT_Done_Face' 2^32 times before freeing
6007 the face.
6008
6009 * src/base/ftobjs.c (open_face): Initialize `stream' and friends
6010 earlier.
6011 (FT_Open_Face) <Fail>: Behave correctly if `node' is NULL.
6012 (FT_Destroy_Module) <Fail>: Check that `renderer_clazz' is valid.
6013
60142013-06-14 Werner Lemberg <wl@gnu.org>
Werner Lembergd7e34442013-06-14 18:33:39 +02006015
6016 * src/smooth/ftgrays.c One final pragma to silence 64-bit MSVC.
6017
Dave Arnoldcb23a622013-06-13 07:46:32 +020060182013-06-06 Dave Arnold <darnold@adobe.com>
6019 Werner Lemberg <wl@gnu.org>
6020
6021 [cff] Add code to Adobe's engine to handle ppem > 2000.
6022
6023 * src/cff/cffgload.c (cff_slot_load): If we get
6024 FT_Err_Glyph_Too_Big, retry unhinted and scale up later on.
6025
Andrew Church67cf7a82013-06-18 09:35:34 +020060262013-06-12 Werner Lemberg <wl@gnu.org>
Werner Lemberg25b6e602013-06-12 11:06:34 +02006027
Werner Lemberg294ce112013-06-12 23:33:11 +02006028 Another try on pragmas.
6029
6030 * include/freetype/internal/ftdebug.h: Move pragmas to...
6031 * include/freetype/internal/internal.h: ... this file since it gets
6032 included by all source files.
6033 * include/freetype/internal/ftserv.h: Remove pragma which has no
6034 effect.
6035
Dave Arnoldcb23a622013-06-13 07:46:32 +020060362013-06-12 Werner Lemberg <wl@gnu.org>
Werner Lemberg294ce112013-06-12 23:33:11 +02006037
Werner Lemberg25b6e602013-06-12 11:06:34 +02006038 * include/freetype/internal/ftdebug.h: Disable MSVC warning C4127.
6039
6040 This partially undoes commit 3f6e0e0c.
6041
Werner Lembergc06889e2013-06-12 10:58:06 +020060422013-06-12 Werner Lemberg <wl@gnu.org>
6043
6044 More compiler warning fixes.
6045
6046 */*: Use cast to `FT_Bool' (or `Bool') where appropriate.
6047
Werner Lemberg99e60d82013-06-10 01:44:37 +020060482013-06-10 Werner Lemberg <wl@gnu.org>
6049
Werner Lemberg5e094c62013-06-10 14:59:21 +02006050 [truetype] Improve handling of broken sbit advance widths.
6051
6052 * src/truetype/ttgload.c (TT_Load_Glyph): Use the glyph's (scaled)
6053 `linearHoriAdvance' if the sbit's `horiAdvance' value is zero.
6054
6055 Cf. font `Fixedsys Excelsior' v3.01 (FSEX300.ttf), glyph A, 16ppem.
6056
60572013-06-10 Werner Lemberg <wl@gnu.org>
6058
Werner Lemberga25ecfd2013-06-10 12:57:16 +02006059 [sfnt] Improve embedded bitmap tracing.
6060
6061 * src/base/ftobjs.c (FT_Request_Size): Move trace message regarding
6062 bitmap strike match to...
6063 (FT_Match_Size): This function.
6064
6065 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics,
6066 tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned,
6067 tt_sbit_decoder_load_compound, tt_sbit_decoder_load_png,
6068 tt_sbit_decoder_load_image): Decorate with tracing messages.
6069
60702013-06-10 Werner Lemberg <wl@gnu.org>
6071
Werner Lemberg99e60d82013-06-10 01:44:37 +02006072 Fix Savannah bug #39160.
6073
6074 * src/truetype/ttinterp.c (Ins_SDPVTL): Set projection vector too
6075 for the degenerate case.
6076
Werner Lemberg2ba871b2013-06-09 08:20:54 +020060772013-06-09 David Turner <digit@google.com>
6078
6079 * src/cache/ftcmanag.c (FTC_Manager_Reset): Add missing cache flush.
6080
6081 This code, present since eight(!) years in the unused `CACHE'
6082 branch, has been forgotten to apply to the master branch. It's
6083 really amazing that noone has ever complained since
6084 `FTC_Manager_Reset' is pretty useless without flushing the cache.
6085
Werner Lemberg85fd84b2013-06-07 17:10:21 +020060862013-06-07 Werner Lemberg <wl@gnu.org>
6087
Werner Lemberg3f6e0e02013-06-07 18:10:40 +02006088 Add and improve pragmas for MSVC compiler.
6089
6090 * include/freetype/internal/ftdebug.h: Remove pragmas.
6091 * include/freetype/internal/ftserv.h: Use push and pop for pragmas.
6092 * include/freetype/internal/ftvalid.h: Handle warning C4324.
6093 * src/base/ftobjs.c: Use push and pop for pragmas.
6094 * src/gzip/ftgzip.c: Handle warning C4244.
6095
60962013-06-07 Werner Lemberg <wl@gnu.org>
6097
Werner Lemberg85fd84b2013-06-07 17:10:21 +02006098 [cff] s/cf2_getGlyphWidth/cf2_getGlyphOutline/.
6099
6100 * src/cff/cf2font.c, src/cff/cf2font.h, src/cff/cf2ft.c: Do it.
6101
Werner Lemberg4447b2c2013-06-06 21:28:36 +020061022013-06-06 Dave Arnold <darnold@adobe.com>
6103
6104 [cff] Add early exit feature for width-only calls.
6105
6106 This is for `FT_Get_Advance'.
6107
6108 There are 7 places where the spec says the width can be defined:
6109
6110 hstem/hstemhm
6111 vstem/vstemhm
6112 cntrmask/hintmask
6113 hmoveto
6114 vmoveto
6115 rmoveto
6116 endchar
6117
6118 * src/cff/cf2intrp.c (cf2_doStems): Exit early for width-only calls,
6119 if possible.
6120
6121 (cf2_interpT2CharString) <cf2_cmdHSTEM>, <cf2_cmdVSTEM>,
6122 <cf2_cmdVMOVETO>, <cf2_cmdENDCHAR>, <cf2_cmdHINTMASK>,
6123 <cf2_cmdRMOVETO>, <cf2_cmdHMOVETO>: Exit early for width-only calls.
6124
Werner Lembergbadf3172013-06-06 09:16:38 +020061252013-06-06 Werner Lemberg <wl@gnu.org>
6126
6127 Next round of compiler fixes.
6128
6129 * builds/win32/ftdebug.c, builds/wince/ftdebug.c (ft_debug_init):
6130 Add proper cast.
6131
6132 * include/freetype/internal/ftserv.h (FT_SERVICE_UNAVAILABLE): Fix
6133 cast.
6134 * include/freetype/internal/ftstream.h: Decorate stream and frame
6135 macros with `FT_Long' and `FT_ULong' as appropriate.
6136
6137 * src/base/ftrfork.c (raccess_guess_darwin_hfsplus,
6138 raccess_guess_darwin_newvfs): Use cast.
6139
6140 * src/bdf/bdflib.c (_bdf_set_default_spacing): Use cast.
6141
6142 * src/cache/ftcmanag.c (FTC_Manager_Check): Fix cast.
6143 * src/cache/ftcmanag.h (FTC_ManagerRec): Ditto.
6144
6145 * src/cff/cf2arrst.c (cf2_arrstack_setNum_Elements): Use cast.
6146 * src/cff/cf2ft.c (cf2_freeSeacComponent): Ditto.
6147 * src/cff/cffobjs.c (remove_subset_prefix, remove_style): Ditto.
6148
6149 * src/cid/cidparse.c (cid_parser_new): Use cast.
6150
6151 * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Use cast.
6152
6153 * src/psaux/psobjs.c (reallocate_t1_table): Fix argument type.
6154
6155 * src/raster/ftraster.c (ft_black_reset): Use cast.
6156
6157 * src/truetype/ttgxvar.c (FT_Stream_FTell): Use cast.
6158 (ALL_POINTS): Fix cast.
6159
6160 * src/type1/t1driver.c (t1_ps_get_font_value): Add casts.
6161 * src/type1/t1parse.c (T1_Get_Private_Dict): Add cast.
6162
Dave Arnoldc3782492013-06-05 19:57:55 +020061632013-06-05 Dave Arnold <darnold@adobe.com>
6164
6165 Fix more MSVC Win32 compiler warnings.
6166
6167 * src/base/ftobjs.c: Fix typo in MS pragma.
6168
6169 * src/base/bdflib.c (_bdf_set_default_spacing, _bdf_add_property):
6170 `lineno' is only used in debug mode.
6171
6172 * src/cff/cf2ft.c (cf2_builder_moveTo): `params' is only used in
6173 debug mode.
6174
Werner Lemberg45392b72013-06-05 13:43:20 +020061752013-06-05 Werner Lemberg <wl@gnu.org>
6176
6177 Fix compiler warnings.
6178
6179 * include/freetype/internal/ftmemory.h: Decorate memory allocation
6180 macros with `FT_Long' where appropriate.
6181 Remove duplicate of FT_MEM_QRENEW_ARRAY definition.
6182
6183 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Use
6184 cast.
6185
6186 * src/base/ftobjs.c: Add warning disabling pragma for MSVC while
6187 including `md5.c'.
6188
6189 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdESC>: Add
6190 cast.
6191
6192 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_compound): Fix casts.
6193 (tt_sbit_decoder_load_bitmap): Beautification.
6194
6195 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Initialize
6196 variables (earlier).
6197
6198 * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Pacify compiler.
6199
6200 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Use unsigned constants
6201 where appropriate.
6202
6203 * src/type1/t1load.c (T1_Get_MM_Var): Ditto.
6204
Werner Lembergdc624ca2013-06-04 10:30:48 +020062052013-06-04 Werner Lemberg <wl@gnu.org>
6206
Werner Lembergd9634982013-06-04 20:18:57 +02006207 * src/cff/cf2font.c (cf2_getGlyphWidth): Initialize `advWidth'.
6208
6209 Problem reported by Ingmar Sittl <ingmar.sittl@elektrobit.com>.
6210
62112013-06-04 Werner Lemberg <wl@gnu.org>
6212
Werner Lembergdc624ca2013-06-04 10:30:48 +02006213 Apply fixes for cppcheck nitpicks.
6214
6215 http://cppcheck.sourceforge.net/
6216
Werner Lemberg8d8508e2013-06-04 13:09:01 +02006217 The call was (from the top-level of the FreeType tree):
6218
6219 cppcheck --force \
6220 --enable=all \
6221 -I include \
6222 -I include/freetype/ \
6223 -I include/freetype/config/ \
6224 -I include/freetype/internal/ \
6225 . &> cppcheck.log
6226
Werner Lembergdc624ca2013-06-04 10:30:48 +02006227 Note that the current version heavily chokes on FreeType, delivering
Werner Lemberg8d8508e2013-06-04 13:09:01 +02006228 many wrong results. I will report those issues to the cppcheck team
Werner Lembergdc624ca2013-06-04 10:30:48 +02006229 so that a newer version gives improved results hopefully.
6230
6231 */* Improve variable scopes.
6232 */* Remove redundant initializations which get overwritten.
6233
Werner Lemberge8ed2d62013-08-01 12:20:20 +02006234 * src/base/ftmac.c, builds/mac/ftmac.c (count_faces_scalable):
Werner Lembergdc624ca2013-06-04 10:30:48 +02006235 Remove unused variable.
6236
6237 * src/base/ftdbgmem.c (ft_mem_table_destroy): `table' can't be zero.
6238
6239 * src/gxvalid/gxvkern.c (gxv_kern_subtable_fmt1_entry_validate):
6240 Remove functionless code.
6241
6242 * src/tools/ftrandom.c (main): Fix memory leak.
6243
Werner Lemberg2429dc32013-06-03 12:41:58 +020062442013-06-03 Werner Lemberg <wl@gnu.org>
6245
6246 Add CFF_CONFIG_OPTION_OLD_ENGINE configuration option.
6247
6248 This controls whether the old FreeType CFF engine gets compiled into
6249 FreeType. It is now disabled by default.
6250
6251 * devel/ftoption.h, include/freetype/config/ftoption.h
6252 (CFF_CONFIG_OPTION_OLD_ENGINE): New macro.
6253
6254 * src/cff/cffdrivr.c (cff_property_set), src/cff/cffgload.c
6255 (CFF_Operator, cff_argument_counts, cff_builder_add_point,
6256 cff_operator_seac, cff_decoder_parse_charstrings, cff_slot_load),
6257 src/cff/cffgload.h, src/cff/cffobjs.c (cff_driver_init): Use
6258 CFF_CONFIG_OPTION_OLD_ENGINE to guard the affected code.
6259
6260 * docs/CHANGES: Updated.
6261
Werner Lembergf9cceeb2013-06-02 23:38:13 +020062622013-06-02 Werner Lemberg <wl@gnu.org>
6263
6264 Fix PNG library handling.
6265
6266 * builds/unix/configure.raw: Don't use LIBPNG_LIBS but
6267 LIBPNG_LDFLAGS.
6268
Behdad Esfahbod760d3422013-05-29 11:36:18 +020062692013-05-23 Behdad Esfahbod <behdad@google.com>
6270
6271 Add support for color embedded bitmaps (eg. color emoji).
6272
6273 A new load flag, FT_LOAD_COLOR, makes FreeType load color
6274 embedded-bitmaps, following this draft specification
6275
6276 https://color-emoji.googlecode.com/git/specification/v1.html
6277
6278 which defines two new SFNT tables, `CBDT' and `CBLC' (named and
6279 modeled after `EBDT' and `EBLC', respectively). The color bitmaps
6280 are stored in the new FT_PIXEL_MODE_BGRA format to represent BGRA
6281 pre-multiplied sRGB images. If PNG support is available, PNG color
6282 images as defined in the same proposed specification are supported
6283 also.
6284
6285 Note that color bitmaps are converted to grayscale if client didn't
6286 ask for color.
6287
6288 * builds/unix/configure.raw: Search for libpng.
6289 Add `--without-png' option.
6290
6291 * devel/ftoption.h, include/freetype/config/ftoption.h
6292 (FT_CONFIG_OPTION_USE_PNG): New macro.
6293
6294 * include/freetype/freetype.h (FT_LOAD_COLOR): New load flag.
6295
6296 * include/freetype/ftimage.h (FT_Pixel_Mode): Add
6297 `FT_PIXEL_MODE_BGRA'.
6298
6299 * include/freetype/tttags.h (TTAG_CBDT, TTAG_CBLC): New tags.
6300
6301 * src/base/ftbitmap.c (FT_Bitmap_Embolden): Updated.
6302 (ft_gray_for_premultiplied_srgb_bgra): New function.
6303 (FT_Bitmap_Convert): Handle FT_PIXEL_MODE_BGRA.
6304
6305 * src/sfnt/pngshim.c, src/sfnt/pngshim.h: New files.
6306
6307 * src/sfnt/sfnt.c: Include `pngshim.c'.
6308
6309 * src/sfnt/ttsbit.c: Include FT_BITMAP_H and `pngshim.h'
6310 (tt_face_load_eblc): Load `CBLC'.
6311 (tt_sbit_decoder_init): Load `CBDT'.
6312 (tt_sbit_decoder_alloc_bitmap): Pass load flags to select between
6313 color and grayscale bitmaps.
6314 Set `num_grays'. This is used by `ftview' to choose the blending
6315 algorithm.
6316 (tt_sbit_decoder_load_byte_aligned,
6317 tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_compound,
6318 tt_sbit_decoder_load_image): Pass load flag.
6319 s/write/pwrite/.
6320 Don't call `tt_sbit_decoder_alloc_bitmap'.
6321 Updated.
6322 (tt_sbit_decoder_load_png) [FT_CONFIG_OPTION_USE_PNG]: New function.
6323 (tt_sbit_decoder_load_bitmap): Pass load flag.
6324 Handle new glyph formats 17, 18, and 19.
6325 Call `tt_sbit_decoder_alloc_bitmap'.
6326 Flatten color bitmaps if necessary.
6327 (tt_face_load_sbit_image): Updated.
6328
6329 * src/sfnt/rules.mk (SFNT_DRV_SRC): Add `pngshim.c'.
6330
6331 * docs/CHANGES: Updated.
6332
Guenter41e44802013-05-24 11:38:09 +020063332013-05-24 Guenter <info@gknw.net>
6334
6335 Apply Savannah patch #8055.
6336
6337 Make `apinames' create an import file for NetWare.
6338
6339 * src/tools/apinames.c (PROGRAM_VERSION): Set to 0.2.
6340 (OutputFormat): Add `OUTPUT_NETWARE_IMP'.
6341 (names_dump): Handle it.
6342 (usage): Updated.
6343 (main): Handle new command line flag `-wN'.
6344
Behdad Esfahbod2d6e1fb2013-05-23 08:01:20 +020063452013-05-23 Behdad Esfahbod <behdad@behdad.org>
6346
6347 Compilation fix.
6348
6349 * src/truetype/ttinterp.c (TT_RunIns)
6350 [!TT_CONFIG_OPTION_SUBPIXEL_HINTING]: Make it work.
6351
Infinality18f35ed2013-05-21 20:51:15 -050063522013-05-22 Infinality <infinality@infinality.net>
6353
Infinality3c783c12013-05-21 21:03:00 -05006354 [truetype] Formatting and an additional subpixel tweak.
6355
6356 * src/truetype/ttinterp.c (Ins_SHPIX): Formatting fix.
6357 * src/truetype/ttsubpix.c (SKIP_NONPIXEL_Y_MOVES_Rules):
6358 Revert previous modification for Verdana clones.
6359
63602013-05-22 Infinality <infinality@infinality.net>
6361
Infinality18f35ed2013-05-21 20:51:15 -05006362 [truetype] Adjust subpixel zp2 moves and tweak rules.
6363
6364 These modifications fix thin diagonal stems in some legacy fonts.
6365
6366 * src/truetype/ttinterp.c (Direct_Move_X): Remove unused macro.
6367 (Move_Zp2_Point): Don't always disable x moves for subpixel rendering.
6368 (Ins_SHP): Disable x moves here for subpixel rendering.
6369 (Ins_SHPIX): Only disable x moves in compatibility mode.
6370 Split out zp2 move reversals and reorder conditional respectively.
6371
6372 * src/truetype/ttsubpix.c (SKIP_NONPIXEL_Y_MOVES_Rules): Fix oversight.
6373 Only adjust Verdana clones for 17 ppem.
6374 (SKIP_NONPIXEL_Y_MOVES_Rules_Exceptions): Add Courier New.
6375 (ALWAYS_SKIP_DELTAP_Rules): Found additional cases for Arial `s'.
6376
Infinality63bfa832013-05-20 07:38:21 +020063772013-05-20 Infinality <infinality@infinality.net>
6378
6379 [truetype] Simplify and improve subpixel function detection.
6380
6381 Some small enhancements have allowed the removal of many macros and
6382 the simplification of existing rules in `ttsubpix.c'.
6383
6384 * src/truetype/ttsubpix.h (SPH_TWEAK_ALLOW_X_DMOVEX,
6385 SPH_TWEAK_ALLOW_X_MOVE_ZP2,
6386 SPH_TWEAK_DELTAP_SKIP_EXAGGERATED_VALUES,
6387 SPH_TWEAK_SKIP_INLINE_DELTAS, SPH_TWEAK_MIRP_CVT_ZERO): Removed.
6388 (SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES_DELTAP): New rule macro.
6389
6390 * src/truetype/ttsubpix.c: Updated affected rules.
6391
6392 * src/truetype/ttinterp.c (Direct_Move_X): Updated.
6393 (INS_FDEF): Add additional function detection.
6394 (INS_ENDF): Set runtime flag.
6395 (Ins_CALL): Skip the call under certain conditions.
6396 Remove bad code.
6397 (Ins_LOOPCALL): Skip the call under certain conditions.
6398 Remove bad code.
6399 (Move_Zp2_Point): Updated.
6400 (Ins_SHPIX): Updated.
6401 Skip the move under some situations.
6402 (Ins_MIAP): Improve conditions.
6403 (Ins_MIRP): Updated.
6404 (Ins_DELTAP): Skip move under certain conditions.
6405 Simplify conditions.
6406 (TT_RunIns): Updated.
6407 Add code to handle new function detection.
6408 Trace messages.
6409
Werner Lembergfd664692013-05-17 17:40:27 +020064102013-05-17 Werner Lemberg <wl@gnu.org>
6411
6412 Update more FT_Err_XXX macros using FT_ERR and FT_THROW;
6413
6414 * builds/amiga/src/base/ftsystem.c, builds/mac/ftmac.c,
6415 builds/unix/ftsystem.c, builds/vms/ftsystem.c: Do it.
6416
Werner Lembergf04951a2013-05-17 13:51:07 +020064172013-05-15 Werner Lemberg <wl@gnu.org>
6418
6419 [truetype] Add `interpreter-version' property.
6420
6421 This makes the option TT_CONFIG_OPTION_SUBPIXEL_HINTING controllable
6422 at runtime.
6423
Werner Lemberg27991332013-05-17 14:00:26 +02006424 * include/freetype/ftttdrv.h: New file.
6425
6426 * include/freetype/config/ftheader.h (FT_TRUETYPE_DRIVER_H): New
6427 macro.
6428
Werner Lembergf04951a2013-05-17 13:51:07 +02006429 * src/truetype/ttdriver.c: Include FT_TRUETYPE_DRIVER_H.
6430 (tt_property_set, tt_property_get): Fill templates.
6431
6432 * src/truetype/ttobjs.h (TT_DriverRec): Add `interpreter_version'
6433 member.
6434 Remove unused `extension_component' member.
6435
6436 * src/truetype/ttgload.c: Include FT_TRUETYPE_DRIVER_H.
6437 (tt_get_metrics, TT_Hint_Glyph, TT_Process_Simple_Glyph,
6438 compute_glyph_metrics, tt_loader_init): Use `interpreter_version'.
6439
6440 * src/truetype/ttinterp.c: Include FT_TRUETYPE_DRIVER_H.
6441 (SUBPIXEL_HINTING): New macro to check `interpreter_version' flag.
6442 Update all affected functions to use it.
6443 Use TT_INTERPRETER_VERSION_XXX where appropriate.
6444
6445 * src/truetype/ttobjs.c: Include FT_TRUETYPE_DRIVER_H.
6446 (tt_driver_init): Initialize `interpreter_version'.
6447
6448 * src/truetype/ttsubpix.c: Include FT_TRUETYPE_DRIVER_H.
6449 Use TT_INTERPRETER_VERSION_XXX where appropriate.
6450
Werner Lemberg7441dd82013-05-13 09:12:46 +020064512013-05-13 Werner Lemberg <wl@gnu.org>
6452
Werner Lemberg6650be72013-05-13 10:05:29 +02006453 [truetype] Avoid empty source file.
6454
6455 * src/truetype/ttsubpix.c [!TT_CONFIG_OPTION_SUBPIXEL_HINTING]:
6456 Provide dummy typedef.
6457
64582013-05-13 Werner Lemberg <wl@gnu.org>
6459
Werner Lemberg7441dd82013-05-13 09:12:46 +02006460 * src/cff/cf2font.c (cf2_getGlyphWidth): Fix uninitialized variable.
6461
6462 Fix suggested by Vaibhav Nagarnaik <vnagarnaik@gmail.com>.
6463
Brian Nixon8d6025c2013-05-13 09:06:42 +020064642013-05-13 Brian Nixon <bnixon@yahoo.com>
6465
6466 Fix Savannah bug #38970.
6467
6468 * src/base/ftdebug.c, builds/win32/ftdebug.c,
6469 builds/wince/ftdebug.c, builds/amiga/src/base/ftdebug.c
6470 (ft_debug_init): Don't read past the environment variable FT2_DEBUG.
6471
Werner Lembergd51ac9c2013-05-12 06:00:27 +020064722013-05-12 Werner Lemberg <wl@gnu.org>
6473
Werner Lembergcd888752013-05-12 15:08:57 +02006474 [truetype] Add framework for TrueType properties.
6475
6476 * src/truetype/ttdrivr.c: Include FT_SERVICE_PROPERTIES_H.
6477 (tt_property_set, tt_property_get): New functions, still empty.
6478 Define `tt_service_properties' service.
6479 Update `tt_services'.
6480
6481 * src/truetype/ttpic.h: Include FT_SERVICE_PROPERTIES_H.
6482 (TT_SERVICE_PROPERTIES_GET): New macro.
6483 (TTModulePIC): Add `tt_service_properties'.
6484
64852013-05-12 Werner Lemberg <wl@gnu.org>
6486
Werner Lembergb112fa42013-05-12 07:29:04 +02006487 Fix Savannah bug #38967.
6488
6489 * src/base/ftcalc.c (FT_DivFix) [FT_LONG64]: Fix cast.
6490
64912013-05-12 Werner Lemberg <wl@gnu.org>
6492
Werner Lembergcbcf33d2013-05-12 07:27:48 +02006493 Introduce unsigned 64bit type (if available).
6494
6495 * include/freetype/config/ftconfig.h: Define FT_UINT64 if available.
6496 [FT_LONG64]: Provide FT_UInt64.
6497
6498 * builds/unix/ftconfig.in: Synchronized.
6499
65002013-05-12 Werner Lemberg <wl@gnu.org>
6501
Werner Lembergd51ac9c2013-05-12 06:00:27 +02006502 Fix Savannah bug #38968.
6503
6504 * include/freetype/ftmodapi.h: Add `FT_EXPORT' to
6505 FT_Property_{Set,Get}.
6506 * src/base/ftobjs.c: Add `FT_EXPORT_DEF' to
6507 FT_Property_{Set,Get}.
6508
Werner Lembergf6aa0892013-05-10 07:58:47 +020065092013-05-10 Werner Lemberg <wl@gnu.org>
6510
Werner Lembergea2b4752013-05-10 08:04:33 +02006511 [sfnt] Clean up bitmap code.
6512
6513 * src/sfnt/ttsbit.c: Deleted.
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02006514 * src/sfnt/ttsbit0.c: Renamed to `ttsbit.c'.
Werner Lembergea2b4752013-05-10 08:04:33 +02006515 * rules.mk (SFNT_DRV_H): Updated.
6516
65172013-05-10 Werner Lemberg <wl@gnu.org>
6518
Werner Lembergf6aa0892013-05-10 07:58:47 +02006519 */* [FT_CONFIG_OPTION_OLD_INTERNALS]: Remove macro and guarded code.
6520
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00006521----------------------------------------------------------------------------
6522
Werner Lembergf57fc592015-01-17 20:41:43 +01006523Copyright 2013-2015 by
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00006524David Turner, Robert Wilhelm, and Werner Lemberg.
6525
6526This file is part of the FreeType project, and may only be used, modified,
6527and distributed under the terms of the FreeType project license,
6528LICENSE.TXT. By continuing to use, modify, or distribute this file you
6529indicate that you have read the license and understand and accept it
6530fully.
6531
6532
6533Local Variables:
6534version-control: never
Werner Lemberg4e03fe72006-04-29 06:20:09 +00006535coding: utf-8
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00006536End: