summaryrefslogtreecommitdiff
path: root/include/freetype/internal/ftobjs.h
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2017-04-22 13:27:21 +0200
committerWerner Lemberg <wl@gnu.org>2017-04-26 11:39:53 +0200
commit5aa6716a5eb8409f606886b5d4e63476d85a3519 (patch)
tree9e802a4bd0e221dceb162c98fc7c0a02413fa8d3 /include/freetype/internal/ftobjs.h
parent69da54cacc0056a40fc7f88278c4c60fd35e7bb9 (diff)
downloadfreetype2-5aa6716a5eb8409f606886b5d4e63476d85a3519.tar.gz
Add new `slight' auto-hinting mode.
This mode uses fractional advance widths and doesn't scale glyphs horizontally, only applying vertical scaling and hinting. At the same time, the behaviour of the `light' auto-hinter gets restored for backwards compatibility: Both vertical and horizontal scaling is again based on rounded metrics values (this was changed in a commit from 2017-03-30 as a side effect). To be more precise, the behaviour is restored for TrueType fonts only; for other font formats like Type 1, this is a new feature of the `light' hinting mode. * include/freetype/freetype.h (FT_LOAD_TARGET_SLIGHT): New macro. (FT_RENDER_MODE_SLIGHT): New render mode. * include/freetype/internal/ftobjs.h (FT_Size_InternalRec): Add `autohint_mode' and `autohint_metrics' fields. * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c (af_latin_hints_init), src/autofit/aflatin2 (af_latin2_hints_init): Updated. * src/autofit/afloader.c (af_loader_embolden_glyph_in_slot): Use `autohint_metrics'. (af_loader_load_glyph): s/internal/slot_internal/. Initialize `autohint_metrics' and `autohint_mode' depending on current auto-hint mode. Use `autohint_metrics'. Updated. * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Updated. * src/base/ftobjs.c (FT_Load_Glyph): Updated. (FT_New_Size): Allocate `internal' object. * src/pshinter/pshalgo.c (ps_hints_apply): Updated. * src/smooth/ftsmooth.c (ft_smooth_render): Updated.
Diffstat (limited to 'include/freetype/internal/ftobjs.h')
-rw-r--r--include/freetype/internal/ftobjs.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/freetype/internal/ftobjs.h b/include/freetype/internal/ftobjs.h
index c8526e6fd..558409166 100644
--- a/include/freetype/internal/ftobjs.h
+++ b/include/freetype/internal/ftobjs.h
@@ -443,7 +443,11 @@ FT_BEGIN_HEADER
/* object. */
/* */
/* <Fields> */
- /* module_data :: Data specific to a driver module. */
+ /* module_data :: Data specific to a driver module. */
+ /* */
+ /* autohint_mode :: The used auto-hinting mode. */
+ /* */
+ /* autohint_metrics :: Metrics used by the auto-hinter. */
/* */
/*************************************************************************/
@@ -451,6 +455,9 @@ FT_BEGIN_HEADER
{
void* module_data;
+ FT_Render_Mode autohint_mode;
+ FT_Size_Metrics autohint_metrics;
+
} FT_Size_InternalRec;