Commit Graph

182 Commits

Author SHA1 Message Date
Werner Lemberg 87ddad2007 Update or fix links to use the https protocol instead of http. 2017-12-04 20:43:30 +01:00
Werner Lemberg 8f4851997b [unix] Install a massaged `ftoption.h' file (#51780).
* builds/unix/configure.raw (ftoption_set, ftoption_unset): New
auxiliary functions to construct...
(FTOPTION_H_SED): ... this new variable.
Apply it as a sed argument while copying `ftoption.h' to the
`builds/unix' directory (using `AC_CONFIG_FILES').
Simplify code of test that checks cpp's computation of bit length
(the test previously created an empty `ftoption.h' file and deleted
it immediately afterwards); without this change, it can happen on my
GNU/Linux box that `configure's execution of `config.status' doesn't
create `ftoption.h' (no idea why this happens).

* builds/unix/install.mk (install): Install
`builds/unix/ftoption.h'.

* builds/unix/unix-def.in (DISTCLEAN): Updated.

* builds/unix/.gitignore: Updated.
2017-11-25 11:30:38 +01:00
Ewald Hew dff40d03df Add T1_CONFIG_OPTION_OLD_ENGINE configuration option.
This controls whether the old Type 1 engine gets compiled into FreeType.
It is disabled by default.

* devel/ftoption.h, include/freetype/config/ftoption.h
(T1_CONFIG_OPTION_OLD_ENGINE): New macro.

* include/freetype/internal/psaux.h (PS_Decoder): Remove unused field.
* include/freetype/internal/psaux.h, src/cid/cidgload.c
(cid_load_glyph), src/psaux/psauxmod.c, src/psaux/psobjs.c
(ps_builder_add_point), src/psaux/t1decode.c
(t1_lookup_glyph_by_stdcharcode, t1_decoder_parse_glyph,
t1operator_seac, t1_decoder_parse_charstrings), src/psaux/t1decode.h,
src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Surround
relevant code with macro.
Minor code changes.
2017-10-12 18:32:50 +08:00
Werner Lemberg 91448669a2 Prevent creation of an incorrect documentation entry. 2017-10-08 10:23:47 +02:00
Alexei Podtelezhnikov 74f442394f [build] Fix DLL builds in Visual C++ project.
* build/windows/vc2010/freetype.vcxproj: Use DynamicLibrary in Debug
and Release configurations.
* include/freetype/config/ftconfig.h (FT_EXPORT, FT_EXPORT_DEF)
[_DLL]: Use Visual C++ extensions.
2017-09-19 23:41:27 -04:00
Alexei Podtelezhnikov 410f3799b6 [smooth] Harmony LCD rendering.
This is a new technology for LCD-optimized rendering. It capitalizes
on the fact that each color channel grid is shifted by a third of a
pixel.  Therefore it is logical to render 3 separate monochrome
bitmaps shifting the outline by 1/3 pixel, and then combine them.
Importantly, the resulting output does not require additional LCD
filtering.

* src/smooth/ftsmooth.c (ft_smooth_render_generic)
[!FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Implement new LCD-optimized
rendering.

* include/freetype/ftlcdfil.h, include/freetype/freetype.h,
include/freetype/config/ftoption.h, devel/ftoption.h: Updated
documentation.
2017-08-08 22:29:51 -04:00
Alexei Podtelezhnikov 75cb071b3f [sfnt] Synthesize a Unicode charmap if one is missing.
* src/sfnt/ttcmap.h (tt_cmap_unicode_class_rec): Declare it.
* src/sfnt/ttcmap.c (tt_get_glyph_name, tt_cmap_unicode_init,
tt_cmap_unicode_done, tt_cmap_unicode_char_index,
tt_cmap_unicode_char_next, tt_cmap_unicode_class_rec): Implement
synthetic Unicode charmap class.
(tt_get_cmap_info): Make sure the callback is available.

* src/sfnt/sfobjs.c (sfnt_load_face)
[FT_CONFIG_OPTION_POSTSCRIPT_NAMES]: If Unicode charmap is missing,
synthesize one.

* include/freetype/config/ftoption.h: Document it.
* devel/ftoption.h: Ditto.
2017-06-21 22:52:37 -04:00
Werner Lemberg ba40054c2d [autofit] Remove `slight' auto-hint mode again.
A poll on freetype-devel favoured changes directly applied to
`light'.

* include/freetype/freetype.h (FT_LOAD_TARGET_SLIGHT,
FT_RENDER_MODE_SLIGHT): Removed.

* src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c
(af_latin_hints_init), src/autofit/aflatin2.c
(af_latin2_hints_init): Revert change from 2017-04-22.

* src/autofit/afloader.c (af_loader_load_glyph) Remove references to
FT_RENDER_MODE_SLIGHT.
[AF_CONFIG_OPTION_TT_SIZE_METRICS]: Enable TrueType-like metrics
unconditionally.

* src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Revert change from
2017-04-22.

* src/base/ftobjs.c (FT_Load_Glyph): Revert change from 2017-04-22.

* src/pshinter/pshalgo.c (ps_hints_apply): Revert change from
2017-04-22.

* src/smooth/ftsmooth.c (ft_smooth_render): Revert change from
2017-04-22.

* docs/CHANGES: Updated.
2017-05-02 12:32:19 +02:00
Werner Lemberg 0a5315d141 Introduce AF_CONFIG_OPTION_TT_SIZE_METRICS configuration option.
* include/freetype/config/ftoption.h
(AF_CONFIG_OPTION_TT_SIZE_METRICS): New option, commented out by
default.

* src/autofit/afloader.c (af_loader_load_glyph): Use
AF_CONFIG_OPTION_TT_SIZE_METRICS to guard the corresponding code.
2017-04-27 13:02:24 +02:00
Werner Lemberg e5595784f4 Fix preprocessor warning.
* devel/ftoption.h, include/freetype/config/ftoption.h: Test whether
TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined before checking its
value.
2017-03-17 21:34:08 +01:00
Werner Lemberg 1dc8cc3303 Minor documentation improvements. 2017-02-02 21:51:07 +01:00
Werner Lemberg 7ccca6aec1 [pcf] Disable long family names by default.
* include/freetype/config/ftoption.h
(PCF_CONFIG_OPTION_LONG_FAMILY_NAMES): Comment out.
2017-01-09 19:54:44 +01:00
Werner Lemberg 08fd250e1a [pcf] Make long family names configurable.
The change from 2016-09-29 was too radical (except for people using
the openSuSE GNU/Linux distribution).  To ameliorate the situation,
PCF_CONFIG_OPTION_LONG_FAMILY_NAMES gets introduced which controls
the feature; if set, a new PCF property option
`no-long-family-names' can be used to switch this feature off.

* include/freetype/config/ftoption.h, devel/ftoption.h
(PCF_CONFIG_OPTION_LONG_FAMILY_NAMES): New option.

* include/freetype/ftpcfdrv.h: New header file (only containing
comments currently, used for building the documentation).

* include/freetype/config/ftheader.h (FT_PCF_DRIVER_H): New macro.

* src/pcf/pcf.h (PCF_Driver): Add `no_long_family_names' field.

* src/pcf/pcfdrivr.c: Include FT_SERVICE_PROPERTIES_H and
FT_PCF_DRIVER_H.
(pcf_property_set, pcf_property_get): New functions.
(pcf_service_properties): New service.
(pcf_servives): Updated.
(pcf_driver_init) [PCF_CONFIG_OPTION_LONG_FAMILY_NAMES]: Handle
`no_long_family_names'.

* src/pcf/pcfread.c (pcf_load_font): Handle `no_long_family_names'
and PCF_CONFIG_OPTION_LONG_FAMILY_NAMES.

* docs/CHANGES: Updated.
2017-01-09 11:30:32 +01:00
Werner Lemberg 563ae78022 Update copyright year. 2017-01-04 20:16:34 +01:00
Werner Lemberg 7a13dc008b Some preparations for the next release.
* include/freetype/config/ftoption.h
(TT_CONFIG_OPTION_SUBPIXEL_HINTING): Enable.

* docs/CHANGES: Updated.
2016-09-02 08:24:01 +02:00
Werner Lemberg a6ee6fe67b s/PIC/FT_CONFIG_OPTION_PIC/ to avoid confusion. 2016-08-28 18:51:50 +02:00
Werner Lemberg 516283130c Clarify usage of FT_CONFIG_OPTION_PIC. 2016-08-28 12:38:25 +02:00
Werner Lemberg 3ec64654c4 Explain how to build a PIC-enabled version of FreeType. 2016-08-28 11:02:00 +02:00
Werner Lemberg 17fa9f714f Merge branch '2.6.5'. 2016-07-12 08:06:23 +02:00
Werner Lemberg f9b1871ded * Version 2.6.5 released.
=========================

Tag sources with `VER-2-6-5'.

* include/freetype/config/ftoption.h
(TT_CONFIG_OPTION_SUBPIXEL_HINTING): Comment out.

* docs/VERSION.TXT: Add entry for version 2.6.5.

* README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
builds/windows/vc2005/index.html,
builds/windows/vc2008/freetype.vcproj,
builds/windows/vc2008/index.html,
builds/windows/vc2010/freetype.vcxproj,
builds/windows/vc2010/index.html,
builds/windows/visualc/freetype.dsp,
builds/windows/visualc/freetype.vcproj,
builds/windows/visualc/index.html,
builds/windows/visualce/freetype.dsp,
builds/windows/visualce/freetype.vcproj,
builds/windows/visualce/index.html,
builds/wince/vc2005-ce/freetype.vcproj,
builds/wince/vc2005-ce/index.html,
builds/wince/vc2008-ce/freetype.vcproj,
builds/wince/vc2008-ce/index.html: s/2.6.4/2.6.5/, s/264/265/.

* include/freetype/freetype.h (FREETYPE_PATCH): Set to 5.

* builds/unix/configure.raw (version_info): Set to 18:5:12.
* CMakeLists.txt (VERSION_PATCH): Set to 5.

* docs/CHANGES: Updated.
2016-07-12 06:18:49 +02:00
Werner Lemberg 84d3df7501 Implement handling of `FREETYPE_PROPERTIES' environment variable.
Recognizing properties follows in another commit.

* devel/ftoption.h, include/freetype/config/ftoption.h
(FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES): New macro.

* include/freetype/config/ftstdlib.h (ft_getenv): New macro.

* src/base/ftinit.c (ft_set_default_properties): New function to
parse `FREETYPE_PROPERTIES' and calling `ft_property_string_set'.
(FT_Init_FreeType): Updated.
2016-07-11 00:12:11 +02:00
Alexei Podtelezhnikov 2a4c823f89 Parentheses. 2016-05-20 22:04:01 -04:00
Nikolaus Waxweiler 596157365a [truetype] New implementation of v38 bytecode interpreter [1/3].
This patch prepares data structures and the like.

See added comments in `ttinterp.h' for more information on this and
the following commits in the series.

* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_OPTION_SUBPIXEL_HINTING): Assign values to differentiate
between subpixel versions.
(TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY,
TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL): New macros.

* include/freetype/ftttdrv.h (TT_INTERPRETER_VERSION_40): New macro.

* include/freetype/internal/tttypes.h (TT_FaceRec): Updated.

* src/truetype/ttinterp.h (TT_ExecContextRec): Define new fields
`subpixel_hinting_lean', `vertical_lcd_lean',
`backwards_compatibility', `iupx_called', iupy_called', and
`grayscale_cleartype' for new hinting mode.

* src/truetype/ttdriver.c (tt_property_set): Handle v38 and v40
interpreters conditionally.

* src/truetype/ttgload.c (TT_Hint_Glyph): Save phantom points unless
in v38 backwards compatibility mode.
Updated.
(compute_glyph_metrics): Add v38 backwards compatibility mode
constraint for adjusting advance widths.
Updated.
(tt_loader_init): Handle new flags `subpixel_hinting_lean',
`grayscale_cleartype', and `vertical_lcd_lean'.
Updated.
(tt_get_metrics, TT_Process_Simple_Glyph, TT_LOADER_SET_PP):
Updated.

* src/truetype/ttobjs.c (tt_driver_init): Conditionally set
default interpreter version number.

* src/truetype/ttsubpix.c, src/truetype/ttsubpix.h: Updated.
2016-05-18 06:57:59 +02:00
Nikolaus Waxweiler 1d8d0b4ef9 Remove unpatented hinter (3/3).
* include/freetype/config/ftoption.h
(TT_CONFIG_OPTION_UNPATENTED_HINTING): Remove.

* include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Remove
`ignore_unpatented_hinter' field.
Update users.
(FT_DEBUG_HOOK_UNPATENTED_HINTING): Remove.
Update users.

* include/freetype/internal/tttypes.h (TT_FaceRec): Remove
`unpatented_hinting' field.
Update users.

* src/base/ftpatent.c (_tt_check_patents_in_range,
_tt_check_patents_in_table, _tt_face_check_patents): Remove.
(FT_Face_CheckTrueTypePatents, FT_Face_SetUnpatentedHinting):
Replace code with dummies.

* src/truetype/ttobjs.c (tt_face_init): Remove now defunct code.
* src/truetype/ttobjs.h (TT_GraphicsState): Remove `both_x_axis'
field.
2016-01-28 14:11:14 +01:00
Werner Lemberg 9adeab6452 Update copyright year. 2016-01-13 11:54:10 +01:00
Werner Lemberg 37412ff9f4 Don't use macro names that contain `__' [1/2].
Such macro names are reserved for both C and C++.

*/*: Replace macros of the form `__XXX_H__' with `XXX_H_'.
2016-01-12 21:37:13 +01:00
Werner Lemberg 14213b5409 [truetype] Improve TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46223).
* devel/ftoption.h, include/freetype/config/ftoption.h: Surround it
with #ifndef ... #endif, as suggested in the tracker issue.
2015-10-18 18:15:04 +02:00
Werner Lemberg 24a1fcdfce [truetype] Add TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46208).
* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES): New configuration macro.

* src/truetype/ttinterp.c (MAX_RUNNABLE_OPCODES): Removed.
(TT_RunIns): Updated.
2015-10-15 21:50:15 +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 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 fe4f571f99 * Version 2.5.0.1 released.
===========================

Tag sources with `VER-2-5-0-1'.

* include/freetype/config/ftoption.h: Undefine
CFF_CONFIG_OPTION_OLD_ENGINE.
* devel/ftoption.h: Define CFF_CONFIG_OPTION_OLD_ENGINE.
2013-06-19 23:27:47 +02:00
Werner Lemberg 2429dc3d7c Add CFF_CONFIG_OPTION_OLD_ENGINE configuration option.
This controls whether the old FreeType CFF engine gets compiled into
FreeType.  It is now disabled by default.

* devel/ftoption.h, include/freetype/config/ftoption.h
(CFF_CONFIG_OPTION_OLD_ENGINE): New macro.

* src/cff/cffdrivr.c (cff_property_set), src/cff/cffgload.c
(CFF_Operator, cff_argument_counts, cff_builder_add_point,
cff_operator_seac, cff_decoder_parse_charstrings, cff_slot_load),
src/cff/cffgload.h, src/cff/cffobjs.c (cff_driver_init): Use
CFF_CONFIG_OPTION_OLD_ENGINE to guard the affected code.

* docs/CHANGES: Updated.
2013-06-03 12:41:58 +02:00
Behdad Esfahbod 760d342d37 Add support for color embedded bitmaps (eg. color emoji).
A new load flag, FT_LOAD_COLOR, makes FreeType load color
embedded-bitmaps, following this draft specification

  https://color-emoji.googlecode.com/git/specification/v1.html

which defines two new SFNT tables, `CBDT' and `CBLC' (named and
modeled after `EBDT' and `EBLC', respectively).  The color bitmaps
are stored in the new FT_PIXEL_MODE_BGRA format to represent BGRA
pre-multiplied sRGB images.  If PNG support is available, PNG color
images as defined in the same proposed specification are supported
also.

Note that color bitmaps are converted to grayscale if client didn't
ask for color.

* builds/unix/configure.raw: Search for libpng.
Add `--without-png' option.

* devel/ftoption.h, include/freetype/config/ftoption.h
(FT_CONFIG_OPTION_USE_PNG): New macro.

* include/freetype/freetype.h (FT_LOAD_COLOR): New load flag.

* include/freetype/ftimage.h (FT_Pixel_Mode): Add
`FT_PIXEL_MODE_BGRA'.

* include/freetype/tttags.h (TTAG_CBDT, TTAG_CBLC): New tags.

* src/base/ftbitmap.c (FT_Bitmap_Embolden): Updated.
(ft_gray_for_premultiplied_srgb_bgra): New function.
(FT_Bitmap_Convert): Handle FT_PIXEL_MODE_BGRA.

* src/sfnt/pngshim.c, src/sfnt/pngshim.h: New files.

* src/sfnt/sfnt.c: Include `pngshim.c'.

* src/sfnt/ttsbit.c: Include FT_BITMAP_H and `pngshim.h'
(tt_face_load_eblc): Load `CBLC'.
(tt_sbit_decoder_init): Load `CBDT'.
(tt_sbit_decoder_alloc_bitmap): Pass load flags to select between
color and grayscale bitmaps.
Set `num_grays'.  This is used by `ftview' to choose the blending
algorithm.
(tt_sbit_decoder_load_byte_aligned,
tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_compound,
tt_sbit_decoder_load_image): Pass load flag.
s/write/pwrite/.
Don't call `tt_sbit_decoder_alloc_bitmap'.
Updated.
(tt_sbit_decoder_load_png) [FT_CONFIG_OPTION_USE_PNG]: New function.
(tt_sbit_decoder_load_bitmap): Pass load flag.
Handle new glyph formats 17, 18, and 19.
Call `tt_sbit_decoder_alloc_bitmap'.
Flatten color bitmaps if necessary.
(tt_face_load_sbit_image): Updated.

* src/sfnt/rules.mk (SFNT_DRV_SRC): Add `pngshim.c'.

* docs/CHANGES: Updated.
2013-05-29 11:36:18 +02:00
Werner Lemberg f6aa089f12 */* [FT_CONFIG_OPTION_OLD_INTERNALS]: Remove macro and guarded code. 2013-05-10 07:58:47 +02:00
Werner Lemberg 7190098098 Minor. 2013-01-16 20:08:35 +01:00
Werner Lemberg e4ecce3bfe Disable FT_CONFIG_OPTION_OLD_INTERNALS.
After the next release we are going to remove the code completely.

* devel/ftoption.h, include/freetype/config/ftoption.h
(FT_CONFIG_OPTION_OLD_INTERNALS): Comment out.
* docs/CHANGES: Document it.
2013-01-11 09:02:22 +01:00
Infinality 79e36baebb [truetype] Support subpixel hinting.
This is the large, famous `Infinality' patch to support ClearType
bytecode which has been available from
http://www.infinality.net/blog/ for some time, and which has been
refined over the last years.  While still experimental, it is now
mature enough to be included directly into FreeType.

Most of the code is based on the ClearType whitepaper written by
Greg Hitchcock

  http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx

which gives a detailed overview of the necessary changes to the
Microsoft rasterizer so that older fonts are supported.  However, a
lot of details are still missing, and this patches provides a
framework to easily handle rendering issues down to the glyph level
of certain fonts.

Note that ClearType support is not completely implemented!  In
particular, full support for the options `compatible_widths',
`symmetrical_smoothing, and `bgr' (via the GETINFO bytecode
instruction) is missing.

* src/truetype/ttsubpix.c: New file, providing code to handle
`tweaks', this is, rules for certain glyphs in certain fonts
(including wildcards) which need a special treatment.

* src/truetype/ttsubpix.h: New file, holding the tweaking rules.

* include/freetype/config/ftoption.h, src/devel/ftoption.h
(TT_CONFIG_OPTION_SUBPIXEL_HINTING): New macro.

* include/freetype/internal/ftobjs.h (FT_PIX_FLOOR_GRID,
FT_PIX_ROUND_GRID, FT_PIX_CEIL_GRID): New macros.

* src/truetype/truetype.c [TT_USE_BYTECODE_INTERPRETER]: Include
`ttsubpix.c'.

* src/truetype/ttgload.c: Include `ttsubpix.h'.
[All changes below are guarded by TT_CONFIG_OPTION_SUBPIXEL_HINTING.]

(tt_get_metrics): Set tweak flags.
(TT_Hint_Glyph): Call `FT_Outline_EmboldenXY' if necessary.
(TT_Process_Simple_Glyph): Compensate emboldening if necessary.
(compute_glyph_metrics): Handle `compatible widths' option.
(tt_loader_init): Handle ClearType GETINFO information bits.

* src/truetype/rules.mk (TT_DRC_SRC): Updated.

* src/truetype/ttinterp.c: Include `ttsubpix.h'.
[Where necessary, changes below are guarded by
TT_CONFIG_OPTION_SUBPIXEL_HINTING.]

(Direct_Move, Direct_Move_X): Extended.
(Round_None, Round_To_Grid, Round_To_Half_Grid, Round_Down_To_Grid,
Round_Up_To_Grid, Round_To_Double_Grid, Round_Super, Round_Super_45,
SetSuperRound): Add parameter to handle the number of grid lines per
pixel.
(SET_SuperRound, ROUND_None, CUR_Func_round): Updated.
(DO_SROUND, DOS45ROUND, DO_ODD, DO_EVEN): Updated.
(DO_ROUND, DO_NROUND): Updated.
(DO_RS): Take care of `Typeman' bytecode patterns.
(Ins_FDEF): Add some debugging code.  Commented out.
(Ins_ENDF): Restore state.
(Ins_CALL, Ins_LOOPCALL): Handle inline delta functions.
(Ins_MD): Handle `Vacuform' rounds.
(Move_Zp2_Point, Ins_SHPIX, Ins_MSIRP, Ins_MDAP, Ins_MIAP,
Ins_MDRP, Ins_MIRP): Handle tweaks.
(Ins_ALIGNRP): Add tweak guard.
(Ins_IUP, Ins_DELTAP): Handle tweaks.
(Ins_GETINFO): Handle new ClearType bits.
(TT_RunIns): Handle tweaks.

* src/truetype/ttinterp.h: Updated.
(SPH_TweakRule, SPH_ScaleRule): New structures for tweaks.
(TT_ExecContextRec): Add members for subpixel hinting support.

* src/truetype/ttobjs.h (TT_DefRecord): Add `inline_delta' member.
2012-06-18 10:36:06 +02:00
Werner Lemberg f1ec084292 s/maximal/maximum/ everywhere, s/minimal/minimum/ where appropriate. 2012-03-11 13:48:25 +01:00
Chris Morgan 3abf617b5e Add FT_CONFIG_OPTION_DISABLE_STREAM_SUPPORT.
Useful for embedded systems which don't need file stream support.

* src/base/ftsystem.c, src/base/ftobjs.c (FT_Stream_New): Implement
it.
2011-07-20 06:48:08 +02:00
Werner Lemberg f3e2a97d5b Fix URLs. 2011-06-14 08:32:13 +02:00
Werner Lemberg d503b1bce2 Integrate autofitter debugging stuff.
* devel/ftoption.h, include/freetype/config/ftoption.h
(FT_DEBUG_AUTOFIT): New macro.

* include/freetype/internal/fttrace.h: Add trace components for
autofitter.

* src/autofit/aftypes.h (AF_LOG): Removed.
(_af_debug): Removed.

* src/autofit/*: s/AF_DEBUG/FT_DEBUG_AUTOFIT/.
s/AF_LOG/FT_TRACE5/.
Define FT_COMPONENT where necessary.
2011-04-18 19:05:28 +02:00
Werner Lemberg 576fc2c06e Add AF_CONFIG_OPTION_USE_WARPER to control the autofit warper.
* devel/ftoption.h, include/freetype/config/ftoption.h
(AF_CONFIG_OPTION_USE_WARPER): New macro.
* src/autofit/aftypes.h (AF_USE_WARPER): Remove.

* src/autofit/*: s/AF_USE_WARPER/AF_CONFIG_OPTION_USE_WARPER/.

* src/autofit/afwarp.c [!AF_CONFIG_OPTION_USE_WARPER]: Replace dummy
variable assignment with a typedef.
2011-03-02 03:52:36 +01:00
Joel Klinghed ed913c2151 Add bzip2 compression support to handle *.pcf.bz2 files.
* builds/unix/configure.raw: Test for libbz2 library.

* devel/ftoption.h, include/freetype/config/ftoption.h
(FT_CONFIG_OPTION_USE_BZIP2): Define.
* include/freetype/config/ftheader.h (FT_BZIP2_H): Define.

* include/freetype/ftbzip2.h: New file.

* src/bzip2/*: New files.

* src/pcf/pcf.h: s/gzip_/comp_/.
* src/pcf/pcfdrvr.c: Include FT_BZIP2_H.
s/gzip_/comp_/.
(PCF_Face_Init): Handle bzip2 compressed files.

* docs/formats.txt, modules.cfg: Updated.
2010-12-31 16:59:33 +01:00
suzuki toshiya 0ae3271814 Restrict the number of the charmaps in a rogue-compatible mode.
Fix for Savannah bug #30059.

* src/cache/ftccmap.c (FTC_CMapCache_Lookup): Replace `16' the
minimum character code passed by a legacy rogue client by...
* include/freetype/config/ftoption.h (FT_MAX_CHARMAP_CACHEABLE):
This.  It is undefined when FT_CONFIG_OPTION_OLD_INTERNALS is
undefined (thus the rogue client compatibility is not required).

* src/cff/cffobjs.c (cff_face_init): Abort the automatic
selection or synthesis of Unicode cmap subtable when the charmap
index exceeds FT_MAX_CHARMAP_CACHEABLE.
* src/sfnt/ttcmap.c (tt_face_build_cmaps): Issue error message
when the charmap index exceeds FT_MAX_CHARMAP_CACHEABLE.

* src/base/ftobjs.c (find_unicode_charmap): When Unicode charmap
is found after FT_MAX_CHARMAP_CACHEABLE, ignore it and search
earlier one.
(find_variant_selector_charmap): When UVS charmap is found after
FT_MAX_CHARMAP_CACHEABLE, ignore it and search earlier one.
(FT_Select_Charmap): When a charmap matching with requested
encoding but after FT_MAX_CHARMAP_CACHEABLE, ignore and search
earlier one.
(FT_Set_Charmap): When a charmap matching with requested
charmap but after FT_MAX_CHARMAP_CACHEABLE, ignore and search
earlier one.
(FT_Get_Charmap_Index): When a requested charmap is found
after FT_MAX_CHARMAP_CACHEABLE, return the inverted charmap
index.
2010-07-05 09:59:03 +09:00
Werner Lemberg 6bbbbc1523 TrueType hinting is no longer patented.
* include/freetype/config/ftoption.h, devel/ftoption.h
(TT_CONFIG_OPTION_BYTECODE_INTERPRETER): Define.
(TT_CONFIG_OPTION_UNPATENTED_HINTING): Undefine.

* docs/CHANGES, docs/INSTALL, include/freetype/freetype.h: Updated.
* docs/TRUETYPE, docs/PATENTS: Removed.
2010-07-04 07:37:56 +02:00
Werner Lemberg db9a41e81b * devel/ftoption.h [FT_CONFIG_OPTION_PIC]: Define.
Other minor documentation fixes.
2010-02-09 15:43:24 +01:00
Ken Sharp f19e46f3ba Fix Savannah bug #28678.
* src/cff/cffgload.c (cff_slot_load), src/cid/cidgload.c
(cid_load_glyph): Handle vertical metrics correctly.

* src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Handle
vertical metrics correctly.
(T1_Load_Glyph): Don't synthesize vertical metrics.
2010-01-27 10:04:50 +01:00
Ralph Giles bc0082d512 Improve the comment describing the FT_CONFIG_OPTION_INCREMENTAL option. 2010-01-05 19:41:22 +01:00
Ralph Giles e383729536 Enable the incremental font interface by default.
Ghostscript requires the incremental font interface for handling
some Postscript documents.  It is moving to using FreeType as its
primary renderer; supporting this in the default build makes it
Ghostscript to be linked against the system FreeType when one is
available.

* include/freetype/config/ftoption.h (FT_CONFIG_OPTION_INCREMENTAL):
Uncomment.
2010-01-05 19:36:58 +01:00
Oran Agra 636c294bef Position Independent Code (PIC) support and infrastructure in base.
* include/freetype/config/ftoption.h add FT_CONFIG_OPTION_PIC
* include/freetype/internal/ftobjs.h Add pic_container member to
FT_LibraryRec.
Add macros to declare and init instances of FT_CMap_ClassRec.
Add macros to init instances of FT_Outline_Funcs and FT_Raster_Funcs.
Add macros to declare, allocate and initialize modules
(FT_Module_Class).
Add macros to declare, allocate and initialize renderers
(FT_Renderer_Class).
Add macro to init instances of FT_Glyph_Class.
Add macros to declare, allocate and initialize drivers
(FT_Driver_ClassRec).
* include/freetype/internal/ftpic.h new file to declare the
FT_PIC_Container struct and the functions to allocate and detroy it.
* include/freetype/internal/ftserv.h add macros to allocate and
destory arrays of FT_ServiceDescRec.
* include/freetype/internal/internal.h define macro to include
ftpic.h.

New Files:
* src/base/ftpic.c implement functions to allocate and destory the
global pic_container.
* src/base/basepic.h declare struct to hold PIC globals for base and
macros to access them.
* src/base/basepic.c implement functions to allocate, destroy and
initialize PIC globals for base.

* src/base/ftinit.c when FT_CONFIG_OPTION_PIC is defined implement
functions that allocate and destroy ft_default_modules according to
FT_CONFIG_MODULES_H in the pic_container instead of the global scope
and use macro from basepic.h to access it.
* src/base/ftobjs.c add calls to the functions that allocate and
destroy the global pic_container when the library is created and
destroyed.

* src/base/jamfile add new files to FT2_MULTI build:
ftpic.c and basepic.c.
* src/base/ftbase.c add new files to build:
ftpic.c and basepic.c.

* src/base/ftglyph.c when FT_CONFIG_OPTION_PIC is defined
ft_bitmap_glyph_class and ft_outline_glyph_class will be allocated
in the pic_container instead of the global scope and use macros from
basepic.h to access them.
* src/base/ftbbox.c allocate bbox_interface stract on the stack
instead of the global scope when FT_CONFIG_OPTION_PIC is defined.
* src/base/ftstroke.c access ft_outline_glyph_class allocated in
ftglyph.c via macros from basepic.h
2009-04-05 17:59:26 +03:00