blob: 8ab57c4c7b782c07dd5aba5c8dde3321038ed2b0 [file] [log] [blame]
Werner Lembergd03a67a2015-01-11 08:39:14 +010012015-01-11 Werner Lemberg <wl@gnu.org>
2
3 [truetype] More macro expansions.
4
Werner Lemberg4aaadf42015-01-11 08:42:28 +01005 * src/truetype/ttinterp.c (FT_UNUSED_EXEC): Remove macro by
6 expansion.
7
82015-01-11 Werner Lemberg <wl@gnu.org>
9
10 [truetype] More macro expansions.
11
Werner Lembergd03a67a2015-01-11 08:39:14 +010012 * src/truetype/ttinterp.c (INS_ARG): Remove macro by expansion,
13 adjusting funtion calls where necessary.
14 (FT_UNUSED_ARG): Removed, no longer needed.
15
Werner Lemberg1b4d68c2015-01-10 19:56:28 +0100162015-01-10 Werner Lemberg <wl@gnu.org>
17
Werner Lembergeb341362015-01-11 00:23:27 +010018 [truetype] More macro expansions.
19
20 Based on a patch from Behdad.
21
22 * src/truetype/ttinterp.c (DO_*): Expand macros into corresponding
23 `Ins_*' functions.
24 (TT_RunIns): Replace `DO_*' macros with `Ins_*' function calls.
25 (ARRAY_BOUND_ERROR): Remove second definition, which is no longer
26 needed.
27 (Ins_SVTCA, Ins_SPVTCA, Ins_SFVTCA): Replaced with...
28 (Ins_SxyTCA): New function.
29
302015-01-10 Werner Lemberg <wl@gnu.org>
31
Werner Lemberg01be1302015-01-10 23:05:37 +010032 [truetype] Remove TT_CONFIG_OPTION_INTERPRETER_SWITCH.
33
34 Behdad suggested this code simplification, and nobody objected...
35
36 * include/config/ftoption.h, devel/ftoption.h
37 (TT_CONFIG_OPTION_INTERPRETER_SWITCH): Remove.
38
39 * src/truetype/ttinterp.c [TT_CONFIG_OPTION_INTERPRETER_SWITCH]:
40 Remove related code.
41 (ARRAY_BOUND_ERROR): Use do-while loop.
42
432015-01-10 Werner Lemberg <wl@gnu.org>
44
Werner Lembergfae0c812015-01-10 20:23:10 +010045 [truetype] More macro expansions.
46
Werner Lemberg6cc1f122015-01-10 21:56:59 +010047 * src/truetype/ttinterp.c, src/truetype/ttinterp.h (EXEC_ARG_,
48 EXEC_ARG): Remove by replacing with expansion.
49
502015-01-10 Werner Lemberg <wl@gnu.org>
51
52 [truetype] More macro expansions.
53
Werner Lemberg24681452015-01-10 21:53:48 +010054 Based on a patch from Behdad.
55
56 * src/truetype/ttinterp.c (SKIP_Code, GET_ShortIns, NORMalize,
57 SET_SuperRound, ROUND_None, INS_Goto_CodeRange, CUR_Func_move,
58 CUR_Func_move_orig, CUR_Func_round, CUR_Func_cur_ppem,
59 CUR_Func_read_cvt, CUR_Func_write_cvt, CUR_Func_move_cvt,
60 CURRENT_Ratio, INS_SxVTL, COMPUTE_Funcs, COMPUTE_Round,
61 COMPUTE_Point_Displacement, MOVE_Zp2_Point): Remove by replacing
62 with expansion.
63
64 (Cur_Func_project, CUR_Func_dualproj, CUR_fast_project,
65 CUR_fast_dualproj): Replace with macros `project', `dualproj',
66 `fast_project', `fast_dualproj'.
67
682015-01-10 Werner Lemberg <wl@gnu.org>
69
70 [truetype] More macro expansions.
71
Werner Lembergfae0c812015-01-10 20:23:10 +010072 * src/truetype/ttinterp.c (EXEC_OP_, EXEC_OP): Remove by replacing
73 with expansion.
74
752015-01-10 Werner Lemberg <wl@gnu.org>
76
Werner Lemberg5a752f32015-01-10 20:08:35 +010077 [truetype] Remove code for static TrueType interpreter.
78
79 This is a follow-up patch.
80
81 * src/truetype/ttinterp.c, src/truetype/ttinterp.h
82 [TT_CONFIG_OPTION_STATIC_INTERPRETER,
83 TT_CONFIG_OPTION_STATIC_RASTER]: Remove macros and related code.
84
852015-01-10 Werner Lemberg <wl@gnu.org>
86
Werner Lemberg1b4d68c2015-01-10 19:56:28 +010087 * src/truetype/ttinterp.c (CUR): Remove by replacing with expansion.
88
89 This starts a series of patches that simplifies the code of the
90 bytecode interpreter.
91
Werner Lemberg232bd942014-12-30 21:44:51 +0100922014-12-30 Werner Lemberg <wl@gnu.org>
93
94 * Version 2.5.5 released.
95 =========================
96
97
98 Tag sources with `VER-2-5-5'.
99
100 * docs/VERSION.DLL: Update documentation and bump version number to
101 2.5.5.
102
103 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
104 builds/windows/vc2005/index.html,
105 builds/windows/vc2008/freetype.vcproj,
106 builds/windows/vc2008/index.html,
107 builds/windows/vc2010/freetype.vcxproj,
108 builds/windows/vc2010/index.html,
109 builds/windows/visualc/freetype.dsp,
110 builds/windows/visualc/freetype.vcproj,
111 builds/windows/visualc/index.html,
112 builds/windows/visualce/freetype.dsp,
113 builds/windows/visualce/freetype.vcproj,
114 builds/windows/visualce/index.html,
115 builds/wince/vc2005-ce/freetype.vcproj,
116 builds/wince/vc2005-ce/index.html,
117 builds/wince/vc2008-ce/freetype.vcproj,
118 builds/wince/vc2008-ce/index.html: s/2.5.4/2.5.5/, s/254/255/.
119
120 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 5.
121
122 * builds/unix/configure.raw (version_info): Set to 17:4:11.
123 * CMakeLists.txt (VERSION_PATCH): Set to 5.
124 * docs/CHANGES: Updated.
125
126 * builds/toplevel.mk (dist): Fix typos.
127
Alexei Podtelezhnikov70241552014-12-24 12:11:46 -05001282014-12-24 Alexei Podtelezhnikov <apodtele@gmail.com>
129
130 [base] Formatting and nanooptimizations.
131
132 * src/base/ftcalc.c,
133 * src/base/fttrigon.c: Revise sign restoration.
134
Werner Lemberg06842c72014-12-13 07:42:51 +01001352014-12-13 Werner Lemberg <wl@gnu.org>
136
137 * src/pcf/pcfread.c (pcf_read_TOC): Improve fix from 2014-12-08.
138
Werner Lembergb9438112014-12-11 13:33:14 +01001392014-12-11 Werner Lemberg <wl@gnu.org>
140
Werner Lemberg82119502014-12-11 22:27:06 +0100141 * builds/toplevel.mk (dist): Use older POSIX standard for `tar'.
142
143 Apparently, BSD tar isn't capable yet of handling POSIX-1.2001
144 (contrary to GNU tar), so force the POSIX-1.1988 format.
145
146 Problem reported by Stephen Fisher <sfisher@SDF.ORG>.
147
1482014-12-11 Werner Lemberg <wl@gnu.org>
149
Werner Lemberg812ed342014-12-11 14:07:29 +0100150 * src/type42/t42parse.c (t42_parse_sfnts): Reject invalid TTF size.
151
1522014-12-11 Werner Lemberg <wl@gnu.org>
153
Werner Lembergc9ca6ff2014-12-11 13:39:39 +0100154 * src/base/ftobjs.c (FT_Get_Glyph_Name): Fix off-by-one check.
155
156 Problem reported by Dennis Felsing <dennis@felsin9.de>.
157
1582014-12-11 Werner Lemberg <wl@gnu.org>
159
Werner Lembergb9438112014-12-11 13:33:14 +0100160 * src/type42/t42parse.c (t42_parse_sfnts): Check `string_size'.
161
162 Problem reported by Dennis Felsing <dennis@felsin9.de>.
163
suzuki toshiya2b592822014-12-10 00:27:41 +09001642014-12-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
165
suzuki toshiya9bd1e552014-12-09 14:51:52 +0900166 [gxvalid] Fix a naming convention conflicting with ftvalid.
167
168 See previous changeset for otvalid.
169
170 * src/gxvalid/{gxvcommn.h, gxvmort.h, gxvmorx.h}: Replace
171 `valid' by `gxvalid'.
172 * src/gxvalid/{gxvbsln.c, gxvcommn.c, gxvfeat.c, gxvjust.c,
173 gxvkern.c, gxvlcar.c, gxvmort.c, gxvmort0.c, gxvmort1.c,
174 gxvmort2.c, gxvmort4.c, gxvmort5.c, gxvmorx.c, gxvmorx0.c,
175 gxvmorx1.c, gxvmorx2.c, gxvmorx4.c, gxvmorx5.c, gxvopbd.c,
176 gxvprop.c, gxvtrak.c}: Replace `valid' by `gxvalid' if
177 it is typed as GXV_Validator.
178
1792014-12-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
180
suzuki toshiya51abdf62014-12-09 00:58:04 +0900181 [otvalid] Fix a naming convention conflicting with ftvalid.
182
183 Some prototypes in ftvalid.h use `valid' for the variables
184 typed as FT_Validator. Their implementations in src/base/
185 ftobjs.c and utilizations in src/sfnt/ttcmap.c do similar.
186
187 Some macros in otvcommn.h assume the exist of the variable
188 `valid' typed as OTV_Validator in the caller.
189
190 Mixing these two conventions cause invalid pointer conversion
191 and unexpected SEGV in longjmp. To prevent it, all variables
192 typed as OTV_Validator are renamed to `otvalid'.
193
194 * src/otvalid/otvcommn.h: Replace `valid' by `otvalid'.
195 * src/otvalid/{otvcommn.c, otvbase.c, otvgdef.c, otvgpos.c,
196 otvgsub.c, otvjstf.c, otvmath.c}: Replace `valid' by `otvalid'
197 if it is typed as OTV_Validator.
198
1992014-12-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
200
suzuki toshiya2b592822014-12-10 00:27:41 +0900201 [ftvalid] Introduce FT_THROW() in FT_INVALID_XXX macros.
202
203 Original patch is designed by Werner Lemberg. Extra part
204 for otvalid and gxvalid are added by suzuki toshiya, see
205 discussion:
206 http://lists.nongnu.org/archive/html/freetype-devel/2014-12/msg00002.html
207 http://lists.nongnu.org/archive/html/freetype-devel/2014-12/msg00007.html
208
209 * include/internal/ftvalid.h: Introduce FT_THROW() in FT_INVALID_().
210 * src/gxvalid/gxvcommn.h: Ditto.
211 * src/otvalid/otvcommn.h: Ditto.
212
Werner Lemberg74af85c2014-12-08 16:01:50 +01002132014-12-08 Werner Lemberg <wl@gnu.org>
214
215 [pcf] Fix Savannah bug #43774.
216
217 Work around `features' of X11's `pcfWriteFont' and `pcfReadFont'
218 functions. Since the PCF format doesn't have an official
219 specification, we have to exactly follow these functions' behaviour.
220
221 The problem was unveiled with a patch from 2014-11-06, fixing issue
222 #43547.
223
224 * src/pcf/pcfread.c (pcf_read_TOC): Don't check table size for last
225 element. Instead, assign real size.
226
Werner Lemberg66883b52014-12-07 09:17:06 +01002272014-12-07 Werner Lemberg <wl@gnu.org>
228
Werner Lemberg553c9672014-12-07 19:29:52 +0100229 Work around a bug in Borland's C++ compiler.
230
231 See
232
233 http://qc.embarcadero.com/wc/qcmain.aspx?d=118998
234
235 for Borland's bug tracker entry.
236
237 Reported by Yuliana Zigangirova <zigangirova@inbox.ru>,
238 http://lists.gnu.org/archive/html/freetype-devel/2014-04/msg00001.html.
239
240 * include/internal/ftvalid.h (FT_ValidatorRec), src/smooth/ftgrays.c
241 (gray_TWorker_): Move `ft_jmp_buf' field to be the first element.
242
2432014-12-07 Werner Lemberg <wl@gnu.org>
244
Werner Lemberg9870d6d2014-12-07 09:40:47 +0100245 */*: Decorate hex constants with `U' and `L' where appropriate.
246
2472014-12-07 Werner Lemberg <wl@gnu.org>
248
Werner Lemberg66883b52014-12-07 09:17:06 +0100249 [truetype] Prevent memory leak for buggy fonts.
250
251 * src/truetype/ttobjs.c (tt_size_done): Unconditionally call
252 `tt_size_done_bytecode'.
253
Werner Lemberg94926682014-12-06 07:11:44 +01002542014-12-06 Werner Lemberg <wl@gnu.org>
255
256 * Version 2.5.4 released.
257 =========================
258
259
260 Tag sources with `VER-2-5-4'.
261
262 * docs/VERSION.DLL: Update documentation and bump version number to
263 2.5.4.
264
265 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
266 builds/windows/vc2005/index.html,
267 builds/windows/vc2008/freetype.vcproj,
268 builds/windows/vc2008/index.html,
269 builds/windows/vc2010/freetype.vcxproj,
270 builds/windows/vc2010/index.html,
271 builds/windows/visualc/freetype.dsp,
272 builds/windows/visualc/freetype.vcproj,
273 builds/windows/visualc/index.html,
274 builds/windows/visualce/freetype.dsp,
275 builds/windows/visualce/freetype.vcproj,
276 builds/windows/visualce/index.html,
277 builds/wince/vc2005-ce/freetype.vcproj,
278 builds/wince/vc2005-ce/index.html,
279 builds/wince/vc2008-ce/freetype.vcproj,
280 builds/wince/vc2008-ce/index.html: s/2.5.3/2.5.4/, s/253/254/.
281
282 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4.
283
284 * builds/unix/configure.raw (version_info): Set to 17:3:11.
285 * CMakeLists.txt (VERSION_PATCH): Set to 4.
286 * docs/CHANGES: Updated.
287
Werner Lemberg934ef382014-12-04 06:38:51 +01002882014-12-04 Werner Lemberg <wl@gnu.org>
289
290 docs/CHANGES: Updated, formatted.
291
Dave Arnold2cdc4562014-12-04 06:10:16 +01002922014-12-04 Dave Arnold <darnold@adobe.com>
293
Dave Arnoldf89396c2014-12-04 06:17:26 +0100294 [cff] Modify an FT_ASSERT.
295
296 * src/cff/cf2hints.c (cf2_hintmap_map): After the fix for Savannah
297 bug #43661, the test font `...aspartam.otf' still triggers an
298 FT_ASSERT. Since hintmap still works with count==0, ...
299 (cf2_glyphpath_lineTo, cf2_glyphpath_curveTo): ... add that term to
300 suppress the assert.
301
3022014-12-04 Dave Arnold <darnold@adobe.com>
303
Dave Arnold2cdc4562014-12-04 06:10:16 +0100304 [cff] Fix Savannah bug #43661.
305
306 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdHSTEM,
307 cf2_cmdVSTEM, cf2_cmdHINTMASK>: Don't append to stem arrays after
308 hintmask is constructed.
309
310 * src/cff/cf2hints.c (cf2_hintmap_build): Add defensive code to
311 avoid reading past end of hintmask.
312
Werner Lemberg16188eb2014-12-03 10:18:34 +01003132014-12-03 Werner Lemberg <wl@gnu.org>
314
Werner Lemberg8fa69a82014-12-03 20:07:14 +0100315 docs/CHANGES: Updated.
316
3172014-12-03 Werner Lemberg <wl@gnu.org>
318
Werner Lemberga632b5f2014-12-03 19:30:44 +0100319 [autofit] Better fix for conversion specifiers in debug messages.
320
321 Using `%ld' for pointer differences causes warnings on 32bit
322 platforms. The correct type would be (the relatively new) `%td',
323 however, this is missing on some important platforms.
324
325 This patch improves the change from 2014-11-28.
326
327 * src/autofit/afhints.c (AF_INDEX_NUM): Use `int' typecast. Our
328 pointer differences are always sufficiently small.
329 (af_glyph_hints_dump_points, af_glyph_hints_dump_segments,
330 af_glyph_hints_dump_edge): Revert to `%d' and use `AF_INDEX_NUM'.
331
3322014-12-03 Werner Lemberg <wl@gnu.org>
333
Werner Lemberg16188eb2014-12-03 10:18:34 +0100334 FT_Sfnt_Tag: s/ft_sfnt_xxx/FT_SFNT_XXX/ for orthogonality.
335
336 All public FreeType enumeration and flag values are uppercase...
337
338 * include/tttables.h (FT_Sfnt_Tag): Implement it. For backwards
339 compatilibity, retain the old values as macros.
340
341 * src/base/ftfstype.c (FT_Get_FSType_Flags), src/sfnt/sfdriver.c
342 (get_sfnt_table): Updated.
343
Werner Lemberg2af25ac2014-12-02 08:38:57 +01003442014-12-02 Werner Lemberg <wl@gnu.org>
345
Werner Lembergde43ace2014-12-02 23:06:04 +0100346 * include/*: Improve structure of documentation.
347
348 . Add and update many `<Order>' tags.
349 . Apply various documentation fixes.
350 . Remove details to deprecated (or never implemented) data.
351
3522014-12-02 Werner Lemberg <wl@gnu.org>
353
Werner Lembergca1f5cc2014-12-02 22:49:25 +0100354 [docmaker] Always handle `<Order>' section elements.
355
356 Previously, those elements were handled only for sections present in
357 a `<Sections>' chapter element.
358
359 * src/tools/docmaker/content.py (ContentProcessor::finish):
360 Implement it.
361
3622014-12-02 Werner Lemberg <wl@gnu.org>
363
Werner Lembergef6a3522014-12-02 21:16:59 +0100364 [docmaker] Properly handle empty rows in Synopsis.
365
366 * src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Emit
367 `&nbsp;' for empty fields.
368
3692014-12-02 Werner Lemberg <wl@gnu.org>
370
Werner Lemberg0e96f052014-12-02 11:08:31 +0100371 [docmaker] Thinko.
372
373 * src/tools/docmaker/content.py (DocBlock::get_markup_words_all):
374 Emit `/empty/' string for first element also.
375
3762014-12-02 Werner Lemberg <wl@gnu.org>
377
Werner Lemberg102d4a72014-12-02 10:27:40 +0100378 [docmaker] Honour empty lines in `<Order>' section element.
379
380 This greatly improves the readability of the `Synopsis' links.
381
382 * src/tools/docmaker/content.py (DocBlock::get_markup_words_all):
383 Insert string `/empty/' between items.
384
385 * src/tools/docmaker/formatter.py (Formatter::section_dump): Make it
386 robust against nonexistent keys.
387
388 * src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Emit
389 empty <td> elements for `/empty/'.
390
3912014-12-02 Werner Lemberg <wl@gnu.org>
392
Werner Lemberg2af25ac2014-12-02 08:38:57 +0100393 [docmaker] Ensure Python 3 compatibility.
394
395 * src/tools/docmaker/content.py (ContentProcessor::set_section,
396 ContentProcessor::finish): Replace `has_key' function with `in'
397 keyword.
398
399 * src/tools/docmaker/formatter.py (Formatter::__init__): Replace
400 sorting function with a key generator.
401 (Formatter::add_identifier): Replace `has_key' function with `in'
402 keyword.
403
404 * src/tools/docmaker/tohtml.py (HtmlFormatter::html_source_quote):
405 Replace `has_key' function with `in' keyword.
406 (HtmlFormatter::index_exit, HtmlFormatter::section_enter): Use
407 integer division.
408 s/<>/>/.
409
410 * src/tools/docmaker/utils.py: Import `itertools'.
411 (index_sort): Replaced by...
412 (index_key): ... this new key generator (doing exactly the same).
413
Werner Lemberg8f795112014-11-29 06:49:15 +01004142014-11-29 Werner Lemberg <wl@gnu.org>
415
Werner Lemberg80bfeb12014-12-01 10:07:52 +0100416 [docmaker] Don't output a block multiple times.
417
418 This bug was hidden by not processing all lines of `<Order>' blocks.
419
420 * src/tools/docmaker/formatter.py (Formatter::section_dump): Filter
421 out field names.
422
4232014-11-29 Werner Lemberg <wl@gnu.org>
424
Werner Lemberg0dbad762014-12-01 08:44:48 +0100425 [docmaker] Use field values as HTML link targets where possible.
426
427 * src/tools/docmaker/tohtml.py (HtmlFormatter::make_block_url):
428 Accept second, optional argument to specify a name.
429 (HtmlFormatter::html_source_quote): Link to field ID if possible.
430 (HtmlFormatter::print_html_field_list): Emit `id' attribute.
431
4322014-11-29 Werner Lemberg <wl@gnu.org>
433
Werner Lemberg785b1d02014-11-30 22:16:34 +0100434 [docmaker] Allow empty lines in `<Order>' blocks.
435
436 Before this patch, the suggested order of entries stopped at the
437 first empty line.
438
439 Obviously, nobody noticed that this problem caused a much reduced
440 set of links in the `Synopsis' sections; in particular, the
441 `<Order>' blocks contain a lot of entries that wouldn't be listed
442 otherwise...
443
444 * src/tools/docmaker/content.py (DocBlock::get_markup_words_all):
445 New function to iterate over all items.
446 (DocSection::process): Use it.
447
4482014-11-29 Werner Lemberg <wl@gnu.org>
449
Werner Lemberg16b3e622014-11-30 20:58:27 +0100450 * src/tools/docmaker/sources.py (column) [Format 2]: Fix regexp.
451
452 After the single asterisk there must be no other immediately following
453 asterisk.
454
4552014-11-29 Werner Lemberg <wl@gnu.org>
456
Werner Lemberg434bc692014-11-29 23:12:55 +0100457 * src/tools/docmaker/tohtml.py: Improve CSS for vertical spacing.
Werner Lemberg51987ea2014-11-29 22:19:29 +0100458
Werner Lemberg434bc692014-11-29 23:12:55 +01004592014-11-29 Werner Lemberg <wl@gnu.org>
460
461 [docmaker] Improve HTML code for table of contents.
462
463 * src/tools/docmaker/tohtml.py: Introduce a new table class `toc',
Werner Lemberg51987ea2014-11-29 22:19:29 +0100464 together with proper CSS.
465
4662014-11-29 Werner Lemberg <wl@gnu.org>
467
Werner Lembergaa834ce2014-11-29 20:08:29 +0100468 [docmaker] Provide higher-level markup and simplify HTML.
469
470 * src/tools/docmaker/tohtml.py: Instead of using extraneous `<div>'
471 elements, use CSS descendants (of class `section') to format the
472 data.
473
474 Also remove reduntant <p> and <br> elements, replacing them with
475 proper CSS.
476
477 Globally reduce page width to 75%.
478
479 (block_header): Rename <div> class to `section'.
480
4812014-11-29 Werner Lemberg <wl@gnu.org>
482
Werner Lemberg3bb97022014-11-29 16:12:37 +0100483 [docmaker] Add `top' links after blocks.
484
485 * src/tools/docmaker/tohtml.py (block_footer_middle): Implement it.
486
4872014-11-29 Werner Lemberg <wl@gnu.org>
488
Werner Lemberga31f9712014-11-29 07:18:44 +0100489 * src/tools/docmaker/tohtml.py: Improve CSS for fields.
490
Werner Lemberg3bb97022014-11-29 16:12:37 +0100491 Make fields align horizontally relative to full line width.
Werner Lemberga31f9712014-11-29 07:18:44 +0100492
4932014-11-29 Werner Lemberg <wl@gnu.org>
494
Werner Lemberg8f795112014-11-29 06:49:15 +0100495 * src/tools/docmaker/tohtml.py: Fix index and TOC templates.
496
497 This thinko was introduced 2014-11-27.
498
Werner Lembergba1ba0c2014-11-28 22:04:14 +01004992014-11-28 Werner Lemberg <wl@gnu.org>
500
501 [docmaker] Format field lists with CSS.
502
503 This also simplifies the inserted HTML code.
504
505 * src/tools/docmaker/tohtml.py
506 (HtmlFormatter::print_html_field_list): Do it.
507
suzuki toshiya348fffa2014-11-28 16:05:59 +09005082014-11-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
509
510 Fix compiler warning to the comparison between signed and
511 unsigned variable.
512
513 * src/pfr/pfrsbit.c (pfr_slot_load_bitmap): Fix the comparison
514 between `ypos + ysize' and FT_INT_{MAX,MIN}.
515
Werner Lembergba1ba0c2014-11-28 22:04:14 +01005162014-11-28 Werner Lemberg <wl@gnu.org>
Werner Lemberg984e0712014-11-28 05:33:58 +0100517
Werner Lembergba1ba0c2014-11-28 22:04:14 +0100518 [docmaker] Replace empty `<td>' with CSS.
Werner Lemberg46d4dc82014-11-28 05:49:56 +0100519
520 * src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Do
521 it.
522
Werner Lembergba1ba0c2014-11-28 22:04:14 +01005232014-11-28 Werner Lemberg <wl@gnu.org>
Werner Lemberg46d4dc82014-11-28 05:49:56 +0100524
Werner Lemberg984e0712014-11-28 05:33:58 +0100525 [docmaker] Replace some `<table>' tags with `<h4>' and `<div>'.
526
527 * src/tools/docmaker/tohtml.py (marker_*): Use `<h4>'.
528 (source_*): Use `<div>'.
529 (HtmlFormatter::block_enter): s/<h4>/<h3>/.
530
suzuki toshiya9ee6a0a2014-11-28 11:14:18 +09005312014-11-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
532
533 Fix compiler warning to conversion specifiers in debug messages.
534
535 * src/autofit/afhints.c (af_glyph_hints_dump_points): Add length
Werner Lemberga632b5f2014-12-03 19:30:44 +0100536 modifier to dump long integers.
537 (af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Ditto.
suzuki toshiya9ee6a0a2014-11-28 11:14:18 +0900538
Werner Lemberg26d699e2014-11-27 19:22:52 +01005392014-11-27 Werner Lemberg <wl@gnu.org>
540
Werner Lemberg984e0712014-11-28 05:33:58 +0100541 * src/tools/docmaker/tohtml.py: Use more CSS for index.
Werner Lemberg7ea36342014-11-27 19:38:31 +0100542
5432014-11-27 Werner Lemberg <wl@gnu.org>
544
Werner Lembergedcf8172014-11-27 19:28:48 +0100545 [docmaker] Replace `name' attribute of `<a>' with `id'.
546
547 * src/tools/docmaker/tohtml.py (HtmlFormatter::block_enter): Do it.
548
5492014-11-27 Werner Lemberg <wl@gnu.org>
550
Werner Lemberg26d699e2014-11-27 19:22:52 +0100551 * src/tools/docmaker/tohtml.py: Remove remaining `width' attributes.
552
553 For `Index' and `TOC' links, we now simply use the `text-align' CSS
554 property of `<td>' to enforce flush-left and flush-right,
555 eliminating the hack with an empty, full-width `<td>' element
556 inbetween.
557
558 The change also enforces the same (smaller) size for all index and
559 TOC links.
560
suzuki toshiya2676e072014-11-28 00:58:25 +09005612014-11-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
562
suzuki toshiya1b12f5d2014-11-28 01:22:26 +0900563 * src/cff/cf2font.c: Include `ftcalc.h' to use FT_MSB(),
564 cf2font.c could not find it under `make multi' build.
565
5662014-11-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
567
suzuki toshiya2676e072014-11-28 00:58:25 +0900568 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Remove
569 unrequired negative value check for `width' and `height'.
570
Werner Lemberg8585cf52014-11-27 10:49:05 +01005712014-11-27 Werner Lemberg <wl@gnu.org>
572
Werner Lembergdd3fee02014-11-27 13:20:52 +0100573 * src/tools/docmaker/tohtml.py: More HTML table refactoring.
574
575 Replace some `<table>' tags with `<div>' to simplify structure.
576
577 Move `bgcolor' attribute to CSS.
578
579 Replace most `width' attributes with CSS. The remaining instances
580 (providing a similar effect as LaTeX's `\hfill' command) are removed
581 in a later patch.
582
5832014-11-27 Werner Lemberg <wl@gnu.org>
584
Werner Lemberga5ad26a2014-11-27 10:52:24 +0100585 * src/tools/docmaker/tohtml.py: Replace <font> with CSS.
586
5872014-11-27 Werner Lemberg <wl@gnu.org>
588
Werner Lembergba67c612014-11-27 10:51:49 +0100589 * src/tools/docmaker/tohtml.py: Center <table> with CSS.
590
5912014-11-27 Werner Lemberg <wl@gnu.org>
592
Werner Lemberg5594fa52014-11-27 10:50:50 +0100593 * src/tools/docmaker/tohtml.py: Replace `<center>' with `<div>'.
594
5952014-11-27 Werner Lemberg <wl@gnu.org>
596
Werner Lemberg8585cf52014-11-27 10:49:05 +0100597 * src/tools/docmaker/tohtml.py: Remove redundant `<center>' tags.
598
599 This starts a series of commits into the direction of generating
600 valid HTML 5 code, especially using much more CSS.
601
suzuki toshiya1b057042014-11-27 17:53:20 +09006022014-11-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
603
604 Prevent too negative values (< FT_INT_MIN) in bitmap metrics,
605 suggested by Alexei.
606
607 * src/pfr/pfrsbit.c (pfr_slot_load_bitmap): Prevent too
608 negative values in `xpos' and `ypos + ysize'.
609 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Prevent
610 too negative values in `x_left' and `y_top'. Either negative
611 values in `width' and `height' are checked.
612
Werner Lemberg3d167cb2014-11-27 05:19:41 +01006132014-11-27 Werner Lemberg <wl@gnu.org>
614
Werner Lembergc52882a2014-11-27 08:01:25 +0100615 [docmaker] Produce better HTML code.
616
617 * src/tools/docmaker/tohtml.py: Always use double quotes for
618 attribute values.
619 (source_footer): Close `td' and `tr' groups.
620
6212014-11-27 Werner Lemberg <wl@gnu.org>
622
Werner Lembergdbb93152014-11-27 07:20:48 +0100623 Use better way to disable creation of .pyc files for `make refdoc'.
624
625 Python 2.6 was released in 2008...
626
627 * builds/freetype.mk (refdoc): Use python's `-B' option.
628
629 * builds/detect.mk (std_setup, dos_setup): Mention required python
630 version for `refdoc' target.
631
6322014-11-27 Werner Lemberg <wl@gnu.org>
633
Werner Lemberge8a5c332014-11-27 06:48:37 +0100634 * src/tools/docmaker/sources.py (re_bold, re_italic): Use
635 non-grouping parentheses.
636 * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word):
637 Updated.
638
6392014-11-27 Werner Lemberg <wl@gnu.org>
640
Werner Lemberg3d167cb2014-11-27 05:19:41 +0100641 * src/base/ftobjs.c (FT_Get_Glyph_Name): Fix compiler warning.
642
643 Introdruced in previous change. Reported by Alexei.
644
Werner Lemberga593a042014-11-26 18:42:48 +01006452014-11-26 Werner Lemberg <wl@gnu.org>
646
Werner Lembergf34f1922014-11-26 21:59:21 +0100647 * src/*: Add checks for parameters of API functions where missing.
648
649 `API functions' are functions tagged with `FT_EXPORT_DEF'.
650
651 Besides trivial fixes, the following changes are included, too.
652
653 * src/base/ftbdf.c (FT_Get_BDF_Charset_ID, FT_Get_BDF_Property): Set
654 error code if no service is available.
655
656 * src/base/ftinit.c (FT_Done_FreeType): Change return value for
657 invalid `library' parameter to `Invalid_Library_Handle'.
658
659 * src/base/ftobjs.c (FT_New_Size): Change return value for invalid
660 `asize' parameter to `Invalid_Argument'.
661
662 * src/base/ftoutln.c (FT_Outline_Copy): Change return value for
663 invalid `source' and `target' parameters to `Invalid_Outline'.
664 (FT_Outline_Done_Internal): Change return value for invalid
665 `outline' parameter to `Invalid_Outline'.
666
6672014-11-26 Werner Lemberg <wl@gnu.org>
668
Werner Lemberga593a042014-11-26 18:42:48 +0100669 * src/cache/ftcbasic.c: Use single calls to `FT_TRACE'.
670
suzuki toshiya5aff8532014-11-26 14:36:12 +09006712014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
672
suzuki toshiyacd4a5a22014-11-27 00:20:48 +0900673 * src/base/ftobj.c (Mac_Read_POST_Resource): Additional
674 overflow check in the summation of POST fragment lengths,
675 suggested by Mateusz Jurczyk <mjurczyk@google.com>.
676
6772014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
678
suzuki toshiya1720e812014-11-26 16:39:00 +0900679 * src/base/ftobjs.c (Mac_Read_POST_Resource): Insert comments
680 and fold too long tracing messages.
681
6822014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
683
suzuki toshiya18a8f0d2014-11-26 16:11:38 +0900684 Fix Savannah bug #43540.
685
686 * src/base/ftmac.c (parse_fond): Prevent a buffer overrun
687 caused by a font including too many (> 63) strings to store
688 names[] table.
689
6902014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
691
suzuki toshiya45331672014-11-26 16:02:17 +0900692 * src/base/ftobjs.c (Mac_Read_POST_Resource): Use unsigned long
693 variables to read the lengths in POST fragments. Suggested by
694 Mateusz Jurczyk <mjurczyk@google.com>.
695
6962014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
697
suzuki toshiya35252ae2014-11-26 15:52:23 +0900698 Fix Savannah bug #43539.
699
700 * src/base/ftobjs.c (Mac_Read_POST_Resource): Fix integer overflow
701 by a broken POST table in resource-fork.
702
7032014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
704
suzuki toshiya240c94a2014-11-26 15:43:29 +0900705 Fix Savannah bug #43538.
706
707 * src/base/ftobjs.c (Mac_Read_POST_Resource): Fix integer overflow
708 by a broken POST table in resource-fork.
709
7102014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
711
suzuki toshiya5aff8532014-11-26 14:36:12 +0900712 * src/base/ftobjs.c (Mac_Read_POST_Resource): Avoid memory leak
713 by a broken POST table in resource-fork. Return after freeing
714 the buffered POST table when it is found to be broken.
715
Werner Lemberg04edbbd2014-11-25 10:21:13 +01007162014-11-25 Werner Lemberg <wl@gnu.org>
717
Werner Lemberg02b8e7e2014-11-25 11:31:51 +0100718 */*: s/Invalid_Argument/Invalid_Size_Handle/ where appropriate.
719
7202014-11-25 Werner Lemberg <wl@gnu.org>
721
Werner Lemberg0d4aa232014-11-25 11:26:14 +0100722 */*: s/Invalid_Argument/Invalid_Stream_Handle/ where appropriate.
723
7242014-11-25 Werner Lemberg <wl@gnu.org>
725
Werner Lembergf4f9e682014-11-25 11:11:55 +0100726 */*: s/Invalid_Argument/Invalid_Library_Handle/ where appropriate.
727
7282014-11-25 Werner Lemberg <wl@gnu.org>
729
Werner Lemberg04c2aa12014-11-25 10:22:12 +0100730 */*: s/Invalid_Argument/Invalid_Outline/ where appropriate.
731
7322014-11-25 Werner Lemberg <wl@gnu.org>
733
Werner Lemberg04edbbd2014-11-25 10:21:13 +0100734 */*: s/Invalid_Argument/Invalid_Face_Handle/ where appropriate.
735
Werner Lembergeca0f062014-11-24 10:22:08 +01007362014-11-24 Werner Lemberg <wl@gnu.org>
737
Werner Lemberg3e867112014-11-25 09:01:07 +0100738 [Savannah bug #43682] Adjust some renderer callbacks.
739
740 * src/raster/ftraster.c (ft_black_set_mode): Change return type to
741 `int' to stay in sync with `FT_Renderer_SetModeFunc' prototype.
742
743 * src/smooth/ftgrays.c (gray_raster_set_mode): New dummy function
744 for orthogonality.
745 (ft_grays_raster): Use it.
746
Werner Lemberg04edbbd2014-11-25 10:21:13 +01007472014-11-25 Werner Lemberg <wl@gnu.org>
Werner Lemberg3e867112014-11-25 09:01:07 +0100748
Werner Lemberg6689a002014-11-25 08:53:09 +0100749 [Savannah bug #43682] Properly handle missing return errors.
750
751 The functions in this patch *do* return non-trivial errors that must
752 be taken care of.
753
754 * src/autofit/afloader.c (af_loader_load_g), src/base/ftobjs.c
755 (FT_Render_Glyph_Internal), src/base/ftoutln.c (FT_Outline_Render),
756 src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_endchar>,
757 src/psaux/psobjs.c (ps_parser_load_field_table), src/psaux/t1decode
758 (t1_decoder_parse_charstrings) <op_endchar>, src/truetype/ttgload.c
759 (load_truetype_glyph <subglyph loop>, tt_loader_init,
760 TT_Load_Glyph), src/truetype/ttgxvar.c (TT_Set_MM_Blend),
761 src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Do it.
762
Werner Lemberg04edbbd2014-11-25 10:21:13 +01007632014-11-25 Werner Lemberg <wl@gnu.org>
Werner Lemberg6689a002014-11-25 08:53:09 +0100764
Werner Lembergb24e8ba2014-11-25 08:30:49 +0100765 [Savannah bug #43682] Add/remove `void' casts to some functions.
766
767 We use a cast to indicate that we intentionally ignore a function's
768 return value. However, this doesn't apply to API functions where
769 errors can only happen for trivially invalid input.
770
771 * src/base/ftstroke.c (FT_Glyph_Stroke, FT_Glyph_StrokeBorder),
772 src/base/ftsynth.c (FT_GlyphSlot_Embolden), src/cff/cffgload.c
773 (cff_slot_load), src/pfr/pfrdrivr.c (pfr_get_kerning),
774 src/type1/t1load.c (parse_encoding), src/type42/t42parse.c
775 (t42_parse_encoding): Do it.
776
Werner Lemberg04edbbd2014-11-25 10:21:13 +01007772014-11-25 Werner Lemberg <wl@gnu.org>
Werner Lembergb24e8ba2014-11-25 08:30:49 +0100778
Werner Lembergef439fd2014-11-25 08:14:15 +0100779 [Savannah bug #43682] Change some signatures to `void' return type.
780
781 * include/internal/pshints.h (PSH_Globals_SetScaleFunc),
782 include/internal/sfnt.h (TT_Get_Metrics_Func),
783 src/pshinter/pshglob.c (psh_globals_set_scale),
784 src/pshinter/pshrec.c (ps_hints_init), src/sfnt/ttmtx.c
785 (tt_face_get_metrics), src/truetype/ttinterp.c (TT_Goto_CodeRange,
786 TT_Set_CodeRange, TT_Clear_CodeRange, TT_Done_Context,
787 TT_Save_Context): Do it.
788
789 * src/pshinter/pshglob.h, src/pshinter/pshrec.h, src/sfnt/ttmtx.h,
790 src/truetype/ttgload.c (TT_Hint_Glyph), src/truetype/ttinterp.c
791 (TT_Run_Context), src/truetype/ttinterp.h, src/truetype/ttobjs.c
792 (tt_size_run_fpgm, tt_size_run_prep): Updated.
793
7942014-11-24 Werner Lemberg <wl@gnu.org>
795
Werner Lemberg6889f7b2014-11-24 17:16:08 +0100796 Remove all code related to FT_MAX_CHARMAP_CACHEABLE.
797
798 This is no longer used.
799
800 * src/base/ftobjs.c, src/cache/ftccmap.c, src/cff/cffobjs.c,
801 src/sfnt/ttcmap.c: Do it.
802
8032014-11-24 Werner Lemberg <wl@gnu.org>
804
Werner Lembergf0292bb2014-11-24 10:51:21 +0100805 [sfnt] Fix Savannah bug #43680.
806
807 This adds an additional constraint to make the fix from 2013-01-25
808 really work.
809
810 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_image) <index_format==4>:
811 Check `p' before `num_glyphs'.
812
8132014-11-24 Werner Lemberg <wl@gnu.org>
814
Werner Lembergeca0f062014-11-24 10:22:08 +0100815 [truetype] Fix Savannah bug #43679.
816
817 * src/truetype/ttpload.c (tt_face_load_hdmx): Check minimum size of
818 `record_size'.
819
Jarkko Pöyry96341dc2014-11-24 09:53:07 +01008202014-11-24 Jarkko Pöyry <jarkko.poyry@gmail.com>
821
822 [cff, pfr, psaux, winfonts] Fix Savannah bug #43676.
823
Werner Lemberged6a9df2014-12-06 23:28:58 +0100824 Don't cast cmap init function pointers to an incompatible type.
Jarkko Pöyry96341dc2014-11-24 09:53:07 +0100825
826 Without this patch, the number of parameters between declaration and
827 the real signature differs. Calling such a function results in
828 undefined behavior.
829
830 ISO/IEC 9899:TC3 (Committee Draft September 7, 2007)
831 6.5.2.2 Function calls
832 9 If the function is defined with a type that is not
833 compatible with the type (of the expression) pointed to by
834 the expression that denotes the called function, the
835 behavior is undefined.
836
837 On certain platforms (c -> js with emscripten) this causes
838 termination of execution or invalid calls because in the emscripten
839 implementation, function pointers of different types are stored in
840 different pointer arrays. Incorrect pointer type here results in
841 indexing of an incorrect array.
842
843 * src/cff/cffcmap.c (cff_cmap_encoding_init, cff_cmap_unicode_init),
844 src/pfr/pfrcmap.c (pfr_cmap_init), src/psaux/t1cmap.c
845 t1_cmap_standard_init, t1_cmap_expert_init, t1_cmap_custom_init,
846 t1_cmap_unicode_init), src/winfonts/winfnt.c (fnt_cmap_init): Fix
847 signature.
848
Werner Lemberga7a42072014-11-24 06:44:45 +01008492014-11-24 Werner Lemberg <wl@gnu.org>
850
Werner Lembergf70d9342014-11-24 09:31:32 +0100851 [sfnt] Fix Savannah bug #43672.
852
853 * src/sfnt/ttkern.c (tt_face_load_kern): Use correct value for
854 minimum table length test.
855
8562014-11-24 Werner Lemberg <wl@gnu.org>
857
Werner Lemberg73be9f92014-11-24 07:30:05 +0100858 [type1, type42] Another fix for Savannah bug #43655.
859
860 * src/type1/t1load.c (parse_charstrings), src/type42/t42parse.c
861 (t42_parse_charstrings): Add another boundary testing.
862
8632014-11-24 Werner Lemberg <wl@gnu.org>
864
Werner Lemberga7a42072014-11-24 06:44:45 +0100865 [docmaker] Formatting, copyright, improved documentation.
866
867 * src/tools/docmaker/*: No code changes besides trivial
868 modifications.
869
Werner Lemberg9bd20b72014-11-22 06:24:45 +01008702014-11-22 Werner Lemberg <wl@gnu.org>
871
Werner Lembergaf834612014-11-22 13:29:10 +0100872 [bdf] Fix Savannah bug #43660.
873
874 * src/bdf/bdflib.c (_bdf_parse_glyphs) <"ENDFONT">: Check
875 `_BDF_GLYPH_BITS'.
876
8772014-11-22 Werner Lemberg <wl@gnu.org>
878
Werner Lemberg42fcd662014-11-22 12:44:33 +0100879 [type42] Allow only embedded TrueType fonts.
880
881 This is a follow-up to Savannah bug #43659.
882
883 * src/type42/t42objs.c (T42_Face_Init): Exclusively use the
884 `truetype' font driver for loading the font contained in the `sfnts'
885 array.
886
8872014-11-22 Werner Lemberg <wl@gnu.org>
888
Werner Lemberg37881872014-11-22 10:46:47 +0100889 [type42] Fix Savannah bug #43659.
890
891 * src/type42/t42objs.c (T42_Open_Face): Initialize `face->ttf_size'.
892
893 * src/type42/t42parse.c (t42_parse_sfnts): Always set
894 `face->ttf_size' directly. This ensures a correct stream size in
895 the call to `FT_Open_Face', which follows after parsing, even for
896 buggy input data.
897 Fix error messages.
898
8992014-11-22 Werner Lemberg <wl@gnu.org>
900
Werner Lemberg5f201ab2014-11-22 09:16:39 +0100901 [cff] Fix Savannah bug #43658.
902
903 * src/cff/cf2ft.c (cf2_builder_lineTo, cf2_builder_cubeTo): Handle
904 return values of point allocation routines.
905
9062014-11-22 Werner Lemberg <wl@gnu.org>
907
Werner Lemberg9bd20b72014-11-22 06:24:45 +0100908 [sfnt] Fix Savannah bug #43656.
909
910 * src/sfnt/ttcmap.c (tt_cmap4_validate): Fix order of validity
911 tests.
912
Werner Lemberg6de76172014-11-21 06:05:49 +01009132014-11-21 Werner Lemberg <wl@gnu.org>
914
Werner Lembergdd897102014-11-21 22:19:28 +0100915 [type1, type42] Fix Savannah bug #43655.
916
917 * src/type1/t1load.c (parse_charstrings), src/type42/t42parse.c
918 (t42_parse_charstrings): Fix boundary testing.
919
9202014-11-21 Werner Lemberg <wl@gnu.org>
921
Werner Lembergb1fc00d2014-11-21 12:06:40 +0100922 * src/pcf/pcfread.c (pcf_get_metrics): Sanitize invalid metrics.
923
9242014-11-21 Werner Lemberg <wl@gnu.org>
925
Werner Lemberg9154dab2014-11-21 08:03:51 +0100926 [ftlcdfil] Obey flow direction.
927
928 * src/base/ftlcdfil.c (_ft_lcd_filter_fir, _ft_lcd_filter_legacy):
929 Handle `up' flow.
930
9312014-11-21 Werner Lemberg <wl@gnu.org>
932
Werner Lemberg644d6fa2014-11-21 07:28:50 +0100933 * src/base/ftbitmap.c (FT_Bitmap_Convert): Improve.
934
935 This commit completes argument checks and adds support for different
936 flow directions.
937
9382014-11-21 Werner Lemberg <wl@gnu.org>
939
Werner Lemberg6de76172014-11-21 06:05:49 +0100940 * src/base/ftbitmap.c (FT_Bitmap_Copy): Improve.
941
942 This commit adds argument checks and support for different flow
943 directions.
944
Werner Lemberg1e6e1b82014-11-20 21:07:56 +01009452014-11-20 Werner Lemberg <wl@gnu.org>
946
947 * src/base/ftbitmap.c (FT_Bitmap_New): Check argument.
948
Werner Lembergd6061212014-11-19 21:13:23 +01009492014-11-19 Werner Lemberg <wl@gnu.org>
950
Werner Lembergb3500af2014-11-19 21:28:21 +0100951 Change some fields in `FT_Bitmap' to unsigned type.
952
953 This doesn't break ABI.
954
955 * include/ftimage.h (FT_Bitmap): Make `rows', `width', `num_grays',
956 `pixel_mode', and `palette_mode' unsigned types.
957
958 * src/base/ftbitmap.c: Updated.
959 (FT_Bitmap_Copy): Fix casts.
960
961 * src/cache/ftcsbits.c, src/raster/ftraster.c, src/sfnt/pngshim.c:
962 Updated.
963
9642014-11-19 Werner Lemberg <wl@gnu.org>
965
Werner Lembergdf485772014-11-19 21:21:23 +0100966 Make `FT_Bitmap_Convert' correctly handle negative `pitch' values.
967
968 * src/base/ftbitmap.c (FT_Bitmap_Convert): Always use positive value
969 for the pitch while copying data.
970 Correctly set pitch sign in target bitmap.
971
9722014-11-19 Werner Lemberg <wl@gnu.org>
973
Werner Lembergd6061212014-11-19 21:13:23 +0100974 Minor code improvement in `FT_Bitmap_Embolden'.
975
976 * src/base/ftbitmap.c (FT_Bitmap_Embolden) <FT_PIXEL_MODE_GRAY[24]>:
977 Fix thinko.
978
Alexei Podtelezhnikovf841ad32014-11-19 21:19:06 -05009792014-11-19 Alexei Podtelezhnikov <apodtele@gmail.com>
980
981 * src/base/fttrigon.c: Use dedicated `FT_Angle' for arctan table.
982
Werner Lemberga67c43e2014-11-19 06:46:23 +01009832014-11-19 Behdad Esfahbod <behdad@behdad.org>
984
985 Avoid compiler warnings on x86-64 for `FT_MulFix'.
986
987 `FT_MulFix' takes `FT_Long' parameters as defined in `freetype.h',
988 but several inline implementations of it in `ftcalc.h' take
989 `FT_Int32' arguments. This is causing compiler warnings on x86-64:
990 If parameters of type `FT_Fixed' (= `FT_Long') are passed to the
991 inline implementation of this function, integer values are truncated
992 from 64bit to 32bit.
993
994 * include/internal/ftcalc.h (FT_MulFix) [FT_MULFIX_ASSEMBLER]: Add
995 casts.
996
Werner Lemberg54abd222014-11-15 09:05:22 +01009972014-11-15 Werner Lemberg <wl@gnu.org>
998
999 [sfnt] Fix Savannah bug #43597.
1000
1001 * src/sfnt/pngshim.c (Load_SBit_Png): Protect against too large
1002 bitmaps.
1003
Werner Lemberg602040b2014-11-12 20:51:20 +010010042014-11-12 Werner Lemberg <wl@gnu.org>
1005
Werner Lemberg257c2702014-11-12 21:42:13 +01001006 [sfnt] Fix Savannah bug #43591.
1007
1008 * src/sfnt/ttsbit.c (tt_sbit_decoder_init): Protect against addition
1009 and multiplication overflow.
1010
10112014-11-12 Werner Lemberg <wl@gnu.org>
1012
Werner Lemberg677ddf42014-11-12 21:26:44 +01001013 [sfnt] Fix Savannah bug #43590.
1014
1015 * src/sfnt/ttload.c (check_table_dir, tt_face_load_font_dir):
1016 Protect against addition overflow.
1017
10182014-11-12 Werner Lemberg <wl@gnu.org>
1019
Werner Lembergf46add12014-11-12 21:06:08 +01001020 [sfnt] Fix Savannah bug #43589.
1021
1022 * src/sfnt/sfobjs.c (woff_open_font): Protect against addition
1023 overflow.
1024
10252014-11-12 Werner Lemberg <wl@gnu.org>
1026
Werner Lemberg602040b2014-11-12 20:51:20 +01001027 [sfnt] Fix Savannah bug #43588.
1028
1029 * src/sfnt/ttcmap.c (tt_cmap8_validate, tt_cmap10_validate,
1030 tt_cmap12_validate, tt_cmap13_validate, tt_cmap14_validate): Protect
1031 against overflow in additions and multiplications.
1032
Alexei Podtelezhnikov2e73a1b2014-11-09 23:22:43 -050010332014-11-10 Alexei Podtelezhnikov <apodtele@gmail.com>
1034
1035 [base] CORDIC improvements.
1036
1037 The scaling between the hypotenuse and its CORDIC approximation is
1038 based on regression analysis. The smaller padding for `theta' is
1039 justifed by its maximum error of less than 6.
1040
1041 * src/base/fttrigon.c (ft_trig_downscale): Borrow code from
1042 ./ftcalc.c (ft_multo64), change linear intercept.
1043 (ft_trig_pseudo_polarize): Decrease `theta' padding.
1044
Werner Lemberg0e73d212014-11-09 01:27:38 +010010452014-11-09 Werner Lemberg <wl@gnu.org>
1046
1047 * src/base/ftstroke.c (ft_stroker_inside): Fix border intersections.
1048
1049 One more place to check whether `radius' is zero.
1050
1051 Problem reported by Marco Wertz <marco.wertz@gmx.de>.
1052
Werner Lemberg2c4832d2014-11-07 07:42:33 +010010532014-11-07 Werner Lemberg <wl@gnu.org>
1054
Werner Lemberg602040b2014-11-12 20:51:20 +01001055 [bdf] Fix Savannah bug #43535.
Werner Lemberg2c4832d2014-11-07 07:42:33 +01001056
1057 * src/bdf/bdflib.c (_bdf_strncmp): New macro that checks one
1058 character more than `strncmp'.
1059 s/ft_strncmp/_bdf_strncmp/ everywhere.
1060
Werner Lembergf49a1002014-11-06 13:30:28 +010010612014-11-06 Werner Lemberg <wl@gnu.org>
1062
Werner Lemberg602040b2014-11-12 20:51:20 +01001063 [pcf] Fix Savannah bug #43548.
Werner Lembergef1eba72014-11-06 23:25:05 +01001064
Werner Lemberg2c4832d2014-11-07 07:42:33 +01001065 * src/pcf/pcfread.c (pcf_get_encodings): Add sanity checks for row
1066 and column values.
Werner Lembergef1eba72014-11-06 23:25:05 +01001067
10682014-11-06 Werner Lemberg <wl@gnu.org>
1069
Werner Lemberg602040b2014-11-12 20:51:20 +01001070 [pcf] Fix Savannah bug #43547.
Werner Lemberg0e2f5d52014-11-06 22:32:46 +01001071
1072 * src/pcf/pcfread.c (pcf_read_TOC): Check `size' and `offset'
1073 values.
1074
10752014-11-06 Werner Lemberg <wl@gnu.org>
1076
Werner Lembergf49a1002014-11-06 13:30:28 +01001077 * src/pcf/pcfread.c (pcf_read_TOC): Avoid memory leak.
1078
Infinalityfacfc792014-11-03 07:24:59 +010010792014-11-03 Infinality <infinality@infinality.net>
1080
1081 * src/truetype/ttsubpix.c (COMPATIBILITY_MODE_Rules): Updated.
1082
1083 The previous commit deteriorates rendering of DejaVu and similar
1084 fonts; this gets compensated with this rule.
1085
Werner Lemberg706f7522014-11-03 07:20:57 +010010862014-11-03 Werner Lemberg <wl@gnu.org>
1087
1088 * src/truetype/ttinterp.c (Ins_DELTAP): Fix subpixel hinting.
1089
1090 Before this patch, it was impossible to ever call DELTAP[123] in
1091 subpixel hinting mode as described in the ClearType whitepaper; it
1092 only worked if in `compatibility mode'. However, compatibility mode
1093 essentially disables SHPIX, completely ruining hinting of
1094 ttfautohint output, for example.
1095
1096 We now follow the whitepaper more closely so that DELTAP[123]
1097 instructions for touched points in the non-subpixel direction are
1098 executed.
1099
Alexei Podtelezhnikove1efe0a2014-10-31 00:07:14 -040011002014-10-31 Alexei Podtelezhnikov <apodtele@gmail.com>
1101
Alexei Podtelezhnikov525d4872014-10-31 22:12:37 -04001102 [smooth] Improve code readability.
1103
1104 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Rearrange code.
1105
11062014-10-31 Alexei Podtelezhnikov <apodtele@gmail.com>
1107
Alexei Podtelezhnikove1efe0a2014-10-31 00:07:14 -04001108 [smooth] Reduce outline translations during rendering.
1109
1110 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Translate origin
1111 virtually by modifying cbox, actually translate outline if cumulative
1112 shift is not zero.
1113
Alexei Podtelezhnikovc7fd9352014-10-30 22:43:01 -040011142014-10-30 Alexei Podtelezhnikov <apodtele@gmail.com>
1115
1116 [smooth] Fix Savannah bug #35604 (cont'd).
1117
1118 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Remove checks and
1119 casts that became unnecessary after the variable type upgrades.
1120
Alexei Podtelezhnikov74916992014-10-29 22:24:24 -040011212014-10-29 Alexei Podtelezhnikov <apodtele@gmail.com>
1122
Alexei Podtelezhnikov465ab992014-10-29 23:45:23 -04001123 [smooth] Improve code readability.
1124
1125 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Rearrange code.
1126
11272014-10-29 Alexei Podtelezhnikov <apodtele@gmail.com>
1128
Alexei Podtelezhnikov74916992014-10-29 22:24:24 -04001129 Unify hypotenuse approximations.
1130
1131 * include/internal/ftcalc.h (FT_HYPOT): Move macro from here...
1132 * include/internal/ftobjs.h: ... to here, next to required `FT_ABS'.
1133 * src/smooth/ftgrays.c (gray_render_cubic): Use it here.
1134
Werner Lembergfe151522014-10-25 05:56:59 +020011352014-10-25 Werner Lemberg <wl@gnu.org>
1136
1137 [cff] Test valid darkening parameter macros in `ftoption.h'.
1138
1139 We no longer need an otherwise unused typedef that can cause a gcc
1140 warning.
1141 Problem reported by Alexei.
1142
1143 * src/cff/cffobjs.c (cff_driver_init): Use
1144 `CFF_CONFIG_OPTION_DARKENING_PARAMETER_XXX' macros directly.
1145 (SET_DARKENING_PARAMETERS): Removed.
1146 Compile time tests are now ...
1147
1148 * devel/ftoption.h, include/config/ftoption.h: ... here.
1149
Alexei Podtelezhnikovaba0f492014-10-24 23:50:57 -040011502014-10-25 Alexei Podtelezhnikov <apodtele@gmail.com>
1151
1152 Improve flat corner definition.
1153
1154 * include/internal/ftcalc.h (FT_HYPOT): Macro to approximate Euclidean
1155 distance with the alpha max plus beta min algorithm.
1156 * src/base/ftcalc.c (ft_corner_is_flat): Use it instead of Taxicab
1157 metric.
1158
David Weißdd8de1a2014-10-23 20:01:48 +020011592014-10-23 David Weiß <David.Weiss@ptvgroup.com>
1160
1161 [build] Improve property file for vc2010.
1162
1163 User-defined properties should be empty by default to prevent linker
1164 failures.
1165
1166 * builds/windows/vc2010/freetype.user.props,
1167 builds/windows/vc2010/freetype.vcxproj:
1168 s/OptionsDirectory/UserOptionDirectory/.
1169 Comment out all user options.
1170
Werner Lembergdd570e92014-10-23 19:57:37 +020011712014-10-23 Werner Lemberg <wl@gnu.org>
1172
1173 [cff] Work around bug in preprocessor of MSVC 2010.
1174
1175 We have been hit by
1176
1177 https://connect.microsoft.com/VisualStudio/feedback/details/718976/msvc-pr
1178
1179 * devel/ftoption.h, include/config/ftoption.h: Replace
1180 `CFF_CONFIG_OPTION_DARKENING_PARAMETERS' with eight macros
1181 `CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4}'.
1182
1183 * src/cff/cffobjs.c (SET_DARKENING_PARAMETERS): Removed. We no
1184 longer need double expansion.
1185 (SET_DARKENING_PARAMETERS_0): Renamed to ...
1186 (SET_DARKENING_PARAMETERS): ... this.
1187 Update call.
1188
Werner Lembergcc7bb802014-10-20 08:35:50 +020011892014-10-20 Werner Lemberg <wl@gnu.org>
1190
1191 [sbit] Minor fixes.
1192
1193 * src/sfnt/ttsbit.c (tt_face_load_sbit) [TT_SBIT_TABLE_TYPE_SBIX]:
1194 Accept overlay format also, but emit warning message in that case.
1195 (tt_sbit_decoder_load_metrics): Add missing newline to error
1196 message.
1197 (tt_sbit_load_sbix_image): Add `rgbl' graphic type (as used on iOS
1198 7.1) to the list of unsupported formats.
1199
Alexei Podtelezhnikov118e6512014-10-19 23:31:08 -040012002014-10-19 Alexei Podtelezhnikov <apodtele@gmail.com>
1201
1202 [truetype] Clean up bytecode rounding.
1203
1204 Zero distance does not have to be treated specially if you follow
1205 specifications and check the sign as the very last step of rounding.
1206
1207 * src/truetype/ttinterp.c (Round_None, Round_To_Grid,
1208 Round_Down_To_Grid, Round_Up_To_Grid, Round_To_Double_Grid): Use
1209 macros when available, do not check for non-zero distance.
1210 (Round_To_Half_Grid, Round_Super, Round_Super_45): Ditto, return phase
1211 if sign changed.
1212
Alexei Podtelezhnikovd4aabda2014-10-18 10:10:04 -040012132014-10-18 Alexei Podtelezhnikov <apodtele@gmail.com>
1214
1215 [truetype] Unwrap engine compensation settings.
1216
1217 * src/truetype/ttobjs.c (tt_size_init_bytecode): Updated.
1218
David Weißfede19e2014-10-18 14:59:20 +020012192014-10-18 David Weiß <David.Weiss@ptvgroup.com>
1220
1221 [build] Add property file to vc2010 project.
1222
1223 This simplifies custom build configurations, especially for
1224 automated build environments.
1225
1226 * builds/windows/vc2010/freetype.user.props: New configuration file.
1227
1228 * builds/windows/vc2010/freetype.vcxproj: Include
1229 `freetype.user.props' and use its data fields.
1230
1231 * builds/windows/vc2010/index.html: Updated.
1232
Werner Lembergc9c33f22014-10-18 11:01:14 +020012332014-10-18 Werner Lemberg <wl@gnu.org>
1234
1235 [autofit] Add blue-zone support for Telugu.
1236
1237 This essentially moves the Telugu script from the `Indic' hinter to
1238 the `Latin' hinter.
1239
1240 Note that this is a first shot and quite certainly needs
1241 refinements.
1242
1243 * src/autofit/afblue.dat: Add blue zone data for Telugu.
1244
1245 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1246
1247 * src/autofit/afscript.h: Add Telugu standard characters and move
1248 data out of AF_CONFIG_OPTION_INDIC block.
1249
1250 * src/autofit/afranges.c: Move Telugu data out of
1251 AF_CONFIG_OPTION_INDIC block.
1252
1253 * src/autofit/afstyles.h: Update Telugu data; in particular, use
1254 AF_WRITING_SYSTEM_LATIN.
1255
Werner Lemberg54306f52014-10-18 10:42:28 +020012562014-10-18 David Wimsey <david@wimsey.us>
1257
1258 [cmake] Add iOS build support.
Werner Lemberg1050aa92014-10-18 10:45:09 +02001259 From Savannah patch #8497.
Werner Lemberg54306f52014-10-18 10:42:28 +02001260
1261 * builds/cmake/iOS.cmake: New file. Universal binaries are built
1262 with both 32 and 64 bit arm architectures.
1263
1264 * CMakeLists.txt (IOS_PLATFORM): New variable for running the iOS
1265 toolchain. Possible values are `OS' to build on iOS, or
1266 `SIMULATOR' to build on APPLE.
1267
Werner Lemberg1a1750f2014-10-16 22:54:01 +020012682014-10-16 Behdad Esfahbod <behdad@behdad.org>
1269 Werner Lemberg <wl@gnu.org>
1270
1271 [cff] Add `CFF_CONFIG_OPTION_DARKENING_PARAMETERS' config macro.
1272
1273 * devel/ftoption.h, include/config/ftoption.h
1274 (CFF_CONFIG_OPTION_DARKENING_PARAMETERS): New macro.
1275
1276 * src/cff/cffobjs.c (SET_DARKENING_PARAMETERS,
1277 SET_DARKENING_PARAMETERS_0): New macros.
1278 (cff_driver_init): Use new macros.
1279
Alexei Podtelezhnikov7e83f062014-10-14 23:03:56 -040012802014-10-14 Alexei Podtelezhnikov <apodtele@gmail.com>
1281
1282 [truetype] Limit delta shift range.
1283
Werner Lembergdf3d67e2014-10-16 07:24:44 +02001284 The valid range for delta shift is zero through six. Negative values
1285 are invalid according to
1286
Alexei Podtelezhnikov7e83f062014-10-14 23:03:56 -04001287 https://developer.apple.com/fonts/TrueType-Reference-Manual/RM04/Chap4.html#delta%20shift
1288
1289 * src/truetype/ttobjs.h (delta_shift, delta_base): Make unsigned.
Werner Lembergdf3d67e2014-10-16 07:24:44 +02001290 * src/truetype/ttinterp.h (DO_SDS): Throw an error if `delta_shift'
1291 is out of range.
1292 (Ins_DELTAP, Ins_DELTAC): Optimize for valid `delta_shift'.
Alexei Podtelezhnikov7e83f062014-10-14 23:03:56 -04001293
Werner Lemberg03987bf2014-10-16 07:19:46 +020012942014-10-16 Werner Lemberg <wl@gnu.org>
1295
1296 A better fix for Savannah bug #43392.
1297 Suggested by Doug Felt <dougfelt@gmail.com>.
1298
Werner Lembergdf3d67e2014-10-16 07:24:44 +02001299 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics): Set
Werner Lemberg03987bf2014-10-16 07:19:46 +02001300 `vertAdvance' to zero...
1301
1302 * src/truetype/ttgload.c (TT_Load_Glyph): ... and set here a default
1303 value for `vertAdvance' based on `linearVertAdvance' in case
1304 `vertAdvance' is zero. Note that the previous computed ad-hoc value
1305 for `linearVertAdvance' was apparently not tested in a real-life
1306 situation.
1307
David Weiß3889cb22014-10-14 11:35:16 +020013082014-10-14 David Weiß <David.Weiss@ptvgroup.com>
1309
1310 [build] Better optimization settings for vc2010 solution file.
1311
1312 * builds/windows/vc2010/freetype.sln,
1313 builds/windows/vc2010/freetype.vcxproj: Updated.
1314
Werner Lemberg8f178092014-10-14 08:28:09 +020013152014-10-14 Werner Lemberg <wl@gnu.org>
1316
1317 [autofit] Adjust Devenagari character range.
1318
1319 * src/autofit/afranges.c (af_deva_uniranges): Omit characters that
1320 are common to all other Indic scripts.
1321
Werner Lemberg1ca5fa12014-10-12 08:31:32 +020013222014-10-12 Werner Lemberg <wl@gnu.org>
1323
1324 [sfnt] Fix Savannah bug #43392.
1325
1326 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics): Don't let
1327 vertical metrics uninitialized.
1328
Alexei Podtelezhnikov673a28e2014-10-11 14:40:51 -040013292014-10-11 Alexei Podtelezhnikov <apodtele@gmail.com>
1330
1331 [base] Small bbox correction.
1332
1333 * src/base/ftbbox.c (FT_Outline_Get_BBox): Start from nonsense bbox
Werner Lembergdf3d67e2014-10-16 07:24:44 +02001334 instead of initial point that could be `off' in conic outlines.
Alexei Podtelezhnikov673a28e2014-10-11 14:40:51 -04001335
Alexei Podtelezhnikov2ffcf172014-10-08 22:01:08 -040013362014-10-08 Alexei Podtelezhnikov <apodtele@gmail.com>
1337
Alexei Podtelezhnikov40dac112014-10-09 00:58:14 -04001338 [base] Fix Savannah bug #43356.
1339
1340 * src/base/ftbbox.c (BBox_Move_To, BBox_Conic_To): Update bbox in case
Werner Lembergdf3d67e2014-10-16 07:24:44 +02001341 of implicit `to'.
Alexei Podtelezhnikov40dac112014-10-09 00:58:14 -04001342 (BBox_Line_To): New emitter that does not update bbox.
1343
13442014-10-08 Alexei Podtelezhnikov <apodtele@gmail.com>
1345
Alexei Podtelezhnikov2ffcf172014-10-08 22:01:08 -04001346 [base] Introduce and use new macro `FT_UPDATE_BBOX'
1347
1348 * src/base/ftbbox.c (FT_UPDATE_BBOX): New macro.
1349 (FT_Outline_Get_BBox): Use it here.
1350
Alexei Podtelezhnikov7abdb8c2014-10-02 23:13:33 -040013512014-10-02 Alexei Podtelezhnikov <apodtele@gmail.com>
1352
1353 [base] Significant optimization of `ft_div64by32'
1354
1355 We shift as many bits as we can into the high register, perform
1356 32-bit division with modulo there, then work through the remaining
1357 bits with long division. This optimization is especially noticeable
1358 for smaller dividends that barely use the high register.
1359
1360 * src/base/ftcalc.c (ft_div64by32): Updated.
1361
Dave Arnold537c55d2014-10-02 06:32:32 +020013622014-10-02 Dave Arnold <darnold@adobe.com>
1363
1364 [cff] Fix Savannah bug #43271.
1365
1366 * src/cff/cf2font.c (cf2_computeDarkening): Change overflow
1367 detection to use logarithms and clamp `scaledStem'.
1368
Alexei Podtelezhnikov418e18f2014-10-01 22:36:40 -040013692014-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
1370
Alexei Podtelezhnikov74d0aad2014-10-01 23:27:15 -04001371 * src/base/ftcalc.c: Remove miscellaneous type casts.
1372
13732014-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
1374
Alexei Podtelezhnikov418e18f2014-10-01 22:36:40 -04001375 [base] Use more common `FT_MSB' implementation with masks.
1376
1377 * src/base/ftcalc.c (FT_MSB): Updated.
1378
Alexei Podtelezhnikov955aff12014-09-30 23:09:39 -040013792014-09-30 Alexei Podtelezhnikov <apodtele@gmail.com>
1380
1381 [base] Clean up.
1382
1383 * src/base/ftcalc.c (FT_MOVE_SIGN): New macro for frequently used
1384 code.
1385
Alexei Podtelezhnikov7f491112014-09-25 22:54:38 -040013862014-09-25 Alexei Podtelezhnikov <apodtele@gmail.com>
1387
1388 [base] Avoid unnecessary long division.
1389
1390 This applies to `FT_MulDiv' but not to `FT_DivFix', where overflows or
1391 lack thereof are predicted accurately.
1392
1393 * src/base/ftcalc.c (ft_div64by32): Improve readability.
1394 (FT_MulDiv, FT_MulDiv_No_Round) [!FT_LONG64]: Use straight division
1395 when multiplication stayed within 32 bits.
1396
Werner Lemberg5b68e4f2014-09-24 19:06:13 +020013972014-09-24 Werner Lemberg <wl@gnu.org>
1398
1399 [autofit] Minor clean-ups.
1400
1401 * src/autofit/afhints.c (AF_FLAGS): Remove obsolete values.
1402
1403 * src/autofit/afhints.c (af_glyph_hints_dump_points,
1404 af_glyph_hints_align_strong_points): Updated.
1405
1406 * src/autofit/aflatin.c (af_latin_hints_link_segments,
1407 af_latin_hints_compute_segments), src/autofit/afcjk.c
1408 (af_cjk_hints_link_segments), src/autofit/aflatin2.c
1409 (af_latin2_hints_link_segments, af_latin2_hints_compute_segments):
1410 There are no longer fake segments since more than 10 years...
1411
Werner Lemberg387a9fe2014-09-22 06:42:24 +020014122014-09-22 Werner Lemberg <wl@gnu.org>
1413
1414 [autofit] Minor code streamlining.
1415
1416 * src/autofit/afhints.c (af_axis_hints_new_edge): Remove redundant
1417 initialization.
1418
Alexei Podtelezhnikov5c894842014-09-19 22:03:15 -040014192014-09-19 Alexei Podtelezhnikov <apodtele@gmail.com>
1420
1421 * src/base/ftcalc.c: Harmonize code.
1422
14232014-09-15 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikovbc12d9e2014-09-08 21:27:43 -04001424
Alexei Podtelezhnikovef070d42014-09-15 22:06:19 -04001425 [base] Tighten the overflow check in `FT_MulDiv'.
1426
1427 * src/base/ftcalc.c (FT_MulDiv) [!FT_LONG64]: Updated.
1428
14292014-09-08 Alexei Podtelezhnikov <apodtele@gmail.com>
1430
Alexei Podtelezhnikovbc12d9e2014-09-08 21:27:43 -04001431 Fix Savannah bug #43153.
1432
1433 * src/psaux/psconv.c (PS_Conv_ToFixed): Add protection against
Alexei Podtelezhnikov7abdb8c2014-10-02 23:13:33 -04001434 overflow in `divider'.
Alexei Podtelezhnikovbc12d9e2014-09-08 21:27:43 -04001435
Alexei Podtelezhnikov32128522014-09-03 21:57:42 -040014362014-09-03 Alexei Podtelezhnikov <apodtele@gmail.com>
1437
Alexei Podtelezhnikov336735d2014-09-03 22:55:26 -04001438 [base] Tighten the overflow check in `FT_DivFix'.
1439
1440 This fixes a 13-year old bug. The original overflow check should have
1441 been updated when rounding was introduced into this function
1442 (c2cd00443b).
1443
1444 * src/base/ftcalc.c (FT_DivFix) [!FT_LONG64]: Updated.
1445 * include/freetype.h (FT_DivFix): Updated documentation.
1446
14472014-09-03 Alexei Podtelezhnikov <apodtele@gmail.com>
1448
Alexei Podtelezhnikov32128522014-09-03 21:57:42 -04001449 [base] Tighten the overflow check in `FT_MulFix'.
1450
1451 * src/base/ftcalc.c (FT_MulFix) [!FT_LONG64]: Updated.
1452
Alexei Podtelezhnikov125c3ca2014-09-02 22:38:59 -040014532014-09-02 Alexei Podtelezhnikov <apodtele@gmail.com>
1454
1455 [truetype] Shortcut ppem calculations for square pixels.
1456
1457 * src/truetype/ttinterp.h (TT_ExecContextRec): New field
1458 `cur_ppem_func' with a function pointer.
1459 * src/truetype/ttinterp.c (TT_RunIns): Initialize `cur_ppem_func'
1460 depending on the pixel geometry to either...
1461 (Current_Ppem_Stretched): ... this for stretched pixels.
1462 (Current_Ppem): ... or this for square pixels.
1463 (DO_MPPEM, DO_MPS, Ins_DELTAP, Ins_DELTAC): Use `cur_ppem_func'.
1464
Behdad Esfahbod1ec98b22014-08-31 08:47:11 +020014652014-08-31 Behdad Esfahbod <behdad@behdad.org>
1466
1467 Don't use `register' keyword. Fixes compiler warnings.
1468
1469 * src/base/ftcalc.c (FT_Add64) [!FT_LONG64]: Do it.
1470 * src/gzip/inftrees.c (huft_build): Ditto.
1471 * src/truetype/ttinterp.c (TT_MulFix14_arm): Ditto.
1472
Alexei Podtelezhnikova8bc49e2014-08-24 22:14:01 -040014732014-08-24 Alexei Podtelezhnikov <apodtele@gmail.com>
1474
Alexei Podtelezhnikov125c3ca2014-09-02 22:38:59 -04001475 [truetype] Optimize DELTAP and DELTAC.
Alexei Podtelezhnikova8bc49e2014-08-24 22:14:01 -04001476
1477 * src/truetype/ttinterp.c (Ins_DELTAP, Ins_DELTAC): Move ppem
1478 calculations outside of the loop.
1479
Alexei Podtelezhnikov98688592014-08-21 23:28:52 -040014802014-08-21 Alexei Podtelezhnikov <apodtele@gmail.com>
1481
1482 Fix Savannah bug #43033.
1483
1484 * include/config/ftconfig.h, builds/unix/ftconfig.in,
1485 builds/vms/ftconfig.h [FT_LONG64]: Do not disable the macro when
1486 64-bit type is `long'.
1487
Alexei Podtelezhnikov8fd87d42014-08-20 00:57:22 -040014882014-08-20 Alexei Podtelezhnikov <apodtele@gmail.com>
1489
1490 [base] Small optimization of `FT_MulFix'.
1491
1492 * src/base/ftcalc.c (FT_MulFix): Loosen up the condition for direct
1493 32-bit calculations.
1494
Alexei Podtelezhnikovf09326a2014-08-20 00:08:38 -040014952014-08-19 Alexei Podtelezhnikov <apodtele@gmail.com>
1496
1497 [base] Use unsigned calculation in `FT_MulDiv'.
1498
1499 * src/base/ftcalc.c (FT_MulDiv): Updated to expand 32-bit range.
1500
Alexei Podtelezhnikov382f3152014-08-18 23:16:15 -040015012014-08-18 Alexei Podtelezhnikov <apodtele@gmail.com>
1502
1503 [base] Remove truncation in `FT_DivFix'.
1504
1505 * src/base/ftcalc.c (FT_DivFix): Updated.
1506
Alexei Podtelezhnikov5ef20232014-08-14 23:21:46 -040015072014-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
1508
1509 Minor refactoring.
1510
1511 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round): Updated.
1512
15132014-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikovc7022462014-08-14 23:01:01 -04001514
1515 Turn FT_MSB into a macro when using gcc builtins.
1516
1517 * src/base/ftcalc.c, include/internal/ftcalc.h: Updated.
1518
Alexei Podtelezhnikovf8efbcf2014-08-12 23:22:17 -040015192014-08-12 Alexei Podtelezhnikov <apodtele@gmail.com>
1520
1521 [base] Avoid undefined FT_MSB in `BBox_Cubic_Check'.
1522
1523 * src/base/ftbbox.c (BBox_Cubic_Check): Update.
1524 (update_cubic_max): Repalce with...
1525 (cubic_peak): ... this, which now handles upscaling.
1526
Alexei Podtelezhnikov47289932014-08-11 23:39:34 -040015272014-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
1528
Alexei Podtelezhnikov28018d42014-08-12 00:26:16 -04001529 [base] Handle collapsed outlines to avoid undefined FT_MSB.
1530
1531 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Update.
1532
15332014-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
1534
Alexei Podtelezhnikov47289932014-08-11 23:39:34 -04001535 [base] Restore FT_MulFix inlining.
1536
1537 * include/freetype.h (FT_MulFix): Unconditionally defined.
1538
1539 * src/base/ftcalc.c [FT_MULFIX_ASSEMBLER]: Move code from here...
1540
1541 * include/internal/ftcalc.h [FT_MULFIX_ASSEMBLER]: ... to here,
1542 which conditionally replaces the function with an inline version
1543 through the macro.
1544
Alexei Podtelezhnikov90be4b62014-08-08 22:27:10 -040015452014-08-08 Alexei Podtelezhnikov <apodtele@gmail.com>
1546
1547 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Refactor.
1548
Werner Lembergd17cabf2014-07-26 09:53:50 +090015492014-07-26 Werner Lemberg <wl@gnu.org>
1550
1551 [cff] Fix typo.
1552
1553 * src/cff/cf2hints.c (cf2_glyphpath_computeOffset): Use correct
1554 offsets in third quadrant.
1555
1556 Reported by maks <maksqwe1@ukr.net>.
1557
Werner Lemberg4e754132014-07-17 17:34:49 +090015582014-07-17 Werner Lemberg <wl@gnu.org>
1559
1560 Fix Savannah bug #42788.
1561
1562 * src/pfr/pfrobjs.c: Include `ftcalc.h'.
1563
Alexei Podtelezhnikovc0a6f202014-07-16 22:05:56 -040015642014-07-16 Alexei Podtelezhnikov <apodtele@gmail.com>
1565
1566 Replace `ft_highpow2' function.
1567
1568 * src/pfr/pfrobjs.c (pfr_face_get_kerning): Use `FT_MSB' instead of
1569 `ft_highpow2'.
1570
1571 * src/base/ftutil.c, include/internal/ftobjs.h (ft_highpow2): Remove
1572 it.
1573
Alexei Podtelezhnikov71330ce2014-07-15 23:30:45 -040015742014-07-15 Alexei Podtelezhnikov <apodtele@gmail.com>
1575
Werner Lembergcbbf26b2014-07-17 17:27:12 +09001576 * src/base/ftcalc.c (FT_MSB): Utilize gcc builtins.
Alexei Podtelezhnikov177982e2014-07-15 23:54:34 -04001577
15782014-07-15 Alexei Podtelezhnikov <apodtele@gmail.com>
1579
Alexei Podtelezhnikov71330ce2014-07-15 23:30:45 -04001580 [base] Move assembler code back in the source file.
1581
1582 FT_MulFix assembler used to reside in ftcalc.c before f47d263f1b.
1583
1584 * include/config/ftconfig.h, builds/unix/ftconfig.in,
1585 builds/vms/ftconfig.h [FT_MULFIX_ASSEMBLER]: Move code from here...
1586
1587 * src/base/ftcalc.c [FT_MULFIX_ASSEMBLER]: ... to here.
1588
15892014-07-14 Alexei Podtelezhnikov <apodtele@gmail.com>
Alexei Podtelezhnikov1183cd42014-07-14 22:30:55 -04001590
1591 [base] Further clean up color bitmap conversion.
1592
1593 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Stop
1594 using FT_MulFix and FT_DivFix since all calculations fit into 32 bits.
1595
Werner Lemberg441b3f32014-07-13 02:28:14 +090015962014-07-13 Werner Lemberg <wl@gnu.org>
1597
1598 [truetype] Improve handling of buggy `prep' tables.
1599
1600 In case of an error in the `prep' table, no longer try to execute it
1601 again and again. This makes FreeType handle endless loops in buggy
1602 fonts much faster.
1603
1604 * src/truetype/ttobjs.h (TT_SizeRec): The fields `bytecode_ready'
1605 and `cvt_ready' are now negative if not initialized yet, otherwise
1606 they indicate the error code of the last run.
1607
1608 * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep,
1609 tt_size_done_bytecode, tt_size_init_bytecode,
1610 tt_size_ready_bytecode, tt_size_init, tt_size_done, tt_size_reset):
1611 Updated.
1612
1613 * src/truetype/ttgload.c (tt_loader_init): Updated.
1614 * src/truetype/ttinterp.c (TT_RunIns): Force reexecution of `fpgm'
1615 and `prep' only if we are in the `glyf' table.
1616
Werner Lemberge98e2bc2014-07-12 16:37:39 +090016172014-07-12 Werner Lemberg <wl@gnu.org>
1618
1619 * builds/vms/ftconfig.h: Synchronize.
1620 Problem reported by Alexei.
1621
Alexei Podtelezhnikov35576bf2014-07-11 22:40:34 -040016222014-07-11 Alexei Podtelezhnikov <apodtele@gmail.com>
1623
1624 [base] Clean up bitmap conversion.
1625
1626 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Use
1627 appropriate FT_DivFix and remove superfluous upscaling.
1628
Alexei Podtelezhnikovceab95a2014-07-04 23:01:32 -040016292014-07-04 Alexei Podtelezhnikov <apodtele@gmail.com>
1630
1631 [base] Small optimization of the ancient code.
1632
1633 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round): Loosen up the
1634 condition for direct 32-bit calculations.
1635
Werner Lemberg38975562014-06-27 06:55:56 +020016362014-06-27 Werner Lemberg <wl@gnu.org>
1637
1638 Fix Apple standard glyph names.
1639
1640 * src/sfnt/ttpost.c (tt_post_default_names): Synchronize with
1641 `tools/glnames.py'
1642
1643 Problem reported by Adam Twardoch <adam@fontlab.com>.
1644
Werner Lembergcf2347c2014-06-17 09:01:04 +020016452014-06-17 Werner Lemberg <wl@gnu.org>
1646
Werner Lemberg231171f2014-06-17 09:14:32 +02001647 Partially revert commit from 2014-06-13.
1648
1649 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Move
1650 declaration of `p_first' and `p_last' out of the loop.
1651
16522014-06-17 Werner Lemberg <wl@gnu.org>
1653
Werner Lembergcf2347c2014-06-17 09:01:04 +02001654 * builds/unix/freetype2.m4: s/AC_PATH_PROG/AC_PATH_TOOL/.
1655
1656 This simplifies cross-compiling.
1657
Werner Lemberg6497b9c2014-06-13 09:28:00 +020016582014-06-13 Werner Lemberg <wl@gnu.org>
1659
Werner Lemberge5c0fff2014-06-13 14:01:20 +02001660 Fix more compiler warnings.
1661 Reported by Wojciech Mamrak <wmamrak@gmail.com>.
1662
1663 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
1664 Make integer constant unsigned.
1665
1666 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
1667 <TT_SBIT_TABLE_TYPE_SBIX>: Fix types.
1668 (tt_sbit_decoder_load_compound, tt_face_load_sbix_image): Add proper
1669 casts.
1670
16712014-06-13 Werner Lemberg <wl@gnu.org>
1672
Werner Lemberg6497b9c2014-06-13 09:28:00 +02001673 Fix compiler warnings.
1674 Reported by Wojciech Mamrak <wmamrak@gmail.com>.
1675
1676 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage),
Werner Lembergcbbf26b2014-07-17 17:27:12 +09001677 src/autofit/afmodule.c (af_property_set): Fix `signed' vs.
Werner Lemberg6497b9c2014-06-13 09:28:00 +02001678 `unsigned' issues.
1679
1680 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Make compiler
1681 happy.
1682
1683 * src/base/ftlcdfil.c (_ft_lcd_filter_fir): Use only four elements
1684 for `fir'.
1685 Fix `signed' vs. `unsigned' issues.
1686
1687 * src/sfnt/sfobjs.c (WRITE_BYTE): Removed, unused.
1688 (WRITE_USHORT, WRITE_ULONG): Add proper casts.
1689
1690 * src/truetype/ttgload.c (TT_Get_VMetrics): Add proper casts.
1691
1692 * src/truetype/ttinterp.c (Ins_DELTAP): Add proper casts for `B1'
1693 and `B2'.
1694
Alexey Petruchik02f21702014-05-16 08:09:43 +020016952014-05-16 Alexey Petruchik <alexey.petruchik@gmail.com>
1696
1697 [cmake] Add option to build OS X framework.
1698
1699 * CMakeLists.txt: Update accordingly.
1700
1701 * builds/mac/freetype-Info.plist: New file.
1702
Pavel Koshevoy15da66a2014-05-13 07:33:48 +020017032014-05-13 Pavel Koshevoy <pkoshevoy@gmail.com>
1704
1705 * CMakeLists.txt (BASE_SRCS): Add missing `ftbdf.c'.
1706
Werner Lemberg07e7b8a2014-05-11 08:00:25 +020017072014-05-11 Werner Lemberg <wl@gnu.org>
1708
Werner Lembergfaa21472014-05-11 12:44:00 +02001709 [autofit] Fix variable initializations.
1710
1711 * src/autofit/afhints.c (af_glyph_hints_reload): Assign default
1712 values to `in_dir' and `out_dir' for all points.
1713
17142014-05-11 Werner Lemberg <wl@gnu.org>
1715
Werner Lemberg07e7b8a2014-05-11 08:00:25 +02001716 [autofit] Fix crash with font `CabinSketch-Bold.ttf'.
1717
1718 Problem reported by Ralf S. Engelschall <rse@engelschall.com>.
1719
1720 * src/autofit/afhints.c (af_glyph_hints_reload): Fix threshold for
1721 finding first non-near point.
1722 Properly initialize non-near point deltas.
1723
Werner Lemberg63bef9a2014-05-01 07:16:05 +020017242014-05-01 Werner Lemberg <wl@gnu.org>
1725
Werner Lembergc576bb02014-05-01 17:24:19 +02001726 [autofit] Add blue-zone support for Devanagari.
1727
1728 This essentially moves the Devanagari script from the `Indic' hinter
1729 to the `Latin' hinter. Thanks to Girish Dalvi
1730 <girish.dalvi@gmail.com> for guidance with blue zone characters!
1731
1732 * src/autofit/afblue.dat: Add blue zone data for Devanagari.
1733
1734 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1735
1736 * src/autofit/afscript.h: Add Devanagari standard characters and
1737 move data out of AF_CONFIG_OPTION_INDIC block.
1738
1739 * src/autofit/afranges.c: Move Devanagari data out of
1740 AF_CONFIG_OPTION_INDIC block.
1741 Move U+20B9, (new) Rupee sign, from Latin to Devanagari.
1742
1743 * src/autofit/afstyles.h: Update Devanagari data; in particular, use
1744 AF_WRITING_SYSTEM_LATIN.
1745
17462014-05-01 Werner Lemberg <wl@gnu.org>
1747
Werner Lemberg63bef9a2014-05-01 07:16:05 +02001748 [autofit] Fix handling of neutral blue zones in stems.
1749
1750 * src/autofit/afhints.h (AF_Edge_Flags): New value
1751 `AF_EDGE_NEUTRAL'.
1752
1753 * src/autofit/aflatin.c (af_latin_hints_compute_blue_edges): Trace
1754 neutral blue zones with AF_EDGE_NEUTRAL.
1755 (af_latin_hint_edges): Skip neutral blue zones if necessary.
1756
Werner Lembergccfc4b42014-04-28 21:13:14 +020017572014-04-28 Werner Lemberg <wl@gnu.org>
1758
1759 [autofit] Introduce neutral blue zones to the latin module.
1760
1761 Such blue zones match either the top or the bottom of a contour. We
1762 need them for scripts where accent-like elements directly touch the
1763 base character (for example, some vowel signs in Devanagari, cf.
1764 U+0913 or U+0914).
1765
1766 * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_NEUTRAL): New
1767 property.
1768
1769 * src/autofit/afblue.h: Regenerated.
1770
1771 * src/autofit/aflatin.h (AF_LATIN_IS_NEUTRAL_BLUE): New macro.
1772 (AF_LATIN_BLUE_NEUTRAL): New enumeration value.
1773
1774 * src/autofit/aflatin.c (af_latin_metrics_init_blues,
1775 af_latin_hints_compute_blue_edges): Handle neutral blue zones.
1776
Werner Lembergabb3fca2014-04-25 22:13:32 +020017772014-04-25 Werner Lemberg <wl@gnu.org>
1778
1779 * src/autofit/hbshim.c: Partially revert commit from 2014-04-17.
1780
1781 Using input glyph coverage data is simply wrong.
1782
1783 Problem reported by Nikolaus Waxweiler <madigens@gmail.com> and
1784 Mantas MikulÄ—nas <grawity@gmail.com>.
1785
Werner Lembergf1936372014-04-23 08:22:33 +020017862014-04-23 Werner Lemberg <wl@gnu.org>
1787
1788 * src/raster/ftraster.c (Vertical_Sweep_Span): Use drop-out mode.
1789
1790 This spot has been missed while introducing support for various
1791 drop-out modes years ago (including no drop-out mode, which this
1792 commit fixes).
1793
1794 Problem reported by Patrick Thomas <pthomas505@gmail.com>.
1795
Werner Lembergd9b44702014-04-22 07:33:07 +020017962014-04-22 Werner Lemberg <wl@gnu.org>
1797
1798 * src/sfnt/pngshim.c (error_callback): s/longjmp/ft_longjmp/.
1799
Werner Lemberg98e510e2014-04-20 22:11:27 +020018002014-04-20 Werner Lemberg <wl@gnu.org>
1801
1802 [autofit] Fix Savannah bug #42148.
1803
1804 The adaptation of the cjk auto-hinter module to blue stringsets in
1805 2013-08-25 had three severe bugs. Mea culpa.
1806
1807 1. Contrary to the latin auto-hinter, characters for reference and
1808 overshoot values of a blue zone are specified separately. Due to
1809 the screwed-up change it didn't work at all.
1810
1811 2. A boolean comparison was erroneously replaced with a cast,
1812 causing invalid results with the `^' operator later on. The
1813 visual artifact caused by this problem is the topic of the bug
1814 report.
1815
1816 3. Two flag values were inverted, causing incorrect assignment of
1817 reference and overshoot values.
1818
1819 * src/autofit/afblue.dat: Fix CJK bluestrings, introducing a new
1820 syntax to have both reference and overshoot characters in a single
1821 string. This is error #1.
1822 Add extensive comments.
1823
1824 * src/autofit/afblue.hin (AF_BLUE_PROPERTY_CJK_FILL): Removed, no
1825 longer used.
Werner Lembergccfc4b42014-04-28 21:13:14 +02001826 (AF_BLUE_PROPERTY_CJK_TOP, AF_BLUE_PROPERTY_CJK_HORIZ): Fix values.
Werner Lemberg98e510e2014-04-20 22:11:27 +02001827 This is error #3.
1828
1829 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1830
1831 * src/autofit/afcjk.c (af_cjk_metrics_init_blues): Correct error #1.
1832 Use character `|' to separate characters for reference and overshoot
1833 values.
1834 Improve tracing messages, synchronizing them with the latin
1835 auto-hinter.
Werner Lembergccfc4b42014-04-28 21:13:14 +02001836 (af_cjk_hints_compute_blue_edges): Fix value of `is_top_right_blue'.
Werner Lemberg98e510e2014-04-20 22:11:27 +02001837 This is error #2.
1838 (af_cjk_align_linked_edge): Add tracing message.
1839
1840 * src/autofit/afcjk.h (AF_CJK_IS_FILLED_BLUE): Removed, no longer
1841 used.
1842
Werner Lembergbbd83132014-04-17 01:24:36 +020018432014-04-17 Werner Lemberg <wl@gnu.org>
1844
Werner Lemberg8c7fb782014-04-17 15:53:25 +02001845 [autofit] More coverage fixes for complex scripts.
1846
1847 * src/autofit/hbshim.c (af_get_coverage): Merge input glyph coverage
1848 of GSUB lookups into output coverage. Otherwise, ligatures are not
1849 handled properly.
1850 Don't check blue zone characters for default coverage.
1851
18522014-04-17 Werner Lemberg <wl@gnu.org>
1853
Werner Lembergbbd83132014-04-17 01:24:36 +02001854 Make `FT_Get_SubGlyph_Info' actually work.
1855
1856 * src/base/ftobjs.c (FT_Get_SubGlyph_Info): Return FT_Err_Ok
1857 if there is no error.
1858
Werner Lemberg181fd072014-04-15 16:47:05 +020018592014-04-15 Werner Lemberg <wl@gnu.org>
1860
1861 [afblue.pl]: Minor improvements.
1862
1863 * src/tools/afblue.pl: Allow whitespace before comments.
1864 Ignore whitespace in strings.
1865
Werner Lemberg8b1f2a62014-04-14 07:58:19 +020018662014-04-14 Werner Lemberg <wl@gnu.org>
1867
1868 [autofit] Improve coverage handling.
1869
1870 * src/autofit/hbshim.c (af_get_coverage): Don't exclude glyphs
1871 appearing in the GPOS table if we are processing the default
1872 coverage.
1873
David Weber76307872014-04-13 15:41:13 +020018742014-04-13 David Weber <weber.aulendorf@googlemail.com>
1875
1876 [smooth] Fix stand-alone compilation.
1877
1878 * src/smooth/ftgrays.c (FT_BEGIN_STMNT, FT_END_STMNT): Define.
1879
Werner Lemberg8a94b1e2014-04-12 20:44:33 +020018802014-04-12 Werner Lemberg <wl@gnu.org>
1881
1882 [autofit] Redesign the recognition algorithm of strong points.
1883
1884 In particular, local extrema without horizontal or vertical segments
1885 are better recognized:
1886
1887 + A + D
1888 \ /
1889 \ /
1890 \ /
1891 \ /
1892 \ + C
1893 \ /
1894 B +/
1895
1896 If the distances AB and CD are large, point B wasn't previously
1897 detected as an extremum since the `ft_corner_is_flat' function
1898 `swallowed' BC regardless of its direction, tagging point B as weak.
1899 The next iteration started at B and made `ft_corner_is_flat' swallow
1900 point C, tagging it as weak also, et voilà.
1901
1902 To improve that, another pass gets now performed before calling
1903 `ft_corner_is_flat' to improve the `topology' of an outline: A
1904 sequence of non-horizontal or non-vertical vectors that point into
1905 the same quadrant are handled as a single, large vector.
1906
1907 Additionally, distances of near points are now accumulated, which
1908 makes the auto-hinter handle them as if they were prepended to the
1909 next non-near vector.
1910
1911 This generally improves the auto-hinter's rendering results.
1912
1913 * src/autofit/afhints.c (af_glyph_hints_reload): Implement it.
1914
1915 * src/autofit/afhints.h (AF_FLAGS): Remove no longer used flag
1916 `AF_FLAG_NEAR'.
1917
Werner Lemberg71f53e12014-04-05 16:27:19 +020019182014-04-05 Werner Lemberg <wl@gnu.org>
1919
1920 [autofit] Improve scoring algorithm for identifying stems.
1921
1922 Problem reported by Karsten Lücke <karsten.luecke@kltf.de>.
1923
1924 The new algorithm takes care of the width of stems: If the distance
1925 between two segments is larger than the largest stem width, the
1926 demerits quickly increase for larger distances. This improves
1927 hinting of slanted fonts (especially if the inner parts of serifs
1928 have non-horizontal `shoulders'), avoiding false stem links.
1929
1930 * src/autofit/aflatin.c (af_latin_hints_link_segments): Use largest
1931 stem width (if available) to compute better demerits for distances
1932 between stems.
1933 (af_latin_hints_detect_features): Pass stem width array and array
1934 size.
1935 (af_latin_metrics_init_widths): Updated to use original algorithm.
1936 (af_latin_hints_apply): Updated to use new algorithm.
1937
1938 * src/autofit/aflatin.h: Updated.
1939 * src/autofit/afcjk.c: Updated.
1940
Werner Lembergf8555b52014-04-03 05:45:38 +020019412014-04-03 Werner Lemberg <wl@gnu.org>
1942
1943 Don't require `gzip' module for `sfnt'.
1944
1945 Reported by Preet <prismatic.project@gmail.com>.
1946
1947 * src/sfnt/sfobjs.c (woff_open_font): Guard use of
1948 FT_Gzip_Uncompress with FT_CONFIG_OPTION_USE_ZLIB.
1949
Werner Lembergf41070f2014-03-27 17:38:23 +010019502014-03-27 Werner Lemberg <wl@gnu.org>
1951
1952 Fix Savannah bug #38235.
1953
1954 Work around a bug in pkg-config version 0.28 and earlier: If a
1955 variable value gets surrounded by doublequotes (in particular values
1956 for the `prefix' variable), the prefix override mechanism fails.
1957
1958 * builds/unix/freetype2.in: Don't use doublequotes.
1959 * builds/unix/unix-def.in (freetype.pc): Escape spaces in directory
1960 names with backslashes.
1961
Werner Lembergab76d972014-03-24 19:45:03 +010019622014-03-24 Werner Lemberg <wl@gnu.org>
1963
1964 Fix Savannah bug #41946.
1965
1966 Based on a patch from Marek Kašík <mkasik@redhat.com>.
1967
1968 * builds/unix/configure.raw (LIBS_CONFIG): Remove.
1969 * builds/unix/freetype-config.in (libs): Hard-code value.
1970 * builds/unix/unix-def.in: Updated.
1971
Werner Lembergd5159922014-03-22 06:20:54 +010019722014-03-22 Werner Lemberg <wl@gnu.org>
1973
1974 Another revert for the change from 2014-03-18.
1975
1976 Problem reported by Nikolaus Waxweiler <madigens@gmail.com>.
1977
1978 * src/base/ftcalc.c (FT_MulFix): Ensure that an `FT_MulFix' symbol
1979 gets always exported.
1980
Werner Lembergf0c471a2014-03-20 07:13:12 +010019812014-03-20 Werner Lemberg <wl@gnu.org>
1982
1983 CMakeLists.txt: Another fix for include directories.
1984
1985 Problem reported by Taylor Holberton <taylorcholberton@gmail.com>.
1986
Werner Lembergcc7cf2c2014-03-19 07:35:35 +010019872014-03-19 Werner Lemberg <wl@gnu.org>
1988
Werner Lemberg606c74f2014-03-19 23:46:42 +01001989 CMakeLists.txt: Fix include directories.
1990
1991 Problem reported by Taylor Holberton <taylorcholberton@gmail.com>.
1992
19932014-03-19 Werner Lemberg <wl@gnu.org>
1994
Werner Lembergcc7cf2c2014-03-19 07:35:35 +01001995 Partially revert last commit.
1996
1997 Found by Alexei.
1998
1999 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Initializing
2000 those variables is plain wrong, since we are in a loop.
2001
Sean McBride87628722014-03-18 08:39:35 +010020022014-03-18 Sean McBride <sean@rogue-research.com>
2003 Werner Lemberg <wl@gnu.org>
2004
2005 Fix clang warnings.
2006
2007 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Initialize
2008 some variables.
2009
2010 * src/base/ftcalc.c (FT_MulFix): Only use code if
2011 `FT_MULFIX_INLINED' is not defined.
2012
2013 * src/bdf/bdfdrivr.c (bdf_cmap_class), src/cache/ftcbasic.c
2014 (ftc_basic_image_family_class, ftc_basic_image_cache_class,
2015 ftc_basic_sbit_family_class, ftc_basic_sbit_cache_class),
2016 src/cache/ftccmap.c (ftc_cmap_cache_class), src/cache/ftcmanag.c
2017 (ftc_size_list_class, ftc_face_list_class), src/pcf/pcfdrivr.c
2018 (pcf_cmap_class), src/pfr/pfrdrivr.c (pfr_metrics_service_rec): Make
2019 function static.
2020
2021 * src/type1/t1driver.c (t1_ps_get_font_value): Remove redundant
2022 code.
2023
Werner Lemberg23367ff2014-03-17 07:33:14 +010020242014-03-17 Werner Lemberg <wl@gnu.org>
2025
2026 Fix Savannah bug #41869.
2027
2028 This works around a problem with HarfBuzz (<= 0.9.26), which doesn't
2029 validate glyph indices returned by
2030 `hb_ot_layout_lookup_collect_glyphs'.
2031
2032 * src/autofit/hbshim.c (af_get_coverage): Guard `idx'.
2033
2034 * docs/CHANGES: Updated.
2035
Werner Lemberg03181682014-03-14 08:06:06 +010020362014-03-14 Werner Lemberg <wl@gnu.org>
2037
2038 * builds/unix/configure.raw: Don't show error messages of `which'.
2039
Alan Coopersmithed372b72014-03-09 06:14:12 +010020402014-03-09 Alan Coopersmith <alan.coopersmith@oracle.com>
2041
2042 Fix cppcheck 1.64 warning.
2043
2044 * src/autofit/afglobal.c (af_face_globals_new): Catch NULL pointer
2045 dereference in case of error.
2046
Werner Lemberg1a69dc72014-03-09 06:06:58 +010020472014-03-09 Sean McBride <sean@rogue-research.com>
2048
2049 * src/sfnt/ttcmap.c (tt_face_build_cmaps): Remove clang warning.
2050
Werner Lemberg05565362014-03-06 18:56:58 +010020512014-03-06 Werner Lemberg <wl@gnu.org>
2052
Werner Lembergec8853c2014-03-06 19:13:45 +01002053 * Version 2.5.3 released.
2054 =========================
2055
2056
2057 Tag sources with `VER-2-5-3'.
2058
2059 * docs/VERSION.DLL: Update documentation and bump version number to
2060 2.5.3.
2061
2062 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
2063 builds/windows/vc2005/index.html,
2064 builds/windows/vc2008/freetype.vcproj,
2065 builds/windows/vc2008/index.html,
2066 builds/windows/vc2010/freetype.vcxproj,
2067 builds/windows/vc2010/index.html,
2068 builds/windows/visualc/freetype.dsp,
2069 builds/windows/visualc/freetype.vcproj,
2070 builds/windows/visualc/index.html,
2071 builds/windows/visualce/freetype.dsp,
2072 builds/windows/visualce/freetype.vcproj,
2073 builds/windows/visualce/index.html,
2074 builds/wince/vc2005-ce/freetype.vcproj,
2075 builds/wince/vc2005-ce/index.html,
2076 builds/wince/vc2008-ce/freetype.vcproj,
2077 builds/wince/vc2008-ce/index.html: s/2.5.2/2.5.3/, s/252/253/.
2078
2079 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
2080
2081 * builds/unix/configure.raw (version_info): Set to 17:2:11.
2082 * CMakeLists.txt (VERSION_PATCH): Set to 3.
2083 * docs/CHANGES: Updated.
2084
20852014-03-06 Werner Lemberg <wl@gnu.org>
2086
Werner Lemberg05565362014-03-06 18:56:58 +01002087 Fixes for compilation with C++.
2088
2089 * src/autofit/hbshim.c (scripts): Change type to `hb_script_t'.
2090 (af_get_coverage): Updated.
2091 (COVERAGE): Add cast.
2092
Sean McBrideb24e8d32014-03-06 14:54:22 +010020932014-03-06 Sean McBride <sean@rogue-research.com>
2094
2095 Remove more clang analyzer warnings.
2096
2097 * src/bdf/bdflib.c (_bdf_readstream), src/truetype/ttgload.c
2098 (TT_Load_Glyph): Remove dead stores.
2099
Werner Lemberga32758f2014-03-05 08:02:46 +010021002014-03-05 Werner Lemberg <wl@gnu.org>
2101
2102 * builds/unix/configure.raw: Simplify.
2103
suzuki toshiya382f3ef2014-03-05 10:19:15 +090021042014-03-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2105
2106 Fix a bug in configure in library dependency setting
Werner Lemberga32758f2014-03-05 08:02:46 +01002107 Reported in https://bugs.freedesktop.org/show_bug.cgi?id=75652.
suzuki toshiya382f3ef2014-03-05 10:19:15 +09002108
2109 * builds/unix/configure.raw: Use `x"${xxx}" != xno' style.
2110
Werner Lembergf48f7dc2014-03-04 04:40:07 +010021112014-03-04 Werner Lemberg <wl@gnu.org>
2112
2113 Minor fix for `make devel'.
2114
2115 * builds/freetype.mk (INCLUDE_FLAGS) [DEVEL_DIR]: Don't use
2116 pkg-config for bzip2 since not all GNU/Linux distributions have
2117 `bzip2.pc' (and the header file `bzlib.h' is located in /usr/include
2118 normally).
2119
Werner Lemberg7ac76b52014-03-04 04:29:17 +010021202014-03-04 Sean McBride <sean@rogue-research.com>
2121
2122 Fix several clang static analyzer dead store warnings.
2123
2124 * src/autofit/afhints.c (af_glyph_hints_reload,
2125 af_glyph_hints_align_weak_points): Remove unnecessary assignments.
2126
2127 * src/bdf/bdflib.c (bdf_font_load): Ditto.
2128
2129 * src/pshinter/pshalgo.c (psh_glyph_compute_extrema,
2130 psh_glyph_interpolate_other_points): Ditto.
2131
2132 * src/type1/t1load.c (T1_Set_MM_Blend): Ditto.
2133
Werner Lemberg93ebcbd2014-03-03 07:13:45 +010021342014-03-03 Werner Lemberg <wl@gnu.org>
2135
2136 Rewrite library option handling in `configure'.
2137
2138 o Introduce `auto' value for `--with-XXX' library options; this is
2139 now the default.
2140
2141 o First use `pkg-config' for library detection, then fall back to
2142 other tests.
2143
2144 * builds/unix/configure.raw (--with-zlib, --with-bzip2, --with-png,
2145 --with-harfbuzz): Rewrite.
2146 Use new `xxx_reqpriv', `xxx_libpriv', and `xxx_libstaticconf'
2147 variables to collect data for `freetype2.pc' and `freetype-config'.
2148 (FT2_EXTRA_LIBS): Renamed to ...
2149 (ft2_extra_libs): This since it gets no longer substituted.
2150 (REQUIRES_PRIVATE, LIBS_PRIVATE, LIBS_CONFIG, LIBSSTATIC_CONFIG):
2151 New output variables, replacing `XXX_PKG' and `LIBXXX'.
2152 Add notice at the end of `configure' showing the library
2153 configuration.
2154
2155 * builds/unix/freetype-config.in (--static): New command line
2156 option.
2157 (libs): Updated.
2158 (staticlibs): New variable, to be used if `--static' is given.
Werner Lemberg8fa69a82014-12-03 20:07:14 +01002159 * docs/freetype-config.1: Document `--static'.
Werner Lemberg93ebcbd2014-03-03 07:13:45 +01002160
2161 * builds/unix/freetype2.in, builds/unix/unix-def.in: Updated.
2162
Werner Lemberg86026a42014-03-01 06:57:19 +010021632014-03-01 Werner Lemberg <wl@gnu.org>
2164
Werner Lemberge962a912014-03-01 21:00:02 +01002165 Avoid `long long' warnings with older gcc compilers.
2166 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
2167
2168 * builds/unix/configure.raw: Don't use gcc's `-pedantic' flag for
2169 versions < 4.6. This is especially needed for Max OS X since this
2170 OS runs a gcc variant (or emulation) based on version 4.2.1.
2171
21722014-03-01 Werner Lemberg <wl@gnu.org>
2173
Werner Lemberg6030a9f2014-03-01 14:01:12 +01002174 * docs/INSTALL.CROSS: Revised and updated.
2175
21762014-03-01 Werner Lemberg <wl@gnu.org>
2177
Werner Lemberg646db052014-03-01 12:48:07 +01002178 Make `make clean' remove `freetype2.pc'.
2179
2180 This is a generated file at build time, not configure time.
2181
2182 * builds/unix/unix-def.in (DISTCLEAN): Move `freetype2.pc' to ...
2183 (CLEAN): This variable.
2184
21852014-03-01 Werner Lemberg <wl@gnu.org>
2186
Werner Lemberg00c79ed2014-03-01 12:32:20 +01002187 Use pkg-config for detecting libpng and libbz2 also.
2188
2189 * builds/unix/configure.raw (HAVE_PKG): New variable.
2190 Search for libbz2 using `pkg-config'; s/BZ2/BZIP2/.
2191 Search for libpng using `pkg-config'.
2192 Fix definition of `LIBHARFBUZZ' variable.
2193 * builds/unix/freetype-config.in ($libs): Updated.
2194 * builds/unix/freetype2.in: Add `URL' field.
2195 Update `Requires.private' and `Libs.private'.
2196 * builds/unix/unix-def.in: Updated.
2197
21982014-03-01 Werner Lemberg <wl@gnu.org>
2199
Werner Lemberg86026a42014-03-01 06:57:19 +01002200 Add configure support for HarfBuzz.
2201
2202 * builds/unix/pkg.m4: New file.
2203 * builds/unix/configure.raw: Search for libharfbuzz using
2204 `pkg-config'.
2205 Add `--without-harfbuzz' option.
2206 * builds/unix/freetype-config.in, builds/unix/freetype2.in,
2207 builds/unix/unix-def.in (freetype-config, freetype2.pc): Handle
2208 HarfBuzz.
2209
2210 * docs/INSTALL.UNIX: Document interdependency of Freetype with
2211 HarfBuzz.
2212
Alexei Podtelezhnikov6adda682014-02-28 09:24:26 +010022132014-02-28 Alexei Podtelezhnikov <apodtele@gmail.com>
2214
2215 [cff] Math simplifications.
2216
2217 * src/cf2blues.c (cf2_blues_init): Use `FT_MulDiv'.
2218 * src/cf2ft.c (cf2_getScaleAndHintFlag): Use simple division.
2219
Dave Arnold0eae6eb2014-02-28 07:40:01 +010022202014-02-28 Dave Arnold <darnold@adobe.com>
2221
Dave Arnold135c3fa2014-02-28 07:42:42 +01002222 [cff] Fix Savannah bug #41697, part 2.
2223
2224 * src/cff/cf2ft.c (cf2_initLocalRegionBuffer,
2225 cf2_initGlobalRegionBuffer): It is possible for a charstring to call
2226 a subroutine if no subroutines exist. This is an error but should
2227 not trigger an assert. Split the assert to account for this.
2228
22292014-02-28 Dave Arnold <darnold@adobe.com>
2230
Dave Arnold0eae6eb2014-02-28 07:40:01 +01002231 [cff] Fix Savannah bug #41697, part 1.
2232
2233 * src/cff/cf2hints.c (cf2_hintmap_build): Return when `hintMask' is
2234 invalid. In this case, it is not safe to use the length of
2235 `hStemHintArray'; the exception has already been recorded in
2236 `hintMask'.
2237
Werner Lembergeee4ff82014-02-26 18:12:36 +010022382014-02-26 Werner Lemberg <wl@gnu.org>
2239
Werner Lemberga2b5f662014-02-26 19:50:18 +01002240 [sfnt] Fix Savannah bug #41696.
2241
2242 * src/sfnt/ttcmap.c (tt_cmap0_validate, tt_cmap2_validate,
2243 tt_cmap4_validate, tt_cmap14_validate): Fix limit tests.
2244
22452014-02-26 Werner Lemberg <wl@gnu.org>
2246
Werner Lembergeee4ff82014-02-26 18:12:36 +01002247 [winfnt] Fix Savannah bug #41694.
2248
2249 * src/winfonts/winfnt.c (FNT_Load_Glyph): Check glyph offset.
2250
22512014-02-26 Werner Lemberg <wl@gnu.org>
Werner Lemberg9a567642014-02-26 13:08:07 +01002252
Werner Lemberg08c628d2014-02-26 14:18:03 +01002253 [cff] Fix Savannah bug #41693.
2254
2255 * src/cff/cffload.c (CFF_Load_FD_Select): Reject empty array.
2256
Werner Lembergeee4ff82014-02-26 18:12:36 +010022572014-02-26 Werner Lemberg <wl@gnu.org>
Werner Lemberg08c628d2014-02-26 14:18:03 +01002258
Werner Lemberg9a567642014-02-26 13:08:07 +01002259 [bdf] Fix Savannah bug #41692.
2260
2261 bdflib puts data from the input stream into a buffer in chunks of
2262 1024 bytes. The data itself gets then parsed line by line, simply
2263 increasing the current pointer into the buffer; if the search for
2264 the final newline character exceeds the buffer size, more data gets
2265 read.
2266
2267 However, in case the current line's end is very near to the buffer
2268 end, and the keyword to compare with is longer than the current
2269 line's length, an out-of-bounds read might happen since `memcmp'
2270 doesn't stop properly at the string end.
2271
2272 * src/bdf/bdflib.c: s/ft_memcmp/ft_strncmp/ to make comparisons
2273 stop at string ends.
2274
suzuki toshiya91c7a972014-02-17 16:38:31 +090022752014-02-17 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2276
2277 [autofit] Fix `make multi' compilation.
2278
suzuki toshiyacc9a0c22014-02-17 16:43:54 +09002279 * src/autofit/hbshim.c: Include `afglobal.h' and `aftypes.h'.
suzuki toshiya91c7a972014-02-17 16:38:31 +09002280
Werner Lemberg6b290fd2014-02-19 09:26:54 +010022812014-02-19 Werner Lemberg <wl@gnu.org>
2282 Simon Bünzli <zeniko@gmail.com>
2283
2284 Fix Savannah bug #32902.
2285
2286 Patch taken from
2287
2288 https://code.google.com/p/sumatrapdf/source/browse/trunk/ext/_patches/freetype2.patch?spec=svn8620&r=8620#87
2289
2290 with slight modifications.
2291
2292 * src/type1/t1parse.c (T1_Get_Private_Dict): Add heuristic test to
2293 handle fonts that incorrectly use \r at the beginning of an eexec
2294 block.
2295
Simon Bünzlidf14e6c2014-02-19 08:42:52 +010022962014-02-19 Simon Bünzli <zeniko@gmail.com>
2297
2298 Fix Savannah bug #41590.
2299
2300 * src/type1/t1load.c (parse_encoding): Protect against invalid
2301 number.
2302
Dave Arnold89a94d42014-02-12 23:45:47 +010023032014-02-12 Dave Arnold <darnold@adobe.com>
2304
2305 [cff] Optimize by using `FT_MulDiv'.
2306 Suggested by Alexei.
2307
2308 * src/cff/cf2font.c (cf2_computeDarkening): Do it.
2309
Werner Lemberg85ee27a2014-02-12 23:27:41 +010023102014-02-12 Werner Lemberg <wl@gnu.org>
2311
2312 Fix Savannah bug #41465.
2313
2314 * builds/unix/unix-def.in (CLEAN): Add `freetype-config'.
2315 (DISTCLEAN): Remove `freetype-config'.
2316
Sean McBride7be2a942014-02-08 13:55:38 +010023172014-02-08 Sean McBride <sean@rogue-research.com>
2318
2319 Fix clang static analyzer and compiler warnings.
2320
2321 * src/autofit/afhints.c (af_glyph_hints_align_weak_points),
2322 src/autofit/afloader (af_loader_load_g) <FT_GLYPH_FORMAT_COMPOSITE>,
2323 src/base/ftcalc.c (FT_MSB), src/base/ftoutln.c
2324 (FT_Outline_Decompose), src/bdf/bdfdrivr.c (bdf_interpret_style),
2325 src/cff/cffparse.c (cff_parse_integer), src/cid/cidparse.c
2326 (cid_parser_new), src/pfr/pfrload.c (pfr_phy_font_load),
2327 src/raster/ftraster.c (Decompose_Curve), src/sfnt/sfdriver.c
2328 (sfnt_get_ps_name), src/sfnt/ttcmap.c (tt_cmap12_next,
2329 tt_cmap13_next), src/smooth/ftgrays.c (gray_hline): Remove dead
2330 code.
2331
2332 * src/autofit/afmodule.c (af_property_get_face_globals,
2333 af_property_set, af_property_get), src/base/ftbitmap.c
2334 (ft_gray_for_premultiplied_srgb_bgra): Make functions static.
2335
2336 * src/base/ftobjs.c (ft_remove_renderer): Protect against
2337 library == NULL.
2338 (ft_property_do): Make function static.
2339
2340 * src/base/ftrfork.c: Include `ftbase.h'.
2341
2342 * src/sfnt/ttsbit.c (tt_face_load_sbix_image)
2343 [!FT_CONFIG_OPTION_USE_PNG], src/type1/t1gload.c
2344 (T1_Compute_Max_Advance): Avoid compiler warning.
2345
2346 * src/truetype/ttinterp.c (TT_New_Context): Reduce scope of
2347 variable.
2348
Werner Lembergab98c5e2014-02-08 11:34:33 +010023492014-02-08 Werner Lemberg <wl@gnu.org>
2350
2351 Fix Windows build directories.
2352
2353 The build target is now `windows' instead of `win32'.
2354
2355 Problem reported by Nickolas George <darknova.clan@gmail.com>.
2356
2357 * builds/modules.mk: Don't use `win32' and `win16' (!) but
2358 `windows'.
2359
2360 * builds/windows/detect.mk, builds/windows/win32-def.mk:
2361 s/win32/windows/.
2362
Eugen Sawina8ceae42014-02-08 06:30:06 +010023632014-02-08 Eugen Sawin <esawin@mozilla.com>
2364
2365 Fix Savannah bug #41507.
2366
2367 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap)
2368 [!FT_CONFIG_OPTION_USE_PNG] <17, 17, 19>: Fix error handling.
2369
Dave Arnold355b3592014-02-08 06:23:04 +010023702014-02-08 Dave Arnold <darnold@adobe.com>
2371
2372 [cff] Fix minor performance bug.
2373
2374 * src/cff/cf2font.c (cf2_font_setup): Darkening amount and blue zone
2375 calculations are now cached and not recomputed on each glyph.
2376
Werner Lemberg6dce1362014-02-05 15:40:47 +010023772014-02-05 Werner Lemberg <wl@gnu.org>
2378
2379 Fix problems with perl 5.8.8 as distributed with current MinGW.
2380
2381 * src/tools/afblue.pl: Work-around for Perl bug #63402.
2382 (string_re): Avoid `possessive quantifiers', which have been
2383 introduced in Perl version 5.10.
2384
Werner Lemberga8772912014-02-04 11:36:08 +010023852014-02-04 Werner Lemberg <wl@gnu.org>
2386
Werner Lembergd87f9a62014-02-04 16:14:09 +01002387 Fix compilation with MinGW.
2388
2389 Right now, compilation out of the box with latest MinGW is broken
2390 due to bugs in header files of mingwrt 4.0.3 in strict ANSI mode,
2391 cf.
2392
2393 https://sourceforge.net/p/mingw/bugs/2024/
2394 https://sourceforge.net/p/mingw/bugs/2046/
2395
2396 * builds/unix/configure.raw: Don't set `-ansi' flag for MinGW.
2397
23982014-02-04 Werner Lemberg <wl@gnu.org>
2399
Werner Lemberga8772912014-02-04 11:36:08 +01002400 [autofit] Minor fix.
2401
2402 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
2403 src/autofit/aflatin.c (af_latin_metrics_init_widths): Fix handling
2404 of alternative standard characters.
2405 This also fixes a compilation warning in non-debug mode.
2406
Werner Lembergee3778d2014-02-03 11:16:47 +010024072014-02-03 Werner Lemberg <wl@gnu.org>
2408
2409 [cff] Fix Savannah bug #41363.
2410
2411 * src/cff/cf2ft.c (cf2_checkTransform): Convert assertion into
2412 parameter check.
2413 (cf2_decoder_parse_charstrings): Call `cf2_checkTransform' only if
2414 we are scaling the outline.
2415 (cf2_getPpemY): Remove problematic assertion.
2416
Werner Lemberga3364002014-01-26 09:45:23 +010024172014-01-26 Werner Lemberg <wl@gnu.org>
2418
2419 [autofit] Introduce two more slots for standard characters.
2420
2421 This is useful for OpenType features like `c2sc' (caps to small
2422 caps) that don't have lowercase letters by definition, or other
2423 features that mainly operate on numerals.
2424
2425 * src/autofit/afscript.h: Add more standard characters.
2426
2427 * src/autofit/aftypes.h: Update use of `SCRIPT' macro.
2428 (AF_ScriptClassRec): Add members to hold two more standard
2429 characters.
2430 (AF_DEFINE_SCRIPT_CLASS): Updated.
2431
2432 * src/autofit/afglobal.c, src/autofit/afglobal.h,
2433 * src/autofit/afpic.c, src/autofit/afranges.h, src/autofit/hbshim.c:
2434 Update use of `SCRIPT' macro.
2435
2436 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
2437 src/autofit/aflatin.c (af_latin_metrics_init_widths): Scan two more
2438 standard characters.
2439
Werner Lembergeb7691c2014-01-24 19:04:22 +010024402014-01-24 Werner Lemberg <wl@gnu.org>
2441
2442 Fix Savannah bug #41320.
2443
2444 * src/autofit/aflatin.c (af_latin_metrics_init_blues)
2445 <AF_LATIN_IS_LONG_BLUE>: Avoid negative index of `last'.
2446
Werner Lemberg8b281f82014-01-23 08:14:53 +010024472014-01-23 Werner Lemberg <wl@gnu.org>
2448
Werner Lemberg752f3912014-01-23 09:14:25 +01002449 Fix Savannah bug #41310.
2450
2451 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap) <glyph_format==5>:
2452 Don't check metrics, which this format doesn't have.
2453 This is another correction to the commit from 2013-11-21.
2454
24552014-01-23 Werner Lemberg <wl@gnu.org>
2456
Werner Lemberg8b281f82014-01-23 08:14:53 +01002457 Fix Savannah bug #41309.
2458
2459 * src/type1/t1load.c (t1_parse_font_matrix): Properly handle result
2460 of `T1_ToFixedArray'.
2461
2462 * src/cid/cidload.c (cid_parse_font_matrix): Synchronize with
2463 `t1_parse_font_matrix'.
2464
2465 * src/type42/t42parse.c (t42_parse_font_matrix): Synchronize with
2466 `t1_parse_font_matrix'.
2467 (t42_parse_encoding): Synchronize with `t1_parse_encoding'.
2468
2469 * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_BBOX>,
2470 <T1_FIELD_TYPE_MMOX>: Properly handle result of `ps_tofixedarray'.
2471
Werner Lembergff8dc312014-01-22 09:19:57 +010024722014-01-22 Werner Lemberg <wl@gnu.org>
2473
2474 * src/autofit/hbshim.c (af_get_coverage): Fix memory leaks.
2475
Werner Lemberg6a700782014-01-16 08:55:40 +010024762014-01-16 Werner Lemberg <wl@gnu.org>
2477
2478 [autofit] Improve tracing of style coverages.
2479
2480 * include/internal/fttrace.h: Add `afglobal' for tracing style
2481 coverages.
2482
2483 * src/autofit/afglobal.c: Include FT_INTERNAL_DEBUG_H.
2484 (FT_COMPONENT): Define.
2485 (af_face_globals_compute_style_coverage): Trace `gstyles' array
2486 data.
2487
Werner Lemberg7cbfdff2014-01-09 07:26:06 +010024882014-01-09 Werner Lemberg <wl@gnu.org>
2489
2490 Fix Savannah bug #41158.
2491
2492 * builds/unix/install.mk (install): Create man page directory.
2493
Chongyu Zhu94c66942014-01-08 08:52:59 +010024942014-01-08 Chongyu Zhu <lembacon@gmail.com>
2495
2496 [arm] Fix Savannah bug #41138, part 2.
2497
2498 * builds/unix/ftconfig.in (FT_MulFix_arm), include/config/ftconfig.h
2499 (FT_MulFix_arm), src/truetype/ttinterp.c (TT_MulFix14_arm): Fix
2500 preprocessor conditionals for `add.w'.
2501
Werner Lembergc46fa862014-01-08 08:45:40 +010025022014-01-08 Werner Lemberg <wl@gnu.org>
2503
2504 [autofit] Fix Savannah bug #41138, part 1.
2505
2506 * src/tools/afblue.pl <Handling #endif>: Produce correct auxiliary
2507 enumeration names for generated `#else'.
2508
2509 * src/autofit/afblue.h: Regenerated.
2510
Werner Lemberg3e5a3742014-01-06 07:53:10 +010025112014-01-06 Werner Lemberg <wl@gnu.org>
2512
2513 Add manual page for `freetype-config'.
2514 Contributed by Nis Martensen <nis.martensen@web.de>.
2515
2516 * docs/freetype-config.1: New file.
2517
2518 * builds/unix/unix-def.in (mandir): Define.
2519 * builds/unix/install.mk (install, uninstall): Handle manpage.
2520
Werner Lemberg991cbcc2014-01-05 13:24:56 +010025212014-01-05 Werner Lemberg <wl@gnu.org>
2522
2523 [autofit] Minor fixes for `afblue.pl'.
2524
2525 * src/tools/afblue.pl (aux_name): Don't use `reverse'.
2526 <Handling #endif>: Use proper indentation for generated `#else'.
2527
2528 * src/autofit/afblue.h: Regenerated.
2529
Werner Lemberg0d977442014-01-04 11:46:34 +010025302014-01-04 Werner Lemberg <wl@gnu.org>
2531
2532 [autofit] Fix Indic scripts.
2533
2534 Split the single, incorrect Indic entry into separate scripts so
2535 that the covered ranges are the same: Bengali, Devanagari, Gujarati,
2536 Gurmukhi, Kannada, Limbu, Malayalam, Oriya, Sinhala, Sundanese,
2537 Syloti Nagri, Tamil, Telugu, and Tibetan. At the same time, remove
2538 entries for Meetai Mayak and Sharada – the Unicode ranges were
2539 incorrect (and nobody has complained about that), fonts are scarce
2540 for those scripts, and the Indic auto-hinter support is rudimentary
2541 anyways.
2542
2543 * src/autofit/afscript.h: Updated, using AF_CONFIG_OPTION_INDIC and
2544 AF_CONFIG_OPTION_CJK.
2545
2546 * src/autofit/afstyles.h (STYLE_DEFAULT_INDIC): New auxiliary macro.
2547 Use it, together with AF_CONFIG_OPTION_INDIC and
2548 AF_CONFIG_OPTION_CJK, to update.
2549
2550 * src/autofit/afranges.c [AF_CONFIG_OPTION_INDIC]: Updated.
2551 [!AF_CONFIG_OPTION_INDIC, !AF_CONFIG_OPTION_CJK]: Removed.
2552 Sort entries by tags.
2553
Werner Lemberg5c7f5502014-01-03 10:48:26 +010025542014-01-03 Werner Lemberg <wl@gnu.org>
2555
Werner Lembergecdb0e32014-01-03 20:49:31 +01002556 [autofit] Thinko.
2557
2558 * src/autofit/hbshim.c (af_get_char_index): Similar to
2559 `af_get_coverage', reject glyphs which are not substituted.
2560
25612014-01-03 Werner Lemberg <wl@gnu.org>
2562
Werner Lemberga42f9182014-01-03 18:29:41 +01002563 [autofit] Fix handling of default coverages.
2564
Werner Lemberg1b5bc892014-01-03 18:33:24 +01002565 With this commit, the implementation of coverage handling is
2566 completed.
2567
2568 * src/autofit/hbshim.c (af_get_coverage): Exit early if nothing to
2569 do.
2570 Reject coverages which don't contain appropriate glyphs for blue
2571 zones.
2572
25732014-01-03 Werner Lemberg <wl@gnu.org>
2574
2575 [autofit] Fix handling of default coverages.
2576
Werner Lemberga42f9182014-01-03 18:29:41 +01002577 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
2578 First handle non-default coverages, then the default coverage of the
2579 default script, and finally the other default coverages.
2580
25812014-01-03 Werner Lemberg <wl@gnu.org>
2582
Werner Lembergf45749b2014-01-03 18:09:36 +01002583 [autofit] Fix scaling of HarfBuzz shaping.
2584
2585 * src/autofit/hbshim.c (af_get_char_index): Scale to units per EM.
2586
25872014-01-03 Werner Lemberg <wl@gnu.org>
2588
Werner Lemberg5c7f5502014-01-03 10:48:26 +01002589 [autofit] Better ftgrid support.
2590
2591 * src/autofit/afhints.c (af_glyph_hints_get_segment_offset): Add
2592 parameters `is_blue' and `blue_offset'.
2593
Werner Lemberg73cc8332014-01-01 07:10:36 +010025942014-01-01 Werner Lemberg <wl@gnu.org>
2595
Werner Lemberg55cd7e02014-01-02 13:07:48 +01002596 [autofit] Remove some styles.
2597
2598 * src/autofit/afcover.h: Remove coverages for alternative fractions,
2599 denominators, numerators, and fractions.
2600
2601 * src/autofit/afstyles.h (META_STYLE_LATIN): Updated.
2602
26032014-01-01 Werner Lemberg <wl@gnu.org>
2604
Werner Lembergc973e672014-01-01 16:34:42 +01002605 [autofit] Add more styles.
2606
2607 * src/autofit/afstyles.h (STYLE_LATIN, META_STYLE_LATIN): New
2608 auxiliary macros; use them to define styles for Cyrillic, Greek, and
2609 Latin.
2610
2611 * src/autofit/afcover.h: Remove coverage for oldstyle figures.
2612 Since those digits are used in combination with ordinary letters, it
2613 makes no sense to handle them separately.
2614
2615 * src/autofit/afglobal.c (af_face_globals_get_metrics): Don't limit
2616 `options' parameter to 4 bits.
2617
26182014-01-01 Werner Lemberg <wl@gnu.org>
2619
Werner Lembergabb2f732014-01-01 08:00:16 +01002620 [autofit] Fix style assignments to glyphs.
2621
2622 * src/autofit/hbshim.c (af_get_coverage)
2623 [FT_CONFIG_OPTION_USE_HARFBUZZ]: Scan GPOS coverage of features also
2624 so that we can skip glyphs that have both GSUB and GPOS data.
2625
26262014-01-01 Werner Lemberg <wl@gnu.org>
2627
Werner Lemberg0950f3a2014-01-01 07:48:20 +01002628 * src/autofit/hbshim.c: s/{lookups,glyphs}/gsub_{lookups,glyphs}/.
2629
26302014-01-01 Werner Lemberg <wl@gnu.org>
2631
Werner Lemberg73cc8332014-01-01 07:10:36 +01002632 [autofit] Implement and use `af_get_char_index' with HarfBuzz.
2633
2634 * src/autofit/hbshim.c (COVERAGE) [FT_CONFIG_OPTION_USE_HARFBUZZ]:
2635 Redefine to construct HarfBuzz features.
2636 (af_get_char_index) [FT_CONFIG_OPTION_USE_HARFBUZZ]: Rewritten.
2637
2638 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Use
2639 `y_offset' to adjust `best_y'.
2640
Werner Lembergc9d99472013-12-31 08:16:57 +010026412013-12-31 Werner Lemberg <wl@gnu.org>
2642
Werner Lemberg785f3852013-12-31 09:45:10 +01002643 [autofit] s/AF_STYLE_...._DEFAULT/AF_STYLE_...._DFLT/i.
2644
26452013-12-31 Werner Lemberg <wl@gnu.org>
2646
Werner Lembergc9d99472013-12-31 08:16:57 +01002647 [autofit] Fix interface of `af_get_char_index'.
2648
2649 * src/autofit/hbshim.c (af_get_char_index): Return error value.
2650 Add argument for y offset (to be used in a yet-to-come patch).
2651
2652 * src/autofit/hbshim.h, src/autofit/afcjk.c,
2653 src/autofit/aflatin.c: Updated.
2654
Werner Lemberg44aa7e02013-12-30 07:41:22 +010026552013-12-30 Werner Lemberg <wl@gnu.org>
2656
2657 [autofit] Don't combine multiple features into one set.
2658
2659 Combining them, as originally envisioned, would lead to much more
2660 complicated code, as investigations have shown meanwhile. The major
2661 drawback is that we run out of available style slots much earlier.
2662 However, this is only a theoretical issue since we don't support a
2663 large number of scripts currently.
2664
2665 * src/autofit/afcover.h: Replace `COVERAGE_{1,2,3}' macros with
2666 a single-element `COVERAGE' macro, sort the elements by the feature
2667 tags, and add entry for `ruby'.
2668
2669 * src/autofit/aftypes.h: Updated.
2670 * src/autofit/hbshim.c: Updated.
2671
Werner Lemberg6af01a02013-12-28 08:55:24 +010026722013-12-28 Werner Lemberg <wl@gnu.org>
2673
Werner Lemberg072dc452013-12-28 12:26:21 +01002674 [autofit] Code shuffling to reduce use of cpp macros.
2675
2676 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
2677 Call `af_get_coverage' unconditionally.
2678
2679 * src/autofit/autofit.c: Include `hbshim.c' unconditionally.
2680
2681 * src/autofit/hbshim.c (af_get_coverage)
2682 [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Provide dummy function.
2683
2684 * src/autofit/hbshim.h: Provide function declarations
2685 unconditionally.
2686
26872013-12-28 Werner Lemberg <wl@gnu.org>
2688
Werner Lemberg17af5862013-12-28 10:33:01 +01002689 [autofit] Add wrapper function for `FT_Get_Char_Index'.
2690
2691 Yet-to-come changes will provide HarfBuzz functionality for the new
2692 function.
2693
2694 * src/autofit/hbshim.c (af_get_char_index): New function.
2695 * src/autofit/hbshim.h: Updated.
2696
2697 * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
2698 af_cjk_metrics_init_blues, af_cjk_metrics_check_digits): Updated.
2699
2700 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
2701 af_latin_metrics_init_blues, af_latin_metrics_check_digits):
2702 Updated.
2703
27042013-12-28 Werner Lemberg <wl@gnu.org>
2705
Werner Lemberg6af01a02013-12-28 08:55:24 +01002706 [autofit] Use `global' HarfBuzz font object.
2707
2708 We now use `hb_font' instead of `hb_face' since yet-to-come changes
2709 need this.
2710
2711 * src/autofit/afglobal.h: Include `hbshim.h'.
2712 (AF_FaceGlobalsRec) [FT_CONFIG_OPTION_USE_HARFBUZZ]: New member
2713 `hb_font'.
2714
2715 * src/autofit/afglobal.c (af_face_globals_new)
2716 [FT_CONFIG_OPTION_USE_HARFBUZZ]: Create `hb_font'.
2717 (af_face_globals_free) [FT_CONFIG_OPTION_USE_HARFBUZZ]: Destroy
2718 `hb_font'.
2719
2720 * src/autofit/hbshim.h: Include HarfBuzz headers.
2721
2722 * src/autofit/hbshim.c: Include `hbshim.h' instead of HarfBuzz
2723 headers.
2724 (af_get_coverage): Updated.
2725
Werner Lembergd32a7d32013-12-27 19:26:04 +010027262013-12-27 Werner Lemberg <wl@gnu.org>
2727
2728 [autofit] Handle `DFLT' OpenType script for coverages.
2729
2730 * include/ftautoh.h: Document new `default-script' property.
2731
2732 * src/autofit/hbshim.c (af_get_coverage): Use `AF_FaceGlobals' for
2733 type of first parameter.
2734 (script_tags): Add one more element.
2735 (af_get_coverage): Adjust `script_tags' to handle `DFLT' script tag.
2736
2737 * src/autofit/hbshim.h: Updated.
2738
2739 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
2740 Updated.
2741
2742 * src/autofit/afglobal.h (AF_SCRIPT_DEFAULT): New macro.
2743
2744 * src/autofit/afmodule.h (AF_ModuleRec): New `default_script'
2745 member.
2746
2747 * src/autofit/afmodule.c (af_property_set, af_property_get): Handle
2748 `default-script' property.
2749 (af_autofitter_init): Updated.
2750
suzuki toshiyae2d2b152013-12-27 16:44:24 +090027512013-12-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2752
2753 [ftrfork] Fix the face order difference between POSIX and Carbon.
2754
2755 The fragmented resources in Suitcase and .dfont should be reordered
Werner Lemberg00a7b512013-12-27 19:18:49 +01002756 when `POST' resource for Type1 is being restored, but reordering of
suzuki toshiyae2d2b152013-12-27 16:44:24 +09002757 sfnt resources induces the different face order. Now the ordering
Werner Lemberg00a7b512013-12-27 19:18:49 +01002758 is restricted to `POST' resource only, to prevent the different
2759 order issue (e.g. the face index in the fontconfig cache generated
2760 with Carbon framework is incompatible with that by FreeType 2
2761 without Carbon framework.) Found by Khaled Hosny and Hin-Tak Leung.
2762
suzuki toshiyae2d2b152013-12-27 16:44:24 +09002763 http://lists.gnu.org/archive/html/freetype-devel/2013-02/msg00035.html
2764 http://lists.gnu.org/archive/html/freetype-devel/2013-12/msg00027.html
2765
2766 * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Add a switch
Werner Lemberg44aa7e02013-12-30 07:41:22 +01002767 `sort_by_res_id' to control the fragmented resource ordering.
Werner Lemberg00a7b512013-12-27 19:18:49 +01002768 * include/internal/ftrfork.h: Declare new switch.
2769 * src/base/ftobjs.c (IsMacResource): Enable the sorting for `POST'
2770 resource, and disable the sorting for `sfnt' resource.
suzuki toshiyae2d2b152013-12-27 16:44:24 +09002771
Werner Lemberg5f577462013-12-25 08:50:50 +010027722013-12-25 Werner Lemberg <wl@gnu.org>
2773
2774 Fix Savannah bug #40997.
2775
2776 * src/bdf/bdfdrivr.c (BDF_Face_Init): Only use OR operator to
2777 adjust face flags since FT_FACE_FLAG_EXTERNAL_STREAM might already
2778 be set.
2779 * src/cff/cffobjs.c (cff_face_init): Ditto.
2780 * src/cid/cidobjs.c (cid_face_init): Ditto.
2781 * src/pcf/pcfread.c (pcf_load_font): Ditto.
2782 * src/pfr/pfrobjs.c (pfr_face_init): Ditto.
2783 * src/type1/t1objs.c (T1_Face_Init): Ditto.
2784 * src/type42/t42objs.c (T42_Face_Init): Ditto.
2785 * src/winfonts/winfnt.c (FNT_Face_Init): Ditto.
2786
Werner Lembergc4e968e2013-12-21 07:23:08 +010027872013-12-21 Werner Lemberg <wl@gnu.org>
2788
Werner Lemberg19241342013-12-21 21:31:38 +01002789 [autofit] Introduce `coverages'.
2790
2791 Coverages are the interface to the HarfBuzz library to acces
2792 OpenType features for handling glyphs not addressable by the cmap.
2793
2794 Right now, compilation of HarfBuzz is only added to the development
2795 build. A solution for standard build mode will be delayed until
2796 HarfBuzz gets split into two libraries to avoid mutual dependencies
2797 between FreeType and HarfBuzz.
2798
2799 Note that this is only a first step in handling coverages, basically
2800 providing the framework only. Code for handling selected OpenType
2801 features (this is, actually using the data in `afcover.h') will
2802 follow.
2803
2804 * devel/ftoption.h, include/config/ftoption.h
2805 (FT_CONFIG_OPTION_USE_HARFBUZZ): New macro.
2806
2807 * src/autofit/hbshim.c, src/autofit/hbshim.h, src/autofit/afcover.h:
2808 New files.
2809
2810 * src/autofit/afscript.h: Add HarfBuzz script name tags.
2811
2812 * src/autofit/afstyles.h: Add default coverage enumeration values.
2813
2814 * src/autofit/aftypes.h: Update use of `SCRIPT' and `STYLE' macros.
2815 (AF_Coverage): New enumeration (generated by `afcover.h').
2816 (AF_StyleClassRec): New member `coverage'.
2817 (AF_DEFINE_STYLE_CLASS): Updated.
2818
2819 * include/internal/fttrace.h: Add `afharfbuzz' for tracing coverage
2820 data.
2821
2822 * src/autofit/afglobal.h: Update use of `SCRIPT' and `STYLE' macros.
2823 (AF_SCRIPT_FALLBACK): Renamed to ...
2824 (AF_STYLE_FALLBACK): ... this.
2825
2826 * src/autofit/afglobal.c: Include `hbshim.c'.
2827 Update use of `SCRIPT' and `STYLE' macros.
2828 (af_face_globals_compute_style_coverage)
2829 [FT_CONFIG_OPTION_USE_HARFBUZZ]: Call `af_get_coverage'.
2830 Update.
2831
2832 * src/autofit/afmodule.h (AF_ModuleRec):
2833 s/fallback_script/fallback_style/.
2834
2835 * src/autofit/afmodule.c (af_property_set): Adapt handling of
2836 `fallback-script' property to set a fallback style.
2837 (af_property_get, af_autofitter_init): Updated.
2838
2839 * src/autofit/afpic.c: Update use of `SCRIPT' and `STYLE' macros.
2840
2841 * src/autofit/afranges.h: Update use of `SCRIPT' macro.
2842
2843 * src/autofit/autofit.c [FT_CONFIG_OPTION_USE_HARFBUZZ]: Include
2844 `hbshim.c'.
2845
2846 * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `hbshim.c'.
2847 (AUTOF_DRV_H): Add `afcover.h'.
2848
2849 * builds/freetype.mk (INCLUDE_FLAGS) [DEVEL_DIR]: Use pkg-config for
2850 all libraries needed by FreeType.
2851
28522013-12-21 Werner Lemberg <wl@gnu.org>
2853
Werner Lembergb337fa22013-12-21 19:33:15 +01002854 Fix Savannah bug #40975 (sort of).
2855
2856 * src/truetype/ttinterp.c (Ins_IP): Fix sign typo to make FreeType
2857 behave the same as the Windows TrueType engine for the invalid case.
2858
28592013-12-21 Werner Lemberg <wl@gnu.org>
2860
Werner Lemberg3bf60952013-12-21 08:49:11 +01002861 [autofit] Make PIC mode work actually.
2862
2863 * src/autofit/afpic.h (AFModulePIC): Fix array sizes to fit the
2864 enumeration values automatically generated by including `afscript.h'
2865 and friends.
2866
2867 * src/autofit/afpic.c (autofit_module_class_pic_init): Updated.
2868
28692013-12-21 Werner Lemberg <wl@gnu.org>
2870
Werner Lembergbd413862013-12-21 08:14:25 +01002871 Fix PIC linking.
2872
2873 * include/internal/ftrfork.h (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Fix
2874 generated function name.
2875
2876 * src/base/basepic.c (FT_Init_Table_raccess_guess_table): Rename
2877 to ...
2878 (FT_Init_Table_ft_raccess_guess_table): ... this so that the
2879 function name correctly corresponds to what the macro framework
2880 expects.
2881
2882 * src/psnames/rules.mk (PSNAMES_DRV_SRC_S): Use correct file name so
2883 that PIC functions are compiled also.
2884
28852013-12-21 Werner Lemberg <wl@gnu.org>
2886
Werner Lembergc4e968e2013-12-21 07:23:08 +01002887 [base] Add missing dependencies to Makefile.
2888
2889 * src/base/rules.mk (BASE_SRC): Add `basepic.c' and `ftpic.c'.
2890 (BASE_H): Add `basepic.h'.
2891
Werner Lemberg974b1932013-12-20 17:26:26 +010028922013-12-20 Werner Lemberg <wl@gnu.org>
2893
Werner Lemberg8a8f3752013-12-20 18:35:35 +01002894 [autofit] Fix PIC compilation.
2895
2896 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
2897 src/autofit/aflatin.c (af_latin_metrics_init_widths)
2898 [FT_CONFIG_OPTION_PIC]: Declare `globals'.
2899
2900 * src/autofit/afglobal.c: Always call AF_DEFINE_SCRIPT_CLASS, and
2901 AF_DEFINE_STYLE_CLASS.
2902
2903 * src/autofit/afpic.c: Include `afglobal.h'.
2904 (autofit_module_class_pic_init): Typo.
2905
2906 * src/autofit/aftypes.h (AF_DEFINE_SCRIPT_CLASS,
2907 AF_DEFINE_STYLE_CLASS): Don't use the same identifier for macro
2908 parameter and structure member.
2909
29102013-12-20 Werner Lemberg <wl@gnu.org>
2911
Werner Lemberg974b1932013-12-20 17:26:26 +01002912 [autofit] Introduce `styles'.
2913
2914 This is the new top-level structure for handling glyph input data;
2915 scripts are now defined separately.
2916
2917 * src/autofit/aftypes.h (SCRIPT): Updated.
2918 (AF_ScriptClassRec): Move `blue_stringset' and `writing_system'
2919 members to ...
2920 (AF_Style_ClassRec): ... this new structure.
2921 (AF_Style): New enumeration.
2922 (AF_StyleMetricsRec): Replace `script' enumeration with
2923 `style_class' pointer.
2924 (AF_DEFINE_SCRIPT_CLASS, AF_DECLARE_SCRIPT_CLASS): Updated.
2925 (AF_DEFINE_STYLE_CLASS, AF_DECLARE_STYLE_CLASS): New macros.
2926
2927 * src/autofit/afstyles.h: New file, using data from `afscript.h'.
2928 * src/autofit/afscript.h: Updated.
2929
2930 * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
2931 af_cjk_metrics_init_blues, af_cjk_hint_edges): Updated.
2932
2933 * src/autofit/afglobal.c (SCRIPT): Updated.
2934 (STYLE): Redefine macro to load `afstyles.h'.
2935 (af_script_names) [FT_DEBUG_LEVEL_TRACE]: Replace with...
2936 (af_style_names): ... this array.
2937 (af_face_globals_compute_script_coverage): Renamed to...
2938 (af_face_globals_compute_style_coverage): ... this.
2939 Updated.
2940 (af_face_globals_new, af_face_globals_free,
2941 af_face_globals_get_metrics): Updated.
2942
2943 * src/autofit/afglobal.h (SCRIPT): Updated.
2944 (STYLE): Redefine macro to load `afstyles.h'.
2945 (AF_SCRIPT_FALLBACK): Update definition. This will get more
2946 refinements with later on.
2947 (AF_SCRIPT_UNASSIGNED): Replace with...
2948 (AF_STYLE_UNASSIGNED): ... this macro.
2949 (AF_FaceGlobalsRec): Updated.
2950
2951 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
2952 af_latin_metrics_init_blues, af_latin_metrics_scale_dim,
2953 af_latin_hint_edges): Updated.
2954
2955 * src/autofit/aflatin2.c (af_latin2_metrics_init_widths): Updated.
2956 (af_ltn2_uniranges): Removed.
2957
2958 * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph):
2959 Updated.
2960
2961 * src/autofit/afpic.c (autofit_module_class_pic_init): Updated.
2962 * src/autofit/afpic.h (AF_STYLE_CLASSES_GET): New macro.
2963 (AFModulePIC): Add `af_style_classes' and `af_style_classes_rec'
2964 members.
2965
2966 * src/autofit/afranges.h: Updated.
2967
2968 * src/autofit/rules.mk (AUTOF_DRV_H): Add `afstyles.h'.
2969
Werner Lembergd8324572013-12-19 15:45:24 +010029702013-12-19 Werner Lemberg <wl@gnu.org>
2971
2972 [autofit] Factor scripts and uniranges out of writing system files.
2973
2974 * src/autofit/afranges.c, src/autofit/afranges.h: New files.
2975
2976 * src/autofit/afscript.h: Extend `SCRIPT' macro with more
2977 parameters, taking data from the writing system files.
2978
2979 * src/autofit/aftypes.h: Updated.
2980
2981 * src/autofit/afglobal.c: Include `afranges.h'.
2982 Load `afscript.h' to call AF_DEFINE_SCRIPT_CLASS.
2983 * src/autofit/afglobal.c: Include `afranges.h'.
2984 Load `afscript.h' to call AF_DECLARE_SCRIPT_CLASS.
2985
2986 * src/autofit/afcjk.c, src/autofit/afcjk.h: Updated.
2987 * src/autofit/afdummy.c, src/autofit/afdummy.h: Updated.
2988 * src/autofit/afindic.c, src/autofit/afindic.h: Updated.
2989 * src/autofit/aflatin.c, src/autofit/aflatin.h: Updated.
2990 * src/autofit/aflatn2.c, src/autofit/aflatn2.h: Updated.
2991
2992 * src/autofit/afpic.c: Updated.
2993
2994 * src/autofir/autofit.c: Include `afranges.c'.
2995 * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `afranges.c'.
2996
Werner Lemberg9a354552013-12-18 10:36:06 +010029972013-12-18 Werner Lemberg <wl@gnu.org>
2998
Werner Lemberg73f31982013-12-19 15:24:17 +01002999 [autofit] More code orthogonality.
3000
3001 * src/autofit/aftypes.h (AF_StyleMetrics): Replace `script_class'
3002 pointer to an `AF_ScriptClass' structure with `script' index of type
3003 `AF_Script'.
3004 Move some code around.
3005
3006 * src/autofit/afcjk.c: Include `afpic.h'.
3007 (af_cjk_metrics_init_widths, af_cjk_metrics_init_blues,
3008 af_cjk_hint_edges): Updated.
3009
3010 * src/autofit/aflatin.c: Include `afpic.h'.
3011 (af_latin_metrics_init_widths, af_latin_metrics_init_blues,
3012 af_latin_metrics_scale_dim, af_latin_hint_edges): Updated.
3013
3014 * src/autofit/afglobal.c (af_face_globals_get_metrics): Updated.
3015
3016 * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph):
3017 Updated.
3018
30192013-12-18 Werner Lemberg <wl@gnu.org>
3020
Werner Lemberg3f91cb32013-12-18 12:59:35 +01003021 [autofit] s/ScriptMetrics/StyleMetrics/.
3022
30232013-12-18 Werner Lemberg <wl@gnu.org>
3024
Werner Lemberg4fccc212013-12-18 12:53:01 +01003025 [autofit] s/script_{metrics,hints}/style_{metrics,hints}/
3026
30272013-12-18 Werner Lemberg <wl@gnu.org>
3028
Werner Lembergf4df4072013-12-18 10:39:30 +01003029 [autofit] s/gscripts/gstyles/.
3030
30312013-12-18 Werner Lemberg <wl@gnu.org>
3032
Werner Lemberg9a354552013-12-18 10:36:06 +01003033 [autofit] s/glyph_scripts/glyph_styles/.
3034
3035 This is the first commit of a series to create a new top-level
3036 structure (a `style') for handling scripts, writing_systems, and
3037 soon-to-be-added coverages.
3038
Werner Lemberg7a5fc2f2013-12-17 13:29:53 +010030392013-12-17 Werner Lemberg <wl@gnu.org>
3040
3041 [autofit] s/AF_Script_/AF_WritingSystem_/ where appropriate.
3042
Infinality8bb09b02013-12-11 09:01:13 +010030432013-12-11 Infinality <infinality@infinality.net>
3044
3045 [truetype] Simplify logic of rendering modes.
3046
3047 This patch unifies the subpixel and non-subpixel cases.
3048
3049 * src/truetype/ttinterp.h (TT_ExecContextRec): Remove
3050 `grayscale_hinting'; all code should refer to `grayscale' instead.
3051 Remove unused `native_hinting' member.
3052 Rename `subpixel_hinting' member to `subpixel.
3053
3054 * src/truetype/ttgload.c (TT_LOADER_SET_PP): Updated.
3055 (tt_loader_init): Updated.
3056
3057 * src/truetype/ttinterp.c (Ins_GETINFO): Simplify.
3058 Updated.
3059
Werner Lemberge9d95aa2013-12-11 07:48:51 +010030602013-12-11 Werner Lemberg <wl@gnu.org>
3061
3062 [documentation] Add section how to include FreeType header files.
3063 Problem reported by David Kastrup <dak@gnu.org>.
3064
3065 Surprisingly, a description how to do that was completely missing in
3066 the API reference.
3067
3068 * include/freetype.h, include/ftchapters.h: New documentation
3069 section `header_inclusion'.
3070
Werner Lemberg05c786d2013-12-10 08:38:57 +010030712013-12-10 Werner Lemberg <wl@gnu.org>
3072
Werner Lemberg91932592013-12-10 13:24:07 +01003073 [autofit] s/DFLT/NONE/, s/dflt/none/.
3074
30752013-12-10 Werner Lemberg <wl@gnu.org>
3076
Werner Lemberg45244f82013-12-10 13:18:11 +01003077 [autofit] s/AF_SCRIPT_NONE/AF_SCRIPT_UNASSIGNED/.
3078
30792013-12-10 Werner Lemberg <wl@gnu.org>
3080
Werner Lemberg69d1a362013-12-10 10:12:27 +01003081 [truetype] Fix scaling of vertical phantom points.
3082
3083 * src/truetype/ttgload.c (load_truetype_glyph): Scale pp3.x and
3084 pp4.x also.
3085
30862013-12-10 Werner Lemberg <wl@gnu.org>
3087
Werner Lemberg05c786d2013-12-10 08:38:57 +01003088 [truetype] Fix positioning of composite glyphs.
3089 Problem reported by Nigel Tao <nigeltao@golang.org>.
3090
3091 * src/truetype/ttgload.c (TT_Hint_Glyph): Remove code that shifts
3092 the glyph (component) by a fractional value computed from the LSB
3093 phantom point. This is wrong, since the horizontal phantom points
3094 get rounded horizontally later on.
3095
Werner Lembergdd8050a2013-12-08 23:14:46 +010030962013-12-08 Werner Lemberg <wl@gnu.org>
3097
3098 * Version 2.5.2 released.
3099 =========================
3100
3101
3102 Tag sources with `VER-2-5-2'.
3103
3104 * docs/VERSION.DLL: Update documentation and bump version number to
3105 2.5.2.
3106
3107 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
3108 builds/windows/vc2005/index.html,
3109 builds/windows/vc2008/freetype.vcproj,
3110 builds/windows/vc2008/index.html,
3111 builds/windows/vc2010/freetype.vcxproj,
3112 builds/windows/vc2010/index.html,
3113 builds/windows/visualc/freetype.dsp,
3114 builds/windows/visualc/freetype.vcproj,
3115 builds/windows/visualc/index.html,
3116 builds/windows/visualce/freetype.dsp,
3117 builds/windows/visualce/freetype.vcproj,
3118 builds/windows/visualce/index.html,
3119 builds/wince/vc2005-ce/freetype.vcproj,
3120 builds/wince/vc2005-ce/index.html,
3121 builds/wince/vc2008-ce/freetype.vcproj,
3122 builds/wince/vc2008-ce/index.html: s/2.5.1/2.5.2/, s/251/252/.
3123
Werner Lembergec8853c2014-03-06 19:13:45 +01003124 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
Werner Lembergdd8050a2013-12-08 23:14:46 +01003125
3126 * builds/unix/configure.raw (version_info): Set to 17:1:11.
Werner Lembergec8853c2014-03-06 19:13:45 +01003127 * CMakeLists.txt (VERSION_PATCH): Set to 2.
Werner Lembergdd8050a2013-12-08 23:14:46 +01003128 * docs/CHANGES: Updated.
3129
Werner Lemberg98d185c2013-12-07 09:26:55 +010031302013-12-07 Werner Lemberg <wl@gnu.org>
3131
3132 [truetype] Next round in phantom point handling.
3133
3134 Greg Hitchcock provided very interesting insights into the
3135 complicated history of the horizontal positions of the TSB and BSB
3136 phantom points.
3137
3138 * src/truetype/ttgload.c (TT_LOADER_SET_PP)
3139 [TT_CONFIG_OPTION_SUBPIXEL_HINTING]: Use `subpixel_hinting' and
3140 `grayscale_hinting' flags as conditionals for the x position of TSB
3141 and BSB.
3142
Werner Lembergfcdb7842013-12-05 15:53:27 +010031432013-12-05 Werner Lemberg <wl@gnu.org>
3144
3145 * builds/freetype.mk (FT_CC): Removed. Unused.
3146
Werner Lemberg64b395c2013-12-04 06:18:56 +010031472013-12-04 Werner Lemberg <wl@gnu.org>
3148
3149 [sfnt] Fix handling of embedded bitmap strikes.
3150
3151 This corrects the commit from 2013-11-21. Problem reported by
3152 Andrey Panov <panov@canopus.iacp.dvo.ru>.
3153
3154 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Fix logic to
3155 detect excessive bytes for bit-aligned bitmaps.
3156
Werner Lembergbdd5e752013-12-03 06:57:02 +010031572013-12-03 Werner Lemberg <wl@gnu.org>
3158
Werner Lembergc2b47532013-12-03 07:01:57 +01003159 [truetype] Remove dead code.
3160
3161 Reported by Nigel Tao <nigeltao@golang.org>.
3162
3163 * include/internal/tttypes.h (TT_LoaderRec): Remove unused
3164 `preserve_pps' field.
3165 * src/truetype/ttgload.c (TT_Hint_Glyph): Updated.
3166
31672013-12-03 Werner Lemberg <wl@gnu.org>
3168
Werner Lembergbdd5e752013-12-03 06:57:02 +01003169 [truetype] Fix phantom point handling.
3170
3171 This is a further improvement to the changes from 2013-11-06.
3172
3173 * src/truetype/ttgload.c (TT_Hint_Glyph): Horizontal phantom points
3174 are rounded horizontally, vertical ones are rounded vertically.
3175 (TT_LOADER_SET_PP): The horizontal position of vertical phantom
3176 points in pre-ClearType mode is zero, as shown in the OpenType
3177 specification.
3178
Werner Lemberg64872a52013-12-02 07:51:17 +010031792013-12-02 Werner Lemberg <wl@gnu.org>
3180
3181 [truetype] Fix change from 2013-11-20.
3182
3183 Problem reported by Akira Kakuto <kakuto@fuk.kindai.ac.jp>.
3184
3185 * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Protect call to
3186 `Update_Max' with both a TT_USE_BYTECODE_INTERPRETER guard and a
3187 `IS_HINTED' clause.
3188 Also remove redundant check using `maxSizeOfInstructions' – in
3189 simple glyphs, the bytecode data comes before the outline data, and
3190 a validity test for this is already present.
3191
Werner Lemberg52166ab2013-11-27 10:10:16 +010031922013-11-27 Werner Lemberg <wl@gnu.org>
3193
3194 [autofit] Fix use of dumping functions in `ftgrid' demo program.
3195
3196 * src/autofit/afhints.c (AF_DUMP) [FT_DEBUG_AUTOFIT]: New macro.
3197 (af_glyph_hints_dump_points, af_glyph_hints_dump_segments,
3198 af_glyph_hints_dump_edges) [FT_DEBUG_AUTOFIT]: Add parameter to
3199 handle output to stdout.
3200 Use AF_DUMP.
3201 (af_glyph_hints_dump_points, af_glyph_hints_dump_segments,
3202 af_glyph_hints_dump_edges) [!FT_DEBUG_AUTOFIT]: Removed.
3203
Werner Lemberg3aee4292013-11-25 00:28:11 +010032042013-11-25 Werner Lemberg <wl@gnu.org>
3205
3206 * Version 2.5.1 released.
3207 =========================
3208
3209
3210 Tag sources with `VER-2-5-1'.
3211
3212 * docs/VERSION.DLL: Update documentation and bump version number to
3213 2.5.1.
3214
3215 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
3216 builds/windows/vc2005/index.html,
3217 builds/windows/vc2008/freetype.vcproj,
3218 builds/windows/vc2008/index.html,
3219 builds/windows/vc2010/freetype.vcxproj,
3220 builds/windows/vc2010/index.html,
3221 builds/windows/visualc/freetype.dsp,
3222 builds/windows/visualc/freetype.vcproj,
3223 builds/windows/visualc/index.html,
3224 builds/windows/visualce/freetype.dsp,
3225 builds/windows/visualce/freetype.vcproj,
3226 builds/windows/visualce/index.html,
3227 builds/wince/vc2005-ce/freetype.vcproj,
3228 builds/wince/vc2005-ce/index.html,
3229 builds/wince/vc2008-ce/freetype.vcproj,
3230 builds/wince/vc2008-ce/index.html: s/2.5.0/2.5.1/, s/250/251/.
3231
3232 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
3233
3234 * builds/unix/configure.raw (version_info): Set to 17:0:11.
Werner Lembergec8853c2014-03-06 19:13:45 +01003235 * CMakeLists.txt (VERSION_PATCH): Set to 1.
Werner Lemberg3aee4292013-11-25 00:28:11 +01003236 * docs/CHANGES, docs/release: Updated.
3237
Werner Lemberg9326caf2013-11-23 23:59:25 +010032382013-11-23 Werner Lemberg <wl@gnu.org>
3239
Werner Lemberg063ee6b2013-11-24 00:19:17 +01003240 [truetype]: Add tricky font names `hkscsiic.ttf' and `iicore.ttf'.
3241
3242 * src/truetype/ttobjs.c (TRICK_NAMES_MAX_CHARACTERS,
3243 TRICK_NAMES_COUNT): Updated.
3244 (trick_names): Add family name for the two fonts.
3245
32462013-11-23 Werner Lemberg <wl@gnu.org>
3247
Werner Lemberg9326caf2013-11-23 23:59:25 +01003248 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Typo.
3249
Werner Lemberg427b1762013-11-21 13:10:56 +010032502013-11-21 Werner Lemberg <wl@gnu.org>
3251
Werner Lemberg9326caf2013-11-23 23:59:25 +01003252 [sfnt] Typo.
Werner Lemberg8af2a1c2013-11-21 13:13:12 +01003253
3254 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
3255
3256 * src/sfnt/sfobjs.c (sfnt_load_face): Return correct `bsize->width'
3257 value if the font lacks an `OS/2' table.
3258
32592013-11-21 Werner Lemberg <wl@gnu.org>
3260
Werner Lemberg64b395c2013-12-04 06:18:56 +01003261 [sfnt] Improve handling of buggy embedded bitmap strikes.
Werner Lemberg427b1762013-11-21 13:10:56 +01003262
3263 We are now able to successfully load `AppleMyoungJo.ttf'.
3264 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
3265
3266 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Don't trust glyph
3267 format.
3268
Werner Lemberg28626862013-11-20 21:06:18 +010032692013-11-20 Werner Lemberg <wl@gnu.org>
3270
3271 [truetype] Don't trust `maxp's `maxSizeOfInstructions'.
3272
3273 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>; see
3274
3275 http://lists.nongnu.org/archive/html/freetype-devel/2013-08/msg00005.html
3276
3277 for details.
3278
3279 * src/base/ftobjs.c (FT_Load_Glyph): Check size of `fpgm' and `prep'
3280 tables also for setting `autohint'.
3281
3282 * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Use code from
3283 `TT_Process_Composite_Glyph' for handling unreliable values of
3284 `maxSizeOfInstructions'.
3285
Werner Lembergbc25de62013-11-16 07:52:20 +010032862013-11-16 Werner Lemberg <wl@gnu.org>
3287
3288 [sfnt] Fix `OS/2' table version 5 support.
3289
3290 We now follow the `official' announcement from Microsoft (on the
3291 OpenType mailing list, which unfortunately hasn't a public archive).
3292
3293 * include/freetype/tttables.h (TT_OS2):
3294 s/usLowerPointSize/usLowerOpticalPointSize/,
3295 s/usUpperPointSize/usUpperOpticalPointSize/.
3296
3297 * src/sfnt/ttload.c (tt_face_load_os2): Update, and set correct
3298 default values.
3299
Werner Lembergfae38202013-11-13 08:55:46 +010033002013-11-13 Werner Lemberg <wl@gnu.org>
3301
Werner Lembergc52b1292013-11-13 10:06:00 +01003302 * builds/unix/ft2unix.h: Remove. No longer necessary.
3303
3304 * builds/unix/install.mk (install): Updated.
3305
33062013-11-13 Werner Lemberg <wl@gnu.org>
3307
Werner Lembergfae38202013-11-13 08:55:46 +01003308 Simplify header file hierarchy.
3309
3310 This large patch changes the header file directory layout from
3311 `include/freetype/...' to `include/...', effectively removing one
3312 level. Since the file `ft2build.h' is also located in `include'
3313 (and it stays there even after installation), all FreeType header
3314 files are now in a single directory.
3315
3316 Applications that use (a) `freetype-config' or FreeType's
3317 `pkg-config' file to get the include directory for the compiler, and
3318 (b) the documented way for header inclusion like
3319
3320 #include <ft2build.h>
3321 #include FT_FREETYPE_H
3322 ...
3323
3324 don't need any change to the source code.
3325
3326 * include/freetype/*: Move up to...
3327 * include/*: ... this directory.
3328
3329 * builds/amiga/include/freetype/*: Move up to...
3330 * builds/amiga/include/*: ... this directory.
3331
3332 */*: Essentially do `s@/freetype/@/@' where appropriate.
3333
3334 * CMakeList.txt: Simplify.
3335 * builds/unix/freetype-config.in, builds/unix/freetype2.in: For
3336 `--cflags', return a single directory.
3337 * builds/unix/install.mk (install): No longer try to remove `cache'
3338 and `internal' subdirectories; instead, remove the `freetype'
3339 subdirectory.
3340
Werner Lembergea5c7812013-11-12 08:55:26 +010033412013-11-12 Werner Lemberg <wl@gnu.org>
3342
3343 [truetype] Fix last `truetype' commit.
3344
3345 * src/truetype/ttgload.c (tt_get_metrics): Preserve stream position.
3346 Return error value.
3347 (load_truetype_glyph): Updated.
3348
Werner Lemberg78333282013-11-10 06:26:52 +010033492013-11-10 Werner Lemberg <wl@gnu.org>
3350
3351 * docs/CMAKE: New dummy file.
3352
Dave Arnolddd213012013-11-08 10:52:51 +010033532013-11-08 Dave Arnold <darnold@adobe.com>
3354
3355 [cff] Fix for hints that touch.
3356
3357 * src/cff/cf2hints.c (cf2_hintmap_insertHint): Fix condition for
3358 finding index value of insertion point.
3359
Werner Lemberg7e4b0fb2013-11-06 07:14:49 +010033602013-11-06 Werner Lemberg <wl@gnu.org>
3361
Werner Lemberg5e225b72013-11-06 08:41:59 +01003362 [truetype] Fix handling of phantom points in composite glyphs.
3363 Problem reported by Nigel Tao <nigeltao@golang.org>.
3364
3365 This is a follow-up commit to the previous one.
3366
3367 * src/truetype/ttgload.c (load_truetype_glyph): Call
3368 `tt_get_metrics' after loading the glyph header.
3369
33702013-11-06 Werner Lemberg <wl@gnu.org>
3371
Werner Lemberg7e4b0fb2013-11-06 07:14:49 +01003372 [truetype] Improve emulation of vertical metrics.
3373
3374 This commit also improves the start values of vertical phantom
3375 points. Kudos to Greg Hitchcock for help.
3376
3377 * src/truetype/ttgload.c (TT_Get_VMetrics): Add parameter to pass
3378 `yMax' value. Replace code with fixed Microsoft definition.
3379 (tt_get_metrics): Updated.
3380 (TT_LOADER_SET_PP): Add explanation how to initialize phantom
3381 points, taken from both the OpenType specification and private
3382 communication with Greg (which will eventually be added to the
3383 standard).
3384 Fix horizontal position of `pp3' and `pp4'.
3385
3386 * src/truetype/ttgload.h: Updated.
3387
3388 * src/truetype/ttdriver.c (tt_get_advances): Updated.
3389
3390 * docs/CHANGES: Updated.
3391
Werner Lembergc6064282013-11-05 13:29:15 +010033922013-11-05 Werner Lemberg <wl@gnu.org>
3393
Werner Lemberg50740532013-11-05 23:19:18 +01003394 * builds/windows/vc2010/freetype.vcxproj: s/v110/v100/.
3395 PlatformToolSet version 110 is for VC2012.
3396
3397 Problem reported (with solution) by Dave Arnold <darnold@adobe.com>.
3398
33992013-11-05 Werner Lemberg <wl@gnu.org>
3400
Werner Lembergc6064282013-11-05 13:29:15 +01003401 [truetype] Correctly reset point tags for glyph components.
3402 Problem reported by Nigel Tao <nigeltao@golang.org>.
3403
3404 * src/truetype/ttgload.c (TT_Process_Composite_Glyph): Fix loop.
3405
Werner Lemberg35b08182013-11-02 08:28:41 +010034062013-11-02 Werner Lemberg <wl@gnu.org>
3407
Werner Lemberg7d449432013-11-02 11:36:37 +01003408 [truetype] Fix GETINFO opcode handling of subpixel hinting bits.
3409
3410 * src/truetype/ttinterp.c (Ins_GETINFO): Don't request bit 6 set to
3411 get info on subpixel hinting.
3412
3413 * docs/CHANGES: Updated.
3414
34152013-11-02 Werner Lemberg <wl@gnu.org>
3416
Werner Lemberg35b08182013-11-02 08:28:41 +01003417 Fix Savannah bug #40451.
3418
3419 Simply apply the patch from the bug report.
3420
3421 * builds/unix/ftconfig.in, builds/vms/ftconfig.h,
3422 include/freetype/config/ftconfig.h: The used #pragma directives only
3423 work with gcc versions 4.6 and higher.
3424
Werner Lembergebf52d62013-11-01 13:26:28 +010034252013-11-01 Werner Lemberg <wl@gnu.org>
3426
Werner Lembergafa0d592013-11-01 22:27:27 +01003427 * docs/CHANGES: Updated.
3428
34292013-11-01 Werner Lemberg <wl@gnu.org>
3430
Werner Lembergebf52d62013-11-01 13:26:28 +01003431 [truetype] Minor code refactoring.
3432
3433 Two benefits: The allocated FDEF (and IDEF) array gets slightly
3434 smaller, and the `ttdebug' demo program has access to function
3435 numbers without additional costs.
3436
3437 Fortunately, no changes to FontForge are necessary – this is the
3438 only external TrueType debugger I know of, but others may exist and
3439 should check the code accordingly.
3440
3441 * src/truetype/ttinterp.h (TT_CallRec): Replace `Cur_Restart' and
3442 `Cur_End' with a pointer to the corresponding `TT_DefRecord'
3443 structure.
3444
3445 * src/truetype/ttinterp.c (DO_JROT, DO_JMPR, DO_JROF, Ins_ENDF,
3446 Ins_CALL, Ins_LOOPCALL, Ins_UNKNOWN, TT_RunIns <Invalid_Opcode>):
3447 Updated.
3448
Werner Lembergee510512013-10-27 07:25:35 +010034492013-10-27 Werner Lemberg <wl@gnu.org>
3450
3451 [sfnt] Implement support for `OS/2' table version 5.
3452
3453 See
3454
3455 http://typedrawers.com/discussion/470/new-microsoft-size-specific-design-selection-mechanism
3456
3457 for the announcement.
3458
3459 * include/freetype/tttables.h (TT_OS2): Add fields
3460 `usLowerPointSize' and `usUpperPointSize'. Since FreeType returns
3461 this structure only as a pointer through `FT_Get_Sfnt_Table', there
3462 shouldn't be any ABI problems.
3463
3464 * src/sfnt/ttload.c (tt_face_load_os2): Implement it.
3465
3466 * docs/CHANGES: Updated.
3467
Werner Lemberg994a8592013-10-24 08:50:34 +020034682013-10-24 Werner Lemberg <wl@gnu.org>
3469
3470 * README.git, docs/CHANGES, docs/INSTALL: Updated.
3471
John Carya0e4a732013-10-24 08:49:08 +020034722013-10-24 John Cary <cary@txcorp.com>
3473
3474 Provide cmake support.
3475
3476 * CMakeLists.txt: New file.
3477
Kenneth Miller4d87ac82013-10-23 20:10:56 +020034782013-10-23 Kenneth Miller <kennethadammiller@yahoo.com>
3479 Werner Lemberg <wl@gnu.org>
3480
3481 Provide support for x64 builds in Visual C++ project files.
3482
3483 * src/builds/win32: Renamed to...
3484 * src/builds/windows: This.
3485
3486 * src/builds/windows/vc2010/*: Updated to handle x64 target.
3487
3488 * src/builds/windows/*.mk, docs/INSTALL.GNU: s/win32/windows/ where
3489 appropriate.
3490
Werner Lemberg604838d2013-10-22 01:10:10 +020034912013-10-22 Werner Lemberg <wl@gnu.org>
3492
3493 * src/base/md5.c, src/base/md5.h: Updated to recent version.
3494
3495 * src/base/ftobjs.c: Updated; `md5.c' no longer uses `free'.
3496
Werner Lembergdb9159c2013-10-22 10:27:50 +02003497 The canonical URL to get updates for this file is
3498
3499 http://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/popa3d/popa3d/md5/
3500
3501 as the author told me in private communication.
3502
Werner Lemberg34efe052013-10-19 21:14:40 +020035032013-10-19 Werner Lemberg <wl@gnu.org>
3504
Werner Lemberg75efc2d2013-10-19 21:46:03 +02003505 [autofit] s/SMALL_TOP/X_HEIGHT/.
3506
3507 * src/autofit/afblue.dat: Updated.
3508
3509 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3510
3511 * src/autofit/aflatin.c, src/autofit/aflatin.h,
3512 src/autofit/atlatin2.c: Updated.
3513
35142013-10-19 Werner Lemberg <wl@gnu.org>
3515
Werner Lemberg34efe052013-10-19 21:14:40 +02003516 * src/autofit/afblue.dat: s/MINOR/DESCENDER/.
3517
3518 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3519
Werner Lemberg955f6a82013-10-16 19:47:57 +020035202013-10-16 Werner Lemberg <wl@gnu.org>
3521
Werner Lemberga5f22a92013-10-17 11:08:25 +02003522 [autofit] Add description strings to script entries.
3523
3524 Currently, this is unused.
3525
3526 * src/autofit/afscript.h: Do it.
3527 * src/autofit/afglobal.c, src/autofit/afpic.c,
3528 src/autofit/aftypes.h: Updated.
3529
35302013-10-16 Werner Lemberg <wl@gnu.org>
3531
Werner Lemberg955f6a82013-10-16 19:47:57 +02003532 [autofit] Improve tracing message for extra light flag.
3533
3534 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Do it.
3535
Chongyu Zhu41632b52013-10-15 11:40:34 +020035362013-10-15 Chongyu Zhu <lembacon@gmail.com>
3537
3538 [arm] Fix thumb2 inline assembly under LLVM.
3539
3540 When using `ADD' with an immediate operand, the instruction is
3541 actually `ADD Rd, Rn, #<imm12>', that is, the maximum of the
3542 immediate operand cannot exceed 4095. It will fail to compile with
3543 LLVM.
3544
3545 However, in GCC, due to some legacy compatibility considerations,
3546 `ADD.W' will be automatically emitted when the immediate operand is
3547 larger than 4095.
3548
3549 * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h
3550 (FT_MulFix_arm) [__GNUC__]: Support clang compiler.
3551
3552 * src/truetype/ttinterp.c (TT_MulFix14_arm) [__GNUC__]: Ditto.
3553
Werner Lembergb6695242013-10-12 10:33:04 +020035542013-10-12 Werner Lemberg <wl@gnu.org>
3555
3556 [autofit] Improve tracing of `latin' hinter.
3557
3558 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Report blue
3559 zone types.
3560 (af_latin_metrics_scale_dim): Report scaling changes due to x height
3561 alignment.
3562 Report scaled stroke width and blue zone values.
3563
Dave Arnolde845a852013-10-03 23:04:29 +020035642013-10-03 Dave Arnold <darnold@adobe.com>
3565
3566 * src/cff/cf2font.c (cf2_computeDarkening): Avoid division by zero.
3567
Werner Lemberg2c56f2a2013-10-07 22:01:00 +02003568 Note that the old code avoided using a region of the piecewise
3569 linear function where the slope was zero. The recovery was to use a
3570 different section of the function, which produced a different,
3571 incorrect amount of darkening.
3572
Darrell Bellert01af71d2013-10-02 22:04:07 +020035732013-10-02 Darrell Bellert <darrell.bellert@hl.konicaminolta.us>
3574
3575 * src/sfnt/ttload.c (tt_face_load_pclt): Fix `pclt_fields'.
3576
Dave Arnold0b330452013-10-02 11:04:06 +020035772013-10-02 Dave Arnold <darnold@adobe.com>
3578
3579 * src/cff/cf2font.c (cf2_computeDarkening): Initialize darkenAmount.
3580
3581 This line was lost in commit 89ca1fd6 (from 2013-06-25). The effect
3582 is to use a previous darkening amount when producing an unhinted,
3583 unscaled outline. This can cause autohint samples in ftgrid and
3584 ftview to be based on darkened CFF outlines instead of unhinted,
3585 undarkened ones.
3586
Dave Arnold3a2cb0f2013-09-29 16:17:02 +020035872013-09-29 Dave Arnold <darnold@adobe.com>
3588
3589 Fix Savannah bug #39295.
3590
3591 The bug was caused by switching to the initial hintmap (the one in
3592 effect when `moveto' executes) just before drawing the final element
3593 in the charstring. This ensured that the path was closed (in both
3594 Character Space and Device Space). But if the final element was a
3595 curve and if the final hintmap was different enough from the initial
3596 one, then the curve was visibly distorted.
3597
3598 The first part of the fix is to draw the final curve using the final
3599 hintmap as specified by the charstring. This corrects the
3600 distortion but does not ensure closing in Device Space. It may
3601 require the rasterizer to automatically generate an extra closing
3602 line. Depending on the hintmap differences, this line could be from
3603 zero to a couple pixels in length.
3604
3605 The second part of the fix covers the case where the charstring
3606 subpath is closed with an explicit line. We now modify that line's
3607 end point to avoid the distortion.
3608
3609 Some glyphs in the bug report font (TexGyreHeros-Regular) that show
3610 the change are:
3611
3612 25ppem S (98)
3613 24ppem eight (52)
3614 25.5ppem p (85)
3615
3616 Curves at the *end* of a subpath are no longer distorted. However,
3617 some of these glyphs have bad hint substitutions in the middle of a
3618 subpath, and these are not affected.
3619
3620 The patch has been tested with a set of 106 fonts that shipped with
3621 Adobe Creative Suite 4, together with 756 Open Source CFF fonts from
3622 Google Fonts. There are 1.5 million glyphs, of which some 20k are
3623 changed with the fix. A sampling of a few hundred of these changes
3624 have been examined more closely, and the changes look good (or at
3625 least acceptable).
3626
3627 * src/cff/cf2hints.h (CF2_GlyphPathRec): New element `pathIsClosing'
3628 to indicate that we synthesize a closepath line.
3629
3630 * src/cff/cf2hints.c (cf2_glyphpath_init): Updated.
3631 (cf2_glyphpath_pushPrevElem): If closing, use first hint map (for
3632 `lineto' operator) and adjust hint zone.
3633 For synthesized closing lines, use end point in first hint zone.
3634 (cf2_glyphpath_lineTo): Take care of synthesized closing lines. In
3635 particular, shift the detection of zero-length lines from character
3636 space to device space.
3637 (cf2_glyphpath_closeOpenPath): Remove assertion.
3638 Updated.
3639
Werner Lembergb75a8b82013-09-25 09:46:36 +020036402013-09-25 Werner Lemberg <wl@gnu.org>
3641
3642 * src/autofit/aflatin.c (af_{grek,cyrl}_uniranges): Fix arrays.
3643
suzuki toshiyaac0f4452013-09-25 10:57:17 +090036442013-09-25 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3645
3646 [bdf, pcf] Refuse non-zero face_index.
Werner Lemberg964317e2013-09-25 09:22:40 +02003647
suzuki toshiyaac0f4452013-09-25 10:57:17 +09003648 Suggested by Akira Tagoh, see
3649
3650 http://lists.gnu.org/archive/html/freetype/2013-09/msg00030.html
3651
Werner Lemberg964317e2013-09-25 09:22:40 +02003652 * src/bdf/bdfdrivr.c (BDF_Face_Init): Return `Invalid_Argument'
3653 error if the font could be opened but non-zero `face_index' is
3654 given.
suzuki toshiyaac0f4452013-09-25 10:57:17 +09003655 * src/pcf/pcfdrivr.c (PCF_Face_Init): Ditto.
3656
3657 * src/type42/t42objs.c (T42_Face_Init): Remove unrequired FT_UNUSED
Werner Lemberg964317e2013-09-25 09:22:40 +02003658 macro for `face_index' because it is validated later.
suzuki toshiyaac0f4452013-09-25 10:57:17 +09003659
Werner Lemberg4de77872013-09-23 22:10:08 +020036602013-09-23 Werner Lemberg <wl@gnu.org>
3661
3662 Fix Savannah bug #40090.
3663
3664 * src/autofit/afcjk.c (af_cjk_metrics_scale): Revert commit
3665 306f8c5d (from 2013-08-25) affecting this function.
3666
Werner Lemberg5a4c5a52013-09-22 22:37:26 +020036672013-09-22 Werner Lemberg <wl@gnu.org>
3668
3669 [autofit] Disunify Cyrillic and Greek handling from Latin.
3670
3671 * src/autofit/afscript.h: Add Cyrillic and Greek.
3672
3673 * src/autofit/afblue.dat (AF_BLUE_STRINGSET_GREK,
3674 AF_BLUE_STRINGSET_CYRL): Add blue zones for Greek and Cyrillic.
3675 (AF_BLUE_STRINGSET_LATN): Fix typo.
3676 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3677
3678 * src/autofit/aflatin.c (af_grek_uniranges, af_cyrl_uniranges): New
3679 arrays.
3680 (af_grek_script_class, af_cyrl_script_class): New scripts.
3681 * src/autofit/aflatin.h: Updated.
3682
Werner Lemberg2cca9662013-09-20 07:23:34 +020036832013-09-20 Werner Lemberg <wl@gnu.org>
3684
3685 * docs/CHANGES: Updated.
3686
Behdad Esfahbod31e726d2013-09-20 07:20:53 +020036872013-09-20 Behdad Esfahbod <behdad@behdad.org>
3688
3689 Fix vertical size of emboldened glyphs.
3690
3691 Cf. https://bugzilla.gnome.org/show_bug.cgi?id=686709
3692
3693 * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Adjust `horiBearingY'
3694 also.
3695
Alexei Podtelezhnikov52381c12013-09-11 23:25:56 -040036962013-09-11 Alexei Podtelezhnikov <apodtele@gmail.com>
3697
3698 * include/freetype/ftoutln.h: Correct FT_Outline_Get_Orientation
3699 algorithm description.
3700
Werner Lemberg3f542492013-09-11 23:08:31 +020037012013-09-11 Werner Lemberg <wl@gnu.org>
3702
3703 [autofit] Improve Hebrew rendering.
3704
3705 This change introduces a new blue zone property
3706 `AF_BLUE_PROPERTY_LATIN_LONG' to make the auto-hinter ignore short
3707 top segments.
3708
3709 * src/autofit/afblue.dat: Fix Hebrew blue strings.
3710 Use AF_BLUE_PROPERTY_LATIN_LONG for AF_BLUE_STRING_HEBREW_TOP.
3711
3712 * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_LONG): New macro.
3713
3714 * src/autofit/afblue.c, src/autofit/afblue.h: Updated.
3715
3716 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Handle
3717 `AF_LATIN_IS_LONG_BLUE'.
3718
3719 * src/autofit/aflatin.h (AF_LATIN_IS_LONG_BLUE): New macro.
3720
Werner Lemberg85a7fdf2013-08-29 21:03:05 +020037212013-08-28 Behdad Esfahbod <behdad@google.com>
3722
3723 [sfnt] Fix frame access while reading WOFF table directory.
3724
3725 * src/sfnt/sfobjs.c (woff_open_font): Using single memory frame
3726 while reading the directory entries for the whole loop.
3727
37282013-08-29 Werner Lemberg <wl@gnu.org>
Werner Lembergd689d1c2013-08-29 17:53:40 +02003729 Behdad Esfahbod <behdad@google.com>
3730
3731 Implement support for WOFF containers.
3732
3733 We simply synthesize a SFNT from the WOFF, create a memory stream
3734 for the new data, and load the SFNT as usual.
3735
3736 Does NOT add any API to access WOFF metadata or private blocks.
3737
3738 * include/freetype/internal/tttypes.h (WOFF_HeaderRec,
3739 WOFF_TableRec): New structures.
3740
3741 * include/freetype/tttags.h (TTAG_wOFF): New macro.
3742
3743 * src/base/ftobjs.c (FT_Open_Face): Set `stream' after calling
3744 `open_face'.
3745
3746 * src/sfnt/sfobjs.c [FT_CONFIG_OPTION_SYSTEM_ZLIB]: Include
3747 `FT_GZIP_H'.
3748 (WRITE_BYTE, WRITE_USHORT, WRITE_ULONG): New temporary macros for
3749 writing to a stream.
3750 (sfnt_stream_close, compare_offsets, woff_open_font): New functions.
3751 (sfnt_open_font): Handle `TTAG_wOFF'.
3752 (sfnt_init_face): Set `stream' after calling `sfnt_open_font'.
3753
3754 * src/truetype/ttobjs.c (tt_face_init): Set `stream' after calling
3755 `sfnt->init_face'.
3756
3757 * src/base/ftobjs.c (open_face): Use a pointer to FT_Stream as an
3758 argument so that a changed stream survives.
3759 Update callers.
3760
37612013-08-28 Werner Lemberg <wl@gnu.org>
Werner Lemberge0f39ae2013-08-28 17:34:01 +02003762
Werner Lembergdc240522013-08-29 17:53:24 +02003763 [gzip] New function `FT_Gzip_Uncompress'.
3764
3765 This is modeled after zlib's `uncompress' function. We need this
3766 for WOFF support.
3767
3768 * include/freetype/ftgzip.h, src/gzip/ftgzip.c (FT_Gzip_Uncompress):
3769 New function.
3770
3771 * src/gzip/rules.mk: Rewrite to better reflect dependencies.
3772
37732013-08-28 Werner Lemberg <wl@gnu.org>
3774
Werner Lemberg5195ecd2013-08-28 17:41:21 +02003775 [autofit] Fix `make multi' compilation.
3776
3777 * src/autofit/afblue.cin, src/autofit/afblue.c: Don't include
3778 `afblue.h' but `aftypes.h'.
3779 * src/autofit/afcjk.c: Don't include `aftypes.h' but `afglobal.h'.
3780
37812013-08-28 Werner Lemberg <wl@gnu.org>
3782
Werner Lemberge0f39ae2013-08-28 17:34:01 +02003783 [autofit] Fix C++ compilation.
3784
3785 * src/autofit/afglobal.c (af_face_globals_get_metrics),
3786 src/autofit/afdummy.c (af_dflt_script_class), src/autofit/afindic.c
3787 (af_deva_script_class): Use proper casts.
3788
Behdad Esfahbodbd3849e2013-08-27 21:43:38 +020037892013-08-27 Behdad Esfahbod <behdad@google.com>
3790
Behdad Esfahbodc799dd62013-08-27 21:46:03 +02003791 * src/sfnt/ttload.c (tt_face_load_font_dir): Fix sign typos.
3792
37932013-08-27 Behdad Esfahbod <behdad@google.com>
3794
Behdad Esfahbodbd3849e2013-08-27 21:43:38 +02003795 FT_Open_Face: Improve external stream handling.
3796
3797 If the font's `clazz->init_face' function wants to swap to new
3798 stream, handling of whether original stream was external could
3799 result to either memory leak or double free. Mark externality into
3800 face flags before calling `init_face' such that the clazz can handle
3801 external streams properly.
3802
3803 * src/base/ftobjs.c (FT_Open_Face): Move code to set
3804 FT_FACE_FLAG_EXTERNAL_STREAM to...
3805 (open_face): This function.
3806
Werner Lemberg5e53db22013-08-27 18:37:39 +020038072013-08-27 Werner Lemberg <wl@gnu.org>
3808
Werner Lembergbcd8c0b2013-08-27 21:36:03 +02003809 Remove `FT_SqrtFixed' function.
3810
3811 It's no longer used.
3812
3813 * include/freetype/internal/ftcalc.h, src/base/ftcalc.c: Do it.
3814
38152013-08-27 Werner Lemberg <wl@gnu.org>
3816
Werner Lemberg5e53db22013-08-27 18:37:39 +02003817 [autofit] While tracing, report script names instead of ID values.
3818
3819 * src/autofit/afglobal.c (af_script_names) [FT_DEBUG_LEVEL_TRACE]:
3820 New array.
3821 * src/autofit/afglobal.h: Updated.
3822
3823 * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
3824 af_cjk_hint_edges): Use `af_script_names'.
3825 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
3826 af_latin_hint_edges): Ditto.
3827
Werner Lemberg92f5a042013-08-26 09:22:27 +020038282013-08-26 Werner Lemberg <wl@gnu.org>
3829
Werner Lemberg278f64b2013-08-26 20:20:03 +02003830 [autofit] Report used script while hinting a glyph.
3831
3832 * src/autofit/afcjk.c (af_cjk_hint_edges), src/autofit/aflatin.c
3833 (af_latin_hint_edges): Implement it.
3834
38352013-08-26 Werner Lemberg <wl@gnu.org>
3836
Werner Lemberg371f5c32013-08-26 20:11:24 +02003837 [autofit] Add support for Hebrew script.
3838
3839 * src/autofit/afblue.dat: Add blue strings for Hebrew.
3840 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3841
3842 * src/autofit/aflatin.c (af_hebr_uniranges): New array.
3843 (af_hebr_script_class): New script.
3844 * src/autofit/aflatin.h, src/autofit/afscript.h: Updated.
3845
38462013-08-26 Werner Lemberg <wl@gnu.org>
3847
Werner Lemberg098121d2013-08-26 18:54:05 +02003848 [autofit] Improve tracing messages.
3849
3850 * src/autofit/afcjk.c (af_cjk_metrics_init_widths): Mention script
3851 ID in tracing message.
3852 (af_cjk_metrics_init_blues): Initialize `axis' outside of the inner
3853 loop.
3854 Improve tracing messages.
3855 (af_cjk_hint_edges) [FT_DEBUG_LEVEL_TRACE]: New variable
3856 `num_actions' to count hinting actions.
3857 Improve tracing messages.
3858
3859 * src/autofit/aflatin.c (af_latin_metrics_init_widths): Mention
3860 script ID in tracing message.
3861 (af_latin_metrics_init_blues, af_latin_hint_edges): Improve tracing
3862 messages.
3863
38642013-08-26 Werner Lemberg <wl@gnu.org>
3865
Werner Lembergffee64a2013-08-26 12:55:48 +02003866 Better tracing of loaded glyphs.
3867
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02003868 Previously, the loading of a glyph was traced at level 4, if at all.
Werner Lembergffee64a2013-08-26 12:55:48 +02003869 With this change, all font loading routines emit a tracing message
3870 at level 1, making it easier to select tracing output (for example
3871 using F2_DEBUG="any:1 afhints:7 aflatin:7").
3872
3873 * src/bdf/bdfdrivr.c (BDF_Glyph_Load): Add tracing message.
3874 * src/cff/cffdrivr.c (cff_glyph_load): Ditto.
3875 * src/cff/cffgload.c (cff_decoder_prepare): Improve tracing
3876 messages.
3877 * src/cid/cidgload.c (cid_load_glyph): Use level 1 for tracing
3878 message.
3879 * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Ditto.
3880 * src/pfr/pfrobjs.c (pfr_slot_load): Add tracing message.
3881 * src/truetype/ttgload.c (TT_Load_Glyph): Ditto.
3882 * src/type1/t1gload.c (T1_Load_Glyph): Ditto.
3883 * src/type42/t42objs.c (T42_GlyphSlot_Load): Ditto.
3884 * src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto.
3885
38862013-08-26 Werner Lemberg <wl@gnu.org>
3887
Werner Lemberg33655a92013-08-26 09:58:50 +02003888 [autofit] Fix script selection.
3889
3890 * src/autofit/afglobal.c (af_face_globals_get_metrics): Use
3891 `AF_SCRIPT_DFLT', not value 0.
3892 Simplify code.
3893
3894 * src/autofit/afscript.h: Sort by script name.
3895
38962013-08-26 Werner Lemberg <wl@gnu.org>
3897
Werner Lemberg92f5a042013-08-26 09:22:27 +02003898 [autofit] Make `dummy' hinter work as expected.
3899
3900 * src/autofit/afdummy.c (af_dummy_hints_init): Properly set scaling
3901 information.
3902 (af_dummy_hints_apply): Scale the glyphs.
3903
Werner Lemberg8b8be782013-08-25 08:01:41 +020039042013-08-25 Werner Lemberg <wl@gnu.org>
3905
Werner Lembergc1eb4452013-08-25 19:47:26 +02003906 [autofit] Make `cjk' module use blue stringsets.
3907
3908 * src/autofit/afcjk.c (AF_CJK_MAX_TEST_CHARACTERS): Removed.
3909 (af_cjk_hani_blue_chars): Removed.
3910 (AF_CJK_BLUE_TYPE_*): Removed.
3911 (af_cjk_metrics_init_blues): Replace AF_CJK_MAX_TEST_CHARACTERS with
3912 AF_BLUE_STRING_MAX_LEN.
3913 Change loops to use offsets (in file `afblue.h') into the new arrays
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02003914 `af_blue_stringsets' and `af_blue_strings' (in file `afblue.c').
Werner Lembergc1eb4452013-08-25 19:47:26 +02003915 Instead of three dimensions (as used in the old blue string array)
3916 we now use properties to do the same, saving one loop nesting level.
3917
3918 * src/autofit/afcjk.h: Remove old enumeration values superseded by
3919 the new data in `afblue.h'.
3920 (AF_CJK_IS_TOP_BLUE, AF_CJK_IS_HORIZ_BLUE, AF_CJK_IS_FILLED_BLUE,
3921 AF_CJK_IS_RIGHT_BLUE): New macros, to be used in
3922 `af_cjk_metrics_init_blues'.
3923 (AF_CJK_BLUE_IS_RIGHT): Remove this now redundant enum value.
3924 (AF_CJK_BLUE_IS_TOP): Renamed to...
3925 (AF_CJK_BLUE_TOP): This.
3926 (AF_CJK_MAX_BLUES): Remove.
3927 (AF_CJKAxisRec): Updated.
3928
39292013-08-25 Werner Lemberg <wl@gnu.org>
3930
Werner Lemberg5c4a23a2013-08-25 19:29:07 +02003931 [autofit] Typo.
3932
3933 * src/autofit/afblue.hin, src/autofit/afblue.c (GET_UTF8_CHAR): Use
3934 cast.
3935
39362013-08-25 Werner Lemberg <wl@gnu.org>
3937
Werner Lemberg306f8c52013-08-25 13:07:08 +02003938 [autofit] Synchronize `cjk' with `latin' module (and vice versa).
3939
3940 * src/autofit/afcjk.c (af_cjk_metrics_init_widths): Add tracing
3941 messages.
3942 (af_cjk_metrics_init_blues): Don't pass blue string array as
3943 argument but use the global array directly.
3944 Use `outline' directly.
3945 Update and add tracing messages.
3946 (af_cjk_metrics_init): Simplify code.
3947 (af_cjk_metrics_scale_dim): Improve tracing message.
3948 (af_cjk_metrics_scale): Synchronize.
3949
3950 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
3951 af_latin_metrics_init_blues): Improve and add tracing messages.
3952
39532013-08-25 Werner Lemberg <wl@gnu.org>
3954
Werner Lemberg0975d682013-08-25 08:37:47 +02003955 [autofit] Make `latin' module use blue stringsets.
3956
3957 * src/autofit/aflatin.c (AF_LATIN_MAX_TEST_CHARACTERS): Removed.
3958 (af_latin_blue_chars): Removed.
3959 (af_latin_metrics_init_blues): Replace AF_LATIN_MAX_TEST_CHARACTERS
3960 with AF_BLUE_STRING_MAX_LEN.
3961 Change loops to use offsets (in file `afblue.h') into the new arrays
3962 `af_blue_stringsets' and `af_blue_strings' (in file `afblue.c').
3963 Use `AF_LATIN_IS_SMALL_TOP_BLUE' macro.
3964
3965 * src/autofit/aflatin.h: Remove old enumeration values superseded by
3966 the new data in `afblue.h'.
3967 (AF_LATIN_IS_TOP_BLUE): Updated definition.
3968 (AF_LATIN_IS_SMALL_TOP_BLUE): New macro.
3969 (AF_LATIN_MAX_BLUES): Remove.
3970 (AF_LatinAxisRec): Updated.
3971
39722013-08-25 Werner Lemberg <wl@gnu.org>
3973
Werner Lembergdb3e5b92013-08-25 08:23:22 +02003974 [autofit] Add blue stringsets.
3975
3976 * src/autofit/aftypes.h: Include `afblue.h'.
3977 (AF_ScriptClassRec): Add `blue_stringset' field.
3978 (AF_DEFINE_SCRIPT_CLASS): Updated.
3979
3980 * src/autofit/autofit.c: Include `afblue.c'.
3981
3982 * src/autofit/afcjk.c (af_hani_script_class), src/autofit/afdummy.c
3983 (af_dflt_script_class), src/autofit/afindic.c
3984 (af_deva_script_class), src/autofit/aflatin.c
3985 (af_latn_script_class), src/autofit/aflatin2.c
3986 (af_ltn2_script_class): Updated.
3987
3988 * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `afblue.c'.
3989
39902013-08-25 Werner Lemberg <wl@gnu.org>
3991
Werner Lemberg8b8be782013-08-25 08:01:41 +02003992 [autofit] Introduce data file for blue strings.
3993
3994 The idea is to have a central file which gets processed by a Perl
3995 script to create proper `.c' and `.h' files using templates. There
3996 are two other reasons to do that:
3997
3998 . The data file should be easily readable. We use UTF-8 encoding
3999 which then gets converted to single bytes.
4000
4001 . Since the number of supported scripts will increase soon, the
4002 current usage of blue string arrays is a waste of space. Using
4003 the Perl script it is possible to imitate jagged arrays,
4004 defining enumeration constants as offsets into the arrays.
4005
4006 This commit only adds files without changing any functionality.
4007
4008 * src/autofit/afblue.dat: New data file.
4009 * src/tools/afblue.pl: New Perl script for processing `afblue.dat'.
4010
4011 * src/autofit/afblue.cin, src/autofit/afblue.hin: New template files
4012 for...
4013 * src/autofit/afblue.c, src/autofit/afblue.c: New source files.
4014 To avoid a dependency on Perl, we add them too.
4015
Alexei Podtelezhnikovfc32e1c2013-08-19 22:57:05 -040040162013-08-19 Alexei Podtelezhnikov <apodtele@gmail.com>
4017
Werner Lemberg71c0ad62013-08-27 21:30:09 +02004018 [base] Enable new algorithm for `BBox_Cubic_Check'.
Alexei Podtelezhnikovfc32e1c2013-08-19 22:57:05 -04004019
Werner Lemberg71c0ad62013-08-27 21:30:09 +02004020 * src/base/ftbbox.c: Enable new BBox_Cubic_Check algorithm, remove
4021 the old one.
4022 Improve comments.
Alexei Podtelezhnikovfc32e1c2013-08-19 22:57:05 -04004023
Werner Lemberg6bfa2632013-08-18 18:34:05 +020040242013-08-18 Werner Lemberg <wl@gnu.org>
4025
Werner Lemberg4af44442013-08-18 18:46:30 +02004026 * builds/unix/unix-def.in (freetype2.pc): Don't set executable bit.
4027
40282013-08-18 Werner Lemberg <wl@gnu.org>
4029
Werner Lemberg6bfa2632013-08-18 18:34:05 +02004030 Fix Savannah bug #39804.
4031
4032 * builds/unix/configure.raw (LIBPNG): Define and export.
4033 * builds/unix/freetype-config.in, builds/unix/freetype2.in: Handle
4034 libpng.
4035
Alexei Podtelezhnikov32a7d872013-08-17 22:19:21 -040040362013-08-17 Alexei Podtelezhnikov <apodtele@gmail.com>
4037
4038 [base] Clean up BBox_Conic_Check.
4039
4040 * src/base/ftbbox.c (BBox_Conic_Check): Remove redundant checks for
4041 extremum at the segment ends, which are already within the bbox.
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02004042 Slightly modify calculations.
Alexei Podtelezhnikov32a7d872013-08-17 22:19:21 -04004043
Alexei Podtelezhnikov1a9c3d12013-08-15 22:51:42 -040040442013-08-15 Alexei Podtelezhnikov <apodtele@gmail.com>
4045
4046 [base] Finish experimental (disabled) BBox_Cubic_Check implementation.
4047
4048 * src/base/ftbbox.c (BBox_Cubic_Check): Scale arguments to improve
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02004049 accuracy and avoid overflows.
Alexei Podtelezhnikov1a9c3d12013-08-15 22:51:42 -04004050
Alexei Podtelezhnikov61a65512013-08-13 22:28:57 -040040512013-08-13 Alexei Podtelezhnikov <apodtele@gmail.com>
4052
4053 [base] Refactor experimental (disabled) BBox_Cubic_Check.
4054
4055 * src/base/ftbbox.c (BBox_Cubic_Check): Implement the minimum search
Alexei Podtelezhnikov1a9c3d12013-08-15 22:51:42 -04004056 as the mirror image of the maximum search implemented here...
4057 (update_max): New function.
Alexei Podtelezhnikov61a65512013-08-13 22:28:57 -04004058
John Tytgat9bcfab82013-08-06 08:55:19 +020040592013-08-06 John Tytgat <John.Tytgat@esko.com>
4060
4061 Fix Savannah bug #39702.
4062
4063 * src/cff/cffload.c (cff_index_get_pointers): Check for `cur_offset
4064 != 0'; this stronger test is mandated by the CFF specification.
4065 Fix test for INDEX structures which have one or more empty entries
4066 at the end.
4067
Werner Lembergcc25e3a2013-08-05 08:46:15 +020040682013-08-05 Werner Lemberg <wl@gnu.org>
4069
Werner Lemberga32682f2013-08-06 00:21:46 +02004070 Fix gcc pragmas, part 2.
4071
4072 * src/truetype/ttinterp.c (TT_MulFix14_long_long,
4073 TT_DotFix14_long_long): `#pragma gcc diagnostic {push,pop}' has been
4074 introduced with gcc version 4.6.
4075
40762013-08-05 Werner Lemberg <wl@gnu.org>
4077
Werner Lemberg69e524d2013-08-05 23:38:32 +02004078 Fix gcc pragmas.
4079
4080 * src/truetype/ttinterp.c (TT_MulFix14_long_long,
4081 TT_DotFix14_long_long): Older gcc versions don't accept diagnostic
4082 pragmas within a function body.
4083
40842013-08-05 Werner Lemberg <wl@gnu.org>
4085
Werner Lemberg9e6de362013-08-05 16:37:21 +02004086 Fix Savannah bug #39700.
4087
4088 * builds/unix/ftconfig.h: Synchronize with
4089 `include/freetype/config/ftconfig.h'.
4090
4091 * builds/vms/ftconfig.h: Ditto.
4092 Make the differences to the master `ftconfig.h' file as small as
4093 possible for easier maintainance.
4094
40952013-08-05 Werner Lemberg <wl@gnu.org>
4096
Werner Lembergcc25e3a2013-08-05 08:46:15 +02004097 [autofit] Improve handling of `near' points.
4098
4099 Points which are very near to each other are now marked as such.
4100 The `weak' flag is then computed by using the `in' vector of the
4101 first and the `out' vector of the last point of a group of near
4102 points.
4103
4104 For example, this fixes the rendering of glyph `Oslash' in
4105 `Roboto-Thin.ttf'.
4106
4107 * src/autofit/afhints.h (AF_Flags): New value `AF_FLAGS_NEAR'.
4108
4109 * src/autofit/afhints.c (af_glyph_hints_reload): Introduce
4110 the heuristic value `near_limit' to decide whether the current point
4111 is near to the previous one, then set `AF_FLAG_NEAR' accordingly.
4112 Store good `in' vector (of last non-near point) in
4113 `last_good_in_{x,y}' and use it as an argument to
4114 `ft_corner_is_flat' if necessary.
4115
Werner Lemberg74a9b672013-08-02 14:53:32 +020041162013-08-02 Werner Lemberg <wl@gnu.org>
4117
Werner Lemberg0d28a7d2013-08-02 22:59:43 +02004118 * include/freetype/ftcffdrv.h: Improve documentation.
4119 This is based on blog entries from David Lemon and Dave Arnold (both
4120 from Adobe) with kind permission. Dave also helped in
4121 proof-reading.
4122
41232013-08-02 Werner Lemberg <wl@gnu.org>
4124
Werner Lemberg456cc442013-08-02 20:25:21 +02004125 [autofit] Move declaration of scripts into separate file.
4126
4127 This has the benefit that we don't need to duplicate the data at
4128 different places.
4129
4130 * src/autofit/afscript.h: New file.
4131
4132 * src/autofit/aftypes.h (AF_Script): Include `afscript.h' to define
4133 the enumeration values.
4134
4135 * src/autofit/afglobal.c: Include `afscript.h' to get the script
4136 specific header files.
4137 (af_script_classes): Include `afscript.h' to fill this array.
4138
4139 * src/autofit/afpic.c: Include `afscript.h' to get the script
4140 specific header files.
4141 (autofit_module_class_pic_init): Include `afscript.h' for
4142 initialization.
4143 * src/autofit/afpic.h (AF_SCRIPT_CLASSES_COUNT,
4144 AF_SCRIPT_CLASSES_REC_COUNT): Removed. Use `AF_SCRIPT_MAX' instead.
4145
4146 * src/autofit/rules.mk (AUTOF_DRV_H): Updated.
4147
41482013-08-02 Werner Lemberg <wl@gnu.org>
4149
Werner Lemberg773601d2013-08-02 19:51:17 +02004150 [autofit] Move declaration of writing systems into separate file.
4151
4152 This has the benefit that we don't need to duplicate the data at
4153 different places.
4154
4155 * src/autofit/afwrtsys.h: New file.
4156
4157 * src/autofit/aftypes.h (AF_WritingSystem): Include `afwrtsys.h' to
4158 define the enumeration values.
4159
4160 * src/autofit/afglobal.c: Include `afwrtsys.h' to get the writing
4161 system specific header files.
4162 Include `afpic.h'.
4163 (af_writing_system_classes): Include `afwrtsys.h' to fill this
4164 array.
4165
4166 * src/autofit/afpic.c: Include `afwrtsys.h' to get the writing
4167 system specific header files.
4168 (autofit_module_class_pic_init): Include `afwrtsys.h' for
4169 initialization.
4170 * src/autofit/afpic.h (AF_WRITING_SYSTEM_CLASSES_COUNT,
4171 AF_WRITING_SYSTEM_CLASSES_REC_COUNT): Removed. Use
4172 `AF_WRITING_SYSTEM_MAX' instead.
4173
41742013-08-02 Werner Lemberg <wl@gnu.org>
4175
Werner Lemberg74a9b672013-08-02 14:53:32 +02004176 [sfnt] Fix compilation with g++.
4177
4178 * src/sfnt/pngshim.c (error_callback, read_data_from_FT_stream): Use
4179 cast.
4180 (Load_SBit_Png): Pacify compiler.
4181
Werner Lemberg89a529f2013-08-02 14:50:23 +020041822013-08-02 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4183 Werner Lemberg <wl@gnu.org>
4184
4185 [autofit] Fix `make multi'.
4186
4187 * include/freetype/config/ftconfig.h (FT_LOCAL_ARRAY,
4188 FT_LOCAL_ARRAY_DEF): New macros.
4189
4190 * src/autofit/afglobal.c (af_writing_system_classes,
4191 af_script_classes): Use FT_LOCAL_ARRAY_DEF.
4192 * src/autofit/afglobal.h: Declare `af_writing_system_classes' and
4193 `af_script_classes'.
4194 * src/autofit/afloader.c: Include `afpic.h'.
4195
Werner Lemberge8ed2d62013-08-01 12:20:20 +020041962013-08-01 Werner Lemberg <wl@gnu.org>
4197
4198 Another round of cppcheck nitpicks.
4199
4200 The call was (from the top-level of the FreeType tree):
4201
4202 cppcheck --force \
4203 --enable=all \
4204 -I /usr/include \
4205 -I /usr/local/include \
4206 -I /usr/lib/gcc/i586-suse-linux/4.7/include \
4207 -I include \
4208 -I include/freetype \
4209 -I include/freetype/config \
4210 -I include/freetype/internal \
4211 -DFT2_BUILD_LIBRARY \
4212 . &> cppcheck.log
4213
4214 using cppcheck git commit f7e93f99.
4215
4216 Note that cppcheck still can't handle `#include FOO' (with `FOO' a
4217 macro).
4218
4219 */* Improve variable scopes.
4220 */* Remove redundant initializations which get overwritten.
4221
4222 * src/gxvalid/*: Comment out redundant code or guard it with
4223 FT_DEBUG_LEVEL_TRACE.
4224
Werner Lemberg5d6a3602013-07-30 23:17:04 +020042252013-07-30 Werner Lemberg <wl@gnu.org>
4226
Werner Lemberg72f5ff52013-07-31 22:49:29 +02004227 [autofit] Introduce `writing systems'.
4228
4229 This patch adds a new top level to the auto-hinter's script class
4230 hierarchy. It defines `writing systems' which can contain multiple
4231 scripts.
4232
4233 For example, the `latin' writing system (in file `aflatin.c') is
4234 able to support scripts like Latin, Cyrillic, Armenian, etc., which
4235 can be handled similarly.
4236
4237 Scripts are now named using four-letter OpenType tags.
4238
4239 * src/autofit/aftypes.h (AF_ScriptClassRec): Move relevant members
4240 to...
4241 (AF_WritingSystemClassRec): This new structure. It holds pointers
4242 to functions which can be shared among related scripts.
4243 (AF_WritingSystem): New enumeration.
4244 (AF_Script): Revised values using four-letter tags.
4245 (AF_DEFINE_WRITING_SYSTEM_CLASS): New macro.
4246 (AF_DEFINE_SCRIPT_CLASS): Updated.
4247
4248 * src/autofit/afglobal.c (af_writing_system_classes): New global,
4249 constant array.
4250 (af_script_classes): Updated.
4251 (af_face_globals_free): Updated.
4252 Remove assertion.
4253 (af_face_globals_get_metrics): Updated.
4254
4255 * src/autofit/afglobal.h (AF_SCRIPT_FALLBACK)
4256 [!AF_CONFIG_OPTION_CJK]: Handle this case.
4257
4258 * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph):
4259 Updated.
4260
4261 * src/autofit/afpic.c (autofit_module_class_pic_init): Updated;
4262 initialize structures for both writing systems and scripts.
4263 * src/autofit/afpic.h: Updated.
4264 (AF_WRITING_SYSTEM_CLASSES_GET): New macro.
4265
4266 * src/autofit/afcjk.c (af_cjk_writing_system_class): New writing
4267 system.
4268 (af_cjk_uniranges): Renamed to...
4269 (af_hani_uniranges): This.
4270 (af_cjk_script_class): Reduced and renamed to...
4271 (af_hani_script_class): This.
4272 * src/autofit/afcjk.h: Updated.
4273
4274 * src/autofit/afdummy.c (af_dummy_writing_system_class): New writing
4275 system.
4276 (af_dummy_script_class): Reduced and renamed to...
4277 (af_dflt_script_class): This.
4278 * src/autofit/afdummy.h: Updated.
4279
4280 * src/autofit/afindic.c (af_indic_writing_system_class): New writing
4281 system.
4282 (af_indic_uniranges): Renamed to...
4283 (af_deva_uniranges): This.
4284 (af_indic_script_class): Reduced and renamed to...
4285 (af_deva_script_class): This.
4286 * src/autofit/afcjk.h: Updated.
4287
4288 * src/autofit/aflatin.c (af_latin_writing_system_class): New writing
4289 system.
4290 (af_latin_uniranges): Renamed to...
4291 (af_latn_uniranges): This.
4292 (af_latin_script_class): Reduced and renamed to...
4293 (af_latn_script_class): This.
4294 * src/autofit/aflatin.h: Updated.
4295
4296 * src/autofit/aflatin2.c (af_latin2_writing_system_class): New
4297 writing system.
4298 (af_latin2_uniranges): Renamed to...
4299 (af_ltn2_uniranges): This.
4300 Synchronize ranges with `latin'.
4301 (af_latin2_script_class): Reduced and renamed to...
4302 (af_ltn2_script_class): This.
4303 * src/autofit/aflatin2.h: Updated.
4304
43052013-07-30 Werner Lemberg <wl@gnu.org>
4306
Werner Lemberg5d6a3602013-07-30 23:17:04 +02004307 [autofit] Variable renaming.
4308
4309 * src/autofit/aftypes.h (AF_ScriptMetricsRec):
4310 s/clazz/script_class/.
4311 Update all users.
4312
suzuki toshiya2b29ed62013-07-30 13:55:29 +090043132013-07-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4314
4315 Ignore libpng-config under cross-building configuration,
4316 because it will return the flags for the hosting environment.
4317
4318 * builds/unix/configure.raw: Ignore libpng-config when
4319 `cross_compiling' == yes.
4320
suzuki toshiyaf2e7f1e2013-07-30 13:32:57 +090043212013-07-30 Behdad Esfahbod <behdad@google.com>
4322
4323 Prevent division by zero by a transparent color.
4324
4325 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra):
4326 Return 0 immediately, when alpha channel is zero.
4327
Behdad Esfahbod21c32b02013-07-25 21:53:18 +020043282013-07-25 Behdad Esfahbod <behdad@google.com>
4329
4330 Add FT_FACE_FLAG_COLOR and FT_HAS_COLOR.
4331
4332 Also disambiguate Google's color bitmap tables.
4333
4334 * include/freetype/freetype.h (FT_FACE_FLAG_COLOR, FT_HAS_COLOR):
4335 New macros.
4336
4337 * include/freetype/internal/tttypes.h (TT_SbitTableType): Add
4338 TT_SBIT_TABLE_TYPE_CBLC.
4339
4340 * src/sfnt/sfobjs.c (sfnt_load_face): Handle FT_FACE_FLAG_COLOR.
4341
4342 * src/sfnt/ttsbit.c (tt_face_load_sbit,
4343 tt_face_load_strike_metrics, tt_face_load_sbit_image): Handle
4344 TT_SBIT_TABLE_TYPE_CBLC.
4345
suzuki toshiyab4725cb2013-07-24 14:25:39 +090043462013-07-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4347
4348 [sfnt] Fix for `make multi' target.
4349
4350 * src/sfnt/pngshim.c (Load_SBit_Png): Use FT_LOCAL_DEF().
4351
Werner Lemberg6a7df622013-07-20 10:48:37 +020043522013-07-20 Werner Lemberg <wl@gnu.org>
4353
4354 * docs/INSTALL.GNU: Updated.
4355
Behdad Esfahbodff269522013-07-20 08:02:39 +020043562013-07-20 Behdad Esfahbod <behdad@google.com>
4357
4358 [sfnt] Fix `sbix' table version handling.
4359
4360 * src/sfnt/ttsbit.c (tt_face_load_sbit) [TT_SBIT_TABLE_TYPE_SBIX]:
4361 USHORT version numbers are to be considered as `minor'.
4362
Werner Lemberg05c14212013-07-19 23:11:23 +020043632013-07-19 Werner Lemberg <wl@gnu.org>
4364
4365 [autofit] Fix segment classification for blue zones.
4366
4367 The old code (essentially unchanged since the very beginning)
4368 incorrectly handled this configuration
4369
4370 x -o- x
4371 / \
4372 / \
4373 / \
4374 o o
4375
4376 as flat and this
4377
4378 o o
4379 / /
4380 x| x|
4381 | |
4382 o---------------o
4383
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02004384 as round. (`o' and `x' are on and off points, respectively).
Werner Lemberg05c14212013-07-19 23:11:23 +02004385
4386 This is a major change which should improve the rendering results
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02004387 enormously for many TrueType fonts, especially in the range approx.
Werner Lemberg05c14212013-07-19 23:11:23 +02004388 20-40ppem, fixing the appearance of many overshoots.
4389
4390 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Look at the
4391 first and last points of the segment, not the points right before
4392 and after.
4393
43942013-07-19 Behdad Esfahbod <behdad@google.com>
Werner Lemberg01705392013-07-18 13:13:12 +02004395
Behdad Esfahbod778a7e62013-07-19 14:28:28 +02004396 [sfnt] `sbix' fix-ups.
4397
4398 * src/sfnt/sfobjs.c (sfnt_load_face): Apple's `sbix' color bitmaps
4399 are rendered scaled and then the `glyf' outline rendered on top. We
4400 don't support that yet, so just ignore the `glyf' outline and
4401 advertise it as a bitmap-only font.
4402
4403 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
4404 [TT_SBIT_TABLE_TYPE_SBIX]: Return metrics in 26.6 units.
4405 (tt_face_load_sbix_image): Typo.
4406
44072013-07-18 Behdad Esfahbod <behdad@google.com>
4408
Werner Lemberg01705392013-07-18 13:13:12 +02004409 [sfnt] Add support for Apple's `sbix' color bitmap table.
4410
4411 * include/freetype/internal/tttypes.h (TT_SBit_MetricsRec): Widen
4412 fields to FT_Short and FT_UShort, respectively.
4413 (TT_SBitTableType): New enumeration.
4414 (TT_FaceRec): Add `sbit_table_type' field.
4415
4416 * include/freetype/tttags.h (TTAG_sbix): New macro.
4417
4418 * src/sfnt/pngshim.c (Load_SBit_Png): Pass a more generic
4419 FT_GlyphSlot argument instead FT_Bitmap.
4420 Add flag to control map and metrics handling.
4421 Update all users.
4422
4423 * src/sfnt/ttsbit.c: Include `ttmtx.h'.
4424 (tt_face_load_eblc): Renamed to...
4425 (tt_face_load_sbit): This.
4426 Handlic `sbix' bitmaps.
4427 (tt_face_free_eblc): Renamed to...
4428 (tt_face_load_sbit): This.
4429 Updated.
4430 (tt_face_load_strike_metrics): Handle `sbix' bitmaps.
4431 (tt_face_load_sbix_image): New function.
4432 (tt_sbit_decoder_alloc_bitmap, tt_sbit_decoder_load_image,
4433 tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned,
4434 tt_sbit_decoder_load_compound, tt_sbit_decoder_load_png,
4435 tt_sbit_decoder_load_image, tt_sbit_decoder_load_bitmap): Don't pass
4436 and handle load flags.
4437 (tt_sbit_decoder_load_bitmap) [!FT_CONFIG_OPTION_USE_PNG]: Better
4438 handle formats 17-19.
4439 Move color to grayscale conversion to...
4440 (tt_face_load_sbit_image): Here.
4441 Handle `sbix' bitmaps.
4442
4443 * src/sfnt/pngshim.h: Updated.
4444 * src/sfnt/ttsbit.h: Updated.
4445 * src/sfnt/sfdriver.c: Updated.
4446
Werner Lemberg274207e2013-07-18 12:38:57 +020044472013-07-18 Werner Lemberg <wl@gnu.org>
4448
4449 [sfnt] Ignore invalid magic number in `head' or `bhed'.
4450
4451 Other font engines seem to ignore it also. Problem reported by
4452 Hin-Tak Leung <htl10@users.sourceforge.net>.
4453
4454 * src/sfnt/ttload.c (check_table_dir): Don't abort but warn only if
4455 we have an invalid magic number.
4456
Werner Lemberg9a7951d2013-07-16 15:25:24 +020044572013-07-16 Werner Lemberg <wl@gnu.org>
4458
4459 [smooth] Fix segfault caused by previous commit.
4460
4461 * src/smooth/ftgrays.c (gray_set_cell): Always compute
4462 `ras.invalid'.
4463
David Turnera5f33ee2013-07-16 12:40:03 +020044642013-07-16 David Turner <digit@google.com>
4465
David Turner89929ec2013-07-16 13:36:07 +02004466 [smooth] Improve performance.
4467
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02004468 Provide a work-around for an ARM-specific performance bug in GCC.
David Turner89929ec2013-07-16 13:36:07 +02004469 This speeds up the rasterizer by more than 5%.
4470
4471 Also slightly optimize `set_gray_cell' and `gray_record_cell' (which
4472 also improves performance on other platforms by a tiny bit (<1%).
4473
4474 * src/smooth/ftgrays.c (FT_DIV_MOD): New macro.
4475 Use it where appropriate.
4476
4477 (gray_record_cell, gray_set_cell, gray_move_to,
4478 gray_convert_glyph_inner): Streamline condition handling.
4479
44802013-07-16 David Turner <digit@google.com>
4481
David Turnerf66d48e2013-07-16 13:18:00 +02004482 [truetype] Add assembler code for TT_MulFix14 and TT_DotFix14.
4483
4484 This patch provides slightly optimized versions for ARM, x86, and
4485 x86_64 CPUs if built with GCC.
4486
4487 Also remove some dead code.
4488
4489 * src/truetype/ttinterp.c (TT_MulFix14_arm, TT_MulFix14_long_long,
4490 TT_DotFix14_long_long): New functions.
4491
44922013-07-16 David Turner <digit@google.com>
4493
David Turnerb2890882013-07-16 12:52:18 +02004494 Optimize FT_MulFix for x86_64 GCC builds.
4495
4496 This patch provides an optimized `FT_MulFix' implementation for
4497 x86_64 machines when FreeType is built with GCC, or compatible
4498 compilers like Clang.
4499
4500 Example:
4501 bin/ftbench -p -t 5 -s 14 -f 0008 Arial.ttf
4502
4503 Before:
4504
4505 Load 4.863 us/op
4506 Load_Advances (Normal) 4.816 us/op
4507 Load_Advances (Fast) 0.028 us/op
4508 Render 2.753 us/op
4509 Get_Glyph 0.463 us/op
4510 Get_CBox 0.077 us/op
4511 Get_Char_Index 0.023 us/op
4512 Iterate CMap 13.898 us/op
4513 New_Face 12.368 us/op
4514 Embolden 0.028 us/op
4515 Get_BBox 0.302 us/op
4516
4517 After:
4518
4519 Load 4.617 us/op
4520 Load_Advances (Normal) 4.645 us/op
4521 Load_Advances (Fast) 0.027 us/op
4522 Render 2.789 us/op
4523 Get_Glyph 0.460 us/op
4524 Get_CBox 0.077 us/op
4525 Get_Char_Index 0.024 us/op
4526 Iterate CMap 13.403 us/op
4527 New_Face 12.278 us/op
4528 Embolden 0.028 us/op
4529 Get_BBox 0.301 us/op
4530
4531 * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h
4532 (FT_MulFix_x86_64): New function.
4533
45342013-07-16 David Turner <digit@google.com>
4535
David Turnera5f33ee2013-07-16 12:40:03 +02004536 Speed up ARMv7 support.
4537
4538 When building for ARMv7 with thumb2 instructions, the optimized
4539 `FT_MulFix_arm' assembly routine was not being used.
4540
4541 The reason for this is in the `ftconfig.h' header, namely:
4542
4543 - The assembly routine uses the `smull' instruction which is not
4544 available when generating Thumb-1 machine code. It is available
4545 in Thumb-2 mode, though.
4546
4547 - The header was written a long time ago before Thumb-2 became
4548 widely popular (e.g. with Android). So it simply doesn't use the
4549 assembly routine if the `__thumb__' built-in macro is defined.
4550
4551 - When compiling in Thumb-2 mode, the compiler will define both
4552 `__thumb__' and `__thumb2__'.
4553
4554 By checking for `(__thumb2__ || !__thumb__)', we ensure that the
4555 assembly routine is only avoided when generating Thumb-1 code.
4556
4557 Given that this is performance-sensitive function, this improves
4558 `ftbench' as follows on a Galaxy Nexus:
4559
4560 Before (us/op) After (us/op)
4561
4562 - loading Arial.ttf glyphs at 14 ppem [1]
4563
4564 Load 34.285 33.098
4565
4566 - same operation with the light auto-hinter [2]
4567
4568 Load 31.317 29.590
4569
4570 - same operation without hinting [3]
4571
4572 Load 6.143 5.376
4573
4574 - loading Arial.ttf advances at 14 ppem [4]
4575
4576 Load_Advances (normal) 34.216 33.016
4577 Load_Advances (fast) 0.176 0.176
4578
4579 [1] ftbench -t 5 -p -s 14 -b a -f 0008 Arial.ttf
4580 [2] ftbench -t 5 -p -s 14 -b a -r 1 -f 0028 Arial.ttf
4581 [3] ftbench -t 5 -p -s 14 -b a -f 000a Arial.ttf
4582 [4] ftbench -t 5 -p -s 14 -b b -f 0008 Arial.ttf
4583
4584 * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h
4585 (FT_MULFIX_ASSEMBLER): Fix handling for ARMv7.
4586
Werner Lemberge12fc772013-06-28 07:57:32 +020045872013-06-28 Werner Lemberg <wl@gnu.org>
4588
4589 * docs/CHANGES: Updated.
4590
Werner Lemberg680c1d42013-06-27 17:21:59 +020045912013-06-27 Werner Lemberg <wl@gnu.org>
4592
4593 * src/winfonts/winfnt.c (FNT_Load_Glyph): Fix bitmap width guard.
4594
Werner Lembergc7cc9eb2013-06-25 07:24:02 +020045952013-06-25 Werner Lemberg <wl@gnu.org>
4596
Werner Lembergb8850fc2013-06-26 12:22:10 +02004597 [cff] Add darkening limit to `darkening-parameters'.
4598
4599 * src/cff/cffdrivr.c (cff_property_set): Add check.
4600
46012013-06-25 Werner Lemberg <wl@gnu.org>
4602
Werner Lemberg89ca1fd2013-06-25 23:28:02 +02004603 [cff] Add `darkening-parameters' property.
4604
4605 * include/freetype/ftcffdrv.h: Document it.
4606
4607 * src/cff/cffdrivr.c (cff_property_set, cff_property_get): Handle
4608 `darkening-parameters' property.
4609
4610 * src/cff/cf2font.h (CF2_FontRec): Add `darkenParams' array.
4611
4612 * src/cff/cf2font.c (cf2_computeDarkening): Add `darkenParams'
4613 argument and use it.
4614 Update all callers.
4615
4616 * src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Copy
4617 `darken_params' values.
4618
4619 * src/cff/cffobjs.h (CFF_DriverRec): Add `darken_params' array.
4620
4621 * src/cff/cffobjs.c (cff_driver_init): Set default values for
4622 `darken_params'.
4623
46242013-06-25 Werner Lemberg <wl@gnu.org>
4625
Werner Lembergfad93262013-06-25 10:41:37 +02004626 [docmaker] Code shuffling.
4627
4628 * src/tools/docmaker/tohtml.py (re_url): Move regexp...
4629 * src/tools/docmaker/sources.py: ... to this file.
4630
46312013-06-25 Werner Lemberg <wl@gnu.org>
4632
Werner Lemberg8bdc4072013-06-25 10:20:53 +02004633 [docmaker] Remove unused functions.
4634
4635 * src/tools/docmaker/content.py (DocMarkup.get_start,
4636 DocBlock.get_markup_name): Removed.
4637 * src/tools/docmaker/tohtml.py (html_quote0, dump_html_code,
4638 HtmlFormatter.make_html_words): Removed.
4639
46402013-06-25 Werner Lemberg <wl@gnu.org>
4641
Werner Lembergffb8b472013-06-25 09:09:30 +02004642 * builds/freetype.mk (dll): Remove target.
4643
4644 Problem reported by Jörg Günnewig <joerg.guennewig@googlemail.com>.
4645
46462013-06-25 Werner Lemberg <wl@gnu.org>
4647
Werner Lembergc7cc9eb2013-06-25 07:24:02 +02004648 [docmaker] Recognise URLs.
4649
4650 * src/tools/docmaker/tohtml.py (re_url): New regular expression.
4651 (make_html_para): Use it.
4652
Werner Lemberg25b7da52013-06-19 10:23:36 +020046532013-06-19 Werner Lemberg <wl@gnu.org>
4654
Werner Lembergfe4f5712013-06-19 23:27:47 +02004655 * Version 2.5.0.1 released.
4656 ===========================
4657
4658
4659 Tag sources with `VER-2-5-0-1'.
4660
4661 * include/freetype/config/ftoption.h: Undefine
4662 CFF_CONFIG_OPTION_OLD_ENGINE.
4663 * devel/ftoption.h: Define CFF_CONFIG_OPTION_OLD_ENGINE.
4664
46652013-06-19 Werner Lemberg <wl@gnu.org>
4666
Werner Lemberg609f0ca2013-06-19 14:41:47 +02004667 * builds/unix/install.mk (install): Don't create `cache' directory.
4668
4669 Found by Peter Breitenlohner <peb@mppmu.mpg.de>.
4670
46712013-06-19 Werner Lemberg <wl@gnu.org>
4672
Werner Lemberg25b7da52013-06-19 10:23:36 +02004673 * Version 2.5.0 released.
4674 =========================
4675
4676
4677 Tag sources with `VER-2-5-0'.
4678
4679 * docs/VERSION.DLL: Update documentation and bump version number to
4680 2.5.0.
4681
4682 * README, Jamfile (RefDoc),
4683 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
4684 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
4685 builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
4686 builds/win32/visualc/freetype.dsp,
4687 builds/win32/visualc/freetype.vcproj,
4688 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
4689 builds/win32/visualce/freetype.vcproj,
4690 builds/win32/visualce/index.html,
4691 builds/wince/vc2005-ce/freetype.vcproj,
4692 builds/wince/vc2005-ce/index.html,
4693 builds/wince/vc2008-ce/freetype.vcproj,
4694 builds/wince/vc2008-ce/index.html: s/2.4.12/2.5.0/, s/2412/250/.
4695
4696 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 5.
4697 (FREETYPE_PATCH): Set to 0.
4698
4699 * builds/unix/configure.raw (version_info): Set to 16:2:10.
4700
4701 * src/base/ftobjs.c (FT_Open_Face): Pacify compiler.
4702 * src/truetype/ttinterp.c (Ins_MSIRP, Ins_MIRP): Ditto.
4703
Werner Lembergf56691a2013-06-18 10:17:48 +020047042013-06-18 Werner Lemberg <wl@gnu.org>
4705
4706 Fix Savannah bug #39269.
4707
4708 * src/base/ftgloadr.c (FT_GlyphLoader_CheckPoints): Free memory in
4709 case of reacollocation failures.
4710
Andrew Church67cf7a82013-06-18 09:35:34 +020047112013-06-18 Andrew Church <achurch+savannah@achurch.org>
4712
4713 Fix Savannah bug #39266.
4714
4715 If memory allocations fail at certain points while opening a font,
4716 FreeType can either crash due to a NULL dereference or leak memory.
4717
4718 * include/freetype/internal/ftobjs.c (FT_Face_InternalRec,
4719 FT_LibraryRec): Make `refcount' a signed integer. If, for example,
4720 FT_Open_Face() fails in a memory allocation before the face's
4721 reference count is set to 1, a subsequent `FT_Done_Library' call
4722 would otherwise loop over `FT_Done_Face' 2^32 times before freeing
4723 the face.
4724
4725 * src/base/ftobjs.c (open_face): Initialize `stream' and friends
4726 earlier.
4727 (FT_Open_Face) <Fail>: Behave correctly if `node' is NULL.
4728 (FT_Destroy_Module) <Fail>: Check that `renderer_clazz' is valid.
4729
47302013-06-14 Werner Lemberg <wl@gnu.org>
Werner Lembergd7e34442013-06-14 18:33:39 +02004731
4732 * src/smooth/ftgrays.c One final pragma to silence 64-bit MSVC.
4733
Dave Arnoldcb23a622013-06-13 07:46:32 +020047342013-06-06 Dave Arnold <darnold@adobe.com>
4735 Werner Lemberg <wl@gnu.org>
4736
4737 [cff] Add code to Adobe's engine to handle ppem > 2000.
4738
4739 * src/cff/cffgload.c (cff_slot_load): If we get
4740 FT_Err_Glyph_Too_Big, retry unhinted and scale up later on.
4741
Andrew Church67cf7a82013-06-18 09:35:34 +020047422013-06-12 Werner Lemberg <wl@gnu.org>
Werner Lemberg25b6e602013-06-12 11:06:34 +02004743
Werner Lemberg294ce112013-06-12 23:33:11 +02004744 Another try on pragmas.
4745
4746 * include/freetype/internal/ftdebug.h: Move pragmas to...
4747 * include/freetype/internal/internal.h: ... this file since it gets
4748 included by all source files.
4749 * include/freetype/internal/ftserv.h: Remove pragma which has no
4750 effect.
4751
Dave Arnoldcb23a622013-06-13 07:46:32 +020047522013-06-12 Werner Lemberg <wl@gnu.org>
Werner Lemberg294ce112013-06-12 23:33:11 +02004753
Werner Lemberg25b6e602013-06-12 11:06:34 +02004754 * include/freetype/internal/ftdebug.h: Disable MSVC warning C4127.
4755
4756 This partially undoes commit 3f6e0e0c.
4757
Werner Lembergc06889e2013-06-12 10:58:06 +020047582013-06-12 Werner Lemberg <wl@gnu.org>
4759
4760 More compiler warning fixes.
4761
4762 */*: Use cast to `FT_Bool' (or `Bool') where appropriate.
4763
Werner Lemberg99e60d82013-06-10 01:44:37 +020047642013-06-10 Werner Lemberg <wl@gnu.org>
4765
Werner Lemberg5e094c62013-06-10 14:59:21 +02004766 [truetype] Improve handling of broken sbit advance widths.
4767
4768 * src/truetype/ttgload.c (TT_Load_Glyph): Use the glyph's (scaled)
4769 `linearHoriAdvance' if the sbit's `horiAdvance' value is zero.
4770
4771 Cf. font `Fixedsys Excelsior' v3.01 (FSEX300.ttf), glyph A, 16ppem.
4772
47732013-06-10 Werner Lemberg <wl@gnu.org>
4774
Werner Lemberga25ecfd2013-06-10 12:57:16 +02004775 [sfnt] Improve embedded bitmap tracing.
4776
4777 * src/base/ftobjs.c (FT_Request_Size): Move trace message regarding
4778 bitmap strike match to...
4779 (FT_Match_Size): This function.
4780
4781 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics,
4782 tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned,
4783 tt_sbit_decoder_load_compound, tt_sbit_decoder_load_png,
4784 tt_sbit_decoder_load_image): Decorate with tracing messages.
4785
47862013-06-10 Werner Lemberg <wl@gnu.org>
4787
Werner Lemberg99e60d82013-06-10 01:44:37 +02004788 Fix Savannah bug #39160.
4789
4790 * src/truetype/ttinterp.c (Ins_SDPVTL): Set projection vector too
4791 for the degenerate case.
4792
Werner Lemberg2ba871b2013-06-09 08:20:54 +020047932013-06-09 David Turner <digit@google.com>
4794
4795 * src/cache/ftcmanag.c (FTC_Manager_Reset): Add missing cache flush.
4796
4797 This code, present since eight(!) years in the unused `CACHE'
4798 branch, has been forgotten to apply to the master branch. It's
4799 really amazing that noone has ever complained since
4800 `FTC_Manager_Reset' is pretty useless without flushing the cache.
4801
Werner Lemberg85fd84b2013-06-07 17:10:21 +020048022013-06-07 Werner Lemberg <wl@gnu.org>
4803
Werner Lemberg3f6e0e02013-06-07 18:10:40 +02004804 Add and improve pragmas for MSVC compiler.
4805
4806 * include/freetype/internal/ftdebug.h: Remove pragmas.
4807 * include/freetype/internal/ftserv.h: Use push and pop for pragmas.
4808 * include/freetype/internal/ftvalid.h: Handle warning C4324.
4809 * src/base/ftobjs.c: Use push and pop for pragmas.
4810 * src/gzip/ftgzip.c: Handle warning C4244.
4811
48122013-06-07 Werner Lemberg <wl@gnu.org>
4813
Werner Lemberg85fd84b2013-06-07 17:10:21 +02004814 [cff] s/cf2_getGlyphWidth/cf2_getGlyphOutline/.
4815
4816 * src/cff/cf2font.c, src/cff/cf2font.h, src/cff/cf2ft.c: Do it.
4817
Werner Lemberg4447b2c2013-06-06 21:28:36 +020048182013-06-06 Dave Arnold <darnold@adobe.com>
4819
4820 [cff] Add early exit feature for width-only calls.
4821
4822 This is for `FT_Get_Advance'.
4823
4824 There are 7 places where the spec says the width can be defined:
4825
4826 hstem/hstemhm
4827 vstem/vstemhm
4828 cntrmask/hintmask
4829 hmoveto
4830 vmoveto
4831 rmoveto
4832 endchar
4833
4834 * src/cff/cf2intrp.c (cf2_doStems): Exit early for width-only calls,
4835 if possible.
4836
4837 (cf2_interpT2CharString) <cf2_cmdHSTEM>, <cf2_cmdVSTEM>,
4838 <cf2_cmdVMOVETO>, <cf2_cmdENDCHAR>, <cf2_cmdHINTMASK>,
4839 <cf2_cmdRMOVETO>, <cf2_cmdHMOVETO>: Exit early for width-only calls.
4840
Werner Lembergbadf3172013-06-06 09:16:38 +020048412013-06-06 Werner Lemberg <wl@gnu.org>
4842
4843 Next round of compiler fixes.
4844
4845 * builds/win32/ftdebug.c, builds/wince/ftdebug.c (ft_debug_init):
4846 Add proper cast.
4847
4848 * include/freetype/internal/ftserv.h (FT_SERVICE_UNAVAILABLE): Fix
4849 cast.
4850 * include/freetype/internal/ftstream.h: Decorate stream and frame
4851 macros with `FT_Long' and `FT_ULong' as appropriate.
4852
4853 * src/base/ftrfork.c (raccess_guess_darwin_hfsplus,
4854 raccess_guess_darwin_newvfs): Use cast.
4855
4856 * src/bdf/bdflib.c (_bdf_set_default_spacing): Use cast.
4857
4858 * src/cache/ftcmanag.c (FTC_Manager_Check): Fix cast.
4859 * src/cache/ftcmanag.h (FTC_ManagerRec): Ditto.
4860
4861 * src/cff/cf2arrst.c (cf2_arrstack_setNum_Elements): Use cast.
4862 * src/cff/cf2ft.c (cf2_freeSeacComponent): Ditto.
4863 * src/cff/cffobjs.c (remove_subset_prefix, remove_style): Ditto.
4864
4865 * src/cid/cidparse.c (cid_parser_new): Use cast.
4866
4867 * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Use cast.
4868
4869 * src/psaux/psobjs.c (reallocate_t1_table): Fix argument type.
4870
4871 * src/raster/ftraster.c (ft_black_reset): Use cast.
4872
4873 * src/truetype/ttgxvar.c (FT_Stream_FTell): Use cast.
4874 (ALL_POINTS): Fix cast.
4875
4876 * src/type1/t1driver.c (t1_ps_get_font_value): Add casts.
4877 * src/type1/t1parse.c (T1_Get_Private_Dict): Add cast.
4878
Dave Arnoldc3782492013-06-05 19:57:55 +020048792013-06-05 Dave Arnold <darnold@adobe.com>
4880
4881 Fix more MSVC Win32 compiler warnings.
4882
4883 * src/base/ftobjs.c: Fix typo in MS pragma.
4884
4885 * src/base/bdflib.c (_bdf_set_default_spacing, _bdf_add_property):
4886 `lineno' is only used in debug mode.
4887
4888 * src/cff/cf2ft.c (cf2_builder_moveTo): `params' is only used in
4889 debug mode.
4890
Werner Lemberg45392b72013-06-05 13:43:20 +020048912013-06-05 Werner Lemberg <wl@gnu.org>
4892
4893 Fix compiler warnings.
4894
4895 * include/freetype/internal/ftmemory.h: Decorate memory allocation
4896 macros with `FT_Long' where appropriate.
4897 Remove duplicate of FT_MEM_QRENEW_ARRAY definition.
4898
4899 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Use
4900 cast.
4901
4902 * src/base/ftobjs.c: Add warning disabling pragma for MSVC while
4903 including `md5.c'.
4904
4905 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdESC>: Add
4906 cast.
4907
4908 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_compound): Fix casts.
4909 (tt_sbit_decoder_load_bitmap): Beautification.
4910
4911 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Initialize
4912 variables (earlier).
4913
4914 * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Pacify compiler.
4915
4916 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Use unsigned constants
4917 where appropriate.
4918
4919 * src/type1/t1load.c (T1_Get_MM_Var): Ditto.
4920
Werner Lembergdc624ca2013-06-04 10:30:48 +020049212013-06-04 Werner Lemberg <wl@gnu.org>
4922
Werner Lembergd9634982013-06-04 20:18:57 +02004923 * src/cff/cf2font.c (cf2_getGlyphWidth): Initialize `advWidth'.
4924
4925 Problem reported by Ingmar Sittl <ingmar.sittl@elektrobit.com>.
4926
49272013-06-04 Werner Lemberg <wl@gnu.org>
4928
Werner Lembergdc624ca2013-06-04 10:30:48 +02004929 Apply fixes for cppcheck nitpicks.
4930
4931 http://cppcheck.sourceforge.net/
4932
Werner Lemberg8d8508e2013-06-04 13:09:01 +02004933 The call was (from the top-level of the FreeType tree):
4934
4935 cppcheck --force \
4936 --enable=all \
4937 -I include \
4938 -I include/freetype/ \
4939 -I include/freetype/config/ \
4940 -I include/freetype/internal/ \
4941 . &> cppcheck.log
4942
Werner Lembergdc624ca2013-06-04 10:30:48 +02004943 Note that the current version heavily chokes on FreeType, delivering
Werner Lemberg8d8508e2013-06-04 13:09:01 +02004944 many wrong results. I will report those issues to the cppcheck team
Werner Lembergdc624ca2013-06-04 10:30:48 +02004945 so that a newer version gives improved results hopefully.
4946
4947 */* Improve variable scopes.
4948 */* Remove redundant initializations which get overwritten.
4949
Werner Lemberge8ed2d62013-08-01 12:20:20 +02004950 * src/base/ftmac.c, builds/mac/ftmac.c (count_faces_scalable):
Werner Lembergdc624ca2013-06-04 10:30:48 +02004951 Remove unused variable.
4952
4953 * src/base/ftdbgmem.c (ft_mem_table_destroy): `table' can't be zero.
4954
4955 * src/gxvalid/gxvkern.c (gxv_kern_subtable_fmt1_entry_validate):
4956 Remove functionless code.
4957
4958 * src/tools/ftrandom.c (main): Fix memory leak.
4959
Werner Lemberg2429dc32013-06-03 12:41:58 +020049602013-06-03 Werner Lemberg <wl@gnu.org>
4961
4962 Add CFF_CONFIG_OPTION_OLD_ENGINE configuration option.
4963
4964 This controls whether the old FreeType CFF engine gets compiled into
4965 FreeType. It is now disabled by default.
4966
4967 * devel/ftoption.h, include/freetype/config/ftoption.h
4968 (CFF_CONFIG_OPTION_OLD_ENGINE): New macro.
4969
4970 * src/cff/cffdrivr.c (cff_property_set), src/cff/cffgload.c
4971 (CFF_Operator, cff_argument_counts, cff_builder_add_point,
4972 cff_operator_seac, cff_decoder_parse_charstrings, cff_slot_load),
4973 src/cff/cffgload.h, src/cff/cffobjs.c (cff_driver_init): Use
4974 CFF_CONFIG_OPTION_OLD_ENGINE to guard the affected code.
4975
4976 * docs/CHANGES: Updated.
4977
Werner Lembergf9cceeb2013-06-02 23:38:13 +020049782013-06-02 Werner Lemberg <wl@gnu.org>
4979
4980 Fix PNG library handling.
4981
4982 * builds/unix/configure.raw: Don't use LIBPNG_LIBS but
4983 LIBPNG_LDFLAGS.
4984
Behdad Esfahbod760d3422013-05-29 11:36:18 +020049852013-05-23 Behdad Esfahbod <behdad@google.com>
4986
4987 Add support for color embedded bitmaps (eg. color emoji).
4988
4989 A new load flag, FT_LOAD_COLOR, makes FreeType load color
4990 embedded-bitmaps, following this draft specification
4991
4992 https://color-emoji.googlecode.com/git/specification/v1.html
4993
4994 which defines two new SFNT tables, `CBDT' and `CBLC' (named and
4995 modeled after `EBDT' and `EBLC', respectively). The color bitmaps
4996 are stored in the new FT_PIXEL_MODE_BGRA format to represent BGRA
4997 pre-multiplied sRGB images. If PNG support is available, PNG color
4998 images as defined in the same proposed specification are supported
4999 also.
5000
5001 Note that color bitmaps are converted to grayscale if client didn't
5002 ask for color.
5003
5004 * builds/unix/configure.raw: Search for libpng.
5005 Add `--without-png' option.
5006
5007 * devel/ftoption.h, include/freetype/config/ftoption.h
5008 (FT_CONFIG_OPTION_USE_PNG): New macro.
5009
5010 * include/freetype/freetype.h (FT_LOAD_COLOR): New load flag.
5011
5012 * include/freetype/ftimage.h (FT_Pixel_Mode): Add
5013 `FT_PIXEL_MODE_BGRA'.
5014
5015 * include/freetype/tttags.h (TTAG_CBDT, TTAG_CBLC): New tags.
5016
5017 * src/base/ftbitmap.c (FT_Bitmap_Embolden): Updated.
5018 (ft_gray_for_premultiplied_srgb_bgra): New function.
5019 (FT_Bitmap_Convert): Handle FT_PIXEL_MODE_BGRA.
5020
5021 * src/sfnt/pngshim.c, src/sfnt/pngshim.h: New files.
5022
5023 * src/sfnt/sfnt.c: Include `pngshim.c'.
5024
5025 * src/sfnt/ttsbit.c: Include FT_BITMAP_H and `pngshim.h'
5026 (tt_face_load_eblc): Load `CBLC'.
5027 (tt_sbit_decoder_init): Load `CBDT'.
5028 (tt_sbit_decoder_alloc_bitmap): Pass load flags to select between
5029 color and grayscale bitmaps.
5030 Set `num_grays'. This is used by `ftview' to choose the blending
5031 algorithm.
5032 (tt_sbit_decoder_load_byte_aligned,
5033 tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_compound,
5034 tt_sbit_decoder_load_image): Pass load flag.
5035 s/write/pwrite/.
5036 Don't call `tt_sbit_decoder_alloc_bitmap'.
5037 Updated.
5038 (tt_sbit_decoder_load_png) [FT_CONFIG_OPTION_USE_PNG]: New function.
5039 (tt_sbit_decoder_load_bitmap): Pass load flag.
5040 Handle new glyph formats 17, 18, and 19.
5041 Call `tt_sbit_decoder_alloc_bitmap'.
5042 Flatten color bitmaps if necessary.
5043 (tt_face_load_sbit_image): Updated.
5044
5045 * src/sfnt/rules.mk (SFNT_DRV_SRC): Add `pngshim.c'.
5046
5047 * docs/CHANGES: Updated.
5048
Guenter41e44802013-05-24 11:38:09 +020050492013-05-24 Guenter <info@gknw.net>
5050
5051 Apply Savannah patch #8055.
5052
5053 Make `apinames' create an import file for NetWare.
5054
5055 * src/tools/apinames.c (PROGRAM_VERSION): Set to 0.2.
5056 (OutputFormat): Add `OUTPUT_NETWARE_IMP'.
5057 (names_dump): Handle it.
5058 (usage): Updated.
5059 (main): Handle new command line flag `-wN'.
5060
Behdad Esfahbod2d6e1fb2013-05-23 08:01:20 +020050612013-05-23 Behdad Esfahbod <behdad@behdad.org>
5062
5063 Compilation fix.
5064
5065 * src/truetype/ttinterp.c (TT_RunIns)
5066 [!TT_CONFIG_OPTION_SUBPIXEL_HINTING]: Make it work.
5067
Infinality18f35ed2013-05-21 20:51:15 -050050682013-05-22 Infinality <infinality@infinality.net>
5069
Infinality3c783c12013-05-21 21:03:00 -05005070 [truetype] Formatting and an additional subpixel tweak.
5071
5072 * src/truetype/ttinterp.c (Ins_SHPIX): Formatting fix.
5073 * src/truetype/ttsubpix.c (SKIP_NONPIXEL_Y_MOVES_Rules):
5074 Revert previous modification for Verdana clones.
5075
50762013-05-22 Infinality <infinality@infinality.net>
5077
Infinality18f35ed2013-05-21 20:51:15 -05005078 [truetype] Adjust subpixel zp2 moves and tweak rules.
5079
5080 These modifications fix thin diagonal stems in some legacy fonts.
5081
5082 * src/truetype/ttinterp.c (Direct_Move_X): Remove unused macro.
5083 (Move_Zp2_Point): Don't always disable x moves for subpixel rendering.
5084 (Ins_SHP): Disable x moves here for subpixel rendering.
5085 (Ins_SHPIX): Only disable x moves in compatibility mode.
5086 Split out zp2 move reversals and reorder conditional respectively.
5087
5088 * src/truetype/ttsubpix.c (SKIP_NONPIXEL_Y_MOVES_Rules): Fix oversight.
5089 Only adjust Verdana clones for 17 ppem.
5090 (SKIP_NONPIXEL_Y_MOVES_Rules_Exceptions): Add Courier New.
5091 (ALWAYS_SKIP_DELTAP_Rules): Found additional cases for Arial `s'.
5092
Infinality63bfa832013-05-20 07:38:21 +020050932013-05-20 Infinality <infinality@infinality.net>
5094
5095 [truetype] Simplify and improve subpixel function detection.
5096
5097 Some small enhancements have allowed the removal of many macros and
5098 the simplification of existing rules in `ttsubpix.c'.
5099
5100 * src/truetype/ttsubpix.h (SPH_TWEAK_ALLOW_X_DMOVEX,
5101 SPH_TWEAK_ALLOW_X_MOVE_ZP2,
5102 SPH_TWEAK_DELTAP_SKIP_EXAGGERATED_VALUES,
5103 SPH_TWEAK_SKIP_INLINE_DELTAS, SPH_TWEAK_MIRP_CVT_ZERO): Removed.
5104 (SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES_DELTAP): New rule macro.
5105
5106 * src/truetype/ttsubpix.c: Updated affected rules.
5107
5108 * src/truetype/ttinterp.c (Direct_Move_X): Updated.
5109 (INS_FDEF): Add additional function detection.
5110 (INS_ENDF): Set runtime flag.
5111 (Ins_CALL): Skip the call under certain conditions.
5112 Remove bad code.
5113 (Ins_LOOPCALL): Skip the call under certain conditions.
5114 Remove bad code.
5115 (Move_Zp2_Point): Updated.
5116 (Ins_SHPIX): Updated.
5117 Skip the move under some situations.
5118 (Ins_MIAP): Improve conditions.
5119 (Ins_MIRP): Updated.
5120 (Ins_DELTAP): Skip move under certain conditions.
5121 Simplify conditions.
5122 (TT_RunIns): Updated.
5123 Add code to handle new function detection.
5124 Trace messages.
5125
Werner Lembergfd664692013-05-17 17:40:27 +020051262013-05-17 Werner Lemberg <wl@gnu.org>
5127
5128 Update more FT_Err_XXX macros using FT_ERR and FT_THROW;
5129
5130 * builds/amiga/src/base/ftsystem.c, builds/mac/ftmac.c,
5131 builds/unix/ftsystem.c, builds/vms/ftsystem.c: Do it.
5132
Werner Lembergf04951a2013-05-17 13:51:07 +020051332013-05-15 Werner Lemberg <wl@gnu.org>
5134
5135 [truetype] Add `interpreter-version' property.
5136
5137 This makes the option TT_CONFIG_OPTION_SUBPIXEL_HINTING controllable
5138 at runtime.
5139
Werner Lemberg27991332013-05-17 14:00:26 +02005140 * include/freetype/ftttdrv.h: New file.
5141
5142 * include/freetype/config/ftheader.h (FT_TRUETYPE_DRIVER_H): New
5143 macro.
5144
Werner Lembergf04951a2013-05-17 13:51:07 +02005145 * src/truetype/ttdriver.c: Include FT_TRUETYPE_DRIVER_H.
5146 (tt_property_set, tt_property_get): Fill templates.
5147
5148 * src/truetype/ttobjs.h (TT_DriverRec): Add `interpreter_version'
5149 member.
5150 Remove unused `extension_component' member.
5151
5152 * src/truetype/ttgload.c: Include FT_TRUETYPE_DRIVER_H.
5153 (tt_get_metrics, TT_Hint_Glyph, TT_Process_Simple_Glyph,
5154 compute_glyph_metrics, tt_loader_init): Use `interpreter_version'.
5155
5156 * src/truetype/ttinterp.c: Include FT_TRUETYPE_DRIVER_H.
5157 (SUBPIXEL_HINTING): New macro to check `interpreter_version' flag.
5158 Update all affected functions to use it.
5159 Use TT_INTERPRETER_VERSION_XXX where appropriate.
5160
5161 * src/truetype/ttobjs.c: Include FT_TRUETYPE_DRIVER_H.
5162 (tt_driver_init): Initialize `interpreter_version'.
5163
5164 * src/truetype/ttsubpix.c: Include FT_TRUETYPE_DRIVER_H.
5165 Use TT_INTERPRETER_VERSION_XXX where appropriate.
5166
Werner Lemberg7441dd82013-05-13 09:12:46 +020051672013-05-13 Werner Lemberg <wl@gnu.org>
5168
Werner Lemberg6650be72013-05-13 10:05:29 +02005169 [truetype] Avoid empty source file.
5170
5171 * src/truetype/ttsubpix.c [!TT_CONFIG_OPTION_SUBPIXEL_HINTING]:
5172 Provide dummy typedef.
5173
51742013-05-13 Werner Lemberg <wl@gnu.org>
5175
Werner Lemberg7441dd82013-05-13 09:12:46 +02005176 * src/cff/cf2font.c (cf2_getGlyphWidth): Fix uninitialized variable.
5177
5178 Fix suggested by Vaibhav Nagarnaik <vnagarnaik@gmail.com>.
5179
Brian Nixon8d6025c2013-05-13 09:06:42 +020051802013-05-13 Brian Nixon <bnixon@yahoo.com>
5181
5182 Fix Savannah bug #38970.
5183
5184 * src/base/ftdebug.c, builds/win32/ftdebug.c,
5185 builds/wince/ftdebug.c, builds/amiga/src/base/ftdebug.c
5186 (ft_debug_init): Don't read past the environment variable FT2_DEBUG.
5187
Werner Lembergd51ac9c2013-05-12 06:00:27 +020051882013-05-12 Werner Lemberg <wl@gnu.org>
5189
Werner Lembergcd888752013-05-12 15:08:57 +02005190 [truetype] Add framework for TrueType properties.
5191
5192 * src/truetype/ttdrivr.c: Include FT_SERVICE_PROPERTIES_H.
5193 (tt_property_set, tt_property_get): New functions, still empty.
5194 Define `tt_service_properties' service.
5195 Update `tt_services'.
5196
5197 * src/truetype/ttpic.h: Include FT_SERVICE_PROPERTIES_H.
5198 (TT_SERVICE_PROPERTIES_GET): New macro.
5199 (TTModulePIC): Add `tt_service_properties'.
5200
52012013-05-12 Werner Lemberg <wl@gnu.org>
5202
Werner Lembergb112fa42013-05-12 07:29:04 +02005203 Fix Savannah bug #38967.
5204
5205 * src/base/ftcalc.c (FT_DivFix) [FT_LONG64]: Fix cast.
5206
52072013-05-12 Werner Lemberg <wl@gnu.org>
5208
Werner Lembergcbcf33d2013-05-12 07:27:48 +02005209 Introduce unsigned 64bit type (if available).
5210
5211 * include/freetype/config/ftconfig.h: Define FT_UINT64 if available.
5212 [FT_LONG64]: Provide FT_UInt64.
5213
5214 * builds/unix/ftconfig.in: Synchronized.
5215
52162013-05-12 Werner Lemberg <wl@gnu.org>
5217
Werner Lembergd51ac9c2013-05-12 06:00:27 +02005218 Fix Savannah bug #38968.
5219
5220 * include/freetype/ftmodapi.h: Add `FT_EXPORT' to
5221 FT_Property_{Set,Get}.
5222 * src/base/ftobjs.c: Add `FT_EXPORT_DEF' to
5223 FT_Property_{Set,Get}.
5224
Werner Lembergf6aa0892013-05-10 07:58:47 +020052252013-05-10 Werner Lemberg <wl@gnu.org>
5226
Werner Lembergea2b4752013-05-10 08:04:33 +02005227 [sfnt] Clean up bitmap code.
5228
5229 * src/sfnt/ttsbit.c: Deleted.
Dave Arnold3a2cb0f2013-09-29 16:17:02 +02005230 * src/sfnt/ttsbit0.c: Renamed to `ttsbit.c'.
Werner Lembergea2b4752013-05-10 08:04:33 +02005231 * rules.mk (SFNT_DRV_H): Updated.
5232
52332013-05-10 Werner Lemberg <wl@gnu.org>
5234
Werner Lembergf6aa0892013-05-10 07:58:47 +02005235 */* [FT_CONFIG_OPTION_OLD_INTERNALS]: Remove macro and guarded code.
5236
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00005237----------------------------------------------------------------------------
5238
Werner Lemberg73cc8332014-01-01 07:10:36 +01005239Copyright 2013-2014 by
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00005240David Turner, Robert Wilhelm, and Werner Lemberg.
5241
5242This file is part of the FreeType project, and may only be used, modified,
5243and distributed under the terms of the FreeType project license,
5244LICENSE.TXT. By continuing to use, modify, or distribute this file you
5245indicate that you have read the license and understand and accept it
5246fully.
5247
5248
5249Local Variables:
5250version-control: never
Werner Lemberg4e03fe72006-04-29 06:20:09 +00005251coding: utf-8
Werner Lemberg8e6c56f2005-10-18 06:09:13 +00005252End: