blob: 985a889fb8b47ba0e37dc5fa23e23dc9731b1121 [file] [log] [blame]
Alexei Podtelezhnikov67b912d2015-04-03 22:38:11 -040012015-04-03 Alexei Podtelezhnikov <apodtele@gmail.com>
2
3 * src/autofit/afhints.c (af_glyph_hints_reload): Use do-while loop.
4
Alexei Podtelezhnikov770b5d02015-04-02 23:15:36 -040052015-04-02 Alexei Podtelezhnikov <apodtele@gmail.com>
6
7 * src/autofit/aflatin.c (af_latin_hint_edges): Reduce logic.
8
92015-04-01 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov886f4d02015-04-01 22:57:43 -040010
11 [autofit] Finish the thought.
12
13 * src/autofit/afhints.c (af_direction_compute): make sure the long arm
14 is never negative so that its `FT_ABS' is not necessary.
15
Werner Lemberg16217e52015-04-01 13:13:56 +0200162015-04-01 Werner Lemberg <wl@gnu.org>
17
Werner Lemberga2fa6572015-04-01 15:55:41 +020018 [autofit] Call dumper functions for tracing.
19
20 * src/autofit/afcjk.c (af_cjk_hints_apply): Remove dead code.
21 * src/autofit/afhints.c (af_glyph_hints_dump_points): Minor
22 improvement.
23 * src/autofit/afmodule.c (af_autofitter_load_glyph): Implement it.
24
252015-04-01 Werner Lemberg <wl@gnu.org>
26
Werner Lembergdb8df792015-04-01 13:30:55 +020027 [autofit] Make debugging stuff work again.
28
29 The interface to ftgrid was broken in the series of commits starting
30 with
31
32 [autofit] Allocate AF_Loader on the stack instead of AF_Module.
33
34 from 2015-01-14.
35
36 * src/autofit/afmodule.c (_af_debug_hints_rec) [FT_DEBUG_AUTOFIT]:
37 Use a global AF_GlyphHintsRec object for debugging.
38 (af_autofitter_done, af_autofitter_load_glyph): Updated.
39
40 * src/autofit/afloader.c (af_loader_init, af_loader_done): Updated.
41
422015-04-01 Werner Lemberg <wl@gnu.org>
43
Werner Lemberg16217e52015-04-01 13:13:56 +020044 * src/autofit/afhints.c (af_glyph_hints_done): Fix minor thinko.
45
Werner Lemberg10e2bb82015-03-29 13:32:47 +0200462015-03-29 Werner Lemberg <wl@gnu.org>
47
Werner Lembergf353a382015-03-29 14:47:49 +020048 [cff] Fix Savannah bug #44629.
49
50 * src/cff/cf2font.h (CF2_MAX_SUBR), src/cff/cffgload.h
51 (CFF_MAX_SUBRS_CALLS): Set to 16.
52
532015-03-29 Werner Lemberg <wl@gnu.org>
54
Werner Lemberg10e2bb82015-03-29 13:32:47 +020055 [type1, truetype] Make the MM API more flexible w.r.t. `num_coords'.
56
57 This commit allows `num_coords' to be larger or smaller than the
58 number of available axes while selecting a design instance, either
59 ignoring excess data or using defaults if data is missing.
60
61 * src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design):
62 Implement it.
63
64 * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design,
65 T1_Set_Var_Design): Ditto.
66
672015-03-29 Werner Lemberg <wl@gnu.org>
Werner Lemberg8ce30262015-03-27 08:33:47 +010068
Werner Lembergdd5d6d72015-03-29 10:04:22 +020069 [type1] Minor.
70
71 * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design): Use
72 FT_THROW.
73 (T1_Set_Var_Design): Use T1_MAX_MM_AXIS and FT_THROW.
74
752015-03-27 Werner Lemberg <wl@gnu.org>
76
Werner Lemberg8ce30262015-03-27 08:33:47 +010077 [cff] Trace charstring nesting levels.
78
79 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdCALLGSUBR,
80 cf2_cmdCALLSUBR, cf2_cmdRETURN>: Implement it.
81
82 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
83 <cff_op_callsubr, cff_op_callgsubr, cff_op_return>: Ditto.
84
Alexei Podtelezhnikovdac56442015-03-21 23:30:16 -0400852015-03-21 Alexei Podtelezhnikov <apodtele@gmail.com>
86
87 [base] Optimize `FT_Angle_Diff'.
88
89 Under normal circumstances we are usually close to the desired range
90 of angle values, so that the remainder is not really necessary.
91
92 * src/base/fttrigon.c (FT_Angle_Diff): Use loops instead of remainder.
93
94 * src/autofit/aftypes.h (AF_ANGLE_DIFF): Ditto in the unused macro.
95
Werner Lemberg6cc425d2015-03-21 06:51:07 +0100962015-03-21 Werner Lemberg <wl@gnu.org>
97
98 [truetype] Improve `gvar' handling.
99
100 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Correctly handle
101 single-element runs. Cf. glyph `Q' in Skia.ttf with weights larger
102 than the default.
103
Alexei Podtelezhnikov2d7284e2015-03-20 21:34:19 -04001042015-03-20 Alexei Podtelezhnikov <apodtele@gmail.com>
105
106 * src/base/fttrigon.c (FT_Vector_Rotate): Minor refactoring.
107
Alexei Podtelezhnikov6a171722015-03-17 22:43:08 -04001082015-03-17 Alexei Podtelezhnikov <apodtele@gmail.com>
109
110 Fix Savannah bug #44412 (part 2).
111
112 * src/base/fttrigon.c (FT_Sin, FT_Cos, FT_Tan): Call `FT_Vector_Unit'.
113
Werner Lemberg06339952015-03-11 06:30:23 +01001142015-03-11 Werner Lemberg <wl@gnu.org>
115
Werner Lembergd3284462015-03-11 16:45:58 +0100116 [autofit] Add support for Arabic script.
117
118 Thanks to Titus Nemeth <tn@tntypography.eu> for guidance!
119
120 * src/autofit/afblue.dat: Add blue zone data for Arabic.
121
122 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
123
124 * src/autofit/afscript.h: Add Arabic standard characters.
125
126 * src/autofit/afranges.c: Add Arabic data.
127
128 * src/autofit/afstyles.h: Add Arabic data.
129
130 * docs/CHANGES: Document it.
131
1322015-03-11 Werner Lemberg <wl@gnu.org>
133
Werner Lemberga4516382015-03-11 08:09:13 +0100134 Rename `svxf86nm.h' to `svfntfmt.h'; update related symbols.
135
136 * include/internal/ftserv.h (FT_SERVICE_XFREE86_NAME_H): Renamed
137 to...
138 (FT_SERVICE_FONT_FORMAT_H): This.
139
140 * include/internal/services/svfntfmt.h (FT_XF86_FORMAT_*): Renamed
141 to ...
142 (FT_FONT_FORMAT_*): This.
143
144 src/base/ftfntfmt.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c,
145 src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c,
146 src/truetype/ttdriver.c, src/type1/t1driver.c,
147 src/type42/t42drivr.c, src/winfonts/winfnt.c: Updated.
148
1492015-03-11 Werner Lemberg <wl@gnu.org>
150
Werner Lembergdd7028c2015-03-11 07:45:05 +0100151 [base] Rename `FT_XFREE86_H' to `FT_FONT_FORMATS_H'.
152
153 * include/config/ftheader.h: Implement it.
154 * src/base/ftfntfmt.c, docs/CHANGES: Updated.
155
1562015-03-11 Werner Lemberg <wl@gnu.org>
157
Werner Lembergf4d1c112015-03-11 07:32:58 +0100158 [base] Rename `FT_Get_X11_Font_Format' to `FT_Get_Font_Format'.
159
160 * include/ftfntfmt.h, src/base/ftfntfmt.c: Implement it.
161
162 * docs/CHANGES: Updated.
163
1642015-03-11 Werner Lemberg <wl@gnu.org>
165
Werner Lembergcb0f7b62015-03-11 06:51:27 +0100166 Fix automatic copyright updating.
167
168 * src/tools/update-copyright: Make scanning of `no-copyright'
169 actually work.
170
171 * src/tools/no-copyright: Don't include README in general.
172
1732015-03-11 Werner Lemberg <wl@gnu.org>
174
Werner Lemberg06339952015-03-11 06:30:23 +0100175 Rename `ftxf86.[ch]' to `ftfntfmt.[ch]'.
176
177 CMakeLists.txt, builds/amiga/makefile, builds/amiga/makefile.os4,
178 builds/amiga/smakefile, builds/mac/FreeType.m68k_cfm.make.txt,
179 builds/mac/FreeType.m68k_far.make.txt,
180 builds/mac/FreeType.ppc_carbon.make.txt,
181 builds/mac/FreeType.ppc_classic.make.txt, builds/symbian/bld.inf,
182 builds/symbian/freetype.mmp, builds/wince/vc2005-ce/freetype.vcproj,
183 builds/wince/vc2008-ce/freetype.vcproj,
184 builds/windows/vc2005/freetype.vcproj,
185 builds/windows/vc2008/freetype.vcproj,
186 builds/windows/vc2010/freetype.vcxproj,
187 builds/windows/vc2010/freetype.vcxproj.filters,
188 builds/windows/visualc/freetype.dsp,
189 builds/windows/visualc/freetype.vcproj,
190 builds/windows/visualce/freetype.dsp,
191 builds/windows/visualce/freetype.vcproj, docs/INSTALL.ANY,
192 include/config/ftheader.h, include/ftfntfmt.h, modules.cfg,
193 src/base/ftfntfmt.c, vms_make.com: Updated.
194
Alexei Podtelezhnikov6b832c82015-03-10 23:25:49 -04001952015-03-10 Alexei Podtelezhnikov <apodtele@gmail.com>
196
197 Fix Savannah bug #44412 (part 1).
198
199 * src/base/ftstroke.c (ft_stroker_inside): Handle near U-turns.
200
Werner Lembergeee7d8b2015-03-10 11:15:15 +01002012015-03-10 Werner Lemberg <wl@gnu.org>
202
203 [base] Rename `FT_Bitmap_New' to `FT_Bitmap_Init'.
204
205 * include/ftbitmap.h, src/base/ftbitmap.c: Implement it.
206 Update all callers.
207
208 * docs/CHANGES: Updated.
209
Werner Lemberg493cc032015-03-06 05:38:31 +01002102015-03-06 Werner Lemberg <wl@gnu.org>
211
212 * src/sfnt/ttload.c (tt_face_load_font_dir): Fix compiler warning.
213
214 Found by Alexei.
215
Alexei Podtelezhnikovdd7498d2015-03-05 22:51:36 -05002162015-03-05 Alexei Podtelezhnikov <apodtele@gmail.com>
217
218 * src/base/ftstroke.c: Simplify.
219
Werner Lemberg328b7922015-03-04 08:40:23 +01002202015-03-04 Werner Lemberg <wl@gnu.org>
221
222 [truetype] Some fixes and code refactoring in `ttgxvar.c'.
223
224 * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix return value
225 of `point_cnt' if two bytes are read.
226 Use a more vertical coding style.
227 (ft_var_readpackeddeltas): Use FT_UInt for `delta_cnt' parameter.
228 Use a more vertical coding style.
229
Werner Lemberga374c9c2015-03-03 11:23:45 +01002302015-03-03 Werner Lemberg <wl@gnu.org>
231
232 [autofit] Fix Savannah bug #44241.
233
234 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Reject glyphs
235 with less than 3 points.
236
Werner Lemberga07029e2015-03-02 06:54:08 +01002372015-03-02 Werner Lemberg <wl@gnu.org>
238
239 Simplify `TYPEOF' macro.
240
241 No need for two arguments.
242
243 * include/config/ftconfig.h, builds/unix/ftconfig.in,
244 builds/vms/ftconfig.h (TYPEOF): Updated.
245
246 * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
247 src/autofit/afwarp.h (AF_WARPER_FLOOR): Updated.
248
2492015-03-01 Werner Lemberg <wl@gnu.org>
Werner Lemberg4b9234b2015-02-25 06:31:43 +0100250
Werner Lemberg851e8152015-03-01 19:27:09 +0100251 Various compiler warning fixes for `make multi'.
252
253 * src/autofit/afcjk.c (af_cjk_hints_compute_blue_edges),
254 src/autofit/aflatin.c (af_latin_hint_compute_blue_edges,
255 af_latin_hint_edges), src/autofit/aflatin2.c
256 (af_latin2_hints_compute_blue_edges, af_latin2_hint_edges): Declare
257 as `static'.
258
259 * src/cache/ftccmap.c (FTC_CMAP_QUERY_HASH, FTC_CMAP_NODE_HASH):
260 Removed. Unused.
261 * src/cache/ftcimage.c: Include FT_INTERNAL_OBJECTS_H.
262 * src/cache/ftcmanag.c (FTC_LRU_GET_MANAGER): Removed. Unused.
263
264 * src/cff/cf2intrp.c: Include `cf2intrp.h'.
265 * src/cff/cffdrivr.c (PAIR_TAG): Removed. Unused.
266
267 * src/gzip/ftgzip.c (NO_DUMMY_DECL): Removed. Unused.
268
269 * src/psaux/afmparse.c (afm_parser_read_int): Declare as `static'.
270
271 * src/pshinter/pshalgo.c (STRONGER, PSH_ZONE_MIN, PSH_ZONE_MAX):
272 Removed. Unused.
273
274 * src/raster/ftraster.c (Render_Glyph): Declare as `static'.
275
276 * src/sfnt/ttpost.c (load_format_20): Fix signedness warning.
277
278 * src/truetype/ttdriver.c (PAIR_TAG): Removed. Unused.
279 * src/truetype/ttsubpix.c (is_member_of_family_class,
280 is_member_of_style_class): Declare as `static'.
281
282 * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Declare
283 as `static'.
284 * src/type1/t1load.c (mm_axis_unmap, mm_weights_unmap): Declare as
285 `static'.
286 (T1_FIELD_COUNT): Removed. Unused.
287 * src/type1/t1parse.h (T1_Done_Table): Removed. Unused.
288
289 * src/type42/t42parse.c (T1_Done_Table): Removed. Unused.
290
2912015-02-25 Werner Lemberg <wl@gnu.org>
292
Werner Lemberg04c22372015-02-25 11:20:20 +0100293 [psaux] Signedness fixes.
294
295 * include/internal/psaux.h, src/psaux/afmparse.c,
296 src/psaux/afmparse.h, src/psaux/psconv.c, src/psaux/psobjs.c,
297 src/psaux/t1cmap.c, src/psaux/t1decode.c: Apply.
298
2992015-02-25 Werner Lemberg <wl@gnu.org>
300
Werner Lembergd25ec162015-02-25 09:19:59 +0100301 [otvalid] Signedness fixes.
302
303 * src/otvalid/otvcommn.c, src/otvalid/otvgdef.c,
304 src/otvalid/otvgpos.c, src/otvalid/otvgsub.c, src/otvalid/otvmath.c:
305 Apply.
306
3072015-02-25 Werner Lemberg <wl@gnu.org>
308
Werner Lemberg5c9d9bf2015-02-25 08:13:40 +0100309 * src/bzip2/ftbzip2.c (ft_bzip2_alloc): Signedness fix.
310
3112015-02-25 Werner Lemberg <wl@gnu.org>
312
Werner Lemberg83d41812015-02-25 08:10:58 +0100313 [lzw] Signedness fixes.
314
315 * src/lzw/ftzopen.c, src/lzw/ftzopen.h: Apply.
316
3172015-02-25 Werner Lemberg <wl@gnu.org>
318
Werner Lemberg17b62912015-02-25 07:53:09 +0100319 [gxvalid] Signedness fixes.
320
321 * src/gxvalid/gxvbsln.c, src/gxvalid/gxvcommn.c,
322 src/gxvalid/gxvcommn.h, src/gxvalid/gxvjust.c,
323 src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmort.c,
324 src/gxvalid/gxvmort1.c, src/gxvalid/gxvmort2.c,
325 src/gxvalid/gxvmorx.c, src/gxvalid/gxvmorx1.c,
326 src/gxvalid/gxvmorx2.c, src/gxvalid/gxvopbd.c,
327 src/gxvalid/gxvprop.c, src/gxvalid/gxvtrak.c: Apply.
328
3292015-02-25 Werner Lemberg <wl@gnu.org>
330
Werner Lemberg24e4e962015-02-25 06:57:16 +0100331 [cache] Signedness fixes.
332
333 * src/cache/ftcbasic.c, src/cache/ftccmap.c, src/cache/ftcimage.c,
334 src/cache/ftcmanag.c, src/cache/ftcsbits.c: Apply.
335
3362015-02-25 Werner Lemberg <wl@gnu.org>
337
Werner Lemberg559727d2015-02-25 06:55:00 +0100338 Change dimension fields in `FTC_ImageTypeRec' to unsigned type.
339
340 This doesn't break ABI.
341
342 * include/ftcache.h (FTC_ImageTypeRec): Use unsigned types for
343 `width' and `height'.
344
345 * docs/CHANGES: Document it.
346
3472015-02-25 Werner Lemberg <wl@gnu.org>
348
Werner Lemberg4b9234b2015-02-25 06:31:43 +0100349 [cache] Don't use `labs'.
350
351 This is the only place in FreeType where this function was used.
352
353 * include/config/ftstdlib.h (ft_labs): Remove.
354
355 * src/cache/ftcimage.c (ftc_inode_weight): Replace `ft_labs' with
356 `FT_ABS'.
357
Werner Lemberg4d1f7af2015-02-23 07:04:36 +01003582015-02-23 Werner Lemberg <wl@gnu.org>
359
Werner Lemberg3aaebe32015-02-23 08:20:27 +0100360 [cache] Replace `FT_PtrDist' with `FT_Offset'.
361
362 * src/cache/ftccache.h (FTC_NodeRec): `FT_Offset' (a.k.a. `size_t')
363 is a better choice for `hash' to hold a pointer than `FT_PtrDist'
364 (a.k.a. `ptrdiff_t'), especially since the latter is signed,
365 causing zillions of signedness warnings. [Note that `hash' was of
Werner Lemberg17b62912015-02-25 07:53:09 +0100366 type `FT_UInt32' before the change to `FT_PtrDist'.]
Werner Lemberg3aaebe32015-02-23 08:20:27 +0100367 Update all users.
368
369 * src/cache/ftcbasic.c, src/cache/ftccache.c, src/cache/ftccmap.c,
370 src/cache/ftcglyph.c, src/cache/ftcglyph.h: Updated.
371
3722015-02-23 Werner Lemberg <wl@gnu.org>
373
Werner Lemberg4d1f7af2015-02-23 07:04:36 +0100374 [smooth, raster] Re-enable standalone compilation.
375
376 * src/raster/ftraster.c (FT_RENDER_POOL_SIZE, FT_MAX)
377 [_STANDALONE_]: Define macros.
378
379 * src/smooth/ftgrays.c (FT_RENDER_POOL_SIZE, FT_MAX, FT_ABS,
380 FT_HYPOT) [_STANDALONE_]: Define macros.
381
Werner Lemberg03ccfd02015-02-22 08:25:16 +01003822015-02-22 Werner Lemberg <wl@gnu.org>
383
Werner Lembergcb13e712015-02-23 06:41:52 +0100384 [smooth] Signedness fixes.
385
386 * src/smooth/ftgrays.c, src/smooth/ftsmooth.c: Apply.
387
3882015-02-22 Werner Lemberg <wl@gnu.org>
389
Werner Lemberga974e9a2015-02-22 21:02:13 +0100390 * src/raster/ftraster.c: Use the file's typedefs everywhere.
391
3922015-02-22 Werner Lemberg <wl@gnu.org>
393
Werner Lembergb0ebcdc2015-02-22 20:42:49 +0100394 * src/sfnt/ttpost.c (load_format_20): Fix error tracing message.
395
396 Bug introduced 6 commits earlier.
397
3982015-02-22 Werner Lemberg <wl@gnu.org>
399
Werner Lemberg22b1d5c2015-02-22 20:41:03 +0100400 [pshinter] Fix thinko.
401
402 * src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Correctly
403 check `count'.
404 Bug introduced two commits earlier.
405
4062015-02-22 Werner Lemberg <wl@gnu.org>
407
Werner Lembergca96fe02015-02-22 20:05:04 +0100408 [raster] Signedness fixes.
409
410 * src/raster/ftraster.c, src/raster/ftrend1.c: Apply.
411
4122015-02-22 Werner Lemberg <wl@gnu.org>
413
Werner Lemberg452066c2015-02-22 15:59:02 +0100414 [pshinter] Signedness fixes.
415
416 * src/pshinter/pshalgo.c, src/pshinter/pshglob.c,
417 src/pshinter/pshrec.c: Apply.
418
4192015-02-22 Werner Lemberg <wl@gnu.org>
420
Werner Lemberg41c2ed82015-02-22 15:57:47 +0100421 [pshinter] Use macros for (unsigned) flags, not enumerations.
422
423 * src/pshinter/pshalgo.h (PSH_Hint_Flags): Replace with macros.
424 Updated.
425 * src/pshinter/pshrec.h (PS_Hint_Flags): Replace with macros.
426
4272015-02-22 Werner Lemberg <wl@gnu.org>
428
Werner Lemberg25c2f882015-02-22 15:54:31 +0100429 * src/pshinter/pshrec.c: Simplify.
430 (ps_hints_open, ps_hints_stem): Remove switch statement.
431
4322015-02-22 Werner Lemberg <wl@gnu.org>
433
Werner Lemberg01f08422015-02-22 12:03:28 +0100434 [sfnt] Signedness fixes.
435
436 * src/sfnt/pngshim.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap.c,
437 src/sfnt/ttkern.c, src/sfnt/ttload.c, src/sfnt/ttpost.c,
438 src/sfnt/ttsbit.c: Apply.
439 * src/sfnt/sfdriver.c: Apply.
440 (sfnt_get_ps_name): Simplify.
441
4422015-02-22 Werner Lemberg <wl@gnu.org>
443
Werner Lemberg3c374c82015-02-22 09:16:53 +0100444 [bdf] Signedness fixes.
445
446 * src/bdf/bdf.h, src/bdf/bdfdrivr.c, src/bdf/bdfdrivr.h,
447 src/bdf/bdflib.c: Apply.
448
4492015-02-22 Werner Lemberg <wl@gnu.org>
450
Werner Lembergb13945a2015-02-22 09:15:47 +0100451 * src/bdf/bdflib.c (_bdf_atous): New function.
452 (_bdf_parse_glyphs, _bdf_parse_start): Use it.
453
4542015-02-22 Werner Lemberg <wl@gnu.org>
455
Werner Lemberg03ccfd02015-02-22 08:25:16 +0100456 [pcf] Signedness fixes.
457
458 * src/pcf/pcf.h, src/pcf/pcfdrivr.c: Apply.
459 * src/pcf/pcfread.c: Apply.
460 (pcf_get_encodings): Ignore invalid negative encoding offsets.
461
Werner Lemberg633a7292015-02-21 07:02:01 +01004622015-02-21 Werner Lemberg <wl@gnu.org>
463
Werner Lemberg3d7e53f2015-02-21 11:30:54 +0100464 * src/winfonts/winfnt.c: Signedness fixes.
465
4662015-02-21 Werner Lemberg <wl@gnu.org>
467
Werner Lemberg7b6b4172015-02-21 10:39:34 +0100468 [type42] Signedness fixes.
469
470 * src/type42/t42parse.c, src/type42/t42parse.h,
471 src/type42/t42types.h: Apply.
472
4732015-02-21 Werner Lemberg <wl@gnu.org>
474
Werner Lemberg8bfffb42015-02-21 09:52:29 +0100475 [pfr] Signedness fixes.
476
477 * src/pfr/pfrdrivr.c, src/pfr/pfrgload.c, src/pfr/pfrload.c,
478 src/pfr/pfrload.h, src/pfr/pfrobjs.c, src/pfr/pfrsbit.c,
479 src/pfr/pfrtypes.h: Apply.
480
4812015-02-21 Werner Lemberg <wl@gnu.org>
482
Werner Lemberg633a7292015-02-21 07:02:01 +0100483 [cff] Minor signedness fixes related to last commit.
484
485 * src/cff/cf2ft.c, src/cff/cf2intrp.c, src/cff/cffgload.c: Apply.
486
Werner Lemberg3a8d0532015-02-20 08:35:32 +01004872015-02-20 Werner Lemberg <wl@gnu.org>
488
Werner Lembergc00b05f2015-02-20 20:42:55 +0100489 [cff] Thinkos in bias handling.
490
491 Only the final result is always positive.
492
493 Bug introduced three commits earlier.
494
495 * src/cff/cffgload.c, src/cff/cffgload.h: Apply.
496
4972015-02-20 Werner Lemberg <wl@gnu.org>
498
Werner Lemberg2bf03eb2015-02-20 20:14:11 +0100499 [cid] Fix signedness issues and emit some better error codes.
500
501 * src/cid/cidgload.c, src/cid/cidload.h, src/cid/cidobjs.c,
502 src/cid/cidparse.h: Apply.
503 * src/cid/cidload.c: Apply.
504 (parse_fd_array): Reject negative values for number of dictionaries.
505 * src/cid/cidparse.c: Apply.
506 (cid_parser_new): Reject negative values for hex data length.
507
5082015-02-20 Werner Lemberg <wl@gnu.org>
509
Werner Lembergeb05bfb2015-02-20 08:37:35 +0100510 [cff] Signedness fixes for new engine.
511
512 * src/cff/cf2arrst.c, src/cff/cf2fixed.h, src/cff/cf2ft.c,
513 src/cff/cf2ft.h, src/cff/cf2hints.c, src/cff/cf2intrp.c: Apply.
514
5152015-02-20 Werner Lemberg <wl@gnu.org>
516
Werner Lemberg3a8d0532015-02-20 08:35:32 +0100517 [cff] Signedness fixes for basic infrastructure and old engine.
518
519 * include/internal/pshints.h, src/cff/cffdrivr.c,
520 src/cff/cffgload.c, src/cff/cffgload.h, src/cff/cffload.c,
521 src/cff/cffobjs.c, src/cff/cffparse.c, src/pshinter/pshrec.c: Apply.
522
Werner Lemberg81e5ff52015-02-19 09:46:48 +01005232015-02-19 Werner Lemberg <wl@gnu.org>
524
Werner Lemberg3a1df3e2015-02-19 15:42:48 +0100525 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Ignore `countSizePairs'.
526
527 This is hard-coded to value 2 in `fvar' version 1.0 (and no newer
528 version exists), but some fonts set it incorrectly.
529
530 Problem reported by Adam Twardoch <adam@fontlab.com>.
531
5322015-02-19 Werner Lemberg <wl@gnu.org>
533
Werner Lemberg93a884c2015-02-19 14:11:16 +0100534 [cff] Emit better error code for invalid private dict size.
535
536 * src/cff/cffparse.c (cff_parse_private_dict): Reject negative
537 values for size and offset.
538
5392015-02-19 Werner Lemberg <wl@gnu.org>
540
Werner Lembergb57bb112015-02-19 10:44:18 +0100541 [autofit] Fix signedness issues.
542
543 * src/autofit/afangles.c, src/autofit/afcjk.c,
544 src/autofit/afglobal.c, src/autofit/afhints.c,
545 src/autofit/aflatin.c, src/autofit/aflatin2.c, src/autofit/afwarp.c,
546 src/autofit/hbshim.c: Apply.
547
5482015-02-19 Werner Lemberg <wl@gnu.org>
549
Werner Lemberg81e5ff52015-02-19 09:46:48 +0100550 [autofit] Use macros for (unsigned) flags, not enumerations.
551
552 This harmonizes with other code in FreeType (and reduces the number
553 of necessary casts to avoid compiler warnings).
554
555 * src/autofit/afblue.hin: Make flag macros unsigned.
556 * src/autofit/afblue.h: Regenerated.
557
558 * src/autofit/afcjk.h: Replace flag enumeration with macros.
559 * src/autofit/afcjk.c: Updated.
560
561 * src/autofit/afhints.h (AF_Flags, AF_Edge_Flags): Replace with
562 macros.
563 * src/autofit/afhints.c: Updated.
564
565 * src/autofit/aflatin.h: Replace flag enumerations with macros.
566 * src/autofit/aflatin.c, src/autofit/aflatin2.c: Updated.
567
568 * src/autofit/aftypes.h (AF_ScalerFlags): Replace with macros.
569
Werner Lemberg6a0ded72015-02-18 08:51:22 +01005702015-02-18 Werner Lemberg <wl@gnu.org>
571
Werner Lemberg3b5f3322015-02-18 11:45:22 +0100572 [type1] Fix signedness issues.
573
574 * include/internal/psaux.h, include/internal/t1types.h,
575 src/psaux/psobjs.c, src/psaux/psobjs.h, src/psaux/t1decode.c,
576 src/type1/t1gload.c, src/type1/t1load.c, src/type1/t1parse.c: Apply.
577
5782015-02-18 Werner Lemberg <wl@gnu.org>
579
Werner Lemberg272e3cd2015-02-18 11:38:46 +0100580 [psaux, type1] Fix minor AFM issues.
581
582 * include/internal/t1types.h (AFM_KernPairRec): Make indices
583 unsigned.
584 Update users.
585 (AFM_FontInfoRec): Make element counters unsigned.
586 Update users.
587 * src/psaux/afmparse.h (AFM_ValueRec): Add union member for unsigned
588 int.
589
590 * src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs):
591 Reject negative values for number of kerning elements.
592
593 * src/type1/t1afm.c, src/tools/test_afm.c: Updated.
594
5952015-02-18 Werner Lemberg <wl@gnu.org>
596
Werner Lemberg6bd7d282015-02-18 09:22:06 +0100597 Don't use `FT_PtrDist' for lengths.
598
599 Use FT_UInt instead.
600
601 * include/internal/psaux.h (PS_Table_FuncsRec, PS_TableRec,
602 T1_DecoderRec): Do it.
603
604 * include/internal/t1types.h (T1_FontRec): Ditto.
605
606 * src/cid/cidload.c (cid_parse_dict): Updated.
607 * src/pfr/pfrload.c (pfr_extra_item_load_font_id): Ditto.
608 * src/psaux/psobjs.c (ps_table_add), src/psaux/psobjs.h: Ditto.
609 * src/type1/t1load.c (parse_blend_axis_types, parse_encoding,
610 parse_chharstrings, parse_dict): Ditto.
611 * src/type42/t42parse.c (t42_parse_encoding, t42_parse_charstrings,
612 t42_parse_dict): Ditto.
613
6142015-02-18 Werner Lemberg <wl@gnu.org>
615
Werner Lemberg6a0ded72015-02-18 08:51:22 +0100616 * src/type1/t1driver.c (t1_ps_get_font_value): Clean up.
617 This handles negative values better, avoiding many casts.
618
Werner Lemberg0a33a392015-02-17 08:03:05 +01006192015-02-17 Werner Lemberg <wl@gnu.org>
620
Werner Lembergd3240c52015-02-17 20:30:36 +0100621 [base] Fix Savannah bug #44284.
622
623 * src/base/ftcalc.c (FT_MulFix): Typos.
624
6252015-02-17 Werner Lemberg <wl@gnu.org>
626
Werner Lemberg1f7a4e12015-02-17 10:17:56 +0100627 [truetype] Finish compiler warning fixes for signedness issues.
628
629 * src/truetype/ttgxvar.c, src/truetype/ttsubpix.c,
630 src/truetype/ttsubpix.h: Apply.
631
6322015-02-17 Werner Lemberg <wl@gnu.org>
633
Werner Lemberg9daea2c2015-02-17 09:27:56 +0100634 * src/truetype/ttsubpix.c: Adding missing `static' keywords.
635
6362015-02-17 Werner Lemberg <wl@gnu.org>
637
Werner Lembergd9c3f152015-02-17 09:21:26 +0100638 [truetype] More signedness fixes.
639
640 * include/internal/tttypes.h, src/truetype/ttinterp.h,
641 src/truetype/ttobjs.h, src/truetype/ttinterp.c,
642 src/truetype/ttobjs.c: Apply.
643
6442015-02-17 Werner Lemberg <wl@gnu.org>
645
Werner Lemberg0a33a392015-02-17 08:03:05 +0100646 [truetype] Various signedness fixes.
647
648 * include/internal/ftgloadr.h, src/truetype/ttpload.c: Apply.
649
650 * src/truetype/ttgload.c: Apply.
651 (TT_Get_VMetrics): Protect against invalid ascenders and descenders
652 while constructing advance height.
653
Werner Lemberg587351b2015-02-16 07:03:22 +01006542015-02-16 Werner Lemberg <wl@gnu.org>
655
Werner Lemberg76abc752015-02-16 22:00:27 +0100656 [base] Finish compiler warning fixes for signedness issues.
657
658 * src/base/ftglyph.c, src/base/ftlcdfil.c, src/base/ftstroke.c:
659 Apply.
660
6612015-02-16 Werner Lemberg <wl@gnu.org>
662
Werner Lemberg10aa8582015-02-16 20:12:54 +0100663 * include/tttables.h (TT_OS2): `fsType' must be FT_UShort.
664
6652015-02-16 Werner Lemberg <wl@gnu.org>
666
Werner Lemberg2e814fc2015-02-16 20:05:08 +0100667 More minor signedness warning fixes.
668
669 * src/base/ftbbox.c, src/base/ftbitmap.c, src/base/fttrigon.c,
670 src/base/ftutil.c: Apply.
671
6722015-02-16 Werner Lemberg <wl@gnu.org>
673
Werner Lemberg82235d02015-02-16 19:35:16 +0100674 Next round of minor compiler warning fixes.
675
676 * include/internal/ftrfork.h (FT_RFork_Ref): Change `offset' member
677 type to `FT_Long'.
678 (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Add `static' keyword.
679
Werner Lemberg3aaebe32015-02-23 08:20:27 +0100680 * include/internal/ftstream.h (FT_Stream_Pos): Return `FT_ULong'.
Werner Lemberg82235d02015-02-16 19:35:16 +0100681
682 * src/base/ftoutln.c, src/base/ftrfork.c, src/base/ftstream.c:
683 Signedess fixes.
684
6852015-02-16 Werner Lemberg <wl@gnu.org>
686
Werner Lemberg3cfa4d12015-02-16 17:59:06 +0100687 Various minor signedness fixes.
688
689 * include/ftadvanc.h, include/internal/ftobjs.h,
690 src/base/ftgloadr.c, src/base/ftobjs.c: Apply.
691
6922015-02-16 Werner Lemberg <wl@gnu.org>
693
Werner Lemberg6f325c22015-02-16 11:31:32 +0100694 New `TYPEOF' macro.
695
696 This helps suppress signedness warnings, avoiding issues with
697 implicit conversion changes.
698
699 * include/config/ftconfig.h, builds/unix/ftconfig.in,
700 builds/vms/ftconfig.h (TYPEOF): Define.
701
702 * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
703 src/autofit/afwarp.h (AF_WARPER_FLOOR): Use it.
704
7052015-02-16 Werner Lemberg <wl@gnu.org>
706
Werner Lemberg1f377f02015-02-16 08:37:09 +0100707 * src/base/ftsystem.c: Use casts in standard C function wrappers.
708 (ft_alloc, ft_realloc, ft_ansi_stream_io, FT_Stream_Open): Do it.
709
7102015-02-16 Werner Lemberg <wl@gnu.org>
711
Werner Lemberg0814b802015-02-16 07:29:53 +0100712 Fix Savannah bug #44261.
713
714 * builds/unix/detect.mk (setup) [unix]: Set `CONFIG_SHELL' in the
715 environment also while calling the configure script.
716
7172015-02-16 Werner Lemberg <wl@gnu.org>
718
Werner Lemberg587351b2015-02-16 07:03:22 +0100719 * include/internal/ftmemory.h: Add some `FT_Offset' casts.
720 (FT_MEM_SET, FT_MEM_COPY, FT_MEM_MOVE, FT_ARRAY_ZERO, FT_ARRAY_COPY,
721 FT_MEM_MOVE): Do it.
722
Werner Lemberg6d7d6362015-02-15 12:30:42 +01007232015-02-15 Werner Lemberg <wl@gnu.org>
724
Werner Lemberg48186b82015-02-16 06:37:36 +0100725 [base] Clean up signedness issues in `ftdbgmem.c'.
726
727 Also fix other minor issues.
728
729 * src/base/ftdbgmem.c (FT_MemTableRec): Replace all FT_ULong types
730 with FT_Long for consistency.
731 (ft_mem_primes): Change type to `FT_Int'.
732 (ft_mem_closest_prime, ft_mem_table_set): Updated.
733
734 (ft_mem_debug_panic, ft_mem_debug_alloc, ft_mem_debug_free,
735 ft_mem_debug_realloc): Use `static' keyword and fix signedness
736 warnings where necessary.
737
738 (ft_mem_table_resize, ft_mem_table_new, ft_mem_table_destroy,
739 ft_mem_table_get_nodep, ft_mem_debug_init, FT_DumpMemory): Fix types
740 and add or remove casts to avoid signedness warnings.
741
7422015-02-15 Werner Lemberg <wl@gnu.org>
743
Werner Lemberg6d7d6362015-02-15 12:30:42 +0100744 [base] Clean up signedness in arithmetic functions.
745
746 This makes the code more readable and reduces compiler warnings.
747
748 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round, FT_MulFix,
749 FT_DivFix): Convert input parameters to unsigned, do the
750 computation, then convert the result back to signed.
751 (ft_corner_orientation): Fix casts.
752
Werner Lemberg92359bd2015-02-07 09:47:23 +01007532015-02-07 Werner Lemberg <wl@gnu.org>
754
755 [sfnt] Fix Savannah bug #44184.
756
757 * src/sfnt/ttload.c (check_table_dir, tt_face_load_font_dir): No
758 longer reject `htmx' and `vmtx' tables with invalid length but
759 sanitize them.
760
Jon Anderson416d8792015-02-06 10:16:45 +01007612015-02-06 Jon Anderson <jon@websupergoo.com>
762
763 [truetype] Fix regression in the incremental glyph loader.
764
765 * src/truetype/ttgload.c (load_truetype_glyph): For incremental
766 fonts, the glyph index may be greater than the number of glyphs
767 indicated, so guard the check with a preprocessor conditional.
768
Werner Lembergb6cb4992015-02-06 08:46:06 +01007692015-02-06 Werner Lemberg <wl@gnu.org>
770
771 [autofit] Fix potential memory leak.
772
773 While this doesn't show up with FreeType, exactly the same code
774 leaks with ttfautohint's modified auto-hinter code (which gets used
775 in a slightly different way).
776
777 It certainly doesn't harm since it is similar to already existing
778 checks in the code for embedded arrays.
779
780 * src/autofit/afhints.c (af_glyph_hints_reload): Set `max_contours'
781 and `max_points' for all cases.
782
Werner Lemberg19146a52015-01-31 11:01:33 +01007832015-01-31 Werner Lemberg <wl@gnu.org>
784
785 [autofit] Add support for Thai script.
786
787 Thanks to Ben Mitchell <ben@rosettatype.com> for guidance with blue
788 zone characters!
789
790 * src/autofit/afblue.dat: Add blue zone data for Thai.
791
792 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
793
794 * src/autofit/afscript.h: Add Thai standard characters.
795
796 * src/autofit/afranges.c: Add Thai data.
797
798 * src/autofit/afstyles.h: Add Thai data.
799
Behdad Esfahbod264b5e42015-01-23 21:23:55 +01008002015-01-23 Behdad Esfahbod <behdad@behdad.org>
801
802 [raster] Handle `FT_RASTER_FLAG_AA' correctly.
803
804 This fixes a breakage caused by the commit `[raster] Remove
805 5-level gray AA mode from monochrome rasterizer.'.
806
Werner Lembergd2c531e2015-01-23 22:37:42 +0100807 Problem reported by Markus Trippelsdorf <markus@trippelsdorf.de>.
Behdad Esfahbod264b5e42015-01-23 21:23:55 +0100808
809 * src/raster/ftraster.c (ft_black_render): Handle
810 `FT_RASTER_FLAG_AA'.
811
812 * src/raster/ftrend1.c (ft_raster1_render): Remove gray AA mode
813 remnants.
814
Werner Lemberg79a5ac62015-01-18 07:30:04 +01008152015-01-18 Werner Lemberg <wl@gnu.org>
816
817 * src/base/ftobjs.c (FT_New_Library): Fix compiler warning.
818
Chris Liddell942aa5f2015-01-18 07:29:48 +01008192015-01-18 Chris Liddell <chris.liddell@artifex.com>
820
821 [raster] Fix Savannah bug #44022.
822
823 Add fallback for glyphs with degenerate bounding boxes.
824
825 If a glyph has only one very narrow feature, the bbox can end up
826 with either the width or height of the bbox being 0, in which case
827 no raster memory is allocated and no attempt is made to render the
828 glyph. This is less than ideal when the drop-out compensation in
829 the rendering code would actually result in the glyph being
830 rendered.
831
832 This problem can be observed with the `I' glyph (gid 47) in the
833 Autodesk RomanS TrueType font.
834
835 * src/raster/ftrend1.c (ft_raster1_render): Add a fallback if either
836 dimension is zero to explicitly round up/down (instead of simply
837 round).
838
Werner Lemberg50be00d2015-01-17 20:38:31 +01008392015-01-17 Werner Lemberg <wl@gnu.org>
840
841 Add some tools to handle yearly copyright notice updates.
842
843 We are now following the GNU guidelines: A new release automatically
844 means that the copyright year of all affected files gets updated; it
845 is no longer used to track years of modification changes.
846
847 * src/tools/update-copyright-year: New Perl script.
848 * src/tools/update-copyright: New shell script that calls
849 `update-copyright-year' on all files.
850 * src/tools/no-copyright: Exceptions that should not be handled by
851 `update-copyright'
852
Werner Lemberg4eff8542015-01-14 20:06:19 +01008532015-01-14 Werner Lemberg <wl@gnu.org>
854
855 * docs/CHANGES: Updated, using a description from Behdad.
856
Behdad Esfahbod3f9b3d82015-01-14 15:48:12 +01008572015-01-14 Behdad Esfahbod <behdad@behdad.org>
858
Behdad Esfahbod48c86622015-01-14 19:38:36 +0100859 * src/autofit/afmodule.c (af_autofitter_done): Fix compiler warning.
860
8612015-01-14 Behdad Esfahbod <behdad@behdad.org>
862
Behdad Esfahbod56ddafa2015-01-14 19:36:02 +0100863 [autofit] Add embedded array of segments and edges.
864
865 Avoids multiple mallocs per typical glyphs.
866
867 With this and recent changes to avoid mallocs, the thread-safe
868 stack-based loader is now as fast as the previous model that had one
869 cached singleton.
870
871 * src/autofit/afhints.h (AF_SEGMENTS_EMBEDDED, AF_EDGES_EMBEDDED):
872 New macros.
873 (AF_AxisHintsRec): Add two arrays for segments and edges.
874
875 * src/autofit/afhints.c (af_axis_hints_new_segment): Only allocate
876 data if number of segments exceeds given threshold value.
877 (af_axis_hints_new_edge): Only allocate data if number of edges
878 exceeds given threshold value.
879 (af_glyph_hints_done): Updated.
880
8812015-01-14 Behdad Esfahbod <behdad@behdad.org>
882
Behdad Esfahbod6f16b102015-01-14 19:26:49 +0100883 [autofit] Add embedded arrays for points and contours.
884
885 This avoids at least two malloc calls for typical glyphs.
886
887 * src/autofit/afhints.h (AF_POINTS_EMBEDDED, AF_CONTOURS_EMBEDDED):
888 New macros.
889 (AF_GlyphHintsRec): Add two arrays for contours and points.
890
891 * src/autofit/afhints.c (af_glyph_hints_init, af_glyph_hints_done):
892 Updated.
893 (af_glyph_hints_reload): Only allocate data if number of contours or
894 points exceeds given threshold values.
895
8962015-01-14 Behdad Esfahbod <behdad@behdad.org>
897
Behdad Esfahbodc2733652015-01-14 19:16:12 +0100898 [autofit] Allocate hints object on the stack.
899
900 This avoids one malloc per load.
901
902 * src/autofit/afloader.h (AF_LoaderRec): Change type of `hints' to
903 `AF_GlyphHints'.
904 Update prototype.
905
906 * src/autofit/afloader.c (af_loader_init): Use `AF_GlyphHints'
907 parameter instead of `FT_Memory'.
908 (af_loader_done): Directly reset `load_hints'.
909 (af_loader_load_g): Updated.
910
911 * src/autofit/afmodule.c (af_autofitter_load_glyph): Use local
912 `hints' object.
913
9142015-01-14 Behdad Esfahbod <behdad@behdad.org>
915
Behdad Esfahboda4117fb2015-01-14 19:07:54 +0100916 [autofit] Reuse slot glyph loader.
917
918 No need to create a new glyph loader; we can reuse the one from
919 `slot->internal->loader'. It's hard to tell why it was written that
920 way originally, but new code looks sound and correct to me, and
921 avoids lots of allocations.
922
923 * src/autofit/afloader.c (af_loader_init): Change return type to
924 `void'.
925 Don't call `FT_GlyphLoader_New'.
926 (af_loader_reset): Don't call `FT_GlyphLoader_Rewind'.
927 (af_loader_load_g): Update code to use `internal->loader', which
928 doesn't need copying of data.
929
930 * src/autofit/afloader.h (AF_LoaderRec): Remove `gloader' member.
931 Update prototype.
932
933 * src/autofit/afmodule.c (af_autofitter_load_glyph): Updated.
934
9352015-01-14 Behdad Esfahbod <behdad@behdad.org>
936
Behdad Esfahbodae6699f2015-01-14 18:55:39 +0100937 [autofit] Remove (unused) support for composite glyphs.
938
939 We never have to deal with composite glyphs in the autohinter, as
940 those will be loaded into FORMAT_OUTLINE by the recursed
941 `FT_Load_Glyph' function.
942
943 In the rare cases that FT_LOAD_NO_RECURSE is set, it will imply
944 FT_LOAD_NO_SCALE as per `FT_Load_Glyph', which then implies
945 FT_LOAD_NO_HINTING:
946
947 /* resolve load flags dependencies */
948
949 if ( load_flags & FT_LOAD_NO_RECURSE )
950 load_flags |= FT_LOAD_NO_SCALE |
951 FT_LOAD_IGNORE_TRANSFORM;
952
953 if ( load_flags & FT_LOAD_NO_SCALE )
954 {
955 load_flags |= FT_LOAD_NO_HINTING |
956 FT_LOAD_NO_BITMAP;
957
958 load_flags &= ~FT_LOAD_RENDER;
959 }
960
961 and as such the auto-hinter is never called. Thus, the recursion in
962 `af_loader_load_g' never actually happens. So remove the depth
963 counter as well.
964
965 * src/autofit/afloader.c (af_loader_load_g): Remove `depth'
966 parameter.
967 <FT_GLYPH_FORMAT_COMPOSITE>: Remove associated code.
968 (af_loader_load_glyph): Updated.
969
9702015-01-14 Behdad Esfahbod <behdad@behdad.org>
971
Behdad Esfahbodc242fe42015-01-14 18:48:14 +0100972 [raster] Fix uninitialized memory access.
973
974 Apparently `ras.cProfile' might be uninitialized. This will be the
975 case if `ras.top == ras.cProfile->offset', as can be seen in
976 `End_Profile'. The overshoot code introduced in a change `Fix B/W
977 rasterization of subglyphs with different drop-out modes.' (from
978 2009-06-18) violated this, accessing `ras.cProfile->flags'
979 unconditionally just before calling `End_Profile' (which then
980 detected that `cProfile' is uninitialized and didn't touch it).
981
982 This was harmless, and was not detected by valgrind before because
983 the objects were allocated on the `raster_pool', which was always
984 initialized. With recent change to allocate raster buffers on the
985 stack, valgrind now reported this invalid access.
986
987 * src/raster/ftraster.c (Convert_Glyph): Don't access an
988 uninitialized `cProfile'.
989
9902015-01-14 Behdad Esfahbod <behdad@behdad.org>
991
Behdad Esfahbodb2ba6862015-01-14 18:43:13 +0100992 [smooth] Fix uninitialized memory access.
993
994 Looks like `ras.span_y' could always be used without initialization.
995 This was never detected by valgrind before because the library-wide
996 `raster_pool' was used for the worker object and `raster_pool' was
997 originally zero'ed. But subsequent reuses of it were using `span_y'
998 uninitialized. With the recent change to not use `render_pool' and
999 allocate worker and buffer on the stack, valgrind now detects this
1000 uninitialized access.
1001
1002 * src/smooth/ftgrays.c (gray_raster_render): Initialize
1003 `ras.span_y'.
1004
10052015-01-14 Behdad Esfahbod <behdad@behdad.org>
1006
Behdad Esfahbod603292d2015-01-14 18:35:56 +01001007 [base] Don't initialize unused `driver->glyph_loader'.
1008
1009 * src/base/ftobjs.c (Destroy_Driver): Don't call
1010 `FT_GlyphLoader_Done'.
1011 (FT_Add_Module): Don't call `FT_GlyphLoader_New'.
1012
10132015-01-14 Behdad Esfahbod <behdad@behdad.org>
1014
Behdad Esfahbod51634252015-01-14 18:30:59 +01001015 [base] Don't allocate `library->raster_pool' anymore.
1016
1017 It's unused after the following commits:
1018
1019 [raster] Allocate render pool for mono rasterizer on the stack.
1020 [raster] Remove 5-level gray AA mode from monochrome rasterizer.
1021
1022 The value of FT_RENDER_POOL_SIZE still serves the purpose it used to
1023 serve, which is, to adjust the pool size. But the pool is now
1024 allocated on the stack on demand.
1025
1026 * src/base/ftobjs.c (FT_New_Library, FT_Done_Library): Implement.
1027
10282015-01-14 Behdad Esfahbod <behdad@behdad.org>
1029
Behdad Esfahbod6dfdaf42015-01-14 18:21:13 +01001030 [base] Do not reorder library->renderers upon use.
1031
1032 Instead of keeping `library->renderers' in a MRU order, just leave
1033 it as-is. The MRU machinery wasn't thread-safe.
1034
1035 With this patch, rasterizing glyphs from different faces from
1036 different threads doesn't fail choosing rasterizer
1037 (FT_Err_Cannot_Render_Glyph).
1038
1039 Easiest to see that crash was to add a `printf' (or otherwise let
1040 thread yield in FT_Throw with debugging enabled).
1041
1042 * src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c
1043 (FT_Outline_Render): Don't call `FT_Set_Renderer'.
1044
10452015-01-14 Behdad Esfahbod <behdad@behdad.org>
1046
Behdad Esfahboda773c302015-01-14 18:16:20 +01001047 [raster] Allocate render pool for mono rasterizer on the stack.
1048
1049 Instead of using the `render_pool' member of `FT_Library' that is
1050 provided down to the rasterizer, completely ignore that and allocate
1051 needed objects on the stack instead.
1052
1053 With this patch, rasterizing glyphs from different faces from
1054 different threads doesn't crash in the monochrome rasterizer.
1055
1056 * src/raster/ftraster.c (black_TRaster): Remove `buffer',
1057 `buffer_size', and `worker' members.
1058
1059 (ft_black_render): Create `buffer' locally.
1060 (ft_black_reset): Updated.
1061
10622015-01-14 Behdad Esfahbod <behdad@behdad.org>
1063
Behdad Esfahbod8dc86352015-01-14 18:06:22 +01001064 [raster] Remove 5-level gray AA mode from monochrome rasterizer.
1065
1066 It was off by default and couldn't be turned on at runtime. And the
1067 smooth rasterizer superceded it over ten years ago. No point in
1068 keeping. Comments suggested that it was there for compatibility
1069 with FreeType 1.
1070
1071 550 lines down.
1072
1073 * src/raster/ftraster.c (FT_RASTER_OPTION_ANTI_ALIASING,
1074 RASTER_GRAY_LINES): Remove macros and all associated code.
1075
1076 (black_TWorker): Remove `gray_min_x' and `gray_max_x'.
1077 (black_TRaster): Remove `grays' and `gray_width'.
1078
1079 (Vertical_Sweep_Init, Vertical_Sweep_Span, Vertical_Sweep_Drop,
1080 ft_black_render): Updated.
1081
1082 * src/raster/ftrend1.c (ft_raster1_render): Simplify code.
1083 (ft_raster5_renderer_class): Removed.
1084
10852015-01-14 Behdad Esfahbod <behdad@behdad.org>
1086
Behdad Esfahbod747ae2c2015-01-14 17:54:26 +01001087 [smooth] Allocate render pool for smooth rasterizer on the stack.
1088
1089 Instead of using the `render_pool' member of `FT_Library' that is
1090 provided down to the rasterizer, completely ignore that and allocate
1091 needed objects on the stack instead.
1092
1093 With this patch, rasterizing glyphs from different faces from
1094 different threads doesn't crash in the smooth rasterizer.
1095
1096 Bugs:
1097
1098 https://bugzilla.redhat.com/show_bug.cgi?id=678397
1099 https://bugzilla.redhat.com/show_bug.cgi?id=1004315
1100 https://bugzilla.redhat.com/show_bug.cgi?id=1165471
1101 https://bugs.freedesktop.org/show_bug.cgi?id=69034
1102
1103 * src/smooth/ftgrays.c (gray_TRaster): Remove `buffer',
1104 `buffer_size', `band_size', and `worker' members.
1105
1106 (gray_raster_render): Create `buffer', `buffer_size', and
1107 `band_size' locally.
1108 (gray_raster_reset): Updated.
1109
11102015-01-14 Behdad Esfahbod <behdad@behdad.org>
1111
Behdad Esfahbod531d4632015-01-14 17:46:55 +01001112 [truetype] Allocate TT_ExecContext in TT_Size instead of TT_Driver.
1113
1114 Previously the code had stipulation for using a per-TT_Size exec
1115 context if `size->debug' was true. But there was no way that
1116 `size->debug' could *ever* be true. As such, the code was always
1117 using the singleton `TT_ExecContext' that was stored in `TT_Driver'.
1118 This was, clearly, not threadsafe.
1119
1120 With this patch, loading glyphs from different faces from different
1121 threads doesn't crash in the bytecode loader code.
1122
1123 * src/truetype/ttobjs.h (TT_SizeRec): Remove `debug' member.
1124 (TT_DriverRec): Remove `context' member.
1125
1126 * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Remove
1127 `TT_ExecContext' code related to a global `TT_Driver' object.
1128
1129 (tt_driver_done): Don't remove `TT_ExecContext' object here but ...
1130 (tt_size_done_bytecode): ... here.
1131
1132 (tt_driver_init): Don't create `TT_ExecContext' object here but ...
1133 (tt_size_init_bytecode): ... here, only on demand.
1134
1135 * src/truetype/ttinterp.c (TT_Run_Context): Remove defunct debug
1136 code.
1137 (TT_New_Context): Remove `TT_ExecContext' code related to a global
1138 `TT_Driver' object.
1139
1140 * src/truetype/ttinterp.h: Updated.
1141
1142 * src/truetype/ttgload.c (TT_Hint_Glyph, tt_loader_init): Updated.
1143
11442015-01-14 Behdad Esfahbod <behdad@behdad.org>
1145
Behdad Esfahbod89bc8d42015-01-14 16:01:19 +01001146 [autofit] Allocate AF_Loader on the stack instead of AF_Module.
1147
1148 Stop sharing a global `AF_Loader'. Allocate one on the stack during
1149 glyph load.
1150
1151 Right now this results in about 25% slowdown, to be fixed in a
1152 following commit.
1153
1154 With this patch loading glyphs from different faces from different
1155 threads doesn't immediately crash in the autohinting loader code.
1156
1157 Bugs:
1158
1159 https://bugzilla.redhat.com/show_bug.cgi?id=1164941
1160
1161 * src/autofit/afloader.c (af_loader_init): Pass
1162 `AF_Loader' and `FT_Memory' instead of `AF_Module' as arguments.
1163 (af_loader_reset, af_loader_load_glyph): Also pass `loader' as
1164 argument.
1165 (af_loader_done): Use `AF_Loader' instead of `AF_Module' as
1166 argument.
1167
1168 * src/autofit/afmodule.c (af_autofitter_init): Don't call
1169 `af_loader_init'.
1170 (af_autofitter_done): Don't call `af_loader_done'.
1171 (af_autofitter_load_glyph): Use a local `AF_Loader' object.
1172
1173 * src/autofit/afloader.h: Include `afmodule.h'.
1174 Update prototypes.
1175 Move typedef for `AF_Module' to...
1176
1177 * src/autofit/afmodule.h: ... this place.
1178 No longer include `afloader.h'.
1179
11802015-01-14 Behdad Esfahbod <behdad@behdad.org>
1181
Behdad Esfahbod3f9b3d82015-01-14 15:48:12 +01001182 * src/type42/t42objs.h (T42_DriverRec): Remove unused member.
1183
Werner Lemberg36d03c92015-01-12 11:26:30 +010011842015-01-12 Werner Lemberg <wl@gnu.org>
1185
1186 Fix Savannah bug #43976.
1187
1188 Assure that FreeType's internal include directories are found before
1189 `CPPFLAGS' (which might be set by the user in the environment), and
1190 `CPPFLAGS' before `CFLAGS'.
1191
1192 * builds/freetype.mk (FT_CFLAGS): Don't add `INCLUDE_FLAGS'.
1193 (FT_COMPILE): Make this a special variable for compiling only the
1194 files handled in `freetype.mk'.
1195 (.c.$O): Removed, unused.
1196
1197 * src/*/rules.mk (*_COMPILE): Fix order of include directories.
1198
Werner Lembergd03a67a2015-01-11 08:39:14 +010011992015-01-11 Werner Lemberg <wl@gnu.org>
1200
Werner Lemberg95b57052015-01-11 09:50:49 +01001201 [truetype] Prettyfing.
1202
1203 * src/truetype/ttinterp.c (project, dualproj, fast_project,
1204 fast_dualproj): Rename to...
1205 (PROJECT, DUALPROJ, FAST_PROJECT, FAST_DUALPROJ): ... this.
1206
12072015-01-11 Werner Lemberg <wl@gnu.org>
1208
Werner Lembergea173c02015-01-11 08:58:54 +01001209 * src/truetype/ttinterp.c (Ins_JROT, Ins_JROF): Simplify.
1210
1211 Based on a patch from Behdad.
1212
12132015-01-11 Werner Lemberg <wl@gnu.org>
1214
Werner Lemberg628578c2015-01-11 08:53:31 +01001215 * src/truetype/ttinterp.c (Ins_SxVTL): Simplify function call.
1216
12172015-01-11 Werner Lemberg <wl@gnu.org>
1218
Werner Lemberg08e79092015-01-11 08:45:50 +01001219 * src/truetype/ttinterp.c (Normalize): Remove unused argument.
1220
12212015-01-11 Werner Lemberg <wl@gnu.org>
1222
Werner Lembergd03a67a2015-01-11 08:39:14 +01001223 [truetype] More macro expansions.
1224
Werner Lemberg4aaadf42015-01-11 08:42:28 +01001225 * src/truetype/ttinterp.c (FT_UNUSED_EXEC): Remove macro by
1226 expansion.
1227
12282015-01-11 Werner Lemberg <wl@gnu.org>
1229
1230 [truetype] More macro expansions.
1231
Werner Lembergd03a67a2015-01-11 08:39:14 +01001232 * src/truetype/ttinterp.c (INS_ARG): Remove macro by expansion,
1233 adjusting funtion calls where necessary.
1234 (FT_UNUSED_ARG): Removed, no longer needed.
1235
Werner Lemberg1b4d68c2015-01-10 19:56:28 +010012362015-01-10 Werner Lemberg <wl@gnu.org>
1237
Werner Lembergeb341362015-01-11 00:23:27 +01001238 [truetype] More macro expansions.
1239
1240 Based on a patch from Behdad.
1241
1242 * src/truetype/ttinterp.c (DO_*): Expand macros into corresponding
1243 `Ins_*' functions.
1244 (TT_RunIns): Replace `DO_*' macros with `Ins_*' function calls.
1245 (ARRAY_BOUND_ERROR): Remove second definition, which is no longer
1246 needed.
1247 (Ins_SVTCA, Ins_SPVTCA, Ins_SFVTCA): Replaced with...
1248 (Ins_SxyTCA): New function.
1249
12502015-01-10 Werner Lemberg <wl@gnu.org>
1251
Werner Lemberg01be1302015-01-10 23:05:37 +01001252 [truetype] Remove TT_CONFIG_OPTION_INTERPRETER_SWITCH.
1253
1254 Behdad suggested this code simplification, and nobody objected...
1255
1256 * include/config/ftoption.h, devel/ftoption.h
1257 (TT_CONFIG_OPTION_INTERPRETER_SWITCH): Remove.
1258
1259 * src/truetype/ttinterp.c [TT_CONFIG_OPTION_INTERPRETER_SWITCH]:
1260 Remove related code.
1261 (ARRAY_BOUND_ERROR): Use do-while loop.
1262
12632015-01-10 Werner Lemberg <wl@gnu.org>
1264
Werner Lembergfae0c812015-01-10 20:23:10 +01001265 [truetype] More macro expansions.
1266
Werner Lemberg6cc1f122015-01-10 21:56:59 +01001267 * src/truetype/ttinterp.c, src/truetype/ttinterp.h (EXEC_ARG_,
1268 EXEC_ARG): Remove by replacing with expansion.
1269
12702015-01-10 Werner Lemberg <wl@gnu.org>
1271
1272 [truetype] More macro expansions.
1273
Werner Lemberg24681452015-01-10 21:53:48 +01001274 Based on a patch from Behdad.
1275
1276 * src/truetype/ttinterp.c (SKIP_Code, GET_ShortIns, NORMalize,
1277 SET_SuperRound, ROUND_None, INS_Goto_CodeRange, CUR_Func_move,
1278 CUR_Func_move_orig, CUR_Func_round, CUR_Func_cur_ppem,
1279 CUR_Func_read_cvt, CUR_Func_write_cvt, CUR_Func_move_cvt,
1280 CURRENT_Ratio, INS_SxVTL, COMPUTE_Funcs, COMPUTE_Round,
1281 COMPUTE_Point_Displacement, MOVE_Zp2_Point): Remove by replacing
1282 with expansion.
1283
1284 (Cur_Func_project, CUR_Func_dualproj, CUR_fast_project,
1285 CUR_fast_dualproj): Replace with macros `project', `dualproj',
1286 `fast_project', `fast_dualproj'.
1287
12882015-01-10 Werner Lemberg <wl@gnu.org>
1289
1290 [truetype] More macro expansions.
1291
Werner Lembergfae0c812015-01-10 20:23:10 +01001292 * src/truetype/ttinterp.c (EXEC_OP_, EXEC_OP): Remove by replacing
1293 with expansion.
1294
12952015-01-10 Werner Lemberg <wl@gnu.org>
1296
Werner Lemberg5a752f32015-01-10 20:08:35 +01001297 [truetype] Remove code for static TrueType interpreter.
1298
1299 This is a follow-up patch.
1300
1301 * src/truetype/ttinterp.c, src/truetype/ttinterp.h
1302 [TT_CONFIG_OPTION_STATIC_INTERPRETER,
1303 TT_CONFIG_OPTION_STATIC_RASTER]: Remove macros and related code.
1304
13052015-01-10 Werner Lemberg <wl@gnu.org>
1306
Werner Lemberg1b4d68c2015-01-10 19:56:28 +01001307 * src/truetype/ttinterp.c (CUR): Remove by replacing with expansion.
1308
1309 This starts a series of patches that simplifies the code of the
1310 bytecode interpreter.
1311
Werner Lemberg232bd942014-12-30 21:44:51 +010013122014-12-30 Werner Lemberg <wl@gnu.org>
1313
1314 * Version 2.5.5 released.
1315 =========================
1316
1317
1318 Tag sources with `VER-2-5-5'.
1319
1320 * docs/VERSION.DLL: Update documentation and bump version number to
1321 2.5.5.
1322
1323 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
1324 builds/windows/vc2005/index.html,
1325 builds/windows/vc2008/freetype.vcproj,
1326 builds/windows/vc2008/index.html,
1327 builds/windows/vc2010/freetype.vcxproj,
1328 builds/windows/vc2010/index.html,
1329 builds/windows/visualc/freetype.dsp,
1330 builds/windows/visualc/freetype.vcproj,
1331 builds/windows/visualc/index.html,
1332 builds/windows/visualce/freetype.dsp,
1333 builds/windows/visualce/freetype.vcproj,
1334 builds/windows/visualce/index.html,
1335 builds/wince/vc2005-ce/freetype.vcproj,
1336 builds/wince/vc2005-ce/index.html,
1337 builds/wince/vc2008-ce/freetype.vcproj,
1338 builds/wince/vc2008-ce/index.html: s/2.5.4/2.5.5/, s/254/255/.
1339
1340 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 5.
1341
1342 * builds/unix/configure.raw (version_info): Set to 17:4:11.
1343 * CMakeLists.txt (VERSION_PATCH): Set to 5.
1344 * docs/CHANGES: Updated.
1345
1346 * builds/toplevel.mk (dist): Fix typos.
1347
Alexei Podtelezhnikov70241552014-12-24 12:11:46 -050013482014-12-24 Alexei Podtelezhnikov <apodtele@gmail.com>
1349
1350 [base] Formatting and nanooptimizations.
1351
1352 * src/base/ftcalc.c,
1353 * src/base/fttrigon.c: Revise sign restoration.
1354
Werner Lemberg06842c72014-12-13 07:42:51 +010013552014-12-13 Werner Lemberg <wl@gnu.org>
1356
1357 * src/pcf/pcfread.c (pcf_read_TOC): Improve fix from 2014-12-08.
1358
Werner Lembergb9438112014-12-11 13:33:14 +010013592014-12-11 Werner Lemberg <wl@gnu.org>
1360
Werner Lemberg82119502014-12-11 22:27:06 +01001361 * builds/toplevel.mk (dist): Use older POSIX standard for `tar'.
1362
1363 Apparently, BSD tar isn't capable yet of handling POSIX-1.2001
1364 (contrary to GNU tar), so force the POSIX-1.1988 format.
1365
1366 Problem reported by Stephen Fisher <sfisher@SDF.ORG>.
1367
13682014-12-11 Werner Lemberg <wl@gnu.org>
1369
Werner Lemberg812ed342014-12-11 14:07:29 +01001370 * src/type42/t42parse.c (t42_parse_sfnts): Reject invalid TTF size.
1371
13722014-12-11 Werner Lemberg <wl@gnu.org>
1373
Werner Lembergc9ca6ff2014-12-11 13:39:39 +01001374 * src/base/ftobjs.c (FT_Get_Glyph_Name): Fix off-by-one check.
1375
1376 Problem reported by Dennis Felsing <dennis@felsin9.de>.
1377
13782014-12-11 Werner Lemberg <wl@gnu.org>
1379
Werner Lembergb9438112014-12-11 13:33:14 +01001380 * src/type42/t42parse.c (t42_parse_sfnts): Check `string_size'.
1381
1382 Problem reported by Dennis Felsing <dennis@felsin9.de>.
1383
suzuki toshiya2b592822014-12-10 00:27:41 +090013842014-12-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1385
suzuki toshiya9bd1e552014-12-09 14:51:52 +09001386 [gxvalid] Fix a naming convention conflicting with ftvalid.
1387
1388 See previous changeset for otvalid.
1389
1390 * src/gxvalid/{gxvcommn.h, gxvmort.h, gxvmorx.h}: Replace
1391 `valid' by `gxvalid'.
1392 * src/gxvalid/{gxvbsln.c, gxvcommn.c, gxvfeat.c, gxvjust.c,
1393 gxvkern.c, gxvlcar.c, gxvmort.c, gxvmort0.c, gxvmort1.c,
1394 gxvmort2.c, gxvmort4.c, gxvmort5.c, gxvmorx.c, gxvmorx0.c,
1395 gxvmorx1.c, gxvmorx2.c, gxvmorx4.c, gxvmorx5.c, gxvopbd.c,
1396 gxvprop.c, gxvtrak.c}: Replace `valid' by `gxvalid' if
1397 it is typed as GXV_Validator.
1398
13992014-12-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1400
suzuki toshiya51abdf62014-12-09 00:58:04 +09001401 [otvalid] Fix a naming convention conflicting with ftvalid.
1402
1403 Some prototypes in ftvalid.h use `valid' for the variables
1404 typed as FT_Validator. Their implementations in src/base/
1405 ftobjs.c and utilizations in src/sfnt/ttcmap.c do similar.
1406
1407 Some macros in otvcommn.h assume the exist of the variable
1408 `valid' typed as OTV_Validator in the caller.
1409
1410 Mixing these two conventions cause invalid pointer conversion
1411 and unexpected SEGV in longjmp. To prevent it, all variables
1412 typed as OTV_Validator are renamed to `otvalid'.
1413
1414 * src/otvalid/otvcommn.h: Replace `valid' by `otvalid'.
1415 * src/otvalid/{otvcommn.c, otvbase.c, otvgdef.c, otvgpos.c,
1416 otvgsub.c, otvjstf.c, otvmath.c}: Replace `valid' by `otvalid'
1417 if it is typed as OTV_Validator.
1418
14192014-12-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1420
suzuki toshiya2b592822014-12-10 00:27:41 +09001421 [ftvalid] Introduce FT_THROW() in FT_INVALID_XXX macros.
1422
1423 Original patch is designed by Werner Lemberg. Extra part
1424 for otvalid and gxvalid are added by suzuki toshiya, see
1425 discussion:
1426 http://lists.nongnu.org/archive/html/freetype-devel/2014-12/msg00002.html
1427 http://lists.nongnu.org/archive/html/freetype-devel/2014-12/msg00007.html
1428
1429 * include/internal/ftvalid.h: Introduce FT_THROW() in FT_INVALID_().
1430 * src/gxvalid/gxvcommn.h: Ditto.
1431 * src/otvalid/otvcommn.h: Ditto.
1432
Werner Lemberg74af85c2014-12-08 16:01:50 +010014332014-12-08 Werner Lemberg <wl@gnu.org>
1434
1435 [pcf] Fix Savannah bug #43774.
1436
1437 Work around `features' of X11's `pcfWriteFont' and `pcfReadFont'
1438 functions. Since the PCF format doesn't have an official
1439 specification, we have to exactly follow these functions' behaviour.
1440
1441 The problem was unveiled with a patch from 2014-11-06, fixing issue
1442 #43547.
1443
1444 * src/pcf/pcfread.c (pcf_read_TOC): Don't check table size for last
1445 element. Instead, assign real size.
1446
Werner Lemberg66883b52014-12-07 09:17:06 +010014472014-12-07 Werner Lemberg <wl@gnu.org>
1448
Werner Lemberg553c9672014-12-07 19:29:52 +01001449 Work around a bug in Borland's C++ compiler.
1450
1451 See
1452
1453 http://qc.embarcadero.com/wc/qcmain.aspx?d=118998
1454
1455 for Borland's bug tracker entry.
1456
1457 Reported by Yuliana Zigangirova <zigangirova@inbox.ru>,
1458 http://lists.gnu.org/archive/html/freetype-devel/2014-04/msg00001.html.
1459
1460 * include/internal/ftvalid.h (FT_ValidatorRec), src/smooth/ftgrays.c
1461 (gray_TWorker_): Move `ft_jmp_buf' field to be the first element.
1462
14632014-12-07 Werner Lemberg <wl@gnu.org>
1464
Werner Lemberg9870d6d2014-12-07 09:40:47 +01001465 */*: Decorate hex constants with `U' and `L' where appropriate.
1466
14672014-12-07 Werner Lemberg <wl@gnu.org>
1468
Werner Lemberg66883b52014-12-07 09:17:06 +01001469 [truetype] Prevent memory leak for buggy fonts.
1470
1471 * src/truetype/ttobjs.c (tt_size_done): Unconditionally call
1472 `tt_size_done_bytecode'.
1473
Werner Lemberg94926682014-12-06 07:11:44 +010014742014-12-06 Werner Lemberg <wl@gnu.org>
1475
1476 * Version 2.5.4 released.
1477 =========================
1478
1479
1480 Tag sources with `VER-2-5-4'.
1481
1482 * docs/VERSION.DLL: Update documentation and bump version number to
1483 2.5.4.
1484
1485 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
1486 builds/windows/vc2005/index.html,
1487 builds/windows/vc2008/freetype.vcproj,
1488 builds/windows/vc2008/index.html,
1489 builds/windows/vc2010/freetype.vcxproj,
1490 builds/windows/vc2010/index.html,
1491 builds/windows/visualc/freetype.dsp,
1492 builds/windows/visualc/freetype.vcproj,
1493 builds/windows/visualc/index.html,
1494 builds/windows/visualce/freetype.dsp,
1495 builds/windows/visualce/freetype.vcproj,
1496 builds/windows/visualce/index.html,
1497 builds/wince/vc2005-ce/freetype.vcproj,
1498 builds/wince/vc2005-ce/index.html,
1499 builds/wince/vc2008-ce/freetype.vcproj,
1500 builds/wince/vc2008-ce/index.html: s/2.5.3/2.5.4/, s/253/254/.
1501
1502 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4.
1503
1504 * builds/unix/configure.raw (version_info): Set to 17:3:11.
1505 * CMakeLists.txt (VERSION_PATCH): Set to 4.
1506 * docs/CHANGES: Updated.
1507
Werner Lemberg934ef382014-12-04 06:38:51 +010015082014-12-04 Werner Lemberg <wl@gnu.org>
1509
1510 docs/CHANGES: Updated, formatted.
1511
Dave Arnold2cdc4562014-12-04 06:10:16 +010015122014-12-04 Dave Arnold <darnold@adobe.com>
1513
Dave Arnoldf89396c2014-12-04 06:17:26 +01001514 [cff] Modify an FT_ASSERT.
1515
1516 * src/cff/cf2hints.c (cf2_hintmap_map): After the fix for Savannah
1517 bug #43661, the test font `...aspartam.otf' still triggers an
1518 FT_ASSERT. Since hintmap still works with count==0, ...
1519 (cf2_glyphpath_lineTo, cf2_glyphpath_curveTo): ... add that term to
1520 suppress the assert.
1521
15222014-12-04 Dave Arnold <darnold@adobe.com>
1523
Dave Arnold2cdc4562014-12-04 06:10:16 +01001524 [cff] Fix Savannah bug #43661.
1525
1526 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdHSTEM,
1527 cf2_cmdVSTEM, cf2_cmdHINTMASK>: Don't append to stem arrays after
1528 hintmask is constructed.
1529
1530 * src/cff/cf2hints.c (cf2_hintmap_build): Add defensive code to
1531 avoid reading past end of hintmask.
1532
Werner Lemberg16188eb2014-12-03 10:18:34 +010015332014-12-03 Werner Lemberg <wl@gnu.org>
1534
Werner Lemberg8fa69a82014-12-03 20:07:14 +01001535 docs/CHANGES: Updated.
1536
15372014-12-03 Werner Lemberg <wl@gnu.org>
1538
Werner Lemberga632b5f2014-12-03 19:30:44 +01001539 [autofit] Better fix for conversion specifiers in debug messages.
1540
1541 Using `%ld' for pointer differences causes warnings on 32bit
1542 platforms. The correct type would be (the relatively new) `%td',
1543 however, this is missing on some important platforms.
1544
1545 This patch improves the change from 2014-11-28.
1546
1547 * src/autofit/afhints.c (AF_INDEX_NUM): Use `int' typecast. Our
1548 pointer differences are always sufficiently small.
1549 (af_glyph_hints_dump_points, af_glyph_hints_dump_segments,
1550 af_glyph_hints_dump_edge): Revert to `%d' and use `AF_INDEX_NUM'.
1551
15522014-12-03 Werner Lemberg <wl@gnu.org>
1553
Werner Lemberg16188eb2014-12-03 10:18:34 +01001554 FT_Sfnt_Tag: s/ft_sfnt_xxx/FT_SFNT_XXX/ for orthogonality.
1555
1556 All public FreeType enumeration and flag values are uppercase...
1557
1558 * include/tttables.h (FT_Sfnt_Tag): Implement it. For backwards
1559 compatilibity, retain the old values as macros.
1560
1561 * src/base/ftfstype.c (FT_Get_FSType_Flags), src/sfnt/sfdriver.c
1562 (get_sfnt_table): Updated.
1563
Werner Lemberg2af25ac2014-12-02 08:38:57 +010015642014-12-02 Werner Lemberg <wl@gnu.org>
1565
Werner Lembergde43ace2014-12-02 23:06:04 +01001566 * include/*: Improve structure of documentation.
1567
1568 . Add and update many `<Order>' tags.
1569 . Apply various documentation fixes.
1570 . Remove details to deprecated (or never implemented) data.
1571
15722014-12-02 Werner Lemberg <wl@gnu.org>
1573
Werner Lembergca1f5cc2014-12-02 22:49:25 +01001574 [docmaker] Always handle `<Order>' section elements.
1575
1576 Previously, those elements were handled only for sections present in
1577 a `<Sections>' chapter element.
1578
1579 * src/tools/docmaker/content.py (ContentProcessor::finish):
1580 Implement it.
1581
15822014-12-02 Werner Lemberg <wl@gnu.org>
1583
Werner Lembergef6a3522014-12-02 21:16:59 +01001584 [docmaker] Properly handle empty rows in Synopsis.
1585
1586 * src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Emit
1587 `&nbsp;' for empty fields.
1588
15892014-12-02 Werner Lemberg <wl@gnu.org>
1590
Werner Lemberg0e96f052014-12-02 11:08:31 +01001591 [docmaker] Thinko.
1592
1593 * src/tools/docmaker/content.py (DocBlock::get_markup_words_all):
1594 Emit `/empty/' string for first element also.
1595
15962014-12-02 Werner Lemberg <wl@gnu.org>
1597
Werner Lemberg102d4a72014-12-02 10:27:40 +01001598 [docmaker] Honour empty lines in `<Order>' section element.
1599
1600 This greatly improves the readability of the `Synopsis' links.
1601
1602 * src/tools/docmaker/content.py (DocBlock::get_markup_words_all):
1603 Insert string `/empty/' between items.
1604
1605 * src/tools/docmaker/formatter.py (Formatter::section_dump): Make it
1606 robust against nonexistent keys.
1607
1608 * src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Emit
1609 empty <td> elements for `/empty/'.
1610
16112014-12-02 Werner Lemberg <wl@gnu.org>
1612
Werner Lemberg2af25ac2014-12-02 08:38:57 +01001613 [docmaker] Ensure Python 3 compatibility.
1614
1615 * src/tools/docmaker/content.py (ContentProcessor::set_section,
1616 ContentProcessor::finish): Replace `has_key' function with `in'
1617 keyword.
1618
1619 * src/tools/docmaker/formatter.py (Formatter::__init__): Replace
1620 sorting function with a key generator.
1621 (Formatter::add_identifier): Replace `has_key' function with `in'
1622 keyword.
1623
1624 * src/tools/docmaker/tohtml.py (HtmlFormatter::html_source_quote):
1625 Replace `has_key' function with `in' keyword.
1626 (HtmlFormatter::index_exit, HtmlFormatter::section_enter): Use
1627 integer division.
1628 s/<>/>/.
1629
1630 * src/tools/docmaker/utils.py: Import `itertools'.
1631 (index_sort): Replaced by...
1632 (index_key): ... this new key generator (doing exactly the same).
1633
Werner Lemberg8f795112014-11-29 06:49:15 +010016342014-11-29 Werner Lemberg <wl@gnu.org>
1635
Werner Lemberg80bfeb12014-12-01 10:07:52 +01001636 [docmaker] Don't output a block multiple times.
1637
1638 This bug was hidden by not processing all lines of `<Order>' blocks.
1639
1640 * src/tools/docmaker/formatter.py (Formatter::section_dump): Filter
1641 out field names.
1642
16432014-11-29 Werner Lemberg <wl@gnu.org>
1644
Werner Lemberg0dbad762014-12-01 08:44:48 +01001645 [docmaker] Use field values as HTML link targets where possible.
1646
1647 * src/tools/docmaker/tohtml.py (HtmlFormatter::make_block_url):
1648 Accept second, optional argument to specify a name.
1649 (HtmlFormatter::html_source_quote): Link to field ID if possible.
1650 (HtmlFormatter::print_html_field_list): Emit `id' attribute.
1651
16522014-11-29 Werner Lemberg <wl@gnu.org>
1653
Werner Lemberg785b1d02014-11-30 22:16:34 +01001654 [docmaker] Allow empty lines in `<Order>' blocks.
1655
1656 Before this patch, the suggested order of entries stopped at the
1657 first empty line.
1658
1659 Obviously, nobody noticed that this problem caused a much reduced
1660 set of links in the `Synopsis' sections; in particular, the
1661 `<Order>' blocks contain a lot of entries that wouldn't be listed
1662 otherwise...
1663
1664 * src/tools/docmaker/content.py (DocBlock::get_markup_words_all):
1665 New function to iterate over all items.
1666 (DocSection::process): Use it.
1667
16682014-11-29 Werner Lemberg <wl@gnu.org>
1669
Werner Lemberg16b3e622014-11-30 20:58:27 +01001670 * src/tools/docmaker/sources.py (column) [Format 2]: Fix regexp.
1671
1672 After the single asterisk there must be no other immediately following
1673 asterisk.
1674
16752014-11-29 Werner Lemberg <wl@gnu.org>
1676
Werner Lemberg434bc692014-11-29 23:12:55 +01001677 * src/tools/docmaker/tohtml.py: Improve CSS for vertical spacing.
Werner Lemberg51987ea2014-11-29 22:19:29 +01001678
Werner Lemberg434bc692014-11-29 23:12:55 +010016792014-11-29 Werner Lemberg <wl@gnu.org>
1680
1681 [docmaker] Improve HTML code for table of contents.
1682
1683 * src/tools/docmaker/tohtml.py: Introduce a new table class `toc',
Werner Lemberg51987ea2014-11-29 22:19:29 +01001684 together with proper CSS.
1685
16862014-11-29 Werner Lemberg <wl@gnu.org>
1687
Werner Lembergaa834ce2014-11-29 20:08:29 +01001688 [docmaker] Provide higher-level markup and simplify HTML.
1689
1690 * src/tools/docmaker/tohtml.py: Instead of using extraneous `<div>'
1691 elements, use CSS descendants (of class `section') to format the
1692 data.
1693
1694 Also remove reduntant <p> and <br> elements, replacing them with
1695 proper CSS.
1696
1697 Globally reduce page width to 75%.
1698
1699 (block_header): Rename <div> class to `section'.
1700
17012014-11-29 Werner Lemberg <wl@gnu.org>
1702
Werner Lemberg3bb97022014-11-29 16:12:37 +01001703 [docmaker] Add `top' links after blocks.
1704
1705 * src/tools/docmaker/tohtml.py (block_footer_middle): Implement it.
1706
17072014-11-29 Werner Lemberg <wl@gnu.org>
1708
Werner Lemberga31f9712014-11-29 07:18:44 +01001709 * src/tools/docmaker/tohtml.py: Improve CSS for fields.
1710
Werner Lemberg3bb97022014-11-29 16:12:37 +01001711 Make fields align horizontally relative to full line width.
Werner Lemberga31f9712014-11-29 07:18:44 +01001712
17132014-11-29 Werner Lemberg <wl@gnu.org>
1714
Werner Lemberg8f795112014-11-29 06:49:15 +01001715 * src/tools/docmaker/tohtml.py: Fix index and TOC templates.
1716
1717 This thinko was introduced 2014-11-27.
1718
Werner Lembergba1ba0c2014-11-28 22:04:14 +010017192014-11-28 Werner Lemberg <wl@gnu.org>
1720
1721 [docmaker] Format field lists with CSS.
1722
1723 This also simplifies the inserted HTML code.
1724
1725 * src/tools/docmaker/tohtml.py
1726 (HtmlFormatter::print_html_field_list): Do it.
1727
suzuki toshiya348fffa2014-11-28 16:05:59 +090017282014-11-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1729
1730 Fix compiler warning to the comparison between signed and
1731 unsigned variable.
1732
1733 * src/pfr/pfrsbit.c (pfr_slot_load_bitmap): Fix the comparison
1734 between `ypos + ysize' and FT_INT_{MAX,MIN}.
1735
Werner Lembergba1ba0c2014-11-28 22:04:14 +010017362014-11-28 Werner Lemberg <wl@gnu.org>
Werner Lemberg984e0712014-11-28 05:33:58 +01001737
Werner Lembergba1ba0c2014-11-28 22:04:14 +01001738 [docmaker] Replace empty `<td>' with CSS.
Werner Lemberg46d4dc82014-11-28 05:49:56 +01001739
1740 * src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Do
1741 it.
1742
Werner Lembergba1ba0c2014-11-28 22:04:14 +010017432014-11-28 Werner Lemberg <wl@gnu.org>
Werner Lemberg46d4dc82014-11-28 05:49:56 +01001744
Werner Lemberg984e0712014-11-28 05:33:58 +01001745 [docmaker] Replace some `<table>' tags with `<h4>' and `<div>'.
1746
1747 * src/tools/docmaker/tohtml.py (marker_*): Use `<h4>'.
1748 (source_*): Use `<div>'.
1749 (HtmlFormatter::block_enter): s/<h4>/<h3>/.
1750
suzuki toshiya9ee6a0a2014-11-28 11:14:18 +090017512014-11-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1752
1753 Fix compiler warning to conversion specifiers in debug messages.
1754
1755 * src/autofit/afhints.c (af_glyph_hints_dump_points): Add length
Werner Lemberga632b5f2014-12-03 19:30:44 +01001756 modifier to dump long integers.
1757 (af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Ditto.
suzuki toshiya9ee6a0a2014-11-28 11:14:18 +09001758
Werner Lemberg26d699e2014-11-27 19:22:52 +010017592014-11-27 Werner Lemberg <wl@gnu.org>
1760
Werner Lemberg984e0712014-11-28 05:33:58 +01001761 * src/tools/docmaker/tohtml.py: Use more CSS for index.
Werner Lemberg7ea36342014-11-27 19:38:31 +01001762
17632014-11-27 Werner Lemberg <wl@gnu.org>
1764
Werner Lembergedcf8172014-11-27 19:28:48 +01001765 [docmaker] Replace `name' attribute of `<a>' with `id'.
1766
1767 * src/tools/docmaker/tohtml.py (HtmlFormatter::block_enter): Do it.
1768
17692014-11-27 Werner Lemberg <wl@gnu.org>
1770
Werner Lemberg26d699e2014-11-27 19:22:52 +01001771 * src/tools/docmaker/tohtml.py: Remove remaining `width' attributes.
1772
1773 For `Index' and `TOC' links, we now simply use the `text-align' CSS
1774 property of `<td>' to enforce flush-left and flush-right,
1775 eliminating the hack with an empty, full-width `<td>' element
1776 inbetween.
1777
1778 The change also enforces the same (smaller) size for all index and
1779 TOC links.
1780
suzuki toshiya2676e072014-11-28 00:58:25 +090017812014-11-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1782
suzuki toshiya1b12f5d2014-11-28 01:22:26 +09001783 * src/cff/cf2font.c: Include `ftcalc.h' to use FT_MSB(),
1784 cf2font.c could not find it under `make multi' build.
1785
17862014-11-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1787
suzuki toshiya2676e072014-11-28 00:58:25 +09001788 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Remove
1789 unrequired negative value check for `width' and `height'.
1790
Werner Lemberg8585cf52014-11-27 10:49:05 +010017912014-11-27 Werner Lemberg <wl@gnu.org>
1792
Werner Lembergdd3fee02014-11-27 13:20:52 +01001793 * src/tools/docmaker/tohtml.py: More HTML table refactoring.
1794
1795 Replace some `<table>' tags with `<div>' to simplify structure.
1796
1797 Move `bgcolor' attribute to CSS.
1798
1799 Replace most `width' attributes with CSS. The remaining instances
1800 (providing a similar effect as LaTeX's `\hfill' command) are removed
1801 in a later patch.
1802
18032014-11-27 Werner Lemberg <wl@gnu.org>
1804
Werner Lemberga5ad26a2014-11-27 10:52:24 +01001805 * src/tools/docmaker/tohtml.py: Replace <font> with CSS.
1806
18072014-11-27 Werner Lemberg <wl@gnu.org>
1808
Werner Lembergba67c612014-11-27 10:51:49 +01001809 * src/tools/docmaker/tohtml.py: Center <table> with CSS.
1810
18112014-11-27 Werner Lemberg <wl@gnu.org>
1812
Werner Lemberg5594fa52014-11-27 10:50:50 +01001813 * src/tools/docmaker/tohtml.py: Replace `<center>' with `<div>'.
1814
18152014-11-27 Werner Lemberg <wl@gnu.org>
1816
Werner Lemberg8585cf52014-11-27 10:49:05 +01001817 * src/tools/docmaker/tohtml.py: Remove redundant `<center>' tags.
1818
1819 This starts a series of commits into the direction of generating
1820 valid HTML 5 code, especially using much more CSS.
1821
suzuki toshiya1b057042014-11-27 17:53:20 +090018222014-11-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1823
1824 Prevent too negative values (< FT_INT_MIN) in bitmap metrics,
1825 suggested by Alexei.
1826
1827 * src/pfr/pfrsbit.c (pfr_slot_load_bitmap): Prevent too
1828 negative values in `xpos' and `ypos + ysize'.
1829 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Prevent
1830 too negative values in `x_left' and `y_top'. Either negative
1831 values in `width' and `height' are checked.
1832
Werner Lemberg3d167cb2014-11-27 05:19:41 +010018332014-11-27 Werner Lemberg <wl@gnu.org>
1834
Werner Lembergc52882a2014-11-27 08:01:25 +01001835 [docmaker] Produce better HTML code.
1836
1837 * src/tools/docmaker/tohtml.py: Always use double quotes for
1838 attribute values.
1839 (source_footer): Close `td' and `tr' groups.
1840
18412014-11-27 Werner Lemberg <wl@gnu.org>
1842
Werner Lembergdbb93152014-11-27 07:20:48 +01001843 Use better way to disable creation of .pyc files for `make refdoc'.
1844
1845 Python 2.6 was released in 2008...
1846
1847 * builds/freetype.mk (refdoc): Use python's `-B' option.
1848
1849 * builds/detect.mk (std_setup, dos_setup): Mention required python
1850 version for `refdoc' target.
1851
18522014-11-27 Werner Lemberg <wl@gnu.org>
1853
Werner Lemberge8a5c332014-11-27 06:48:37 +01001854 * src/tools/docmaker/sources.py (re_bold, re_italic): Use
1855 non-grouping parentheses.
1856 * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word):
1857 Updated.
1858
18592014-11-27 Werner Lemberg <wl@gnu.org>
1860
Werner Lemberg3d167cb2014-11-27 05:19:41 +01001861 * src/base/ftobjs.c (FT_Get_Glyph_Name): Fix compiler warning.
1862
1863 Introdruced in previous change. Reported by Alexei.
1864
Werner Lemberga593a042014-11-26 18:42:48 +010018652014-11-26 Werner Lemberg <wl@gnu.org>
1866
Werner Lembergf34f1922014-11-26 21:59:21 +01001867 * src/*: Add checks for parameters of API functions where missing.
1868
1869 `API functions' are functions tagged with `FT_EXPORT_DEF'.
1870
1871 Besides trivial fixes, the following changes are included, too.
1872
1873 * src/base/ftbdf.c (FT_Get_BDF_Charset_ID, FT_Get_BDF_Property): Set
1874 error code if no service is available.
1875
1876 * src/base/ftinit.c (FT_Done_FreeType): Change return value for
1877 invalid `library' parameter to `Invalid_Library_Handle'.
1878
1879 * src/base/ftobjs.c (FT_New_Size): Change return value for invalid
1880 `asize' parameter to `Invalid_Argument'.
1881
1882 * src/base/ftoutln.c (FT_Outline_Copy): Change return value for
1883 invalid `source' and `target' parameters to `Invalid_Outline'.
1884 (FT_Outline_Done_Internal): Change return value for invalid
1885 `outline' parameter to `Invalid_Outline'.
1886
18872014-11-26 Werner Lemberg <wl@gnu.org>
1888
Werner Lemberga593a042014-11-26 18:42:48 +01001889 * src/cache/ftcbasic.c: Use single calls to `FT_TRACE'.
1890
suzuki toshiya5aff8532014-11-26 14:36:12 +090018912014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1892
suzuki toshiyacd4a5a22014-11-27 00:20:48 +09001893 * src/base/ftobj.c (Mac_Read_POST_Resource): Additional
1894 overflow check in the summation of POST fragment lengths,
1895 suggested by Mateusz Jurczyk <mjurczyk@google.com>.
1896
18972014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1898
suzuki toshiya1720e812014-11-26 16:39:00 +09001899 * src/base/ftobjs.c (Mac_Read_POST_Resource): Insert comments
1900 and fold too long tracing messages.
1901
19022014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1903
suzuki toshiya18a8f0d2014-11-26 16:11:38 +09001904 Fix Savannah bug #43540.
1905
1906 * src/base/ftmac.c (parse_fond): Prevent a buffer overrun
1907 caused by a font including too many (> 63) strings to store
1908 names[] table.
1909
19102014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1911
suzuki toshiya45331672014-11-26 16:02:17 +09001912 * src/base/ftobjs.c (Mac_Read_POST_Resource): Use unsigned long
1913 variables to read the lengths in POST fragments. Suggested by
1914 Mateusz Jurczyk <mjurczyk@google.com>.
1915
19162014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1917
suzuki toshiya35252ae2014-11-26 15:52:23 +09001918 Fix Savannah bug #43539.
1919
1920 * src/base/ftobjs.c (Mac_Read_POST_Resource): Fix integer overflow
1921 by a broken POST table in resource-fork.
1922
19232014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1924
suzuki toshiya240c94a2014-11-26 15:43:29 +09001925 Fix Savannah bug #43538.
1926
1927 * src/base/ftobjs.c (Mac_Read_POST_Resource): Fix integer overflow
1928 by a broken POST table in resource-fork.
1929
19302014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
1931
suzuki toshiya5aff8532014-11-26 14:36:12 +09001932 * src/base/ftobjs.c (Mac_Read_POST_Resource): Avoid memory leak
1933 by a broken POST table in resource-fork. Return after freeing
1934 the buffered POST table when it is found to be broken.
1935
Werner Lemberg04edbbd2014-11-25 10:21:13 +010019362014-11-25 Werner Lemberg <wl@gnu.org>
1937
Werner Lemberg02b8e7e2014-11-25 11:31:51 +01001938 */*: s/Invalid_Argument/Invalid_Size_Handle/ where appropriate.
1939
19402014-11-25 Werner Lemberg <wl@gnu.org>
1941
Werner Lemberg0d4aa232014-11-25 11:26:14 +01001942 */*: s/Invalid_Argument/Invalid_Stream_Handle/ where appropriate.
1943
19442014-11-25 Werner Lemberg <wl@gnu.org>
1945
Werner Lembergf4f9e682014-11-25 11:11:55 +01001946 */*: s/Invalid_Argument/Invalid_Library_Handle/ where appropriate.
1947
19482014-11-25 Werner Lemberg <wl@gnu.org>
1949
Werner Lemberg04c2aa12014-11-25 10:22:12 +01001950 */*: s/Invalid_Argument/Invalid_Outline/ where appropriate.
1951
19522014-11-25 Werner Lemberg <wl@gnu.org>
1953
Werner Lemberg04edbbd2014-11-25 10:21:13 +01001954 */*: s/Invalid_Argument/Invalid_Face_Handle/ where appropriate.
1955
Werner Lembergeca0f062014-11-24 10:22:08 +010019562014-11-24 Werner Lemberg <wl@gnu.org>
1957
Werner Lemberg3e867112014-11-25 09:01:07 +01001958 [Savannah bug #43682] Adjust some renderer callbacks.
1959
1960 * src/raster/ftraster.c (ft_black_set_mode): Change return type to
1961 `int' to stay in sync with `FT_Renderer_SetModeFunc' prototype.
1962
1963 * src/smooth/ftgrays.c (gray_raster_set_mode): New dummy function
1964 for orthogonality.
1965 (ft_grays_raster): Use it.
1966
Werner Lemberg04edbbd2014-11-25 10:21:13 +010019672014-11-25 Werner Lemberg <wl@gnu.org>
Werner Lemberg3e867112014-11-25 09:01:07 +01001968
Werner Lemberg6689a002014-11-25 08:53:09 +01001969 [Savannah bug #43682] Properly handle missing return errors.
1970
1971 The functions in this patch *do* return non-trivial errors that must
1972 be taken care of.
1973
1974 * src/autofit/afloader.c (af_loader_load_g), src/base/ftobjs.c
1975 (FT_Render_Glyph_Internal), src/base/ftoutln.c (FT_Outline_Render),
1976 src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_endchar>,
1977 src/psaux/psobjs.c (ps_parser_load_field_table), src/psaux/t1decode
1978 (t1_decoder_parse_charstrings) <op_endchar>, src/truetype/ttgload.c
1979 (load_truetype_glyph <subglyph loop>, tt_loader_init,
1980 TT_Load_Glyph), src/truetype/ttgxvar.c (TT_Set_MM_Blend),
1981 src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Do it.
1982
Werner Lemberg04edbbd2014-11-25 10:21:13 +010019832014-11-25 Werner Lemberg <wl@gnu.org>
Werner Lemberg6689a002014-11-25 08:53:09 +01001984
Werner Lembergb24e8ba2014-11-25 08:30:49 +01001985 [Savannah bug #43682] Add/remove `void' casts to some functions.
1986
1987 We use a cast to indicate that we intentionally ignore a function's
1988 return value. However, this doesn't apply to API functions where
1989 errors can only happen for trivially invalid input.
1990
1991 * src/base/ftstroke.c (FT_Glyph_Stroke, FT_Glyph_StrokeBorder),
1992 src/base/ftsynth.c (FT_GlyphSlot_Embolden), src/cff/cffgload.c
1993 (cff_slot_load), src/pfr/pfrdrivr.c (pfr_get_kerning),
1994 src/type1/t1load.c (parse_encoding), src/type42/t42parse.c
1995 (t42_parse_encoding): Do it.
1996
Werner Lemberg04edbbd2014-11-25 10:21:13 +010019972014-11-25 Werner Lemberg <wl@gnu.org>
Werner Lembergb24e8ba2014-11-25 08:30:49 +01001998
Werner Lembergef439fd2014-11-25 08:14:15 +01001999 [Savannah bug #43682] Change some signatures to `void' return type.
2000
2001 * include/internal/pshints.h (PSH_Globals_SetScaleFunc),
2002 include/internal/sfnt.h (TT_Get_Metrics_Func),
2003 src/pshinter/pshglob.c (psh_globals_set_scale),
2004 src/pshinter/pshrec.c (ps_hints_init), src/sfnt/ttmtx.c
2005 (tt_face_get_metrics), src/truetype/ttinterp.c (TT_Goto_CodeRange,
2006 TT_Set_CodeRange, TT_Clear_CodeRange, TT_Done_Context,
2007 TT_Save_Context): Do it.
2008
2009 * src/pshinter/pshglob.h, src/pshinter/pshrec.h, src/sfnt/ttmtx.h,
2010 src/truetype/ttgload.c (TT_Hint_Glyph), src/truetype/ttinterp.c
2011 (TT_Run_Context), src/truetype/ttinterp.h, src/truetype/ttobjs.c
2012 (tt_size_run_fpgm, tt_size_run_prep): Updated.
2013
20142014-11-24 Werner Lemberg <wl@gnu.org>
2015
Werner Lemberg6889f7b2014-11-24 17:16:08 +01002016 Remove all code related to FT_MAX_CHARMAP_CACHEABLE.
2017
2018 This is no longer used.
2019
2020 * src/base/ftobjs.c, src/cache/ftccmap.c, src/cff/cffobjs.c,
2021 src/sfnt/ttcmap.c: Do it.
2022
20232014-11-24 Werner Lemberg <wl@gnu.org>
2024
Werner Lembergf0292bb2014-11-24 10:51:21 +01002025 [sfnt] Fix Savannah bug #43680.
2026
2027 This adds an additional constraint to make the fix from 2013-01-25
2028 really work.
2029
2030 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_image) <index_format==4>:
2031 Check `p' before `num_glyphs'.
2032
20332014-11-24 Werner Lemberg <wl@gnu.org>
2034
Werner Lembergeca0f062014-11-24 10:22:08 +01002035 [truetype] Fix Savannah bug #43679.
2036
2037 * src/truetype/ttpload.c (tt_face_load_hdmx): Check minimum size of
2038 `record_size'.
2039
Jarkko Pöyry96341dc2014-11-24 09:53:07 +010020402014-11-24 Jarkko Pöyry <jarkko.poyry@gmail.com>
2041
2042 [cff, pfr, psaux, winfonts] Fix Savannah bug #43676.
2043
Werner Lemberged6a9df2014-12-06 23:28:58 +01002044 Don't cast cmap init function pointers to an incompatible type.
Jarkko Pöyry96341dc2014-11-24 09:53:07 +01002045
2046 Without this patch, the number of parameters between declaration and
2047 the real signature differs. Calling such a function results in
2048 undefined behavior.
2049
2050 ISO/IEC 9899:TC3 (Committee Draft September 7, 2007)
2051 6.5.2.2 Function calls
2052 9 If the function is defined with a type that is not
2053 compatible with the type (of the expression) pointed to by
2054 the expression that denotes the called function, the
2055 behavior is undefined.
2056
2057 On certain platforms (c -> js with emscripten) this causes
2058 termination of execution or invalid calls because in the emscripten
2059 implementation, function pointers of different types are stored in
2060 different pointer arrays. Incorrect pointer type here results in
2061 indexing of an incorrect array.
2062
2063 * src/cff/cffcmap.c (cff_cmap_encoding_init, cff_cmap_unicode_init),
2064 src/pfr/pfrcmap.c (pfr_cmap_init), src/psaux/t1cmap.c
2065 t1_cmap_standard_init, t1_cmap_expert_init, t1_cmap_custom_init,
2066 t1_cmap_unicode_init), src/winfonts/winfnt.c (fnt_cmap_init): Fix
2067 signature.
2068
Werner Lemberga7a42072014-11-24 06:44:45 +010020692014-11-24 Werner Lemberg <wl@gnu.org>
2070
Werner Lembergf70d9342014-11-24 09:31:32 +01002071 [sfnt] Fix Savannah bug #43672.
2072
2073 * src/sfnt/ttkern.c (tt_face_load_kern): Use correct value for
2074 minimum table length test.
2075
20762014-11-24 Werner Lemberg <wl@gnu.org>
2077
Werner Lemberg73be9f92014-11-24 07:30:05 +01002078 [type1, type42] Another fix for Savannah bug #43655.
2079
2080 * src/type1/t1load.c (parse_charstrings), src/type42/t42parse.c
2081 (t42_parse_charstrings): Add another boundary testing.
2082
20832014-11-24 Werner Lemberg <wl@gnu.org>
2084
Werner Lemberga7a42072014-11-24 06:44:45 +01002085 [docmaker] Formatting, copyright, improved documentation.
2086
2087 * src/tools/docmaker/*: No code changes besides trivial
2088 modifications.
2089
Werner Lemberg9bd20b72014-11-22 06:24:45 +010020902014-11-22 Werner Lemberg <wl@gnu.org>
2091
Werner Lembergaf834612014-11-22 13:29:10 +01002092 [bdf] Fix Savannah bug #43660.
2093
2094 * src/bdf/bdflib.c (_bdf_parse_glyphs) <"ENDFONT">: Check
2095 `_BDF_GLYPH_BITS'.
2096
20972014-11-22 Werner Lemberg <wl@gnu.org>
2098
Werner Lemberg42fcd662014-11-22 12:44:33 +01002099 [type42] Allow only embedded TrueType fonts.
2100
2101 This is a follow-up to Savannah bug #43659.
2102
2103 * src/type42/t42objs.c (T42_Face_Init): Exclusively use the
2104 `truetype' font driver for loading the font contained in the `sfnts'
2105 array.
2106
21072014-11-22 Werner Lemberg <wl@gnu.org>
2108
Werner Lemberg37881872014-11-22 10:46:47 +01002109 [type42] Fix Savannah bug #43659.
2110
2111 * src/type42/t42objs.c (T42_Open_Face): Initialize `face->ttf_size'.
2112
2113 * src/type42/t42parse.c (t42_parse_sfnts): Always set
2114 `face->ttf_size' directly. This ensures a correct stream size in
2115 the call to `FT_Open_Face', which follows after parsing, even for
2116 buggy input data.
2117 Fix error messages.
2118
21192014-11-22 Werner Lemberg <wl@gnu.org>
2120
Werner Lemberg5f201ab2014-11-22 09:16:39 +01002121 [cff] Fix Savannah bug #43658.
2122
2123 * src/cff/cf2ft.c (cf2_builder_lineTo, cf2_builder_cubeTo): Handle
2124 return values of point allocation routines.
2125
21262014-11-22 Werner Lemberg <wl@gnu.org>
2127
Werner Lemberg9bd20b72014-11-22 06:24:45 +01002128 [sfnt] Fix Savannah bug #43656.
2129
2130 * src/sfnt/ttcmap.c (tt_cmap4_validate): Fix order of validity
2131 tests.
2132
Werner Lemberg6de76172014-11-21 06:05:49 +010021332014-11-21 Werner Lemberg <wl@gnu.org>
2134
Werner Lembergdd897102014-11-21 22:19:28 +01002135 [type1, type42] Fix Savannah bug #43655.
2136
2137 * src/type1/t1load.c (parse_charstrings), src/type42/t42parse.c
2138 (t42_parse_charstrings): Fix boundary testing.
2139
21402014-11-21 Werner Lemberg <wl@gnu.org>
2141
Werner Lembergb1fc00d2014-11-21 12:06:40 +01002142 * src/pcf/pcfread.c (pcf_get_metrics): Sanitize invalid metrics.
2143
21442014-11-21 Werner Lemberg <wl@gnu.org>
2145
Werner Lemberg9154dab2014-11-21 08:03:51 +01002146 [ftlcdfil] Obey flow direction.
2147
2148 * src/base/ftlcdfil.c (_ft_lcd_filter_fir, _ft_lcd_filter_legacy):
2149 Handle `up' flow.
2150
21512014-11-21 Werner Lemberg <wl@gnu.org>
2152
Werner Lemberg644d6fa2014-11-21 07:28:50 +01002153 * src/base/ftbitmap.c (FT_Bitmap_Convert): Improve.
2154
2155 This commit completes argument checks and adds support for different
2156 flow directions.
2157
21582014-11-21 Werner Lemberg <wl@gnu.org>
2159
Werner Lemberg6de76172014-11-21 06:05:49 +01002160 * src/base/ftbitmap.c (FT_Bitmap_Copy): Improve.
2161
2162 This commit adds argument checks and support for different flow
2163 directions.
2164
Werner Lemberg1e6e1b82014-11-20 21:07:56 +010021652014-11-20 Werner Lemberg <wl@gnu.org>
2166
2167 * src/base/ftbitmap.c (FT_Bitmap_New): Check argument.
2168
Werner Lembergd6061212014-11-19 21:13:23 +010021692014-11-19 Werner Lemberg <wl@gnu.org>
2170
Werner Lembergb3500af2014-11-19 21:28:21 +01002171 Change some fields in `FT_Bitmap' to unsigned type.
2172
2173 This doesn't break ABI.
2174
2175 * include/ftimage.h (FT_Bitmap): Make `rows', `width', `num_grays',
2176 `pixel_mode', and `palette_mode' unsigned types.
2177
2178 * src/base/ftbitmap.c: Updated.
2179 (FT_Bitmap_Copy): Fix casts.
2180
2181 * src/cache/ftcsbits.c, src/raster/ftraster.c, src/sfnt/pngshim.c:
2182 Updated.
2183
21842014-11-19 Werner Lemberg <wl@gnu.org>
2185
Werner Lembergdf485772014-11-19 21:21:23 +01002186 Make `FT_Bitmap_Convert' correctly handle negative `pitch' values.
2187
2188 * src/base/ftbitmap.c (FT_Bitmap_Convert): Always use positive value
2189 for the pitch while copying data.
2190 Correctly set pitch sign in target bitmap.
2191
21922014-11-19 Werner Lemberg <wl@gnu.org>
2193
Werner Lembergd6061212014-11-19 21:13:23 +01002194 Minor code improvement in `FT_Bitmap_Embolden'.
2195
2196 * src/base/ftbitmap.c (FT_Bitmap_Embolden) <FT_PIXEL_MODE_GRAY[24]>:
2197 Fix thinko.
2198
Alexei Podtelezhnikovf841ad32014-11-19 21:19:06 -050021992014-11-19 Alexei Podtelezhnikov <apodtele@gmail.com>
2200
2201 * src/base/fttrigon.c: Use dedicated `FT_Angle' for arctan table.
2202
Werner Lemberga67c43e2014-11-19 06:46:23 +010022032014-11-19 Behdad Esfahbod <behdad@behdad.org>
2204
2205 Avoid compiler warnings on x86-64 for `FT_MulFix'.
2206
2207 `FT_MulFix' takes `FT_Long' parameters as defined in `freetype.h',
2208 but several inline implementations of it in `ftcalc.h' take
2209 `FT_Int32' arguments. This is causing compiler warnings on x86-64:
2210 If parameters of type `FT_Fixed' (= `FT_Long') are passed to the
2211 inline implementation of this function, integer values are truncated
2212 from 64bit to 32bit.
2213
2214 * include/internal/ftcalc.h (FT_MulFix) [FT_MULFIX_ASSEMBLER]: Add
2215 casts.
2216
Werner Lemberg54abd222014-11-15 09:05:22 +010022172014-11-15 Werner Lemberg <wl@gnu.org>
2218
2219 [sfnt] Fix Savannah bug #43597.
2220
2221 * src/sfnt/pngshim.c (Load_SBit_Png): Protect against too large
2222 bitmaps.
2223
Werner Lemberg602040b2014-11-12 20:51:20 +010022242014-11-12 Werner Lemberg <wl@gnu.org>
2225
Werner Lemberg257c2702014-11-12 21:42:13 +01002226 [sfnt] Fix Savannah bug #43591.
2227
2228 * src/sfnt/ttsbit.c (tt_sbit_decoder_init): Protect against addition
2229 and multiplication overflow.
2230
22312014-11-12 Werner Lemberg <wl@gnu.org>
2232
Werner Lemberg677ddf42014-11-12 21:26:44 +01002233 [sfnt] Fix Savannah bug #43590.
2234
2235 * src/sfnt/ttload.c (check_table_dir, tt_face_load_font_dir):
2236 Protect against addition overflow.
2237
22382014-11-12 Werner Lemberg <wl@gnu.org>
2239
Werner Lembergf46add12014-11-12 21:06:08 +01002240 [sfnt] Fix Savannah bug #43589.
2241
2242 * src/sfnt/sfobjs.c (woff_open_font): Protect against addition
2243 overflow.
2244
22452014-11-12 Werner Lemberg <wl@gnu.org>
2246
Werner Lemberg602040b2014-11-12 20:51:20 +01002247 [sfnt] Fix Savannah bug #43588.
2248
2249 * src/sfnt/ttcmap.c (tt_cmap8_validate, tt_cmap10_validate,
2250 tt_cmap12_validate, tt_cmap13_validate, tt_cmap14_validate): Protect
2251 against overflow in additions and multiplications.
2252
Alexei Podtelezhnikov2e73a1b2014-11-09 23:22:43 -050022532014-11-10 Alexei Podtelezhnikov <apodtele@gmail.com>
2254
2255 [base] CORDIC improvements.
2256
2257 The scaling between the hypotenuse and its CORDIC approximation is
2258 based on regression analysis. The smaller padding for `theta' is
2259 justifed by its maximum error of less than 6.
2260
2261 * src/base/fttrigon.c (ft_trig_downscale): Borrow code from
2262 ./ftcalc.c (ft_multo64), change linear intercept.
2263 (ft_trig_pseudo_polarize): Decrease `theta' padding.
2264
Werner Lemberg0e73d212014-11-09 01:27:38 +010022652014-11-09 Werner Lemberg <wl@gnu.org>
2266
2267 * src/base/ftstroke.c (ft_stroker_inside): Fix border intersections.
2268
2269 One more place to check whether `radius' is zero.
2270
2271 Problem reported by Marco Wertz <marco.wertz@gmx.de>.
2272
Werner Lemberg2c4832d2014-11-07 07:42:33 +010022732014-11-07 Werner Lemberg <wl@gnu.org>
2274
Werner Lemberg602040b2014-11-12 20:51:20 +01002275 [bdf] Fix Savannah bug #43535.
Werner Lemberg2c4832d2014-11-07 07:42:33 +01002276
2277 * src/bdf/bdflib.c (_bdf_strncmp): New macro that checks one
2278 character more than `strncmp'.
2279 s/ft_strncmp/_bdf_strncmp/ everywhere.
2280
Werner Lembergf49a1002014-11-06 13:30:28 +010022812014-11-06 Werner Lemberg <wl@gnu.org>
2282
Werner Lemberg602040b2014-11-12 20:51:20 +01002283 [pcf] Fix Savannah bug #43548.
Werner Lembergef1eba72014-11-06 23:25:05 +01002284
Werner Lemberg2c4832d2014-11-07 07:42:33 +01002285 * src/pcf/pcfread.c (pcf_get_encodings): Add sanity checks for row
2286 and column values.
Werner Lembergef1eba72014-11-06 23:25:05 +01002287
22882014-11-06 Werner Lemberg <wl@gnu.org>
2289
Werner Lemberg602040b2014-11-12 20:51:20 +01002290 [pcf] Fix Savannah bug #43547.
Werner Lemberg0e2f5d52014-11-06 22:32:46 +01002291
2292 * src/pcf/pcfread.c (pcf_read_TOC): Check `size' and `offset'
2293 values.
2294
22952014-11-06 Werner Lemberg <wl@gnu.org>
2296
Werner Lembergf49a1002014-11-06 13:30:28 +01002297 * src/pcf/pcfread.c (pcf_read_TOC): Avoid memory leak.
2298
Infinalityfacfc792014-11-03 07:24:59 +010022992014-11-03 Infinality <infinality@infinality.net>
2300
2301 * src/truetype/ttsubpix.c (COMPATIBILITY_MODE_Rules): Updated.
2302
2303 The previous commit deteriorates rendering of DejaVu and similar
2304 fonts; this gets compensated with this rule.
2305
Werner Lemberg706f7522014-11-03 07:20:57 +010023062014-11-03 Werner Lemberg <wl@gnu.org>
2307
2308 * src/truetype/ttinterp.c (Ins_DELTAP): Fix subpixel hinting.
2309
2310 Before this patch, it was impossible to ever call DELTAP[123] in
2311 subpixel hinting mode as described in the ClearType whitepaper; it
2312 only worked if in `compatibility mode'. However, compatibility mode
2313 essentially disables SHPIX, completely ruining hinting of
2314 ttfautohint output, for example.
2315
2316 We now follow the whitepaper more closely so that DELTAP[123]
2317 instructions for touched points in the non-subpixel direction are
2318 executed.
2319
Alexei Podtelezhnikove1efe0a2014-10-31 00:07:14 -040023202014-10-31 Alexei Podtelezhnikov <apodtele@gmail.com>
2321
Alexei Podtelezhnikov525d4872014-10-31 22:12:37 -04002322 [smooth] Improve code readability.
2323
2324 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Rearrange code.
2325
23262014-10-31 Alexei Podtelezhnikov <apodtele@gmail.com>
2327
Alexei Podtelezhnikove1efe0a2014-10-31 00:07:14 -04002328 [smooth] Reduce outline translations during rendering.
2329
2330 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Translate origin
2331 virtually by modifying cbox, actually translate outline if cumulative
2332 shift is not zero.
2333
Alexei Podtelezhnikovc7fd9352014-10-30 22:43:01 -040023342014-10-30 Alexei Podtelezhnikov <apodtele@gmail.com>
2335
2336 [smooth] Fix Savannah bug #35604 (cont'd).
2337
2338 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Remove checks and
2339 casts that became unnecessary after the variable type upgrades.
2340
Alexei Podtelezhnikov74916992014-10-29 22:24:24 -040023412014-10-29 Alexei Podtelezhnikov <apodtele@gmail.com>
2342
Alexei Podtelezhnikov465ab992014-10-29 23:45:23 -04002343 [smooth] Improve code readability.
2344
2345 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Rearrange code.
2346
23472014-10-29 Alexei Podtelezhnikov <apodtele@gmail.com>
2348
Alexei Podtelezhnikov74916992014-10-29 22:24:24 -04002349 Unify hypotenuse approximations.
2350
2351 * include/internal/ftcalc.h (FT_HYPOT): Move macro from here...
2352 * include/internal/ftobjs.h: ... to here, next to required `FT_ABS'.
2353 * src/smooth/ftgrays.c (gray_render_cubic): Use it here.
2354
Werner Lembergfe151522014-10-25 05:56:59 +020023552014-10-25 Werner Lemberg <wl@gnu.org>
2356
2357 [cff] Test valid darkening parameter macros in `ftoption.h'.
2358
2359 We no longer need an otherwise unused typedef that can cause a gcc
2360 warning.
2361 Problem reported by Alexei.
2362
2363 * src/cff/cffobjs.c (cff_driver_init): Use
2364 `CFF_CONFIG_OPTION_DARKENING_PARAMETER_XXX' macros directly.
2365 (SET_DARKENING_PARAMETERS): Removed.
2366 Compile time tests are now ...
2367
2368 * devel/ftoption.h, include/config/ftoption.h: ... here.
2369
Alexei Podtelezhnikovaba0f492014-10-24 23:50:57 -040023702014-10-25 Alexei Podtelezhnikov <apodtele@gmail.com>
2371
2372 Improve flat corner definition.
2373
2374 * include/internal/ftcalc.h (FT_HYPOT): Macro to approximate Euclidean
2375 distance with the alpha max plus beta min algorithm.
2376 * src/base/ftcalc.c (ft_corner_is_flat): Use it instead of Taxicab
2377 metric.
2378
David Weißdd8de1a2014-10-23 20:01:48 +020023792014-10-23 David Weiß <David.Weiss@ptvgroup.com>
2380
2381 [build] Improve property file for vc2010.
2382
2383 User-defined properties should be empty by default to prevent linker
2384 failures.
2385
2386 * builds/windows/vc2010/freetype.user.props,
2387 builds/windows/vc2010/freetype.vcxproj:
2388 s/OptionsDirectory/UserOptionDirectory/.
2389 Comment out all user options.
2390
Werner Lembergdd570e92014-10-23 19:57:37 +020023912014-10-23 Werner Lemberg <wl@gnu.org>
2392
2393 [cff] Work around bug in preprocessor of MSVC 2010.
2394
2395 We have been hit by
2396
2397 https://connect.microsoft.com/VisualStudio/feedback/details/718976/msvc-pr
2398
2399 * devel/ftoption.h, include/config/ftoption.h: Replace
2400 `CFF_CONFIG_OPTION_DARKENING_PARAMETERS' with eight macros
2401 `CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4}'.
2402
2403 * src/cff/cffobjs.c (SET_DARKENING_PARAMETERS): Removed. We no
2404 longer need double expansion.
2405 (SET_DARKENING_PARAMETERS_0): Renamed to ...
2406 (SET_DARKENING_PARAMETERS): ... this.
2407 Update call.
2408
Werner Lembergcc7bb802014-10-20 08:35:50 +020024092014-10-20 Werner Lemberg <wl@gnu.org>
2410
2411 [sbit] Minor fixes.
2412
2413 * src/sfnt/ttsbit.c (tt_face_load_sbit) [TT_SBIT_TABLE_TYPE_SBIX]:
2414 Accept overlay format also, but emit warning message in that case.
2415 (tt_sbit_decoder_load_metrics): Add missing newline to error
2416 message.
2417 (tt_sbit_load_sbix_image): Add `rgbl' graphic type (as used on iOS
2418 7.1) to the list of unsupported formats.
2419
Alexei Podtelezhnikov118e6512014-10-19 23:31:08 -040024202014-10-19 Alexei Podtelezhnikov <apodtele@gmail.com>
2421
2422 [truetype] Clean up bytecode rounding.
2423
2424 Zero distance does not have to be treated specially if you follow
2425 specifications and check the sign as the very last step of rounding.
2426
2427 * src/truetype/ttinterp.c (Round_None, Round_To_Grid,
2428 Round_Down_To_Grid, Round_Up_To_Grid, Round_To_Double_Grid): Use
2429 macros when available, do not check for non-zero distance.
2430 (Round_To_Half_Grid, Round_Super, Round_Super_45): Ditto, return phase
2431 if sign changed.
2432
Alexei Podtelezhnikovd4aabda2014-10-18 10:10:04 -040024332014-10-18 Alexei Podtelezhnikov <apodtele@gmail.com>
2434
2435 [truetype] Unwrap engine compensation settings.
2436
2437 * src/truetype/ttobjs.c (tt_size_init_bytecode): Updated.
2438
David Weißfede19e2014-10-18 14:59:20 +020024392014-10-18 David Weiß <David.Weiss@ptvgroup.com>
2440
2441 [build] Add property file to vc2010 project.
2442
2443 This simplifies custom build configurations, especially for
2444 automated build environments.
2445
2446 * builds/windows/vc2010/freetype.user.props: New configuration file.
2447
2448 * builds/windows/vc2010/freetype.vcxproj: Include
2449 `freetype.user.props' and use its data fields.
2450
2451 * builds/windows/vc2010/index.html: Updated.
2452
Werner Lembergc9c33f22014-10-18 11:01:14 +020024532014-10-18 Werner Lemberg <wl@gnu.org>
2454
2455 [autofit] Add blue-zone support for Telugu.
2456
2457 This essentially moves the Telugu script from the `Indic' hinter to
2458 the `Latin' hinter.
2459
2460 Note that this is a first shot and quite certainly needs
2461 refinements.
2462
2463 * src/autofit/afblue.dat: Add blue zone data for Telugu.
2464
2465 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2466
2467 * src/autofit/afscript.h: Add Telugu standard characters and move
2468 data out of AF_CONFIG_OPTION_INDIC block.
2469
2470 * src/autofit/afranges.c: Move Telugu data out of
2471 AF_CONFIG_OPTION_INDIC block.
2472
2473 * src/autofit/afstyles.h: Update Telugu data; in particular, use
2474 AF_WRITING_SYSTEM_LATIN.
2475
Werner Lemberg54306f52014-10-18 10:42:28 +020024762014-10-18 David Wimsey <david@wimsey.us>
2477
2478 [cmake] Add iOS build support.
Werner Lemberg1050aa92014-10-18 10:45:09 +02002479 From Savannah patch #8497.
Werner Lemberg54306f52014-10-18 10:42:28 +02002480
2481 * builds/cmake/iOS.cmake: New file. Universal binaries are built
2482 with both 32 and 64 bit arm architectures.
2483
2484 * CMakeLists.txt (IOS_PLATFORM): New variable for running the iOS
2485 toolchain. Possible values are `OS' to build on iOS, or
2486 `SIMULATOR' to build on APPLE.
2487
Werner Lemberg1a1750f2014-10-16 22:54:01 +020024882014-10-16 Behdad Esfahbod <behdad@behdad.org>
2489 Werner Lemberg <wl@gnu.org>
2490
2491 [cff] Add `CFF_CONFIG_OPTION_DARKENING_PARAMETERS' config macro.
2492
2493 * devel/ftoption.h, include/config/ftoption.h
2494 (CFF_CONFIG_OPTION_DARKENING_PARAMETERS): New macro.
2495
2496 * src/cff/cffobjs.c (SET_DARKENING_PARAMETERS,
2497 SET_DARKENING_PARAMETERS_0): New macros.
2498 (cff_driver_init): Use new macros.
2499
Alexei Podtelezhnikov7e83f062014-10-14 23:03:56 -040025002014-10-14 Alexei Podtelezhnikov <apodtele@gmail.com>
2501
2502 [truetype] Limit delta shift range.
2503
Werner Lembergdf3d67e2014-10-16 07:24:44 +02002504 The valid range for delta shift is zero through six. Negative values
2505 are invalid according to
2506
Alexei Podtelezhnikov7e83f062014-10-14 23:03:56 -04002507 https://developer.apple.com/fonts/TrueType-Reference-Manual/RM04/Chap4.html#delta%20shift
2508
2509 * src/truetype/ttobjs.h (delta_shift, delta_base): Make unsigned.
Werner Lembergdf3d67e2014-10-16 07:24:44 +02002510 * src/truetype/ttinterp.h (DO_SDS): Throw an error if `delta_shift'
2511 is out of range.
2512 (Ins_DELTAP, Ins_DELTAC): Optimize for valid `delta_shift'.
Alexei Podtelezhnikov7e83f062014-10-14 23:03:56 -04002513
Werner Lemberg03987bf2014-10-16 07:19:46 +020025142014-10-16 Werner Lemberg <wl@gnu.org>
2515
2516 A better fix for Savannah bug #43392.
2517 Suggested by Doug Felt <dougfelt@gmail.com>.
2518
Werner Lembergdf3d67e2014-10-16 07:24:44 +02002519 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics): Set
Werner Lemberg03987bf2014-10-16 07:19:46 +02002520 `vertAdvance' to zero...
2521
2522 * src/truetype/ttgload.c (TT_Load_Glyph): ... and set here a default
2523 value for `vertAdvance' based on `linearVertAdvance' in case
2524 `vertAdvance' is zero. Note that the previous computed ad-hoc value
2525 for `linearVertAdvance' was apparently not tested in a real-life
2526 situation.
2527
David Weiß3889cb22014-10-14 11:35:16 +020025282014-10-14 David Weiß <David.Weiss@ptvgroup.com>
2529
2530 [build] Better optimization settings for vc2010 solution file.
2531
2532 * builds/windows/vc2010/freetype.sln,
2533 builds/windows/vc2010/freetype.vcxproj: Updated.
2534
Werner Lemberg8f178092014-10-14 08:28:09 +020025352014-10-14 Werner Lemberg <wl@gnu.org>
2536
2537 [autofit] Adjust Devenagari character range.
2538
2539 * src/autofit/afranges.c (af_deva_uniranges): Omit characters that
2540 are common to all other Indic scripts.
2541
Werner Lemberg1ca5fa12014-10-12 08:31:32 +020025422014-10-12 Werner Lemberg <wl@gnu.org>
2543
2544 [sfnt] Fix Savannah bug #43392.
2545
2546 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics): Don't let
2547 vertical metrics uninitialized.
2548
Alexei Podtelezhnikov673a28e2014-10-11 14:40:51 -040025492014-10-11 Alexei Podtelezhnikov <apodtele@gmail.com>
2550
2551 [base] Small bbox correction.
2552
2553 * src/base/ftbbox.c (FT_Outline_Get_BBox): Start from nonsense bbox
Werner Lembergdf3d67e2014-10-16 07:24:44 +02002554 instead of initial point that could be `off' in conic outlines.
Alexei Podtelezhnikov673a28e2014-10-11 14:40:51 -04002555
Alexei Podtelezhnikov2ffcf172014-10-08 22:01:08 -040025562014-10-08 Alexei Podtelezhnikov <apodtele@gmail.com>
2557
Alexei Podtelezhnikov40dac112014-10-09 00:58:14 -04002558 [base] Fix Savannah bug #43356.
2559
2560 * src/base/ftbbox.c (BBox_Move_To, BBox_Conic_To): Update bbox in case
Werner Lembergdf3d67e2014-10-16 07:24:44 +02002561 of implicit `to'.
Alexei Podtelezhnikov40dac112014-10-09 00:58:14 -04002562 (BBox_Line_To): New emitter that does not update bbox.
2563
25642014-10-08 Alexei Podtelezhnikov <apodtele@gmail.com>
2565
Alexei Podtelezhnikov2ffcf172014-10-08 22:01:08 -04002566 [base] Introduce and use new macro `FT_UPDATE_BBOX'
2567
2568 * src/base/ftbbox.c (FT_UPDATE_BBOX): New macro.
2569 (FT_Outline_Get_BBox): Use it here.
2570
Alexei Podtelezhnikov7abdb8c2014-10-02 23:13:33 -040025712014-10-02 Alexei Podtelezhnikov <apodtele@gmail.com>
2572
2573 [base] Significant optimization of `ft_div64by32'
2574
2575 We shift as many bits as we can into the high register, perform
2576 32-bit division with modulo there, then work through the remaining
2577 bits with long division. This optimization is especially noticeable
2578 for smaller dividends that barely use the high register.
2579
2580 * src/base/ftcalc.c (ft_div64by32): Updated.
2581
Dave Arnold537c55d2014-10-02 06:32:32 +020025822014-10-02 Dave Arnold <darnold@adobe.com>
2583
2584 [cff] Fix Savannah bug #43271.
2585
2586 * src/cff/cf2font.c (cf2_computeDarkening): Change overflow
2587 detection to use logarithms and clamp `scaledStem'.
2588
Alexei Podtelezhnikov418e18f2014-10-01 22:36:40 -040025892014-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
2590
Alexei Podtelezhnikov74d0aad2014-10-01 23:27:15 -04002591 * src/base/ftcalc.c: Remove miscellaneous type casts.
2592
25932014-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
2594
Alexei Podtelezhnikov418e18f2014-10-01 22:36:40 -04002595 [base] Use more common `FT_MSB' implementation with masks.
2596
2597 * src/base/ftcalc.c (FT_MSB): Updated.
2598
Alexei Podtelezhnikov955aff12014-09-30 23:09:39 -040025992014-09-30 Alexei Podtelezhnikov <apodtele@gmail.com>
2600
2601 [base] Clean up.
2602
2603 * src/base/ftcalc.c (FT_MOVE_SIGN): New macro for frequently used
2604 code.
2605
Alexei Podtelezhnikov7f491112014-09-25 22:54:38 -040026062014-09-25 Alexei Podtelezhnikov <apodtele@gmail.com>
2607
2608 [base] Avoid unnecessary long division.
2609
2610 This applies to `FT_MulDiv' but not to `FT_DivFix', where overflows or
2611 lack thereof are predicted accurately.
2612
2613 * src/base/ftcalc.c (ft_div64by32): Improve readability.
2614 (FT_MulDiv, FT_MulDiv_No_Round) [!FT_LONG64]: Use straight division
2615 when multiplication stayed within 32 bits.
2616
Werner Lemberg5b68e4f2014-09-24 19:06:13 +020026172014-09-24 Werner Lemberg <wl@gnu.org>
2618
2619 [autofit] Minor clean-ups.
2620
2621 * src/autofit/afhints.c (AF_FLAGS): Remove obsolete values.
2622
2623 * src/autofit/afhints.c (af_glyph_hints_dump_points,
2624 af_glyph_hints_align_strong_points): Updated.
2625
2626 * src/autofit/aflatin.c (af_latin_hints_link_segments,
2627 af_latin_hints_compute_segments), src/autofit/afcjk.c
2628 (af_cjk_hints_link_segments), src/autofit/aflatin2.c
2629 (af_latin2_hints_link_segments, af_latin2_hints_compute_segments):
2630 There are no longer fake segments since more than 10 years...
2631
Werner Lemberg387a9fe2014-09-22 06:42:24 +020026322014-09-22 Werner Lemberg <wl@gnu.org>
2633
2634 [autofit] Minor code streamlining.
2635
2636 * src/autofit/afhints.c (af_axis_hints_new_edge): Remove redundant
2637 initialization.
2638
Alexei Podtelezhnikov5c894842014-09-19 22:03:15 -040026392014-09-19 Alexei Podtelezhnikov <apodtele@gmail.com>
2640
2641 * src/base/ftcalc.c: Harmonize code.
2642
26432014-09-15 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikovbc12d9e2014-09-08 21:27:43 -04002644
Alexei Podtelezhnikovef070d42014-09-15 22:06:19 -04002645 [base] Tighten the overflow check in `FT_MulDiv'.
2646
2647 * src/base/ftcalc.c (FT_MulDiv) [!FT_LONG64]: Updated.
2648
26492014-09-08 Alexei Podtelezhnikov <apodtele@gmail.com>
2650
Alexei Podtelezhnikovbc12d9e2014-09-08 21:27:43 -04002651 Fix Savannah bug #43153.
2652
2653 * src/psaux/psconv.c (PS_Conv_ToFixed): Add protection against
Alexei Podtelezhnikov7abdb8c2014-10-02 23:13:33 -04002654 overflow in `divider'.
Alexei Podtelezhnikovbc12d9e2014-09-08 21:27:43 -04002655
Alexei Podtelezhnikov32128522014-09-03 21:57:42 -040026562014-09-03 Alexei Podtelezhnikov <apodtele@gmail.com>
2657
Alexei Podtelezhnikov336735d2014-09-03 22:55:26 -04002658 [base] Tighten the overflow check in `FT_DivFix'.
2659
2660 This fixes a 13-year old bug. The original overflow check should have
2661 been updated when rounding was introduced into this function
2662 (c2cd00443b).
2663
2664 * src/base/ftcalc.c (FT_DivFix) [!FT_LONG64]: Updated.
2665 * include/freetype.h (FT_DivFix): Updated documentation.
2666
26672014-09-03 Alexei Podtelezhnikov <apodtele@gmail.com>
2668
Alexei Podtelezhnikov32128522014-09-03 21:57:42 -04002669 [base] Tighten the overflow check in `FT_MulFix'.
2670
2671 * src/base/ftcalc.c (FT_MulFix) [!FT_LONG64]: Updated.
2672
Alexei Podtelezhnikov125c3ca2014-09-02 22:38:59 -040026732014-09-02 Alexei Podtelezhnikov <apodtele@gmail.com>
2674
2675 [truetype] Shortcut ppem calculations for square pixels.
2676
2677 * src/truetype/ttinterp.h (TT_ExecContextRec): New field
2678 `cur_ppem_func' with a function pointer.
2679 * src/truetype/ttinterp.c (TT_RunIns): Initialize `cur_ppem_func'
2680 depending on the pixel geometry to either...
2681 (Current_Ppem_Stretched): ... this for stretched pixels.
2682 (Current_Ppem): ... or this for square pixels.
2683 (DO_MPPEM, DO_MPS, Ins_DELTAP, Ins_DELTAC): Use `cur_ppem_func'.
2684
Behdad Esfahbod1ec98b22014-08-31 08:47:11 +020026852014-08-31 Behdad Esfahbod <behdad@behdad.org>
2686
2687 Don't use `register' keyword. Fixes compiler warnings.
2688
2689 * src/base/ftcalc.c (FT_Add64) [!FT_LONG64]: Do it.
2690 * src/gzip/inftrees.c (huft_build): Ditto.
2691 * src/truetype/ttinterp.c (TT_MulFix14_arm): Ditto.
2692
Alexei Podtelezhnikova8bc49e2014-08-24 22:14:01 -040026932014-08-24 Alexei Podtelezhnikov <apodtele@gmail.com>
2694
Alexei Podtelezhnikov125c3ca2014-09-02 22:38:59 -04002695 [truetype] Optimize DELTAP and DELTAC.
Alexei Podtelezhnikova8bc49e2014-08-24 22:14:01 -04002696
2697 * src/truetype/ttinterp.c (Ins_DELTAP, Ins_DELTAC): Move ppem
2698 calculations outside of the loop.
2699
Alexei Podtelezhnikov98688592014-08-21 23:28:52 -040027002014-08-21 Alexei Podtelezhnikov <apodtele@gmail.com>
2701
2702 Fix Savannah bug #43033.
2703
2704 * include/config/ftconfig.h, builds/unix/ftconfig.in,
2705 builds/vms/ftconfig.h [FT_LONG64]: Do not disable the macro when
2706 64-bit type is `long'.
2707
Alexei Podtelezhnikov8fd87d42014-08-20 00:57:22 -040027082014-08-20 Alexei Podtelezhnikov <apodtele@gmail.com>
2709
2710 [base] Small optimization of `FT_MulFix'.
2711
2712 * src/base/ftcalc.c (FT_MulFix): Loosen up the condition for direct
2713 32-bit calculations.
2714
Alexei Podtelezhnikovf09326a2014-08-20 00:08:38 -040027152014-08-19 Alexei Podtelezhnikov <apodtele@gmail.com>
2716
2717 [base] Use unsigned calculation in `FT_MulDiv'.
2718
2719 * src/base/ftcalc.c (FT_MulDiv): Updated to expand 32-bit range.
2720
Alexei Podtelezhnikov382f3152014-08-18 23:16:15 -040027212014-08-18 Alexei Podtelezhnikov <apodtele@gmail.com>
2722
2723 [base] Remove truncation in `FT_DivFix'.
2724
2725 * src/base/ftcalc.c (FT_DivFix): Updated.
2726
Alexei Podtelezhnikov5ef20232014-08-14 23:21:46 -040027272014-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
2728
2729 Minor refactoring.
2730
2731 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round): Updated.
2732
27332014-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikovc7022462014-08-14 23:01:01 -04002734
2735 Turn FT_MSB into a macro when using gcc builtins.
2736
2737 * src/base/ftcalc.c, include/internal/ftcalc.h: Updated.
2738
Alexei Podtelezhnikovf8efbcf2014-08-12 23:22:17 -040027392014-08-12 Alexei Podtelezhnikov <apodtele@gmail.com>
2740
2741 [base] Avoid undefined FT_MSB in `BBox_Cubic_Check'.
2742
2743 * src/base/ftbbox.c (BBox_Cubic_Check): Update.
2744 (update_cubic_max): Repalce with...
2745 (cubic_peak): ... this, which now handles upscaling.
2746
Alexei Podtelezhnikov47289932014-08-11 23:39:34 -040027472014-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
2748
Alexei Podtelezhnikov28018d42014-08-12 00:26:16 -04002749 [base] Handle collapsed outlines to avoid undefined FT_MSB.
2750
2751 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Update.
2752
27532014-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
2754
Alexei Podtelezhnikov47289932014-08-11 23:39:34 -04002755 [base] Restore FT_MulFix inlining.
2756
2757 * include/freetype.h (FT_MulFix): Unconditionally defined.
2758
2759 * src/base/ftcalc.c [FT_MULFIX_ASSEMBLER]: Move code from here...
2760
2761 * include/internal/ftcalc.h [FT_MULFIX_ASSEMBLER]: ... to here,
2762 which conditionally replaces the function with an inline version
2763 through the macro.
2764
Alexei Podtelezhnikov90be4b62014-08-08 22:27:10 -040027652014-08-08 Alexei Podtelezhnikov <apodtele@gmail.com>
2766
2767 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Refactor.
2768
Werner Lembergd17cabf2014-07-26 09:53:50 +090027692014-07-26 Werner Lemberg <wl@gnu.org>
2770
2771 [cff] Fix typo.
2772
2773 * src/cff/cf2hints.c (cf2_glyphpath_computeOffset): Use correct
2774 offsets in third quadrant.
2775
2776 Reported by maks <maksqwe1@ukr.net>.
2777
Werner Lemberg4e754132014-07-17 17:34:49 +090027782014-07-17 Werner Lemberg <wl@gnu.org>
2779
2780 Fix Savannah bug #42788.
2781
2782 * src/pfr/pfrobjs.c: Include `ftcalc.h'.
2783
Alexei Podtelezhnikovc0a6f202014-07-16 22:05:56 -040027842014-07-16 Alexei Podtelezhnikov <apodtele@gmail.com>
2785
2786 Replace `ft_highpow2' function.
2787
2788 * src/pfr/pfrobjs.c (pfr_face_get_kerning): Use `FT_MSB' instead of
2789 `ft_highpow2'.
2790
2791 * src/base/ftutil.c, include/internal/ftobjs.h (ft_highpow2): Remove
2792 it.
2793
Alexei Podtelezhnikov71330ce2014-07-15 23:30:45 -040027942014-07-15 Alexei Podtelezhnikov <apodtele@gmail.com>
2795
Werner Lembergcbbf26b2014-07-17 17:27:12 +09002796 * src/base/ftcalc.c (FT_MSB): Utilize gcc builtins.
Alexei Podtelezhnikov177982e2014-07-15 23:54:34 -04002797
27982014-07-15 Alexei Podtelezhnikov <apodtele@gmail.com>
2799
Alexei Podtelezhnikov71330ce2014-07-15 23:30:45 -04002800 [base] Move assembler code back in the source file.
2801
2802 FT_MulFix assembler used to reside in ftcalc.c before f47d263f1b.
2803
2804 * include/config/ftconfig.h, builds/unix/ftconfig.in,
2805 builds/vms/ftconfig.h [FT_MULFIX_ASSEMBLER]: Move code from here...
2806
2807 * src/base/ftcalc.c [FT_MULFIX_ASSEMBLER]: ... to here.
2808
28092014-07-14 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov1183cd42014-07-14 22:30:55 -04002810
2811 [base] Further clean up color bitmap conversion.
2812
2813 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Stop
2814 using FT_MulFix and FT_DivFix since all calculations fit into 32 bits.
2815
Werner Lemberg441b3f32014-07-13 02:28:14 +090028162014-07-13 Werner Lemberg <wl@gnu.org>
2817
2818 [truetype] Improve handling of buggy `prep' tables.
2819
2820 In case of an error in the `prep' table, no longer try to execute it
2821 again and again. This makes FreeType handle endless loops in buggy
2822 fonts much faster.
2823
2824 * src/truetype/ttobjs.h (TT_SizeRec): The fields `bytecode_ready'
2825 and `cvt_ready' are now negative if not initialized yet, otherwise
2826 they indicate the error code of the last run.
2827
2828 * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep,
2829 tt_size_done_bytecode, tt_size_init_bytecode,
2830 tt_size_ready_bytecode, tt_size_init, tt_size_done, tt_size_reset):
2831 Updated.
2832
2833 * src/truetype/ttgload.c (tt_loader_init): Updated.
2834 * src/truetype/ttinterp.c (TT_RunIns): Force reexecution of `fpgm'
2835 and `prep' only if we are in the `glyf' table.
2836
Werner Lemberge98e2bc2014-07-12 16:37:39 +090028372014-07-12 Werner Lemberg <wl@gnu.org>
2838
2839 * builds/vms/ftconfig.h: Synchronize.
2840 Problem reported by Alexei.
2841
Alexei Podtelezhnikov35576bf2014-07-11 22:40:34 -040028422014-07-11 Alexei Podtelezhnikov <apodtele@gmail.com>
2843
2844 [base] Clean up bitmap conversion.
2845
2846 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Use
2847 appropriate FT_DivFix and remove superfluous upscaling.
2848
Alexei Podtelezhnikovceab95a2014-07-04 23:01:32 -040028492014-07-04 Alexei Podtelezhnikov <apodtele@gmail.com>
2850
2851 [base] Small optimization of the ancient code.
2852
2853 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round): Loosen up the
2854 condition for direct 32-bit calculations.
2855
Werner Lemberg38975562014-06-27 06:55:56 +020028562014-06-27 Werner Lemberg <wl@gnu.org>
2857
2858 Fix Apple standard glyph names.
2859
2860 * src/sfnt/ttpost.c (tt_post_default_names): Synchronize with
2861 `tools/glnames.py'
2862
2863 Problem reported by Adam Twardoch <adam@fontlab.com>.
2864
Werner Lembergcf2347c2014-06-17 09:01:04 +020028652014-06-17 Werner Lemberg <wl@gnu.org>
2866
Werner Lemberg231171f2014-06-17 09:14:32 +02002867 Partially revert commit from 2014-06-13.
2868
2869 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Move
2870 declaration of `p_first' and `p_last' out of the loop.
2871
28722014-06-17 Werner Lemberg <wl@gnu.org>
2873
Werner Lembergcf2347c2014-06-17 09:01:04 +02002874 * builds/unix/freetype2.m4: s/AC_PATH_PROG/AC_PATH_TOOL/.
2875
2876 This simplifies cross-compiling.
2877
Werner Lemberg6497b9c2014-06-13 09:28:00 +020028782014-06-13 Werner Lemberg <wl@gnu.org>
2879
Werner Lemberge5c0fff2014-06-13 14:01:20 +02002880 Fix more compiler warnings.
2881 Reported by Wojciech Mamrak <wmamrak@gmail.com>.
2882
2883 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
2884 Make integer constant unsigned.
2885
2886 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
2887 <TT_SBIT_TABLE_TYPE_SBIX>: Fix types.
2888 (tt_sbit_decoder_load_compound, tt_face_load_sbix_image): Add proper
2889 casts.
2890
28912014-06-13 Werner Lemberg <wl@gnu.org>
2892
Werner Lemberg6497b9c2014-06-13 09:28:00 +02002893 Fix compiler warnings.
2894 Reported by Wojciech Mamrak <wmamrak@gmail.com>.
2895
2896 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage),
Werner Lembergcbbf26b2014-07-17 17:27:12 +09002897 src/autofit/afmodule.c (af_property_set): Fix `signed' vs.
Werner Lemberg6497b9c2014-06-13 09:28:00 +02002898 `unsigned' issues.
2899
2900 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Make compiler
2901 happy.
2902
2903 * src/base/ftlcdfil.c (_ft_lcd_filter_fir): Use only four elements
2904 for `fir'.
2905 Fix `signed' vs. `unsigned' issues.
2906
2907 * src/sfnt/sfobjs.c (WRITE_BYTE): Removed, unused.
2908 (WRITE_USHORT, WRITE_ULONG): Add proper casts.
2909
2910 * src/truetype/ttgload.c (TT_Get_VMetrics): Add proper casts.
2911
2912 * src/truetype/ttinterp.c (Ins_DELTAP): Add proper casts for `B1'
2913 and `B2'.
2914
Alexey Petruchik02f21702014-05-16 08:09:43 +020029152014-05-16 Alexey Petruchik <alexey.petruchik@gmail.com>
2916
2917 [cmake] Add option to build OS X framework.
2918
2919 * CMakeLists.txt: Update accordingly.
2920
2921 * builds/mac/freetype-Info.plist: New file.
2922
Pavel Koshevoy15da66a2014-05-13 07:33:48 +020029232014-05-13 Pavel Koshevoy <pkoshevoy@gmail.com>
2924
2925 * CMakeLists.txt (BASE_SRCS): Add missing `ftbdf.c'.
2926
Werner Lemberg07e7b8a2014-05-11 08:00:25 +020029272014-05-11 Werner Lemberg <wl@gnu.org>
2928
Werner Lembergfaa21472014-05-11 12:44:00 +02002929 [autofit] Fix variable initializations.
2930
2931 * src/autofit/afhints.c (af_glyph_hints_reload): Assign default
2932 values to `in_dir' and `out_dir' for all points.
2933
29342014-05-11 Werner Lemberg <wl@gnu.org>
2935
Werner Lemberg07e7b8a2014-05-11 08:00:25 +02002936 [autofit] Fix crash with font `CabinSketch-Bold.ttf'.
2937
2938 Problem reported by Ralf S. Engelschall <rse@engelschall.com>.
2939
2940 * src/autofit/afhints.c (af_glyph_hints_reload): Fix threshold for
2941 finding first non-near point.
2942 Properly initialize non-near point deltas.
2943
Werner Lemberg63bef9a2014-05-01 07:16:05 +020029442014-05-01 Werner Lemberg <wl@gnu.org>
2945
Werner Lembergc576bb02014-05-01 17:24:19 +02002946 [autofit] Add blue-zone support for Devanagari.
2947
2948 This essentially moves the Devanagari script from the `Indic' hinter
2949 to the `Latin' hinter. Thanks to Girish Dalvi
2950 <girish.dalvi@gmail.com> for guidance with blue zone characters!
2951
2952 * src/autofit/afblue.dat: Add blue zone data for Devanagari.
2953
2954 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
2955
2956 * src/autofit/afscript.h: Add Devanagari standard characters and
2957 move data out of AF_CONFIG_OPTION_INDIC block.
2958
2959 * src/autofit/afranges.c: Move Devanagari data out of
2960 AF_CONFIG_OPTION_INDIC block.
2961 Move U+20B9, (new) Rupee sign, from Latin to Devanagari.
2962
2963 * src/autofit/afstyles.h: Update Devanagari data; in particular, use
2964 AF_WRITING_SYSTEM_LATIN.
2965
29662014-05-01 Werner Lemberg <wl@gnu.org>
2967
Werner Lemberg63bef9a2014-05-01 07:16:05 +02002968 [autofit] Fix handling of neutral blue zones in stems.
2969
2970 * src/autofit/afhints.h (AF_Edge_Flags): New value
2971 `AF_EDGE_NEUTRAL'.
2972
2973 * src/autofit/aflatin.c (af_latin_hints_compute_blue_edges): Trace
2974 neutral blue zones with AF_EDGE_NEUTRAL.
2975 (af_latin_hint_edges): Skip neutral blue zones if necessary.
2976
Werner Lembergccfc4b42014-04-28 21:13:14 +020029772014-04-28 Werner Lemberg <wl@gnu.org>
2978
2979 [autofit] Introduce neutral blue zones to the latin module.
2980
2981 Such blue zones match either the top or the bottom of a contour. We
2982 need them for scripts where accent-like elements directly touch the
2983 base character (for example, some vowel signs in Devanagari, cf.
2984 U+0913 or U+0914).
2985
2986 * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_NEUTRAL): New
2987 property.
2988
2989 * src/autofit/afblue.h: Regenerated.
2990
2991 * src/autofit/aflatin.h (AF_LATIN_IS_NEUTRAL_BLUE): New macro.
2992 (AF_LATIN_BLUE_NEUTRAL): New enumeration value.
2993
2994 * src/autofit/aflatin.c (af_latin_metrics_init_blues,
2995 af_latin_hints_compute_blue_edges): Handle neutral blue zones.
2996
Werner Lembergabb3fca2014-04-25 22:13:32 +020029972014-04-25 Werner Lemberg <wl@gnu.org>
2998
2999 * src/autofit/hbshim.c: Partially revert commit from 2014-04-17.
3000
3001 Using input glyph coverage data is simply wrong.
3002
3003 Problem reported by Nikolaus Waxweiler <madigens@gmail.com> and
3004 Mantas MikulÄ—nas <grawity@gmail.com>.
3005
Werner Lembergf1936372014-04-23 08:22:33 +020030062014-04-23 Werner Lemberg <wl@gnu.org>
3007
3008 * src/raster/ftraster.c (Vertical_Sweep_Span): Use drop-out mode.
3009
3010 This spot has been missed while introducing support for various
3011 drop-out modes years ago (including no drop-out mode, which this
3012 commit fixes).
3013
3014 Problem reported by Patrick Thomas <pthomas505@gmail.com>.
3015
Werner Lembergd9b44702014-04-22 07:33:07 +020030162014-04-22 Werner Lemberg <wl@gnu.org>
3017
3018 * src/sfnt/pngshim.c (error_callback): s/longjmp/ft_longjmp/.
3019
Werner Lemberg98e510e2014-04-20 22:11:27 +020030202014-04-20 Werner Lemberg <wl@gnu.org>
3021
3022 [autofit] Fix Savannah bug #42148.
3023
3024 The adaptation of the cjk auto-hinter module to blue stringsets in
3025 2013-08-25 had three severe bugs. Mea culpa.
3026
3027 1. Contrary to the latin auto-hinter, characters for reference and
3028 overshoot values of a blue zone are specified separately. Due to
3029 the screwed-up change it didn't work at all.
3030
3031 2. A boolean comparison was erroneously replaced with a cast,
3032 causing invalid results with the `^' operator later on. The
3033 visual artifact caused by this problem is the topic of the bug
3034 report.
3035
3036 3. Two flag values were inverted, causing incorrect assignment of
3037 reference and overshoot values.
3038
3039 * src/autofit/afblue.dat: Fix CJK bluestrings, introducing a new
3040 syntax to have both reference and overshoot characters in a single
3041 string. This is error #1.
3042 Add extensive comments.
3043
3044 * src/autofit/afblue.hin (AF_BLUE_PROPERTY_CJK_FILL): Removed, no
3045 longer used.
Werner Lembergccfc4b42014-04-28 21:13:14 +02003046 (AF_BLUE_PROPERTY_CJK_TOP, AF_BLUE_PROPERTY_CJK_HORIZ): Fix values.
Werner Lemberg98e510e2014-04-20 22:11:27 +02003047 This is error #3.
3048
3049 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3050
3051 * src/autofit/afcjk.c (af_cjk_metrics_init_blues): Correct error #1.
3052 Use character `|' to separate characters for reference and overshoot
3053 values.
3054 Improve tracing messages, synchronizing them with the latin
3055 auto-hinter.
Werner Lembergccfc4b42014-04-28 21:13:14 +02003056 (af_cjk_hints_compute_blue_edges): Fix value of `is_top_right_blue'.
Werner Lemberg98e510e2014-04-20 22:11:27 +02003057 This is error #2.
3058 (af_cjk_align_linked_edge): Add tracing message.
3059
3060 * src/autofit/afcjk.h (AF_CJK_IS_FILLED_BLUE): Removed, no longer
3061 used.
3062
Werner Lembergbbd83132014-04-17 01:24:36 +020030632014-04-17 Werner Lemberg <wl@gnu.org>
3064
Werner Lemberg8c7fb782014-04-17 15:53:25 +02003065 [autofit] More coverage fixes for complex scripts.
3066
3067 * src/autofit/hbshim.c (af_get_coverage): Merge input glyph coverage
3068 of GSUB lookups into output coverage. Otherwise, ligatures are not
3069 handled properly.
3070 Don't check blue zone characters for default coverage.
3071
30722014-04-17 Werner Lemberg <wl@gnu.org>
3073
Werner Lembergbbd83132014-04-17 01:24:36 +02003074 Make `FT_Get_SubGlyph_Info' actually work.
3075
3076 * src/base/ftobjs.c (FT_Get_SubGlyph_Info): Return FT_Err_Ok
3077 if there is no error.
3078
Werner Lemberg181fd072014-04-15 16:47:05 +020030792014-04-15 Werner Lemberg <wl@gnu.org>
3080
3081 [afblue.pl]: Minor improvements.
3082
3083 * src/tools/afblue.pl: Allow whitespace before comments.
3084 Ignore whitespace in strings.
3085
Werner Lemberg8b1f2a62014-04-14 07:58:19 +020030862014-04-14 Werner Lemberg <wl@gnu.org>
3087
3088 [autofit] Improve coverage handling.
3089
3090 * src/autofit/hbshim.c (af_get_coverage): Don't exclude glyphs
3091 appearing in the GPOS table if we are processing the default
3092 coverage.
3093
David Weber76307872014-04-13 15:41:13 +020030942014-04-13 David Weber <weber.aulendorf@googlemail.com>
3095
3096 [smooth] Fix stand-alone compilation.
3097
3098 * src/smooth/ftgrays.c (FT_BEGIN_STMNT, FT_END_STMNT): Define.
3099
Werner Lemberg8a94b1e2014-04-12 20:44:33 +020031002014-04-12 Werner Lemberg <wl@gnu.org>
3101
3102 [autofit] Redesign the recognition algorithm of strong points.
3103
3104 In particular, local extrema without horizontal or vertical segments
3105 are better recognized:
3106
3107 + A + D
3108 \ /
3109 \ /
3110 \ /
3111 \ /
3112 \ + C
3113 \ /
3114 B +/
3115
3116 If the distances AB and CD are large, point B wasn't previously
3117 detected as an extremum since the `ft_corner_is_flat' function
3118 `swallowed' BC regardless of its direction, tagging point B as weak.
3119 The next iteration started at B and made `ft_corner_is_flat' swallow
3120 point C, tagging it as weak also, et voilà.
3121
3122 To improve that, another pass gets now performed before calling
3123 `ft_corner_is_flat' to improve the `topology' of an outline: A
3124 sequence of non-horizontal or non-vertical vectors that point into
3125 the same quadrant are handled as a single, large vector.
3126
3127 Additionally, distances of near points are now accumulated, which
3128 makes the auto-hinter handle them as if they were prepended to the
3129 next non-near vector.
3130
3131 This generally improves the auto-hinter's rendering results.
3132
3133 * src/autofit/afhints.c (af_glyph_hints_reload): Implement it.
3134
3135 * src/autofit/afhints.h (AF_FLAGS): Remove no longer used flag
3136 `AF_FLAG_NEAR'.
3137
Werner Lemberg71f53e12014-04-05 16:27:19 +020031382014-04-05 Werner Lemberg <wl@gnu.org>
3139
3140 [autofit] Improve scoring algorithm for identifying stems.
3141
3142 Problem reported by Karsten Lücke <karsten.luecke@kltf.de>.
3143
3144 The new algorithm takes care of the width of stems: If the distance
3145 between two segments is larger than the largest stem width, the
3146 demerits quickly increase for larger distances. This improves
3147 hinting of slanted fonts (especially if the inner parts of serifs
3148 have non-horizontal `shoulders'), avoiding false stem links.
3149
3150 * src/autofit/aflatin.c (af_latin_hints_link_segments): Use largest
3151 stem width (if available) to compute better demerits for distances
3152 between stems.
3153 (af_latin_hints_detect_features): Pass stem width array and array
3154 size.
3155 (af_latin_metrics_init_widths): Updated to use original algorithm.
3156 (af_latin_hints_apply): Updated to use new algorithm.
3157
3158 * src/autofit/aflatin.h: Updated.
3159 * src/autofit/afcjk.c: Updated.
3160
Werner Lembergf8555b52014-04-03 05:45:38 +020031612014-04-03 Werner Lemberg <wl@gnu.org>
3162
3163 Don't require `gzip' module for `sfnt'.
3164
3165 Reported by Preet <prismatic.project@gmail.com>.
3166
3167 * src/sfnt/sfobjs.c (woff_open_font): Guard use of
3168 FT_Gzip_Uncompress with FT_CONFIG_OPTION_USE_ZLIB.
3169
Werner Lembergf41070f2014-03-27 17:38:23 +010031702014-03-27 Werner Lemberg <wl@gnu.org>
3171
3172 Fix Savannah bug #38235.
3173
3174 Work around a bug in pkg-config version 0.28 and earlier: If a
3175 variable value gets surrounded by doublequotes (in particular values
3176 for the `prefix' variable), the prefix override mechanism fails.
3177
3178 * builds/unix/freetype2.in: Don't use doublequotes.
3179 * builds/unix/unix-def.in (freetype.pc): Escape spaces in directory
3180 names with backslashes.
3181
Werner Lembergab76d972014-03-24 19:45:03 +010031822014-03-24 Werner Lemberg <wl@gnu.org>
3183
3184 Fix Savannah bug #41946.
3185
3186 Based on a patch from Marek Kašík <mkasik@redhat.com>.
3187
3188 * builds/unix/configure.raw (LIBS_CONFIG): Remove.
3189 * builds/unix/freetype-config.in (libs): Hard-code value.
3190 * builds/unix/unix-def.in: Updated.
3191
Werner Lembergd5159922014-03-22 06:20:54 +010031922014-03-22 Werner Lemberg <wl@gnu.org>
3193
3194 Another revert for the change from 2014-03-18.
3195
3196 Problem reported by Nikolaus Waxweiler <madigens@gmail.com>.
3197
3198 * src/base/ftcalc.c (FT_MulFix): Ensure that an `FT_MulFix' symbol
3199 gets always exported.
3200
Werner Lembergf0c471a2014-03-20 07:13:12 +010032012014-03-20 Werner Lemberg <wl@gnu.org>
3202
3203 CMakeLists.txt: Another fix for include directories.
3204
3205 Problem reported by Taylor Holberton <taylorcholberton@gmail.com>.
3206
Werner Lembergcc7cf2c2014-03-19 07:35:35 +010032072014-03-19 Werner Lemberg <wl@gnu.org>
3208
Werner Lemberg606c74f2014-03-19 23:46:42 +01003209 CMakeLists.txt: Fix include directories.
3210
3211 Problem reported by Taylor Holberton <taylorcholberton@gmail.com>.
3212
32132014-03-19 Werner Lemberg <wl@gnu.org>
3214
Werner Lembergcc7cf2c2014-03-19 07:35:35 +01003215 Partially revert last commit.
3216
3217 Found by Alexei.
3218
3219 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Initializing
3220 those variables is plain wrong, since we are in a loop.
3221
Sean McBride87628722014-03-18 08:39:35 +010032222014-03-18 Sean McBride <sean@rogue-research.com>
3223 Werner Lemberg <wl@gnu.org>
3224
3225 Fix clang warnings.
3226
3227 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Initialize
3228 some variables.
3229
3230 * src/base/ftcalc.c (FT_MulFix): Only use code if
3231 `FT_MULFIX_INLINED' is not defined.
3232
3233 * src/bdf/bdfdrivr.c (bdf_cmap_class), src/cache/ftcbasic.c
3234 (ftc_basic_image_family_class, ftc_basic_image_cache_class,
3235 ftc_basic_sbit_family_class, ftc_basic_sbit_cache_class),
3236 src/cache/ftccmap.c (ftc_cmap_cache_class), src/cache/ftcmanag.c
3237 (ftc_size_list_class, ftc_face_list_class), src/pcf/pcfdrivr.c
3238 (pcf_cmap_class), src/pfr/pfrdrivr.c (pfr_metrics_service_rec): Make
3239 function static.
3240
3241 * src/type1/t1driver.c (t1_ps_get_font_value): Remove redundant
3242 code.
3243
Werner Lemberg23367ff2014-03-17 07:33:14 +010032442014-03-17 Werner Lemberg <wl@gnu.org>
3245
3246 Fix Savannah bug #41869.
3247
3248 This works around a problem with HarfBuzz (<= 0.9.26), which doesn't
3249 validate glyph indices returned by
3250 `hb_ot_layout_lookup_collect_glyphs'.
3251
3252 * src/autofit/hbshim.c (af_get_coverage): Guard `idx'.
3253
3254 * docs/CHANGES: Updated.
3255
Werner Lemberg03181682014-03-14 08:06:06 +010032562014-03-14 Werner Lemberg <wl@gnu.org>
3257
3258 * builds/unix/configure.raw: Don't show error messages of `which'.
3259
Alan Coopersmithed372b72014-03-09 06:14:12 +010032602014-03-09 Alan Coopersmith <alan.coopersmith@oracle.com>
3261
3262 Fix cppcheck 1.64 warning.
3263
3264 * src/autofit/afglobal.c (af_face_globals_new): Catch NULL pointer
3265 dereference in case of error.
3266
Werner Lemberg1a69dc72014-03-09 06:06:58 +010032672014-03-09 Sean McBride <sean@rogue-research.com>
3268
3269 * src/sfnt/ttcmap.c (tt_face_build_cmaps): Remove clang warning.
3270
Werner Lemberg05565362014-03-06 18:56:58 +010032712014-03-06 Werner Lemberg <wl@gnu.org>
3272
Werner Lembergec8853c2014-03-06 19:13:45 +01003273 * Version 2.5.3 released.
3274 =========================
3275
3276
3277 Tag sources with `VER-2-5-3'.
3278
3279 * docs/VERSION.DLL: Update documentation and bump version number to
3280 2.5.3.
3281
3282 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
3283 builds/windows/vc2005/index.html,
3284 builds/windows/vc2008/freetype.vcproj,
3285 builds/windows/vc2008/index.html,
3286 builds/windows/vc2010/freetype.vcxproj,
3287 builds/windows/vc2010/index.html,
3288 builds/windows/visualc/freetype.dsp,
3289 builds/windows/visualc/freetype.vcproj,
3290 builds/windows/visualc/index.html,
3291 builds/windows/visualce/freetype.dsp,
3292 builds/windows/visualce/freetype.vcproj,
3293 builds/windows/visualce/index.html,
3294 builds/wince/vc2005-ce/freetype.vcproj,
3295 builds/wince/vc2005-ce/index.html,
3296 builds/wince/vc2008-ce/freetype.vcproj,
3297 builds/wince/vc2008-ce/index.html: s/2.5.2/2.5.3/, s/252/253/.
3298
3299 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
3300
3301 * builds/unix/configure.raw (version_info): Set to 17:2:11.
3302 * CMakeLists.txt (VERSION_PATCH): Set to 3.
3303 * docs/CHANGES: Updated.
3304
33052014-03-06 Werner Lemberg <wl@gnu.org>
3306
Werner Lemberg05565362014-03-06 18:56:58 +01003307 Fixes for compilation with C++.
3308
3309 * src/autofit/hbshim.c (scripts): Change type to `hb_script_t'.
3310 (af_get_coverage): Updated.
3311 (COVERAGE): Add cast.
3312
Sean McBrideb24e8d32014-03-06 14:54:22 +010033132014-03-06 Sean McBride <sean@rogue-research.com>
3314
3315 Remove more clang analyzer warnings.
3316
3317 * src/bdf/bdflib.c (_bdf_readstream), src/truetype/ttgload.c
3318 (TT_Load_Glyph): Remove dead stores.
3319
Werner Lemberga32758f2014-03-05 08:02:46 +010033202014-03-05 Werner Lemberg <wl@gnu.org>
3321
3322 * builds/unix/configure.raw: Simplify.
3323
suzuki toshiya382f3ef2014-03-05 10:19:15 +090033242014-03-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3325
3326 Fix a bug in configure in library dependency setting
Werner Lemberga32758f2014-03-05 08:02:46 +01003327 Reported in https://bugs.freedesktop.org/show_bug.cgi?id=75652.
suzuki toshiya382f3ef2014-03-05 10:19:15 +09003328
3329 * builds/unix/configure.raw: Use `x"${xxx}" != xno' style.
3330
Werner Lembergf48f7dc2014-03-04 04:40:07 +010033312014-03-04 Werner Lemberg <wl@gnu.org>
3332
3333 Minor fix for `make devel'.
3334
3335 * builds/freetype.mk (INCLUDE_FLAGS) [DEVEL_DIR]: Don't use
3336 pkg-config for bzip2 since not all GNU/Linux distributions have
3337 `bzip2.pc' (and the header file `bzlib.h' is located in /usr/include
3338 normally).
3339
Werner Lemberg7ac76b52014-03-04 04:29:17 +010033402014-03-04 Sean McBride <sean@rogue-research.com>
3341
3342 Fix several clang static analyzer dead store warnings.
3343
3344 * src/autofit/afhints.c (af_glyph_hints_reload,
3345 af_glyph_hints_align_weak_points): Remove unnecessary assignments.
3346
3347 * src/bdf/bdflib.c (bdf_font_load): Ditto.
3348
3349 * src/pshinter/pshalgo.c (psh_glyph_compute_extrema,
3350 psh_glyph_interpolate_other_points): Ditto.
3351
3352 * src/type1/t1load.c (T1_Set_MM_Blend): Ditto.
3353
Werner Lemberg93ebcbd2014-03-03 07:13:45 +010033542014-03-03 Werner Lemberg <wl@gnu.org>
3355
3356 Rewrite library option handling in `configure'.
3357
3358 o Introduce `auto' value for `--with-XXX' library options; this is
3359 now the default.
3360
3361 o First use `pkg-config' for library detection, then fall back to
3362 other tests.
3363
3364 * builds/unix/configure.raw (--with-zlib, --with-bzip2, --with-png,
3365 --with-harfbuzz): Rewrite.
3366 Use new `xxx_reqpriv', `xxx_libpriv', and `xxx_libstaticconf'
3367 variables to collect data for `freetype2.pc' and `freetype-config'.
3368 (FT2_EXTRA_LIBS): Renamed to ...
3369 (ft2_extra_libs): This since it gets no longer substituted.
3370 (REQUIRES_PRIVATE, LIBS_PRIVATE, LIBS_CONFIG, LIBSSTATIC_CONFIG):
3371 New output variables, replacing `XXX_PKG' and `LIBXXX'.
3372 Add notice at the end of `configure' showing the library
3373 configuration.
3374
3375 * builds/unix/freetype-config.in (--static): New command line
3376 option.
3377 (libs): Updated.
3378 (staticlibs): New variable, to be used if `--static' is given.
Werner Lemberg8fa69a82014-12-03 20:07:14 +01003379 * docs/freetype-config.1: Document `--static'.
Werner Lemberg93ebcbd2014-03-03 07:13:45 +01003380
3381 * builds/unix/freetype2.in, builds/unix/unix-def.in: Updated.
3382
Werner Lemberg86026a42014-03-01 06:57:19 +010033832014-03-01 Werner Lemberg <wl@gnu.org>
3384
Werner Lemberge962a912014-03-01 21:00:02 +01003385 Avoid `long long' warnings with older gcc compilers.
3386 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
3387
3388 * builds/unix/configure.raw: Don't use gcc's `-pedantic' flag for
3389 versions < 4.6. This is especially needed for Max OS X since this
3390 OS runs a gcc variant (or emulation) based on version 4.2.1.
3391
33922014-03-01 Werner Lemberg <wl@gnu.org>
3393
Werner Lemberg6030a9f2014-03-01 14:01:12 +01003394 * docs/INSTALL.CROSS: Revised and updated.
3395
33962014-03-01 Werner Lemberg <wl@gnu.org>
3397
Werner Lemberg646db052014-03-01 12:48:07 +01003398 Make `make clean' remove `freetype2.pc'.
3399
3400 This is a generated file at build time, not configure time.
3401
3402 * builds/unix/unix-def.in (DISTCLEAN): Move `freetype2.pc' to ...
3403 (CLEAN): This variable.
3404
34052014-03-01 Werner Lemberg <wl@gnu.org>
3406
Werner Lemberg00c79ed2014-03-01 12:32:20 +01003407 Use pkg-config for detecting libpng and libbz2 also.
3408
3409 * builds/unix/configure.raw (HAVE_PKG): New variable.
3410 Search for libbz2 using `pkg-config'; s/BZ2/BZIP2/.
3411 Search for libpng using `pkg-config'.
3412 Fix definition of `LIBHARFBUZZ' variable.
3413 * builds/unix/freetype-config.in ($libs): Updated.
3414 * builds/unix/freetype2.in: Add `URL' field.
3415 Update `Requires.private' and `Libs.private'.
3416 * builds/unix/unix-def.in: Updated.
3417
34182014-03-01 Werner Lemberg <wl@gnu.org>
3419
Werner Lemberg86026a42014-03-01 06:57:19 +01003420 Add configure support for HarfBuzz.
3421
3422 * builds/unix/pkg.m4: New file.
3423 * builds/unix/configure.raw: Search for libharfbuzz using
3424 `pkg-config'.
3425 Add `--without-harfbuzz' option.
3426 * builds/unix/freetype-config.in, builds/unix/freetype2.in,
3427 builds/unix/unix-def.in (freetype-config, freetype2.pc): Handle
3428 HarfBuzz.
3429
3430 * docs/INSTALL.UNIX: Document interdependency of Freetype with
3431 HarfBuzz.
3432
Alexei Podtelezhnikov6adda682014-02-28 09:24:26 +010034332014-02-28 Alexei Podtelezhnikov <apodtele@gmail.com>
3434
3435 [cff] Math simplifications.
3436
3437 * src/cf2blues.c (cf2_blues_init): Use `FT_MulDiv'.
3438 * src/cf2ft.c (cf2_getScaleAndHintFlag): Use simple division.
3439
Dave Arnold0eae6eb2014-02-28 07:40:01 +010034402014-02-28 Dave Arnold <darnold@adobe.com>
3441
Dave Arnold135c3fa2014-02-28 07:42:42 +01003442 [cff] Fix Savannah bug #41697, part 2.
3443
3444 * src/cff/cf2ft.c (cf2_initLocalRegionBuffer,
3445 cf2_initGlobalRegionBuffer): It is possible for a charstring to call
3446 a subroutine if no subroutines exist. This is an error but should
3447 not trigger an assert. Split the assert to account for this.
3448
34492014-02-28 Dave Arnold <darnold@adobe.com>
3450
Dave Arnold0eae6eb2014-02-28 07:40:01 +01003451 [cff] Fix Savannah bug #41697, part 1.
3452
3453 * src/cff/cf2hints.c (cf2_hintmap_build): Return when `hintMask' is
3454 invalid. In this case, it is not safe to use the length of
3455 `hStemHintArray'; the exception has already been recorded in
3456 `hintMask'.
3457
Werner Lembergeee4ff82014-02-26 18:12:36 +010034582014-02-26 Werner Lemberg <wl@gnu.org>
3459
Werner Lemberga2b5f662014-02-26 19:50:18 +01003460 [sfnt] Fix Savannah bug #41696.
3461
3462 * src/sfnt/ttcmap.c (tt_cmap0_validate, tt_cmap2_validate,
3463 tt_cmap4_validate, tt_cmap14_validate): Fix limit tests.
3464
34652014-02-26 Werner Lemberg <wl@gnu.org>
3466
Werner Lembergeee4ff82014-02-26 18:12:36 +01003467 [winfnt] Fix Savannah bug #41694.
3468
3469 * src/winfonts/winfnt.c (FNT_Load_Glyph): Check glyph offset.
3470
34712014-02-26 Werner Lemberg <wl@gnu.org>
Werner Lemberg9a567642014-02-26 13:08:07 +01003472
Werner Lemberg08c628d2014-02-26 14:18:03 +01003473 [cff] Fix Savannah bug #41693.
3474
3475 * src/cff/cffload.c (CFF_Load_FD_Select): Reject empty array.
3476
Werner Lembergeee4ff82014-02-26 18:12:36 +010034772014-02-26 Werner Lemberg <wl@gnu.org>
Werner Lemberg08c628d2014-02-26 14:18:03 +01003478
Werner Lemberg9a567642014-02-26 13:08:07 +01003479 [bdf] Fix Savannah bug #41692.
3480
3481 bdflib puts data from the input stream into a buffer in chunks of
3482 1024 bytes. The data itself gets then parsed line by line, simply
3483 increasing the current pointer into the buffer; if the search for
3484 the final newline character exceeds the buffer size, more data gets
3485 read.
3486
3487 However, in case the current line's end is very near to the buffer
3488 end, and the keyword to compare with is longer than the current
3489 line's length, an out-of-bounds read might happen since `memcmp'
3490 doesn't stop properly at the string end.
3491
3492 * src/bdf/bdflib.c: s/ft_memcmp/ft_strncmp/ to make comparisons
3493 stop at string ends.
3494
suzuki toshiya91c7a972014-02-17 16:38:31 +090034952014-02-17 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3496
3497 [autofit] Fix `make multi' compilation.
3498
suzuki toshiyacc9a0c22014-02-17 16:43:54 +09003499 * src/autofit/hbshim.c: Include `afglobal.h' and `aftypes.h'.
suzuki toshiya91c7a972014-02-17 16:38:31 +09003500
Werner Lemberg6b290fd2014-02-19 09:26:54 +010035012014-02-19 Werner Lemberg <wl@gnu.org>
3502 Simon Bünzli <zeniko@gmail.com>
3503
3504 Fix Savannah bug #32902.
3505
3506 Patch taken from
3507
3508 https://code.google.com/p/sumatrapdf/source/browse/trunk/ext/_patches/freetype2.patch?spec=svn8620&r=8620#87
3509
3510 with slight modifications.
3511
3512 * src/type1/t1parse.c (T1_Get_Private_Dict): Add heuristic test to
3513 handle fonts that incorrectly use \r at the beginning of an eexec
3514 block.
3515
Simon Bünzlidf14e6c2014-02-19 08:42:52 +010035162014-02-19 Simon Bünzli <zeniko@gmail.com>
3517
3518 Fix Savannah bug #41590.
3519
3520 * src/type1/t1load.c (parse_encoding): Protect against invalid
3521 number.
3522
Dave Arnold89a94d42014-02-12 23:45:47 +010035232014-02-12 Dave Arnold <darnold@adobe.com>
3524
3525 [cff] Optimize by using `FT_MulDiv'.
3526 Suggested by Alexei.
3527
3528 * src/cff/cf2font.c (cf2_computeDarkening): Do it.
3529
Werner Lemberg85ee27a2014-02-12 23:27:41 +010035302014-02-12 Werner Lemberg <wl@gnu.org>
3531
3532 Fix Savannah bug #41465.
3533
3534 * builds/unix/unix-def.in (CLEAN): Add `freetype-config'.
3535 (DISTCLEAN): Remove `freetype-config'.
3536
Sean McBride7be2a942014-02-08 13:55:38 +010035372014-02-08 Sean McBride <sean@rogue-research.com>
3538
3539 Fix clang static analyzer and compiler warnings.
3540
3541 * src/autofit/afhints.c (af_glyph_hints_align_weak_points),
3542 src/autofit/afloader (af_loader_load_g) <FT_GLYPH_FORMAT_COMPOSITE>,
3543 src/base/ftcalc.c (FT_MSB), src/base/ftoutln.c
3544 (FT_Outline_Decompose), src/bdf/bdfdrivr.c (bdf_interpret_style),
3545 src/cff/cffparse.c (cff_parse_integer), src/cid/cidparse.c
3546 (cid_parser_new), src/pfr/pfrload.c (pfr_phy_font_load),
3547 src/raster/ftraster.c (Decompose_Curve), src/sfnt/sfdriver.c
3548 (sfnt_get_ps_name), src/sfnt/ttcmap.c (tt_cmap12_next,
3549 tt_cmap13_next), src/smooth/ftgrays.c (gray_hline): Remove dead
3550 code.
3551
3552 * src/autofit/afmodule.c (af_property_get_face_globals,
3553 af_property_set, af_property_get), src/base/ftbitmap.c
3554 (ft_gray_for_premultiplied_srgb_bgra): Make functions static.
3555
3556 * src/base/ftobjs.c (ft_remove_renderer): Protect against
3557 library == NULL.
3558 (ft_property_do): Make function static.
3559
3560 * src/base/ftrfork.c: Include `ftbase.h'.
3561
3562 * src/sfnt/ttsbit.c (tt_face_load_sbix_image)
3563 [!FT_CONFIG_OPTION_USE_PNG], src/type1/t1gload.c
3564 (T1_Compute_Max_Advance): Avoid compiler warning.
3565
3566 * src/truetype/ttinterp.c (TT_New_Context): Reduce scope of
3567 variable.
3568
Werner Lembergab98c5e2014-02-08 11:34:33 +010035692014-02-08 Werner Lemberg <wl@gnu.org>
3570
3571 Fix Windows build directories.
3572
3573 The build target is now `windows' instead of `win32'.
3574
3575 Problem reported by Nickolas George <darknova.clan@gmail.com>.
3576
3577 * builds/modules.mk: Don't use `win32' and `win16' (!) but
3578 `windows'.
3579
3580 * builds/windows/detect.mk, builds/windows/win32-def.mk:
3581 s/win32/windows/.
3582
Eugen Sawina8ceae42014-02-08 06:30:06 +010035832014-02-08 Eugen Sawin <esawin@mozilla.com>
3584
3585 Fix Savannah bug #41507.
3586
3587 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap)
3588 [!FT_CONFIG_OPTION_USE_PNG] <17, 17, 19>: Fix error handling.
3589
Dave Arnold355b3592014-02-08 06:23:04 +010035902014-02-08 Dave Arnold <darnold@adobe.com>
3591
3592 [cff] Fix minor performance bug.
3593
3594 * src/cff/cf2font.c (cf2_font_setup): Darkening amount and blue zone
3595 calculations are now cached and not recomputed on each glyph.
3596
Werner Lemberg6dce1362014-02-05 15:40:47 +010035972014-02-05 Werner Lemberg <wl@gnu.org>
3598
3599 Fix problems with perl 5.8.8 as distributed with current MinGW.
3600
3601 * src/tools/afblue.pl: Work-around for Perl bug #63402.
3602 (string_re): Avoid `possessive quantifiers', which have been
3603 introduced in Perl version 5.10.
3604
Werner Lemberga8772912014-02-04 11:36:08 +010036052014-02-04 Werner Lemberg <wl@gnu.org>
3606
Werner Lembergd87f9a62014-02-04 16:14:09 +01003607 Fix compilation with MinGW.
3608
3609 Right now, compilation out of the box with latest MinGW is broken
3610 due to bugs in header files of mingwrt 4.0.3 in strict ANSI mode,
3611 cf.
3612
3613 https://sourceforge.net/p/mingw/bugs/2024/
3614 https://sourceforge.net/p/mingw/bugs/2046/
3615
3616 * builds/unix/configure.raw: Don't set `-ansi' flag for MinGW.
3617
36182014-02-04 Werner Lemberg <wl@gnu.org>
3619
Werner Lemberga8772912014-02-04 11:36:08 +01003620 [autofit] Minor fix.
3621
3622 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
3623 src/autofit/aflatin.c (af_latin_metrics_init_widths): Fix handling
3624 of alternative standard characters.
3625 This also fixes a compilation warning in non-debug mode.
3626
Werner Lembergee3778d2014-02-03 11:16:47 +010036272014-02-03 Werner Lemberg <wl@gnu.org>
3628
3629 [cff] Fix Savannah bug #41363.
3630
3631 * src/cff/cf2ft.c (cf2_checkTransform): Convert assertion into
3632 parameter check.
3633 (cf2_decoder_parse_charstrings): Call `cf2_checkTransform' only if
3634 we are scaling the outline.
3635 (cf2_getPpemY): Remove problematic assertion.
3636
Werner Lemberga3364002014-01-26 09:45:23 +010036372014-01-26 Werner Lemberg <wl@gnu.org>
3638
3639 [autofit] Introduce two more slots for standard characters.
3640
3641 This is useful for OpenType features like `c2sc' (caps to small
3642 caps) that don't have lowercase letters by definition, or other
3643 features that mainly operate on numerals.
3644
3645 * src/autofit/afscript.h: Add more standard characters.
3646
3647 * src/autofit/aftypes.h: Update use of `SCRIPT' macro.
3648 (AF_ScriptClassRec): Add members to hold two more standard
3649 characters.
3650 (AF_DEFINE_SCRIPT_CLASS): Updated.
3651
3652 * src/autofit/afglobal.c, src/autofit/afglobal.h,
3653 * src/autofit/afpic.c, src/autofit/afranges.h, src/autofit/hbshim.c:
3654 Update use of `SCRIPT' macro.
3655
3656 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
3657 src/autofit/aflatin.c (af_latin_metrics_init_widths): Scan two more
3658 standard characters.
3659
Werner Lembergeb7691c2014-01-24 19:04:22 +010036602014-01-24 Werner Lemberg <wl@gnu.org>
3661
3662 Fix Savannah bug #41320.
3663
3664 * src/autofit/aflatin.c (af_latin_metrics_init_blues)
3665 <AF_LATIN_IS_LONG_BLUE>: Avoid negative index of `last'.
3666
Werner Lemberg8b281f82014-01-23 08:14:53 +010036672014-01-23 Werner Lemberg <wl@gnu.org>
3668
Werner Lemberg752f3912014-01-23 09:14:25 +01003669 Fix Savannah bug #41310.
3670
3671 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap) <glyph_format==5>:
3672 Don't check metrics, which this format doesn't have.
3673 This is another correction to the commit from 2013-11-21.
3674
36752014-01-23 Werner Lemberg <wl@gnu.org>
3676
Werner Lemberg8b281f82014-01-23 08:14:53 +01003677 Fix Savannah bug #41309.
3678
3679 * src/type1/t1load.c (t1_parse_font_matrix): Properly handle result
3680 of `T1_ToFixedArray'.
3681
3682 * src/cid/cidload.c (cid_parse_font_matrix): Synchronize with
3683 `t1_parse_font_matrix'.
3684
3685 * src/type42/t42parse.c (t42_parse_font_matrix): Synchronize with
3686 `t1_parse_font_matrix'.
3687 (t42_parse_encoding): Synchronize with `t1_parse_encoding'.
3688
3689 * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_BBOX>,
3690 <T1_FIELD_TYPE_MMOX>: Properly handle result of `ps_tofixedarray'.
3691
Werner Lembergff8dc312014-01-22 09:19:57 +010036922014-01-22 Werner Lemberg <wl@gnu.org>
3693
3694 * src/autofit/hbshim.c (af_get_coverage): Fix memory leaks.
3695
Werner Lemberg6a700782014-01-16 08:55:40 +010036962014-01-16 Werner Lemberg <wl@gnu.org>
3697
3698 [autofit] Improve tracing of style coverages.
3699
3700 * include/internal/fttrace.h: Add `afglobal' for tracing style
3701 coverages.
3702
3703 * src/autofit/afglobal.c: Include FT_INTERNAL_DEBUG_H.
3704 (FT_COMPONENT): Define.
3705 (af_face_globals_compute_style_coverage): Trace `gstyles' array
3706 data.
3707
Werner Lemberg7cbfdff2014-01-09 07:26:06 +010037082014-01-09 Werner Lemberg <wl@gnu.org>
3709
3710 Fix Savannah bug #41158.
3711
3712 * builds/unix/install.mk (install): Create man page directory.
3713
Chongyu Zhu94c66942014-01-08 08:52:59 +010037142014-01-08 Chongyu Zhu <lembacon@gmail.com>
3715
3716 [arm] Fix Savannah bug #41138, part 2.
3717
3718 * builds/unix/ftconfig.in (FT_MulFix_arm), include/config/ftconfig.h
3719 (FT_MulFix_arm), src/truetype/ttinterp.c (TT_MulFix14_arm): Fix
3720 preprocessor conditionals for `add.w'.
3721
Werner Lembergc46fa862014-01-08 08:45:40 +010037222014-01-08 Werner Lemberg <wl@gnu.org>
3723
3724 [autofit] Fix Savannah bug #41138, part 1.
3725
3726 * src/tools/afblue.pl <Handling #endif>: Produce correct auxiliary
3727 enumeration names for generated `#else'.
3728
3729 * src/autofit/afblue.h: Regenerated.
3730
Werner Lemberg3e5a3742014-01-06 07:53:10 +010037312014-01-06 Werner Lemberg <wl@gnu.org>
3732
3733 Add manual page for `freetype-config'.
3734 Contributed by Nis Martensen <nis.martensen@web.de>.
3735
3736 * docs/freetype-config.1: New file.
3737
3738 * builds/unix/unix-def.in (mandir): Define.
3739 * builds/unix/install.mk (install, uninstall): Handle manpage.
3740
Werner Lemberg991cbcc2014-01-05 13:24:56 +010037412014-01-05 Werner Lemberg <wl@gnu.org>
3742
3743 [autofit] Minor fixes for `afblue.pl'.
3744
3745 * src/tools/afblue.pl (aux_name): Don't use `reverse'.
3746 <Handling #endif>: Use proper indentation for generated `#else'.
3747
3748 * src/autofit/afblue.h: Regenerated.
3749
Werner Lemberg0d977442014-01-04 11:46:34 +010037502014-01-04 Werner Lemberg <wl@gnu.org>
3751
3752 [autofit] Fix Indic scripts.
3753
3754 Split the single, incorrect Indic entry into separate scripts so
3755 that the covered ranges are the same: Bengali, Devanagari, Gujarati,
3756 Gurmukhi, Kannada, Limbu, Malayalam, Oriya, Sinhala, Sundanese,
3757 Syloti Nagri, Tamil, Telugu, and Tibetan. At the same time, remove
3758 entries for Meetai Mayak and Sharada – the Unicode ranges were
3759 incorrect (and nobody has complained about that), fonts are scarce
3760 for those scripts, and the Indic auto-hinter support is rudimentary
3761 anyways.
3762
3763 * src/autofit/afscript.h: Updated, using AF_CONFIG_OPTION_INDIC and
3764 AF_CONFIG_OPTION_CJK.
3765
3766 * src/autofit/afstyles.h (STYLE_DEFAULT_INDIC): New auxiliary macro.
3767 Use it, together with AF_CONFIG_OPTION_INDIC and
3768 AF_CONFIG_OPTION_CJK, to update.
3769
3770 * src/autofit/afranges.c [AF_CONFIG_OPTION_INDIC]: Updated.
3771 [!AF_CONFIG_OPTION_INDIC, !AF_CONFIG_OPTION_CJK]: Removed.
3772 Sort entries by tags.
3773
Werner Lemberg5c7f5502014-01-03 10:48:26 +010037742014-01-03 Werner Lemberg <wl@gnu.org>
3775
Werner Lembergecdb0e32014-01-03 20:49:31 +01003776 [autofit] Thinko.
3777
3778 * src/autofit/hbshim.c (af_get_char_index): Similar to
3779 `af_get_coverage', reject glyphs which are not substituted.
3780
37812014-01-03 Werner Lemberg <wl@gnu.org>
3782
Werner Lemberga42f9182014-01-03 18:29:41 +01003783 [autofit] Fix handling of default coverages.
3784
Werner Lemberg1b5bc892014-01-03 18:33:24 +01003785 With this commit, the implementation of coverage handling is
3786 completed.
3787
3788 * src/autofit/hbshim.c (af_get_coverage): Exit early if nothing to
3789 do.
3790 Reject coverages which don't contain appropriate glyphs for blue
3791 zones.
3792
37932014-01-03 Werner Lemberg <wl@gnu.org>
3794
3795 [autofit] Fix handling of default coverages.
3796
Werner Lemberga42f9182014-01-03 18:29:41 +01003797 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
3798 First handle non-default coverages, then the default coverage of the
3799 default script, and finally the other default coverages.
3800
38012014-01-03 Werner Lemberg <wl@gnu.org>
3802
Werner Lembergf45749b2014-01-03 18:09:36 +01003803 [autofit] Fix scaling of HarfBuzz shaping.
3804
3805 * src/autofit/hbshim.c (af_get_char_index): Scale to units per EM.
3806
38072014-01-03 Werner Lemberg <wl@gnu.org>
3808
Werner Lemberg5c7f5502014-01-03 10:48:26 +01003809 [autofit] Better ftgrid support.
3810
3811 * src/autofit/afhints.c (af_glyph_hints_get_segment_offset): Add
3812 parameters `is_blue' and `blue_offset'.
3813
Werner Lemberg73cc8332014-01-01 07:10:36 +010038142014-01-01 Werner Lemberg <wl@gnu.org>
3815
Werner Lemberg55cd7e02014-01-02 13:07:48 +01003816 [autofit] Remove some styles.
3817
3818 * src/autofit/afcover.h: Remove coverages for alternative fractions,
3819 denominators, numerators, and fractions.
3820
3821 * src/autofit/afstyles.h (META_STYLE_LATIN): Updated.
3822
38232014-01-01 Werner Lemberg <wl@gnu.org>
3824
Werner Lembergc973e672014-01-01 16:34:42 +01003825 [autofit] Add more styles.
3826
3827 * src/autofit/afstyles.h (STYLE_LATIN, META_STYLE_LATIN): New
3828 auxiliary macros; use them to define styles for Cyrillic, Greek, and
3829 Latin.
3830
3831 * src/autofit/afcover.h: Remove coverage for oldstyle figures.
3832 Since those digits are used in combination with ordinary letters, it
3833 makes no sense to handle them separately.
3834
3835 * src/autofit/afglobal.c (af_face_globals_get_metrics): Don't limit
3836 `options' parameter to 4 bits.
3837
38382014-01-01 Werner Lemberg <wl@gnu.org>
3839
Werner Lembergabb2f732014-01-01 08:00:16 +01003840 [autofit] Fix style assignments to glyphs.
3841
3842 * src/autofit/hbshim.c (af_get_coverage)
3843 [FT_CONFIG_OPTION_USE_HARFBUZZ]: Scan GPOS coverage of features also
3844 so that we can skip glyphs that have both GSUB and GPOS data.
3845
38462014-01-01 Werner Lemberg <wl@gnu.org>
3847
Werner Lemberg0950f3a2014-01-01 07:48:20 +01003848 * src/autofit/hbshim.c: s/{lookups,glyphs}/gsub_{lookups,glyphs}/.
3849
38502014-01-01 Werner Lemberg <wl@gnu.org>
3851
Werner Lemberg73cc8332014-01-01 07:10:36 +01003852 [autofit] Implement and use `af_get_char_index' with HarfBuzz.
3853
3854 * src/autofit/hbshim.c (COVERAGE) [FT_CONFIG_OPTION_USE_HARFBUZZ]:
3855 Redefine to construct HarfBuzz features.
3856 (af_get_char_index) [FT_CONFIG_OPTION_USE_HARFBUZZ]: Rewritten.
3857
3858 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Use
3859 `y_offset' to adjust `best_y'.
3860
Werner Lembergc9d99472013-12-31 08:16:57 +010038612013-12-31 Werner Lemberg <wl@gnu.org>
3862
Werner Lemberg785f3852013-12-31 09:45:10 +01003863 [autofit] s/AF_STYLE_...._DEFAULT/AF_STYLE_...._DFLT/i.
3864
38652013-12-31 Werner Lemberg <wl@gnu.org>
3866
Werner Lembergc9d99472013-12-31 08:16:57 +01003867 [autofit] Fix interface of `af_get_char_index'.
3868
3869 * src/autofit/hbshim.c (af_get_char_index): Return error value.
3870 Add argument for y offset (to be used in a yet-to-come patch).
3871
3872 * src/autofit/hbshim.h, src/autofit/afcjk.c,
3873 src/autofit/aflatin.c: Updated.
3874
Werner Lemberg44aa7e02013-12-30 07:41:22 +010038752013-12-30 Werner Lemberg <wl@gnu.org>
3876
3877 [autofit] Don't combine multiple features into one set.
3878
3879 Combining them, as originally envisioned, would lead to much more
3880 complicated code, as investigations have shown meanwhile. The major
3881 drawback is that we run out of available style slots much earlier.
3882 However, this is only a theoretical issue since we don't support a
3883 large number of scripts currently.
3884
3885 * src/autofit/afcover.h: Replace `COVERAGE_{1,2,3}' macros with
3886 a single-element `COVERAGE' macro, sort the elements by the feature
3887 tags, and add entry for `ruby'.
3888
3889 * src/autofit/aftypes.h: Updated.
3890 * src/autofit/hbshim.c: Updated.
3891
Werner Lemberg6af01a02013-12-28 08:55:24 +010038922013-12-28 Werner Lemberg <wl@gnu.org>
3893
Werner Lemberg072dc452013-12-28 12:26:21 +01003894 [autofit] Code shuffling to reduce use of cpp macros.
3895
3896 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
3897 Call `af_get_coverage' unconditionally.
3898
3899 * src/autofit/autofit.c: Include `hbshim.c' unconditionally.
3900
3901 * src/autofit/hbshim.c (af_get_coverage)
3902 [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Provide dummy function.
3903
3904 * src/autofit/hbshim.h: Provide function declarations
3905 unconditionally.
3906
39072013-12-28 Werner Lemberg <wl@gnu.org>
3908
Werner Lemberg17af5862013-12-28 10:33:01 +01003909 [autofit] Add wrapper function for `FT_Get_Char_Index'.
3910
3911 Yet-to-come changes will provide HarfBuzz functionality for the new
3912 function.
3913
3914 * src/autofit/hbshim.c (af_get_char_index): New function.
3915 * src/autofit/hbshim.h: Updated.
3916
3917 * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
3918 af_cjk_metrics_init_blues, af_cjk_metrics_check_digits): Updated.
3919
3920 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
3921 af_latin_metrics_init_blues, af_latin_metrics_check_digits):
3922 Updated.
3923
39242013-12-28 Werner Lemberg <wl@gnu.org>
3925
Werner Lemberg6af01a02013-12-28 08:55:24 +01003926 [autofit] Use `global' HarfBuzz font object.
3927
3928 We now use `hb_font' instead of `hb_face' since yet-to-come changes
3929 need this.
3930
3931 * src/autofit/afglobal.h: Include `hbshim.h'.
3932 (AF_FaceGlobalsRec) [FT_CONFIG_OPTION_USE_HARFBUZZ]: New member
3933 `hb_font'.
3934
3935 * src/autofit/afglobal.c (af_face_globals_new)
3936 [FT_CONFIG_OPTION_USE_HARFBUZZ]: Create `hb_font'.
3937 (af_face_globals_free) [FT_CONFIG_OPTION_USE_HARFBUZZ]: Destroy
3938 `hb_font'.
3939
3940 * src/autofit/hbshim.h: Include HarfBuzz headers.
3941
3942 * src/autofit/hbshim.c: Include `hbshim.h' instead of HarfBuzz
3943 headers.
3944 (af_get_coverage): Updated.
3945
Werner Lembergd32a7d32013-12-27 19:26:04 +010039462013-12-27 Werner Lemberg <wl@gnu.org>
3947
3948 [autofit] Handle `DFLT' OpenType script for coverages.
3949
3950 * include/ftautoh.h: Document new `default-script' property.
3951
3952 * src/autofit/hbshim.c (af_get_coverage): Use `AF_FaceGlobals' for
3953 type of first parameter.
3954 (script_tags): Add one more element.
3955 (af_get_coverage): Adjust `script_tags' to handle `DFLT' script tag.
3956
3957 * src/autofit/hbshim.h: Updated.
3958
3959 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
3960 Updated.
3961
3962 * src/autofit/afglobal.h (AF_SCRIPT_DEFAULT): New macro.
3963
3964 * src/autofit/afmodule.h (AF_ModuleRec): New `default_script'
3965 member.
3966
3967 * src/autofit/afmodule.c (af_property_set, af_property_get): Handle
3968 `default-script' property.
3969 (af_autofitter_init): Updated.
3970
suzuki toshiyae2d2b152013-12-27 16:44:24 +090039712013-12-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3972
3973 [ftrfork] Fix the face order difference between POSIX and Carbon.
3974
3975 The fragmented resources in Suitcase and .dfont should be reordered
Werner Lemberg00a7b512013-12-27 19:18:49 +01003976 when `POST' resource for Type1 is being restored, but reordering of
suzuki toshiyae2d2b152013-12-27 16:44:24 +09003977 sfnt resources induces the different face order. Now the ordering
Werner Lemberg00a7b512013-12-27 19:18:49 +01003978 is restricted to `POST' resource only, to prevent the different
3979 order issue (e.g. the face index in the fontconfig cache generated
3980 with Carbon framework is incompatible with that by FreeType 2
3981 without Carbon framework.) Found by Khaled Hosny and Hin-Tak Leung.
3982
suzuki toshiyae2d2b152013-12-27 16:44:24 +09003983 http://lists.gnu.org/archive/html/freetype-devel/2013-02/msg00035.html
3984 http://lists.gnu.org/archive/html/freetype-devel/2013-12/msg00027.html
3985
3986 * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Add a switch
Werner Lemberg44aa7e02013-12-30 07:41:22 +01003987 `sort_by_res_id' to control the fragmented resource ordering.
Werner Lemberg00a7b512013-12-27 19:18:49 +01003988 * include/internal/ftrfork.h: Declare new switch.
3989 * src/base/ftobjs.c (IsMacResource): Enable the sorting for `POST'
3990 resource, and disable the sorting for `sfnt' resource.
suzuki toshiyae2d2b152013-12-27 16:44:24 +09003991
Werner Lemberg5f577462013-12-25 08:50:50 +010039922013-12-25 Werner Lemberg <wl@gnu.org>
3993
3994 Fix Savannah bug #40997.
3995
3996 * src/bdf/bdfdrivr.c (BDF_Face_Init): Only use OR operator to
3997 adjust face flags since FT_FACE_FLAG_EXTERNAL_STREAM might already
3998 be set.
3999 * src/cff/cffobjs.c (cff_face_init): Ditto.
4000 * src/cid/cidobjs.c (cid_face_init): Ditto.
4001 * src/pcf/pcfread.c (pcf_load_font): Ditto.
4002 * src/pfr/pfrobjs.c (pfr_face_init): Ditto.
4003 * src/type1/t1objs.c (T1_Face_Init): Ditto.
4004 * src/type42/t42objs.c (T42_Face_Init): Ditto.
4005 * src/winfonts/winfnt.c (FNT_Face_Init): Ditto.
4006
Werner Lembergc4e968e2013-12-21 07:23:08 +010040072013-12-21 Werner Lemberg <wl@gnu.org>
4008
Werner Lemberg19241342013-12-21 21:31:38 +01004009 [autofit] Introduce `coverages'.
4010
4011 Coverages are the interface to the HarfBuzz library to acces
4012 OpenType features for handling glyphs not addressable by the cmap.
4013
4014 Right now, compilation of HarfBuzz is only added to the development
4015 build. A solution for standard build mode will be delayed until
4016 HarfBuzz gets split into two libraries to avoid mutual dependencies
4017 between FreeType and HarfBuzz.
4018
4019 Note that this is only a first step in handling coverages, basically
4020 providing the framework only. Code for handling selected OpenType
4021 features (this is, actually using the data in `afcover.h') will
4022 follow.
4023
4024 * devel/ftoption.h, include/config/ftoption.h
4025 (FT_CONFIG_OPTION_USE_HARFBUZZ): New macro.
4026
4027 * src/autofit/hbshim.c, src/autofit/hbshim.h, src/autofit/afcover.h:
4028 New files.
4029
4030 * src/autofit/afscript.h: Add HarfBuzz script name tags.
4031
4032 * src/autofit/afstyles.h: Add default coverage enumeration values.
4033
4034 * src/autofit/aftypes.h: Update use of `SCRIPT' and `STYLE' macros.
4035 (AF_Coverage): New enumeration (generated by `afcover.h').
4036 (AF_StyleClassRec): New member `coverage'.
4037 (AF_DEFINE_STYLE_CLASS): Updated.
4038
4039 * include/internal/fttrace.h: Add `afharfbuzz' for tracing coverage
4040 data.
4041
4042 * src/autofit/afglobal.h: Update use of `SCRIPT' and `STYLE' macros.
4043 (AF_SCRIPT_FALLBACK): Renamed to ...
4044 (AF_STYLE_FALLBACK): ... this.
4045
4046 * src/autofit/afglobal.c: Include `hbshim.c'.
4047 Update use of `SCRIPT' and `STYLE' macros.
4048 (af_face_globals_compute_style_coverage)
4049 [FT_CONFIG_OPTION_USE_HARFBUZZ]: Call `af_get_coverage'.
4050 Update.
4051
4052 * src/autofit/afmodule.h (AF_ModuleRec):
4053 s/fallback_script/fallback_style/.
4054
4055 * src/autofit/afmodule.c (af_property_set): Adapt handling of
4056 `fallback-script' property to set a fallback style.
4057 (af_property_get, af_autofitter_init): Updated.
4058
4059 * src/autofit/afpic.c: Update use of `SCRIPT' and `STYLE' macros.
4060
4061 * src/autofit/afranges.h: Update use of `SCRIPT' macro.
4062
4063 * src/autofit/autofit.c [FT_CONFIG_OPTION_USE_HARFBUZZ]: Include
4064 `hbshim.c'.
4065
4066 * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `hbshim.c'.
4067 (AUTOF_DRV_H): Add `afcover.h'.
4068
4069 * builds/freetype.mk (INCLUDE_FLAGS) [DEVEL_DIR]: Use pkg-config for
4070 all libraries needed by FreeType.
4071
40722013-12-21 Werner Lemberg <wl@gnu.org>
4073
Werner Lembergb337fa22013-12-21 19:33:15 +01004074 Fix Savannah bug #40975 (sort of).
4075
4076 * src/truetype/ttinterp.c (Ins_IP): Fix sign typo to make FreeType
4077 behave the same as the Windows TrueType engine for the invalid case.
4078
40792013-12-21 Werner Lemberg <wl@gnu.org>
4080
Werner Lemberg3bf60952013-12-21 08:49:11 +01004081 [autofit] Make PIC mode work actually.
4082
4083 * src/autofit/afpic.h (AFModulePIC): Fix array sizes to fit the
4084 enumeration values automatically generated by including `afscript.h'
4085 and friends.
4086
4087 * src/autofit/afpic.c (autofit_module_class_pic_init): Updated.
4088
40892013-12-21 Werner Lemberg <wl@gnu.org>
4090
Werner Lembergbd413862013-12-21 08:14:25 +01004091 Fix PIC linking.
4092
4093 * include/internal/ftrfork.h (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Fix
4094 generated function name.
4095
4096 * src/base/basepic.c (FT_Init_Table_raccess_guess_table): Rename
4097 to ...
4098 (FT_Init_Table_ft_raccess_guess_table): ... this so that the
4099 function name correctly corresponds to what the macro framework
4100 expects.
4101
4102 * src/psnames/rules.mk (PSNAMES_DRV_SRC_S): Use correct file name so
4103 that PIC functions are compiled also.
4104
41052013-12-21 Werner Lemberg <wl@gnu.org>
4106
Werner Lembergc4e968e2013-12-21 07:23:08 +01004107 [base] Add missing dependencies to Makefile.
4108
4109 * src/base/rules.mk (BASE_SRC): Add `basepic.c' and `ftpic.c'.
4110 (BASE_H): Add `basepic.h'.
4111
Werner Lemberg974b1932013-12-20 17:26:26 +010041122013-12-20 Werner Lemberg <wl@gnu.org>
4113
Werner Lemberg8a8f3752013-12-20 18:35:35 +01004114 [autofit] Fix PIC compilation.
4115
4116 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
4117 src/autofit/aflatin.c (af_latin_metrics_init_widths)
4118 [FT_CONFIG_OPTION_PIC]: Declare `globals'.
4119
4120 * src/autofit/afglobal.c: Always call AF_DEFINE_SCRIPT_CLASS, and
4121 AF_DEFINE_STYLE_CLASS.
4122
4123 * src/autofit/afpic.c: Include `afglobal.h'.
4124 (autofit_module_class_pic_init): Typo.
4125
4126 * src/autofit/aftypes.h (AF_DEFINE_SCRIPT_CLASS,
4127 AF_DEFINE_STYLE_CLASS): Don't use the same identifier for macro
4128 parameter and structure member.
4129
41302013-12-20 Werner Lemberg <wl@gnu.org>
4131
Werner Lemberg974b1932013-12-20 17:26:26 +01004132 [autofit] Introduce `styles'.
4133
4134 This is the new top-level structure for handling glyph input data;
4135 scripts are now defined separately.
4136
4137 * src/autofit/aftypes.h (SCRIPT): Updated.
4138 (AF_ScriptClassRec): Move `blue_stringset' and `writing_system'
4139 members to ...
4140 (AF_Style_ClassRec): ... this new structure.
4141 (AF_Style): New enumeration.
4142 (AF_StyleMetricsRec): Replace `script' enumeration with
4143 `style_class' pointer.
4144 (AF_DEFINE_SCRIPT_CLASS, AF_DECLARE_SCRIPT_CLASS): Updated.
4145 (AF_DEFINE_STYLE_CLASS, AF_DECLARE_STYLE_CLASS): New macros.
4146
4147 * src/autofit/afstyles.h: New file, using data from `afscript.h'.
4148 * src/autofit/afscript.h: Updated.
4149
4150 * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
4151 af_cjk_metrics_init_blues, af_cjk_hint_edges): Updated.
4152
4153 * src/autofit/afglobal.c (SCRIPT): Updated.
4154 (STYLE): Redefine macro to load `afstyles.h'.
4155 (af_script_names) [FT_DEBUG_LEVEL_TRACE]: Replace with...
4156 (af_style_names): ... this array.
4157 (af_face_globals_compute_script_coverage): Renamed to...
4158 (af_face_globals_compute_style_coverage): ... this.
4159 Updated.
4160 (af_face_globals_new, af_face_globals_free,
4161 af_face_globals_get_metrics): Updated.
4162
4163 * src/autofit/afglobal.h (SCRIPT): Updated.
4164 (STYLE): Redefine macro to load `afstyles.h'.
4165 (AF_SCRIPT_FALLBACK): Update definition. This will get more
4166 refinements with later on.
4167 (AF_SCRIPT_UNASSIGNED): Replace with...
4168 (AF_STYLE_UNASSIGNED): ... this macro.
4169 (AF_FaceGlobalsRec): Updated.
4170
4171 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
4172 af_latin_metrics_init_blues, af_latin_metrics_scale_dim,
4173 af_latin_hint_edges): Updated.
4174
4175 * src/autofit/aflatin2.c (af_latin2_metrics_init_widths): Updated.
4176 (af_ltn2_uniranges): Removed.
4177
4178 * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph):
4179 Updated.
4180
4181 * src/autofit/afpic.c (autofit_module_class_pic_init): Updated.
4182 * src/autofit/afpic.h (AF_STYLE_CLASSES_GET): New macro.
4183 (AFModulePIC): Add `af_style_classes' and `af_style_classes_rec'
4184 members.
4185
4186 * src/autofit/afranges.h: Updated.
4187
4188 * src/autofit/rules.mk (AUTOF_DRV_H): Add `afstyles.h'.
4189
Werner Lembergd8324572013-12-19 15:45:24 +010041902013-12-19 Werner Lemberg <wl@gnu.org>
4191
4192 [autofit] Factor scripts and uniranges out of writing system files.
4193
4194 * src/autofit/afranges.c, src/autofit/afranges.h: New files.
4195
4196 * src/autofit/afscript.h: Extend `SCRIPT' macro with more
4197 parameters, taking data from the writing system files.
4198
4199 * src/autofit/aftypes.h: Updated.
4200
4201 * src/autofit/afglobal.c: Include `afranges.h'.
4202 Load `afscript.h' to call AF_DEFINE_SCRIPT_CLASS.
4203 * src/autofit/afglobal.c: Include `afranges.h'.
4204 Load `afscript.h' to call AF_DECLARE_SCRIPT_CLASS.
4205
4206 * src/autofit/afcjk.c, src/autofit/afcjk.h: Updated.
4207 * src/autofit/afdummy.c, src/autofit/afdummy.h: Updated.
4208 * src/autofit/afindic.c, src/autofit/afindic.h: Updated.
4209 * src/autofit/aflatin.c, src/autofit/aflatin.h: Updated.
4210 * src/autofit/aflatn2.c, src/autofit/aflatn2.h: Updated.
4211
4212 * src/autofit/afpic.c: Updated.
4213
4214 * src/autofir/autofit.c: Include `afranges.c'.
4215 * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `afranges.c'.
4216
Werner Lemberg9a354552013-12-18 10:36:06 +010042172013-12-18 Werner Lemberg <wl@gnu.org>
4218
Werner Lemberg73f31982013-12-19 15:24:17 +01004219 [autofit] More code orthogonality.
4220
4221 * src/autofit/aftypes.h (AF_StyleMetrics): Replace `script_class'
4222 pointer to an `AF_ScriptClass' structure with `script' index of type
4223 `AF_Script'.
4224 Move some code around.
4225
4226 * src/autofit/afcjk.c: Include `afpic.h'.
4227 (af_cjk_metrics_init_widths, af_cjk_metrics_init_blues,
4228 af_cjk_hint_edges): Updated.
4229
4230 * src/autofit/aflatin.c: Include `afpic.h'.
4231 (af_latin_metrics_init_widths, af_latin_metrics_init_blues,
4232 af_latin_metrics_scale_dim, af_latin_hint_edges): Updated.
4233
4234 * src/autofit/afglobal.c (af_face_globals_get_metrics): Updated.
4235
4236 * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph):
4237 Updated.
4238
42392013-12-18 Werner Lemberg <wl@gnu.org>
4240
Werner Lemberg3f91cb32013-12-18 12:59:35 +01004241 [autofit] s/ScriptMetrics/StyleMetrics/.
4242
42432013-12-18 Werner Lemberg <wl@gnu.org>
4244
Werner Lemberg4fccc212013-12-18 12:53:01 +01004245 [autofit] s/script_{metrics,hints}/style_{metrics,hints}/
4246
42472013-12-18 Werner Lemberg <wl@gnu.org>
4248
Werner Lembergf4df4072013-12-18 10:39:30 +01004249 [autofit] s/gscripts/gstyles/.
4250
42512013-12-18 Werner Lemberg <wl@gnu.org>
4252
Werner Lemberg9a354552013-12-18 10:36:06 +01004253 [autofit] s/glyph_scripts/glyph_styles/.
4254
4255 This is the first commit of a series to create a new top-level
4256 structure (a `style') for handling scripts, writing_systems, and
4257 soon-to-be-added coverages.
4258
Werner Lemberg7a5fc2f2013-12-17 13:29:53 +010042592013-12-17 Werner Lemberg <wl@gnu.org>
4260
4261 [autofit] s/AF_Script_/AF_WritingSystem_/ where appropriate.
4262
Infinality8bb09b02013-12-11 09:01:13 +010042632013-12-11 Infinality <infinality@infinality.net>
4264
4265 [truetype] Simplify logic of rendering modes.
4266
4267 This patch unifies the subpixel and non-subpixel cases.
4268
4269 * src/truetype/ttinterp.h (TT_ExecContextRec): Remove
4270 `grayscale_hinting'; all code should refer to `grayscale' instead.
4271 Remove unused `native_hinting' member.
4272 Rename `subpixel_hinting' member to `subpixel.
4273
4274 * src/truetype/ttgload.c (TT_LOADER_SET_PP): Updated.
4275 (tt_loader_init): Updated.
4276
4277 * src/truetype/ttinterp.c (Ins_GETINFO): Simplify.
4278 Updated.
4279
Werner Lemberge9d95aa2013-12-11 07:48:51 +010042802013-12-11 Werner Lemberg <wl@gnu.org>
4281
4282 [documentation] Add section how to include FreeType header files.
4283 Problem reported by David Kastrup <dak@gnu.org>.
4284
4285 Surprisingly, a description how to do that was completely missing in
4286 the API reference.
4287
4288 * include/freetype.h, include/ftchapters.h: New documentation
4289 section `header_inclusion'.
4290
Werner Lemberg05c786d2013-12-10 08:38:57 +010042912013-12-10 Werner Lemberg <wl@gnu.org>
4292
Werner Lemberg91932592013-12-10 13:24:07 +01004293 [autofit] s/DFLT/NONE/, s/dflt/none/.
4294
42952013-12-10 Werner Lemberg <wl@gnu.org>
4296
Werner Lemberg45244f82013-12-10 13:18:11 +01004297 [autofit] s/AF_SCRIPT_NONE/AF_SCRIPT_UNASSIGNED/.
4298
42992013-12-10 Werner Lemberg <wl@gnu.org>
4300
Werner Lemberg69d1a362013-12-10 10:12:27 +01004301 [truetype] Fix scaling of vertical phantom points.
4302
4303 * src/truetype/ttgload.c (load_truetype_glyph): Scale pp3.x and
4304 pp4.x also.
4305
43062013-12-10 Werner Lemberg <wl@gnu.org>
4307
Werner Lemberg05c786d2013-12-10 08:38:57 +01004308 [truetype] Fix positioning of composite glyphs.
4309 Problem reported by Nigel Tao <nigeltao@golang.org>.
4310
4311 * src/truetype/ttgload.c (TT_Hint_Glyph): Remove code that shifts
4312 the glyph (component) by a fractional value computed from the LSB
4313 phantom point. This is wrong, since the horizontal phantom points
4314 get rounded horizontally later on.
4315
Werner Lembergdd8050a2013-12-08 23:14:46 +010043162013-12-08 Werner Lemberg <wl@gnu.org>
4317
4318 * Version 2.5.2 released.
4319 =========================
4320
4321
4322 Tag sources with `VER-2-5-2'.
4323
4324 * docs/VERSION.DLL: Update documentation and bump version number to
4325 2.5.2.
4326
4327 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
4328 builds/windows/vc2005/index.html,
4329 builds/windows/vc2008/freetype.vcproj,
4330 builds/windows/vc2008/index.html,
4331 builds/windows/vc2010/freetype.vcxproj,
4332 builds/windows/vc2010/index.html,
4333 builds/windows/visualc/freetype.dsp,
4334 builds/windows/visualc/freetype.vcproj,
4335 builds/windows/visualc/index.html,
4336 builds/windows/visualce/freetype.dsp,
4337 builds/windows/visualce/freetype.vcproj,
4338 builds/windows/visualce/index.html,
4339 builds/wince/vc2005-ce/freetype.vcproj,
4340 builds/wince/vc2005-ce/index.html,
4341 builds/wince/vc2008-ce/freetype.vcproj,
4342 builds/wince/vc2008-ce/index.html: s/2.5.1/2.5.2/, s/251/252/.
4343
Werner Lembergec8853c2014-03-06 19:13:45 +01004344 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
Werner Lembergdd8050a2013-12-08 23:14:46 +01004345
4346 * builds/unix/configure.raw (version_info): Set to 17:1:11.
Werner Lembergec8853c2014-03-06 19:13:45 +01004347 * CMakeLists.txt (VERSION_PATCH): Set to 2.
Werner Lembergdd8050a2013-12-08 23:14:46 +01004348 * docs/CHANGES: Updated.
4349
Werner Lemberg98d185c2013-12-07 09:26:55 +010043502013-12-07 Werner Lemberg <wl@gnu.org>
4351
4352 [truetype] Next round in phantom point handling.
4353
4354 Greg Hitchcock provided very interesting insights into the
4355 complicated history of the horizontal positions of the TSB and BSB
4356 phantom points.
4357
4358 * src/truetype/ttgload.c (TT_LOADER_SET_PP)
4359 [TT_CONFIG_OPTION_SUBPIXEL_HINTING]: Use `subpixel_hinting' and
4360 `grayscale_hinting' flags as conditionals for the x position of TSB
4361 and BSB.
4362
Werner Lembergfcdb7842013-12-05 15:53:27 +010043632013-12-05 Werner Lemberg <wl@gnu.org>
4364
4365 * builds/freetype.mk (FT_CC): Removed. Unused.
4366
Werner Lemberg64b395c2013-12-04 06:18:56 +010043672013-12-04 Werner Lemberg <wl@gnu.org>
4368
4369 [sfnt] Fix handling of embedded bitmap strikes.
4370
4371 This corrects the commit from 2013-11-21. Problem reported by
4372 Andrey Panov <panov@canopus.iacp.dvo.ru>.
4373
4374 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Fix logic to
4375 detect excessive bytes for bit-aligned bitmaps.
4376
Werner Lembergbdd5e752013-12-03 06:57:02 +010043772013-12-03 Werner Lemberg <wl@gnu.org>
4378
Werner Lembergc2b47532013-12-03 07:01:57 +01004379 [truetype] Remove dead code.
4380
4381 Reported by Nigel Tao <nigeltao@golang.org>.
4382
4383 * include/internal/tttypes.h (TT_LoaderRec): Remove unused
4384 `preserve_pps' field.
4385 * src/truetype/ttgload.c (TT_Hint_Glyph): Updated.
4386
43872013-12-03 Werner Lemberg <wl@gnu.org>
4388
Werner Lembergbdd5e752013-12-03 06:57:02 +01004389 [truetype] Fix phantom point handling.
4390
4391 This is a further improvement to the changes from 2013-11-06.
4392
4393 * src/truetype/ttgload.c (TT_Hint_Glyph): Horizontal phantom points
4394 are rounded horizontally, vertical ones are rounded vertically.
4395 (TT_LOADER_SET_PP): The horizontal position of vertical phantom
4396 points in pre-ClearType mode is zero, as shown in the OpenType
4397 specification.
4398
Werner Lemberg64872a52013-12-02 07:51:17 +010043992013-12-02 Werner Lemberg <wl@gnu.org>
4400
4401 [truetype] Fix change from 2013-11-20.
4402
4403 Problem reported by Akira Kakuto <kakuto@fuk.kindai.ac.jp>.
4404
4405 * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Protect call to
4406 `Update_Max' with both a TT_USE_BYTECODE_INTERPRETER guard and a
4407 `IS_HINTED' clause.
4408 Also remove redundant check using `maxSizeOfInstructions' – in
4409 simple glyphs, the bytecode data comes before the outline data, and
4410 a validity test for this is already present.
4411
Werner Lemberg52166ab2013-11-27 10:10:16 +010044122013-11-27 Werner Lemberg <wl@gnu.org>
4413
4414 [autofit] Fix use of dumping functions in `ftgrid' demo program.
4415
4416 * src/autofit/afhints.c (AF_DUMP) [FT_DEBUG_AUTOFIT]: New macro.
4417 (af_glyph_hints_dump_points, af_glyph_hints_dump_segments,
4418 af_glyph_hints_dump_edges) [FT_DEBUG_AUTOFIT]: Add parameter to
4419 handle output to stdout.
4420 Use AF_DUMP.
4421 (af_glyph_hints_dump_points, af_glyph_hints_dump_segments,
4422 af_glyph_hints_dump_edges) [!FT_DEBUG_AUTOFIT]: Removed.
4423
Werner Lemberg3aee4292013-11-25 00:28:11 +010044242013-11-25 Werner Lemberg <wl@gnu.org>
4425
4426 * Version 2.5.1 released.
4427 =========================
4428
4429
4430 Tag sources with `VER-2-5-1'.
4431
4432 * docs/VERSION.DLL: Update documentation and bump version number to
4433 2.5.1.
4434
4435 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
4436 builds/windows/vc2005/index.html,
4437 builds/windows/vc2008/freetype.vcproj,
4438 builds/windows/vc2008/index.html,
4439 builds/windows/vc2010/freetype.vcxproj,
4440 builds/windows/vc2010/index.html,
4441 builds/windows/visualc/freetype.dsp,
4442 builds/windows/visualc/freetype.vcproj,
4443 builds/windows/visualc/index.html,
4444 builds/windows/visualce/freetype.dsp,
4445 builds/windows/visualce/freetype.vcproj,
4446 builds/windows/visualce/index.html,
4447 builds/wince/vc2005-ce/freetype.vcproj,
4448 builds/wince/vc2005-ce/index.html,
4449 builds/wince/vc2008-ce/freetype.vcproj,
4450 builds/wince/vc2008-ce/index.html: s/2.5.0/2.5.1/, s/250/251/.
4451
4452 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
4453
4454 * builds/unix/configure.raw (version_info): Set to 17:0:11.
Werner Lembergec8853c2014-03-06 19:13:45 +01004455 * CMakeLists.txt (VERSION_PATCH): Set to 1.
Werner Lemberg3aee4292013-11-25 00:28:11 +01004456 * docs/CHANGES, docs/release: Updated.
4457
Werner Lemberg9326caf2013-11-23 23:59:25 +010044582013-11-23 Werner Lemberg <wl@gnu.org>
4459
Werner Lemberg063ee6b2013-11-24 00:19:17 +01004460 [truetype]: Add tricky font names `hkscsiic.ttf' and `iicore.ttf'.
4461
4462 * src/truetype/ttobjs.c (TRICK_NAMES_MAX_CHARACTERS,
4463 TRICK_NAMES_COUNT): Updated.
4464 (trick_names): Add family name for the two fonts.
4465
44662013-11-23 Werner Lemberg <wl@gnu.org>
4467
Werner Lemberg9326caf2013-11-23 23:59:25 +01004468 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Typo.
4469
Werner Lemberg427b1762013-11-21 13:10:56 +010044702013-11-21 Werner Lemberg <wl@gnu.org>
4471
Werner Lemberg9326caf2013-11-23 23:59:25 +01004472 [sfnt] Typo.
Werner Lemberg8af2a1c2013-11-21 13:13:12 +01004473
4474 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
4475
4476 * src/sfnt/sfobjs.c (sfnt_load_face): Return correct `bsize->width'
4477 value if the font lacks an `OS/2' table.
4478
44792013-11-21 Werner Lemberg <wl@gnu.org>
4480
Werner Lemberg64b395c2013-12-04 06:18:56 +01004481 [sfnt] Improve handling of buggy embedded bitmap strikes.
Werner Lemberg427b1762013-11-21 13:10:56 +01004482
4483 We are now able to successfully load `AppleMyoungJo.ttf'.
4484 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
4485
4486 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Don't trust glyph
4487 format.
4488
Werner Lemberg28626862013-11-20 21:06:18 +010044892013-11-20 Werner Lemberg <wl@gnu.org>
4490
4491 [truetype] Don't trust `maxp's `maxSizeOfInstructions'.
4492
4493 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>; see
4494
4495 http://lists.nongnu.org/archive/html/freetype-devel/2013-08/msg00005.html
4496
4497 for details.
4498
4499 * src/base/ftobjs.c (FT_Load_Glyph): Check size of `fpgm' and `prep'
4500 tables also for setting `autohint'.
4501
4502 * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Use code from
4503 `TT_Process_Composite_Glyph' for handling unreliable values of
4504 `maxSizeOfInstructions'.
4505
Werner Lembergbc25de62013-11-16 07:52:20 +010045062013-11-16 Werner Lemberg <wl@gnu.org>
4507
4508 [sfnt] Fix `OS/2' table version 5 support.
4509
4510 We now follow the `official' announcement from Microsoft (on the
4511 OpenType mailing list, which unfortunately hasn't a public archive).
4512
4513 * include/freetype/tttables.h (TT_OS2):
4514 s/usLowerPointSize/usLowerOpticalPointSize/,
4515 s/usUpperPointSize/usUpperOpticalPointSize/.
4516
4517 * src/sfnt/ttload.c (tt_face_load_os2): Update, and set correct
4518 default values.
4519
Werner Lembergfae38202013-11-13 08:55:46 +010045202013-11-13 Werner Lemberg <wl@gnu.org>
4521
Werner Lembergc52b1292013-11-13 10:06:00 +01004522 * builds/unix/ft2unix.h: Remove. No longer necessary.
4523
4524 * builds/unix/install.mk (install): Updated.
4525
45262013-11-13 Werner Lemberg <wl@gnu.org>
4527
Werner Lembergfae38202013-11-13 08:55:46 +01004528 Simplify header file hierarchy.
4529
4530 This large patch changes the header file directory layout from
4531 `include/freetype/...' to `include/...', effectively removing one
4532 level. Since the file `ft2build.h' is also located in `include'
4533 (and it stays there even after installation), all FreeType header
4534 files are now in a single directory.
4535
4536 Applications that use (a) `freetype-config' or FreeType's
4537 `pkg-config' file to get the include directory for the compiler, and
4538 (b) the documented way for header inclusion like
4539
4540 #include <ft2build.h>
4541 #include FT_FREETYPE_H
4542 ...
4543
4544 don't need any change to the source code.
4545
4546 * include/freetype/*: Move up to...
4547 * include/*: ... this directory.
4548
4549 * builds/amiga/include/freetype/*: Move up to...
4550 * builds/amiga/include/*: ... this directory.
4551
4552 */*: Essentially do `s@/freetype/@/@' where appropriate.
4553
4554 * CMakeList.txt: Simplify.
4555 * builds/unix/freetype-config.in, builds/unix/freetype2.in: For
4556 `--cflags', return a single directory.
4557 * builds/unix/install.mk (install): No longer try to remove `cache'
4558 and `internal' subdirectories; instead, remove the `freetype'
4559 subdirectory.
4560
Werner Lembergea5c7812013-11-12 08:55:26 +010045612013-11-12 Werner Lemberg <wl@gnu.org>
4562
4563 [truetype] Fix last `truetype' commit.
4564
4565 * src/truetype/ttgload.c (tt_get_metrics): Preserve stream position.
4566 Return error value.
4567 (load_truetype_glyph): Updated.
4568
Werner Lemberg78333282013-11-10 06:26:52 +010045692013-11-10 Werner Lemberg <wl@gnu.org>
4570
4571 * docs/CMAKE: New dummy file.
4572
Dave Arnolddd213012013-11-08 10:52:51 +010045732013-11-08 Dave Arnold <darnold@adobe.com>
4574
4575 [cff] Fix for hints that touch.
4576
4577 * src/cff/cf2hints.c (cf2_hintmap_insertHint): Fix condition for
4578 finding index value of insertion point.
4579
Werner Lemberg7e4b0fb2013-11-06 07:14:49 +010045802013-11-06 Werner Lemberg <wl@gnu.org>
4581
Werner Lemberg5e225b72013-11-06 08:41:59 +01004582 [truetype] Fix handling of phantom points in composite glyphs.
4583 Problem reported by Nigel Tao <nigeltao@golang.org>.
4584
4585 This is a follow-up commit to the previous one.
4586
4587 * src/truetype/ttgload.c (load_truetype_glyph): Call
4588 `tt_get_metrics' after loading the glyph header.
4589
45902013-11-06 Werner Lemberg <wl@gnu.org>
4591
Werner Lemberg7e4b0fb2013-11-06 07:14:49 +01004592 [truetype] Improve emulation of vertical metrics.
4593
4594 This commit also improves the start values of vertical phantom
4595 points. Kudos to Greg Hitchcock for help.
4596
4597 * src/truetype/ttgload.c (TT_Get_VMetrics): Add parameter to pass
4598 `yMax' value. Replace code with fixed Microsoft definition.
4599 (tt_get_metrics): Updated.
4600 (TT_LOADER_SET_PP): Add explanation how to initialize phantom
4601 points, taken from both the OpenType specification and private
4602 communication with Greg (which will eventually be added to the
4603 standard).
4604 Fix horizontal position of `pp3' and `pp4'.
4605
4606 * src/truetype/ttgload.h: Updated.
4607
4608 * src/truetype/ttdriver.c (tt_get_advances): Updated.
4609
4610 * docs/CHANGES: Updated.
4611
Werner Lembergc6064282013-11-05 13:29:15 +010046122013-11-05 Werner Lemberg <wl@gnu.org>
4613
Werner Lemberg50740532013-11-05 23:19:18 +01004614 * builds/windows/vc2010/freetype.vcxproj: s/v110/v100/.
4615 PlatformToolSet version 110 is for VC2012.
4616
4617 Problem reported (with solution) by Dave Arnold <darnold@adobe.com>.
4618
46192013-11-05 Werner Lemberg <wl@gnu.org>
4620
Werner Lembergc6064282013-11-05 13:29:15 +01004621 [truetype] Correctly reset point tags for glyph components.
4622 Problem reported by Nigel Tao <nigeltao@golang.org>.
4623
4624 * src/truetype/ttgload.c (TT_Process_Composite_Glyph): Fix loop.
4625
Werner Lemberg35b08182013-11-02 08:28:41 +010046262013-11-02 Werner Lemberg <wl@gnu.org>
4627
Werner Lemberg7d449432013-11-02 11:36:37 +01004628 [truetype] Fix GETINFO opcode handling of subpixel hinting bits.
4629
4630 * src/truetype/ttinterp.c (Ins_GETINFO): Don't request bit 6 set to
4631 get info on subpixel hinting.
4632
4633 * docs/CHANGES: Updated.
4634
46352013-11-02 Werner Lemberg <wl@gnu.org>
4636
Werner Lemberg35b08182013-11-02 08:28:41 +01004637 Fix Savannah bug #40451.
4638
4639 Simply apply the patch from the bug report.
4640
4641 * builds/unix/ftconfig.in, builds/vms/ftconfig.h,
4642 include/freetype/config/ftconfig.h: The used #pragma directives only
4643 work with gcc versions 4.6 and higher.
4644
Werner Lembergebf52d62013-11-01 13:26:28 +010046452013-11-01 Werner Lemberg <wl@gnu.org>
4646
Werner Lembergafa0d592013-11-01 22:27:27 +01004647 * docs/CHANGES: Updated.
4648
46492013-11-01 Werner Lemberg <wl@gnu.org>
4650
Werner Lembergebf52d62013-11-01 13:26:28 +01004651 [truetype] Minor code refactoring.
4652
4653 Two benefits: The allocated FDEF (and IDEF) array gets slightly
4654 smaller, and the `ttdebug' demo program has access to function
4655 numbers without additional costs.
4656
4657 Fortunately, no changes to FontForge are necessary – this is the
4658 only external TrueType debugger I know of, but others may exist and
4659 should check the code accordingly.
4660
4661 * src/truetype/ttinterp.h (TT_CallRec): Replace `Cur_Restart' and
4662 `Cur_End' with a pointer to the corresponding `TT_DefRecord'
4663 structure.
4664
4665 * src/truetype/ttinterp.c (DO_JROT, DO_JMPR, DO_JROF, Ins_ENDF,
4666 Ins_CALL, Ins_LOOPCALL, Ins_UNKNOWN, TT_RunIns <Invalid_Opcode>):
4667 Updated.
4668
Werner Lembergee510512013-10-27 07:25:35 +010046692013-10-27 Werner Lemberg <wl@gnu.org>
4670
4671 [sfnt] Implement support for `OS/2' table version 5.
4672
4673 See
4674
4675 http://typedrawers.com/discussion/470/new-microsoft-size-specific-design-selection-mechanism
4676
4677 for the announcement.
4678
4679 * include/freetype/tttables.h (TT_OS2): Add fields
4680 `usLowerPointSize' and `usUpperPointSize'. Since FreeType returns
4681 this structure only as a pointer through `FT_Get_Sfnt_Table', there
4682 shouldn't be any ABI problems.
4683
4684 * src/sfnt/ttload.c (tt_face_load_os2): Implement it.
4685
4686 * docs/CHANGES: Updated.
4687
Werner Lemberg994a8592013-10-24 08:50:34 +020046882013-10-24 Werner Lemberg <wl@gnu.org>
4689
4690 * README.git, docs/CHANGES, docs/INSTALL: Updated.
4691
John Carya0e4a732013-10-24 08:49:08 +020046922013-10-24 John Cary <cary@txcorp.com>
4693
4694 Provide cmake support.
4695
4696 * CMakeLists.txt: New file.
4697
Kenneth Miller4d87ac82013-10-23 20:10:56 +020046982013-10-23 Kenneth Miller <kennethadammiller@yahoo.com>
4699 Werner Lemberg <wl@gnu.org>
4700
4701 Provide support for x64 builds in Visual C++ project files.
4702
4703 * src/builds/win32: Renamed to...
4704 * src/builds/windows: This.
4705
4706 * src/builds/windows/vc2010/*: Updated to handle x64 target.
4707
4708 * src/builds/windows/*.mk, docs/INSTALL.GNU: s/win32/windows/ where
4709 appropriate.
4710
Werner Lemberg604838d2013-10-22 01:10:10 +020047112013-10-22 Werner Lemberg <wl@gnu.org>
4712
4713 * src/base/md5.c, src/base/md5.h: Updated to recent version.
4714
4715 * src/base/ftobjs.c: Updated; `md5.c' no longer uses `free'.
4716
Werner Lembergdb9159c2013-10-22 10:27:50 +02004717 The canonical URL to get updates for this file is
4718
4719 http://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/popa3d/popa3d/md5/
4720
4721 as the author told me in private communication.
4722
Werner Lemberg34efe052013-10-19 21:14:40 +020047232013-10-19 Werner Lemberg <wl@gnu.org>
4724
Werner Lemberg75efc2d2013-10-19 21:46:03 +02004725 [autofit] s/SMALL_TOP/X_HEIGHT/.
4726
4727 * src/autofit/afblue.dat: Updated.
4728
4729 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
4730
4731 * src/autofit/aflatin.c, src/autofit/aflatin.h,
4732 src/autofit/atlatin2.c: Updated.
4733
47342013-10-19 Werner Lemberg <wl@gnu.org>
4735
Werner Lemberg34efe052013-10-19 21:14:40 +02004736 * src/autofit/afblue.dat: s/MINOR/DESCENDER/.
4737
4738 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
4739
Werner Lemberg955f6a82013-10-16 19:47:57 +020047402013-10-16 Werner Lemberg <wl@gnu.org>
4741
Werner Lemberga5f22a92013-10-17 11:08:25 +02004742 [autofit] Add description strings to script entries.
4743
4744 Currently, this is unused.
4745
4746 * src/autofit/afscript.h: Do it.
4747 * src/autofit/afglobal.c, src/autofit/afpic.c,
4748 src/autofit/aftypes.h: Updated.
4749
47502013-10-16 Werner Lemberg <wl@gnu.org>
4751
Werner Lemberg955f6a82013-10-16 19:47:57 +02004752 [autofit] Improve tracing message for extra light flag.
4753
4754 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Do it.
4755
Chongyu Zhu41632b52013-10-15 11:40:34 +020047562013-10-15 Chongyu Zhu <lembacon@gmail.com>
4757
4758 [arm] Fix thumb2 inline assembly under LLVM.
4759
4760 When using `ADD' with an immediate operand, the instruction is
4761 actually `ADD Rd, Rn, #<imm12>', that is, the maximum of the
4762 immediate operand cannot exceed 4095. It will fail to compile with
4763 LLVM.
4764
4765 However, in GCC, due to some legacy compatibility considerations,
4766 `ADD.W' will be automatically emitted when the immediate operand is
4767 larger than 4095.
4768
4769 * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h
4770 (FT_MulFix_arm) [__GNUC__]: Support clang compiler.
4771
4772 * src/truetype/ttinterp.c (TT_MulFix14_arm) [__GNUC__]: Ditto.
4773
Werner Lembergb6695242013-10-12 10:33:04 +020047742013-10-12 Werner Lemberg <wl@gnu.org>
4775
4776 [autofit] Improve tracing of `latin' hinter.
4777
4778 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Report blue
4779 zone types.
4780 (af_latin_metrics_scale_dim): Report scaling changes due to x height
4781 alignment.
4782 Report scaled stroke width and blue zone values.
4783
Dave Arnolde845a852013-10-03 23:04:29 +020047842013-10-03 Dave Arnold <darnold@adobe.com>
4785
4786 * src/cff/cf2font.c (cf2_computeDarkening): Avoid division by zero.
4787
Werner Lemberg2c56f2a2013-10-07 22:01:00 +02004788 Note that the old code avoided using a region of the piecewise
4789 linear function where the slope was zero. The recovery was to use a
4790 different section of the function, which produced a different,
4791 incorrect amount of darkening.
4792
Darrell Bellert01af71d2013-10-02 22:04:07 +020047932013-10-02 Darrell Bellert <darrell.bellert@hl.konicaminolta.us>
4794
4795 * src/sfnt/ttload.c (tt_face_load_pclt): Fix `pclt_fields'.
4796
Dave Arnold0b330452013-10-02 11:04:06 +020047972013-10-02 Dave Arnold <darnold@adobe.com>
4798
4799 * src/cff/cf2font.c (cf2_computeDarkening): Initialize darkenAmount.
4800
4801 This line was lost in commit 89ca1fd6 (from 2013-06-25). The effect
4802 is to use a previous darkening amount when producing an unhinted,
4803 unscaled outline. This can cause autohint samples in ftgrid and
4804 ftview to be based on darkened CFF outlines instead of unhinted,
4805 undarkened ones.
4806
Dave Arnold3a2cb0f2013-09-29 16:17:02 +020048072013-09-29 Dave Arnold <darnold@adobe.com>
4808
4809 Fix Savannah bug #39295.
4810
4811 The bug was caused by switching to the initial hintmap (the one in
4812 effect when `moveto' executes) just before drawing the final element
4813 in the charstring. This ensured that the path was closed (in both
4814 Character Space and Device Space). But if the final element was a
4815 curve and if the final hintmap was different enough from the initial
4816 one, then the curve was visibly distorted.
4817
4818 The first part of the fix is to draw the final curve using the final
4819 hintmap as specified by the charstring. This corrects the
4820 distortion but does not ensure closing in Device Space. It may
4821 require the rasterizer to automatically generate an extra closing
4822 line. Depending on the hintmap differences, this line could be from
4823 zero to a couple pixels in length.
4824
4825 The second part of the fix covers the case where the charstring
4826 subpath is closed with an explicit line. We now modify that line's
4827 end point to avoid the distortion.
4828
4829 Some glyphs in the bug report font (TexGyreHeros-Regular) that show
4830 the change are:
4831
4832 25ppem S (98)
4833 24ppem eight (52)
4834 25.5ppem p (85)
4835
4836 Curves at the *end* of a subpath are no longer distorted. However,
4837 some of these glyphs have bad hint substitutions in the middle of a
4838 subpath, and these are not affected.
4839
4840 The patch has been tested with a set of 106 fonts that shipped with
4841 Adobe Creative Suite 4, together with 756 Open Source CFF fonts from
4842 Google Fonts. There are 1.5 million glyphs, of which some 20k are
4843 changed with the fix. A sampling of a few hundred of these changes
4844 have been examined more closely, and the changes look good (or at
4845 least acceptable).
4846
4847 * src/cff/cf2hints.h (CF2_GlyphPathRec): New element `pathIsClosing'
4848 to indicate that we synthesize a closepath line.
4849
4850 * src/cff/cf2hints.c (cf2_glyphpath_init): Updated.
4851 (cf2_glyphpath_pushPrevElem): If closing, use first hint map (for
4852 `lineto' operator) and adjust hint zone.
4853 For synthesized closing lines, use end point in first hint zone.
4854 (cf2_glyphpath_lineTo): Take care of synthesized closing lines. In
4855 particular, shift the detection of zero-length lines from character
4856 space to device space.
4857 (cf2_glyphpath_closeOpenPath): Remove assertion.
4858 Updated.
4859
Werner Lembergb75a8b82013-09-25 09:46:36 +020048602013-09-25 Werner Lemberg <wl@gnu.org>
4861
4862 * src/autofit/aflatin.c (af_{grek,cyrl}_uniranges): Fix arrays.
4863
suzuki toshiyaac0f4452013-09-25 10:57:17 +090048642013-09-25 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4865
4866 [bdf, pcf] Refuse non-zero face_index.
Werner Lemberg964317e2013-09-25 09:22:40 +02004867
suzuki toshiyaac0f4452013-09-25 10:57:17 +09004868 Suggested by Akira Tagoh, see
4869
4870 http://lists.gnu.org/archive/html/freetype/2013-09/msg00030.html
4871
Werner Lemberg964317e2013-09-25 09:22:40 +02004872 * src/bdf/bdfdrivr.c (BDF_Face_Init): Return `Invalid_Argument'
4873 error if the font could be opened but non-zero `face_index' is
4874 given.
suzuki toshiyaac0f4452013-09-25 10:57:17 +09004875 * src/pcf/pcfdrivr.c (PCF_Face_Init): Ditto.
4876
4877 * src/type42/t42objs.c (T42_Face_Init): Remove unrequired FT_UNUSED
Werner Lemberg964317e2013-09-25 09:22:40 +02004878 macro for `face_index' because it is validated later.
suzuki toshiyaac0f4452013-09-25 10:57:17 +09004879
Werner Lemberg4de77872013-09-23 22:10:08 +020048802013-09-23 Werner Lemberg <wl@gnu.org>
4881
4882 Fix Savannah bug #40090.
4883
4884 * src/autofit/afcjk.c (af_cjk_metrics_scale): Revert commit
4885 306f8c5d (from 2013-08-25) affecting this function.
4886
Werner Lemberg5a4c5a52013-09-22 22:37:26 +020048872013-09-22 Werner Lemberg <wl@gnu.org>
4888
4889 [autofit] Disunify Cyrillic and Greek handling from Latin.
4890
4891 * src/autofit/afscript.h: Add Cyrillic and Greek.
4892
4893 * src/autofit/afblue.dat (AF_BLUE_STRINGSET_GREK,
4894 AF_BLUE_STRINGSET_CYRL): Add blue zones for Greek and Cyrillic.
4895 (AF_BLUE_STRINGSET_LATN): Fix typo.
4896 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
4897
4898 * src/autofit/aflatin.c (af_grek_uniranges, af_cyrl_uniranges): New
4899 arrays.
4900 (af_grek_script_class, af_cyrl_script_class): New scripts.
4901 * src/autofit/aflatin.h: Updated.
4902
Werner Lemberg2cca9662013-09-20 07:23:34 +020049032013-09-20 Werner Lemberg <wl@gnu.org>
4904
4905 * docs/CHANGES: Updated.
4906
Behdad Esfahbod31e726d2013-09-20 07:20:53 +020049072013-09-20 Behdad Esfahbod <behdad@behdad.org>
4908
4909 Fix vertical size of emboldened glyphs.
4910
4911 Cf. https://bugzilla.gnome.org/show_bug.cgi?id=686709
4912
4913 * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Adjust `horiBearingY'
4914 also.
4915
Alexei Podtelezhnikov52381c12013-09-11 23:25:56 -040049162013-09-11 Alexei Podtelezhnikov <apodtele@gmail.com>
4917
4918 * include/freetype/ftoutln.h: Correct FT_Outline_Get_Orientation
4919 algorithm description.
4920
Werner Lemberg3f542492013-09-11 23:08:31 +020049212013-09-11 Werner Lemberg <wl@gnu.org>
4922
4923 [autofit] Improve Hebrew rendering.
4924
4925 This change introduces a new blue zone property
4926 `AF_BLUE_PROPERTY_LATIN_LONG' to make the auto-hinter ignore short
4927 top segments.
4928
4929 * src/autofit/afblue.dat: Fix Hebrew blue strings.
4930 Use AF_BLUE_PROPERTY_LATIN_LONG for AF_BLUE_STRING_HEBREW_TOP.
4931
4932 * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_LONG): New macro.
4933
4934 * src/autofit/afblue.c, src/autofit/afblue.h: Updated.
4935
4936 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Handle
4937 `AF_LATIN_IS_LONG_BLUE'.
4938
4939 * src/autofit/aflatin.h (AF_LATIN_IS_LONG_BLUE): New macro.
4940
Werner Lemberg85a7fdf2013-08-29 21:03:05 +020049412013-08-28 Behdad Esfahbod <behdad@google.com>
4942
4943 [sfnt] Fix frame access while reading WOFF table directory.
4944
4945 * src/sfnt/sfobjs.c (woff_open_font): Using single memory frame
4946 while reading the directory entries for the whole loop.
4947
49482013-08-29 Werner Lemberg <wl@gnu.org>
Werner Lembergd689d1c2013-08-29 17:53:40 +02004949 Behdad Esfahbod <behdad@google.com>
4950
4951 Implement support for WOFF containers.
4952
4953 We simply synthesize a SFNT from the WOFF, create a memory stream
4954 for the new data, and load the SFNT as usual.
4955
4956 Does NOT add any API to access WOFF metadata or private blocks.
4957
4958 * include/freetype/internal/tttypes.h (WOFF_HeaderRec,
4959 WOFF_TableRec): New structures.
4960
4961 * include/freetype/tttags.h (TTAG_wOFF): New macro.
4962
4963 * src/base/ftobjs.c (FT_Open_Face): Set `stream' after calling
4964 `open_face'.
4965
4966 * src/sfnt/sfobjs.c [FT_CONFIG_OPTION_SYSTEM_ZLIB]: Include
4967 `FT_GZIP_H'.
4968 (WRITE_BYTE, WRITE_USHORT, WRITE_ULONG): New temporary macros for
4969 writing to a stream.
4970 (sfnt_stream_close, compare_offsets, woff_open_font): New functions.
4971 (sfnt_open_font): Handle `TTAG_wOFF'.
4972 (sfnt_init_face): Set `stream' after calling `sfnt_open_font'.
4973
4974 * src/truetype/ttobjs.c (tt_face_init): Set `stream' after calling
4975 `sfnt->init_face'.
4976
4977 * src/base/ftobjs.c (open_face): Use a pointer to FT_Stream as an
4978 argument so that a changed stream survives.
4979 Update callers.
4980
49812013-08-28 Werner Lemberg <wl@gnu.org>
Werner Lemberge0f39ae2013-08-28 17:34:01 +02004982
Werner Lembergdc240522013-08-29 17:53:24 +02004983 [gzip] New function `FT_Gzip_Uncompress'.
4984
4985 This is modeled after zlib's `uncompress' function. We need this
4986 for WOFF support.
4987
4988 * include/freetype/ftgzip.h, src/gzip/ftgzip.c (FT_Gzip_Uncompress):
4989 New function.
4990
4991 * src/gzip/rules.mk: Rewrite to better reflect dependencies.
4992
49932013-08-28 Werner Lemberg <wl@gnu.org>
4994
Werner Lemberg5195ecd2013-08-28 17:41:21 +02004995 [autofit] Fix `make multi' compilation.
4996
4997 * src/autofit/afblue.cin, src/autofit/afblue.c: Don't include
4998 `afblue.h' but `aftypes.h'.
4999 * src/autofit/afcjk.c: Don't include `aftypes.h' but `afglobal.h'.
5000
50012013-08-28 Werner Lemberg <wl@gnu.org>
5002
Werner Lemberge0f39ae2013-08-28 17:34:01 +02005003 [autofit] Fix C++ compilation.
5004
5005 * src/autofit/afglobal.c (af_face_globals_get_metrics),
5006 src/autofit/afdummy.c (af_dflt_script_class), src/autofit/afindic.c
5007 (af_deva_script_class): Use proper casts.
5008
Behdad Esfahbodbd3849e2013-08-27 21:43:38 +020050092013-08-27 Behdad Esfahbod <behdad@google.com>
5010
Behdad Esfahbodc799dd62013-08-27 21:46:03 +02005011 * src/sfnt/ttload.c (tt_face_load_font_dir): Fix sign typos.
5012
50132013-08-27 Behdad Esfahbod <behdad@google.com>
5014
Behdad Esfahbodbd3849e2013-08-27 21:43:38 +02005015 FT_Open_Face: Improve external stream handling.
5016
5017 If the font's `clazz->init_face' function wants to swap to new
5018 stream, handling of whether original stream was external could
5019 result to either memory leak or double free. Mark externality into
5020 face flags before calling `init_face' such that the clazz can handle
5021 external streams properly.
5022
5023 * src/base/ftobjs.c (FT_Open_Face): Move code to set
5024 FT_FACE_FLAG_EXTERNAL_STREAM to...
5025 (open_face): This function.
5026
Werner Lemberg5e53db22013-08-27 18:37:39 +020050272013-08-27 Werner Lemberg <wl@gnu.org>
5028
Werner Lembergbcd8c0b2013-08-27 21:36:03 +02005029 Remove `FT_SqrtFixed' function.
5030
5031 It's no longer used.
5032
5033 * include/freetype/internal/ftcalc.h, src/base/ftcalc.c: Do it.
5034
50352013-08-27 Werner Lemberg <wl@gnu.org>
5036
Werner Lemberg5e53db22013-08-27 18:37:39 +02005037 [autofit] While tracing, report script names instead of ID values.
5038
5039 * src/autofit/afglobal.c (af_script_names) [FT_DEBUG_LEVEL_TRACE]:
5040 New array.
5041 * src/autofit/afglobal.h: Updated.
5042
5043 * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
5044 af_cjk_hint_edges): Use `af_script_names'.
5045 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
5046 af_latin_hint_edges): Ditto.
5047
Werner Lemberg92f5a042013-08-26 09:22:27 +020050482013-08-26 Werner Lemberg <wl@gnu.org>
5049
Werner Lemberg278f64b2013-08-26 20:20:03 +02005050 [autofit] Report used script while hinting a glyph.
5051
5052 * src/autofit/afcjk.c (af_cjk_hint_edges), src/autofit/aflatin.c
5053 (af_latin_hint_edges): Implement it.
5054
50552013-08-26 Werner Lemberg <wl@gnu.org>
5056
Werner Lemberg371f5c32013-08-26 20:11:24 +02005057 [autofit] Add support for Hebrew script.
5058
5059 * src/autofit/afblue.dat: Add blue strings for Hebrew.
5060 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
5061
5062 * src/autofit/aflatin.c (af_hebr_uniranges): New array.
5063 (af_hebr_script_class): New script.
5064 * src/autofit/aflatin.h, src/autofit/afscript.h: Updated.
5065
50662013-08-26 Werner Lemberg <wl@gnu.org>
5067
Werner Lemberg098121d2013-08-26 18:54:05 +02005068 [autofit] Improve tracing messages.
5069
5070 * src/autofit/afcjk.c (af_cjk_metrics_init_widths): Mention script
5071 ID in tracing message.
5072 (af_cjk_metrics_init_blues): Initialize `axis' outside of the inner
5073 loop.
5074 Improve tracing messages.
5075 (af_cjk_hint_edges) [FT_DEBUG_LEVEL_TRACE]: New variable
5076 `num_actions' to count hinting actions.
5077 Improve tracing messages.
5078
5079 * src/autofit/aflatin.c (af_latin_metrics_init_widths): Mention
5080 script ID in tracing message.
5081 (af_latin_metrics_init_blues, af_latin_hint_edges): Improve tracing
5082 messages.
5083
50842013-08-26 Werner Lemberg <wl@gnu.org>
5085
Werner Lembergffee64a2013-08-26 12:55:48 +02005086 Better tracing of loaded glyphs.
5087
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02005088 Previously, the loading of a glyph was traced at level 4, if at all.
Werner Lembergffee64a2013-08-26 12:55:48 +02005089 With this change, all font loading routines emit a tracing message
5090 at level 1, making it easier to select tracing output (for example
5091 using F2_DEBUG="any:1 afhints:7 aflatin:7").
5092
5093 * src/bdf/bdfdrivr.c (BDF_Glyph_Load): Add tracing message.
5094 * src/cff/cffdrivr.c (cff_glyph_load): Ditto.
5095 * src/cff/cffgload.c (cff_decoder_prepare): Improve tracing
5096 messages.
5097 * src/cid/cidgload.c (cid_load_glyph): Use level 1 for tracing
5098 message.
5099 * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Ditto.
5100 * src/pfr/pfrobjs.c (pfr_slot_load): Add tracing message.
5101 * src/truetype/ttgload.c (TT_Load_Glyph): Ditto.
5102 * src/type1/t1gload.c (T1_Load_Glyph): Ditto.
5103 * src/type42/t42objs.c (T42_GlyphSlot_Load): Ditto.
5104 * src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto.
5105
51062013-08-26 Werner Lemberg <wl@gnu.org>
5107
Werner Lemberg33655a92013-08-26 09:58:50 +02005108 [autofit] Fix script selection.
5109
5110 * src/autofit/afglobal.c (af_face_globals_get_metrics): Use
5111 `AF_SCRIPT_DFLT', not value 0.
5112 Simplify code.
5113
5114 * src/autofit/afscript.h: Sort by script name.
5115
51162013-08-26 Werner Lemberg <wl@gnu.org>
5117
Werner Lemberg92f5a042013-08-26 09:22:27 +02005118 [autofit] Make `dummy' hinter work as expected.
5119
5120 * src/autofit/afdummy.c (af_dummy_hints_init): Properly set scaling
5121 information.
5122 (af_dummy_hints_apply): Scale the glyphs.
5123
Werner Lemberg8b8be782013-08-25 08:01:41 +020051242013-08-25 Werner Lemberg <wl@gnu.org>
5125
Werner Lembergc1eb4452013-08-25 19:47:26 +02005126 [autofit] Make `cjk' module use blue stringsets.
5127
5128 * src/autofit/afcjk.c (AF_CJK_MAX_TEST_CHARACTERS): Removed.
5129 (af_cjk_hani_blue_chars): Removed.
5130 (AF_CJK_BLUE_TYPE_*): Removed.
5131 (af_cjk_metrics_init_blues): Replace AF_CJK_MAX_TEST_CHARACTERS with
5132 AF_BLUE_STRING_MAX_LEN.
5133 Change loops to use offsets (in file `afblue.h') into the new arrays
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02005134 `af_blue_stringsets' and `af_blue_strings' (in file `afblue.c').
Werner Lembergc1eb4452013-08-25 19:47:26 +02005135 Instead of three dimensions (as used in the old blue string array)
5136 we now use properties to do the same, saving one loop nesting level.
5137
5138 * src/autofit/afcjk.h: Remove old enumeration values superseded by
5139 the new data in `afblue.h'.
5140 (AF_CJK_IS_TOP_BLUE, AF_CJK_IS_HORIZ_BLUE, AF_CJK_IS_FILLED_BLUE,
5141 AF_CJK_IS_RIGHT_BLUE): New macros, to be used in
5142 `af_cjk_metrics_init_blues'.
5143 (AF_CJK_BLUE_IS_RIGHT): Remove this now redundant enum value.
5144 (AF_CJK_BLUE_IS_TOP): Renamed to...
5145 (AF_CJK_BLUE_TOP): This.
5146 (AF_CJK_MAX_BLUES): Remove.
5147 (AF_CJKAxisRec): Updated.
5148
51492013-08-25 Werner Lemberg <wl@gnu.org>
5150
Werner Lemberg5c4a23a2013-08-25 19:29:07 +02005151 [autofit] Typo.
5152
5153 * src/autofit/afblue.hin, src/autofit/afblue.c (GET_UTF8_CHAR): Use
5154 cast.
5155
51562013-08-25 Werner Lemberg <wl@gnu.org>
5157
Werner Lemberg306f8c52013-08-25 13:07:08 +02005158 [autofit] Synchronize `cjk' with `latin' module (and vice versa).
5159
5160 * src/autofit/afcjk.c (af_cjk_metrics_init_widths): Add tracing
5161 messages.
5162 (af_cjk_metrics_init_blues): Don't pass blue string array as
5163 argument but use the global array directly.
5164 Use `outline' directly.
5165 Update and add tracing messages.
5166 (af_cjk_metrics_init): Simplify code.
5167 (af_cjk_metrics_scale_dim): Improve tracing message.
5168 (af_cjk_metrics_scale): Synchronize.
5169
5170 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
5171 af_latin_metrics_init_blues): Improve and add tracing messages.
5172
51732013-08-25 Werner Lemberg <wl@gnu.org>
5174
Werner Lemberg0975d682013-08-25 08:37:47 +02005175 [autofit] Make `latin' module use blue stringsets.
5176
5177 * src/autofit/aflatin.c (AF_LATIN_MAX_TEST_CHARACTERS): Removed.
5178 (af_latin_blue_chars): Removed.
5179 (af_latin_metrics_init_blues): Replace AF_LATIN_MAX_TEST_CHARACTERS
5180 with AF_BLUE_STRING_MAX_LEN.
5181 Change loops to use offsets (in file `afblue.h') into the new arrays
5182 `af_blue_stringsets' and `af_blue_strings' (in file `afblue.c').
5183 Use `AF_LATIN_IS_SMALL_TOP_BLUE' macro.
5184
5185 * src/autofit/aflatin.h: Remove old enumeration values superseded by
5186 the new data in `afblue.h'.
5187 (AF_LATIN_IS_TOP_BLUE): Updated definition.
5188 (AF_LATIN_IS_SMALL_TOP_BLUE): New macro.
5189 (AF_LATIN_MAX_BLUES): Remove.
5190 (AF_LatinAxisRec): Updated.
5191
51922013-08-25 Werner Lemberg <wl@gnu.org>
5193
Werner Lembergdb3e5b92013-08-25 08:23:22 +02005194 [autofit] Add blue stringsets.
5195
5196 * src/autofit/aftypes.h: Include `afblue.h'.
5197 (AF_ScriptClassRec): Add `blue_stringset' field.
5198 (AF_DEFINE_SCRIPT_CLASS): Updated.
5199
5200 * src/autofit/autofit.c: Include `afblue.c'.
5201
5202 * src/autofit/afcjk.c (af_hani_script_class), src/autofit/afdummy.c
5203 (af_dflt_script_class), src/autofit/afindic.c
5204 (af_deva_script_class), src/autofit/aflatin.c
5205 (af_latn_script_class), src/autofit/aflatin2.c
5206 (af_ltn2_script_class): Updated.
5207
5208 * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `afblue.c'.
5209
52102013-08-25 Werner Lemberg <wl@gnu.org>
5211
Werner Lemberg8b8be782013-08-25 08:01:41 +02005212 [autofit] Introduce data file for blue strings.
5213
5214 The idea is to have a central file which gets processed by a Perl
5215 script to create proper `.c' and `.h' files using templates. There
5216 are two other reasons to do that:
5217
5218 . The data file should be easily readable. We use UTF-8 encoding
5219 which then gets converted to single bytes.
5220
5221 . Since the number of supported scripts will increase soon, the
5222 current usage of blue string arrays is a waste of space. Using
5223 the Perl script it is possible to imitate jagged arrays,
5224 defining enumeration constants as offsets into the arrays.
5225
5226 This commit only adds files without changing any functionality.
5227
5228 * src/autofit/afblue.dat: New data file.
5229 * src/tools/afblue.pl: New Perl script for processing `afblue.dat'.
5230
5231 * src/autofit/afblue.cin, src/autofit/afblue.hin: New template files
5232 for...
5233 * src/autofit/afblue.c, src/autofit/afblue.c: New source files.
5234 To avoid a dependency on Perl, we add them too.
5235
Alexei Podtelezhnikovfc32e1c2013-08-19 22:57:05 -040052362013-08-19 Alexei Podtelezhnikov <apodtele@gmail.com>
5237
Werner Lemberg71c0ad62013-08-27 21:30:09 +02005238 [base] Enable new algorithm for `BBox_Cubic_Check'.
Alexei Podtelezhnikovfc32e1c2013-08-19 22:57:05 -04005239
Werner Lemberg71c0ad62013-08-27 21:30:09 +02005240 * src/base/ftbbox.c: Enable new BBox_Cubic_Check algorithm, remove
5241 the old one.
5242 Improve comments.
Alexei Podtelezhnikovfc32e1c2013-08-19 22:57:05 -04005243
Werner Lemberg6bfa2632013-08-18 18:34:05 +020052442013-08-18 Werner Lemberg <wl@gnu.org>
5245
Werner Lemberg4af44442013-08-18 18:46:30 +02005246 * builds/unix/unix-def.in (freetype2.pc): Don't set executable bit.
5247
52482013-08-18 Werner Lemberg <wl@gnu.org>
5249
Werner Lemberg6bfa2632013-08-18 18:34:05 +02005250 Fix Savannah bug #39804.
5251
5252 * builds/unix/configure.raw (LIBPNG): Define and export.
5253 * builds/unix/freetype-config.in, builds/unix/freetype2.in: Handle
5254 libpng.
5255
Alexei Podtelezhnikov32a7d872013-08-17 22:19:21 -040052562013-08-17 Alexei Podtelezhnikov <apodtele@gmail.com>
5257
5258 [base] Clean up BBox_Conic_Check.
5259
5260 * src/base/ftbbox.c (BBox_Conic_Check): Remove redundant checks for
5261 extremum at the segment ends, which are already within the bbox.
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02005262 Slightly modify calculations.
Alexei Podtelezhnikov32a7d872013-08-17 22:19:21 -04005263
Alexei Podtelezhnikov1a9c3d12013-08-15 22:51:42 -040052642013-08-15 Alexei Podtelezhnikov <apodtele@gmail.com>
5265
5266 [base] Finish experimental (disabled) BBox_Cubic_Check implementation.
5267
5268 * src/base/ftbbox.c (BBox_Cubic_Check): Scale arguments to improve
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02005269 accuracy and avoid overflows.
Alexei Podtelezhnikov1a9c3d12013-08-15 22:51:42 -04005270
Alexei Podtelezhnikov61a65512013-08-13 22:28:57 -040052712013-08-13 Alexei Podtelezhnikov <apodtele@gmail.com>
5272
5273 [base] Refactor experimental (disabled) BBox_Cubic_Check.
5274
5275 * src/base/ftbbox.c (BBox_Cubic_Check): Implement the minimum search
Alexei Podtelezhnikov1a9c3d12013-08-15 22:51:42 -04005276 as the mirror image of the maximum search implemented here...
5277 (update_max): New function.
Alexei Podtelezhnikov61a65512013-08-13 22:28:57 -04005278
John Tytgat9bcfab82013-08-06 08:55:19 +020052792013-08-06 John Tytgat <John.Tytgat@esko.com>
5280
5281 Fix Savannah bug #39702.
5282
5283 * src/cff/cffload.c (cff_index_get_pointers): Check for `cur_offset
5284 != 0'; this stronger test is mandated by the CFF specification.
5285 Fix test for INDEX structures which have one or more empty entries
5286 at the end.
5287
Werner Lembergcc25e3a2013-08-05 08:46:15 +020052882013-08-05 Werner Lemberg <wl@gnu.org>
5289
Werner Lemberga32682f2013-08-06 00:21:46 +02005290 Fix gcc pragmas, part 2.
5291
5292 * src/truetype/ttinterp.c (TT_MulFix14_long_long,
5293 TT_DotFix14_long_long): `#pragma gcc diagnostic {push,pop}' has been
5294 introduced with gcc version 4.6.
5295
52962013-08-05 Werner Lemberg <wl@gnu.org>
5297
Werner Lemberg69e524d2013-08-05 23:38:32 +02005298 Fix gcc pragmas.
5299
5300 * src/truetype/ttinterp.c (TT_MulFix14_long_long,
5301 TT_DotFix14_long_long): Older gcc versions don't accept diagnostic
5302 pragmas within a function body.
5303
53042013-08-05 Werner Lemberg <wl@gnu.org>
5305
Werner Lemberg9e6de362013-08-05 16:37:21 +02005306 Fix Savannah bug #39700.
5307
5308 * builds/unix/ftconfig.h: Synchronize with
5309 `include/freetype/config/ftconfig.h'.
5310
5311 * builds/vms/ftconfig.h: Ditto.
5312 Make the differences to the master `ftconfig.h' file as small as
5313 possible for easier maintainance.
5314
53152013-08-05 Werner Lemberg <wl@gnu.org>
5316
Werner Lembergcc25e3a2013-08-05 08:46:15 +02005317 [autofit] Improve handling of `near' points.
5318
5319 Points which are very near to each other are now marked as such.
5320 The `weak' flag is then computed by using the `in' vector of the
5321 first and the `out' vector of the last point of a group of near
5322 points.
5323
5324 For example, this fixes the rendering of glyph `Oslash' in
5325 `Roboto-Thin.ttf'.
5326
5327 * src/autofit/afhints.h (AF_Flags): New value `AF_FLAGS_NEAR'.
5328
5329 * src/autofit/afhints.c (af_glyph_hints_reload): Introduce
5330 the heuristic value `near_limit' to decide whether the current point
5331 is near to the previous one, then set `AF_FLAG_NEAR' accordingly.
5332 Store good `in' vector (of last non-near point) in
5333 `last_good_in_{x,y}' and use it as an argument to
5334 `ft_corner_is_flat' if necessary.
5335
Werner Lemberg74a9b672013-08-02 14:53:32 +020053362013-08-02 Werner Lemberg <wl@gnu.org>
5337
Werner Lemberg0d28a7d2013-08-02 22:59:43 +02005338 * include/freetype/ftcffdrv.h: Improve documentation.
5339 This is based on blog entries from David Lemon and Dave Arnold (both
5340 from Adobe) with kind permission. Dave also helped in
5341 proof-reading.
5342
53432013-08-02 Werner Lemberg <wl@gnu.org>
5344
Werner Lemberg456cc442013-08-02 20:25:21 +02005345 [autofit] Move declaration of scripts into separate file.
5346
5347 This has the benefit that we don't need to duplicate the data at
5348 different places.
5349
5350 * src/autofit/afscript.h: New file.
5351
5352 * src/autofit/aftypes.h (AF_Script): Include `afscript.h' to define
5353 the enumeration values.
5354
5355 * src/autofit/afglobal.c: Include `afscript.h' to get the script
5356 specific header files.
5357 (af_script_classes): Include `afscript.h' to fill this array.
5358
5359 * src/autofit/afpic.c: Include `afscript.h' to get the script
5360 specific header files.
5361 (autofit_module_class_pic_init): Include `afscript.h' for
5362 initialization.
5363 * src/autofit/afpic.h (AF_SCRIPT_CLASSES_COUNT,
5364 AF_SCRIPT_CLASSES_REC_COUNT): Removed. Use `AF_SCRIPT_MAX' instead.
5365
5366 * src/autofit/rules.mk (AUTOF_DRV_H): Updated.
5367
53682013-08-02 Werner Lemberg <wl@gnu.org>
5369
Werner Lemberg773601d2013-08-02 19:51:17 +02005370 [autofit] Move declaration of writing systems into separate file.
5371
5372 This has the benefit that we don't need to duplicate the data at
5373 different places.
5374
5375 * src/autofit/afwrtsys.h: New file.
5376
5377 * src/autofit/aftypes.h (AF_WritingSystem): Include `afwrtsys.h' to
5378 define the enumeration values.
5379
5380 * src/autofit/afglobal.c: Include `afwrtsys.h' to get the writing
5381 system specific header files.
5382 Include `afpic.h'.
5383 (af_writing_system_classes): Include `afwrtsys.h' to fill this
5384 array.
5385
5386 * src/autofit/afpic.c: Include `afwrtsys.h' to get the writing
5387 system specific header files.
5388 (autofit_module_class_pic_init): Include `afwrtsys.h' for
5389 initialization.
5390 * src/autofit/afpic.h (AF_WRITING_SYSTEM_CLASSES_COUNT,
5391 AF_WRITING_SYSTEM_CLASSES_REC_COUNT): Removed. Use
5392 `AF_WRITING_SYSTEM_MAX' instead.
5393
53942013-08-02 Werner Lemberg <wl@gnu.org>
5395
Werner Lemberg74a9b672013-08-02 14:53:32 +02005396 [sfnt] Fix compilation with g++.
5397
5398 * src/sfnt/pngshim.c (error_callback, read_data_from_FT_stream): Use
5399 cast.
5400 (Load_SBit_Png): Pacify compiler.
5401
Werner Lemberg89a529f2013-08-02 14:50:23 +020054022013-08-02 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5403 Werner Lemberg <wl@gnu.org>
5404
5405 [autofit] Fix `make multi'.
5406
5407 * include/freetype/config/ftconfig.h (FT_LOCAL_ARRAY,
5408 FT_LOCAL_ARRAY_DEF): New macros.
5409
5410 * src/autofit/afglobal.c (af_writing_system_classes,
5411 af_script_classes): Use FT_LOCAL_ARRAY_DEF.
5412 * src/autofit/afglobal.h: Declare `af_writing_system_classes' and
5413 `af_script_classes'.
5414 * src/autofit/afloader.c: Include `afpic.h'.
5415
Werner Lemberge8ed2d62013-08-01 12:20:20 +020054162013-08-01 Werner Lemberg <wl@gnu.org>
5417
5418 Another round of cppcheck nitpicks.
5419
5420 The call was (from the top-level of the FreeType tree):
5421
5422 cppcheck --force \
5423 --enable=all \
5424 -I /usr/include \
5425 -I /usr/local/include \
5426 -I /usr/lib/gcc/i586-suse-linux/4.7/include \
5427 -I include \
5428 -I include/freetype \
5429 -I include/freetype/config \
5430 -I include/freetype/internal \
5431 -DFT2_BUILD_LIBRARY \
5432 . &> cppcheck.log
5433
5434 using cppcheck git commit f7e93f99.
5435
5436 Note that cppcheck still can't handle `#include FOO' (with `FOO' a
5437 macro).
5438
5439 */* Improve variable scopes.
5440 */* Remove redundant initializations which get overwritten.
5441
5442 * src/gxvalid/*: Comment out redundant code or guard it with
5443 FT_DEBUG_LEVEL_TRACE.
5444
Werner Lemberg5d6a3602013-07-30 23:17:04 +020054452013-07-30 Werner Lemberg <wl@gnu.org>
5446
Werner Lemberg72f5ff52013-07-31 22:49:29 +02005447 [autofit] Introduce `writing systems'.
5448
5449 This patch adds a new top level to the auto-hinter's script class
5450 hierarchy. It defines `writing systems' which can contain multiple
5451 scripts.
5452
5453 For example, the `latin' writing system (in file `aflatin.c') is
5454 able to support scripts like Latin, Cyrillic, Armenian, etc., which
5455 can be handled similarly.
5456
5457 Scripts are now named using four-letter OpenType tags.
5458
5459 * src/autofit/aftypes.h (AF_ScriptClassRec): Move relevant members
5460 to...
5461 (AF_WritingSystemClassRec): This new structure. It holds pointers
5462 to functions which can be shared among related scripts.
5463 (AF_WritingSystem): New enumeration.
5464 (AF_Script): Revised values using four-letter tags.
5465 (AF_DEFINE_WRITING_SYSTEM_CLASS): New macro.
5466 (AF_DEFINE_SCRIPT_CLASS): Updated.
5467
5468 * src/autofit/afglobal.c (af_writing_system_classes): New global,
5469 constant array.
5470 (af_script_classes): Updated.
5471 (af_face_globals_free): Updated.
5472 Remove assertion.
5473 (af_face_globals_get_metrics): Updated.
5474
5475 * src/autofit/afglobal.h (AF_SCRIPT_FALLBACK)
5476 [!AF_CONFIG_OPTION_CJK]: Handle this case.
5477
5478 * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph):
5479 Updated.
5480
5481 * src/autofit/afpic.c (autofit_module_class_pic_init): Updated;
5482 initialize structures for both writing systems and scripts.
5483 * src/autofit/afpic.h: Updated.
5484 (AF_WRITING_SYSTEM_CLASSES_GET): New macro.
5485
5486 * src/autofit/afcjk.c (af_cjk_writing_system_class): New writing
5487 system.
5488 (af_cjk_uniranges): Renamed to...
5489 (af_hani_uniranges): This.
5490 (af_cjk_script_class): Reduced and renamed to...
5491 (af_hani_script_class): This.
5492 * src/autofit/afcjk.h: Updated.
5493
5494 * src/autofit/afdummy.c (af_dummy_writing_system_class): New writing
5495 system.
5496 (af_dummy_script_class): Reduced and renamed to...
5497 (af_dflt_script_class): This.
5498 * src/autofit/afdummy.h: Updated.
5499
5500 * src/autofit/afindic.c (af_indic_writing_system_class): New writing
5501 system.
5502 (af_indic_uniranges): Renamed to...
5503 (af_deva_uniranges): This.
5504 (af_indic_script_class): Reduced and renamed to...
5505 (af_deva_script_class): This.
5506 * src/autofit/afcjk.h: Updated.
5507
5508 * src/autofit/aflatin.c (af_latin_writing_system_class): New writing
5509 system.
5510 (af_latin_uniranges): Renamed to...
5511 (af_latn_uniranges): This.
5512 (af_latin_script_class): Reduced and renamed to...
5513 (af_latn_script_class): This.
5514 * src/autofit/aflatin.h: Updated.
5515
5516 * src/autofit/aflatin2.c (af_latin2_writing_system_class): New
5517 writing system.
5518 (af_latin2_uniranges): Renamed to...
5519 (af_ltn2_uniranges): This.
5520 Synchronize ranges with `latin'.
5521 (af_latin2_script_class): Reduced and renamed to...
5522 (af_ltn2_script_class): This.
5523 * src/autofit/aflatin2.h: Updated.
5524
55252013-07-30 Werner Lemberg <wl@gnu.org>
5526
Werner Lemberg5d6a3602013-07-30 23:17:04 +02005527 [autofit] Variable renaming.
5528
5529 * src/autofit/aftypes.h (AF_ScriptMetricsRec):
5530 s/clazz/script_class/.
5531 Update all users.
5532
suzuki toshiya2b29ed62013-07-30 13:55:29 +090055332013-07-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5534
5535 Ignore libpng-config under cross-building configuration,
5536 because it will return the flags for the hosting environment.
5537
5538 * builds/unix/configure.raw: Ignore libpng-config when
5539 `cross_compiling' == yes.
5540
suzuki toshiyaf2e7f1e2013-07-30 13:32:57 +090055412013-07-30 Behdad Esfahbod <behdad@google.com>
5542
5543 Prevent division by zero by a transparent color.
5544
5545 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra):
5546 Return 0 immediately, when alpha channel is zero.
5547
Behdad Esfahbod21c32b02013-07-25 21:53:18 +020055482013-07-25 Behdad Esfahbod <behdad@google.com>
5549
5550 Add FT_FACE_FLAG_COLOR and FT_HAS_COLOR.
5551
5552 Also disambiguate Google's color bitmap tables.
5553
5554 * include/freetype/freetype.h (FT_FACE_FLAG_COLOR, FT_HAS_COLOR):
5555 New macros.
5556
5557 * include/freetype/internal/tttypes.h (TT_SbitTableType): Add
5558 TT_SBIT_TABLE_TYPE_CBLC.
5559
5560 * src/sfnt/sfobjs.c (sfnt_load_face): Handle FT_FACE_FLAG_COLOR.
5561
5562 * src/sfnt/ttsbit.c (tt_face_load_sbit,
5563 tt_face_load_strike_metrics, tt_face_load_sbit_image): Handle
5564 TT_SBIT_TABLE_TYPE_CBLC.
5565
suzuki toshiyab4725cb2013-07-24 14:25:39 +090055662013-07-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
5567
5568 [sfnt] Fix for `make multi' target.
5569
5570 * src/sfnt/pngshim.c (Load_SBit_Png): Use FT_LOCAL_DEF().
5571
Werner Lemberg6a7df622013-07-20 10:48:37 +020055722013-07-20 Werner Lemberg <wl@gnu.org>
5573
5574 * docs/INSTALL.GNU: Updated.
5575
Behdad Esfahbodff269522013-07-20 08:02:39 +020055762013-07-20 Behdad Esfahbod <behdad@google.com>
5577
5578 [sfnt] Fix `sbix' table version handling.
5579
5580 * src/sfnt/ttsbit.c (tt_face_load_sbit) [TT_SBIT_TABLE_TYPE_SBIX]:
5581 USHORT version numbers are to be considered as `minor'.
5582
Werner Lemberg05c14212013-07-19 23:11:23 +020055832013-07-19 Werner Lemberg <wl@gnu.org>
5584
5585 [autofit] Fix segment classification for blue zones.
5586
5587 The old code (essentially unchanged since the very beginning)
5588 incorrectly handled this configuration
5589
5590 x -o- x
5591 / \
5592 / \
5593 / \
5594 o o
5595
5596 as flat and this
5597
5598 o o
5599 / /
5600 x| x|
5601 | |
5602 o---------------o
5603
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02005604 as round. (`o' and `x' are on and off points, respectively).
Werner Lemberg05c14212013-07-19 23:11:23 +02005605
5606 This is a major change which should improve the rendering results
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02005607 enormously for many TrueType fonts, especially in the range approx.
Werner Lemberg05c14212013-07-19 23:11:23 +02005608 20-40ppem, fixing the appearance of many overshoots.
5609
5610 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Look at the
5611 first and last points of the segment, not the points right before
5612 and after.
5613
56142013-07-19 Behdad Esfahbod <behdad@google.com>
Werner Lemberg01705392013-07-18 13:13:12 +02005615
Behdad Esfahbod778a7e62013-07-19 14:28:28 +02005616 [sfnt] `sbix' fix-ups.
5617
5618 * src/sfnt/sfobjs.c (sfnt_load_face): Apple's `sbix' color bitmaps
5619 are rendered scaled and then the `glyf' outline rendered on top. We
5620 don't support that yet, so just ignore the `glyf' outline and
5621 advertise it as a bitmap-only font.
5622
5623 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
5624 [TT_SBIT_TABLE_TYPE_SBIX]: Return metrics in 26.6 units.
5625 (tt_face_load_sbix_image): Typo.
5626
56272013-07-18 Behdad Esfahbod <behdad@google.com>
5628
Werner Lemberg01705392013-07-18 13:13:12 +02005629 [sfnt] Add support for Apple's `sbix' color bitmap table.
5630
5631 * include/freetype/internal/tttypes.h (TT_SBit_MetricsRec): Widen
5632 fields to FT_Short and FT_UShort, respectively.
5633 (TT_SBitTableType): New enumeration.
5634 (TT_FaceRec): Add `sbit_table_type' field.
5635
5636 * include/freetype/tttags.h (TTAG_sbix): New macro.
5637
5638 * src/sfnt/pngshim.c (Load_SBit_Png): Pass a more generic
5639 FT_GlyphSlot argument instead FT_Bitmap.
5640 Add flag to control map and metrics handling.
5641 Update all users.
5642
5643 * src/sfnt/ttsbit.c: Include `ttmtx.h'.
5644 (tt_face_load_eblc): Renamed to...
5645 (tt_face_load_sbit): This.
5646 Handlic `sbix' bitmaps.
5647 (tt_face_free_eblc): Renamed to...
5648 (tt_face_load_sbit): This.
5649 Updated.
5650 (tt_face_load_strike_metrics): Handle `sbix' bitmaps.
5651 (tt_face_load_sbix_image): New function.
5652 (tt_sbit_decoder_alloc_bitmap, tt_sbit_decoder_load_image,
5653 tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned,
5654 tt_sbit_decoder_load_compound, tt_sbit_decoder_load_png,
5655 tt_sbit_decoder_load_image, tt_sbit_decoder_load_bitmap): Don't pass
5656 and handle load flags.
5657 (tt_sbit_decoder_load_bitmap) [!FT_CONFIG_OPTION_USE_PNG]: Better
5658 handle formats 17-19.
5659 Move color to grayscale conversion to...
5660 (tt_face_load_sbit_image): Here.
5661 Handle `sbix' bitmaps.
5662
5663 * src/sfnt/pngshim.h: Updated.
5664 * src/sfnt/ttsbit.h: Updated.
5665 * src/sfnt/sfdriver.c: Updated.
5666
Werner Lemberg274207e2013-07-18 12:38:57 +020056672013-07-18 Werner Lemberg <wl@gnu.org>
5668
5669 [sfnt] Ignore invalid magic number in `head' or `bhed'.
5670
5671 Other font engines seem to ignore it also. Problem reported by
5672 Hin-Tak Leung <htl10@users.sourceforge.net>.
5673
5674 * src/sfnt/ttload.c (check_table_dir): Don't abort but warn only if
5675 we have an invalid magic number.
5676
Werner Lemberg9a7951d2013-07-16 15:25:24 +020056772013-07-16 Werner Lemberg <wl@gnu.org>
5678
5679 [smooth] Fix segfault caused by previous commit.
5680
5681 * src/smooth/ftgrays.c (gray_set_cell): Always compute
5682 `ras.invalid'.
5683
David Turnera5f33ee2013-07-16 12:40:03 +020056842013-07-16 David Turner <digit@google.com>
5685
David Turner89929ec2013-07-16 13:36:07 +02005686 [smooth] Improve performance.
5687
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02005688 Provide a work-around for an ARM-specific performance bug in GCC.
David Turner89929ec2013-07-16 13:36:07 +02005689 This speeds up the rasterizer by more than 5%.
5690
5691 Also slightly optimize `set_gray_cell' and `gray_record_cell' (which
5692 also improves performance on other platforms by a tiny bit (<1%).
5693
5694 * src/smooth/ftgrays.c (FT_DIV_MOD): New macro.
5695 Use it where appropriate.
5696
5697 (gray_record_cell, gray_set_cell, gray_move_to,
5698 gray_convert_glyph_inner): Streamline condition handling.
5699
57002013-07-16 David Turner <digit@google.com>
5701
David Turnerf66d48e2013-07-16 13:18:00 +02005702 [truetype] Add assembler code for TT_MulFix14 and TT_DotFix14.
5703
5704 This patch provides slightly optimized versions for ARM, x86, and
5705 x86_64 CPUs if built with GCC.
5706
5707 Also remove some dead code.
5708
5709 * src/truetype/ttinterp.c (TT_MulFix14_arm, TT_MulFix14_long_long,
5710 TT_DotFix14_long_long): New functions.
5711
57122013-07-16 David Turner <digit@google.com>
5713
David Turnerb2890882013-07-16 12:52:18 +02005714 Optimize FT_MulFix for x86_64 GCC builds.
5715
5716 This patch provides an optimized `FT_MulFix' implementation for
5717 x86_64 machines when FreeType is built with GCC, or compatible
5718 compilers like Clang.
5719
5720 Example:
5721 bin/ftbench -p -t 5 -s 14 -f 0008 Arial.ttf
5722
5723 Before:
5724
5725 Load 4.863 us/op
5726 Load_Advances (Normal) 4.816 us/op
5727 Load_Advances (Fast) 0.028 us/op
5728 Render 2.753 us/op
5729 Get_Glyph 0.463 us/op
5730 Get_CBox 0.077 us/op
5731 Get_Char_Index 0.023 us/op
5732 Iterate CMap 13.898 us/op
5733 New_Face 12.368 us/op
5734 Embolden 0.028 us/op
5735 Get_BBox 0.302 us/op
5736
5737 After:
5738
5739 Load 4.617 us/op
5740 Load_Advances (Normal) 4.645 us/op
5741 Load_Advances (Fast) 0.027 us/op
5742 Render 2.789 us/op
5743 Get_Glyph 0.460 us/op
5744 Get_CBox 0.077 us/op
5745 Get_Char_Index 0.024 us/op
5746 Iterate CMap 13.403 us/op
5747 New_Face 12.278 us/op
5748 Embolden 0.028 us/op
5749 Get_BBox 0.301 us/op
5750
5751 * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h
5752 (FT_MulFix_x86_64): New function.
5753
57542013-07-16 David Turner <digit@google.com>
5755
David Turnera5f33ee2013-07-16 12:40:03 +02005756 Speed up ARMv7 support.
5757
5758 When building for ARMv7 with thumb2 instructions, the optimized
5759 `FT_MulFix_arm' assembly routine was not being used.
5760
5761 The reason for this is in the `ftconfig.h' header, namely:
5762
5763 - The assembly routine uses the `smull' instruction which is not
5764 available when generating Thumb-1 machine code. It is available
5765 in Thumb-2 mode, though.
5766
5767 - The header was written a long time ago before Thumb-2 became
5768 widely popular (e.g. with Android). So it simply doesn't use the
5769 assembly routine if the `__thumb__' built-in macro is defined.
5770
5771 - When compiling in Thumb-2 mode, the compiler will define both
5772 `__thumb__' and `__thumb2__'.
5773
5774 By checking for `(__thumb2__ || !__thumb__)', we ensure that the
5775 assembly routine is only avoided when generating Thumb-1 code.
5776
5777 Given that this is performance-sensitive function, this improves
5778 `ftbench' as follows on a Galaxy Nexus:
5779
5780 Before (us/op) After (us/op)
5781
5782 - loading Arial.ttf glyphs at 14 ppem [1]
5783
5784 Load 34.285 33.098
5785
5786 - same operation with the light auto-hinter [2]
5787
5788 Load 31.317 29.590
5789
5790 - same operation without hinting [3]
5791
5792 Load 6.143 5.376
5793
5794 - loading Arial.ttf advances at 14 ppem [4]
5795
5796 Load_Advances (normal) 34.216 33.016
5797 Load_Advances (fast) 0.176 0.176
5798
5799 [1] ftbench -t 5 -p -s 14 -b a -f 0008 Arial.ttf
5800 [2] ftbench -t 5 -p -s 14 -b a -r 1 -f 0028 Arial.ttf
5801 [3] ftbench -t 5 -p -s 14 -b a -f 000a Arial.ttf
5802 [4] ftbench -t 5 -p -s 14 -b b -f 0008 Arial.ttf
5803
5804 * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h
5805 (FT_MULFIX_ASSEMBLER): Fix handling for ARMv7.
5806
Werner Lemberge12fc772013-06-28 07:57:32 +020058072013-06-28 Werner Lemberg <wl@gnu.org>
5808
5809 * docs/CHANGES: Updated.
5810
Werner Lemberg680c1d42013-06-27 17:21:59 +020058112013-06-27 Werner Lemberg <wl@gnu.org>
5812
5813 * src/winfonts/winfnt.c (FNT_Load_Glyph): Fix bitmap width guard.
5814
Werner Lembergc7cc9eb2013-06-25 07:24:02 +020058152013-06-25 Werner Lemberg <wl@gnu.org>
5816
Werner Lembergb8850fc2013-06-26 12:22:10 +02005817 [cff] Add darkening limit to `darkening-parameters'.
5818
5819 * src/cff/cffdrivr.c (cff_property_set): Add check.
5820
58212013-06-25 Werner Lemberg <wl@gnu.org>
5822
Werner Lemberg89ca1fd2013-06-25 23:28:02 +02005823 [cff] Add `darkening-parameters' property.
5824
5825 * include/freetype/ftcffdrv.h: Document it.
5826
5827 * src/cff/cffdrivr.c (cff_property_set, cff_property_get): Handle
5828 `darkening-parameters' property.
5829
5830 * src/cff/cf2font.h (CF2_FontRec): Add `darkenParams' array.
5831
5832 * src/cff/cf2font.c (cf2_computeDarkening): Add `darkenParams'
5833 argument and use it.
5834 Update all callers.
5835
5836 * src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Copy
5837 `darken_params' values.
5838
5839 * src/cff/cffobjs.h (CFF_DriverRec): Add `darken_params' array.
5840
5841 * src/cff/cffobjs.c (cff_driver_init): Set default values for
5842 `darken_params'.
5843
58442013-06-25 Werner Lemberg <wl@gnu.org>
5845
Werner Lembergfad93262013-06-25 10:41:37 +02005846 [docmaker] Code shuffling.
5847
5848 * src/tools/docmaker/tohtml.py (re_url): Move regexp...
5849 * src/tools/docmaker/sources.py: ... to this file.
5850
58512013-06-25 Werner Lemberg <wl@gnu.org>
5852
Werner Lemberg8bdc4072013-06-25 10:20:53 +02005853 [docmaker] Remove unused functions.
5854
5855 * src/tools/docmaker/content.py (DocMarkup.get_start,
5856 DocBlock.get_markup_name): Removed.
5857 * src/tools/docmaker/tohtml.py (html_quote0, dump_html_code,
5858 HtmlFormatter.make_html_words): Removed.
5859
58602013-06-25 Werner Lemberg <wl@gnu.org>
5861
Werner Lembergffb8b472013-06-25 09:09:30 +02005862 * builds/freetype.mk (dll): Remove target.
5863
5864 Problem reported by Jörg Günnewig <joerg.guennewig@googlemail.com>.
5865
58662013-06-25 Werner Lemberg <wl@gnu.org>
5867
Werner Lembergc7cc9eb2013-06-25 07:24:02 +02005868 [docmaker] Recognise URLs.
5869
5870 * src/tools/docmaker/tohtml.py (re_url): New regular expression.
5871 (make_html_para): Use it.
5872
Werner Lemberg25b7da52013-06-19 10:23:36 +020058732013-06-19 Werner Lemberg <wl@gnu.org>
5874
Werner Lembergfe4f5712013-06-19 23:27:47 +02005875 * Version 2.5.0.1 released.
5876 ===========================
5877
5878
5879 Tag sources with `VER-2-5-0-1'.
5880
5881 * include/freetype/config/ftoption.h: Undefine
5882 CFF_CONFIG_OPTION_OLD_ENGINE.
5883 * devel/ftoption.h: Define CFF_CONFIG_OPTION_OLD_ENGINE.
5884
58852013-06-19 Werner Lemberg <wl@gnu.org>
5886
Werner Lemberg609f0ca2013-06-19 14:41:47 +02005887 * builds/unix/install.mk (install): Don't create `cache' directory.
5888
5889 Found by Peter Breitenlohner <peb@mppmu.mpg.de>.
5890
58912013-06-19 Werner Lemberg <wl@gnu.org>
5892
Werner Lemberg25b7da52013-06-19 10:23:36 +02005893 * Version 2.5.0 released.
5894 =========================
5895
5896
5897 Tag sources with `VER-2-5-0'.
5898
5899 * docs/VERSION.DLL: Update documentation and bump version number to
5900 2.5.0.
5901
5902 * README, Jamfile (RefDoc),
5903 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
5904 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
5905 builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
5906 builds/win32/visualc/freetype.dsp,
5907 builds/win32/visualc/freetype.vcproj,
5908 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
5909 builds/win32/visualce/freetype.vcproj,
5910 builds/win32/visualce/index.html,
5911 builds/wince/vc2005-ce/freetype.vcproj,
5912 builds/wince/vc2005-ce/index.html,
5913 builds/wince/vc2008-ce/freetype.vcproj,
5914 builds/wince/vc2008-ce/index.html: s/2.4.12/2.5.0/, s/2412/250/.
5915
5916 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 5.
5917 (FREETYPE_PATCH): Set to 0.
5918
5919 * builds/unix/configure.raw (version_info): Set to 16:2:10.
5920
5921 * src/base/ftobjs.c (FT_Open_Face): Pacify compiler.
5922 * src/truetype/ttinterp.c (Ins_MSIRP, Ins_MIRP): Ditto.
5923
Werner Lembergf56691a2013-06-18 10:17:48 +020059242013-06-18 Werner Lemberg <wl@gnu.org>
5925
5926 Fix Savannah bug #39269.
5927
5928 * src/base/ftgloadr.c (FT_GlyphLoader_CheckPoints): Free memory in
5929 case of reacollocation failures.
5930
Andrew Church67cf7a82013-06-18 09:35:34 +020059312013-06-18 Andrew Church <achurch+savannah@achurch.org>
5932
5933 Fix Savannah bug #39266.
5934
5935 If memory allocations fail at certain points while opening a font,
5936 FreeType can either crash due to a NULL dereference or leak memory.
5937
5938 * include/freetype/internal/ftobjs.c (FT_Face_InternalRec,
5939 FT_LibraryRec): Make `refcount' a signed integer. If, for example,
5940 FT_Open_Face() fails in a memory allocation before the face's
5941 reference count is set to 1, a subsequent `FT_Done_Library' call
5942 would otherwise loop over `FT_Done_Face' 2^32 times before freeing
5943 the face.
5944
5945 * src/base/ftobjs.c (open_face): Initialize `stream' and friends
5946 earlier.
5947 (FT_Open_Face) <Fail>: Behave correctly if `node' is NULL.
5948 (FT_Destroy_Module) <Fail>: Check that `renderer_clazz' is valid.
5949
59502013-06-14 Werner Lemberg <wl@gnu.org>
Werner Lembergd7e34442013-06-14 18:33:39 +02005951
5952 * src/smooth/ftgrays.c One final pragma to silence 64-bit MSVC.
5953
Dave Arnoldcb23a622013-06-13 07:46:32 +020059542013-06-06 Dave Arnold <darnold@adobe.com>
5955 Werner Lemberg <wl@gnu.org>
5956
5957 [cff] Add code to Adobe's engine to handle ppem > 2000.
5958
5959 * src/cff/cffgload.c (cff_slot_load): If we get
5960 FT_Err_Glyph_Too_Big, retry unhinted and scale up later on.
5961
Andrew Church67cf7a82013-06-18 09:35:34 +020059622013-06-12 Werner Lemberg <wl@gnu.org>
Werner Lemberg25b6e602013-06-12 11:06:34 +02005963
Werner Lemberg294ce112013-06-12 23:33:11 +02005964 Another try on pragmas.
5965
5966 * include/freetype/internal/ftdebug.h: Move pragmas to...
5967 * include/freetype/internal/internal.h: ... this file since it gets
5968 included by all source files.
5969 * include/freetype/internal/ftserv.h: Remove pragma which has no
5970 effect.
5971
Dave Arnoldcb23a622013-06-13 07:46:32 +020059722013-06-12 Werner Lemberg <wl@gnu.org>
Werner Lemberg294ce112013-06-12 23:33:11 +02005973
Werner Lemberg25b6e602013-06-12 11:06:34 +02005974 * include/freetype/internal/ftdebug.h: Disable MSVC warning C4127.
5975
5976 This partially undoes commit 3f6e0e0c.
5977
Werner Lembergc06889e2013-06-12 10:58:06 +020059782013-06-12 Werner Lemberg <wl@gnu.org>
5979
5980 More compiler warning fixes.
5981
5982 */*: Use cast to `FT_Bool' (or `Bool') where appropriate.
5983
Werner Lemberg99e60d82013-06-10 01:44:37 +020059842013-06-10 Werner Lemberg <wl@gnu.org>
5985
Werner Lemberg5e094c62013-06-10 14:59:21 +02005986 [truetype] Improve handling of broken sbit advance widths.
5987
5988 * src/truetype/ttgload.c (TT_Load_Glyph): Use the glyph's (scaled)
5989 `linearHoriAdvance' if the sbit's `horiAdvance' value is zero.
5990
5991 Cf. font `Fixedsys Excelsior' v3.01 (FSEX300.ttf), glyph A, 16ppem.
5992
59932013-06-10 Werner Lemberg <wl@gnu.org>
5994
Werner Lemberga25ecfd2013-06-10 12:57:16 +02005995 [sfnt] Improve embedded bitmap tracing.
5996
5997 * src/base/ftobjs.c (FT_Request_Size): Move trace message regarding
5998 bitmap strike match to...
5999 (FT_Match_Size): This function.
6000
6001 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics,
6002 tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned,
6003 tt_sbit_decoder_load_compound, tt_sbit_decoder_load_png,
6004 tt_sbit_decoder_load_image): Decorate with tracing messages.
6005
60062013-06-10 Werner Lemberg <wl@gnu.org>
6007
Werner Lemberg99e60d82013-06-10 01:44:37 +02006008 Fix Savannah bug #39160.
6009
6010 * src/truetype/ttinterp.c (Ins_SDPVTL): Set projection vector too
6011 for the degenerate case.
6012
Werner Lemberg2ba871b2013-06-09 08:20:54 +020060132013-06-09 David Turner <digit@google.com>
6014
6015 * src/cache/ftcmanag.c (FTC_Manager_Reset): Add missing cache flush.
6016
6017 This code, present since eight(!) years in the unused `CACHE'
6018 branch, has been forgotten to apply to the master branch. It's
6019 really amazing that noone has ever complained since
6020 `FTC_Manager_Reset' is pretty useless without flushing the cache.
6021
Werner Lemberg85fd84b2013-06-07 17:10:21 +020060222013-06-07 Werner Lemberg <wl@gnu.org>
6023
Werner Lemberg3f6e0e02013-06-07 18:10:40 +02006024 Add and improve pragmas for MSVC compiler.
6025
6026 * include/freetype/internal/ftdebug.h: Remove pragmas.
6027 * include/freetype/internal/ftserv.h: Use push and pop for pragmas.
6028 * include/freetype/internal/ftvalid.h: Handle warning C4324.
6029 * src/base/ftobjs.c: Use push and pop for pragmas.
6030 * src/gzip/ftgzip.c: Handle warning C4244.
6031
60322013-06-07 Werner Lemberg <wl@gnu.org>
6033
Werner Lemberg85fd84b2013-06-07 17:10:21 +02006034 [cff] s/cf2_getGlyphWidth/cf2_getGlyphOutline/.
6035
6036 * src/cff/cf2font.c, src/cff/cf2font.h, src/cff/cf2ft.c: Do it.
6037
Werner Lemberg4447b2c2013-06-06 21:28:36 +020060382013-06-06 Dave Arnold <darnold@adobe.com>
6039
6040 [cff] Add early exit feature for width-only calls.
6041
6042 This is for `FT_Get_Advance'.
6043
6044 There are 7 places where the spec says the width can be defined:
6045
6046 hstem/hstemhm
6047 vstem/vstemhm
6048 cntrmask/hintmask
6049 hmoveto
6050 vmoveto
6051 rmoveto
6052 endchar
6053
6054 * src/cff/cf2intrp.c (cf2_doStems): Exit early for width-only calls,
6055 if possible.
6056
6057 (cf2_interpT2CharString) <cf2_cmdHSTEM>, <cf2_cmdVSTEM>,
6058 <cf2_cmdVMOVETO>, <cf2_cmdENDCHAR>, <cf2_cmdHINTMASK>,
6059 <cf2_cmdRMOVETO>, <cf2_cmdHMOVETO>: Exit early for width-only calls.
6060
Werner Lembergbadf3172013-06-06 09:16:38 +020060612013-06-06 Werner Lemberg <wl@gnu.org>
6062
6063 Next round of compiler fixes.
6064
6065 * builds/win32/ftdebug.c, builds/wince/ftdebug.c (ft_debug_init):
6066 Add proper cast.
6067
6068 * include/freetype/internal/ftserv.h (FT_SERVICE_UNAVAILABLE): Fix
6069 cast.
6070 * include/freetype/internal/ftstream.h: Decorate stream and frame
6071 macros with `FT_Long' and `FT_ULong' as appropriate.
6072
6073 * src/base/ftrfork.c (raccess_guess_darwin_hfsplus,
6074 raccess_guess_darwin_newvfs): Use cast.
6075
6076 * src/bdf/bdflib.c (_bdf_set_default_spacing): Use cast.
6077
6078 * src/cache/ftcmanag.c (FTC_Manager_Check): Fix cast.
6079 * src/cache/ftcmanag.h (FTC_ManagerRec): Ditto.
6080
6081 * src/cff/cf2arrst.c (cf2_arrstack_setNum_Elements): Use cast.
6082 * src/cff/cf2ft.c (cf2_freeSeacComponent): Ditto.
6083 * src/cff/cffobjs.c (remove_subset_prefix, remove_style): Ditto.
6084
6085 * src/cid/cidparse.c (cid_parser_new): Use cast.
6086
6087 * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Use cast.
6088
6089 * src/psaux/psobjs.c (reallocate_t1_table): Fix argument type.
6090
6091 * src/raster/ftraster.c (ft_black_reset): Use cast.
6092
6093 * src/truetype/ttgxvar.c (FT_Stream_FTell): Use cast.
6094 (ALL_POINTS): Fix cast.
6095
6096 * src/type1/t1driver.c (t1_ps_get_font_value): Add casts.
6097 * src/type1/t1parse.c (T1_Get_Private_Dict): Add cast.
6098
Dave Arnoldc3782492013-06-05 19:57:55 +020060992013-06-05 Dave Arnold <darnold@adobe.com>
6100
6101 Fix more MSVC Win32 compiler warnings.
6102
6103 * src/base/ftobjs.c: Fix typo in MS pragma.
6104
6105 * src/base/bdflib.c (_bdf_set_default_spacing, _bdf_add_property):
6106 `lineno' is only used in debug mode.
6107
6108 * src/cff/cf2ft.c (cf2_builder_moveTo): `params' is only used in
6109 debug mode.
6110
Werner Lemberg45392b72013-06-05 13:43:20 +020061112013-06-05 Werner Lemberg <wl@gnu.org>
6112
6113 Fix compiler warnings.
6114
6115 * include/freetype/internal/ftmemory.h: Decorate memory allocation
6116 macros with `FT_Long' where appropriate.
6117 Remove duplicate of FT_MEM_QRENEW_ARRAY definition.
6118
6119 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Use
6120 cast.
6121
6122 * src/base/ftobjs.c: Add warning disabling pragma for MSVC while
6123 including `md5.c'.
6124
6125 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdESC>: Add
6126 cast.
6127
6128 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_compound): Fix casts.
6129 (tt_sbit_decoder_load_bitmap): Beautification.
6130
6131 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Initialize
6132 variables (earlier).
6133
6134 * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Pacify compiler.
6135
6136 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Use unsigned constants
6137 where appropriate.
6138
6139 * src/type1/t1load.c (T1_Get_MM_Var): Ditto.
6140
Werner Lembergdc624ca2013-06-04 10:30:48 +020061412013-06-04 Werner Lemberg <wl@gnu.org>
6142
Werner Lembergd9634982013-06-04 20:18:57 +02006143 * src/cff/cf2font.c (cf2_getGlyphWidth): Initialize `advWidth'.
6144
6145 Problem reported by Ingmar Sittl <ingmar.sittl@elektrobit.com>.
6146
61472013-06-04 Werner Lemberg <wl@gnu.org>
6148
Werner Lembergdc624ca2013-06-04 10:30:48 +02006149 Apply fixes for cppcheck nitpicks.
6150
6151 http://cppcheck.sourceforge.net/
6152
Werner Lemberg8d8508e2013-06-04 13:09:01 +02006153 The call was (from the top-level of the FreeType tree):
6154
6155 cppcheck --force \
6156 --enable=all \
6157 -I include \
6158 -I include/freetype/ \
6159 -I include/freetype/config/ \
6160 -I include/freetype/internal/ \
6161 . &> cppcheck.log
6162
Werner Lembergdc624ca2013-06-04 10:30:48 +02006163 Note that the current version heavily chokes on FreeType, delivering
Werner Lemberg8d8508e2013-06-04 13:09:01 +02006164 many wrong results. I will report those issues to the cppcheck team
Werner Lembergdc624ca2013-06-04 10:30:48 +02006165 so that a newer version gives improved results hopefully.
6166
6167 */* Improve variable scopes.
6168 */* Remove redundant initializations which get overwritten.
6169
Werner Lemberge8ed2d62013-08-01 12:20:20 +02006170 * src/base/ftmac.c, builds/mac/ftmac.c (count_faces_scalable):
Werner Lembergdc624ca2013-06-04 10:30:48 +02006171 Remove unused variable.
6172
6173 * src/base/ftdbgmem.c (ft_mem_table_destroy): `table' can't be zero.
6174
6175 * src/gxvalid/gxvkern.c (gxv_kern_subtable_fmt1_entry_validate):
6176 Remove functionless code.
6177
6178 * src/tools/ftrandom.c (main): Fix memory leak.
6179
Werner Lemberg2429dc32013-06-03 12:41:58 +020061802013-06-03 Werner Lemberg <wl@gnu.org>
6181
6182 Add CFF_CONFIG_OPTION_OLD_ENGINE configuration option.
6183
6184 This controls whether the old FreeType CFF engine gets compiled into
6185 FreeType. It is now disabled by default.
6186
6187 * devel/ftoption.h, include/freetype/config/ftoption.h
6188 (CFF_CONFIG_OPTION_OLD_ENGINE): New macro.
6189
6190 * src/cff/cffdrivr.c (cff_property_set), src/cff/cffgload.c
6191 (CFF_Operator, cff_argument_counts, cff_builder_add_point,
6192 cff_operator_seac, cff_decoder_parse_charstrings, cff_slot_load),
6193 src/cff/cffgload.h, src/cff/cffobjs.c (cff_driver_init): Use
6194 CFF_CONFIG_OPTION_OLD_ENGINE to guard the affected code.
6195
6196 * docs/CHANGES: Updated.
6197
Werner Lembergf9cceeb2013-06-02 23:38:13 +020061982013-06-02 Werner Lemberg <wl@gnu.org>
6199
6200 Fix PNG library handling.
6201
6202 * builds/unix/configure.raw: Don't use LIBPNG_LIBS but
6203 LIBPNG_LDFLAGS.
6204
Behdad Esfahbod760d3422013-05-29 11:36:18 +020062052013-05-23 Behdad Esfahbod <behdad@google.com>
6206
6207 Add support for color embedded bitmaps (eg. color emoji).
6208
6209 A new load flag, FT_LOAD_COLOR, makes FreeType load color
6210 embedded-bitmaps, following this draft specification
6211
6212 https://color-emoji.googlecode.com/git/specification/v1.html
6213
6214 which defines two new SFNT tables, `CBDT' and `CBLC' (named and
6215 modeled after `EBDT' and `EBLC', respectively). The color bitmaps
6216 are stored in the new FT_PIXEL_MODE_BGRA format to represent BGRA
6217 pre-multiplied sRGB images. If PNG support is available, PNG color
6218 images as defined in the same proposed specification are supported
6219 also.
6220
6221 Note that color bitmaps are converted to grayscale if client didn't
6222 ask for color.
6223
6224 * builds/unix/configure.raw: Search for libpng.
6225 Add `--without-png' option.
6226
6227 * devel/ftoption.h, include/freetype/config/ftoption.h
6228 (FT_CONFIG_OPTION_USE_PNG): New macro.
6229
6230 * include/freetype/freetype.h (FT_LOAD_COLOR): New load flag.
6231
6232 * include/freetype/ftimage.h (FT_Pixel_Mode): Add
6233 `FT_PIXEL_MODE_BGRA'.
6234
6235 * include/freetype/tttags.h (TTAG_CBDT, TTAG_CBLC): New tags.
6236
6237 * src/base/ftbitmap.c (FT_Bitmap_Embolden): Updated.
6238 (ft_gray_for_premultiplied_srgb_bgra): New function.
6239 (FT_Bitmap_Convert): Handle FT_PIXEL_MODE_BGRA.
6240
6241 * src/sfnt/pngshim.c, src/sfnt/pngshim.h: New files.
6242
6243 * src/sfnt/sfnt.c: Include `pngshim.c'.
6244
6245 * src/sfnt/ttsbit.c: Include FT_BITMAP_H and `pngshim.h'
6246 (tt_face_load_eblc): Load `CBLC'.
6247 (tt_sbit_decoder_init): Load `CBDT'.
6248 (tt_sbit_decoder_alloc_bitmap): Pass load flags to select between
6249 color and grayscale bitmaps.
6250 Set `num_grays'. This is used by `ftview' to choose the blending
6251 algorithm.
6252 (tt_sbit_decoder_load_byte_aligned,
6253 tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_compound,
6254 tt_sbit_decoder_load_image): Pass load flag.
6255 s/write/pwrite/.
6256 Don't call `tt_sbit_decoder_alloc_bitmap'.
6257 Updated.
6258 (tt_sbit_decoder_load_png) [FT_CONFIG_OPTION_USE_PNG]: New function.
6259 (tt_sbit_decoder_load_bitmap): Pass load flag.
6260 Handle new glyph formats 17, 18, and 19.
6261 Call `tt_sbit_decoder_alloc_bitmap'.
6262 Flatten color bitmaps if necessary.
6263 (tt_face_load_sbit_image): Updated.
6264
6265 * src/sfnt/rules.mk (SFNT_DRV_SRC): Add `pngshim.c'.
6266
6267 * docs/CHANGES: Updated.
6268
Guenter41e44802013-05-24 11:38:09 +020062692013-05-24 Guenter <info@gknw.net>
6270
6271 Apply Savannah patch #8055.
6272
6273 Make `apinames' create an import file for NetWare.
6274
6275 * src/tools/apinames.c (PROGRAM_VERSION): Set to 0.2.
6276 (OutputFormat): Add `OUTPUT_NETWARE_IMP'.
6277 (names_dump): Handle it.
6278 (usage): Updated.
6279 (main): Handle new command line flag `-wN'.
6280
Behdad Esfahbod2d6e1fb2013-05-23 08:01:20 +020062812013-05-23 Behdad Esfahbod <behdad@behdad.org>
6282
6283 Compilation fix.
6284
6285 * src/truetype/ttinterp.c (TT_RunIns)
6286 [!TT_CONFIG_OPTION_SUBPIXEL_HINTING]: Make it work.
6287
Infinality18f35ed2013-05-21 20:51:15 -050062882013-05-22 Infinality <infinality@infinality.net>
6289
Infinality3c783c12013-05-21 21:03:00 -05006290 [truetype] Formatting and an additional subpixel tweak.
6291
6292 * src/truetype/ttinterp.c (Ins_SHPIX): Formatting fix.
6293 * src/truetype/ttsubpix.c (SKIP_NONPIXEL_Y_MOVES_Rules):
6294 Revert previous modification for Verdana clones.
6295
62962013-05-22 Infinality <infinality@infinality.net>
6297
Infinality18f35ed2013-05-21 20:51:15 -05006298 [truetype] Adjust subpixel zp2 moves and tweak rules.
6299
6300 These modifications fix thin diagonal stems in some legacy fonts.
6301
6302 * src/truetype/ttinterp.c (Direct_Move_X): Remove unused macro.
6303 (Move_Zp2_Point): Don't always disable x moves for subpixel rendering.
6304 (Ins_SHP): Disable x moves here for subpixel rendering.
6305 (Ins_SHPIX): Only disable x moves in compatibility mode.
6306 Split out zp2 move reversals and reorder conditional respectively.
6307
6308 * src/truetype/ttsubpix.c (SKIP_NONPIXEL_Y_MOVES_Rules): Fix oversight.
6309 Only adjust Verdana clones for 17 ppem.
6310 (SKIP_NONPIXEL_Y_MOVES_Rules_Exceptions): Add Courier New.
6311 (ALWAYS_SKIP_DELTAP_Rules): Found additional cases for Arial `s'.
6312
Infinality63bfa832013-05-20 07:38:21 +020063132013-05-20 Infinality <infinality@infinality.net>
6314
6315 [truetype] Simplify and improve subpixel function detection.
6316
6317 Some small enhancements have allowed the removal of many macros and
6318 the simplification of existing rules in `ttsubpix.c'.
6319
6320 * src/truetype/ttsubpix.h (SPH_TWEAK_ALLOW_X_DMOVEX,
6321 SPH_TWEAK_ALLOW_X_MOVE_ZP2,
6322 SPH_TWEAK_DELTAP_SKIP_EXAGGERATED_VALUES,
6323 SPH_TWEAK_SKIP_INLINE_DELTAS, SPH_TWEAK_MIRP_CVT_ZERO): Removed.
6324 (SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES_DELTAP): New rule macro.
6325
6326 * src/truetype/ttsubpix.c: Updated affected rules.
6327
6328 * src/truetype/ttinterp.c (Direct_Move_X): Updated.
6329 (INS_FDEF): Add additional function detection.
6330 (INS_ENDF): Set runtime flag.
6331 (Ins_CALL): Skip the call under certain conditions.
6332 Remove bad code.
6333 (Ins_LOOPCALL): Skip the call under certain conditions.
6334 Remove bad code.
6335 (Move_Zp2_Point): Updated.
6336 (Ins_SHPIX): Updated.
6337 Skip the move under some situations.
6338 (Ins_MIAP): Improve conditions.
6339 (Ins_MIRP): Updated.
6340 (Ins_DELTAP): Skip move under certain conditions.
6341 Simplify conditions.
6342 (TT_RunIns): Updated.
6343 Add code to handle new function detection.
6344 Trace messages.
6345
Werner Lembergfd664692013-05-17 17:40:27 +020063462013-05-17 Werner Lemberg <wl@gnu.org>
6347
6348 Update more FT_Err_XXX macros using FT_ERR and FT_THROW;
6349
6350 * builds/amiga/src/base/ftsystem.c, builds/mac/ftmac.c,
6351 builds/unix/ftsystem.c, builds/vms/ftsystem.c: Do it.
6352
Werner Lembergf04951a2013-05-17 13:51:07 +020063532013-05-15 Werner Lemberg <wl@gnu.org>
6354
6355 [truetype] Add `interpreter-version' property.
6356
6357 This makes the option TT_CONFIG_OPTION_SUBPIXEL_HINTING controllable
6358 at runtime.
6359
Werner Lemberg27991332013-05-17 14:00:26 +02006360 * include/freetype/ftttdrv.h: New file.
6361
6362 * include/freetype/config/ftheader.h (FT_TRUETYPE_DRIVER_H): New
6363 macro.
6364
Werner Lembergf04951a2013-05-17 13:51:07 +02006365 * src/truetype/ttdriver.c: Include FT_TRUETYPE_DRIVER_H.
6366 (tt_property_set, tt_property_get): Fill templates.
6367
6368 * src/truetype/ttobjs.h (TT_DriverRec): Add `interpreter_version'
6369 member.
6370 Remove unused `extension_component' member.
6371
6372 * src/truetype/ttgload.c: Include FT_TRUETYPE_DRIVER_H.
6373 (tt_get_metrics, TT_Hint_Glyph, TT_Process_Simple_Glyph,
6374 compute_glyph_metrics, tt_loader_init): Use `interpreter_version'.
6375
6376 * src/truetype/ttinterp.c: Include FT_TRUETYPE_DRIVER_H.
6377 (SUBPIXEL_HINTING): New macro to check `interpreter_version' flag.
6378 Update all affected functions to use it.
6379 Use TT_INTERPRETER_VERSION_XXX where appropriate.
6380
6381 * src/truetype/ttobjs.c: Include FT_TRUETYPE_DRIVER_H.
6382 (tt_driver_init): Initialize `interpreter_version'.
6383
6384 * src/truetype/ttsubpix.c: Include FT_TRUETYPE_DRIVER_H.
6385 Use TT_INTERPRETER_VERSION_XXX where appropriate.
6386
Werner Lemberg7441dd82013-05-13 09:12:46 +020063872013-05-13 Werner Lemberg <wl@gnu.org>
6388
Werner Lemberg6650be72013-05-13 10:05:29 +02006389 [truetype] Avoid empty source file.
6390
6391 * src/truetype/ttsubpix.c [!TT_CONFIG_OPTION_SUBPIXEL_HINTING]:
6392 Provide dummy typedef.
6393
63942013-05-13 Werner Lemberg <wl@gnu.org>
6395
Werner Lemberg7441dd82013-05-13 09:12:46 +02006396 * src/cff/cf2font.c (cf2_getGlyphWidth): Fix uninitialized variable.
6397
6398 Fix suggested by Vaibhav Nagarnaik <vnagarnaik@gmail.com>.
6399
Brian Nixon8d6025c2013-05-13 09:06:42 +020064002013-05-13 Brian Nixon <bnixon@yahoo.com>
6401
6402 Fix Savannah bug #38970.
6403
6404 * src/base/ftdebug.c, builds/win32/ftdebug.c,
6405 builds/wince/ftdebug.c, builds/amiga/src/base/ftdebug.c
6406 (ft_debug_init): Don't read past the environment variable FT2_DEBUG.
6407
Werner Lembergd51ac9c2013-05-12 06:00:27 +020064082013-05-12 Werner Lemberg <wl@gnu.org>
6409
Werner Lembergcd888752013-05-12 15:08:57 +02006410 [truetype] Add framework for TrueType properties.
6411
6412 * src/truetype/ttdrivr.c: Include FT_SERVICE_PROPERTIES_H.
6413 (tt_property_set, tt_property_get): New functions, still empty.
6414 Define `tt_service_properties' service.
6415 Update `tt_services'.
6416
6417 * src/truetype/ttpic.h: Include FT_SERVICE_PROPERTIES_H.
6418 (TT_SERVICE_PROPERTIES_GET): New macro.
6419 (TTModulePIC): Add `tt_service_properties'.
6420
64212013-05-12 Werner Lemberg <wl@gnu.org>
6422
Werner Lembergb112fa42013-05-12 07:29:04 +02006423 Fix Savannah bug #38967.
6424
6425 * src/base/ftcalc.c (FT_DivFix) [FT_LONG64]: Fix cast.
6426
64272013-05-12 Werner Lemberg <wl@gnu.org>
6428
Werner Lembergcbcf33d2013-05-12 07:27:48 +02006429 Introduce unsigned 64bit type (if available).
6430
6431 * include/freetype/config/ftconfig.h: Define FT_UINT64 if available.
6432 [FT_LONG64]: Provide FT_UInt64.
6433
6434 * builds/unix/ftconfig.in: Synchronized.
6435
64362013-05-12 Werner Lemberg <wl@gnu.org>
6437
Werner Lembergd51ac9c2013-05-12 06:00:27 +02006438 Fix Savannah bug #38968.
6439
6440 * include/freetype/ftmodapi.h: Add `FT_EXPORT' to
6441 FT_Property_{Set,Get}.
6442 * src/base/ftobjs.c: Add `FT_EXPORT_DEF' to
6443 FT_Property_{Set,Get}.
6444
Werner Lembergf6aa0892013-05-10 07:58:47 +020064452013-05-10 Werner Lemberg <wl@gnu.org>
6446
Werner Lembergea2b4752013-05-10 08:04:33 +02006447 [sfnt] Clean up bitmap code.
6448
6449 * src/sfnt/ttsbit.c: Deleted.
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02006450 * src/sfnt/ttsbit0.c: Renamed to `ttsbit.c'.
Werner Lembergea2b4752013-05-10 08:04:33 +02006451 * rules.mk (SFNT_DRV_H): Updated.
6452
64532013-05-10 Werner Lemberg <wl@gnu.org>
6454
Werner Lembergf6aa0892013-05-10 07:58:47 +02006455 */* [FT_CONFIG_OPTION_OLD_INTERNALS]: Remove macro and guarded code.
6456
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00006457----------------------------------------------------------------------------
6458
Werner Lembergf57fc592015-01-17 20:41:43 +01006459Copyright 2013-2015 by
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00006460David Turner, Robert Wilhelm, and Werner Lemberg.
6461
6462This file is part of the FreeType project, and may only be used, modified,
6463and distributed under the terms of the FreeType project license,
6464LICENSE.TXT. By continuing to use, modify, or distribute this file you
6465indicate that you have read the license and understand and accept it
6466fully.
6467
6468
6469Local Variables:
6470version-control: never
Werner Lemberg4e03fe72006-04-29 06:20:09 +00006471coding: utf-8
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00006472End: