Commit Graph

222 Commits

Author SHA1 Message Date
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
Werner Lemberg 76fffcd898 * include/freetype/freetype.h (FT_LOAD_ADVANCE_ONLY): Use value
0x100 instead of 0x10000; the latter value is already occupied by
FT_LOAD_TARGET_LIGHT.  Bug reported by James Cloos.


Handle SFNT with neither outlines nor bitmaps.  This fixes Savannah
bug #25010.

* src/base/ftobjs.c (FT_Load_Glyph): Reject fonts with neither
outlines nor bitmaps.

* src/sfnt/sfobjs.c (sfnt_load_face): Don't return an error if there
is no table with glyphs.


* src/sfnt/ttload.c (tt_face_lookup_table): Improve debugging
message.


Other minor cosmetics.
2008-12-05 18:37:44 +00:00
Werner Lemberg 1a5d561dce * src/autofit/afcjk.c, src/base/ftoutln.c, src/base/ftrfork.c,
src/bdf/bdfdrivr.c, src/gxvalid/gxvmorx.c, src/otvalid/otvmath.c,
src/pcf/pcfdrivr.c, src/psnames/pstables.h, src/smooth/ftgrays.c,
src/tools/glnames.py, src/truetype/ttinterp.c, src/type1/t1load.c,
src/type42/t42objs.c, src/winfonts/winfnt.c: Fix compiler warnings
(Atari PureC).
2008-11-29 22:50:24 +00:00
Werner Lemberg ed6c0e063c Fix Savannah bug #24179, reported by Bram Tassyns.
* src/type1/t1load.c (mm_axis_unmap, T1_Get_MM_Var): Fix computation
of default values.


* src/tools/glnames.py (main): Surround `ft_get_adobe_glyph_index'
and `ft_adobe_glyph_list' with FT_CONFIG_OPTION_ADOBE_GLYPH_LIST to
prevent unconditional definition.  This fixes Savannah bug #24241.

* src/psnames/pstables.h: Regenerated.
2008-09-15 07:49:40 +00:00
Werner Lemberg 8a9b63913f Improve navigation in API reference.
* src/tools/docmaker/tohtml.py (html_header_3): Renamed to...
(html_header_6): This.
(html_header_3, html_header_3i, html_header_4, html_header_5,
html_header_5t): New strings.
(toc_footer_start, toc_footer_end): New strings.
(HtmlFormatter::html_header): Updated.
(HtmlFormatter::html_index_header, HtmlFormatter::html_toc_header):
New strings.
(HtmlFormatter::index_enter): Use `html_index_header'.
(HtmlFormatter::index_exit): Print `html_footer'.
(HtmlFormatter::toc_enter): Use `html_toc_header'.
(HtmlFormatter::toc_exit): Print proper footer.

Convert ~ to non-breakable space.

* src/tools/docmaker/tohtml.py (make_html_para): Implement it.
Update header files accordingly.

Many other minor documentation fixes.
2008-06-26 19:56:51 +00:00
Werner Lemberg 8e3539bf7c Emit header info for defined FreeType objects in reference.
* src/tools/docmaker/content.py (re_header_macro): New regexp.
(ContentProcessor::__init__): Initialize new dictionary `headers'.
(DocBlock::__init__): Collect macro header definitions.

* src/tools/docmaker/tohtml.py (header_location_header,
header_location_footer): New strings.
(HtmlFormatter::__init__): Pass `headers' dictionary.
(HtmlFormatter::print_html_field): Don't emit paragraph tags.
(HtmlFormatter::print_html_field_list): Emit empty paragraph.
(HtmlFormatter::block_enter): Emit header info.
2008-06-02 13:53:54 +00:00
Werner Lemberg 2b0b4221ab Cosmetic code changes. 2008-05-28 22:17:28 +00:00
Werner Lemberg de0d00556e * src/tools/docmaker/sources.py (SourceBlock::__init__): While
looking for markup tags, return immediately as soon a single one is
found.
2008-05-28 21:51:15 +00:00
Werner Lemberg 8f7d17bfe3 formatting 2008-05-28 06:39:33 +00:00
Werner Lemberg 35a90b7901 * src/tools/docmaker/tohtml.py (block_footer_start,
block_footer_middle): Beautify output.
2008-05-27 18:16:03 +00:00
Werner Lemberg 61d83d0938 Oops! 2008-01-18 05:19:20 +00:00
Werner Lemberg 250c01d40a whitespace 2008-01-18 05:16:09 +00:00
Werner Lemberg 53286c0970 more formatting and whitespace 2008-01-18 05:14:13 +00:00
Werner Lemberg 4af139d2e4 formatting, whitespace 2008-01-18 04:53:28 +00:00
Werner Lemberg 6684257742 * src/tools/docmaker/tohtml.py (html_header_2): Fix typo.
Add `td.left' element to CSS.
(toc_section_enter): Use it.
2007-10-20 16:17:28 +00:00
Werner Lemberg e12ed563d6 * src/tools/ftrandom.c (font_size): New global variable.
(TestFace): Use it.
(main): Handle new option `--size' to set `font_size'.
(Usage): Updated.

Formatting.
2007-06-17 05:31:23 +00:00
Werner Lemberg ad18b367e9 * src/cid/cidgload.c (cid_load_glyph): Check `fd_select'.
* src/tools/ftrandom/Makefile: Depend on `libfreetype.a'.
2007-06-04 07:04:05 +00:00
Werner Lemberg 25b14229f1 More OBJ_DIR. 2007-06-03 19:53:02 +00:00
Werner Lemberg f2ff7329c7 Some explanations, taken from an email sent by George. 2007-06-03 19:50:57 +00:00
Werner Lemberg 2fdb70e9d5 Fold fttest.c into ftrandom.c (as it was orginally). 2007-06-03 19:38:59 +00:00
Werner Lemberg 99a320b431 * src/tools/ftrandom/*: Add the `ftrandom' test program written by
George Williams (with some modifications).
2007-06-03 19:21:26 +00:00
Werner Lemberg 4b2e83d5b5 A new set of spelling fixes from Alexei.
Add some copyright messages.
2007-02-01 07:58:02 +00:00
Werner Lemberg 9b774e2822 Remove trailing whitespace. From Alexei. 2007-01-16 06:11:27 +00:00
Werner Lemberg 15c29503fb * src/tools/apinames (State): Remove final comma in structure -- xlc
v5 under AIX 4.3 doesn't like this.
2006-12-09 07:29:54 +00:00
Werner Lemberg 960ba59ad9 * src/sfnt/sfobjs.c (tt_face_get_name): All Unicode strings are
encoded in UTF-16BE.  Patch from Rajeev Pahuja <rpahuja@esri.com>.
(tt_name_entry_ascii_from_ucs4): Removed.


* include/freetype/ftxf86.h: Fix and extend comment so that it
appears in the documentation.

* include/freetype/ftchapters.h: Add `font_format' section.


* src/tools/docmaker/tohtml.py (HtmlFormatter::index_exit): Add link
to TOC in index page.


Formatting.
2006-12-01 08:20:47 +00:00
Werner Lemberg 6e467a654d * src/tools/docmaker/tohtml.py (block_footer): Split into...
(block_footer_start, block_footer_middle, block_footer_end): This to
add navigation buttons.
(HtmlFormatter::block_exit): Updated.
2006-05-12 15:05:45 +00:00
Werner Lemberg e12a471f6a * src/tools/docmaker/tohtml.py (html_header_1): Use `utf-8' charset.
Convert some files to UTF-8.
2006-05-12 14:20:43 +00:00
Werner Lemberg 6756dc15ba * src/tools/docmaker/sources.py (re_source_keywords): Add word
boundary markers.
* src/tools/docmaker/content.py (re_field): Allow `.' in field names
(but not at the beginning or end).

* include/freetype/*: Many minor documentation improvements (adding
links, spelling errors, etc.).
2006-05-12 08:00:13 +00:00
Werner Lemberg fd74ec68b4 * README: Minor updates.
* include/freetype/*: s/scale/scaling value/ where appropriate.
Many other minor documentation improvements.

* src/tools/docmaker/sources.py (re_italic, re_bold): Handle
trailing punctuation.
* src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word): Add
warning message for undefined cross references.
Update handling of re_italic and re_bold.
2006-05-12 04:00:44 +00:00
David Turner 7dc7f21533 doc updates
- fixing FT_Stroker_New to use a FT_Library instead of a FT_Memory

i know, i know, the ChangeLog will be updated later
2006-04-13 16:31:02 +00:00
Werner Lemberg d6e2498f74 * src/tools/docmaker/tohtml.py (make_html_para): Convert `...' quotations
into real left and right single quotes.
Use `para_header' and `para_footer'.

* src/tools/docmaker/sources.py (re_bold, re_italic): Accept "'" also.
2006-03-24 18:31:47 +00:00
Werner Lemberg e0dd18fc79 * src/tools/docmaker/tohtml.py (html_header_1): The `DOCTYPE' comment must
be in uppercase.
2006-03-24 12:14:48 +00:00
Werner Lemberg 4db32ecbc5 * docs/CHANGES: Updated.
* src/tools/docmaker/tohtml.py (html_header_2): Add horizontal
padding between table elements.


Formatting, copyright years.
2006-03-24 11:54:53 +00:00
Werner Lemberg 7f049f4221 Formatting, copyright years. 2006-02-25 16:52:16 +00:00
David Turner 6c71c6b968 * include/freetype/config/ftoption.h, src/autofit/afcjk.c,
src/base/ftobjs.c, src/base/ftutil.c, src/cff/cffobjs.c,
    src/psaux/afmparse.c, src/sfnt/ttbdf.c, src/tools/apinames.c,
    src/truetype/ttdriver.c:

       solved compiler warnings as well as C++ compilation problems
2006-02-25 12:49:40 +00:00
Wu, Chia-I (吳佳一) 98d802b83a * include/freetype/internal/t1types.h (AFM_FontInfo),
src/psaux/afmparse.c, src/tools/test_afm.c: Read `FontBBox',
`Ascender', and `Descender' from an AFM.

* src/type1/t1afm.c (T1_Read_Metrics): Use the metrics from the AFM.

* include/freetype/freetype.h (FT_FaceRec): Mention that fields may be
changed after file attachment.
2006-01-31 07:01:24 +00:00
David Turner 6a681fa84a * src/autofit/afwarp.c: simple #ifdef to prevent compilation when
the warp hinter isn't active (it shouldn't, still experimental)

    * Jamfile, include/freetype/config/ftmodule.h: removed "gxvalid"
    and "otvalid" from the list of modules that are linked statically
    to a given FreeType library. Functionality has been moved to the
    "ftvalid" CVS module.

    note also that current Make-based build system still compiles the
    modules though...

    * include/freetype/config/ftoption.h: added FT_STRICT_ALIASING,
    which controls the definitions of the memory management functions
    to avoid warnings with recent versions of GCC. this macro is
    only here to be disabled, in case we detect problems with the
    new scheme.

    NOTE: disable macro to use the memory debugger. this will be fixed
          later !!
2006-01-27 12:11:22 +00:00
Wu, Chia-I (吳佳一) bcc438b15e * include/freetype/freetype.h (FT_Select_Size): Rename the second
argument from `idx' to `strike_index'.
(FT_Size_Request_Type): Add FT_SIZE_REQUEST_TYPE_MAX to the end of
this enum.

* include/freetype/internal/ftobjs.h (FT_REQUEST_WIDTH,
FT_REQUEST_HEIGHT): New macros to get the width and height of a
request, in fractional pixels.

* include/freetype/internal/ftobjs.h (FT_Select_Metrics,
FT_Request_Metrics), src/base/ftobjs.c (FT_Select_Metrics,
FT_Request_Metrics): New base functions to set the font metrics.  They
were part of FT_Select_Size/FT_Request_Size and are made independent
functions so that metrics are not set again and again.

* src/base/ftobjs.c (FT_Select_Size, FT_Request_Size): Metrics are set
only when driver's size_select/size_request is NULL.  That is, drivers
should set the metrics themselves.
(FT_Match_Size): Round before matching.  This was what we did and it
does cause some problems without rounding.

* src/cff/cffobjs.c (cff_size_select), src/truetype/ttdriver.c
(tt_size_select): Set the font metrics.
s/index/strike_index/.
The scaled metrics are always preferred over strikes' metrics, even
when some strike is selected.  This is done because the strikes'
metrics are not reliable, e.g., the sign of the descender is wrong for
some fonts.

* src/cff/cffobjs.c (cff_size_request), src/truetype/ttdriver.c
(tt_size_request): Set the font metrics.
Call cff_size_select/tt_size_select when some strike is matched.

* src/bdf/bdfdrivr.c, src/cff/cffobjs.c, src/cid/cidobjs.c,
src/pcf/pcfdrivr.c, src/truetype/ttdriver.c, src/type1/t1objs.c,
src/type1/t1objs.h, src/type42/t42objs.c, src/winfonts/winfnt.c:
Set the font metrics.
s/index/strike_index/.

* src/tools/test_afm.c, src/psaux/psconv.c: Older versions of these
files were committed.  Just a catch-up.
(PS_Conv_ToFixed): Remove the `goto'.
(PS_Conv_ASCIIHexDecode, PS_Conv_EexecDecode): Speed up a little.

* src/sfnt/ttsbit.c (tt_face_load_sbit_strikes,
tt_face_load_strike_metrics), src/sfnt/ttsbit0.c
(tt_face_load_sbit_strikes, tt_face_load_strike_metrics): The
advertised metrics in `available_sizes' are different from those
actually used.
2006-01-23 14:12:40 +00:00
Wu, Chia-I (吳佳一) 108fdbbbd3 * src/psaux/afmparse.c, src/psaux/afmparse.h: New files which
implement an AFM parser.  It is used to parse an AFM file.

* src/psaux/psconv.c, src/psaux/psconv.h: New files to provide
conversion functions (e.g, PS real number => FT_Fixed) for the
PS_Parser and AFM_Parser.  Some of the functions are taken, with some
modifications, from the psobjs.c

* src/psaux/psobjs.c: Use functions from psconv.c.

* include/freetype/internal/psaux.h, src/psaux/psauxmod.c:: Add
`AFM_Parser' to the `psaux' service.

* src/psaux/psaux.c, src/psaux/rules.mk: Include those new files.

* src/tools/test_afm.c: A test program for AFM parser.

* include/freetype/internal/services/svkern.h,
include/freetype/internal/ftserv.h: New service `Kerning'.  It is
currently only used to get the track kerning information.

* src/type1/t1driver.c, src/type1/t1objs.c, src/type1/t1afm.c,
src/type1/t1afm.h: Update to use the AFM parser.
Provide the `Kerning' service.

* include/freetype/freetype.h, src/base/ftobjs.c: New API
`FT_Get_Track_Kerning'.
2006-01-16 15:35:56 +00:00
David Turner e6bb95336a * Jamfile, docs/reference/README: fix it so that "jam refdoc" works
correctly to generate the API reference in 'docs/reference'

	* src/tools/docmaker/tohtml.py: update to output nicer fields lists
	in the API reference

	* src/base/ftobjs.c (FT_Load_Glyph): FT_LOAD_TARGET_LIGHT now
	forces auto-hinting

	* freetype/freetype.h: updating the documentation for
	FT_LOAD_TARGET_XXX and FT_Render_Mode values
2005-12-23 13:32:06 +00:00
David Turner 9fbd2ab884 - various performance enhancements
- fixing apinames.c, adding support for Watcom and Borland compilers
- adding generation of exported symbols list to the build system, including the Unix one !!

sorry Werner, I have no time to document this in ChangeLog at the moment
2005-10-28 16:14:14 +00:00
David Turner 398d64c0cc * src/base/ftdbgmem.c: another realloc memory counting bug fix
* src/tools/Jamfile: adding missing file

  * src/lzw/Jamfile: fixing incorrect source file reference
2005-10-21 10:01:25 +00:00
Werner Lemberg 8e6c56f99e Formatting, CR/LF issues. 2005-10-18 06:09:13 +00:00
David Turner 6c5299e44f * src/tools/apinames.c: adding new tool to extract public API
function names from header files
2005-10-16 08:29:12 +00:00
Werner Lemberg a723526ae7 * include/freetype/freetype.h, include/freetype/ftchapters.h: Add
a preliminary section with some explanations about user allocation.

* src/tools/docmaker/tohtml.py (HtmlFormatter.section_enter):
Don't abort if there are no data types, functions, etc., in a
section.
Print synopsis only if we have a data type, function, etc.

* docs/INSTALL.ANY, docs/INSTALL, docs/INSTALL.UNX, docs/CUSTOMIZE,
docs/INSTALL.GNU, docs/TRUETYPE, docs/DEBUG, docs/UPGRADE.UNX,
docs/VERSION.DLL, docs/formats.txt: Revised, formatted.
2005-08-30 00:22:46 +00:00
Werner Lemberg 1dbcbabf6d Improving comment. 2005-03-11 09:14:21 +00:00
David Turner 465a53243f * src/tools/glnames.py: adding comment explaining the compression
being used for the Adobe Glyph List.
2005-03-10 18:31:49 +00:00
Werner Lemberg 56ef6bc4d6 * src/tools/glnames.py: Formatted.
Format output to be in sync with other FreeType code.
Import `re' and `os.path'.
(StringTable) <__init__>: Add parameter to initialize master table
name.
(StringTable) <dump>: Don't pass master table name.
(StringTable) <dump_sublist>: Emit explanatory comment.
Simplify and make output more human readable.
(t1_bias, glyph_list, adobe_glyph_names): Removed.  Unused.
(main): Use `basename' for file name in header.

* src/psnames/pstables.h: Regenerated.

Other formatting.
2005-03-10 06:28:07 +00:00
David Turner 12e51f1685 * src/tools/glnames.py: rewrote the generator for the 'pstables.h'
header, which contains various constant tables related to glyph
    names. It now uses a different storage scheme that saves about 20
    Kb and closes bug #12262

  * src/psnames/pstables.h: re-generated header file

  * src/psnames/psmodule.c: rewrote some parts to comply with recent
    changes in 'pstables.h'
2005-03-09 17:33:03 +00:00
Werner Lemberg 2c1e57096f * src/tools/docmaker/sources.py (re_source_block_format2) <column>:
Use lookahead assertion to not match `*/'.  This removes spurious
insertions of `/' in the HTML output.
2004-09-08 13:36:39 +00:00
David Turner e664efaddd * src/autofit/*: important fixes to the auto-fitter. The output
now seems to be 100% equivalent to the auto-hinter, while being
        about 2% faster (which proves that script-specific algorithm
        selection isn't a performance problem).

        to test it, change "autohint" to "autofit" in
        <freetype/config/ftmodule.h> and recompile.

        a few more testing is needed before making this the official
        auto-hinting module
2004-06-04 17:41:59 +00:00
Werner Lemberg 6cda9c489d * include/freetype/ftcache.h: Delete duplicated definition of
FTC_FaceID.

* src/cff/cffdrivr.c (cff_get_cmap_info): Call sfnt module's TT CMap
Info service function if the cmap comes from sfnt.  Return 0 if the
cmap is sythesized in cff module.

Formatting; updating copyright.
2004-01-22 09:07:12 +00:00
David Turner 6654763f83 * src/sfnt/ttsbit.c: removed compiler warning
* src/tools/docmaker/*: updating beautifier tool
2004-01-18 14:10:21 +00:00
David Turner fd20da4b75 updating 2004-01-18 09:49:07 +00:00
David Turner 4654d76d39 bug fix 2004-01-16 16:04:38 +00:00
David Turner ee42805e5f * src/tools/docmaker/*: updating the DocMaker tool, adding a new
tool named "docbeauty" to beautify the documentation comments
        (e.g. convert them to a single block border mode)
2004-01-16 14:26:32 +00:00
Werner Lemberg f1c7814718 * src/tools/docmaker/tohtml.py
(chapter_inter, chapter_footer): Add <li> and use special <ul>
class.
(toc_exit): Don't emit </table>.
2003-07-25 22:55:59 +00:00
Werner Lemberg d18e01352c (code_header, code_footer): Don't change font colour directly but
use a special <pre> class.
2003-07-25 22:21:57 +00:00
Werner Lemberg 64f1ba9064 Make reference valid HTML 4.01 transitional.
* src/tools/docmaker/tohtml.py (html_header_1): Add doctype
and charset.
(html_header_2): Fix style elements and add some more.
Fix syntax.
(block_header, block_footer, description_header, description_footer,
marker_header, marker_footer, source_header, source_footer,
chapter_header, chapter_footer): Don't use <center>...</center> but
`align=center' table attribute.
Use double quotes around table widths given in percent.
(keyword_prefix, keyword_suffix): Don't change font colour directly
but use a new <span> class.
(section_synopsis_header, section_synopsis_footer): Don't change
colour.
(print_html_field): <tr> gets the `valign' attribute, not <table>.
(print_html_field_list): Ditto.
(index_exit): Don't use <center>...</center> but `align=center'
table attribute.
(toc_exit, section_enter): Ditto.
(block_enter): Use <h4><a>, not <a><h4>.


This change reimplements fix from 2003-05-30 without breaking
binary compatibility.

* include/freetype/t1tables.h (PS_FontInfoRec): `italic_angle',
`is_fixed_pitch', `underline_position', `underline_thickness' are
reverted to be normal values.

* include/freetype/internal/psaux.h (T1_FieldType): Remove
`T1_FIELD_TYPE_BOOL_P', `T1_FIELD_TYPE_INTEGER_P',
`T1_FIELD_TYPE_FIXED_P', `T1_FIELD_TYPE_FIXED_1000_P'.
(T1_FIELD_TYPE_BOOL_P, T1_FIELD_NUM_P, T1_FIELD_FIXED_P,
T1_FIELD_FIXED_1000_P): Removed.
(T1_FIELD_TYPE_BOOL): Renamed to...
(T1_FIELD_BOOL): New macro.  Updated all callers.

* src/type42/t42parse.c: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness', `paint_type',
`stroke_width' are reverted to be normal values.
(T42_KEYWORD_COUNT): New macro.
(t42_parse_dict): New array `keyword_flags' to mark that a value has
already been assigned to a dictionary entry.
* src/type42/t42objs.c (T42_Face_Init, T42_Face_Done): Updated.

* src/cid/cidtoken.h: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness' are reverted to be
normal values.
* src/cid/cidobjs.c (cid_face_done, cid_face_init): Updated.

