Commit Graph

222 Commits

Author SHA1 Message Date
Werner Lemberg 4b28f6ac42 [ftrandom] Improve Makefile.
It now supports both a normal build (`./configure && make') and a
development build (`make devel').

* src/tools/ftrandom/Makefile (VPATH): Set it so that
`libfreetype.a' gets searched in both `objs' (for the development
build) and `objs/.libs' (for a normal build which uses libtool).
(LIBS): Add missing libraries.
(ftrandom.o): New rule.
(ftrandom): Use automatic variables.
2016-09-04 19:05:45 +02:00
Werner Lemberg ca8e98d94a [ftrandom] Various fixes.
* src/tools/ftrandom/ftrandom.c (GOOD_FONTS_DIR): Provide better
default.
(error_fraction): Make it of type `double' to work as advertized –
this was completely broken.
Update all related code.
(error_count, fcnt): Make it unsigned to fix compiler warnings.
Update all related code.
(fontlist): Change `len' member to `long' to fix compiler warnings.
(FT_MoveTo, FT_LineTo, FT_ConicTo, FT_CubicTo, abort_test): Tag
unused variables.
(TestFace, FindFonts, copyfont, do_test): Fix compiler warnings.
(ExecuteTest): Ditto.
Call `FT_Done_FreeType'.
(getErrorCnt): Replace `ceil' with an ordinary cast to `unsigned
int'.
(usage): Improve output.
(main): Fix compiler warnings.

* src/tools/ftrandom/README: Updated.
2016-09-03 13:06:16 +02:00
Werner Lemberg ee6b4115d2 [ftfuzzer] Improve coverage of rasterfuzzer.
* src/tools/ftfuzzer/rasterfuzzer.cc (LLVMFuzzerTestOneInput): Use
input data for `tags' array also.
Trim input data to get more positive hits.
2016-03-12 23:48:13 +01:00
Werner Lemberg a8b956227b [ftfuzzer] Add unit for testing smooth and black rasterizers.
* src/tools/ftfuzzer/rasterfuzzer.cc: New file.
2016-03-01 09:37:12 +01:00
Werner Lemberg 015c6e08a1 Fix clang warnings.
* src/autofit/aflatin.c (af_latin_hints_compute_segments): Use
FT_UShort for `min_flags' and `max_flags'.
Initialize `prev_*' variables.

* src/cff/cffobjs.c (cff_face_init) [FT_DEBUG_LEVEL_TRACE]: Fix
types of local variables.

* src/smooth/ftgrays.c (gray_dump_cells) [FT_DEBUG_LEVEL_TRACE]:
Update `printf' format string.

* src/tools/ftfuzzer/ftfuzzer.cc (setIntermediateAxis): Add cast.
(LLVMFuzzerTestOneInput): Fix loop type.
2016-03-01 06:45:52 +01:00
Werner Lemberg 4b3ea5ca8f [docmaker] Don't emit trailing newlines.
* src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_code):
Use `rstrip'.
2016-02-09 08:08:17 +01:00
Werner Lemberg 9cc2d46785 Minor. 2016-02-05 11:52:50 +01:00
Werner Lemberg 9adeab6452 Update copyright year. 2016-01-13 11:54:10 +01:00
Werner Lemberg 453722db8e * src/tools/afblue.pl (convert_ascii_chars): Don't ignore spaces.
Instead, reduce multiple spaces to a single one.  We need this later
for supporting character clusters in `afblue.dat'.
2015-12-05 13:20:30 +01:00
Werner Lemberg 98afe3f5c8 [docmaker] Allow references to section names.
In the reference, we show the section's title enclosed in single
quotes.

* src/tools/docmaker/formatter.py (Formatter::__init__): Collect
section names as identifiers.

* src/tools/docmaker/tohtml.py (section_title_header): Split into...
(section_title_header1, section_title_header2): ... these two
strings.
(HtmlFormatter::make_block_url, make_html_word, html_source_quote):
Handle sections.
(HtmlFormatter::section_enter): Updated to add `id' HTML attribute.
2015-11-28 11:58:49 +01:00
Werner Lemberg 97b808fdad [docmaker] Allow `foo[bar]' as identifier.
We need this to handle equally named properties in different
modules.

