1 2014-12-30 Werner Lemberg <wl@gnu.org>
3 * Version 2.5.5 released.
4 =========================
7 Tag sources with `VER-2-5-5'.
9 * docs/VERSION.DLL: Update documentation and bump version number to
12 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
13 builds/windows/vc2005/index.html,
14 builds/windows/vc2008/freetype.vcproj,
15 builds/windows/vc2008/index.html,
16 builds/windows/vc2010/freetype.vcxproj,
17 builds/windows/vc2010/index.html,
18 builds/windows/visualc/freetype.dsp,
19 builds/windows/visualc/freetype.vcproj,
20 builds/windows/visualc/index.html,
21 builds/windows/visualce/freetype.dsp,
22 builds/windows/visualce/freetype.vcproj,
23 builds/windows/visualce/index.html,
24 builds/wince/vc2005-ce/freetype.vcproj,
25 builds/wince/vc2005-ce/index.html,
26 builds/wince/vc2008-ce/freetype.vcproj,
27 builds/wince/vc2008-ce/index.html: s/2.5.4/2.5.5/, s/254/255/.
29 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 5.
31 * builds/unix/configure.raw (version_info): Set to 17:4:11.
32 * CMakeLists.txt (VERSION_PATCH): Set to 5.
33 * docs/CHANGES: Updated.
35 * builds/toplevel.mk (dist): Fix typos.
37 2014-12-24 Alexei Podtelezhnikov <apodtele@gmail.com>
39 [base] Formatting and nanooptimizations.
42 * src/base/fttrigon.c: Revise sign restoration.
44 2014-12-13 Werner Lemberg <wl@gnu.org>
46 * src/pcf/pcfread.c (pcf_read_TOC): Improve fix from 2014-12-08.
48 2014-12-11 Werner Lemberg <wl@gnu.org>
50 * builds/toplevel.mk (dist): Use older POSIX standard for `tar'.
52 Apparently, BSD tar isn't capable yet of handling POSIX-1.2001
53 (contrary to GNU tar), so force the POSIX-1.1988 format.
55 Problem reported by Stephen Fisher <sfisher@SDF.ORG>.
57 2014-12-11 Werner Lemberg <wl@gnu.org>
59 * src/type42/t42parse.c (t42_parse_sfnts): Reject invalid TTF size.
61 2014-12-11 Werner Lemberg <wl@gnu.org>
63 * src/base/ftobjs.c (FT_Get_Glyph_Name): Fix off-by-one check.
65 Problem reported by Dennis Felsing <dennis@felsin9.de>.
67 2014-12-11 Werner Lemberg <wl@gnu.org>
69 * src/type42/t42parse.c (t42_parse_sfnts): Check `string_size'.
71 Problem reported by Dennis Felsing <dennis@felsin9.de>.
73 2014-12-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
75 [gxvalid] Fix a naming convention conflicting with ftvalid.
77 See previous changeset for otvalid.
79 * src/gxvalid/{gxvcommn.h, gxvmort.h, gxvmorx.h}: Replace
81 * src/gxvalid/{gxvbsln.c, gxvcommn.c, gxvfeat.c, gxvjust.c,
82 gxvkern.c, gxvlcar.c, gxvmort.c, gxvmort0.c, gxvmort1.c,
83 gxvmort2.c, gxvmort4.c, gxvmort5.c, gxvmorx.c, gxvmorx0.c,
84 gxvmorx1.c, gxvmorx2.c, gxvmorx4.c, gxvmorx5.c, gxvopbd.c,
85 gxvprop.c, gxvtrak.c}: Replace `valid' by `gxvalid' if
86 it is typed as GXV_Validator.
88 2014-12-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
90 [otvalid] Fix a naming convention conflicting with ftvalid.
92 Some prototypes in ftvalid.h use `valid' for the variables
93 typed as FT_Validator. Their implementations in src/base/
94 ftobjs.c and utilizations in src/sfnt/ttcmap.c do similar.
96 Some macros in otvcommn.h assume the exist of the variable
97 `valid' typed as OTV_Validator in the caller.
99 Mixing these two conventions cause invalid pointer conversion
100 and unexpected SEGV in longjmp. To prevent it, all variables
101 typed as OTV_Validator are renamed to `otvalid'.
103 * src/otvalid/otvcommn.h: Replace `valid' by `otvalid'.
104 * src/otvalid/{otvcommn.c, otvbase.c, otvgdef.c, otvgpos.c,
105 otvgsub.c, otvjstf.c, otvmath.c}: Replace `valid' by `otvalid'
106 if it is typed as OTV_Validator.
108 2014-12-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
110 [ftvalid] Introduce FT_THROW() in FT_INVALID_XXX macros.
112 Original patch is designed by Werner Lemberg. Extra part
113 for otvalid and gxvalid are added by suzuki toshiya, see
115 https://lists.nongnu.org/archive/html/freetype-devel/2014-12/msg00002.html
116 https://lists.nongnu.org/archive/html/freetype-devel/2014-12/msg00007.html
118 * include/internal/ftvalid.h: Introduce FT_THROW() in FT_INVALID_().
119 * src/gxvalid/gxvcommn.h: Ditto.
120 * src/otvalid/otvcommn.h: Ditto.
122 2014-12-08 Werner Lemberg <wl@gnu.org>
124 [pcf] Fix Savannah bug #43774.
126 Work around `features' of X11's `pcfWriteFont' and `pcfReadFont'
127 functions. Since the PCF format doesn't have an official
128 specification, we have to exactly follow these functions' behaviour.
130 The problem was unveiled with a patch from 2014-11-06, fixing issue
133 * src/pcf/pcfread.c (pcf_read_TOC): Don't check table size for last
134 element. Instead, assign real size.
136 2014-12-07 Werner Lemberg <wl@gnu.org>
138 Work around a bug in Borland's C++ compiler.
142 http://qc.embarcadero.com/wc/qcmain.aspx?d=118998
144 for Borland's bug tracker entry.
146 Reported by Yuliana Zigangirova <zigangirova@inbox.ru>,
147 https://lists.gnu.org/archive/html/freetype-devel/2014-04/msg00001.html.
149 * include/internal/ftvalid.h (FT_ValidatorRec), src/smooth/ftgrays.c
150 (gray_TWorker_): Move `ft_jmp_buf' field to be the first element.
152 2014-12-07 Werner Lemberg <wl@gnu.org>
154 */*: Decorate hex constants with `U' and `L' where appropriate.
156 2014-12-07 Werner Lemberg <wl@gnu.org>
158 [truetype] Prevent memory leak for buggy fonts.
160 * src/truetype/ttobjs.c (tt_size_done): Unconditionally call
161 `tt_size_done_bytecode'.
163 2014-12-06 Werner Lemberg <wl@gnu.org>
165 * Version 2.5.4 released.
166 =========================
169 Tag sources with `VER-2-5-4'.
171 * docs/VERSION.DLL: Update documentation and bump version number to
174 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
175 builds/windows/vc2005/index.html,
176 builds/windows/vc2008/freetype.vcproj,
177 builds/windows/vc2008/index.html,
178 builds/windows/vc2010/freetype.vcxproj,
179 builds/windows/vc2010/index.html,
180 builds/windows/visualc/freetype.dsp,
181 builds/windows/visualc/freetype.vcproj,
182 builds/windows/visualc/index.html,
183 builds/windows/visualce/freetype.dsp,
184 builds/windows/visualce/freetype.vcproj,
185 builds/windows/visualce/index.html,
186 builds/wince/vc2005-ce/freetype.vcproj,
187 builds/wince/vc2005-ce/index.html,
188 builds/wince/vc2008-ce/freetype.vcproj,
189 builds/wince/vc2008-ce/index.html: s/2.5.3/2.5.4/, s/253/254/.
191 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4.
193 * builds/unix/configure.raw (version_info): Set to 17:3:11.
194 * CMakeLists.txt (VERSION_PATCH): Set to 4.
195 * docs/CHANGES: Updated.
197 2014-12-04 Werner Lemberg <wl@gnu.org>
199 docs/CHANGES: Updated, formatted.
201 2014-12-04 Dave Arnold <darnold@adobe.com>
203 [cff] Modify an FT_ASSERT.
205 * src/cff/cf2hints.c (cf2_hintmap_map): After the fix for Savannah
206 bug #43661, the test font `...aspartam.otf' still triggers an
207 FT_ASSERT. Since hintmap still works with count==0, ...
208 (cf2_glyphpath_lineTo, cf2_glyphpath_curveTo): ... add that term to
211 2014-12-04 Dave Arnold <darnold@adobe.com>
213 [cff] Fix Savannah bug #43661.
215 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdHSTEM,
216 cf2_cmdVSTEM, cf2_cmdHINTMASK>: Don't append to stem arrays after
217 hintmask is constructed.
219 * src/cff/cf2hints.c (cf2_hintmap_build): Add defensive code to
220 avoid reading past end of hintmask.
222 2014-12-03 Werner Lemberg <wl@gnu.org>
224 docs/CHANGES: Updated.
226 2014-12-03 Werner Lemberg <wl@gnu.org>
228 [autofit] Better fix for conversion specifiers in debug messages.
230 Using `%ld' for pointer differences causes warnings on 32bit
231 platforms. The correct type would be (the relatively new) `%td',
232 however, this is missing on some important platforms.
234 This patch improves the change from 2014-11-28.
236 * src/autofit/afhints.c (AF_INDEX_NUM): Use `int' typecast. Our
237 pointer differences are always sufficiently small.
238 (af_glyph_hints_dump_points, af_glyph_hints_dump_segments,
239 af_glyph_hints_dump_edge): Revert to `%d' and use `AF_INDEX_NUM'.
241 2014-12-03 Werner Lemberg <wl@gnu.org>
243 FT_Sfnt_Tag: s/ft_sfnt_xxx/FT_SFNT_XXX/ for orthogonality.
245 All public FreeType enumeration and flag values are uppercase...
247 * include/tttables.h (FT_Sfnt_Tag): Implement it. For backward
248 compatibility, retain the old values as macros.
250 * src/base/ftfstype.c (FT_Get_FSType_Flags), src/sfnt/sfdriver.c
251 (get_sfnt_table): Updated.
253 2014-12-02 Werner Lemberg <wl@gnu.org>
255 * include/*: Improve structure of documentation.
257 . Add and update many `<Order>' tags.
258 . Apply various documentation fixes.
259 . Remove details to deprecated (or never implemented) data.
261 2014-12-02 Werner Lemberg <wl@gnu.org>
263 [docmaker] Always handle `<Order>' section elements.
265 Previously, those elements were handled only for sections present in
266 a `<Sections>' chapter element.
268 * src/tools/docmaker/content.py (ContentProcessor::finish):
271 2014-12-02 Werner Lemberg <wl@gnu.org>
273 [docmaker] Properly handle empty rows in Synopsis.
275 * src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Emit
276 ` ' for empty fields.
278 2014-12-02 Werner Lemberg <wl@gnu.org>
282 * src/tools/docmaker/content.py (DocBlock::get_markup_words_all):
283 Emit `/empty/' string for first element also.
285 2014-12-02 Werner Lemberg <wl@gnu.org>
287 [docmaker] Honour empty lines in `<Order>' section element.
289 This greatly improves the readability of the `Synopsis' links.
291 * src/tools/docmaker/content.py (DocBlock::get_markup_words_all):
292 Insert string `/empty/' between items.
294 * src/tools/docmaker/formatter.py (Formatter::section_dump): Make it
295 robust against nonexistent keys.
297 * src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Emit
298 empty <td> elements for `/empty/'.
300 2014-12-02 Werner Lemberg <wl@gnu.org>
302 [docmaker] Ensure Python 3 compatibility.
304 * src/tools/docmaker/content.py (ContentProcessor::set_section,
305 ContentProcessor::finish): Replace `has_key' function with `in'
308 * src/tools/docmaker/formatter.py (Formatter::__init__): Replace
309 sorting function with a key generator.
310 (Formatter::add_identifier): Replace `has_key' function with `in'
313 * src/tools/docmaker/tohtml.py (HtmlFormatter::html_source_quote):
314 Replace `has_key' function with `in' keyword.
315 (HtmlFormatter::index_exit, HtmlFormatter::section_enter): Use
319 * src/tools/docmaker/utils.py: Import `itertools'.
320 (index_sort): Replaced by...
321 (index_key): ... this new key generator (doing exactly the same).
323 2014-11-29 Werner Lemberg <wl@gnu.org>
325 [docmaker] Don't output a block multiple times.
327 This bug was hidden by not processing all lines of `<Order>' blocks.
329 * src/tools/docmaker/formatter.py (Formatter::section_dump): Filter
332 2014-11-29 Werner Lemberg <wl@gnu.org>
334 [docmaker] Use field values as HTML link targets where possible.
336 * src/tools/docmaker/tohtml.py (HtmlFormatter::make_block_url):
337 Accept second, optional argument to specify a name.
338 (HtmlFormatter::html_source_quote): Link to field ID if possible.
339 (HtmlFormatter::print_html_field_list): Emit `id' attribute.
341 2014-11-29 Werner Lemberg <wl@gnu.org>
343 [docmaker] Allow empty lines in `<Order>' blocks.
345 Before this patch, the suggested order of entries stopped at the
348 Obviously, nobody noticed that this problem caused a much reduced
349 set of links in the `Synopsis' sections; in particular, the
350 `<Order>' blocks contain a lot of entries that wouldn't be listed
353 * src/tools/docmaker/content.py (DocBlock::get_markup_words_all):
354 New function to iterate over all items.
355 (DocSection::process): Use it.
357 2014-11-29 Werner Lemberg <wl@gnu.org>
359 * src/tools/docmaker/sources.py (column) [Format 2]: Fix regexp.
361 After the single asterisk there must be no other immediately following
364 2014-11-29 Werner Lemberg <wl@gnu.org>
366 * src/tools/docmaker/tohtml.py: Improve CSS for vertical spacing.
368 2014-11-29 Werner Lemberg <wl@gnu.org>
370 [docmaker] Improve HTML code for table of contents.
372 * src/tools/docmaker/tohtml.py: Introduce a new table class `toc',
373 together with proper CSS.
375 2014-11-29 Werner Lemberg <wl@gnu.org>
377 [docmaker] Provide higher-level markup and simplify HTML.
379 * src/tools/docmaker/tohtml.py: Instead of using extraneous `<div>'
380 elements, use CSS descendants (of class `section') to format the
383 Also remove redundant <p> and <br> elements, replacing them with
386 Globally reduce page width to 75%.
388 (block_header): Rename <div> class to `section'.
390 2014-11-29 Werner Lemberg <wl@gnu.org>
392 [docmaker] Add `top' links after blocks.
394 * src/tools/docmaker/tohtml.py (block_footer_middle): Implement it.
396 2014-11-29 Werner Lemberg <wl@gnu.org>
398 * src/tools/docmaker/tohtml.py: Improve CSS for fields.
400 Make fields align horizontally relative to full line width.
402 2014-11-29 Werner Lemberg <wl@gnu.org>
404 * src/tools/docmaker/tohtml.py: Fix index and TOC templates.
406 This thinko was introduced 2014-11-27.
408 2014-11-28 Werner Lemberg <wl@gnu.org>
410 [docmaker] Format field lists with CSS.
412 This also simplifies the inserted HTML code.
414 * src/tools/docmaker/tohtml.py
415 (HtmlFormatter::print_html_field_list): Do it.
417 2014-11-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
419 Fix compiler warning to the comparison between signed and
422 * src/pfr/pfrsbit.c (pfr_slot_load_bitmap): Fix the comparison
423 between `ypos + ysize' and FT_INT_{MAX,MIN}.
425 2014-11-28 Werner Lemberg <wl@gnu.org>
427 [docmaker] Replace empty `<td>' with CSS.
429 * src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Do
432 2014-11-28 Werner Lemberg <wl@gnu.org>
434 [docmaker] Replace some `<table>' tags with `<h4>' and `<div>'.
436 * src/tools/docmaker/tohtml.py (marker_*): Use `<h4>'.
437 (source_*): Use `<div>'.
438 (HtmlFormatter::block_enter): s/<h4>/<h3>/.
440 2014-11-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
442 Fix compiler warning to conversion specifiers in debug messages.
444 * src/autofit/afhints.c (af_glyph_hints_dump_points): Add length
445 modifier to dump long integers.
446 (af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Ditto.
448 2014-11-27 Werner Lemberg <wl@gnu.org>
450 * src/tools/docmaker/tohtml.py: Use more CSS for index.
452 2014-11-27 Werner Lemberg <wl@gnu.org>
454 [docmaker] Replace `name' attribute of `<a>' with `id'.
456 * src/tools/docmaker/tohtml.py (HtmlFormatter::block_enter): Do it.
458 2014-11-27 Werner Lemberg <wl@gnu.org>
460 * src/tools/docmaker/tohtml.py: Remove remaining `width' attributes.
462 For `Index' and `TOC' links, we now simply use the `text-align' CSS
463 property of `<td>' to enforce flush-left and flush-right,
464 eliminating the hack with an empty, full-width `<td>' element
467 The change also enforces the same (smaller) size for all index and
470 2014-11-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
472 * src/cff/cf2font.c: Include `ftcalc.h' to use FT_MSB(),
473 cf2font.c could not find it under `make multi' build.
475 2014-11-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
477 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Remove
478 unrequired negative value check for `width' and `height'.
480 2014-11-27 Werner Lemberg <wl@gnu.org>
482 * src/tools/docmaker/tohtml.py: More HTML table refactoring.
484 Replace some `<table>' tags with `<div>' to simplify structure.
486 Move `bgcolor' attribute to CSS.
488 Replace most `width' attributes with CSS. The remaining instances
489 (providing a similar effect as LaTeX's `\hfill' command) are removed
492 2014-11-27 Werner Lemberg <wl@gnu.org>
494 * src/tools/docmaker/tohtml.py: Replace <font> with CSS.
496 2014-11-27 Werner Lemberg <wl@gnu.org>
498 * src/tools/docmaker/tohtml.py: Center <table> with CSS.
500 2014-11-27 Werner Lemberg <wl@gnu.org>
502 * src/tools/docmaker/tohtml.py: Replace `<center>' with `<div>'.
504 2014-11-27 Werner Lemberg <wl@gnu.org>
506 * src/tools/docmaker/tohtml.py: Remove redundant `<center>' tags.
508 This starts a series of commits into the direction of generating
509 valid HTML 5 code, especially using much more CSS.
511 2014-11-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
513 Prevent too negative values (< FT_INT_MIN) in bitmap metrics,
516 * src/pfr/pfrsbit.c (pfr_slot_load_bitmap): Prevent too
517 negative values in `xpos' and `ypos + ysize'.
518 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Prevent
519 too negative values in `x_left' and `y_top'. Either negative
520 values in `width' and `height' are checked.
522 2014-11-27 Werner Lemberg <wl@gnu.org>
524 [docmaker] Produce better HTML code.
526 * src/tools/docmaker/tohtml.py: Always use double quotes for
528 (source_footer): Close `td' and `tr' groups.
530 2014-11-27 Werner Lemberg <wl@gnu.org>
532 Use better way to disable creation of .pyc files for `make refdoc'.
534 Python 2.6 was released in 2008...
536 * builds/freetype.mk (refdoc): Use python's `-B' option.
538 * builds/detect.mk (std_setup, dos_setup): Mention required python
539 version for `refdoc' target.
541 2014-11-27 Werner Lemberg <wl@gnu.org>
543 * src/tools/docmaker/sources.py (re_bold, re_italic): Use
544 non-grouping parentheses.
545 * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word):
548 2014-11-27 Werner Lemberg <wl@gnu.org>
550 * src/base/ftobjs.c (FT_Get_Glyph_Name): Fix compiler warning.
552 Introduced in previous change. Reported by Alexei.
554 2014-11-26 Werner Lemberg <wl@gnu.org>
556 * src/*: Add checks for parameters of API functions where missing.
558 `API functions' are functions tagged with `FT_EXPORT_DEF'.
560 Besides trivial fixes, the following changes are included, too.
562 * src/base/ftbdf.c (FT_Get_BDF_Charset_ID, FT_Get_BDF_Property): Set
563 error code if no service is available.
565 * src/base/ftinit.c (FT_Done_FreeType): Change return value for
566 invalid `library' parameter to `Invalid_Library_Handle'.
568 * src/base/ftobjs.c (FT_New_Size): Change return value for invalid
569 `asize' parameter to `Invalid_Argument'.
571 * src/base/ftoutln.c (FT_Outline_Copy): Change return value for
572 invalid `source' and `target' parameters to `Invalid_Outline'.
573 (FT_Outline_Done_Internal): Change return value for invalid
574 `outline' parameter to `Invalid_Outline'.
576 2014-11-26 Werner Lemberg <wl@gnu.org>
578 * src/cache/ftcbasic.c: Use single calls to `FT_TRACE'.
580 2014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
582 * src/base/ftobjs.c (Mac_Read_POST_Resource): Additional
583 overflow check in the summation of POST fragment lengths,
584 suggested by Mateusz Jurczyk <mjurczyk@google.com>.
586 2014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
588 * src/base/ftobjs.c (Mac_Read_POST_Resource): Insert comments
589 and fold too long tracing messages.
591 2014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
593 Fix Savannah bug #43540.
595 * src/base/ftmac.c (parse_fond): Prevent a buffer overrun
596 caused by a font including too many (> 63) strings to store
599 2014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
601 * src/base/ftobjs.c (Mac_Read_POST_Resource): Use unsigned long
602 variables to read the lengths in POST fragments. Suggested by
603 Mateusz Jurczyk <mjurczyk@google.com>.
605 2014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
607 Fix Savannah bug #43539.
609 * src/base/ftobjs.c (Mac_Read_POST_Resource): Fix integer overflow
610 by a broken POST table in resource-fork.
612 2014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
614 Fix Savannah bug #43538.
616 * src/base/ftobjs.c (Mac_Read_POST_Resource): Fix integer overflow
617 by a broken POST table in resource-fork.
619 2014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
621 * src/base/ftobjs.c (Mac_Read_POST_Resource): Avoid memory leak
622 by a broken POST table in resource-fork. Return after freeing
623 the buffered POST table when it is found to be broken.
625 2014-11-25 Werner Lemberg <wl@gnu.org>
627 */*: s/Invalid_Argument/Invalid_Size_Handle/ where appropriate.
629 2014-11-25 Werner Lemberg <wl@gnu.org>
631 */*: s/Invalid_Argument/Invalid_Stream_Handle/ where appropriate.
633 2014-11-25 Werner Lemberg <wl@gnu.org>
635 */*: s/Invalid_Argument/Invalid_Library_Handle/ where appropriate.
637 2014-11-25 Werner Lemberg <wl@gnu.org>
639 */*: s/Invalid_Argument/Invalid_Outline/ where appropriate.
641 2014-11-25 Werner Lemberg <wl@gnu.org>
643 */*: s/Invalid_Argument/Invalid_Face_Handle/ where appropriate.
645 2014-11-24 Werner Lemberg <wl@gnu.org>
647 [Savannah bug #43682] Adjust some renderer callbacks.
649 * src/raster/ftraster.c (ft_black_set_mode): Change return type to
650 `int' to stay in sync with `FT_Renderer_SetModeFunc' prototype.
652 * src/smooth/ftgrays.c (gray_raster_set_mode): New dummy function
654 (ft_grays_raster): Use it.
656 2014-11-25 Werner Lemberg <wl@gnu.org>
658 [Savannah bug #43682] Properly handle missing return errors.
660 The functions in this patch *do* return non-trivial errors that must
663 * src/autofit/afloader.c (af_loader_load_g), src/base/ftobjs.c
664 (FT_Render_Glyph_Internal), src/base/ftoutln.c (FT_Outline_Render),
665 src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_endchar>,
666 src/psaux/psobjs.c (ps_parser_load_field_table), src/psaux/t1decode
667 (t1_decoder_parse_charstrings) <op_endchar>, src/truetype/ttgload.c
668 (load_truetype_glyph <subglyph loop>, tt_loader_init,
669 TT_Load_Glyph), src/truetype/ttgxvar.c (TT_Set_MM_Blend),
670 src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Do it.
672 2014-11-25 Werner Lemberg <wl@gnu.org>
674 [Savannah bug #43682] Add/remove `void' casts to some functions.
676 We use a cast to indicate that we intentionally ignore a function's
677 return value. However, this doesn't apply to API functions where
678 errors can only happen for trivially invalid input.
680 * src/base/ftstroke.c (FT_Glyph_Stroke, FT_Glyph_StrokeBorder),
681 src/base/ftsynth.c (FT_GlyphSlot_Embolden), src/cff/cffgload.c
682 (cff_slot_load), src/pfr/pfrdrivr.c (pfr_get_kerning),
683 src/type1/t1load.c (parse_encoding), src/type42/t42parse.c
684 (t42_parse_encoding): Do it.
686 2014-11-25 Werner Lemberg <wl@gnu.org>
688 [Savannah bug #43682] Change some signatures to `void' return type.
690 * include/internal/pshints.h (PSH_Globals_SetScaleFunc),
691 include/internal/sfnt.h (TT_Get_Metrics_Func),
692 src/pshinter/pshglob.c (psh_globals_set_scale),
693 src/pshinter/pshrec.c (ps_hints_init), src/sfnt/ttmtx.c
694 (tt_face_get_metrics), src/truetype/ttinterp.c (TT_Goto_CodeRange,
695 TT_Set_CodeRange, TT_Clear_CodeRange, TT_Done_Context,
696 TT_Save_Context): Do it.
698 * src/pshinter/pshglob.h, src/pshinter/pshrec.h, src/sfnt/ttmtx.h,
699 src/truetype/ttgload.c (TT_Hint_Glyph), src/truetype/ttinterp.c
700 (TT_Run_Context), src/truetype/ttinterp.h, src/truetype/ttobjs.c
701 (tt_size_run_fpgm, tt_size_run_prep): Updated.
703 2014-11-24 Werner Lemberg <wl@gnu.org>
705 Remove all code related to FT_MAX_CHARMAP_CACHEABLE.
707 This is no longer used.
709 * src/base/ftobjs.c, src/cache/ftccmap.c, src/cff/cffobjs.c,
710 src/sfnt/ttcmap.c: Do it.
712 2014-11-24 Werner Lemberg <wl@gnu.org>
714 [sfnt] Fix Savannah bug #43680.
716 This adds an additional constraint to make the fix from 2013-01-25
719 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_image) <index_format==4>:
720 Check `p' before `num_glyphs'.
722 2014-11-24 Werner Lemberg <wl@gnu.org>
724 [truetype] Fix Savannah bug #43679.
726 * src/truetype/ttpload.c (tt_face_load_hdmx): Check minimum size of
729 2014-11-24 Jarkko Pöyry <jarkko.poyry@gmail.com>
731 [cff, pfr, psaux, winfonts] Fix Savannah bug #43676.
733 Don't cast cmap init function pointers to an incompatible type.
735 Without this patch, the number of parameters between declaration and
736 the real signature differs. Calling such a function results in
739 ISO/IEC 9899:TC3 (Committee Draft September 7, 2007)
740 6.5.2.2 Function calls
741 9 If the function is defined with a type that is not
742 compatible with the type (of the expression) pointed to by
743 the expression that denotes the called function, the
744 behavior is undefined.
746 On certain platforms (c -> js with emscripten) this causes
747 termination of execution or invalid calls because in the emscripten
748 implementation, function pointers of different types are stored in
749 different pointer arrays. Incorrect pointer type here results in
750 indexing of an incorrect array.
752 * src/cff/cffcmap.c (cff_cmap_encoding_init, cff_cmap_unicode_init),
753 src/pfr/pfrcmap.c (pfr_cmap_init), src/psaux/t1cmap.c
754 t1_cmap_standard_init, t1_cmap_expert_init, t1_cmap_custom_init,
755 t1_cmap_unicode_init), src/winfonts/winfnt.c (fnt_cmap_init): Fix
758 2014-11-24 Werner Lemberg <wl@gnu.org>
760 [sfnt] Fix Savannah bug #43672.
762 * src/sfnt/ttkern.c (tt_face_load_kern): Use correct value for
763 minimum table length test.
765 2014-11-24 Werner Lemberg <wl@gnu.org>
767 [type1, type42] Another fix for Savannah bug #43655.
769 * src/type1/t1load.c (parse_charstrings), src/type42/t42parse.c
770 (t42_parse_charstrings): Add another boundary testing.
772 2014-11-24 Werner Lemberg <wl@gnu.org>
774 [docmaker] Formatting, copyright, improved documentation.
776 * src/tools/docmaker/*: No code changes besides trivial
779 2014-11-22 Werner Lemberg <wl@gnu.org>
781 [bdf] Fix Savannah bug #43660.
783 * src/bdf/bdflib.c (_bdf_parse_glyphs) <"ENDFONT">: Check
786 2014-11-22 Werner Lemberg <wl@gnu.org>
788 [type42] Allow only embedded TrueType fonts.
790 This is a follow-up to Savannah bug #43659.
792 * src/type42/t42objs.c (T42_Face_Init): Exclusively use the
793 `truetype' font driver for loading the font contained in the `sfnts'
796 2014-11-22 Werner Lemberg <wl@gnu.org>
798 [type42] Fix Savannah bug #43659.
800 * src/type42/t42objs.c (T42_Open_Face): Initialize `face->ttf_size'.
802 * src/type42/t42parse.c (t42_parse_sfnts): Always set
803 `face->ttf_size' directly. This ensures a correct stream size in
804 the call to `FT_Open_Face', which follows after parsing, even for
808 2014-11-22 Werner Lemberg <wl@gnu.org>
810 [cff] Fix Savannah bug #43658.
812 * src/cff/cf2ft.c (cf2_builder_lineTo, cf2_builder_cubeTo): Handle
813 return values of point allocation routines.
815 2014-11-22 Werner Lemberg <wl@gnu.org>
817 [sfnt] Fix Savannah bug #43656.
819 * src/sfnt/ttcmap.c (tt_cmap4_validate): Fix order of validity
822 2014-11-21 Werner Lemberg <wl@gnu.org>
824 [type1, type42] Fix Savannah bug #43655.
826 * src/type1/t1load.c (parse_charstrings), src/type42/t42parse.c
827 (t42_parse_charstrings): Fix boundary testing.
829 2014-11-21 Werner Lemberg <wl@gnu.org>
831 * src/pcf/pcfread.c (pcf_get_metrics): Sanitize invalid metrics.
833 2014-11-21 Werner Lemberg <wl@gnu.org>
835 [ftlcdfil] Obey flow direction.
837 * src/base/ftlcdfil.c (_ft_lcd_filter_fir, _ft_lcd_filter_legacy):
840 2014-11-21 Werner Lemberg <wl@gnu.org>
842 * src/base/ftbitmap.c (FT_Bitmap_Convert): Improve.
844 This commit completes argument checks and adds support for different
847 2014-11-21 Werner Lemberg <wl@gnu.org>
849 * src/base/ftbitmap.c (FT_Bitmap_Copy): Improve.
851 This commit adds argument checks and support for different flow
854 2014-11-20 Werner Lemberg <wl@gnu.org>
856 * src/base/ftbitmap.c (FT_Bitmap_New): Check argument.
858 2014-11-19 Werner Lemberg <wl@gnu.org>
860 Change some fields in `FT_Bitmap' to unsigned type.
862 This doesn't break ABI.
864 * include/ftimage.h (FT_Bitmap): Make `rows', `width', `num_grays',
865 `pixel_mode', and `palette_mode' unsigned types.
867 * src/base/ftbitmap.c: Updated.
868 (FT_Bitmap_Copy): Fix casts.
870 * src/cache/ftcsbits.c, src/raster/ftraster.c, src/sfnt/pngshim.c:
873 2014-11-19 Werner Lemberg <wl@gnu.org>
875 Make `FT_Bitmap_Convert' correctly handle negative `pitch' values.
877 * src/base/ftbitmap.c (FT_Bitmap_Convert): Always use positive value
878 for the pitch while copying data.
879 Correctly set pitch sign in target bitmap.
881 2014-11-19 Werner Lemberg <wl@gnu.org>
883 Minor code improvement in `FT_Bitmap_Embolden'.
885 * src/base/ftbitmap.c (FT_Bitmap_Embolden) <FT_PIXEL_MODE_GRAY[24]>:
888 2014-11-19 Alexei Podtelezhnikov <apodtele@gmail.com>
890 * src/base/fttrigon.c: Use dedicated `FT_Angle' for arctan table.
892 2014-11-19 Behdad Esfahbod <behdad@behdad.org>
894 Avoid compiler warnings on x86-64 for `FT_MulFix'.
896 `FT_MulFix' takes `FT_Long' parameters as defined in `freetype.h',
897 but several inline implementations of it in `ftcalc.h' take
898 `FT_Int32' arguments. This is causing compiler warnings on x86-64:
899 If parameters of type `FT_Fixed' (= `FT_Long') are passed to the
900 inline implementation of this function, integer values are truncated
903 * include/internal/ftcalc.h (FT_MulFix) [FT_MULFIX_ASSEMBLER]: Add
906 2014-11-15 Werner Lemberg <wl@gnu.org>
908 [sfnt] Fix Savannah bug #43597.
910 * src/sfnt/pngshim.c (Load_SBit_Png): Protect against too large
913 2014-11-12 Werner Lemberg <wl@gnu.org>
915 [sfnt] Fix Savannah bug #43591.
917 * src/sfnt/ttsbit.c (tt_sbit_decoder_init): Protect against addition
918 and multiplication overflow.
920 2014-11-12 Werner Lemberg <wl@gnu.org>
922 [sfnt] Fix Savannah bug #43590.
924 * src/sfnt/ttload.c (check_table_dir, tt_face_load_font_dir):
925 Protect against addition overflow.
927 2014-11-12 Werner Lemberg <wl@gnu.org>
929 [sfnt] Fix Savannah bug #43589.
931 * src/sfnt/sfobjs.c (woff_open_font): Protect against addition
934 2014-11-12 Werner Lemberg <wl@gnu.org>
936 [sfnt] Fix Savannah bug #43588.
938 * src/sfnt/ttcmap.c (tt_cmap8_validate, tt_cmap10_validate,
939 tt_cmap12_validate, tt_cmap13_validate, tt_cmap14_validate): Protect
940 against overflow in additions and multiplications.
942 2014-11-10 Alexei Podtelezhnikov <apodtele@gmail.com>
944 [base] CORDIC improvements.
946 The scaling between the hypotenuse and its CORDIC approximation is
947 based on regression analysis. The smaller padding for `theta' is
948 justified by its maximum error of less than 6.
950 * src/base/fttrigon.c (ft_trig_downscale): Borrow code from
951 ./ftcalc.c (ft_multo64), change linear intercept.
952 (ft_trig_pseudo_polarize): Decrease `theta' padding.
954 2014-11-09 Werner Lemberg <wl@gnu.org>
956 * src/base/ftstroke.c (ft_stroker_inside): Fix border intersections.
958 One more place to check whether `radius' is zero.
960 Problem reported by Marco Wertz <marco.wertz@gmx.de>.
962 2014-11-07 Werner Lemberg <wl@gnu.org>
964 [bdf] Fix Savannah bug #43535.
966 * src/bdf/bdflib.c (_bdf_strncmp): New macro that checks one
967 character more than `strncmp'.
968 s/ft_strncmp/_bdf_strncmp/ everywhere.
970 2014-11-06 Werner Lemberg <wl@gnu.org>
972 [pcf] Fix Savannah bug #43548.
974 * src/pcf/pcfread.c (pcf_get_encodings): Add sanity checks for row
977 2014-11-06 Werner Lemberg <wl@gnu.org>
979 [pcf] Fix Savannah bug #43547.
981 * src/pcf/pcfread.c (pcf_read_TOC): Check `size' and `offset'
984 2014-11-06 Werner Lemberg <wl@gnu.org>
986 * src/pcf/pcfread.c (pcf_read_TOC): Avoid memory leak.
988 2014-11-03 Infinality <infinality@infinality.net>
990 * src/truetype/ttsubpix.c (COMPATIBILITY_MODE_Rules): Updated.
992 The previous commit deteriorates rendering of DejaVu and similar
993 fonts; this gets compensated with this rule.
995 2014-11-03 Werner Lemberg <wl@gnu.org>
997 * src/truetype/ttinterp.c (Ins_DELTAP): Fix subpixel hinting.
999 Before this patch, it was impossible to ever call DELTAP[123] in
1000 subpixel hinting mode as described in the ClearType whitepaper; it
1001 only worked if in `compatibility mode'. However, compatibility mode
1002 essentially disables SHPIX, completely ruining hinting of
1003 ttfautohint output, for example.
1005 We now follow the whitepaper more closely so that DELTAP[123]
1006 instructions for touched points in the non-subpixel direction are
1009 2014-10-31 Alexei Podtelezhnikov <apodtele@gmail.com>
1011 [smooth] Improve code readability.
1013 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Rearrange code.
1015 2014-10-31 Alexei Podtelezhnikov <apodtele@gmail.com>
1017 [smooth] Reduce outline translations during rendering.
1019 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Translate origin
1020 virtually by modifying cbox, actually translate outline if cumulative
1023 2014-10-30 Alexei Podtelezhnikov <apodtele@gmail.com>
1025 [smooth] Fix Savannah bug #35604 (cont'd).
1027 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Remove checks and
1028 casts that became unnecessary after the variable type upgrades.
1030 2014-10-29 Alexei Podtelezhnikov <apodtele@gmail.com>
1032 [smooth] Improve code readability.
1034 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Rearrange code.
1036 2014-10-29 Alexei Podtelezhnikov <apodtele@gmail.com>
1038 Unify hypotenuse approximations.
1040 * include/internal/ftcalc.h (FT_HYPOT): Move macro from here...
1041 * include/internal/ftobjs.h: ... to here, next to required `FT_ABS'.
1042 * src/smooth/ftgrays.c (gray_render_cubic): Use it here.
1044 2014-10-25 Werner Lemberg <wl@gnu.org>
1046 [cff] Test valid darkening parameter macros in `ftoption.h'.
1048 We no longer need an otherwise unused typedef that can cause a gcc
1050 Problem reported by Alexei.
1052 * src/cff/cffobjs.c (cff_driver_init): Use
1053 `CFF_CONFIG_OPTION_DARKENING_PARAMETER_XXX' macros directly.
1054 (SET_DARKENING_PARAMETERS): Removed.
1055 Compile time tests are now ...
1057 * devel/ftoption.h, include/config/ftoption.h: ... here.
1059 2014-10-25 Alexei Podtelezhnikov <apodtele@gmail.com>
1061 Improve flat corner definition.
1063 * include/internal/ftcalc.h (FT_HYPOT): Macro to approximate Euclidean
1064 distance with the alpha max plus beta min algorithm.
1065 * src/base/ftcalc.c (ft_corner_is_flat): Use it instead of Taxicab
1068 2014-10-23 David Weiß <David.Weiss@ptvgroup.com>
1070 [build] Improve property file for vc2010.
1072 User-defined properties should be empty by default to prevent linker
1075 * builds/windows/vc2010/freetype.user.props,
1076 builds/windows/vc2010/freetype.vcxproj:
1077 s/OptionsDirectory/UserOptionDirectory/.
1078 Comment out all user options.
1080 2014-10-23 Werner Lemberg <wl@gnu.org>
1082 [cff] Work around bug in preprocessor of MSVC 2010.
1086 https://connect.microsoft.com/VisualStudio/feedback/details/718976/msvc-pr
1088 * devel/ftoption.h, include/config/ftoption.h: Replace
1089 `CFF_CONFIG_OPTION_DARKENING_PARAMETERS' with eight macros
1090 `CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4}'.
1092 * src/cff/cffobjs.c (SET_DARKENING_PARAMETERS): Removed. We no
1093 longer need double expansion.
1094 (SET_DARKENING_PARAMETERS_0): Renamed to ...
1095 (SET_DARKENING_PARAMETERS): ... this.
1098 2014-10-20 Werner Lemberg <wl@gnu.org>
1102 * src/sfnt/ttsbit.c (tt_face_load_sbit) [TT_SBIT_TABLE_TYPE_SBIX]:
1103 Accept overlay format also, but emit warning message in that case.
1104 (tt_sbit_decoder_load_metrics): Add missing newline to error
1106 (tt_sbit_load_sbix_image): Add `rgbl' graphic type (as used on iOS
1107 7.1) to the list of unsupported formats.
1109 2014-10-19 Alexei Podtelezhnikov <apodtele@gmail.com>
1111 [truetype] Clean up bytecode rounding.
1113 Zero distance does not have to be treated specially if you follow
1114 specifications and check the sign as the very last step of rounding.
1116 * src/truetype/ttinterp.c (Round_None, Round_To_Grid,
1117 Round_Down_To_Grid, Round_Up_To_Grid, Round_To_Double_Grid): Use
1118 macros when available, do not check for non-zero distance.
1119 (Round_To_Half_Grid, Round_Super, Round_Super_45): Ditto, return phase
1122 2014-10-18 Alexei Podtelezhnikov <apodtele@gmail.com>
1124 [truetype] Unwrap engine compensation settings.
1126 * src/truetype/ttobjs.c (tt_size_init_bytecode): Updated.
1128 2014-10-18 David Weiß <David.Weiss@ptvgroup.com>
1130 [build] Add property file to vc2010 project.
1132 This simplifies custom build configurations, especially for
1133 automated build environments.
1135 * builds/windows/vc2010/freetype.user.props: New configuration file.
1137 * builds/windows/vc2010/freetype.vcxproj: Include
1138 `freetype.user.props' and use its data fields.
1140 * builds/windows/vc2010/index.html: Updated.
1142 2014-10-18 Werner Lemberg <wl@gnu.org>
1144 [autofit] Add blue-zone support for Telugu.
1146 This essentially moves the Telugu script from the `Indic' hinter to
1149 Note that this is a first shot and quite certainly needs
1152 * src/autofit/afblue.dat: Add blue zone data for Telugu.
1154 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1156 * src/autofit/afscript.h: Add Telugu standard characters and move
1157 data out of AF_CONFIG_OPTION_INDIC block.
1159 * src/autofit/afranges.c: Move Telugu data out of
1160 AF_CONFIG_OPTION_INDIC block.
1162 * src/autofit/afstyles.h: Update Telugu data; in particular, use
1163 AF_WRITING_SYSTEM_LATIN.
1165 2014-10-18 David Wimsey <david@wimsey.us>
1167 [cmake] Add iOS build support.
1168 From Savannah patch #8497.
1170 * builds/cmake/iOS.cmake: New file. Universal binaries are built
1171 with both 32 and 64 bit arm architectures.
1173 * CMakeLists.txt (IOS_PLATFORM): New variable for running the iOS
1174 toolchain. Possible values are `OS' to build on iOS, or
1175 `SIMULATOR' to build on APPLE.
1177 2014-10-16 Behdad Esfahbod <behdad@behdad.org>
1178 Werner Lemberg <wl@gnu.org>
1180 [cff] Add `CFF_CONFIG_OPTION_DARKENING_PARAMETERS' config macro.
1182 * devel/ftoption.h, include/config/ftoption.h
1183 (CFF_CONFIG_OPTION_DARKENING_PARAMETERS): New macro.
1185 * src/cff/cffobjs.c (SET_DARKENING_PARAMETERS,
1186 SET_DARKENING_PARAMETERS_0): New macros.
1187 (cff_driver_init): Use new macros.
1189 2014-10-14 Alexei Podtelezhnikov <apodtele@gmail.com>
1191 [truetype] Limit delta shift range.
1193 The valid range for delta shift is zero through six. Negative values
1194 are invalid according to
1196 https://developer.apple.com/fonts/TrueType-Reference-Manual/RM04/Chap4.html#delta%20shift
1198 * src/truetype/ttobjs.h (delta_shift, delta_base): Make unsigned.
1199 * src/truetype/ttinterp.h (DO_SDS): Throw an error if `delta_shift'
1201 (Ins_DELTAP, Ins_DELTAC): Optimize for valid `delta_shift'.
1203 2014-10-16 Werner Lemberg <wl@gnu.org>
1205 A better fix for Savannah bug #43392.
1206 Suggested by Doug Felt <dougfelt@gmail.com>.
1208 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics): Set
1209 `vertAdvance' to zero...
1211 * src/truetype/ttgload.c (TT_Load_Glyph): ... and set here a default
1212 value for `vertAdvance' based on `linearVertAdvance' in case
1213 `vertAdvance' is zero. Note that the previous computed ad-hoc value
1214 for `linearVertAdvance' was apparently not tested in a real-life
1217 2014-10-14 David Weiß <David.Weiss@ptvgroup.com>
1219 [build] Better optimization settings for vc2010 solution file.
1221 * builds/windows/vc2010/freetype.sln,
1222 builds/windows/vc2010/freetype.vcxproj: Updated.
1224 2014-10-14 Werner Lemberg <wl@gnu.org>
1226 [autofit] Adjust Devanagari character range.
1228 * src/autofit/afranges.c (af_deva_uniranges): Omit characters that
1229 are common to all other Indic scripts.
1231 2014-10-12 Werner Lemberg <wl@gnu.org>
1233 [sfnt] Fix Savannah bug #43392.
1235 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics): Don't let
1236 vertical metrics uninitialized.
1238 2014-10-11 Alexei Podtelezhnikov <apodtele@gmail.com>
1240 [base] Small bbox correction.
1242 * src/base/ftbbox.c (FT_Outline_Get_BBox): Start from nonsense bbox
1243 instead of initial point that could be `off' in conic outlines.
1245 2014-10-08 Alexei Podtelezhnikov <apodtele@gmail.com>
1247 [base] Fix Savannah bug #43356.
1249 * src/base/ftbbox.c (BBox_Move_To, BBox_Conic_To): Update bbox in case
1251 (BBox_Line_To): New emitter that does not update bbox.
1253 2014-10-08 Alexei Podtelezhnikov <apodtele@gmail.com>
1255 [base] Introduce and use new macro `FT_UPDATE_BBOX'
1257 * src/base/ftbbox.c (FT_UPDATE_BBOX): New macro.
1258 (FT_Outline_Get_BBox): Use it here.
1260 2014-10-02 Alexei Podtelezhnikov <apodtele@gmail.com>
1262 [base] Significant optimization of `ft_div64by32'
1264 We shift as many bits as we can into the high register, perform
1265 32-bit division with modulo there, then work through the remaining
1266 bits with long division. This optimization is especially noticeable
1267 for smaller dividends that barely use the high register.
1269 * src/base/ftcalc.c (ft_div64by32): Updated.
1271 2014-10-02 Dave Arnold <darnold@adobe.com>
1273 [cff] Fix Savannah bug #43271.
1275 * src/cff/cf2font.c (cf2_computeDarkening): Change overflow
1276 detection to use logarithms and clamp `scaledStem'.
1278 2014-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
1280 * src/base/ftcalc.c: Remove miscellaneous type casts.
1282 2014-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
1284 [base] Use more common `FT_MSB' implementation with masks.
1286 * src/base/ftcalc.c (FT_MSB): Updated.
1288 2014-09-30 Alexei Podtelezhnikov <apodtele@gmail.com>
1292 * src/base/ftcalc.c (FT_MOVE_SIGN): New macro for frequently used
1295 2014-09-25 Alexei Podtelezhnikov <apodtele@gmail.com>
1297 [base] Avoid unnecessary long division.
1299 This applies to `FT_MulDiv' but not to `FT_DivFix', where overflows or
1300 lack thereof are predicted accurately.
1302 * src/base/ftcalc.c (ft_div64by32): Improve readability.
1303 (FT_MulDiv, FT_MulDiv_No_Round) [!FT_LONG64]: Use straight division
1304 when multiplication stayed within 32 bits.
1306 2014-09-24 Werner Lemberg <wl@gnu.org>
1308 [autofit] Minor clean-ups.
1310 * src/autofit/afhints.c (AF_FLAGS): Remove obsolete values.
1312 * src/autofit/afhints.c (af_glyph_hints_dump_points,
1313 af_glyph_hints_align_strong_points): Updated.
1315 * src/autofit/aflatin.c (af_latin_hints_link_segments,
1316 af_latin_hints_compute_segments), src/autofit/afcjk.c
1317 (af_cjk_hints_link_segments), src/autofit/aflatin2.c
1318 (af_latin2_hints_link_segments, af_latin2_hints_compute_segments):
1319 There are no longer fake segments since more than 10 years...
1321 2014-09-22 Werner Lemberg <wl@gnu.org>
1323 [autofit] Minor code streamlining.
1325 * src/autofit/afhints.c (af_axis_hints_new_edge): Remove redundant
1328 2014-09-19 Alexei Podtelezhnikov <apodtele@gmail.com>
1330 * src/base/ftcalc.c: Harmonize code.
1332 2014-09-15 Alexei Podtelezhnikov <apodtele@gmail.com>
1334 [base] Tighten the overflow check in `FT_MulDiv'.
1336 * src/base/ftcalc.c (FT_MulDiv) [!FT_LONG64]: Updated.
1338 2014-09-08 Alexei Podtelezhnikov <apodtele@gmail.com>
1340 Fix Savannah bug #43153.
1342 * src/psaux/psconv.c (PS_Conv_ToFixed): Add protection against
1343 overflow in `divider'.
1345 2014-09-03 Alexei Podtelezhnikov <apodtele@gmail.com>
1347 [base] Tighten the overflow check in `FT_DivFix'.
1349 This fixes a 13-year old bug. The original overflow check should have
1350 been updated when rounding was introduced into this function
1353 * src/base/ftcalc.c (FT_DivFix) [!FT_LONG64]: Updated.
1354 * include/freetype.h (FT_DivFix): Updated documentation.
1356 2014-09-03 Alexei Podtelezhnikov <apodtele@gmail.com>
1358 [base] Tighten the overflow check in `FT_MulFix'.
1360 * src/base/ftcalc.c (FT_MulFix) [!FT_LONG64]: Updated.
1362 2014-09-02 Alexei Podtelezhnikov <apodtele@gmail.com>
1364 [truetype] Shortcut ppem calculations for square pixels.
1366 * src/truetype/ttinterp.h (TT_ExecContextRec): New field
1367 `cur_ppem_func' with a function pointer.
1368 * src/truetype/ttinterp.c (TT_RunIns): Initialize `cur_ppem_func'
1369 depending on the pixel geometry to either...
1370 (Current_Ppem_Stretched): ... this for stretched pixels.
1371 (Current_Ppem): ... or this for square pixels.
1372 (DO_MPPEM, DO_MPS, Ins_DELTAP, Ins_DELTAC): Use `cur_ppem_func'.
1374 2014-08-31 Behdad Esfahbod <behdad@behdad.org>
1376 Don't use `register' keyword. Fixes compiler warnings.
1378 * src/base/ftcalc.c (FT_Add64) [!FT_LONG64]: Do it.
1379 * src/gzip/inftrees.c (huft_build): Ditto.
1380 * src/truetype/ttinterp.c (TT_MulFix14_arm): Ditto.
1382 2014-08-24 Alexei Podtelezhnikov <apodtele@gmail.com>
1384 [truetype] Optimize DELTAP and DELTAC.
1386 * src/truetype/ttinterp.c (Ins_DELTAP, Ins_DELTAC): Move ppem
1387 calculations outside of the loop.
1389 2014-08-21 Alexei Podtelezhnikov <apodtele@gmail.com>
1391 Fix Savannah bug #43033.
1393 * include/config/ftconfig.h, builds/unix/ftconfig.in,
1394 builds/vms/ftconfig.h [FT_LONG64]: Do not disable the macro when
1395 64-bit type is `long'.
1397 2014-08-20 Alexei Podtelezhnikov <apodtele@gmail.com>
1399 [base] Small optimization of `FT_MulFix'.
1401 * src/base/ftcalc.c (FT_MulFix): Loosen up the condition for direct
1402 32-bit calculations.
1404 2014-08-19 Alexei Podtelezhnikov <apodtele@gmail.com>
1406 [base] Use unsigned calculation in `FT_MulDiv'.
1408 * src/base/ftcalc.c (FT_MulDiv): Updated to expand 32-bit range.
1410 2014-08-18 Alexei Podtelezhnikov <apodtele@gmail.com>
1412 [base] Remove truncation in `FT_DivFix'.
1414 * src/base/ftcalc.c (FT_DivFix): Updated.
1416 2014-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
1420 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round): Updated.
1422 2014-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
1424 Turn FT_MSB into a macro when using gcc builtins.
1426 * src/base/ftcalc.c, include/internal/ftcalc.h: Updated.
1428 2014-08-12 Alexei Podtelezhnikov <apodtele@gmail.com>
1430 [base] Avoid undefined FT_MSB in `BBox_Cubic_Check'.
1432 * src/base/ftbbox.c (BBox_Cubic_Check): Update.
1433 (update_cubic_max): Replace with...
1434 (cubic_peak): ... this, which now handles upscaling.
1436 2014-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
1438 [base] Handle collapsed outlines to avoid undefined FT_MSB.
1440 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Update.
1442 2014-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
1444 [base] Restore FT_MulFix inlining.
1446 * include/freetype.h (FT_MulFix): Unconditionally defined.
1448 * src/base/ftcalc.c [FT_MULFIX_ASSEMBLER]: Move code from here...
1450 * include/internal/ftcalc.h [FT_MULFIX_ASSEMBLER]: ... to here,
1451 which conditionally replaces the function with an inline version
1454 2014-08-08 Alexei Podtelezhnikov <apodtele@gmail.com>
1456 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Refactor.
1458 2014-07-26 Werner Lemberg <wl@gnu.org>
1462 * src/cff/cf2hints.c (cf2_glyphpath_computeOffset): Use correct
1463 offsets in third quadrant.
1465 Reported by maks <maksqwe1@ukr.net>.
1467 2014-07-17 Werner Lemberg <wl@gnu.org>
1469 Fix Savannah bug #42788.
1471 * src/pfr/pfrobjs.c: Include `ftcalc.h'.
1473 2014-07-16 Alexei Podtelezhnikov <apodtele@gmail.com>
1475 Replace `ft_highpow2' function.
1477 * src/pfr/pfrobjs.c (pfr_face_get_kerning): Use `FT_MSB' instead of
1480 * src/base/ftutil.c, include/internal/ftobjs.h (ft_highpow2): Remove
1483 2014-07-15 Alexei Podtelezhnikov <apodtele@gmail.com>
1485 * src/base/ftcalc.c (FT_MSB): Utilize gcc builtins.
1487 2014-07-15 Alexei Podtelezhnikov <apodtele@gmail.com>
1489 [base] Move assembler code back in the source file.
1491 FT_MulFix assembler used to reside in ftcalc.c before f47d263f1b.
1493 * include/config/ftconfig.h, builds/unix/ftconfig.in,
1494 builds/vms/ftconfig.h [FT_MULFIX_ASSEMBLER]: Move code from here...
1496 * src/base/ftcalc.c [FT_MULFIX_ASSEMBLER]: ... to here.
1498 2014-07-14 Alexei Podtelezhnikov <apodtele@gmail.com>
1500 [base] Further clean up color bitmap conversion.
1502 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Stop
1503 using FT_MulFix and FT_DivFix since all calculations fit into 32 bits.
1505 2014-07-13 Werner Lemberg <wl@gnu.org>
1507 [truetype] Improve handling of buggy `prep' tables.
1509 In case of an error in the `prep' table, no longer try to execute it
1510 again and again. This makes FreeType handle endless loops in buggy
1513 * src/truetype/ttobjs.h (TT_SizeRec): The fields `bytecode_ready'
1514 and `cvt_ready' are now negative if not initialized yet, otherwise
1515 they indicate the error code of the last run.
1517 * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep,
1518 tt_size_done_bytecode, tt_size_init_bytecode,
1519 tt_size_ready_bytecode, tt_size_init, tt_size_done, tt_size_reset):
1522 * src/truetype/ttgload.c (tt_loader_init): Updated.
1523 * src/truetype/ttinterp.c (TT_RunIns): Force reexecution of `fpgm'
1524 and `prep' only if we are in the `glyf' table.
1526 2014-07-12 Werner Lemberg <wl@gnu.org>
1528 * builds/vms/ftconfig.h: Synchronize.
1529 Problem reported by Alexei.
1531 2014-07-11 Alexei Podtelezhnikov <apodtele@gmail.com>
1533 [base] Clean up bitmap conversion.
1535 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Use
1536 appropriate FT_DivFix and remove superfluous upscaling.
1538 2014-07-04 Alexei Podtelezhnikov <apodtele@gmail.com>
1540 [base] Small optimization of the ancient code.
1542 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round): Loosen up the
1543 condition for direct 32-bit calculations.
1545 2014-06-27 Werner Lemberg <wl@gnu.org>
1547 Fix Apple standard glyph names.
1549 * src/sfnt/ttpost.c (tt_post_default_names): Synchronize with
1552 Problem reported by Adam Twardoch <adam@fontlab.com>.
1554 2014-06-17 Werner Lemberg <wl@gnu.org>
1556 Partially revert commit from 2014-06-13.
1558 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Move
1559 declaration of `p_first' and `p_last' out of the loop.
1561 2014-06-17 Werner Lemberg <wl@gnu.org>
1563 * builds/unix/freetype2.m4: s/AC_PATH_PROG/AC_PATH_TOOL/.
1565 This simplifies cross-compiling.
1567 2014-06-13 Werner Lemberg <wl@gnu.org>
1569 Fix more compiler warnings.
1570 Reported by Wojciech Mamrak <wmamrak@gmail.com>.
1572 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
1573 Make integer constant unsigned.
1575 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
1576 <TT_SBIT_TABLE_TYPE_SBIX>: Fix types.
1577 (tt_sbit_decoder_load_compound, tt_face_load_sbix_image): Add proper
1580 2014-06-13 Werner Lemberg <wl@gnu.org>
1582 Fix compiler warnings.
1583 Reported by Wojciech Mamrak <wmamrak@gmail.com>.
1585 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage),
1586 src/autofit/afmodule.c (af_property_set): Fix `signed' vs.
1589 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Make compiler
1592 * src/base/ftlcdfil.c (_ft_lcd_filter_fir): Use only four elements
1594 Fix `signed' vs. `unsigned' issues.
1596 * src/sfnt/sfobjs.c (WRITE_BYTE): Removed, unused.
1597 (WRITE_USHORT, WRITE_ULONG): Add proper casts.
1599 * src/truetype/ttgload.c (TT_Get_VMetrics): Add proper casts.
1601 * src/truetype/ttinterp.c (Ins_DELTAP): Add proper casts for `B1'
1604 2014-05-16 Alexey Petruchik <alexey.petruchik@gmail.com>
1606 [cmake] Add option to build OS X framework.
1608 * CMakeLists.txt: Update accordingly.
1610 * builds/mac/freetype-Info.plist: New file.
1612 2014-05-13 Pavel Koshevoy <pkoshevoy@gmail.com>
1614 * CMakeLists.txt (BASE_SRCS): Add missing `ftbdf.c'.
1616 2014-05-11 Werner Lemberg <wl@gnu.org>
1618 [autofit] Fix variable initializations.
1620 * src/autofit/afhints.c (af_glyph_hints_reload): Assign default
1621 values to `in_dir' and `out_dir' for all points.
1623 2014-05-11 Werner Lemberg <wl@gnu.org>
1625 [autofit] Fix crash with font `CabinSketch-Bold.ttf'.
1627 Problem reported by Ralf S. Engelschall <rse@engelschall.com>.
1629 * src/autofit/afhints.c (af_glyph_hints_reload): Fix threshold for
1630 finding first non-near point.
1631 Properly initialize non-near point deltas.
1633 2014-05-01 Werner Lemberg <wl@gnu.org>
1635 [autofit] Add blue-zone support for Devanagari.
1637 This essentially moves the Devanagari script from the `Indic' hinter
1638 to the `Latin' hinter. Thanks to Girish Dalvi
1639 <girish.dalvi@gmail.com> for guidance with blue zone characters!
1641 * src/autofit/afblue.dat: Add blue zone data for Devanagari.
1643 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1645 * src/autofit/afscript.h: Add Devanagari standard characters and
1646 move data out of AF_CONFIG_OPTION_INDIC block.
1648 * src/autofit/afranges.c: Move Devanagari data out of
1649 AF_CONFIG_OPTION_INDIC block.
1650 Move U+20B9, (new) Rupee sign, from Latin to Devanagari.
1652 * src/autofit/afstyles.h: Update Devanagari data; in particular, use
1653 AF_WRITING_SYSTEM_LATIN.
1655 2014-05-01 Werner Lemberg <wl@gnu.org>
1657 [autofit] Fix handling of neutral blue zones in stems.
1659 * src/autofit/afhints.h (AF_Edge_Flags): New value
1662 * src/autofit/aflatin.c (af_latin_hints_compute_blue_edges): Trace
1663 neutral blue zones with AF_EDGE_NEUTRAL.
1664 (af_latin_hint_edges): Skip neutral blue zones if necessary.
1666 2014-04-28 Werner Lemberg <wl@gnu.org>
1668 [autofit] Introduce neutral blue zones to the latin module.
1670 Such blue zones match either the top or the bottom of a contour. We
1671 need them for scripts where accent-like elements directly touch the
1672 base character (for example, some vowel signs in Devanagari, cf.
1675 * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_NEUTRAL): New
1678 * src/autofit/afblue.h: Regenerated.
1680 * src/autofit/aflatin.h (AF_LATIN_IS_NEUTRAL_BLUE): New macro.
1681 (AF_LATIN_BLUE_NEUTRAL): New enumeration value.
1683 * src/autofit/aflatin.c (af_latin_metrics_init_blues,
1684 af_latin_hints_compute_blue_edges): Handle neutral blue zones.
1686 2014-04-25 Werner Lemberg <wl@gnu.org>
1688 * src/autofit/hbshim.c: Partially revert commit from 2014-04-17.
1690 Using input glyph coverage data is simply wrong.
1692 Problem reported by Nikolaus Waxweiler <madigens@gmail.com> and
1693 Mantas MikulÄ—nas <grawity@gmail.com>.
1695 2014-04-23 Werner Lemberg <wl@gnu.org>
1697 * src/raster/ftraster.c (Vertical_Sweep_Span): Use drop-out mode.
1699 This spot has been missed while introducing support for various
1700 drop-out modes years ago (including no drop-out mode, which this
1703 Problem reported by Patrick Thomas <pthomas505@gmail.com>.
1705 2014-04-22 Werner Lemberg <wl@gnu.org>
1707 * src/sfnt/pngshim.c (error_callback): s/longjmp/ft_longjmp/.
1709 2014-04-20 Werner Lemberg <wl@gnu.org>
1711 [autofit] Fix Savannah bug #42148.
1713 The adaptation of the cjk auto-hinter module to blue stringsets in
1714 2013-08-25 had three severe bugs. Mea culpa.
1716 1. Contrary to the latin auto-hinter, characters for reference and
1717 overshoot values of a blue zone are specified separately. Due to
1718 the screwed-up change it didn't work at all.
1720 2. A boolean comparison was erroneously replaced with a cast,
1721 causing invalid results with the `^' operator later on. The
1722 visual artifact caused by this problem is the topic of the bug
1725 3. Two flag values were inverted, causing incorrect assignment of
1726 reference and overshoot values.
1728 * src/autofit/afblue.dat: Fix CJK bluestrings, introducing a new
1729 syntax to have both reference and overshoot characters in a single
1730 string. This is error #1.
1731 Add extensive comments.
1733 * src/autofit/afblue.hin (AF_BLUE_PROPERTY_CJK_FILL): Removed, no
1735 (AF_BLUE_PROPERTY_CJK_TOP, AF_BLUE_PROPERTY_CJK_HORIZ): Fix values.
1738 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
1740 * src/autofit/afcjk.c (af_cjk_metrics_init_blues): Correct error #1.
1741 Use character `|' to separate characters for reference and overshoot
1743 Improve tracing messages, synchronizing them with the latin
1745 (af_cjk_hints_compute_blue_edges): Fix value of `is_top_right_blue'.
1747 (af_cjk_align_linked_edge): Add tracing message.
1749 * src/autofit/afcjk.h (AF_CJK_IS_FILLED_BLUE): Removed, no longer
1752 2014-04-17 Werner Lemberg <wl@gnu.org>
1754 [autofit] More coverage fixes for complex scripts.
1756 * src/autofit/hbshim.c (af_get_coverage): Merge input glyph coverage
1757 of GSUB lookups into output coverage. Otherwise, ligatures are not
1759 Don't check blue zone characters for default coverage.
1761 2014-04-17 Werner Lemberg <wl@gnu.org>
1763 Make `FT_Get_SubGlyph_Info' actually work.
1765 * src/base/ftobjs.c (FT_Get_SubGlyph_Info): Return FT_Err_Ok
1766 if there is no error.
1768 2014-04-15 Werner Lemberg <wl@gnu.org>
1770 [afblue.pl]: Minor improvements.
1772 * src/tools/afblue.pl: Allow whitespace before comments.
1773 Ignore whitespace in strings.
1775 2014-04-14 Werner Lemberg <wl@gnu.org>
1777 [autofit] Improve coverage handling.
1779 * src/autofit/hbshim.c (af_get_coverage): Don't exclude glyphs
1780 appearing in the GPOS table if we are processing the default
1783 2014-04-13 David Weber <weber.aulendorf@googlemail.com>
1785 [smooth] Fix stand-alone compilation.
1787 * src/smooth/ftgrays.c (FT_BEGIN_STMNT, FT_END_STMNT): Define.
1789 2014-04-12 Werner Lemberg <wl@gnu.org>
1791 [autofit] Redesign the recognition algorithm of strong points.
1793 In particular, local extrema without horizontal or vertical segments
1794 are better recognized:
1805 If the distances AB and CD are large, point B wasn't previously
1806 detected as an extremum since the `ft_corner_is_flat' function
1807 `swallowed' BC regardless of its direction, tagging point B as weak.
1808 The next iteration started at B and made `ft_corner_is_flat' swallow
1809 point C, tagging it as weak also, et voilà .
1811 To improve that, another pass gets now performed before calling
1812 `ft_corner_is_flat' to improve the `topology' of an outline: A
1813 sequence of non-horizontal or non-vertical vectors that point into
1814 the same quadrant are handled as a single, large vector.
1816 Additionally, distances of near points are now accumulated, which
1817 makes the auto-hinter handle them as if they were prepended to the
1818 next non-near vector.
1820 This generally improves the auto-hinter's rendering results.
1822 * src/autofit/afhints.c (af_glyph_hints_reload): Implement it.
1824 * src/autofit/afhints.h (AF_FLAGS): Remove no longer used flag
1827 2014-04-05 Werner Lemberg <wl@gnu.org>
1829 [autofit] Improve scoring algorithm for identifying stems.
1831 Problem reported by Karsten Lücke <karsten.luecke@kltf.de>.
1833 The new algorithm takes care of the width of stems: If the distance
1834 between two segments is larger than the largest stem width, the
1835 demerits quickly increase for larger distances. This improves
1836 hinting of slanted fonts (especially if the inner parts of serifs
1837 have non-horizontal `shoulders'), avoiding false stem links.
1839 * src/autofit/aflatin.c (af_latin_hints_link_segments): Use largest
1840 stem width (if available) to compute better demerits for distances
1842 (af_latin_hints_detect_features): Pass stem width array and array
1844 (af_latin_metrics_init_widths): Updated to use original algorithm.
1845 (af_latin_hints_apply): Updated to use new algorithm.
1847 * src/autofit/aflatin.h: Updated.
1848 * src/autofit/afcjk.c: Updated.
1850 2014-04-03 Werner Lemberg <wl@gnu.org>
1852 Don't require `gzip' module for `sfnt'.
1854 Reported by Preet <prismatic.project@gmail.com>.
1856 * src/sfnt/sfobjs.c (woff_open_font): Guard use of
1857 FT_Gzip_Uncompress with FT_CONFIG_OPTION_USE_ZLIB.
1859 2014-03-27 Werner Lemberg <wl@gnu.org>
1861 Fix Savannah bug #38235.
1863 Work around a bug in pkg-config version 0.28 and earlier: If a
1864 variable value gets surrounded by doublequotes (in particular values
1865 for the `prefix' variable), the prefix override mechanism fails.
1867 * builds/unix/freetype2.in: Don't use doublequotes.
1868 * builds/unix/unix-def.in (freetype.pc): Escape spaces in directory
1869 names with backslashes.
1871 2014-03-24 Werner Lemberg <wl@gnu.org>
1873 Fix Savannah bug #41946.
1875 Based on a patch from Marek KaÅ¡Ãk <mkasik@redhat.com>.
1877 * builds/unix/configure.raw (LIBS_CONFIG): Remove.
1878 * builds/unix/freetype-config.in (libs): Hard-code value.
1879 * builds/unix/unix-def.in: Updated.
1881 2014-03-22 Werner Lemberg <wl@gnu.org>
1883 Another revert for the change from 2014-03-18.
1885 Problem reported by Nikolaus Waxweiler <madigens@gmail.com>.
1887 * src/base/ftcalc.c (FT_MulFix): Ensure that an `FT_MulFix' symbol
1888 gets always exported.
1890 2014-03-20 Werner Lemberg <wl@gnu.org>
1892 CMakeLists.txt: Another fix for include directories.
1894 Problem reported by Taylor Holberton <taylorcholberton@gmail.com>.
1896 2014-03-19 Werner Lemberg <wl@gnu.org>
1898 CMakeLists.txt: Fix include directories.
1900 Problem reported by Taylor Holberton <taylorcholberton@gmail.com>.
1902 2014-03-19 Werner Lemberg <wl@gnu.org>
1904 Partially revert last commit.
1908 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Initializing
1909 those variables is plain wrong, since we are in a loop.
1911 2014-03-18 Sean McBride <sean@rogue-research.com>
1912 Werner Lemberg <wl@gnu.org>
1916 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Initialize
1919 * src/base/ftcalc.c (FT_MulFix): Only use code if
1920 `FT_MULFIX_INLINED' is not defined.
1922 * src/bdf/bdfdrivr.c (bdf_cmap_class), src/cache/ftcbasic.c
1923 (ftc_basic_image_family_class, ftc_basic_image_cache_class,
1924 ftc_basic_sbit_family_class, ftc_basic_sbit_cache_class),
1925 src/cache/ftccmap.c (ftc_cmap_cache_class), src/cache/ftcmanag.c
1926 (ftc_size_list_class, ftc_face_list_class), src/pcf/pcfdrivr.c
1927 (pcf_cmap_class), src/pfr/pfrdrivr.c (pfr_metrics_service_rec): Make
1930 * src/type1/t1driver.c (t1_ps_get_font_value): Remove redundant
1933 2014-03-17 Werner Lemberg <wl@gnu.org>
1935 Fix Savannah bug #41869.
1937 This works around a problem with HarfBuzz (<= 0.9.26), which doesn't
1938 validate glyph indices returned by
1939 `hb_ot_layout_lookup_collect_glyphs'.
1941 * src/autofit/hbshim.c (af_get_coverage): Guard `idx'.
1943 * docs/CHANGES: Updated.
1945 2014-03-14 Werner Lemberg <wl@gnu.org>
1947 * builds/unix/configure.raw: Don't show error messages of `which'.
1949 2014-03-09 Alan Coopersmith <alan.coopersmith@oracle.com>
1951 Fix cppcheck 1.64 warning.
1953 * src/autofit/afglobal.c (af_face_globals_new): Catch NULL pointer
1954 dereference in case of error.
1956 2014-03-09 Sean McBride <sean@rogue-research.com>
1958 * src/sfnt/ttcmap.c (tt_face_build_cmaps): Remove clang warning.
1960 2014-03-06 Werner Lemberg <wl@gnu.org>
1962 * Version 2.5.3 released.
1963 =========================
1966 Tag sources with `VER-2-5-3'.
1968 * docs/VERSION.DLL: Update documentation and bump version number to
1971 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
1972 builds/windows/vc2005/index.html,
1973 builds/windows/vc2008/freetype.vcproj,
1974 builds/windows/vc2008/index.html,
1975 builds/windows/vc2010/freetype.vcxproj,
1976 builds/windows/vc2010/index.html,
1977 builds/windows/visualc/freetype.dsp,
1978 builds/windows/visualc/freetype.vcproj,
1979 builds/windows/visualc/index.html,
1980 builds/windows/visualce/freetype.dsp,
1981 builds/windows/visualce/freetype.vcproj,
1982 builds/windows/visualce/index.html,
1983 builds/wince/vc2005-ce/freetype.vcproj,
1984 builds/wince/vc2005-ce/index.html,
1985 builds/wince/vc2008-ce/freetype.vcproj,
1986 builds/wince/vc2008-ce/index.html: s/2.5.2/2.5.3/, s/252/253/.
1988 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
1990 * builds/unix/configure.raw (version_info): Set to 17:2:11.
1991 * CMakeLists.txt (VERSION_PATCH): Set to 3.
1992 * docs/CHANGES: Updated.
1994 2014-03-06 Werner Lemberg <wl@gnu.org>
1996 Fixes for compilation with C++.
1998 * src/autofit/hbshim.c (scripts): Change type to `hb_script_t'.
1999 (af_get_coverage): Updated.
2000 (COVERAGE): Add cast.
2002 2014-03-06 Sean McBride <sean@rogue-research.com>
2004 Remove more clang analyzer warnings.
2006 * src/bdf/bdflib.c (_bdf_readstream), src/truetype/ttgload.c
2007 (TT_Load_Glyph): Remove dead stores.
2009 2014-03-05 Werner Lemberg <wl@gnu.org>
2011 * builds/unix/configure.raw: Simplify.
2013 2014-03-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2015 Fix a bug in configure in library dependency setting
2016 Reported in https://bugs.freedesktop.org/show_bug.cgi?id=75652.
2018 * builds/unix/configure.raw: Use `x"${xxx}" != xno' style.
2020 2014-03-04 Werner Lemberg <wl@gnu.org>
2022 Minor fix for `make devel'.
2024 * builds/freetype.mk (INCLUDE_FLAGS) [DEVEL_DIR]: Don't use
2025 pkg-config for bzip2 since not all GNU/Linux distributions have
2026 `bzip2.pc' (and the header file `bzlib.h' is located in /usr/include
2029 2014-03-04 Sean McBride <sean@rogue-research.com>
2031 Fix several clang static analyzer dead store warnings.
2033 * src/autofit/afhints.c (af_glyph_hints_reload,
2034 af_glyph_hints_align_weak_points): Remove unnecessary assignments.
2036 * src/bdf/bdflib.c (bdf_font_load): Ditto.
2038 * src/pshinter/pshalgo.c (psh_glyph_compute_extrema,
2039 psh_glyph_interpolate_other_points): Ditto.
2041 * src/type1/t1load.c (T1_Set_MM_Blend): Ditto.
2043 2014-03-03 Werner Lemberg <wl@gnu.org>
2045 Rewrite library option handling in `configure'.
2047 o Introduce `auto' value for `--with-XXX' library options; this is
2050 o First use `pkg-config' for library detection, then fall back to
2053 * builds/unix/configure.raw (--with-zlib, --with-bzip2, --with-png,
2054 --with-harfbuzz): Rewrite.
2055 Use new `xxx_reqpriv', `xxx_libpriv', and `xxx_libstaticconf'
2056 variables to collect data for `freetype2.pc' and `freetype-config'.
2057 (FT2_EXTRA_LIBS): Renamed to ...
2058 (ft2_extra_libs): This since it gets no longer substituted.
2059 (REQUIRES_PRIVATE, LIBS_PRIVATE, LIBS_CONFIG, LIBSSTATIC_CONFIG):
2060 New output variables, replacing `XXX_PKG' and `LIBXXX'.
2061 Add notice at the end of `configure' showing the library
2064 * builds/unix/freetype-config.in (--static): New command line
2067 (staticlibs): New variable, to be used if `--static' is given.
2068 * docs/freetype-config.1: Document `--static'.
2070 * builds/unix/freetype2.in, builds/unix/unix-def.in: Updated.
2072 2014-03-01 Werner Lemberg <wl@gnu.org>
2074 Avoid `long long' warnings with older gcc compilers.
2075 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
2077 * builds/unix/configure.raw: Don't use gcc's `-pedantic' flag for
2078 versions < 4.6. This is especially needed for Max OS X since this
2079 OS runs a gcc variant (or emulation) based on version 4.2.1.
2081 2014-03-01 Werner Lemberg <wl@gnu.org>
2083 * docs/INSTALL.CROSS: Revised and updated.
2085 2014-03-01 Werner Lemberg <wl@gnu.org>
2087 Make `make clean' remove `freetype2.pc'.
2089 This is a generated file at build time, not configure time.
2091 * builds/unix/unix-def.in (DISTCLEAN): Move `freetype2.pc' to ...
2092 (CLEAN): This variable.
2094 2014-03-01 Werner Lemberg <wl@gnu.org>
2096 Use pkg-config for detecting libpng and libbz2 also.
2098 * builds/unix/configure.raw (HAVE_PKG): New variable.
2099 Search for libbz2 using `pkg-config'; s/BZ2/BZIP2/.
2100 Search for libpng using `pkg-config'.
2101 Fix definition of `LIBHARFBUZZ' variable.
2102 * builds/unix/freetype-config.in ($libs): Updated.
2103 * builds/unix/freetype2.in: Add `URL' field.
2104 Update `Requires.private' and `Libs.private'.
2105 * builds/unix/unix-def.in: Updated.
2107 2014-03-01 Werner Lemberg <wl@gnu.org>
2109 Add configure support for HarfBuzz.
2111 * builds/unix/pkg.m4: New file.
2112 * builds/unix/configure.raw: Search for libharfbuzz using
2114 Add `--without-harfbuzz' option.
2115 * builds/unix/freetype-config.in, builds/unix/freetype2.in,
2116 builds/unix/unix-def.in (freetype-config, freetype2.pc): Handle
2119 * docs/INSTALL.UNIX: Document interdependency of FreeType with
2122 2014-02-28 Alexei Podtelezhnikov <apodtele@gmail.com>
2124 [cff] Math simplifications.
2126 * src/cf2blues.c (cf2_blues_init): Use `FT_MulDiv'.
2127 * src/cf2ft.c (cf2_getScaleAndHintFlag): Use simple division.
2129 2014-02-28 Dave Arnold <darnold@adobe.com>
2131 [cff] Fix Savannah bug #41697, part 2.
2133 * src/cff/cf2ft.c (cf2_initLocalRegionBuffer,
2134 cf2_initGlobalRegionBuffer): It is possible for a charstring to call
2135 a subroutine if no subroutines exist. This is an error but should
2136 not trigger an assert. Split the assert to account for this.
2138 2014-02-28 Dave Arnold <darnold@adobe.com>
2140 [cff] Fix Savannah bug #41697, part 1.
2142 * src/cff/cf2hints.c (cf2_hintmap_build): Return when `hintMask' is
2143 invalid. In this case, it is not safe to use the length of
2144 `hStemHintArray'; the exception has already been recorded in
2147 2014-02-26 Werner Lemberg <wl@gnu.org>
2149 [sfnt] Fix Savannah bug #41696.
2151 * src/sfnt/ttcmap.c (tt_cmap0_validate, tt_cmap2_validate,
2152 tt_cmap4_validate, tt_cmap14_validate): Fix limit tests.
2154 2014-02-26 Werner Lemberg <wl@gnu.org>
2156 [winfnt] Fix Savannah bug #41694.
2158 * src/winfonts/winfnt.c (FNT_Load_Glyph): Check glyph offset.
2160 2014-02-26 Werner Lemberg <wl@gnu.org>
2162 [cff] Fix Savannah bug #41693.
2164 * src/cff/cffload.c (CFF_Load_FD_Select): Reject empty array.
2166 2014-02-26 Werner Lemberg <wl@gnu.org>
2168 [bdf] Fix Savannah bug #41692.
2170 bdflib puts data from the input stream into a buffer in chunks of
2171 1024 bytes. The data itself gets then parsed line by line, simply
2172 increasing the current pointer into the buffer; if the search for
2173 the final newline character exceeds the buffer size, more data gets
2176 However, in case the current line's end is very near to the buffer
2177 end, and the keyword to compare with is longer than the current
2178 line's length, an out-of-bounds read might happen since `memcmp'
2179 doesn't stop properly at the string end.
2181 * src/bdf/bdflib.c: s/ft_memcmp/ft_strncmp/ to make comparisons
2182 stop at string ends.
2184 2014-02-17 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2186 [autofit] Fix `make multi' compilation.
2188 * src/autofit/hbshim.c: Include `afglobal.h' and `aftypes.h'.
2190 2014-02-19 Werner Lemberg <wl@gnu.org>
2191 Simon Bünzli <zeniko@gmail.com>
2193 Fix Savannah bug #32902.
2197 https://code.google.com/p/sumatrapdf/source/browse/trunk/ext/_patches/freetype2.patch?spec=svn8620&r=8620#87
2199 with slight modifications.
2201 * src/type1/t1parse.c (T1_Get_Private_Dict): Add heuristic test to
2202 handle fonts that incorrectly use \r at the beginning of an eexec
2205 2014-02-19 Simon Bünzli <zeniko@gmail.com>
2207 Fix Savannah bug #41590.
2209 * src/type1/t1load.c (parse_encoding): Protect against invalid
2212 2014-02-12 Dave Arnold <darnold@adobe.com>
2214 [cff] Optimize by using `FT_MulDiv'.
2215 Suggested by Alexei.
2217 * src/cff/cf2font.c (cf2_computeDarkening): Do it.
2219 2014-02-12 Werner Lemberg <wl@gnu.org>
2221 Fix Savannah bug #41465.
2223 * builds/unix/unix-def.in (CLEAN): Add `freetype-config'.
2224 (DISTCLEAN): Remove `freetype-config'.
2226 2014-02-08 Sean McBride <sean@rogue-research.com>
2228 Fix clang static analyzer and compiler warnings.
2230 * src/autofit/afhints.c (af_glyph_hints_align_weak_points),
2231 src/autofit/afloader (af_loader_load_g) <FT_GLYPH_FORMAT_COMPOSITE>,
2232 src/base/ftcalc.c (FT_MSB), src/base/ftoutln.c
2233 (FT_Outline_Decompose), src/bdf/bdfdrivr.c (bdf_interpret_style),
2234 src/cff/cffparse.c (cff_parse_integer), src/cid/cidparse.c
2235 (cid_parser_new), src/pfr/pfrload.c (pfr_phy_font_load),
2236 src/raster/ftraster.c (Decompose_Curve), src/sfnt/sfdriver.c
2237 (sfnt_get_ps_name), src/sfnt/ttcmap.c (tt_cmap12_next,
2238 tt_cmap13_next), src/smooth/ftgrays.c (gray_hline): Remove dead
2241 * src/autofit/afmodule.c (af_property_get_face_globals,
2242 af_property_set, af_property_get), src/base/ftbitmap.c
2243 (ft_gray_for_premultiplied_srgb_bgra): Make functions static.
2245 * src/base/ftobjs.c (ft_remove_renderer): Protect against
2247 (ft_property_do): Make function static.
2249 * src/base/ftrfork.c: Include `ftbase.h'.
2251 * src/sfnt/ttsbit.c (tt_face_load_sbix_image)
2252 [!FT_CONFIG_OPTION_USE_PNG], src/type1/t1gload.c
2253 (T1_Compute_Max_Advance): Avoid compiler warning.
2255 * src/truetype/ttinterp.c (TT_New_Context): Reduce scope of
2258 2014-02-08 Werner Lemberg <wl@gnu.org>
2260 Fix Windows build directories.
2262 The build target is now `windows' instead of `win32'.
2264 Problem reported by Nickolas George <darknova.clan@gmail.com>.
2266 * builds/modules.mk: Don't use `win32' and `win16' (!) but
2269 * builds/windows/detect.mk, builds/windows/win32-def.mk:
2272 2014-02-08 Eugen Sawin <esawin@mozilla.com>
2274 Fix Savannah bug #41507.
2276 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap)
2277 [!FT_CONFIG_OPTION_USE_PNG] <17, 17, 19>: Fix error handling.
2279 2014-02-08 Dave Arnold <darnold@adobe.com>
2281 [cff] Fix minor performance bug.
2283 * src/cff/cf2font.c (cf2_font_setup): Darkening amount and blue zone
2284 calculations are now cached and not recomputed on each glyph.
2286 2014-02-05 Werner Lemberg <wl@gnu.org>
2288 Fix problems with perl 5.8.8 as distributed with current MinGW.
2290 * src/tools/afblue.pl: Work-around for Perl bug #63402.
2291 (string_re): Avoid `possessive quantifiers', which have been
2292 introduced in Perl version 5.10.
2294 2014-02-04 Werner Lemberg <wl@gnu.org>
2296 Fix compilation with MinGW.
2298 Right now, compilation out of the box with latest MinGW is broken
2299 due to bugs in header files of mingwrt 4.0.3 in strict ANSI mode,
2302 https://sourceforge.net/p/mingw/bugs/2024/
2303 https://sourceforge.net/p/mingw/bugs/2046/
2305 * builds/unix/configure.raw: Don't set `-ansi' flag for MinGW.
2307 2014-02-04 Werner Lemberg <wl@gnu.org>
2309 [autofit] Minor fix.
2311 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
2312 src/autofit/aflatin.c (af_latin_metrics_init_widths): Fix handling
2313 of alternative standard characters.
2314 This also fixes a compilation warning in non-debug mode.
2316 2014-02-03 Werner Lemberg <wl@gnu.org>
2318 [cff] Fix Savannah bug #41363.
2320 * src/cff/cf2ft.c (cf2_checkTransform): Convert assertion into
2322 (cf2_decoder_parse_charstrings): Call `cf2_checkTransform' only if
2323 we are scaling the outline.
2324 (cf2_getPpemY): Remove problematic assertion.
2326 2014-01-26 Werner Lemberg <wl@gnu.org>
2328 [autofit] Introduce two more slots for standard characters.
2330 This is useful for OpenType features like `c2sc' (caps to small
2331 caps) that don't have lowercase letters by definition, or other
2332 features that mainly operate on numerals.
2334 * src/autofit/afscript.h: Add more standard characters.
2336 * src/autofit/aftypes.h: Update use of `SCRIPT' macro.
2337 (AF_ScriptClassRec): Add members to hold two more standard
2339 (AF_DEFINE_SCRIPT_CLASS): Updated.
2341 * src/autofit/afglobal.c, src/autofit/afglobal.h,
2342 * src/autofit/afpic.c, src/autofit/afranges.h, src/autofit/hbshim.c:
2343 Update use of `SCRIPT' macro.
2345 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
2346 src/autofit/aflatin.c (af_latin_metrics_init_widths): Scan two more
2347 standard characters.
2349 2014-01-24 Werner Lemberg <wl@gnu.org>
2351 Fix Savannah bug #41320.
2353 * src/autofit/aflatin.c (af_latin_metrics_init_blues)
2354 <AF_LATIN_IS_LONG_BLUE>: Avoid negative index of `last'.
2356 2014-01-23 Werner Lemberg <wl@gnu.org>
2358 Fix Savannah bug #41310.
2360 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap) <glyph_format==5>:
2361 Don't check metrics, which this format doesn't have.
2362 This is another correction to the commit from 2013-11-21.
2364 2014-01-23 Werner Lemberg <wl@gnu.org>
2366 Fix Savannah bug #41309.
2368 * src/type1/t1load.c (t1_parse_font_matrix): Properly handle result
2369 of `T1_ToFixedArray'.
2371 * src/cid/cidload.c (cid_parse_font_matrix): Synchronize with
2372 `t1_parse_font_matrix'.
2374 * src/type42/t42parse.c (t42_parse_font_matrix): Synchronize with
2375 `t1_parse_font_matrix'.
2376 (t42_parse_encoding): Synchronize with `t1_parse_encoding'.
2378 * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_BBOX>,
2379 <T1_FIELD_TYPE_MMOX>: Properly handle result of `ps_tofixedarray'.
2381 2014-01-22 Werner Lemberg <wl@gnu.org>
2383 * src/autofit/hbshim.c (af_get_coverage): Fix memory leaks.
2385 2014-01-16 Werner Lemberg <wl@gnu.org>
2387 [autofit] Improve tracing of style coverages.
2389 * include/internal/fttrace.h: Add `afglobal' for tracing style
2392 * src/autofit/afglobal.c: Include FT_INTERNAL_DEBUG_H.
2393 (FT_COMPONENT): Define.
2394 (af_face_globals_compute_style_coverage): Trace `gstyles' array
2397 2014-01-09 Werner Lemberg <wl@gnu.org>
2399 Fix Savannah bug #41158.
2401 * builds/unix/install.mk (install): Create man page directory.
2403 2014-01-08 Chongyu Zhu <lembacon@gmail.com>
2405 [arm] Fix Savannah bug #41138, part 2.
2407 * builds/unix/ftconfig.in (FT_MulFix_arm), include/config/ftconfig.h
2408 (FT_MulFix_arm), src/truetype/ttinterp.c (TT_MulFix14_arm): Fix
2409 preprocessor conditionals for `add.w'.
2411 2014-01-08 Werner Lemberg <wl@gnu.org>
2413 [autofit] Fix Savannah bug #41138, part 1.
2415 * src/tools/afblue.pl <Handling #endif>: Produce correct auxiliary
2416 enumeration names for generated `#else'.
2418 * src/autofit/afblue.h: Regenerated.
2420 2014-01-06 Werner Lemberg <wl@gnu.org>
2422 Add manual page for `freetype-config'.
2423 Contributed by Nis Martensen <nis.martensen@web.de>.
2425 * docs/freetype-config.1: New file.
2427 * builds/unix/unix-def.in (mandir): Define.
2428 * builds/unix/install.mk (install, uninstall): Handle manpage.
2430 2014-01-05 Werner Lemberg <wl@gnu.org>
2432 [autofit] Minor fixes for `afblue.pl'.
2434 * src/tools/afblue.pl (aux_name): Don't use `reverse'.
2435 <Handling #endif>: Use proper indentation for generated `#else'.
2437 * src/autofit/afblue.h: Regenerated.
2439 2014-01-04 Werner Lemberg <wl@gnu.org>
2441 [autofit] Fix Indic scripts.
2443 Split the single, incorrect Indic entry into separate scripts so
2444 that the covered ranges are the same: Bengali, Devanagari, Gujarati,
2445 Gurmukhi, Kannada, Limbu, Malayalam, Oriya, Sinhala, Sundanese,
2446 Syloti Nagri, Tamil, Telugu, and Tibetan. At the same time, remove
2447 entries for Meetei Mayek and Sharada – the Unicode ranges were
2448 incorrect (and nobody has complained about that), fonts are scarce
2449 for those scripts, and the Indic auto-hinter support is rudimentary
2452 * src/autofit/afscript.h: Updated, using AF_CONFIG_OPTION_INDIC and
2453 AF_CONFIG_OPTION_CJK.
2455 * src/autofit/afstyles.h (STYLE_DEFAULT_INDIC): New auxiliary macro.
2456 Use it, together with AF_CONFIG_OPTION_INDIC and
2457 AF_CONFIG_OPTION_CJK, to update.
2459 * src/autofit/afranges.c [AF_CONFIG_OPTION_INDIC]: Updated.
2460 [!AF_CONFIG_OPTION_INDIC, !AF_CONFIG_OPTION_CJK]: Removed.
2461 Sort entries by tags.
2463 2014-01-03 Werner Lemberg <wl@gnu.org>
2467 * src/autofit/hbshim.c (af_get_char_index): Similar to
2468 `af_get_coverage', reject glyphs which are not substituted.
2470 2014-01-03 Werner Lemberg <wl@gnu.org>
2472 [autofit] Fix handling of default coverages.
2474 With this commit, the implementation of coverage handling is
2477 * src/autofit/hbshim.c (af_get_coverage): Exit early if nothing to
2479 Reject coverages which don't contain appropriate glyphs for blue
2482 2014-01-03 Werner Lemberg <wl@gnu.org>
2484 [autofit] Fix handling of default coverages.
2486 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
2487 First handle non-default coverages, then the default coverage of the
2488 default script, and finally the other default coverages.
2490 2014-01-03 Werner Lemberg <wl@gnu.org>
2492 [autofit] Fix scaling of HarfBuzz shaping.
2494 * src/autofit/hbshim.c (af_get_char_index): Scale to units per EM.
2496 2014-01-03 Werner Lemberg <wl@gnu.org>
2498 [autofit] Better ftgrid support.
2500 * src/autofit/afhints.c (af_glyph_hints_get_segment_offset): Add
2501 parameters `is_blue' and `blue_offset'.
2503 2014-01-01 Werner Lemberg <wl@gnu.org>
2505 [autofit] Remove some styles.
2507 * src/autofit/afcover.h: Remove coverages for alternative fractions,
2508 denominators, numerators, and fractions.
2510 * src/autofit/afstyles.h (META_STYLE_LATIN): Updated.
2512 2014-01-01 Werner Lemberg <wl@gnu.org>
2514 [autofit] Add more styles.
2516 * src/autofit/afstyles.h (STYLE_LATIN, META_STYLE_LATIN): New
2517 auxiliary macros; use them to define styles for Cyrillic, Greek, and
2520 * src/autofit/afcover.h: Remove coverage for oldstyle figures.
2521 Since those digits are used in combination with ordinary letters, it
2522 makes no sense to handle them separately.
2524 * src/autofit/afglobal.c (af_face_globals_get_metrics): Don't limit
2525 `options' parameter to 4 bits.
2527 2014-01-01 Werner Lemberg <wl@gnu.org>
2529 [autofit] Fix style assignments to glyphs.
2531 * src/autofit/hbshim.c (af_get_coverage)
2532 [FT_CONFIG_OPTION_USE_HARFBUZZ]: Scan GPOS coverage of features also
2533 so that we can skip glyphs that have both GSUB and GPOS data.
2535 2014-01-01 Werner Lemberg <wl@gnu.org>
2537 * src/autofit/hbshim.c: s/{lookups,glyphs}/gsub_{lookups,glyphs}/.
2539 2014-01-01 Werner Lemberg <wl@gnu.org>
2541 [autofit] Implement and use `af_get_char_index' with HarfBuzz.
2543 * src/autofit/hbshim.c (COVERAGE) [FT_CONFIG_OPTION_USE_HARFBUZZ]:
2544 Redefine to construct HarfBuzz features.
2545 (af_get_char_index) [FT_CONFIG_OPTION_USE_HARFBUZZ]: Rewritten.
2547 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Use
2548 `y_offset' to adjust `best_y'.
2550 2013-12-31 Werner Lemberg <wl@gnu.org>
2552 [autofit] s/AF_STYLE_...._DEFAULT/AF_STYLE_...._DFLT/i.
2554 2013-12-31 Werner Lemberg <wl@gnu.org>
2556 [autofit] Fix interface of `af_get_char_index'.
2558 * src/autofit/hbshim.c (af_get_char_index): Return error value.
2559 Add argument for y offset (to be used in a yet-to-come patch).
2561 * src/autofit/hbshim.h, src/autofit/afcjk.c,
2562 src/autofit/aflatin.c: Updated.
2564 2013-12-30 Werner Lemberg <wl@gnu.org>
2566 [autofit] Don't combine multiple features into one set.
2568 Combining them, as originally envisioned, would lead to much more
2569 complicated code, as investigations have shown meanwhile. The major
2570 drawback is that we run out of available style slots much earlier.
2571 However, this is only a theoretical issue since we don't support a
2572 large number of scripts currently.
2574 * src/autofit/afcover.h: Replace `COVERAGE_{1,2,3}' macros with
2575 a single-element `COVERAGE' macro, sort the elements by the feature
2576 tags, and add entry for `ruby'.
2578 * src/autofit/aftypes.h: Updated.
2579 * src/autofit/hbshim.c: Updated.
2581 2013-12-28 Werner Lemberg <wl@gnu.org>
2583 [autofit] Code shuffling to reduce use of cpp macros.
2585 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
2586 Call `af_get_coverage' unconditionally.
2588 * src/autofit/autofit.c: Include `hbshim.c' unconditionally.
2590 * src/autofit/hbshim.c (af_get_coverage)
2591 [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Provide dummy function.
2593 * src/autofit/hbshim.h: Provide function declarations
2596 2013-12-28 Werner Lemberg <wl@gnu.org>
2598 [autofit] Add wrapper function for `FT_Get_Char_Index'.
2600 Yet-to-come changes will provide HarfBuzz functionality for the new
2603 * src/autofit/hbshim.c (af_get_char_index): New function.
2604 * src/autofit/hbshim.h: Updated.
2606 * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
2607 af_cjk_metrics_init_blues, af_cjk_metrics_check_digits): Updated.
2609 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
2610 af_latin_metrics_init_blues, af_latin_metrics_check_digits):
2613 2013-12-28 Werner Lemberg <wl@gnu.org>
2615 [autofit] Use `global' HarfBuzz font object.
2617 We now use `hb_font' instead of `hb_face' since yet-to-come changes
2620 * src/autofit/afglobal.h: Include `hbshim.h'.
2621 (AF_FaceGlobalsRec) [FT_CONFIG_OPTION_USE_HARFBUZZ]: New member
2624 * src/autofit/afglobal.c (af_face_globals_new)
2625 [FT_CONFIG_OPTION_USE_HARFBUZZ]: Create `hb_font'.
2626 (af_face_globals_free) [FT_CONFIG_OPTION_USE_HARFBUZZ]: Destroy
2629 * src/autofit/hbshim.h: Include HarfBuzz headers.
2631 * src/autofit/hbshim.c: Include `hbshim.h' instead of HarfBuzz
2633 (af_get_coverage): Updated.
2635 2013-12-27 Werner Lemberg <wl@gnu.org>
2637 [autofit] Handle `DFLT' OpenType script for coverages.
2639 * include/ftautoh.h: Document new `default-script' property.
2641 * src/autofit/hbshim.c (af_get_coverage): Use `AF_FaceGlobals' for
2642 type of first parameter.
2643 (script_tags): Add one more element.
2644 (af_get_coverage): Adjust `script_tags' to handle `DFLT' script tag.
2646 * src/autofit/hbshim.h: Updated.
2648 * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
2651 * src/autofit/afglobal.h (AF_SCRIPT_DEFAULT): New macro.
2653 * src/autofit/afmodule.h (AF_ModuleRec): New `default_script'
2656 * src/autofit/afmodule.c (af_property_set, af_property_get): Handle
2657 `default-script' property.
2658 (af_autofitter_init): Updated.
2660 2013-12-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
2662 [ftrfork] Fix the face order difference between POSIX and Carbon.
2664 The fragmented resources in Suitcase and .dfont should be reordered
2665 when `POST' resource for Type1 is being restored, but reordering of
2666 sfnt resources induces the different face order. Now the ordering
2667 is restricted to `POST' resource only, to prevent the different
2668 order issue (e.g. the face index in the fontconfig cache generated
2669 with Carbon framework is incompatible with that by FreeType 2
2670 without Carbon framework.) Found by Khaled Hosny and Hin-Tak Leung.
2672 https://lists.gnu.org/archive/html/freetype-devel/2013-02/msg00035.html
2673 https://lists.gnu.org/archive/html/freetype-devel/2013-12/msg00027.html
2675 * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Add a switch
2676 `sort_by_res_id' to control the fragmented resource ordering.
2677 * include/internal/ftrfork.h: Declare new switch.
2678 * src/base/ftobjs.c (IsMacResource): Enable the sorting for `POST'
2679 resource, and disable the sorting for `sfnt' resource.
2681 2013-12-25 Werner Lemberg <wl@gnu.org>
2683 Fix Savannah bug #40997.
2685 * src/bdf/bdfdrivr.c (BDF_Face_Init): Only use OR operator to
2686 adjust face flags since FT_FACE_FLAG_EXTERNAL_STREAM might already
2688 * src/cff/cffobjs.c (cff_face_init): Ditto.
2689 * src/cid/cidobjs.c (cid_face_init): Ditto.
2690 * src/pcf/pcfread.c (pcf_load_font): Ditto.
2691 * src/pfr/pfrobjs.c (pfr_face_init): Ditto.
2692 * src/type1/t1objs.c (T1_Face_Init): Ditto.
2693 * src/type42/t42objs.c (T42_Face_Init): Ditto.
2694 * src/winfonts/winfnt.c (FNT_Face_Init): Ditto.
2696 2013-12-21 Werner Lemberg <wl@gnu.org>
2698 [autofit] Introduce `coverages'.
2700 Coverages are the interface to the HarfBuzz library to access
2701 OpenType features for handling glyphs not addressable by the cmap.
2703 Right now, compilation of HarfBuzz is only added to the development
2704 build. A solution for standard build mode will be delayed until
2705 HarfBuzz gets split into two libraries to avoid mutual dependencies
2706 between FreeType and HarfBuzz.
2708 Note that this is only a first step in handling coverages, basically
2709 providing the framework only. Code for handling selected OpenType
2710 features (this is, actually using the data in `afcover.h') will
2713 * devel/ftoption.h, include/config/ftoption.h
2714 (FT_CONFIG_OPTION_USE_HARFBUZZ): New macro.
2716 * src/autofit/hbshim.c, src/autofit/hbshim.h, src/autofit/afcover.h:
2719 * src/autofit/afscript.h: Add HarfBuzz script name tags.
2721 * src/autofit/afstyles.h: Add default coverage enumeration values.
2723 * src/autofit/aftypes.h: Update use of `SCRIPT' and `STYLE' macros.
2724 (AF_Coverage): New enumeration (generated by `afcover.h').
2725 (AF_StyleClassRec): New member `coverage'.
2726 (AF_DEFINE_STYLE_CLASS): Updated.
2728 * include/internal/fttrace.h: Add `afharfbuzz' for tracing coverage
2731 * src/autofit/afglobal.h: Update use of `SCRIPT' and `STYLE' macros.
2732 (AF_SCRIPT_FALLBACK): Renamed to ...
2733 (AF_STYLE_FALLBACK): ... this.
2735 * src/autofit/afglobal.c: Include `hbshim.c'.
2736 Update use of `SCRIPT' and `STYLE' macros.
2737 (af_face_globals_compute_style_coverage)
2738 [FT_CONFIG_OPTION_USE_HARFBUZZ]: Call `af_get_coverage'.
2741 * src/autofit/afmodule.h (AF_ModuleRec):
2742 s/fallback_script/fallback_style/.
2744 * src/autofit/afmodule.c (af_property_set): Adapt handling of
2745 `fallback-script' property to set a fallback style.
2746 (af_property_get, af_autofitter_init): Updated.
2748 * src/autofit/afpic.c: Update use of `SCRIPT' and `STYLE' macros.
2750 * src/autofit/afranges.h: Update use of `SCRIPT' macro.
2752 * src/autofit/autofit.c [FT_CONFIG_OPTION_USE_HARFBUZZ]: Include
2755 * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `hbshim.c'.
2756 (AUTOF_DRV_H): Add `afcover.h'.
2758 * builds/freetype.mk (INCLUDE_FLAGS) [DEVEL_DIR]: Use pkg-config for
2759 all libraries needed by FreeType.
2761 2013-12-21 Werner Lemberg <wl@gnu.org>
2763 Fix Savannah bug #40975 (sort of).
2765 * src/truetype/ttinterp.c (Ins_IP): Fix sign typo to make FreeType
2766 behave the same as the Windows TrueType engine for the invalid case.
2768 2013-12-21 Werner Lemberg <wl@gnu.org>
2770 [autofit] Make PIC mode work actually.
2772 * src/autofit/afpic.h (AFModulePIC): Fix array sizes to fit the
2773 enumeration values automatically generated by including `afscript.h'
2776 * src/autofit/afpic.c (autofit_module_class_pic_init): Updated.
2778 2013-12-21 Werner Lemberg <wl@gnu.org>
2782 * include/internal/ftrfork.h (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Fix
2783 generated function name.
2785 * src/base/basepic.c (FT_Init_Table_raccess_guess_table): Rename
2787 (FT_Init_Table_ft_raccess_guess_table): ... this so that the
2788 function name correctly corresponds to what the macro framework
2791 * src/psnames/rules.mk (PSNAMES_DRV_SRC_S): Use correct file name so
2792 that PIC functions are compiled also.
2794 2013-12-21 Werner Lemberg <wl@gnu.org>
2796 [base] Add missing dependencies to Makefile.
2798 * src/base/rules.mk (BASE_SRC): Add `basepic.c' and `ftpic.c'.
2799 (BASE_H): Add `basepic.h'.
2801 2013-12-20 Werner Lemberg <wl@gnu.org>
2803 [autofit] Fix PIC compilation.
2805 * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
2806 src/autofit/aflatin.c (af_latin_metrics_init_widths)
2807 [FT_CONFIG_OPTION_PIC]: Declare `globals'.
2809 * src/autofit/afglobal.c: Always call AF_DEFINE_SCRIPT_CLASS, and
2810 AF_DEFINE_STYLE_CLASS.
2812 * src/autofit/afpic.c: Include `afglobal.h'.
2813 (autofit_module_class_pic_init): Typo.
2815 * src/autofit/aftypes.h (AF_DEFINE_SCRIPT_CLASS,
2816 AF_DEFINE_STYLE_CLASS): Don't use the same identifier for macro
2817 parameter and structure member.
2819 2013-12-20 Werner Lemberg <wl@gnu.org>
2821 [autofit] Introduce `styles'.
2823 This is the new top-level structure for handling glyph input data;
2824 scripts are now defined separately.
2826 * src/autofit/aftypes.h (SCRIPT): Updated.
2827 (AF_ScriptClassRec): Move `blue_stringset' and `writing_system'
2829 (AF_Style_ClassRec): ... this new structure.
2830 (AF_Style): New enumeration.
2831 (AF_StyleMetricsRec): Replace `script' enumeration with
2832 `style_class' pointer.
2833 (AF_DEFINE_SCRIPT_CLASS, AF_DECLARE_SCRIPT_CLASS): Updated.
2834 (AF_DEFINE_STYLE_CLASS, AF_DECLARE_STYLE_CLASS): New macros.
2836 * src/autofit/afstyles.h: New file, using data from `afscript.h'.
2837 * src/autofit/afscript.h: Updated.
2839 * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
2840 af_cjk_metrics_init_blues, af_cjk_hint_edges): Updated.
2842 * src/autofit/afglobal.c (SCRIPT): Updated.
2843 (STYLE): Redefine macro to load `afstyles.h'.
2844 (af_script_names) [FT_DEBUG_LEVEL_TRACE]: Replace with...
2845 (af_style_names): ... this array.
2846 (af_face_globals_compute_script_coverage): Renamed to...
2847 (af_face_globals_compute_style_coverage): ... this.
2849 (af_face_globals_new, af_face_globals_free,
2850 af_face_globals_get_metrics): Updated.
2852 * src/autofit/afglobal.h (SCRIPT): Updated.
2853 (STYLE): Redefine macro to load `afstyles.h'.
2854 (AF_SCRIPT_FALLBACK): Update definition. This will get more
2855 refinements with later on.
2856 (AF_SCRIPT_UNASSIGNED): Replace with...
2857 (AF_STYLE_UNASSIGNED): ... this macro.
2858 (AF_FaceGlobalsRec): Updated.
2860 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
2861 af_latin_metrics_init_blues, af_latin_metrics_scale_dim,
2862 af_latin_hint_edges): Updated.
2864 * src/autofit/aflatin2.c (af_latin2_metrics_init_widths): Updated.
2865 (af_ltn2_uniranges): Removed.
2867 * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph):
2870 * src/autofit/afpic.c (autofit_module_class_pic_init): Updated.
2871 * src/autofit/afpic.h (AF_STYLE_CLASSES_GET): New macro.
2872 (AFModulePIC): Add `af_style_classes' and `af_style_classes_rec'
2875 * src/autofit/afranges.h: Updated.
2877 * src/autofit/rules.mk (AUTOF_DRV_H): Add `afstyles.h'.
2879 2013-12-19 Werner Lemberg <wl@gnu.org>
2881 [autofit] Factor scripts and uniranges out of writing system files.
2883 * src/autofit/afranges.c, src/autofit/afranges.h: New files.
2885 * src/autofit/afscript.h: Extend `SCRIPT' macro with more
2886 parameters, taking data from the writing system files.
2888 * src/autofit/aftypes.h: Updated.
2890 * src/autofit/afglobal.c: Include `afranges.h'.
2891 Load `afscript.h' to call AF_DEFINE_SCRIPT_CLASS.
2892 * src/autofit/afglobal.c: Include `afranges.h'.
2893 Load `afscript.h' to call AF_DECLARE_SCRIPT_CLASS.
2895 * src/autofit/afcjk.c, src/autofit/afcjk.h: Updated.
2896 * src/autofit/afdummy.c, src/autofit/afdummy.h: Updated.
2897 * src/autofit/afindic.c, src/autofit/afindic.h: Updated.
2898 * src/autofit/aflatin.c, src/autofit/aflatin.h: Updated.
2899 * src/autofit/aflatin2.c, src/autofit/aflatin2.h: Updated.
2901 * src/autofit/afpic.c: Updated.
2903 * src/autofit/autofit.c: Include `afranges.c'.
2904 * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `afranges.c'.
2906 2013-12-18 Werner Lemberg <wl@gnu.org>
2908 [autofit] More code orthogonality.
2910 * src/autofit/aftypes.h (AF_StyleMetrics): Replace `script_class'
2911 pointer to an `AF_ScriptClass' structure with `script' index of type
2913 Move some code around.
2915 * src/autofit/afcjk.c: Include `afpic.h'.
2916 (af_cjk_metrics_init_widths, af_cjk_metrics_init_blues,
2917 af_cjk_hint_edges): Updated.
2919 * src/autofit/aflatin.c: Include `afpic.h'.
2920 (af_latin_metrics_init_widths, af_latin_metrics_init_blues,
2921 af_latin_metrics_scale_dim, af_latin_hint_edges): Updated.
2923 * src/autofit/afglobal.c (af_face_globals_get_metrics): Updated.
2925 * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph):
2928 2013-12-18 Werner Lemberg <wl@gnu.org>
2930 [autofit] s/ScriptMetrics/StyleMetrics/.
2932 2013-12-18 Werner Lemberg <wl@gnu.org>
2934 [autofit] s/script_{metrics,hints}/style_{metrics,hints}/
2936 2013-12-18 Werner Lemberg <wl@gnu.org>
2938 [autofit] s/gscripts/gstyles/.
2940 2013-12-18 Werner Lemberg <wl@gnu.org>
2942 [autofit] s/glyph_scripts/glyph_styles/.
2944 This is the first commit of a series to create a new top-level
2945 structure (a `style') for handling scripts, writing_systems, and
2946 soon-to-be-added coverages.
2948 2013-12-17 Werner Lemberg <wl@gnu.org>
2950 [autofit] s/AF_Script_/AF_WritingSystem_/ where appropriate.
2952 2013-12-11 Infinality <infinality@infinality.net>
2954 [truetype] Simplify logic of rendering modes.
2956 This patch unifies the subpixel and non-subpixel cases.
2958 * src/truetype/ttinterp.h (TT_ExecContextRec): Remove
2959 `grayscale_hinting'; all code should refer to `grayscale' instead.
2960 Remove unused `native_hinting' member.
2961 Rename `subpixel_hinting' member to `subpixel.
2963 * src/truetype/ttgload.c (TT_LOADER_SET_PP): Updated.
2964 (tt_loader_init): Updated.
2966 * src/truetype/ttinterp.c (Ins_GETINFO): Simplify.
2969 2013-12-11 Werner Lemberg <wl@gnu.org>
2971 [documentation] Add section how to include FreeType header files.
2972 Problem reported by David Kastrup <dak@gnu.org>.
2974 Surprisingly, a description how to do that was completely missing in
2977 * include/freetype.h, include/ftchapters.h: New documentation
2978 section `header_inclusion'.
2980 2013-12-10 Werner Lemberg <wl@gnu.org>
2982 [autofit] s/DFLT/NONE/, s/dflt/none/.
2984 2013-12-10 Werner Lemberg <wl@gnu.org>
2986 [autofit] s/AF_SCRIPT_NONE/AF_SCRIPT_UNASSIGNED/.
2988 2013-12-10 Werner Lemberg <wl@gnu.org>
2990 [truetype] Fix scaling of vertical phantom points.
2992 * src/truetype/ttgload.c (load_truetype_glyph): Scale pp3.x and
2995 2013-12-10 Werner Lemberg <wl@gnu.org>
2997 [truetype] Fix positioning of composite glyphs.
2998 Problem reported by Nigel Tao <nigeltao@golang.org>.
3000 * src/truetype/ttgload.c (TT_Hint_Glyph): Remove code that shifts
3001 the glyph (component) by a fractional value computed from the LSB
3002 phantom point. This is wrong, since the horizontal phantom points
3003 get rounded horizontally later on.
3005 2013-12-08 Werner Lemberg <wl@gnu.org>
3007 * Version 2.5.2 released.
3008 =========================
3011 Tag sources with `VER-2-5-2'.
3013 * docs/VERSION.DLL: Update documentation and bump version number to
3016 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
3017 builds/windows/vc2005/index.html,
3018 builds/windows/vc2008/freetype.vcproj,
3019 builds/windows/vc2008/index.html,
3020 builds/windows/vc2010/freetype.vcxproj,
3021 builds/windows/vc2010/index.html,
3022 builds/windows/visualc/freetype.dsp,
3023 builds/windows/visualc/freetype.vcproj,
3024 builds/windows/visualc/index.html,
3025 builds/windows/visualce/freetype.dsp,
3026 builds/windows/visualce/freetype.vcproj,
3027 builds/windows/visualce/index.html,
3028 builds/wince/vc2005-ce/freetype.vcproj,
3029 builds/wince/vc2005-ce/index.html,
3030 builds/wince/vc2008-ce/freetype.vcproj,
3031 builds/wince/vc2008-ce/index.html: s/2.5.1/2.5.2/, s/251/252/.
3033 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
3035 * builds/unix/configure.raw (version_info): Set to 17:1:11.
3036 * CMakeLists.txt (VERSION_PATCH): Set to 2.
3037 * docs/CHANGES: Updated.
3039 2013-12-07 Werner Lemberg <wl@gnu.org>
3041 [truetype] Next round in phantom point handling.
3043 Greg Hitchcock provided very interesting insights into the
3044 complicated history of the horizontal positions of the TSB and BSB
3047 * src/truetype/ttgload.c (TT_LOADER_SET_PP)
3048 [TT_CONFIG_OPTION_SUBPIXEL_HINTING]: Use `subpixel_hinting' and
3049 `grayscale_hinting' flags as conditionals for the x position of TSB
3052 2013-12-05 Werner Lemberg <wl@gnu.org>
3054 * builds/freetype.mk (FT_CC): Removed. Unused.
3056 2013-12-04 Werner Lemberg <wl@gnu.org>
3058 [sfnt] Fix handling of embedded bitmap strikes.
3060 This corrects the commit from 2013-11-21. Problem reported by
3061 Andrey Panov <panov@canopus.iacp.dvo.ru>.
3063 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Fix logic to
3064 detect excessive bytes for bit-aligned bitmaps.
3066 2013-12-03 Werner Lemberg <wl@gnu.org>
3068 [truetype] Remove dead code.
3070 Reported by Nigel Tao <nigeltao@golang.org>.
3072 * include/internal/tttypes.h (TT_LoaderRec): Remove unused
3073 `preserve_pps' field.
3074 * src/truetype/ttgload.c (TT_Hint_Glyph): Updated.
3076 2013-12-03 Werner Lemberg <wl@gnu.org>
3078 [truetype] Fix phantom point handling.
3080 This is a further improvement to the changes from 2013-11-06.
3082 * src/truetype/ttgload.c (TT_Hint_Glyph): Horizontal phantom points
3083 are rounded horizontally, vertical ones are rounded vertically.
3084 (TT_LOADER_SET_PP): The horizontal position of vertical phantom
3085 points in pre-ClearType mode is zero, as shown in the OpenType
3088 2013-12-02 Werner Lemberg <wl@gnu.org>
3090 [truetype] Fix change from 2013-11-20.
3092 Problem reported by Akira Kakuto <kakuto@fuk.kindai.ac.jp>.
3094 * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Protect call to
3095 `Update_Max' with both a TT_USE_BYTECODE_INTERPRETER guard and a
3097 Also remove redundant check using `maxSizeOfInstructions' – in
3098 simple glyphs, the bytecode data comes before the outline data, and
3099 a validity test for this is already present.
3101 2013-11-27 Werner Lemberg <wl@gnu.org>
3103 [autofit] Fix use of dumping functions in `ftgrid' demo program.
3105 * src/autofit/afhints.c (AF_DUMP) [FT_DEBUG_AUTOFIT]: New macro.
3106 (af_glyph_hints_dump_points, af_glyph_hints_dump_segments,
3107 af_glyph_hints_dump_edges) [FT_DEBUG_AUTOFIT]: Add parameter to
3108 handle output to stdout.
3110 (af_glyph_hints_dump_points, af_glyph_hints_dump_segments,
3111 af_glyph_hints_dump_edges) [!FT_DEBUG_AUTOFIT]: Removed.
3113 2013-11-25 Werner Lemberg <wl@gnu.org>
3115 * Version 2.5.1 released.
3116 =========================
3119 Tag sources with `VER-2-5-1'.
3121 * docs/VERSION.DLL: Update documentation and bump version number to
3124 * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
3125 builds/windows/vc2005/index.html,
3126 builds/windows/vc2008/freetype.vcproj,
3127 builds/windows/vc2008/index.html,
3128 builds/windows/vc2010/freetype.vcxproj,
3129 builds/windows/vc2010/index.html,
3130 builds/windows/visualc/freetype.dsp,
3131 builds/windows/visualc/freetype.vcproj,
3132 builds/windows/visualc/index.html,
3133 builds/windows/visualce/freetype.dsp,
3134 builds/windows/visualce/freetype.vcproj,
3135 builds/windows/visualce/index.html,
3136 builds/wince/vc2005-ce/freetype.vcproj,
3137 builds/wince/vc2005-ce/index.html,
3138 builds/wince/vc2008-ce/freetype.vcproj,
3139 builds/wince/vc2008-ce/index.html: s/2.5.0/2.5.1/, s/250/251/.
3141 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
3143 * builds/unix/configure.raw (version_info): Set to 17:0:11.
3144 * CMakeLists.txt (VERSION_PATCH): Set to 1.
3145 * docs/CHANGES, docs/release: Updated.
3147 2013-11-23 Werner Lemberg <wl@gnu.org>
3149 [truetype]: Add tricky font names `hkscsiic.ttf' and `iicore.ttf'.
3151 * src/truetype/ttobjs.c (TRICK_NAMES_MAX_CHARACTERS,
3152 TRICK_NAMES_COUNT): Updated.
3153 (trick_names): Add family name for the two fonts.
3155 2013-11-23 Werner Lemberg <wl@gnu.org>
3157 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Typo.
3159 2013-11-21 Werner Lemberg <wl@gnu.org>
3163 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
3165 * src/sfnt/sfobjs.c (sfnt_load_face): Return correct `bsize->width'
3166 value if the font lacks an `OS/2' table.
3168 2013-11-21 Werner Lemberg <wl@gnu.org>
3170 [sfnt] Improve handling of buggy embedded bitmap strikes.
3172 We are now able to successfully load `AppleMyoungJo.ttf'.
3173 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
3175 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Don't trust glyph
3178 2013-11-20 Werner Lemberg <wl@gnu.org>
3180 [truetype] Don't trust `maxp's `maxSizeOfInstructions'.
3182 Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>; see
3184 https://lists.nongnu.org/archive/html/freetype-devel/2013-08/msg00005.html
3188 * src/base/ftobjs.c (FT_Load_Glyph): Check size of `fpgm' and `prep'
3189 tables also for setting `autohint'.
3191 * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Use code from
3192 `TT_Process_Composite_Glyph' for handling unreliable values of
3193 `maxSizeOfInstructions'.
3195 2013-11-16 Werner Lemberg <wl@gnu.org>
3197 [sfnt] Fix `OS/2' table version 5 support.
3199 We now follow the `official' announcement from Microsoft (on the
3200 OpenType mailing list, which unfortunately hasn't a public archive).
3202 * include/freetype/tttables.h (TT_OS2):
3203 s/usLowerPointSize/usLowerOpticalPointSize/,
3204 s/usUpperPointSize/usUpperOpticalPointSize/.
3206 * src/sfnt/ttload.c (tt_face_load_os2): Update, and set correct
3209 2013-11-13 Werner Lemberg <wl@gnu.org>
3211 * builds/unix/ft2unix.h: Remove. No longer necessary.
3213 * builds/unix/install.mk (install): Updated.
3215 2013-11-13 Werner Lemberg <wl@gnu.org>
3217 Simplify header file hierarchy.
3219 This large patch changes the header file directory layout from
3220 `include/freetype/...' to `include/...', effectively removing one
3221 level. Since the file `ft2build.h' is also located in `include'
3222 (and it stays there even after installation), all FreeType header
3223 files are now in a single directory.
3225 Applications that use (a) `freetype-config' or FreeType's
3226 `pkg-config' file to get the include directory for the compiler, and
3227 (b) the documented way for header inclusion like
3229 #include <ft2build.h>
3230 #include FT_FREETYPE_H
3233 don't need any change to the source code.
3235 * include/freetype/*: Move up to...
3236 * include/*: ... this directory.
3238 * builds/amiga/include/freetype/*: Move up to...
3239 * builds/amiga/include/*: ... this directory.
3241 */*: Essentially do `s@/freetype/@/@' where appropriate.
3243 * CMakeLists.txt: Simplify.
3244 * builds/unix/freetype-config.in, builds/unix/freetype2.in: For
3245 `--cflags', return a single directory.
3246 * builds/unix/install.mk (install): No longer try to remove `cache'
3247 and `internal' subdirectories; instead, remove the `freetype'
3250 2013-11-12 Werner Lemberg <wl@gnu.org>
3252 [truetype] Fix last `truetype' commit.
3254 * src/truetype/ttgload.c (tt_get_metrics): Preserve stream position.
3256 (load_truetype_glyph): Updated.
3258 2013-11-10 Werner Lemberg <wl@gnu.org>
3260 * docs/CMAKE: New dummy file.
3262 2013-11-08 Dave Arnold <darnold@adobe.com>
3264 [cff] Fix for hints that touch.
3266 * src/cff/cf2hints.c (cf2_hintmap_insertHint): Fix condition for
3267 finding index value of insertion point.
3269 2013-11-06 Werner Lemberg <wl@gnu.org>
3271 [truetype] Fix handling of phantom points in composite glyphs.
3272 Problem reported by Nigel Tao <nigeltao@golang.org>.
3274 This is a follow-up commit to the previous one.
3276 * src/truetype/ttgload.c (load_truetype_glyph): Call
3277 `tt_get_metrics' after loading the glyph header.
3279 2013-11-06 Werner Lemberg <wl@gnu.org>
3281 [truetype] Improve emulation of vertical metrics.
3283 This commit also improves the start values of vertical phantom
3284 points. Kudos to Greg Hitchcock for help.
3286 * src/truetype/ttgload.c (TT_Get_VMetrics): Add parameter to pass
3287 `yMax' value. Replace code with fixed Microsoft definition.
3288 (tt_get_metrics): Updated.
3289 (TT_LOADER_SET_PP): Add explanation how to initialize phantom
3290 points, taken from both the OpenType specification and private
3291 communication with Greg (which will eventually be added to the
3293 Fix horizontal position of `pp3' and `pp4'.
3295 * src/truetype/ttgload.h: Updated.
3297 * src/truetype/ttdriver.c (tt_get_advances): Updated.
3299 * docs/CHANGES: Updated.
3301 2013-11-05 Werner Lemberg <wl@gnu.org>
3303 * builds/windows/vc2010/freetype.vcxproj: s/v110/v100/.
3304 PlatformToolSet version 110 is for VC2012.
3306 Problem reported (with solution) by Dave Arnold <darnold@adobe.com>.
3308 2013-11-05 Werner Lemberg <wl@gnu.org>
3310 [truetype] Correctly reset point tags for glyph components.
3311 Problem reported by Nigel Tao <nigeltao@golang.org>.
3313 * src/truetype/ttgload.c (TT_Process_Composite_Glyph): Fix loop.
3315 2013-11-02 Werner Lemberg <wl@gnu.org>
3317 [truetype] Fix GETINFO opcode handling of subpixel hinting bits.
3319 * src/truetype/ttinterp.c (Ins_GETINFO): Don't request bit 6 set to
3320 get info on subpixel hinting.
3322 * docs/CHANGES: Updated.
3324 2013-11-02 Werner Lemberg <wl@gnu.org>
3326 Fix Savannah bug #40451.
3328 Simply apply the patch from the bug report.
3330 * builds/unix/ftconfig.in, builds/vms/ftconfig.h,
3331 include/freetype/config/ftconfig.h: The used #pragma directives only
3332 work with gcc versions 4.6 and higher.
3334 2013-11-01 Werner Lemberg <wl@gnu.org>
3336 * docs/CHANGES: Updated.
3338 2013-11-01 Werner Lemberg <wl@gnu.org>
3340 [truetype] Minor code refactoring.
3342 Two benefits: The allocated FDEF (and IDEF) array gets slightly
3343 smaller, and the `ttdebug' demo program has access to function
3344 numbers without additional costs.
3346 Fortunately, no changes to FontForge are necessary – this is the
3347 only external TrueType debugger I know of, but others may exist and
3348 should check the code accordingly.
3350 * src/truetype/ttinterp.h (TT_CallRec): Replace `Cur_Restart' and
3351 `Cur_End' with a pointer to the corresponding `TT_DefRecord'
3354 * src/truetype/ttinterp.c (DO_JROT, DO_JMPR, DO_JROF, Ins_ENDF,
3355 Ins_CALL, Ins_LOOPCALL, Ins_UNKNOWN, TT_RunIns <Invalid_Opcode>):
3358 2013-10-27 Werner Lemberg <wl@gnu.org>
3360 [sfnt] Implement support for `OS/2' table version 5.
3364 http://typedrawers.com/discussion/470/new-microsoft-size-specific-design-selection-mechanism
3366 for the announcement.
3368 * include/freetype/tttables.h (TT_OS2): Add fields
3369 `usLowerPointSize' and `usUpperPointSize'. Since FreeType returns
3370 this structure only as a pointer through `FT_Get_Sfnt_Table', there
3371 shouldn't be any ABI problems.
3373 * src/sfnt/ttload.c (tt_face_load_os2): Implement it.
3375 * docs/CHANGES: Updated.
3377 2013-10-24 Werner Lemberg <wl@gnu.org>
3379 * README.git, docs/CHANGES, docs/INSTALL: Updated.
3381 2013-10-24 John Cary <cary@txcorp.com>
3383 Provide cmake support.
3385 * CMakeLists.txt: New file.
3387 2013-10-23 Kenneth Miller <kennethadammiller@yahoo.com>
3388 Werner Lemberg <wl@gnu.org>
3390 Provide support for x64 builds in Visual C++ project files.
3392 * src/builds/win32: Renamed to...
3393 * src/builds/windows: This.
3395 * src/builds/windows/vc2010/*: Updated to handle x64 target.
3397 * src/builds/windows/*.mk, docs/INSTALL.GNU: s/win32/windows/ where
3400 2013-10-22 Werner Lemberg <wl@gnu.org>
3402 * src/base/md5.c, src/base/md5.h: Updated to recent version.
3404 * src/base/ftobjs.c: Updated; `md5.c' no longer uses `free'.
3406 The canonical URL to get updates for this file is
3408 https://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/popa3d/popa3d/md5/
3410 as the author told me in private communication.
3412 2013-10-19 Werner Lemberg <wl@gnu.org>
3414 [autofit] s/SMALL_TOP/X_HEIGHT/.
3416 * src/autofit/afblue.dat: Updated.
3418 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3420 * src/autofit/aflatin.c, src/autofit/aflatin.h,
3421 src/autofit/aflatin2.c: Updated.
3423 2013-10-19 Werner Lemberg <wl@gnu.org>
3425 * src/autofit/afblue.dat: s/MINOR/DESCENDER/.
3427 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3429 2013-10-16 Werner Lemberg <wl@gnu.org>
3431 [autofit] Add description strings to script entries.
3433 Currently, this is unused.
3435 * src/autofit/afscript.h: Do it.
3436 * src/autofit/afglobal.c, src/autofit/afpic.c,
3437 src/autofit/aftypes.h: Updated.
3439 2013-10-16 Werner Lemberg <wl@gnu.org>
3441 [autofit] Improve tracing message for extra light flag.
3443 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Do it.
3445 2013-10-15 Chongyu Zhu <lembacon@gmail.com>
3447 [arm] Fix thumb2 inline assembly under LLVM.
3449 When using `ADD' with an immediate operand, the instruction is
3450 actually `ADD Rd, Rn, #<imm12>', that is, the maximum of the
3451 immediate operand cannot exceed 4095. It will fail to compile with
3454 However, in GCC, due to some legacy compatibility considerations,
3455 `ADD.W' will be automatically emitted when the immediate operand is
3458 * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h
3459 (FT_MulFix_arm) [__GNUC__]: Support clang compiler.
3461 * src/truetype/ttinterp.c (TT_MulFix14_arm) [__GNUC__]: Ditto.
3463 2013-10-12 Werner Lemberg <wl@gnu.org>
3465 [autofit] Improve tracing of `latin' hinter.
3467 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Report blue
3469 (af_latin_metrics_scale_dim): Report scaling changes due to x height
3471 Report scaled stroke width and blue zone values.
3473 2013-10-03 Dave Arnold <darnold@adobe.com>
3475 * src/cff/cf2font.c (cf2_computeDarkening): Avoid division by zero.
3477 Note that the old code avoided using a region of the piecewise
3478 linear function where the slope was zero. The recovery was to use a
3479 different section of the function, which produced a different,
3480 incorrect amount of darkening.
3482 2013-10-02 Darrell Bellert <darrell.bellert@hl.konicaminolta.us>
3484 * src/sfnt/ttload.c (tt_face_load_pclt): Fix `pclt_fields'.
3486 2013-10-02 Dave Arnold <darnold@adobe.com>
3488 * src/cff/cf2font.c (cf2_computeDarkening): Initialize darkenAmount.
3490 This line was lost in commit 89ca1fd6 (from 2013-06-25). The effect
3491 is to use a previous darkening amount when producing an unhinted,
3492 unscaled outline. This can cause autohint samples in ftgrid and
3493 ftview to be based on darkened CFF outlines instead of unhinted,
3496 2013-09-29 Dave Arnold <darnold@adobe.com>
3498 Fix Savannah bug #39295.
3500 The bug was caused by switching to the initial hintmap (the one in
3501 effect when `moveto' executes) just before drawing the final element
3502 in the charstring. This ensured that the path was closed (in both
3503 Character Space and Device Space). But if the final element was a
3504 curve and if the final hintmap was different enough from the initial
3505 one, then the curve was visibly distorted.
3507 The first part of the fix is to draw the final curve using the final
3508 hintmap as specified by the charstring. This corrects the
3509 distortion but does not ensure closing in Device Space. It may
3510 require the rasterizer to automatically generate an extra closing
3511 line. Depending on the hintmap differences, this line could be from
3512 zero to a couple pixels in length.
3514 The second part of the fix covers the case where the charstring
3515 subpath is closed with an explicit line. We now modify that line's
3516 end point to avoid the distortion.
3518 Some glyphs in the bug report font (TexGyreHeros-Regular) that show
3525 Curves at the *end* of a subpath are no longer distorted. However,
3526 some of these glyphs have bad hint substitutions in the middle of a
3527 subpath, and these are not affected.
3529 The patch has been tested with a set of 106 fonts that shipped with
3530 Adobe Creative Suite 4, together with 756 Open Source CFF fonts from
3531 Google Fonts. There are 1.5 million glyphs, of which some 20k are
3532 changed with the fix. A sampling of a few hundred of these changes
3533 have been examined more closely, and the changes look good (or at
3536 * src/cff/cf2hints.h (CF2_GlyphPathRec): New element `pathIsClosing'
3537 to indicate that we synthesize a closepath line.
3539 * src/cff/cf2hints.c (cf2_glyphpath_init): Updated.
3540 (cf2_glyphpath_pushPrevElem): If closing, use first hint map (for
3541 `lineto' operator) and adjust hint zone.
3542 For synthesized closing lines, use end point in first hint zone.
3543 (cf2_glyphpath_lineTo): Take care of synthesized closing lines. In
3544 particular, shift the detection of zero-length lines from character
3545 space to device space.
3546 (cf2_glyphpath_closeOpenPath): Remove assertion.
3549 2013-09-25 Werner Lemberg <wl@gnu.org>
3551 * src/autofit/aflatin.c (af_{grek,cyrl}_uniranges): Fix arrays.
3553 2013-09-25 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
3555 [bdf, pcf] Refuse non-zero face_index.
3557 Suggested by Akira Tagoh, see
3559 https://lists.gnu.org/archive/html/freetype/2013-09/msg00030.html
3561 * src/bdf/bdfdrivr.c (BDF_Face_Init): Return `Invalid_Argument'
3562 error if the font could be opened but non-zero `face_index' is
3564 * src/pcf/pcfdrivr.c (PCF_Face_Init): Ditto.
3566 * src/type42/t42objs.c (T42_Face_Init): Remove unrequired FT_UNUSED
3567 macro for `face_index' because it is validated later.
3569 2013-09-23 Werner Lemberg <wl@gnu.org>
3571 Fix Savannah bug #40090.
3573 * src/autofit/afcjk.c (af_cjk_metrics_scale): Revert commit
3574 306f8c5d (from 2013-08-25) affecting this function.
3576 2013-09-22 Werner Lemberg <wl@gnu.org>
3578 [autofit] Disunify Cyrillic and Greek handling from Latin.
3580 * src/autofit/afscript.h: Add Cyrillic and Greek.
3582 * src/autofit/afblue.dat (AF_BLUE_STRINGSET_GREK,
3583 AF_BLUE_STRINGSET_CYRL): Add blue zones for Greek and Cyrillic.
3584 (AF_BLUE_STRINGSET_LATN): Fix typo.
3585 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3587 * src/autofit/aflatin.c (af_grek_uniranges, af_cyrl_uniranges): New
3589 (af_grek_script_class, af_cyrl_script_class): New scripts.
3590 * src/autofit/aflatin.h: Updated.
3592 2013-09-20 Werner Lemberg <wl@gnu.org>
3594 * docs/CHANGES: Updated.
3596 2013-09-20 Behdad Esfahbod <behdad@behdad.org>
3598 Fix vertical size of emboldened glyphs.
3600 Cf. https://bugzilla.gnome.org/show_bug.cgi?id=686709
3602 * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Adjust `horiBearingY'
3605 2013-09-11 Alexei Podtelezhnikov <apodtele@gmail.com>
3607 * include/freetype/ftoutln.h: Correct FT_Outline_Get_Orientation
3608 algorithm description.
3610 2013-09-11 Werner Lemberg <wl@gnu.org>
3612 [autofit] Improve Hebrew rendering.
3614 This change introduces a new blue zone property
3615 `AF_BLUE_PROPERTY_LATIN_LONG' to make the auto-hinter ignore short
3618 * src/autofit/afblue.dat: Fix Hebrew blue strings.
3619 Use AF_BLUE_PROPERTY_LATIN_LONG for AF_BLUE_STRING_HEBREW_TOP.
3621 * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_LONG): New macro.
3623 * src/autofit/afblue.c, src/autofit/afblue.h: Updated.
3625 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Handle
3626 `AF_LATIN_IS_LONG_BLUE'.
3628 * src/autofit/aflatin.h (AF_LATIN_IS_LONG_BLUE): New macro.
3630 2013-08-28 Behdad Esfahbod <behdad@google.com>
3632 [sfnt] Fix frame access while reading WOFF table directory.
3634 * src/sfnt/sfobjs.c (woff_open_font): Using single memory frame
3635 while reading the directory entries for the whole loop.
3637 2013-08-29 Werner Lemberg <wl@gnu.org>
3638 Behdad Esfahbod <behdad@google.com>
3640 Implement support for WOFF containers.
3642 We simply synthesize a SFNT from the WOFF, create a memory stream
3643 for the new data, and load the SFNT as usual.
3645 Does NOT add any API to access WOFF metadata or private blocks.
3647 * include/freetype/internal/tttypes.h (WOFF_HeaderRec,
3648 WOFF_TableRec): New structures.
3650 * include/freetype/tttags.h (TTAG_wOFF): New macro.
3652 * src/base/ftobjs.c (FT_Open_Face): Set `stream' after calling
3655 * src/sfnt/sfobjs.c [FT_CONFIG_OPTION_SYSTEM_ZLIB]: Include
3657 (WRITE_BYTE, WRITE_USHORT, WRITE_ULONG): New temporary macros for
3658 writing to a stream.
3659 (sfnt_stream_close, compare_offsets, woff_open_font): New functions.
3660 (sfnt_open_font): Handle `TTAG_wOFF'.
3661 (sfnt_init_face): Set `stream' after calling `sfnt_open_font'.
3663 * src/truetype/ttobjs.c (tt_face_init): Set `stream' after calling
3666 * src/base/ftobjs.c (open_face): Use a pointer to FT_Stream as an
3667 argument so that a changed stream survives.
3670 2013-08-28 Werner Lemberg <wl@gnu.org>
3672 [gzip] New function `FT_Gzip_Uncompress'.
3674 This is modeled after zlib's `uncompress' function. We need this
3677 * include/freetype/ftgzip.h, src/gzip/ftgzip.c (FT_Gzip_Uncompress):
3680 * src/gzip/rules.mk: Rewrite to better reflect dependencies.
3682 2013-08-28 Werner Lemberg <wl@gnu.org>
3684 [autofit] Fix `make multi' compilation.
3686 * src/autofit/afblue.cin, src/autofit/afblue.c: Don't include
3687 `afblue.h' but `aftypes.h'.
3688 * src/autofit/afcjk.c: Don't include `aftypes.h' but `afglobal.h'.
3690 2013-08-28 Werner Lemberg <wl@gnu.org>
3692 [autofit] Fix C++ compilation.
3694 * src/autofit/afglobal.c (af_face_globals_get_metrics),
3695 src/autofit/afdummy.c (af_dflt_script_class), src/autofit/afindic.c
3696 (af_deva_script_class): Use proper casts.
3698 2013-08-27 Behdad Esfahbod <behdad@google.com>
3700 * src/sfnt/ttload.c (tt_face_load_font_dir): Fix sign typos.
3702 2013-08-27 Behdad Esfahbod <behdad@google.com>
3704 FT_Open_Face: Improve external stream handling.
3706 If the font's `clazz->init_face' function wants to swap to new
3707 stream, handling of whether original stream was external could
3708 result to either memory leak or double free. Mark externality into
3709 face flags before calling `init_face' such that the clazz can handle
3710 external streams properly.
3712 * src/base/ftobjs.c (FT_Open_Face): Move code to set
3713 FT_FACE_FLAG_EXTERNAL_STREAM to...
3714 (open_face): This function.
3716 2013-08-27 Werner Lemberg <wl@gnu.org>
3718 Remove `FT_SqrtFixed' function.
3720 It's no longer used.
3722 * include/freetype/internal/ftcalc.h, src/base/ftcalc.c: Do it.
3724 2013-08-27 Werner Lemberg <wl@gnu.org>
3726 [autofit] While tracing, report script names instead of ID values.
3728 * src/autofit/afglobal.c (af_script_names) [FT_DEBUG_LEVEL_TRACE]:
3730 * src/autofit/afglobal.h: Updated.
3732 * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
3733 af_cjk_hint_edges): Use `af_script_names'.
3734 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
3735 af_latin_hint_edges): Ditto.
3737 2013-08-26 Werner Lemberg <wl@gnu.org>
3739 [autofit] Report used script while hinting a glyph.
3741 * src/autofit/afcjk.c (af_cjk_hint_edges), src/autofit/aflatin.c
3742 (af_latin_hint_edges): Implement it.
3744 2013-08-26 Werner Lemberg <wl@gnu.org>
3746 [autofit] Add support for Hebrew script.
3748 * src/autofit/afblue.dat: Add blue strings for Hebrew.
3749 * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
3751 * src/autofit/aflatin.c (af_hebr_uniranges): New array.
3752 (af_hebr_script_class): New script.
3753 * src/autofit/aflatin.h, src/autofit/afscript.h: Updated.
3755 2013-08-26 Werner Lemberg <wl@gnu.org>
3757 [autofit] Improve tracing messages.
3759 * src/autofit/afcjk.c (af_cjk_metrics_init_widths): Mention script
3760 ID in tracing message.
3761 (af_cjk_metrics_init_blues): Initialize `axis' outside of the inner
3763 Improve tracing messages.
3764 (af_cjk_hint_edges) [FT_DEBUG_LEVEL_TRACE]: New variable
3765 `num_actions' to count hinting actions.
3766 Improve tracing messages.
3768 * src/autofit/aflatin.c (af_latin_metrics_init_widths): Mention
3769 script ID in tracing message.
3770 (af_latin_metrics_init_blues, af_latin_hint_edges): Improve tracing
3773 2013-08-26 Werner Lemberg <wl@gnu.org>
3775 Better tracing of loaded glyphs.
3777 Previously, the loading of a glyph was traced at level 4, if at all.
3778 With this change, all font loading routines emit a tracing message
3779 at level 1, making it easier to select tracing output (for example
3780 using F2_DEBUG="any:1 afhints:7 aflatin:7").
3782 * src/bdf/bdfdrivr.c (BDF_Glyph_Load): Add tracing message.
3783 * src/cff/cffdrivr.c (cff_glyph_load): Ditto.
3784 * src/cff/cffgload.c (cff_decoder_prepare): Improve tracing
3786 * src/cid/cidgload.c (cid_load_glyph): Use level 1 for tracing
3788 * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Ditto.
3789 * src/pfr/pfrobjs.c (pfr_slot_load): Add tracing message.
3790 * src/truetype/ttgload.c (TT_Load_Glyph): Ditto.
3791 * src/type1/t1gload.c (T1_Load_Glyph): Ditto.
3792 * src/type42/t42objs.c (T42_GlyphSlot_Load): Ditto.
3793 * src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto.
3795 2013-08-26 Werner Lemberg <wl@gnu.org>
3797 [autofit] Fix script selection.
3799 * src/autofit/afglobal.c (af_face_globals_get_metrics): Use
3800 `AF_SCRIPT_DFLT', not value 0.
3803 * src/autofit/afscript.h: Sort by script name.
3805 2013-08-26 Werner Lemberg <wl@gnu.org>
3807 [autofit] Make `dummy' hinter work as expected.
3809 * src/autofit/afdummy.c (af_dummy_hints_init): Properly set scaling
3811 (af_dummy_hints_apply): Scale the glyphs.
3813 2013-08-25 Werner Lemberg <wl@gnu.org>
3815 [autofit] Make `cjk' module use blue stringsets.
3817 * src/autofit/afcjk.c (AF_CJK_MAX_TEST_CHARACTERS): Removed.
3818 (af_cjk_hani_blue_chars): Removed.
3819 (AF_CJK_BLUE_TYPE_*): Removed.
3820 (af_cjk_metrics_init_blues): Replace AF_CJK_MAX_TEST_CHARACTERS with
3821 AF_BLUE_STRING_MAX_LEN.
3822 Change loops to use offsets (in file `afblue.h') into the new arrays
3823 `af_blue_stringsets' and `af_blue_strings' (in file `afblue.c').
3824 Instead of three dimensions (as used in the old blue string array)
3825 we now use properties to do the same, saving one loop nesting level.
3827 * src/autofit/afcjk.h: Remove old enumeration values superseded by
3828 the new data in `afblue.h'.
3829 (AF_CJK_IS_TOP_BLUE, AF_CJK_IS_HORIZ_BLUE, AF_CJK_IS_FILLED_BLUE,
3830 AF_CJK_IS_RIGHT_BLUE): New macros, to be used in
3831 `af_cjk_metrics_init_blues'.
3832 (AF_CJK_BLUE_IS_RIGHT): Remove this now redundant enum value.
3833 (AF_CJK_BLUE_IS_TOP): Renamed to...
3834 (AF_CJK_BLUE_TOP): This.
3835 (AF_CJK_MAX_BLUES): Remove.
3836 (AF_CJKAxisRec): Updated.
3838 2013-08-25 Werner Lemberg <wl@gnu.org>
3842 * src/autofit/afblue.hin, src/autofit/afblue.c (GET_UTF8_CHAR): Use
3845 2013-08-25 Werner Lemberg <wl@gnu.org>
3847 [autofit] Synchronize `cjk' with `latin' module (and vice versa).
3849 * src/autofit/afcjk.c (af_cjk_metrics_init_widths): Add tracing
3851 (af_cjk_metrics_init_blues): Don't pass blue string array as
3852 argument but use the global array directly.
3853 Use `outline' directly.
3854 Update and add tracing messages.
3855 (af_cjk_metrics_init): Simplify code.
3856 (af_cjk_metrics_scale_dim): Improve tracing message.
3857 (af_cjk_metrics_scale): Synchronize.
3859 * src/autofit/aflatin.c (af_latin_metrics_init_widths,
3860 af_latin_metrics_init_blues): Improve and add tracing messages.
3862 2013-08-25 Werner Lemberg <wl@gnu.org>
3864 [autofit] Make `latin' module use blue stringsets.
3866 * src/autofit/aflatin.c (AF_LATIN_MAX_TEST_CHARACTERS): Removed.
3867 (af_latin_blue_chars): Removed.
3868 (af_latin_metrics_init_blues): Replace AF_LATIN_MAX_TEST_CHARACTERS
3869 with AF_BLUE_STRING_MAX_LEN.
3870 Change loops to use offsets (in file `afblue.h') into the new arrays
3871 `af_blue_stringsets' and `af_blue_strings' (in file `afblue.c').
3872 Use `AF_LATIN_IS_SMALL_TOP_BLUE' macro.
3874 * src/autofit/aflatin.h: Remove old enumeration values superseded by
3875 the new data in `afblue.h'.
3876 (AF_LATIN_IS_TOP_BLUE): Updated definition.
3877 (AF_LATIN_IS_SMALL_TOP_BLUE): New macro.
3878 (AF_LATIN_MAX_BLUES): Remove.
3879 (AF_LatinAxisRec): Updated.
3881 2013-08-25 Werner Lemberg <wl@gnu.org>
3883 [autofit] Add blue stringsets.
3885 * src/autofit/aftypes.h: Include `afblue.h'.
3886 (AF_ScriptClassRec): Add `blue_stringset' field.
3887 (AF_DEFINE_SCRIPT_CLASS): Updated.
3889 * src/autofit/autofit.c: Include `afblue.c'.
3891 * src/autofit/afcjk.c (af_hani_script_class), src/autofit/afdummy.c
3892 (af_dflt_script_class), src/autofit/afindic.c
3893 (af_deva_script_class), src/autofit/aflatin.c
3894 (af_latn_script_class), src/autofit/aflatin2.c
3895 (af_ltn2_script_class): Updated.
3897 * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `afblue.c'.
3899 2013-08-25 Werner Lemberg <wl@gnu.org>
3901 [autofit] Introduce data file for blue strings.
3903 The idea is to have a central file which gets processed by a Perl
3904 script to create proper `.c' and `.h' files using templates. There
3905 are two other reasons to do that:
3907 . The data file should be easily readable. We use UTF-8 encoding
3908 which then gets converted to single bytes.
3910 . Since the number of supported scripts will increase soon, the
3911 current usage of blue string arrays is a waste of space. Using
3912 the Perl script it is possible to imitate jagged arrays,
3913 defining enumeration constants as offsets into the arrays.
3915 This commit only adds files without changing any functionality.
3917 * src/autofit/afblue.dat: New data file.
3918 * src/tools/afblue.pl: New Perl script for processing `afblue.dat'.
3920 * src/autofit/afblue.cin, src/autofit/afblue.hin: New template files
3922 * src/autofit/afblue.c, src/autofit/afblue.c: New source files.
3923 To avoid a dependency on Perl, we add them too.
3925 2013-08-19 Alexei Podtelezhnikov <apodtele@gmail.com>
3927 [base] Enable new algorithm for `BBox_Cubic_Check'.
3929 * src/base/ftbbox.c: Enable new BBox_Cubic_Check algorithm, remove
3933 2013-08-18 Werner Lemberg <wl@gnu.org>
3935 * builds/unix/unix-def.in (freetype2.pc): Don't set executable bit.
3937 2013-08-18 Werner Lemberg <wl@gnu.org>
3939 Fix Savannah bug #39804.
3941 * builds/unix/configure.raw (LIBPNG): Define and export.
3942 * builds/unix/freetype-config.in, builds/unix/freetype2.in: Handle
3945 2013-08-17 Alexei Podtelezhnikov <apodtele@gmail.com>
3947 [base] Clean up BBox_Conic_Check.
3949 * src/base/ftbbox.c (BBox_Conic_Check): Remove redundant checks for
3950 extremum at the segment ends, which are already within the bbox.
3951 Slightly modify calculations.
3953 2013-08-15 Alexei Podtelezhnikov <apodtele@gmail.com>
3955 [base] Finish experimental (disabled) BBox_Cubic_Check implementation.
3957 * src/base/ftbbox.c (BBox_Cubic_Check): Scale arguments to improve
3958 accuracy and avoid overflows.
3960 2013-08-13 Alexei Podtelezhnikov <apodtele@gmail.com>
3962 [base] Refactor experimental (disabled) BBox_Cubic_Check.
3964 * src/base/ftbbox.c (BBox_Cubic_Check): Implement the minimum search
3965 as the mirror image of the maximum search implemented here...
3966 (update_max): New function.
3968 2013-08-06 John Tytgat <John.Tytgat@esko.com>
3970 Fix Savannah bug #39702.
3972 * src/cff/cffload.c (cff_index_get_pointers): Check for `cur_offset
3973 != 0'; this stronger test is mandated by the CFF specification.
3974 Fix test for INDEX structures which have one or more empty entries
3977 2013-08-05 Werner Lemberg <wl@gnu.org>
3979 Fix gcc pragmas, part 2.
3981 * src/truetype/ttinterp.c (TT_MulFix14_long_long,
3982 TT_DotFix14_long_long): `#pragma gcc diagnostic {push,pop}' has been
3983 introduced with gcc version 4.6.
3985 2013-08-05 Werner Lemberg <wl@gnu.org>
3989 * src/truetype/ttinterp.c (TT_MulFix14_long_long,
3990 TT_DotFix14_long_long): Older gcc versions don't accept diagnostic
3991 pragmas within a function body.
3993 2013-08-05 Werner Lemberg <wl@gnu.org>
3995 Fix Savannah bug #39700.
3997 * builds/unix/ftconfig.h: Synchronize with
3998 `include/freetype/config/ftconfig.h'.
4000 * builds/vms/ftconfig.h: Ditto.
4001 Make the differences to the master `ftconfig.h' file as small as
4002 possible for easier maintenance.
4004 2013-08-05 Werner Lemberg <wl@gnu.org>
4006 [autofit] Improve handling of `near' points.
4008 Points which are very near to each other are now marked as such.
4009 The `weak' flag is then computed by using the `in' vector of the
4010 first and the `out' vector of the last point of a group of near
4013 For example, this fixes the rendering of glyph `Oslash' in
4016 * src/autofit/afhints.h (AF_Flags): New value `AF_FLAGS_NEAR'.
4018 * src/autofit/afhints.c (af_glyph_hints_reload): Introduce
4019 the heuristic value `near_limit' to decide whether the current point
4020 is near to the previous one, then set `AF_FLAG_NEAR' accordingly.
4021 Store good `in' vector (of last non-near point) in
4022 `last_good_in_{x,y}' and use it as an argument to
4023 `ft_corner_is_flat' if necessary.
4025 2013-08-02 Werner Lemberg <wl@gnu.org>
4027 * include/freetype/ftcffdrv.h: Improve documentation.
4028 This is based on blog entries from David Lemon and Dave Arnold (both
4029 from Adobe) with kind permission. Dave also helped in
4032 2013-08-02 Werner Lemberg <wl@gnu.org>
4034 [autofit] Move declaration of scripts into separate file.
4036 This has the benefit that we don't need to duplicate the data at
4039 * src/autofit/afscript.h: New file.
4041 * src/autofit/aftypes.h (AF_Script): Include `afscript.h' to define
4042 the enumeration values.
4044 * src/autofit/afglobal.c: Include `afscript.h' to get the script
4045 specific header files.
4046 (af_script_classes): Include `afscript.h' to fill this array.
4048 * src/autofit/afpic.c: Include `afscript.h' to get the script
4049 specific header files.
4050 (autofit_module_class_pic_init): Include `afscript.h' for
4052 * src/autofit/afpic.h (AF_SCRIPT_CLASSES_COUNT,
4053 AF_SCRIPT_CLASSES_REC_COUNT): Removed. Use `AF_SCRIPT_MAX' instead.
4055 * src/autofit/rules.mk (AUTOF_DRV_H): Updated.
4057 2013-08-02 Werner Lemberg <wl@gnu.org>
4059 [autofit] Move declaration of writing systems into separate file.
4061 This has the benefit that we don't need to duplicate the data at
4064 * src/autofit/afwrtsys.h: New file.
4066 * src/autofit/aftypes.h (AF_WritingSystem): Include `afwrtsys.h' to
4067 define the enumeration values.
4069 * src/autofit/afglobal.c: Include `afwrtsys.h' to get the writing
4070 system specific header files.
4072 (af_writing_system_classes): Include `afwrtsys.h' to fill this
4075 * src/autofit/afpic.c: Include `afwrtsys.h' to get the writing
4076 system specific header files.
4077 (autofit_module_class_pic_init): Include `afwrtsys.h' for
4079 * src/autofit/afpic.h (AF_WRITING_SYSTEM_CLASSES_COUNT,
4080 AF_WRITING_SYSTEM_CLASSES_REC_COUNT): Removed. Use
4081 `AF_WRITING_SYSTEM_MAX' instead.
4083 2013-08-02 Werner Lemberg <wl@gnu.org>
4085 [sfnt] Fix compilation with g++.
4087 * src/sfnt/pngshim.c (error_callback, read_data_from_FT_stream): Use
4089 (Load_SBit_Png): Pacify compiler.
4091 2013-08-02 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4092 Werner Lemberg <wl@gnu.org>
4094 [autofit] Fix `make multi'.
4096 * include/freetype/config/ftconfig.h (FT_LOCAL_ARRAY,
4097 FT_LOCAL_ARRAY_DEF): New macros.
4099 * src/autofit/afglobal.c (af_writing_system_classes,
4100 af_script_classes): Use FT_LOCAL_ARRAY_DEF.
4101 * src/autofit/afglobal.h: Declare `af_writing_system_classes' and
4102 `af_script_classes'.
4103 * src/autofit/afloader.c: Include `afpic.h'.
4105 2013-08-01 Werner Lemberg <wl@gnu.org>
4107 Another round of cppcheck nitpicks.
4109 The call was (from the top-level of the FreeType tree):
4114 -I /usr/local/include \
4115 -I /usr/lib/gcc/i586-suse-linux/4.7/include \
4117 -I include/freetype \
4118 -I include/freetype/config \
4119 -I include/freetype/internal \
4120 -DFT2_BUILD_LIBRARY \
4123 using cppcheck git commit f7e93f99.
4125 Note that cppcheck still can't handle `#include FOO' (with `FOO' a
4128 */* Improve variable scopes.
4129 */* Remove redundant initializations which get overwritten.
4131 * src/gxvalid/*: Comment out redundant code or guard it with
4132 FT_DEBUG_LEVEL_TRACE.
4134 2013-07-30 Werner Lemberg <wl@gnu.org>
4136 [autofit] Introduce `writing systems'.
4138 This patch adds a new top level to the auto-hinter's script class
4139 hierarchy. It defines `writing systems' which can contain multiple
4142 For example, the `latin' writing system (in file `aflatin.c') is
4143 able to support scripts like Latin, Cyrillic, Armenian, etc., which
4144 can be handled similarly.
4146 Scripts are now named using four-letter OpenType tags.
4148 * src/autofit/aftypes.h (AF_ScriptClassRec): Move relevant members
4150 (AF_WritingSystemClassRec): This new structure. It holds pointers
4151 to functions which can be shared among related scripts.
4152 (AF_WritingSystem): New enumeration.
4153 (AF_Script): Revised values using four-letter tags.
4154 (AF_DEFINE_WRITING_SYSTEM_CLASS): New macro.
4155 (AF_DEFINE_SCRIPT_CLASS): Updated.
4157 * src/autofit/afglobal.c (af_writing_system_classes): New global,
4159 (af_script_classes): Updated.
4160 (af_face_globals_free): Updated.
4162 (af_face_globals_get_metrics): Updated.
4164 * src/autofit/afglobal.h (AF_SCRIPT_FALLBACK)
4165 [!AF_CONFIG_OPTION_CJK]: Handle this case.
4167 * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph):
4170 * src/autofit/afpic.c (autofit_module_class_pic_init): Updated;
4171 initialize structures for both writing systems and scripts.
4172 * src/autofit/afpic.h: Updated.
4173 (AF_WRITING_SYSTEM_CLASSES_GET): New macro.
4175 * src/autofit/afcjk.c (af_cjk_writing_system_class): New writing
4177 (af_cjk_uniranges): Renamed to...
4178 (af_hani_uniranges): This.
4179 (af_cjk_script_class): Reduced and renamed to...
4180 (af_hani_script_class): This.
4181 * src/autofit/afcjk.h: Updated.
4183 * src/autofit/afdummy.c (af_dummy_writing_system_class): New writing
4185 (af_dummy_script_class): Reduced and renamed to...
4186 (af_dflt_script_class): This.
4187 * src/autofit/afdummy.h: Updated.
4189 * src/autofit/afindic.c (af_indic_writing_system_class): New writing
4191 (af_indic_uniranges): Renamed to...
4192 (af_deva_uniranges): This.
4193 (af_indic_script_class): Reduced and renamed to...
4194 (af_deva_script_class): This.
4195 * src/autofit/afcjk.h: Updated.
4197 * src/autofit/aflatin.c (af_latin_writing_system_class): New writing
4199 (af_latin_uniranges): Renamed to...
4200 (af_latn_uniranges): This.
4201 (af_latin_script_class): Reduced and renamed to...
4202 (af_latn_script_class): This.
4203 * src/autofit/aflatin.h: Updated.
4205 * src/autofit/aflatin2.c (af_latin2_writing_system_class): New
4207 (af_latin2_uniranges): Renamed to...
4208 (af_ltn2_uniranges): This.
4209 Synchronize ranges with `latin'.
4210 (af_latin2_script_class): Reduced and renamed to...
4211 (af_ltn2_script_class): This.
4212 * src/autofit/aflatin2.h: Updated.
4214 2013-07-30 Werner Lemberg <wl@gnu.org>
4216 [autofit] Variable renaming.
4218 * src/autofit/aftypes.h (AF_ScriptMetricsRec):
4219 s/clazz/script_class/.
4222 2013-07-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4224 Ignore libpng-config under cross-building configuration,
4225 because it will return the flags for the hosting environment.
4227 * builds/unix/configure.raw: Ignore libpng-config when
4228 `cross_compiling' == yes.
4230 2013-07-30 Behdad Esfahbod <behdad@google.com>
4232 Prevent division by zero by a transparent color.
4234 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra):
4235 Return 0 immediately, when alpha channel is zero.
4237 2013-07-25 Behdad Esfahbod <behdad@google.com>
4239 Add FT_FACE_FLAG_COLOR and FT_HAS_COLOR.
4241 Also disambiguate Google's color bitmap tables.
4243 * include/freetype/freetype.h (FT_FACE_FLAG_COLOR, FT_HAS_COLOR):
4246 * include/freetype/internal/tttypes.h (TT_SbitTableType): Add
4247 TT_SBIT_TABLE_TYPE_CBLC.
4249 * src/sfnt/sfobjs.c (sfnt_load_face): Handle FT_FACE_FLAG_COLOR.
4251 * src/sfnt/ttsbit.c (tt_face_load_sbit,
4252 tt_face_load_strike_metrics, tt_face_load_sbit_image): Handle
4253 TT_SBIT_TABLE_TYPE_CBLC.
4255 2013-07-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
4257 [sfnt] Fix for `make multi' target.
4259 * src/sfnt/pngshim.c (Load_SBit_Png): Use FT_LOCAL_DEF().
4261 2013-07-20 Werner Lemberg <wl@gnu.org>
4263 * docs/INSTALL.GNU: Updated.
4265 2013-07-20 Behdad Esfahbod <behdad@google.com>
4267 [sfnt] Fix `sbix' table version handling.
4269 * src/sfnt/ttsbit.c (tt_face_load_sbit) [TT_SBIT_TABLE_TYPE_SBIX]:
4270 USHORT version numbers are to be considered as `minor'.
4272 2013-07-19 Werner Lemberg <wl@gnu.org>
4274 [autofit] Fix segment classification for blue zones.
4276 The old code (essentially unchanged since the very beginning)
4277 incorrectly handled this configuration
4293 as round. (`o' and `x' are on and off points, respectively).
4295 This is a major change which should improve the rendering results
4296 enormously for many TrueType fonts, especially in the range approx.
4297 20-40ppem, fixing the appearance of many overshoots.
4299 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Look at the
4300 first and last points of the segment, not the points right before
4303 2013-07-19 Behdad Esfahbod <behdad@google.com>
4305 [sfnt] `sbix' fix-ups.
4307 * src/sfnt/sfobjs.c (sfnt_load_face): Apple's `sbix' color bitmaps
4308 are rendered scaled and then the `glyf' outline rendered on top. We
4309 don't support that yet, so just ignore the `glyf' outline and
4310 advertise it as a bitmap-only font.
4312 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
4313 [TT_SBIT_TABLE_TYPE_SBIX]: Return metrics in 26.6 units.
4314 (tt_face_load_sbix_image): Typo.
4316 2013-07-18 Behdad Esfahbod <behdad@google.com>
4318 [sfnt] Add support for Apple's `sbix' color bitmap table.
4320 * include/freetype/internal/tttypes.h (TT_SBit_MetricsRec): Widen
4321 fields to FT_Short and FT_UShort, respectively.
4322 (TT_SbitTableType): New enumeration.
4323 (TT_FaceRec): Add `sbit_table_type' field.
4325 * include/freetype/tttags.h (TTAG_sbix): New macro.
4327 * src/sfnt/pngshim.c (Load_SBit_Png): Pass a more generic
4328 FT_GlyphSlot argument instead FT_Bitmap.
4329 Add flag to control map and metrics handling.
4332 * src/sfnt/ttsbit.c: Include `ttmtx.h'.
4333 (tt_face_load_eblc): Renamed to...
4334 (tt_face_load_sbit): This.
4335 Handle `sbix' bitmaps.
4336 (tt_face_free_eblc): Renamed to...
4337 (tt_face_load_sbit): This.
4339 (tt_face_load_strike_metrics): Handle `sbix' bitmaps.
4340 (tt_face_load_sbix_image): New function.
4341 (tt_sbit_decoder_alloc_bitmap, tt_sbit_decoder_load_image,
4342 tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned,
4343 tt_sbit_decoder_load_compound, tt_sbit_decoder_load_png,
4344 tt_sbit_decoder_load_image, tt_sbit_decoder_load_bitmap): Don't pass
4345 and handle load flags.
4346 (tt_sbit_decoder_load_bitmap) [!FT_CONFIG_OPTION_USE_PNG]: Better
4347 handle formats 17-19.
4348 Move color to grayscale conversion to...
4349 (tt_face_load_sbit_image): Here.
4350 Handle `sbix' bitmaps.
4352 * src/sfnt/pngshim.h: Updated.
4353 * src/sfnt/ttsbit.h: Updated.
4354 * src/sfnt/sfdriver.c: Updated.
4356 2013-07-18 Werner Lemberg <wl@gnu.org>
4358 [sfnt] Ignore invalid magic number in `head' or `bhed'.
4360 Other font engines seem to ignore it also. Problem reported by
4361 Hin-Tak Leung <htl10@users.sourceforge.net>.
4363 * src/sfnt/ttload.c (check_table_dir): Don't abort but warn only if
4364 we have an invalid magic number.
4366 2013-07-16 Werner Lemberg <wl@gnu.org>
4368 [smooth] Fix segfault caused by previous commit.
4370 * src/smooth/ftgrays.c (gray_set_cell): Always compute
4373 2013-07-16 David Turner <digit@google.com>
4375 [smooth] Improve performance.
4377 Provide a work-around for an ARM-specific performance bug in GCC.
4378 This speeds up the rasterizer by more than 5%.
4380 Also slightly optimize `set_gray_cell' and `gray_record_cell' (which
4381 also improves performance on other platforms by a tiny bit (<1%).
4383 * src/smooth/ftgrays.c (FT_DIV_MOD): New macro.
4384 Use it where appropriate.
4386 (gray_record_cell, gray_set_cell, gray_move_to,
4387 gray_convert_glyph_inner): Streamline condition handling.
4389 2013-07-16 David Turner <digit@google.com>
4391 [truetype] Add assembler code for TT_MulFix14 and TT_DotFix14.
4393 This patch provides slightly optimized versions for ARM, x86, and
4394 x86_64 CPUs if built with GCC.
4396 Also remove some dead code.
4398 * src/truetype/ttinterp.c (TT_MulFix14_arm, TT_MulFix14_long_long,
4399 TT_DotFix14_long_long): New functions.
4401 2013-07-16 David Turner <digit@google.com>
4403 Optimize FT_MulFix for x86_64 GCC builds.
4405 This patch provides an optimized `FT_MulFix' implementation for
4406 x86_64 machines when FreeType is built with GCC, or compatible
4407 compilers like Clang.
4410 bin/ftbench -p -t 5 -s 14 -f 0008 Arial.ttf
4415 Load_Advances (Normal) 4.816 us/op
4416 Load_Advances (Fast) 0.028 us/op
4418 Get_Glyph 0.463 us/op
4419 Get_CBox 0.077 us/op
4420 Get_Char_Index 0.023 us/op
4421 Iterate CMap 13.898 us/op
4422 New_Face 12.368 us/op
4423 Embolden 0.028 us/op
4424 Get_BBox 0.302 us/op
4429 Load_Advances (Normal) 4.645 us/op
4430 Load_Advances (Fast) 0.027 us/op
4432 Get_Glyph 0.460 us/op
4433 Get_CBox 0.077 us/op
4434 Get_Char_Index 0.024 us/op
4435 Iterate CMap 13.403 us/op
4436 New_Face 12.278 us/op
4437 Embolden 0.028 us/op
4438 Get_BBox 0.301 us/op
4440 * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h
4441 (FT_MulFix_x86_64): New function.
4443 2013-07-16 David Turner <digit@google.com>
4445 Speed up ARMv7 support.
4447 When building for ARMv7 with thumb2 instructions, the optimized
4448 `FT_MulFix_arm' assembly routine was not being used.
4450 The reason for this is in the `ftconfig.h' header, namely:
4452 - The assembly routine uses the `smull' instruction which is not
4453 available when generating Thumb-1 machine code. It is available
4454 in Thumb-2 mode, though.
4456 - The header was written a long time ago before Thumb-2 became
4457 widely popular (e.g. with Android). So it simply doesn't use the
4458 assembly routine if the `__thumb__' built-in macro is defined.
4460 - When compiling in Thumb-2 mode, the compiler will define both
4461 `__thumb__' and `__thumb2__'.
4463 By checking for `(__thumb2__ || !__thumb__)', we ensure that the
4464 assembly routine is only avoided when generating Thumb-1 code.
4466 Given that this is performance-sensitive function, this improves
4467 `ftbench' as follows on a Galaxy Nexus:
4469 Before (us/op) After (us/op)
4471 - loading Arial.ttf glyphs at 14 ppem [1]
4475 - same operation with the light auto-hinter [2]
4479 - same operation without hinting [3]
4483 - loading Arial.ttf advances at 14 ppem [4]
4485 Load_Advances (normal) 34.216 33.016
4486 Load_Advances (fast) 0.176 0.176
4488 [1] ftbench -t 5 -p -s 14 -b a -f 0008 Arial.ttf
4489 [2] ftbench -t 5 -p -s 14 -b a -r 1 -f 0028 Arial.ttf
4490 [3] ftbench -t 5 -p -s 14 -b a -f 000a Arial.ttf
4491 [4] ftbench -t 5 -p -s 14 -b b -f 0008 Arial.ttf
4493 * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h
4494 (FT_MULFIX_ASSEMBLER): Fix handling for ARMv7.
4496 2013-06-28 Werner Lemberg <wl@gnu.org>
4498 * docs/CHANGES: Updated.
4500 2013-06-27 Werner Lemberg <wl@gnu.org>
4502 * src/winfonts/winfnt.c (FNT_Load_Glyph): Fix bitmap width guard.
4504 2013-06-25 Werner Lemberg <wl@gnu.org>
4506 [cff] Add darkening limit to `darkening-parameters'.
4508 * src/cff/cffdrivr.c (cff_property_set): Add check.
4510 2013-06-25 Werner Lemberg <wl@gnu.org>
4512 [cff] Add `darkening-parameters' property.
4514 * include/freetype/ftcffdrv.h: Document it.
4516 * src/cff/cffdrivr.c (cff_property_set, cff_property_get): Handle
4517 `darkening-parameters' property.
4519 * src/cff/cf2font.h (CF2_FontRec): Add `darkenParams' array.
4521 * src/cff/cf2font.c (cf2_computeDarkening): Add `darkenParams'
4522 argument and use it.
4525 * src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Copy
4526 `darken_params' values.
4528 * src/cff/cffobjs.h (CFF_DriverRec): Add `darken_params' array.
4530 * src/cff/cffobjs.c (cff_driver_init): Set default values for
4533 2013-06-25 Werner Lemberg <wl@gnu.org>
4535 [docmaker] Code shuffling.
4537 * src/tools/docmaker/tohtml.py (re_url): Move regexp...
4538 * src/tools/docmaker/sources.py: ... to this file.
4540 2013-06-25 Werner Lemberg <wl@gnu.org>
4542 [docmaker] Remove unused functions.
4544 * src/tools/docmaker/content.py (DocMarkup.get_start,
4545 DocBlock.get_markup_name): Removed.
4546 * src/tools/docmaker/tohtml.py (html_quote0, dump_html_code,
4547 HtmlFormatter.make_html_words): Removed.
4549 2013-06-25 Werner Lemberg <wl@gnu.org>
4551 * builds/freetype.mk (dll): Remove target.
4553 Problem reported by Jörg Günnewig <joerg.guennewig@googlemail.com>.
4555 2013-06-25 Werner Lemberg <wl@gnu.org>
4557 [docmaker] Recognise URLs.
4559 * src/tools/docmaker/tohtml.py (re_url): New regular expression.
4560 (make_html_para): Use it.
4562 2013-06-19 Werner Lemberg <wl@gnu.org>
4564 * Version 2.5.0.1 released.
4565 ===========================
4568 Tag sources with `VER-2-5-0-1'.
4570 * include/freetype/config/ftoption.h: Undefine
4571 CFF_CONFIG_OPTION_OLD_ENGINE.
4572 * devel/ftoption.h: Define CFF_CONFIG_OPTION_OLD_ENGINE.
4574 2013-06-19 Werner Lemberg <wl@gnu.org>
4576 * builds/unix/install.mk (install): Don't create `cache' directory.
4578 Found by Peter Breitenlohner <peb@mppmu.mpg.de>.
4580 2013-06-19 Werner Lemberg <wl@gnu.org>
4582 * Version 2.5.0 released.
4583 =========================
4586 Tag sources with `VER-2-5-0'.
4588 * docs/VERSION.DLL: Update documentation and bump version number to
4591 * README, Jamfile (RefDoc),
4592 builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
4593 builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
4594 builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
4595 builds/win32/visualc/freetype.dsp,
4596 builds/win32/visualc/freetype.vcproj,
4597 builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
4598 builds/win32/visualce/freetype.vcproj,
4599 builds/win32/visualce/index.html,
4600 builds/wince/vc2005-ce/freetype.vcproj,
4601 builds/wince/vc2005-ce/index.html,
4602 builds/wince/vc2008-ce/freetype.vcproj,
4603 builds/wince/vc2008-ce/index.html: s/2.4.12/2.5.0/, s/2412/250/.
4605 * include/freetype/freetype.h (FREETYPE_MINOR): Set to 5.
4606 (FREETYPE_PATCH): Set to 0.
4608 * builds/unix/configure.raw (version_info): Set to 16:2:10.
4610 * src/base/ftobjs.c (FT_Open_Face): Pacify compiler.
4611 * src/truetype/ttinterp.c (Ins_MSIRP, Ins_MIRP): Ditto.
4613 2013-06-18 Werner Lemberg <wl@gnu.org>
4615 Fix Savannah bug #39269.
4617 * src/base/ftgloadr.c (FT_GlyphLoader_CheckPoints): Free memory in
4618 case of reallocation failures.
4620 2013-06-18 Andrew Church <achurch+savannah@achurch.org>
4622 Fix Savannah bug #39266.
4624 If memory allocations fail at certain points while opening a font,
4625 FreeType can either crash due to a NULL dereference or leak memory.
4627 * include/freetype/internal/ftobjs.c (FT_Face_InternalRec,
4628 FT_LibraryRec): Make `refcount' a signed integer. If, for example,
4629 FT_Open_Face() fails in a memory allocation before the face's
4630 reference count is set to 1, a subsequent `FT_Done_Library' call
4631 would otherwise loop over `FT_Done_Face' 2^32 times before freeing
4634 * src/base/ftobjs.c (open_face): Initialize `stream' and friends
4636 (FT_Open_Face) <Fail>: Behave correctly if `node' is NULL.
4637 (FT_Destroy_Module) <Fail>: Check that `renderer_clazz' is valid.
4639 2013-06-14 Werner Lemberg <wl@gnu.org>
4641 * src/smooth/ftgrays.c One final pragma to silence 64-bit MSVC.
4643 2013-06-06 Dave Arnold <darnold@adobe.com>
4644 Werner Lemberg <wl@gnu.org>
4646 [cff] Add code to Adobe's engine to handle ppem > 2000.
4648 * src/cff/cffgload.c (cff_slot_load): If we get
4649 FT_Err_Glyph_Too_Big, retry unhinted and scale up later on.
4651 2013-06-12 Werner Lemberg <wl@gnu.org>
4653 Another try on pragmas.
4655 * include/freetype/internal/ftdebug.h: Move pragmas to...
4656 * include/freetype/internal/internal.h: ... this file since it gets
4657 included by all source files.
4658 * include/freetype/internal/ftserv.h: Remove pragma which has no
4661 2013-06-12 Werner Lemberg <wl@gnu.org>
4663 * include/freetype/internal/ftdebug.h: Disable MSVC warning C4127.
4665 This partially undoes commit 3f6e0e0c.
4667 2013-06-12 Werner Lemberg <wl@gnu.org>
4669 More compiler warning fixes.
4671 */*: Use cast to `FT_Bool' (or `Bool') where appropriate.
4673 2013-06-10 Werner Lemberg <wl@gnu.org>
4675 [truetype] Improve handling of broken sbit advance widths.
4677 * src/truetype/ttgload.c (TT_Load_Glyph): Use the glyph's (scaled)
4678 `linearHoriAdvance' if the sbit's `horiAdvance' value is zero.
4680 Cf. font `Fixedsys Excelsior' v3.01 (FSEX300.ttf), glyph A, 16ppem.
4682 2013-06-10 Werner Lemberg <wl@gnu.org>
4684 [sfnt] Improve embedded bitmap tracing.
4686 * src/base/ftobjs.c (FT_Request_Size): Move trace message regarding
4687 bitmap strike match to...
4688 (FT_Match_Size): This function.
4690 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics,
4691 tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned,
4692 tt_sbit_decoder_load_compound, tt_sbit_decoder_load_png,
4693 tt_sbit_decoder_load_image): Decorate with tracing messages.
4695 2013-06-10 Werner Lemberg <wl@gnu.org>
4697 Fix Savannah bug #39160.
4699 * src/truetype/ttinterp.c (Ins_SDPVTL): Set projection vector too
4700 for the degenerate case.
4702 2013-06-09 David Turner <digit@google.com>
4704 * src/cache/ftcmanag.c (FTC_Manager_Reset): Add missing cache flush.
4706 This code, present since eight(!) years in the unused `CACHE'
4707 branch, has been forgotten to apply to the master branch. It's
4708 really amazing that noone has ever complained since
4709 `FTC_Manager_Reset' is pretty useless without flushing the cache.
4711 2013-06-07 Werner Lemberg <wl@gnu.org>
4713 Add and improve pragmas for MSVC compiler.
4715 * include/freetype/internal/ftdebug.h: Remove pragmas.
4716 * include/freetype/internal/ftserv.h: Use push and pop for pragmas.
4717 * include/freetype/internal/ftvalid.h: Handle warning C4324.
4718 * src/base/ftobjs.c: Use push and pop for pragmas.
4719 * src/gzip/ftgzip.c: Handle warning C4244.
4721 2013-06-07 Werner Lemberg <wl@gnu.org>
4723 [cff] s/cf2_getGlyphWidth/cf2_getGlyphOutline/.
4725 * src/cff/cf2font.c, src/cff/cf2font.h, src/cff/cf2ft.c: Do it.
4727 2013-06-06 Dave Arnold <darnold@adobe.com>
4729 [cff] Add early exit feature for width-only calls.
4731 This is for `FT_Get_Advance'.
4733 There are 7 places where the spec says the width can be defined:
4743 * src/cff/cf2intrp.c (cf2_doStems): Exit early for width-only calls,
4746 (cf2_interpT2CharString) <cf2_cmdHSTEM>, <cf2_cmdVSTEM>,
4747 <cf2_cmdVMOVETO>, <cf2_cmdENDCHAR>, <cf2_cmdHINTMASK>,
4748 <cf2_cmdRMOVETO>, <cf2_cmdHMOVETO>: Exit early for width-only calls.
4750 2013-06-06 Werner Lemberg <wl@gnu.org>
4752 Next round of compiler fixes.
4754 * builds/win32/ftdebug.c, builds/wince/ftdebug.c (ft_debug_init):
4757 * include/freetype/internal/ftserv.h (FT_SERVICE_UNAVAILABLE): Fix
4759 * include/freetype/internal/ftstream.h: Decorate stream and frame
4760 macros with `FT_Long' and `FT_ULong' as appropriate.
4762 * src/base/ftrfork.c (raccess_guess_darwin_hfsplus,
4763 raccess_guess_darwin_newvfs): Use cast.
4765 * src/bdf/bdflib.c (_bdf_set_default_spacing): Use cast.
4767 * src/cache/ftcmanag.c (FTC_Manager_Check): Fix cast.
4768 * src/cache/ftcmanag.h (FTC_ManagerRec): Ditto.
4770 * src/cff/cf2arrst.c (cf2_arrstack_setNumElements): Use cast.
4771 * src/cff/cf2ft.c (cf2_freeSeacComponent): Ditto.
4772 * src/cff/cffobjs.c (remove_subset_prefix, remove_style): Ditto.
4774 * src/cid/cidparse.c (cid_parser_new): Use cast.
4776 * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Use cast.
4778 * src/psaux/psobjs.c (reallocate_t1_table): Fix argument type.
4780 * src/raster/ftraster.c (ft_black_reset): Use cast.
4782 * src/truetype/ttgxvar.c (FT_Stream_FTell): Use cast.
4783 (ALL_POINTS): Fix cast.
4785 * src/type1/t1driver.c (t1_ps_get_font_value): Add casts.
4786 * src/type1/t1parse.c (T1_Get_Private_Dict): Add cast.
4788 2013-06-05 Dave Arnold <darnold@adobe.com>
4790 Fix more MSVC Win32 compiler warnings.
4792 * src/base/ftobjs.c: Fix typo in MS pragma.
4794 * src/base/bdflib.c (_bdf_set_default_spacing, _bdf_add_property):
4795 `lineno' is only used in debug mode.
4797 * src/cff/cf2ft.c (cf2_builder_moveTo): `params' is only used in
4800 2013-06-05 Werner Lemberg <wl@gnu.org>
4802 Fix compiler warnings.
4804 * include/freetype/internal/ftmemory.h: Decorate memory allocation
4805 macros with `FT_Long' where appropriate.
4806 Remove duplicate of FT_MEM_QRENEW_ARRAY definition.
4808 * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Use
4811 * src/base/ftobjs.c: Add warning disabling pragma for MSVC while
4814 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdESC>: Add
4817 * src/sfnt/ttsbit.c (tt_sbit_decoder_load_compound): Fix casts.
4818 (tt_sbit_decoder_load_bitmap): Beautification.
4820 * src/smooth/ftsmooth.c (ft_smooth_render_generic): Initialize
4821 variables (earlier).
4823 * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Pacify compiler.
4825 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Use unsigned constants
4828 * src/type1/t1load.c (T1_Get_MM_Var): Ditto.
4830 2013-06-04 Werner Lemberg <wl@gnu.org>
4832 * src/cff/cf2font.c (cf2_getGlyphWidth): Initialize `advWidth'.
4834 Problem reported by Ingmar Sittl <ingmar.sittl@elektrobit.com>.
4836 2013-06-04 Werner Lemberg <wl@gnu.org>
4838 Apply fixes for cppcheck nitpicks.
4840 https://cppcheck.sourceforge.net/
4842 The call was (from the top-level of the FreeType tree):
4847 -I include/freetype/ \
4848 -I include/freetype/config/ \
4849 -I include/freetype/internal/ \
4852 Note that the current version heavily chokes on FreeType, delivering
4853 many wrong results. I will report those issues to the cppcheck team
4854 so that a newer version gives improved results hopefully.
4856 */* Improve variable scopes.
4857 */* Remove redundant initializations which get overwritten.
4859 * src/base/ftmac.c, builds/mac/ftmac.c (count_faces_scalable):
4860 Remove unused variable.
4862 * src/base/ftdbgmem.c (ft_mem_table_destroy): `table' can't be zero.
4864 * src/gxvalid/gxvkern.c (gxv_kern_subtable_fmt1_entry_validate):
4865 Remove functionless code.
4867 * src/tools/ftrandom.c (main): Fix memory leak.
4869 2013-06-03 Werner Lemberg <wl@gnu.org>
4871 Add CFF_CONFIG_OPTION_OLD_ENGINE configuration option.
4873 This controls whether the old FreeType CFF engine gets compiled into
4874 FreeType. It is now disabled by default.
4876 * devel/ftoption.h, include/freetype/config/ftoption.h
4877 (CFF_CONFIG_OPTION_OLD_ENGINE): New macro.
4879 * src/cff/cffdrivr.c (cff_property_set), src/cff/cffgload.c
4880 (CFF_Operator, cff_argument_counts, cff_builder_add_point,
4881 cff_operator_seac, cff_decoder_parse_charstrings, cff_slot_load),
4882 src/cff/cffgload.h, src/cff/cffobjs.c (cff_driver_init): Use
4883 CFF_CONFIG_OPTION_OLD_ENGINE to guard the affected code.
4885 * docs/CHANGES: Updated.
4887 2013-06-02 Werner Lemberg <wl@gnu.org>
4889 Fix PNG library handling.
4891 * builds/unix/configure.raw: Don't use LIBPNG_LIBS but
4894 2013-05-23 Behdad Esfahbod <behdad@google.com>
4896 Add support for color embedded bitmaps (eg. color emoji).
4898 A new load flag, FT_LOAD_COLOR, makes FreeType load color
4899 embedded-bitmaps, following this draft specification
4901 https://color-emoji.googlecode.com/git/specification/v1.html
4903 which defines two new SFNT tables, `CBDT' and `CBLC' (named and
4904 modeled after `EBDT' and `EBLC', respectively). The color bitmaps
4905 are stored in the new FT_PIXEL_MODE_BGRA format to represent BGRA
4906 pre-multiplied sRGB images. If PNG support is available, PNG color
4907 images as defined in the same proposed specification are supported
4910 Note that color bitmaps are converted to grayscale if client didn't
4913 * builds/unix/configure.raw: Search for libpng.
4914 Add `--without-png' option.
4916 * devel/ftoption.h, include/freetype/config/ftoption.h
4917 (FT_CONFIG_OPTION_USE_PNG): New macro.
4919 * include/freetype/freetype.h (FT_LOAD_COLOR): New load flag.
4921 * include/freetype/ftimage.h (FT_Pixel_Mode): Add
4922 `FT_PIXEL_MODE_BGRA'.
4924 * include/freetype/tttags.h (TTAG_CBDT, TTAG_CBLC): New tags.
4926 * src/base/ftbitmap.c (FT_Bitmap_Embolden): Updated.
4927 (ft_gray_for_premultiplied_srgb_bgra): New function.
4928 (FT_Bitmap_Convert): Handle FT_PIXEL_MODE_BGRA.
4930 * src/sfnt/pngshim.c, src/sfnt/pngshim.h: New files.
4932 * src/sfnt/sfnt.c: Include `pngshim.c'.
4934 * src/sfnt/ttsbit.c: Include FT_BITMAP_H and `pngshim.h'
4935 (tt_face_load_eblc): Load `CBLC'.
4936 (tt_sbit_decoder_init): Load `CBDT'.
4937 (tt_sbit_decoder_alloc_bitmap): Pass load flags to select between
4938 color and grayscale bitmaps.
4939 Set `num_grays'. This is used by `ftview' to choose the blending
4941 (tt_sbit_decoder_load_byte_aligned,
4942 tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_compound,
4943 tt_sbit_decoder_load_image): Pass load flag.
4945 Don't call `tt_sbit_decoder_alloc_bitmap'.
4947 (tt_sbit_decoder_load_png) [FT_CONFIG_OPTION_USE_PNG]: New function.
4948 (tt_sbit_decoder_load_bitmap): Pass load flag.
4949 Handle new glyph formats 17, 18, and 19.
4950 Call `tt_sbit_decoder_alloc_bitmap'.
4951 Flatten color bitmaps if necessary.
4952 (tt_face_load_sbit_image): Updated.
4954 * src/sfnt/rules.mk (SFNT_DRV_SRC): Add `pngshim.c'.
4956 * docs/CHANGES: Updated.
4958 2013-05-24 Guenter <info@gknw.net>
4960 Apply Savannah patch #8055.
4962 Make `apinames' create an import file for NetWare.
4964 * src/tools/apinames.c (PROGRAM_VERSION): Set to 0.2.
4965 (OutputFormat): Add `OUTPUT_NETWARE_IMP'.
4966 (names_dump): Handle it.
4968 (main): Handle new command line flag `-wN'.
4970 2013-05-23 Behdad Esfahbod <behdad@behdad.org>
4974 * src/truetype/ttinterp.c (TT_RunIns)
4975 [!TT_CONFIG_OPTION_SUBPIXEL_HINTING]: Make it work.
4977 2013-05-22 Infinality <infinality@infinality.net>
4979 [truetype] Formatting and an additional subpixel tweak.
4981 * src/truetype/ttinterp.c (Ins_SHPIX): Formatting fix.
4982 * src/truetype/ttsubpix.c (SKIP_NONPIXEL_Y_MOVES_Rules):
4983 Revert previous modification for Verdana clones.
4985 2013-05-22 Infinality <infinality@infinality.net>
4987 [truetype] Adjust subpixel zp2 moves and tweak rules.
4989 These modifications fix thin diagonal stems in some legacy fonts.
4991 * src/truetype/ttinterp.c (Direct_Move_X): Remove unused macro.
4992 (Move_Zp2_Point): Don't always disable x moves for subpixel rendering.
4993 (Ins_SHP): Disable x moves here for subpixel rendering.
4994 (Ins_SHPIX): Only disable x moves in compatibility mode.
4995 Split out zp2 move reversals and reorder conditional respectively.
4997 * src/truetype/ttsubpix.c (SKIP_NONPIXEL_Y_MOVES_Rules): Fix oversight.
4998 Only adjust Verdana clones for 17 ppem.
4999 (SKIP_NONPIXEL_Y_MOVES_Rules_Exceptions): Add Courier New.
5000 (ALWAYS_SKIP_DELTAP_Rules): Found additional cases for Arial `s'.
5002 2013-05-20 Infinality <infinality@infinality.net>
5004 [truetype] Simplify and improve subpixel function detection.
5006 Some small enhancements have allowed the removal of many macros and
5007 the simplification of existing rules in `ttsubpix.c'.
5009 * src/truetype/ttsubpix.h (SPH_TWEAK_ALLOW_X_DMOVEX,
5010 SPH_TWEAK_ALLOW_X_MOVE_ZP2,
5011 SPH_TWEAK_DELTAP_SKIP_EXAGGERATED_VALUES,
5012 SPH_TWEAK_SKIP_INLINE_DELTAS, SPH_TWEAK_MIRP_CVT_ZERO): Removed.
5013 (SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES_DELTAP): New rule macro.
5015 * src/truetype/ttsubpix.c: Updated affected rules.
5017 * src/truetype/ttinterp.c (Direct_Move_X): Updated.
5018 (INS_FDEF): Add additional function detection.
5019 (INS_ENDF): Set runtime flag.
5020 (Ins_CALL): Skip the call under certain conditions.
5022 (Ins_LOOPCALL): Skip the call under certain conditions.
5024 (Move_Zp2_Point): Updated.
5025 (Ins_SHPIX): Updated.
5026 Skip the move under some situations.
5027 (Ins_MIAP): Improve conditions.
5028 (Ins_MIRP): Updated.
5029 (Ins_DELTAP): Skip move under certain conditions.
5030 Simplify conditions.
5031 (TT_RunIns): Updated.
5032 Add code to handle new function detection.
5035 2013-05-17 Werner Lemberg <wl@gnu.org>
5037 Update more FT_Err_XXX macros using FT_ERR and FT_THROW;
5039 * builds/amiga/src/base/ftsystem.c, builds/mac/ftmac.c,
5040 builds/unix/ftsystem.c, builds/vms/ftsystem.c: Do it.
5042 2013-05-15 Werner Lemberg <wl@gnu.org>
5044 [truetype] Add `interpreter-version' property.
5046 This makes the option TT_CONFIG_OPTION_SUBPIXEL_HINTING controllable
5049 * include/freetype/ftttdrv.h: New file.
5051 * include/freetype/config/ftheader.h (FT_TRUETYPE_DRIVER_H): New
5054 * src/truetype/ttdriver.c: Include FT_TRUETYPE_DRIVER_H.
5055 (tt_property_set, tt_property_get): Fill templates.
5057 * src/truetype/ttobjs.h (TT_DriverRec): Add `interpreter_version'
5059 Remove unused `extension_component' member.
5061 * src/truetype/ttgload.c: Include FT_TRUETYPE_DRIVER_H.
5062 (tt_get_metrics, TT_Hint_Glyph, TT_Process_Simple_Glyph,
5063 compute_glyph_metrics, tt_loader_init): Use `interpreter_version'.
5065 * src/truetype/ttinterp.c: Include FT_TRUETYPE_DRIVER_H.
5066 (SUBPIXEL_HINTING): New macro to check `interpreter_version' flag.
5067 Update all affected functions to use it.
5068 Use TT_INTERPRETER_VERSION_XXX where appropriate.
5070 * src/truetype/ttobjs.c: Include FT_TRUETYPE_DRIVER_H.
5071 (tt_driver_init): Initialize `interpreter_version'.
5073 * src/truetype/ttsubpix.c: Include FT_TRUETYPE_DRIVER_H.
5074 Use TT_INTERPRETER_VERSION_XXX where appropriate.
5076 2013-05-13 Werner Lemberg <wl@gnu.org>
5078 [truetype] Avoid empty source file.
5080 * src/truetype/ttsubpix.c [!TT_CONFIG_OPTION_SUBPIXEL_HINTING]:
5081 Provide dummy typedef.
5083 2013-05-13 Werner Lemberg <wl@gnu.org>
5085 * src/cff/cf2font.c (cf2_getGlyphWidth): Fix uninitialized variable.
5087 Fix suggested by Vaibhav Nagarnaik <vnagarnaik@gmail.com>.
5089 2013-05-13 Brian Nixon <bnixon@yahoo.com>
5091 Fix Savannah bug #38970.
5093 * src/base/ftdebug.c, builds/win32/ftdebug.c,
5094 builds/wince/ftdebug.c, builds/amiga/src/base/ftdebug.c
5095 (ft_debug_init): Don't read past the environment variable FT2_DEBUG.
5097 2013-05-12 Werner Lemberg <wl@gnu.org>
5099 [truetype] Add framework for TrueType properties.
5101 * src/truetype/ttdriver.c: Include FT_SERVICE_PROPERTIES_H.
5102 (tt_property_set, tt_property_get): New functions, still empty.
5103 Define `tt_service_properties' service.
5104 Update `tt_services'.
5106 * src/truetype/ttpic.h: Include FT_SERVICE_PROPERTIES_H.
5107 (TT_SERVICE_PROPERTIES_GET): New macro.
5108 (TTModulePIC): Add `tt_service_properties'.
5110 2013-05-12 Werner Lemberg <wl@gnu.org>
5112 Fix Savannah bug #38967.
5114 * src/base/ftcalc.c (FT_DivFix) [FT_LONG64]: Fix cast.
5116 2013-05-12 Werner Lemberg <wl@gnu.org>
5118 Introduce unsigned 64bit type (if available).
5120 * include/freetype/config/ftconfig.h: Define FT_UINT64 if available.
5121 [FT_LONG64]: Provide FT_UInt64.
5123 * builds/unix/ftconfig.in: Synchronized.
5125 2013-05-12 Werner Lemberg <wl@gnu.org>
5127 Fix Savannah bug #38968.
5129 * include/freetype/ftmodapi.h: Add `FT_EXPORT' to
5130 FT_Property_{Set,Get}.
5131 * src/base/ftobjs.c: Add `FT_EXPORT_DEF' to
5132 FT_Property_{Set,Get}.
5134 2013-05-10 Werner Lemberg <wl@gnu.org>
5136 [sfnt] Clean up bitmap code.
5138 * src/sfnt/ttsbit.c: Deleted.
5139 * src/sfnt/ttsbit0.c: Renamed to `ttsbit.c'.
5140 * rules.mk (SFNT_DRV_H): Updated.
5142 2013-05-10 Werner Lemberg <wl@gnu.org>
5144 */* [FT_CONFIG_OPTION_OLD_INTERNALS]: Remove macro and guarded code.
5146 ----------------------------------------------------------------------------
5148 Copyright (C) 2013-2020 by
5149 David Turner, Robert Wilhelm, and Werner Lemberg.
5151 This file is part of the FreeType project, and may only be used, modified,
5152 and distributed under the terms of the FreeType project license,
5153 LICENSE.TXT. By continuing to use, modify, or distribute this file you
5154 indicate that you have read the license and understand and accept it
5159 version-control: never