* src/psaux/psobjs.c (ps_parser_load_field): Updated.

* src/type1/t1tokens.h: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness', `paint_type',
`stroke_width' are reverted to be normal values.
* src/type1/t1objs.c (T1_Face_Done, T1_Face_Init): Updated.
* src/type1/t1load.c (T1_FIELD_COUNT): New macro.
(parse_dict): Add parameter for keyword flags.
Record only first instance of a field.
(T1_Open_Face): New array `keyword_flags'.
2003-07-25 22:09:53 +00:00
Werner Lemberg f9d864a916 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 5.
* builds/unix/configure.ac (version_info): Set to 10:0:3.
* builds/unix/configure: Updated.
* builds/freetype.mk (refdoc): Fix --title.

* docs/CHANGES, docs/VERSION.DLL, README: Updated.

* src/tools/docmaker/sources.py (re_crossref): Fix regular
expression to handle trailing punctuation characters.
* src/tools/docmaker/tohtml.py (make_html_word): Updated.

* docs/release: New file.
2003-07-25 05:57:21 +00:00
Werner Lemberg acf592e72f New file. 2003-07-09 15:24:09 +00:00
Werner Lemberg 43ba0842af * src/tools/glnames.py: Updated to AGL 2.0.
* src/psnames/pstables.h: Regenerated.