* src/tools/docmaker/content.py (re_identifier),
src/tools/docmaker/sources.py (re_crossref): Allow `foo[bar]'.

* src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word,
HtmlFormatter::index_exit, HtmlFormatter::section_enter,
HtmlFormatter::block_enter): Handle `foo[bar]'.
2015-11-26 14:29:17 +01:00
Werner Lemberg 7363414b9d [ftfuzzer] Add copyright notices; do some formatting. 2015-11-07 06:32:46 +01:00
Werner Lemberg 6bda921da0 [ftfuzzer] Update README file. 2015-11-02 06:53:48 +01:00
Werner Lemberg bcf618b256 [ftfuzzer] Add support for multiple files (patch #8779).
Currently, libFuzzer only supports mutation of a single file.  We
circumvent this problem by using an uncompressed tar archive as
multiple-file input for the fuzzer.

This patch enables tests of `FT_Attach_Stream' and AFM/PFM parsing;
a constructed tarball should contain a font file as the first
element, and files to be attached as further elements.

* src/tools/ftfuzzer/ftfuzzer.cc: Include libarchive headers.
(archive_read_entry_data, parse_data): New functions.
(LLVMFuzzerTestOneInput): Updated.

* src/tools/ftfuzzer/ftmutator.cc: New file, providing a custom
mutator for libFuzzer that can mutate tarballs in a sensible way.
2015-11-02 06:50:49 +01:00
Werner Lemberg 3066f5f53d Revert erroneously applied commits. 2015-10-21 14:05:41 +02:00
Werner Lemberg e6593389cf [sfnt] Avoid unnecessarily large allocation for WOFFs (#46257).
* src/sfnt/sfobjs.c (woff_open_font): Use WOFF's `totalSfntSize'
only after thorough checks.
Add tracing messages.
2015-10-21 08:04:29 +02:00
Kostya Serebryany 266976b163 add src/tools/ftfuzzer/README 2015-10-15 22:15:53 -07:00
Werner Lemberg 8b76eaf092 * src/tools/ftfuzzer/ftfuzzer.cc: Handle fixed sizes (#46211). 2015-10-15 18:28:43 +02:00
Werner Lemberg bdb56bba86 [ftfuzzer] Handle TTCs and MM/GX variations.
This patch also contains various other improvements.

* src/tools/ftfuzzer/ftfuzzer.cc: Add preprocessor guard to reject
pre-C++11 compilers.
(FT_Global): New class.  Use it to provide a global constructor and
destructor for the `FT_Library' object.
(setIntermediateAxis): New function to select an (arbitrary)
instance.
(LLVMFuzzerTestOneInput): Loop over all faces and named instances.
Also call `FT_Set_Char_Size'.
2015-10-13 11:51:13 +02:00
Kostya Serebryany dde84f2539 [ftfuzzer] Add support for LLVM's LibFuzzer.
* src/tools/ftfuzzer/ftfuzzer.cc, src/tools/runinput.cc: New files.
2015-10-07 22:18:22 +02:00
Werner Lemberg e5a27a7596 [docmaker] Allow `-' in bold and italic markup.
* src/tools/docmaker/sources.py (re_italic, re_bold): Adjust
accordingly.
2015-09-10 07:44:11 +02:00
Werner Lemberg 802f6a9abd * src/tools/docmaker/utils.py (check_output): Add missing `\n'. 2015-06-27 07:12:42 +02:00
Werner Lemberg 392cf22f8a Another adjustment to header locations.
This change is a result of a discussion thread on freetype-devel

  http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html

Re-introduce the `freetype2' subdirectory for all FreeType header
files after installation, and rename the `freetype2' subdirectory in
the git repository to `freetype'.

* include/freetype2: Renamed to...
* include/freetype: This.

* CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
PRIVATE_HEADERS): Updated.
Update creation of `ftconfig.h'.
Install generated `ftconfig.h'.

* Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.

* builds/amiga/include/config/ftconfig.h, builds/freetype.mk
(PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
builds/unix/freetype2.in: Updated.

* builds/unix/freetype-config.in: Updated.
* builds/unix/configure.raw: Don't check for `rmdir'.
* builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable
according to the autoconf info manual.
* builds/unix/install.mk (install, uninstall,
distclean_project_unix): Update and simplify.

* builds/wince/*, builds/windows/*: Updated.

* devel/ft2build.h, include/ft2build.h: Updated.

* include/freetype2/config/ftheader.h,
include/freetype2/internal/ftserv.h,
include/freetype2/internal/internal.h: Update all header file
macros.

* src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.

* docs/*: Updated.
2015-06-26 06:48:00 +02:00
Werner Lemberg 8502c98b15 Fix Savannah bug #45097.
We no longer `pollute' the namespace of possible header file names;
instead we move `ft2build.h' up by one level so that it gets
installed in the default include directory (e.g.,
/usr/local/include).  After this commit, only `ft2build.h' stays in
the compiler's include path.

No visible changes for the user who follows the standard FreeType
header inclusion rules.

* include/*: Move to ...
* include/freetype2/*: This directory, except `ft2build.h'.

* CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
PRIVATE_HEADERS), Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.

* builds/amiga/include/config/ftconfig.h, builds/freetype.mk
(PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
builds/unix/install.mk (install, uninstall),
builds/unix/freetype2.in: Updated.

* builds/unix/freetype-config.in: Updated.
Emit -I directory only if it is not `/usr/include'.

* builds/wince/*, builds/windows/*: Updated.

* devel/ft2build.h, include/ft2build.h: Updated.

* include/freetype2/config/ftheader.h,
include/freetype2/internal/ftserv.h,
include/freetype2/internal/internal.h: Update all header file
macros.

* src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.

* docs/*: Updated.
2015-06-22 06:35:23 +02:00
Werner Lemberg 366b2ea748 * src/tools/apinames.c (names_dump): Fix invalid reference.
Problem reported by Guzman Mosqueda, Jose R
<jose.r.guzman.mosqueda@intel.com>.
2015-05-28 10:58:40 +02:00
Werner Lemberg 772a5e5ddd Update links to Apple's TrueType specification. 2015-03-20 09:40:10 +01:00
Werner Lemberg 3e58779675 Minor copyright and e-mail address issues. 2015-03-11 08:48:15 +01:00
Werner Lemberg cb0f7b65a8 Fix automatic copyright updating.
* src/tools/update-copyright: Make scanning of `no-copyright'
actually work.

* src/tools/no-copyright: Don't include README in general.
2015-03-11 08:47:48 +01:00
Werner Lemberg 272e3cd077 [psaux, type1] Fix minor AFM issues.
* include/internal/t1types.h (AFM_KernPairRec): Make indices
unsigned.
Update users.
(AFM_FontInfoRec): Make element counters unsigned.
Update users.
* src/psaux/afmparse.h (AFM_ValueRec): Add union member for unsigned
int.

* src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs):
Reject negative values for number of kerning elements.

* src/type1/t1afm.c, src/tools/test_afm.c: Updated.
2015-02-18 11:38:46 +01:00
Werner Lemberg f57fc59e01 Run `src/tools/update-copyright'. 2015-01-17 20:41:43 +01:00
Werner Lemberg 50be00d3b3 Add some tools to handle yearly copyright notice updates.
We are now following the GNU guidelines: A new release automatically
means that the copyright year of all affected files gets updated; it
is no longer used to track years of modification changes.

* src/tools/update-copyright-year: New Perl script.
* src/tools/update-copyright: New shell script that calls
`update-copyright-year' on all files.
* src/tools/no-copyright: Exceptions that should not be handled by
`update-copyright'
2015-01-17 20:38:31 +01:00
Werner Lemberg 36a4676136 Remove C-isms in Python code. 2014-12-22 03:31:32 +01:00
Werner Lemberg 0098d5502d Uppercase all hex digits for orthogonality. 2014-12-07 11:03:57 +01:00
Werner Lemberg 9870d6dacf */*: Decorate hex constants with `U' and `L' where appropriate. 2014-12-07 09:40:47 +01:00
Werner Lemberg ca1f5cc7e6 [docmaker] Always handle `<Order>' section elements.
Previously, those elements were handled only for sections present in
a `<Sections>' chapter element.

* src/tools/docmaker/content.py (ContentProcessor::finish):
Implement it.
2014-12-02 22:49:25 +01:00
Werner Lemberg ef6a352344 [docmaker] Properly handle empty rows in Synopsis.
* src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Emit
`&nbsp;' for empty fields.
2014-12-02 21:16:59 +01:00
Werner Lemberg 0e96f05009 [docmaker] Thinko.
* src/tools/docmaker/content.py (DocBlock::get_markup_words_all):
Emit `/empty/' string for first element also.
2014-12-02 11:08:31 +01:00
Werner Lemberg 102d4a76ed [docmaker] Honour empty lines in `<Order>' section element.
This greatly improves the readability of the `Synopsis' links.

* src/tools/docmaker/content.py (DocBlock::get_markup_words_all):
Insert string `/empty/' between items.

* src/tools/docmaker/formatter.py (Formatter::section_dump): Make it
robust against nonexistent keys.

* src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Emit
empty <td> elements for `/empty/'.
2014-12-02 10:27:40 +01:00
Werner Lemberg 2af25ac0f9 [docmaker] Ensure Python 3 compatibility.
* src/tools/docmaker/content.py (ContentProcessor::set_section,
ContentProcessor::finish): Replace `has_key' function with `in'
keyword.

* src/tools/docmaker/formatter.py (Formatter::__init__): Replace
sorting function with a key generator.
(Formatter::add_identifier): Replace `has_key' function with `in'
keyword.

* src/tools/docmaker/tohtml.py (HtmlFormatter::html_source_quote):
Replace `has_key' function with `in' keyword.
(HtmlFormatter::index_exit, HtmlFormatter::section_enter): Use
integer division.
s/<>/>/.

* src/tools/docmaker/utils.py: Import `itertools'.
(index_sort): Replaced by...
(index_key): ... this new key generator (doing exactly the same).
2014-12-02 08:38:57 +01:00
Werner Lemberg 80bfeb1c3b [docmaker] Don't output a block multiple times.
This bug was hidden by not processing all lines of `<Order>' blocks.

* src/tools/docmaker/formatter.py (Formatter::section_dump): Filter
out field names.
2014-12-01 10:07:52 +01:00
Werner Lemberg 0dbad7632b [docmaker] Use field values as HTML link targets where possible.
* src/tools/docmaker/tohtml.py (HtmlFormatter::make_block_url):
Accept second, optional argument to specify a name.
(HtmlFormatter::html_source_quote): Link to field ID if possible.
(HtmlFormatter::print_html_field_list): Emit `id' attribute.
2014-12-01 08:44:48 +01:00
Werner Lemberg 785b1d0892 [docmaker] Allow empty lines in `<Order>' blocks.
Before this patch, the suggested order of entries stopped at the
first empty line.

Obviously, nobody noticed that this problem caused a much reduced
set of links in the `Synopsis' sections; in particular, the
`<Order>' blocks contain a lot of entries that wouldn't be listed
otherwise...

* src/tools/docmaker/content.py (DocBlock::get_markup_words_all):
New function to iterate over all items.
(DocSection::process): Use it.
2014-11-30 22:16:34 +01:00
Werner Lemberg 16b3e62013 * src/tools/docmaker/sources.py (column) [Format 2]: Fix regexp.
After the single asterisk there must be no other immediately following
asterisk.
2014-11-30 20:58:27 +01:00
Werner Lemberg aaffbf85df Minor. 2014-11-29 23:26:46 +01:00
Werner Lemberg 434bc69573 * src/tools/docmaker/tohtml.py: Improve CSS for vertical spacing. 2014-11-29 23:12:55 +01:00
Werner Lemberg 51987eaf39 [docmaker] Improve HTML code for table of contents..
* src/toold/docmaker/tohtml.py: Introduce a new table class `toc',
together with proper CSS.
2014-11-29 22:19:29 +01:00
Werner Lemberg aa834ce580 [docmaker] Provide higher-level markup and simplify HTML.
* src/tools/docmaker/tohtml.py: Instead of using extraneous `<div>'
elements, use CSS descendants (of class `section') to format the
data.

Also remove reduntant <p> and <br> elements, replacing them with
proper CSS.

Globally reduce page width to 75%.

(block_header): Rename <div> class to `section'.
2014-11-29 20:08:29 +01:00
Werner Lemberg 3bb9702387 [docmaker] Add `top' links after blocks.
* src/tools/docmaker/tohtml.py (block_footer_middle): Implement it.
2014-11-29 16:12:37 +01:00
Werner Lemberg a31f971577 * src/tools/docmaker/tohtml.py: Improve CSS for fields.
Make fields align horizotnally relative to full line width.
2014-11-29 07:18:44 +01:00
Werner Lemberg 8f795118b8 * src/tools/docmaker/tohtml.py: Fix index and TOC templates.
This thinko was introduced 2014-11-27.
2014-11-29 06:49:15 +01:00
Werner Lemberg ba1ba0cade [docmaker] Format field lists with CSS.
This also simplifies the inserted HTML code.

* src/tools/docmaker/tohtml.py
(HtmlFormatter::print_html_field_list): Do it.
2014-11-28 22:04:14 +01:00
Werner Lemberg 46d4dc86e1 [docmaker] Replace empty `<td>' with CSS..
* src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Do
it.
2014-11-28 05:49:56 +01:00
Werner Lemberg 984e07176c [docmaker] Replace some `<table>' tags with `<h4>' and `<div>'.
* src/tools/docmaker/tohtml.py (marker_*): Use `<h4>'.
(source_*): Use `<div>'.
(HtmlFormatter::block_enter): s/<h4>/<h3>/.
2014-11-28 05:33:58 +01:00
Werner Lemberg 7ea363402c * src/tools/docmaker/tohtml.py: Usee more CSS for index. 2014-11-27 19:38:31 +01:00
Werner Lemberg edcf817efa [docmaker] Replace `name' attribute of `<a>' with `id'.
* src/tools/docmaker/tohtml.py (HtmlFormatter::block_enter): Do it.
2014-11-27 19:28:48 +01:00
Werner Lemberg 26d699ed84 * src/tools/docmaker/tohtml.py: Remove remaining `width' attributes.
For `Index' and `TOC' links, we now simply use the `text-align' CSS
property of `<td>' to enforce flush-left and flush-right,
eliminating the hack with an empty, full-width `<td>' element
inbetween.

The change also enforces the same (smaller) size for all index and
TOC links.
2014-11-27 19:22:52 +01:00
Werner Lemberg dd3fee072c * src/tools/docmaker/tohtml.py: More HTML table refactoring.
Replace some `<table>' tags with `<div>' to simplify structure.

Move `bgcolor' attribute to CSS.

Replace most `width' attributes with CSS.  The remaining instances
(providing a similar effect as LaTeX's `\hfill' command) are removed
in a later patch.
2014-11-27 13:20:52 +01:00
Werner Lemberg 339d830efe [docmaker] Typos. 2014-11-27 12:03:17 +01:00
Werner Lemberg a5ad26afea * src/tools/docmaker/tohtml.py: Replace <font> with CSS. 2014-11-27 11:05:57 +01:00
Werner Lemberg ba67c61972 * src/tools/docmaker/tohtml.py: Center <table> with CSS. 2014-11-27 11:05:11 +01:00
Werner Lemberg 5594fa549d * src/tools/docmaker/tohtml.py: Replace `<center>' with `<div>'. 2014-11-27 11:04:18 +01:00
Werner Lemberg 433295ab6e Sort CSS entries. 2014-11-27 11:03:28 +01:00
Werner Lemberg 8585cf56c1 * src/tools/docmaker/tohtml.py: Remove redundant `<center>' tags.
This starts a series of commits into the direction of generating
valid HTML 5 code, especially using much more CSS.
2014-11-27 11:03:09 +01:00
Werner Lemberg c52882ab72 [docmaker] Produce better HTML code.
* src/tools/docmaker/tohtml.py: Always use double quotes for
attribute values.
(source_footer): Close `td' and `tr' groups.
2014-11-27 08:01:25 +01:00
Werner Lemberg 4e7f89e3d7 [docmaker] Cosmetics. 2014-11-27 07:00:10 +01:00
Werner Lemberg e8a5c33e9f * src/tools/docmaker/sources.py (re_bold, re_italic): Use
non-grouping parentheses.
* src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word):
Updated.
2014-11-27 06:48:37 +01:00
Werner Lemberg a7a4207d10 [docmaker] Formatting, copyright, improved documentation.
* src/tools/docmaker/*: No code changes besides trivial
modifications.
2014-11-24 06:44:45 +01:00
Werner Lemberg 181fd071ee [afblue.pl]: Minor improvements.
* src/tools/afblue.pl: Allow whitespace before comments.
Ignore whitespace in strings.
2014-04-15 16:47:05 +02:00
Werner Lemberg 6dce136937 Fix problems with perl 5.8.8 as distributed with current MinGW.
* src/tools/afblue.pl: Work-around for Perl bug #63402.
(string_re): Avoid `possessive quantifiers', which have been
introduced in Perl version 5.10.
2014-02-05 15:40:47 +01:00
Werner Lemberg 741f736662 Work-around for Perl bug #63402. 2014-02-05 14:51:51 +01:00
Werner Lemberg c46fa86bd5 [autofit] Fix Savannah bug #41138, part 1.
* src/tools/afblue.pl <Handling #endif>: Produce correct auxiliary
enumeration names for generated `#else'.

* src/autofit/afblue.h: Regenerated.
2014-01-08 08:45:40 +01:00
Werner Lemberg 991cbcce97 [autofit] Minor fixes for `afblue.pl'.
* src/tools/afblue.pl (aux_name): Don't use `reverse'.
<Handling #endif>: Use proper indentation for generated `#else'.

* src/autofit/afblue.h: Regenerated.
2014-01-05 13:24:56 +01:00
Werner Lemberg fae3820764 Simplify header file hierarchy.
This large patch changes the header file directory layout from
`include/freetype/...' to `include/...', effectively removing one
level.  Since the file `ft2build.h' is also located in `include'
(and it stays there even after installation), all FreeType header
files are now in a single directory.

Applications that use (a) `freetype-config' or FreeType's
`pkg-config' file to get the include directory for the compiler, and
(b) the documented way for header inclusion like

  #include <ft2build.h>
  #include FT_FREETYPE_H
  ...

don't need any change to the source code.

* include/freetype/*: Move up to...
* include/*: ... this directory.

* builds/amiga/include/freetype/*: Move up to...
* builds/amiga/include/*: ... this directory.

*/*: Essentially do `s@/freetype/@/@' where appropriate.

* CMakeList.txt: Simplify.
* builds/unix/freetype-config.in, builds/unix/freetype2.in: For
`--cflags', return a single directory.
* builds/unix/install.mk (install): No longer try to remove `cache'
and `internal' subdirectories; instead, remove the `freetype'
subdirectory.
2013-11-13 08:55:46 +01:00
Werner Lemberg 8b8be78385 [autofit] Introduce data file for blue strings.
The idea is to have a central file which gets processed by a Perl
script to create proper `.c' and `.h' files using templates.  There
are two other reasons to do that:

  . The data file should be easily readable.  We use UTF-8 encoding
    which then gets converted to single bytes.

  . Since the number of supported scripts will increase soon, the
    current usage of blue string arrays is a waste of space.  Using
    the Perl script it is possible to imitate jagged arrays,
    defining enumeration constants as offsets into the arrays.

This commit only adds files without changing any functionality.

* src/autofit/afblue.dat: New data file.
* src/tools/afblue.pl: New Perl script for processing `afblue.dat'.

* src/autofit/afblue.cin, src/autofit/afblue.hin: New template files
for...
* src/autofit/afblue.c, src/autofit/afblue.c: New source files.
To avoid a dependency on Perl, we add them too.
2013-08-25 08:01:41 +02:00
Werner Lemberg 89ca1fd6d7 [cff] Add `darkening-parameters' property.
* include/freetype/ftcffdrv.h: Document it.

* src/cff/cffdrivr.c (cff_property_set, cff_property_get): Handle
`darkening-parameters' property.

* src/cff/cf2font.h (CF2_FontRec): Add `darkenParams' array.

* src/cff/cf2font.c (cf2_computeDarkening): Add `darkenParams'
argument and use it.
Update all callers.

* src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Copy
`darken_params' values.

* src/cff/cffobjs.h (CFF_DriverRec): Add `darken_params' array.

* src/cff/cffobjs.c (cff_driver_init): Set default values for
`darken_params'.
2013-06-25 23:28:02 +02:00
Werner Lemberg fad93267a2 [docmaker] Code shuffling.
* src/tools/docmaker/tohtml.py (re_url): Move regexp...
* src/tools/docmaker/sources.py: ... to this file.
2013-06-25 10:41:37 +02:00
Werner Lemberg 8bdc40716a [docmaker] Remove unused functions.
* src/tools/docmaker/content.py (DocMarkup.get_start,
DocBlock.get_markup_name): Removed.
* src/tools/docmaker/tohtml.py (html_quote0, dump_html_code,
HtmlFormatter.make_html_words): Removed.
2013-06-25 10:20:53 +02:00
Werner Lemberg c7cc9ebe20 [docmaker] Recognise URLs.
* src/tools/docmaker/tohtml.py (re_url): New regular expression.
(make_html_para): Use it.
2013-06-25 07:24:02 +02:00
Werner Lemberg 8d8508e4d2 Missed some cppcheck items. 2013-06-04 13:09:01 +02:00
Werner Lemberg dc624ca4dc Apply fixes for cppcheck nitpicks.
http://cppcheck.sourceforge.net/

Note that the current version heavily chokes on FreeType, delivering
even wrong results.  I will report those issues to the cppcheck team
so that a newer version gives improved results hopefully.

*/* Improve variable scopes.
*/* Remove redundant initializations which get overwritten.

* src/base/ftmac.c ,builds/mac/ftmac.c (count_faces_scalable):
Remove unused variable.

* src/base/ftdbgmem.c (ft_mem_table_destroy): `table' can't be zero.

* src/gxvalid/gxvkern.c (gxv_kern_subtable_fmt1_entry_validate):
Remove functionless code.

* src/tools/ftrandom.c (main): Fix memory leak.
2013-06-04 10:30:48 +02:00
Guenter 41e4480e43 Apply Savannah patch #8055.
Make `apinames' create an import file for NetWare.

* src/tools/apinames.c (PROGRAM_VERSION): Set to 0.2.
(OutputFormat): Add `OUTPUT_NETWARE_IMP'.
(names_dump): Handle it.
(usage): Updated.
(main): Handle new command line flag `-wN'.
2013-05-24 11:38:09 +02:00
Werner Lemberg 89f5064765 */*: Use FT_ERR_EQ, FT_ERR_NEQ, and FT_ERR where appropriate.
FT_Err_XXX and friends are no longer directly used in the source
code.
2013-03-14 17:50:49 +01:00
Alexei Podtelezhnikov 0e536676ba [tools] Update BBox testing tool.
* src/tools/test_bbox.c: Add another cubic outline with exact BBox.
(REPEAT): Increase the number of benchmarking cycles.
(profile_outline): Tweak output formatting.
2013-02-18 20:41:56 -05:00
Werner Lemberg 4cd5fd463e Remove trailing whitespace. 2013-01-24 13:33:06 +01:00
Alexei Podtelezhnikov a692170a23 Call it fixed-point. 2013-01-12 19:17:05 -05:00
Alexei Podtelezhnikov b4ac30b0ed [base] Reduce trigonometric algorithms.
After we get within 45 degrees by means of true 90-degree rotations,
we can remove initial 45-degree CORDIC iteration and start from
atan(1/2) pseudorotation, reducing expansion factor thereby.

* src/base/fttrigon.c (FT_TRIG_SCALE, FT_TRIG_COSCALE): Update macros.
(ft_trig_pseudo_rotate, ft_trig_pseudo_polarize): Update.

* src/tools/cordic.py: Bring up to date with trigonometric core.

* docs/CHANGES: Old typo.
2013-01-02 22:21:37 -05:00
Alexei Podtelezhnikov cbf3fb39fd * src/tools/cordic.py: Bring up to date with trigonometric core. 2012-12-21 14:20:25 -05:00
Werner Lemberg 590344cde0 [docmaker] Allow `-' in tags and identifiers.
* src/tools/docmaker/content.py (re_identifier),
src/tools/docmaker/sources.py (re_markup_tag1, re_markup_tag2,
re_crossref): Add `-' in patterns.
2012-08-29 09:16:56 +02:00
Werner Lemberg 22fff25385 Whitespace. 2012-02-26 08:47:20 +01:00
suzuki toshiya eba2781ab9 [apinames] Fix the overflow of signed integer hash.
* src/tools/apinames.c (names_add): Change the type of `h' from
int to unsigned int, to prevent undefined behaviour in the
overflow of signed integers (overflow of unsigned int is defined
to be wrap around).  Found by clang test suggested by Sean
McBride.
2011-11-30 22:40:43 +09:00
Werner Lemberg c52f44d4fd Whitespace. 2011-11-30 10:46:53 +01:00
Werner Lemberg 6ae8bde444 [psnames] Handle zapfdingbats.
Problem reported by Nicolas Rougier <Nicolas.Rougier@inria.fr>.

* src/tools/glnames.py (adobe_glyph_list): Add data from AGL's
`zapfdingbats.txt' file.

* src/psnames/pstables.h: Regenerated.
2011-10-01 08:55:20 +02:00
Werner Lemberg f3e2a97d5b Fix URLs. 2011-06-14 08:32:13 +02:00
Werner Lemberg ebfd454a60 Fix C++ compilation issue.
* src/tools/apinames.c (names_dump) <OUTPUT_WATCOM_LBC>: Fix
typo of `dot' variable.
2010-07-11 09:28:21 +02:00
Werner Lemberg f0760ca6e8 We no longer use CVS. 2010-01-23 16:19:33 +01:00
Werner Lemberg c6e4180c05 Remove compiler warning.
Reported by Sean McBride <sean@rogue-research.com>.

* src/tools/apinames.c (read_header_file)<STATE_TYPE>: Use a cast to
`int', as specified in the printf(3) man page.
2009-11-04 12:18:48 +01:00
suzuki toshiya d1ee378566 type1: Use size_t variable to pass the string length. 2009-08-01 00:30:16 +09:00
suzuki toshiya 313d4f4ca6 Add a script to check the undefined and unused trace macros. 2009-07-13 00:01:57 +09:00
Werner Lemberg 7bb1005de8 docmaker: Don't ignore single-line code blocks.
* src/tools/docmaker/content.py (DocBlock::_init__): Fix change from
2009-01-31.
2009-03-16 20:42:38 +01:00
Werner Lemberg 763ae208e5 Minor docmaker improvements.
* src/tools/docmaker/content.py (DocBlock::__init__): Ignore empty
code blocks.
2009-01-30 23:45:53 +00:00