[truetype] Fix positioning of composite glyphs.
Problem reported by Nigel Tao <nigeltao@golang.org>.

* src/truetype/ttgload.c (TT_Hint_Glyph): Remove code that shifts
the glyph (component) by a fractional value computed from the LSB
phantom point.  This is wrong, since the horizontal phantom points
get rounded horizontally later on.
Formatting.
[truetype] Fix scaling of vertical phantom points.

* src/truetype/ttgload.c (load_truetype_glyph): Scale pp3.x and
pp4.x also.
[autofit] s/AF_SCRIPT_NONE/AF_SCRIPT_UNASSIGNED/.
[autofit] s/DFLT/NONE/, s/dflt/none/.
[documentation] Add section how to include FreeType header files.
Problem reported by David Kastrup <dak@gnu.org>.

Surprisingly, a description how to do that was completely missing in
the API reference.

* include/freetype.h, include/ftchapters.h: New documentation
section `header_inclusion'.
[truetype] Simplify logic of rendering modes.

This patch unifies the subpixel and non-subpixel cases.

* src/truetype/ttinterp.h (TT_ExecContextRec): Remove
`grayscale_hinting'; all code should refer to `grayscale' instead.
Remove unused `native_hinting' member.
Rename `subpixel_hinting' member to `subpixel.

* src/truetype/ttgload.c (TT_LOADER_SET_PP): Updated.
(tt_loader_init): Updated.

* src/truetype/ttinterp.c (Ins_GETINFO): Simplify.
Updated.
[autofit] s/AF_Script_/AF_WritingSystem_/ where appropriate.
[autofit] s/glyph_scripts/glyph_styles/.