* include/freetype/cache/ftcglyph.h, include/freetype/ttnameid.h,
src/base/ftcalc.c, src/base/fttrigon.c, src/cff/cffgload.c,
src/otlayout/otlgsub.c, src/pshinter/pshrec.c,
src/psnames/psmodule.c, src/sfnt/sfobjs.c, src/truetype/ttdriver.c:
Decorate constants with `U' and `L' if appropriate.

* include/freetype/ftmoderr.h: Updated to include recent module
additions.

* src/pshinter/pshnterr.h (FT_ERR_BASE): Define as
`FT_Mod_Err_PShinter'.
* src/type42/t42error.h (FT_ERR_BASE): Define as
`FT_Mod_Err_Type42'.

* src/pshinter/pshrec.h (PS_HINTS_MAGIC): Removed.  Not used.


* include/freetype/config/ftconfig.h [__MWERKS__]: Define FT_LONG64
and FT_INT64.
2003-06-23 19:26:53 +00:00
David Turner 80171e06dd * src/pfr/pfrsbit.h, src/pfr/pfrsbit.c, src/pfr/pfrload.c,
src/pfr/pfrgload.c, src/pfr/pfrobjs.c, src/pfr/pfrtypes.h,
        Jamfile, src/base/ftobjs.c: adding support for embedded bitmaps to
        the PFR driver, and rewriting its kerning loader / handler to use all
        kerning pairs in a physical font (and not just the first item).

        * src/tools/docmaker/content.py, src/tools/docmaker/sources.py,
        src/tools/docmaker/tohtml.py: fixing a few nasty bugs

        * src/sfnt/ttcmap0.c: the validator for format 4 sub-tables is
        now capable of dealing with invalid "length" fields at the start
        of the sub-table. This allows fonts like "mg______.ttf" (i.e.
        Marriage) to return accurate charmaps.