This is the first commit of a series to create a new top-level
structure (a `style') for handling scripts, writing_systems, and
soon-to-be-added coverages.
[autofit] s/gscripts/gstyles/.
[autofit] s/script_{metrics,hints}/style_{metrics,hints}/
[autofit] s/ScriptMetrics/StyleMetrics/.
[autofit] Minor.
[autofit] More code orthogonality.

* src/autofit/aftypes.h (AF_StyleMetrics): Replace `script_class'
pointer to an `AF_ScriptClass' structure with `script' index of type
`AF_Script'.
Move some code around.

* src/autofit/afcjk.c: Include `afpic.h'.
(af_cjk_metrics_init_widths, af_cjk_metrics_init_blues,
af_cjk_hint_edges): Updated.

* src/autofit/aflatin.c: Include `afpic.h'.
(af_latin_metrics_init_widths, af_latin_metrics_init_blues,
af_latin_metrics_scale_dim, af_latin_hint_edges): Updated.

* src/autofit/afglobal.c (af_face_globals_get_metrics): Updated.

* src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph):
Updated.
[autofit] Minor.
[autofit] Factor scripts and uniranges out of writing system files.

* src/autofit/afranges.c, src/autofit/afranges.h: New files.

* src/autofit/afscript.h: Extend `SCRIPT' macro with more
parameters, taking data from the writing system files.

* src/autofit/aftypes.h: Updated.

* src/autofit/afglobal.c: Include `afranges.h'.
Load `afscript.h' to call AF_DEFINE_SCRIPT_CLASS.
* src/autofit/afglobal.c: Include `afranges.h'.
Load `afscript.h' to call AF_DECLARE_SCRIPT_CLASS.

* src/autofit/afcjk.c, src/autofit/afcjk.h: Updated.
* src/autofit/afdummy.c, src/autofit/afdummy.h: Updated.
* src/autofit/afindic.c, src/autofit/afindic.h: Updated.
* src/autofit/aflatin.c, src/autofit/aflatin.h: Updated.
* src/autofit/aflatn2.c, src/autofit/aflatn2.h: Updated.

* src/autofit/afpic.c: Updated.

* src/autofir/autofit.c: Include `afranges.c'.
* src/autofit/rules.mk (AUTOF_DRV_SRC): Add `afranges.c'.
[autofit] Introduce `styles'.

This is the new top-level structure for handling glyph input data;
scripts are now defined separately.

* src/autofit/aftypes.h (SCRIPT): Updated.
(AF_ScriptClassRec): Move `blue_stringset' and `writing_system'
members to ...
(AF_Style_ClassRec): ... this new structure.
(AF_Style): New enumeration.
(AF_StyleMetricsRec): Replace `script' enumeration with
`style_class' pointer.
(AF_DEFINE_SCRIPT_CLASS, AF_DECLARE_SCRIPT_CLASS): Updated.
(AF_DEFINE_STYLE_CLASS, AF_DECLARE_STYLE_CLASS): New macros.

* src/autofit/afstyles.h: New file, using data from `afscript.h'.
* src/autofit/afscript.h: Updated.

* src/autofit/afcjk.c (af_cjk_metrics_init_widths,
af_cjk_metrics_init_blues, af_cjk_hint_edges): Updated.

* src/autofit/afglobal.c (SCRIPT): Updated.
(STYLE): Redefine macro to load `afstyles.h'.
(af_script_names) [FT_DEBUG_LEVEL_TRACE]: Replace with...
(af_style_names): ... this array.
(af_face_globals_compute_script_coverage): Renamed to...
(af_face_globals_compute_style_coverage): ... this.
Updated.
(af_face_globals_new, af_face_globals_free,
af_face_globals_get_metrics): Updated.

* src/autofit/afglobal.h (SCRIPT): Updated.
(STYLE): Redefine macro to load `afstyles.h'.
(AF_SCRIPT_FALLBACK): Update definition.  This will get more
refinements with later on.
(AF_SCRIPT_UNASSIGNED): Replace with...
(AF_STYLE_UNASSIGNED): ... this macro.
(AF_FaceGlobalsRec): Updated.

* src/autofit/aflatin.c (af_latin_metrics_init_widths,
af_latin_metrics_init_blues, af_latin_metrics_scale_dim,
af_latin_hint_edges): Updated.

* src/autofit/aflatin2.c (af_latin2_metrics_init_widths): Updated.
(af_ltn2_uniranges): Removed.

* src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph):
Updated.

* src/autofit/afpic.c (autofit_module_class_pic_init): Updated.
* src/autofit/afpic.h (AF_STYLE_CLASSES_GET): New macro.
(AFModulePIC): Add `af_style_classes' and `af_style_classes_rec'
members.

* src/autofit/afranges.h: Updated.

* src/autofit/rules.mk (AUTOF_DRV_H): Add `afstyles.h'.
[autofit] Fix PIC compilation.

* src/autofit/afcjk.c (af_cjk_metrics_init_widths),
src/autofit/aflatin.c (af_latin_metrics_init_widths)
[FT_CONFIG_OPTION_PIC]: Declare `globals'.

* src/autofit/afglobal.c: Always call AF_DEFINE_SCRIPT_CLASS, and
AF_DEFINE_STYLE_CLASS.

* src/autofit/afpic.c: Include `afglobal.h'.
(autofit_module_class_pic_init): Typo.

* src/autofit/aftypes.h (AF_DEFINE_SCRIPT_CLASS,
AF_DEFINE_STYLE_CLASS): Don't use the same identifier for macro
parameter and structure member.
[base] Add missing dependencies to Makefile.

* src/base/rules.mk (BASE_SRC): Add `basepic.c' and `ftpic.c'.
(BASE_H): Add `basepic.h'.
Fix PIC linking.

* include/internal/ftrfork.h (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Fix
generated function name.

* src/base/basepic.c (FT_Init_Table_raccess_guess_table): Rename
to ...
(FT_Init_Table_ft_raccess_guess_table): ... this so that the
function name correctly corresponds to what the macro framework
expects.

* src/psnames/rules.mk (PSNAMES_DRV_SRC_S): Use correct file name so
that PIC functions are compiled also.