2002-10-05 14:57:03 +00:00
David Turner 56106fb97d * include/freetype/freetype.h, include/freetype/ftimage.h,
include/freetype/ftstroker.h, include/freetype/ftsysio.h,
        include/freetype/ftsysmem.h, include/freetype/ttnameid.h:
        updating the in-source documentation

        * src/tools/docmaker/tohtml.py: updating the HTML formatter in the
        DocMaker tool

        * src/tools/docmaker.py: removing obsolete file
2002-09-17 22:57:29 +00:00
David Turner b08fe2dc7a * massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
    transformations of the sources:

      - trying to convert all enums and constants to CAPITALIZED_STYLE, with
        #define definitions like

          #define  my_old_constants   MY_NEW_CONSTANT

      - big, big update of the documentation comments

    * include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
    include/freetype/ftimage.h: adding support for LCD-optimized rendering
    though the new constants/enums:

      FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
      FT_PIXEL_MODE_LCD,  FT_PIXEL_MODE_LCD_V

    this is still work in progress, don't expect everything to work correctly
    though most of the features have been implemented.

    * adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
    targets:

      FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
      FT_LOAD_TARGET_MONO   :: monochrome bitmaps
      FT_LOAD_TARGET_LCD    :: horizontal RGB/BGR decimated hinting & rendering
      FT_LOAD_TARGET_LCD_V  :: vertical RGB/BGR decimated hinting & rendering

    note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
    behaviour of the font engine is _unchanged_.
2002-08-27 20:20:29 +00:00
David Turner a8199d608f * src/tools/docmaker/docmaker.py, src/tools/docmaker/utils.py,
src/tools/docmaker/tohtml.py: updating the DocMaker tool
2002-08-21 21:36:26 +00:00
David Turner f52165cc06 * src/tools/docmaker/*: adding new (more advanced) version of
the DocMaker tool. Python with regular expressions rocks..
2002-07-30 18:49:52 +00:00
David Turner 32ee45e09f fixed html quoting in DocMaker 2002-01-07 12:09:51 +00:00
Werner Lemberg c3b2160869 Formatting.
Cleaning up of ChangeLog.

* docs/license.txt: s/X Windows/X Window System/.

* src/raster/ftraster.c: Fix definition condition of MEM_Set().
* src/smooth/ftgrays.c (M_Y): Change value to 192.
* src/base/ftdbgmem.c (ft_mem_table_destroy): Fix printf() parameter.
Remove unused variable.
* src/cache/ftcimage.c (ftc_image_node_init,
ftc_image_node_compare): Remove unused variables.
* src/cache/ftcsbits.c (ftc_sbit_node_weight): Remove unused
variable.
* src/raster/ftraster.c (MEM_Set): Move definition down to avoid
compiler warning.
* src/autohint/ahhint.c (ah_hinter_hint_edges): Use UNUSED() to
avoid compiler warnings.
* src/pcf/pcfread.c (tableNames): Use `const'.
(pcf_read_TOC): Change counter name to avoid compiler warning.
Use `const'.
* src/pshinter/pshrec.c (ps_hints_close): Remove redundant
declaration.
* src/pshinter/pshalgo1.c (psh1_hint_table_init): Rename variables
to avoid shadowing.
* src/pshinter/pshalgo2.c (psh2_hint_table_activate_mask): Ditto.
* src/type1/t1objs.h: Remove double declarations of `T1_Size_Init()'
and `T1_Size_Done()'.
2001-12-05 01:22:05 +00:00
David Turner f373e2d9bc rewrote "glnames.py" to fix a rather nasty bug that made FreeType
return incorrect glyph names for certain glyph indices..
2001-10-18 13:20:01 +00:00
David Turner b4b96260e4 * src/psnames/pstables.h, src/psnames/psmodule.c, src/tools/glnames.py:
fixed a bug in 'glnames.py' that prevented it from generating correct
	glyph names table. This resulted in the unavailability of certain glyphs
	like "Cacute", "cacute" and "lslash" in Unicode charmaps, even if these
	were present in the font (causing problems for Polish users).
2001-10-08 21:18:11 +00:00
Werner Lemberg 415235df1b finishing function header formatting
updating copyrights
2001-06-28 17:49:10 +00:00
David Turner ebe85f59c9 * include/freetype/fttrigon.h, src/base/fttrigon.c, src/base/ftbase.c,
src/base/Jamfile, src/base/rules.mk: adding trigonometric functions
    to the core API (using Cordic algorithms).

    * builds/top_level.mk, builds/newline, builds/detect.mk: fixed problems
    with Make on Windows 2000, as well as problems when "make distclean" is
    invoked on a non-Unix platform when there is no "config.mk" in the
    current directory..

    * builds/freetype.mk: fixed a problem with object deletions under
    Dos/Windows/OS/2 systems

    * src/tools: added new directory to hold tools and test programs
    moved docmaker.py, glnames.py to it..

    * src/tools/docmaker.py: improved the script to add the current date
    at the footer of each web page (useful to distinguish between versions)

    * Jamfile: fixed incorrect HDRMACRO argument.

    * TODO: removed the cubic arc bbox computation note, since it has been
    fixed recently..

    * include/freetype/t1tables.h, include/freetype/config/ftoption.h:
    formatting
2001-05-11 14:25:57 +00:00