diff options
author | Victoria Lease <violets@google.com> | 2013-12-12 09:12:18 -0800 |
---|---|---|
committer | Victoria Lease <violets@google.com> | 2013-12-12 09:23:45 -0800 |
commit | ec0bab5697bb31ba980810145f62e3799946ec60 (patch) | |
tree | baa7eea792c50b86250831c67a9f2a6eb5be6a91 /src/autofit/afcjk.h | |
parent | 899c67b6cfcd2010784fbf08c5415af16c526e0c (diff) | |
download | android_external_freetype-ec0bab5697bb31ba980810145f62e3799946ec60.tar.gz android_external_freetype-ec0bab5697bb31ba980810145f62e3799946ec60.tar.bz2 android_external_freetype-ec0bab5697bb31ba980810145f62e3799946ec60.zip |
Update freetype to 8bb09b0fe4d9747bcf452a777cabed7d7ef435e2
Integrated patches from freetype2 git repository, up to hashval
8bb09b0fe4d9747bcf452a777cabed7d7ef435e2, which is post-2.5.2.
Most recent commit message from freetype git:
[truetype] Simplify logic of rendering modes.
Noteworthy patches included:
[sfnt] Fix handling of embedded bitmap strikes.
[truetype] Improve handling of buggy embedded bitmap strikes.
Add FT_FACE_FLAG_COLOR and FT_HAS_COLOR.
Change-Id: I4a22d96c9443c7a587475ca0a9c684843e144b18
Diffstat (limited to 'src/autofit/afcjk.h')
-rw-r--r-- | src/autofit/afcjk.h | 59 |
1 files changed, 34 insertions, 25 deletions
diff --git a/src/autofit/afcjk.h b/src/autofit/afcjk.h index ab816f2..6f5bdc5 100644 --- a/src/autofit/afcjk.h +++ b/src/autofit/afcjk.h @@ -4,7 +4,7 @@ /* */ /* Auto-fitter hinting routines for CJK script (specification). */ /* */ -/* Copyright 2006, 2007, 2011, 2012 by */ +/* Copyright 2006, 2007, 2011-2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -26,39 +26,48 @@ FT_BEGIN_HEADER - /* the CJK-specific script class */ + /* the CJK-specific writing system */ - AF_DECLARE_SCRIPT_CLASS( af_cjk_script_class ) + AF_DECLARE_WRITING_SYSTEM_CLASS( af_cjk_writing_system_class ) + + + /* the CJK-specific script classes */ + + AF_DECLARE_SCRIPT_CLASS( af_hani_script_class ) + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** C J K G L O B A L M E T R I C S *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ - /* CJK (global) metrics management */ /* * CJK glyphs tend to fill the square. So we have both vertical and * horizontal blue zones. But some glyphs have flat bounding strokes that * leave some space between neighbour glyphs. */ - enum - { - AF_CJK_BLUE_TOP, - AF_CJK_BLUE_BOTTOM, - AF_CJK_BLUE_LEFT, - AF_CJK_BLUE_RIGHT, - - AF_CJK_BLUE_MAX - }; +#define AF_CJK_IS_TOP_BLUE( b ) \ + ( (b)->properties & AF_BLUE_PROPERTY_CJK_TOP ) +#define AF_CJK_IS_HORIZ_BLUE( b ) \ + ( (b)->properties & AF_BLUE_PROPERTY_CJK_HORIZ ) +#define AF_CJK_IS_FILLED_BLUE( b ) \ + ( (b)->properties & AF_BLUE_PROPERTY_CJK_FILL ) +#define AF_CJK_IS_RIGHT_BLUE AF_CJK_IS_TOP_BLUE #define AF_CJK_MAX_WIDTHS 16 -#define AF_CJK_MAX_BLUES AF_CJK_BLUE_MAX enum { - AF_CJK_BLUE_ACTIVE = 1 << 0, - AF_CJK_BLUE_IS_TOP = 1 << 1, - AF_CJK_BLUE_IS_RIGHT = 1 << 2, - AF_CJK_BLUE_ADJUSTMENT = 1 << 3, /* used for scale adjustment */ - /* optimization */ + AF_CJK_BLUE_ACTIVE = 1 << 0, /* set if zone height is <= 3/4px */ + AF_CJK_BLUE_TOP = 1 << 1, /* result of AF_CJK_IS_TOP_BLUE */ + AF_CJK_BLUE_ADJUSTMENT = 1 << 2, /* used for scale adjustment */ + /* optimization */ AF_CJK_BLUE_FLAG_MAX }; @@ -77,16 +86,16 @@ FT_BEGIN_HEADER FT_Fixed scale; FT_Pos delta; - FT_UInt width_count; - AF_WidthRec widths[AF_CJK_MAX_WIDTHS]; - FT_Pos edge_distance_threshold; - FT_Pos standard_width; - FT_Bool extra_light; + FT_UInt width_count; /* number of used widths */ + AF_WidthRec widths[AF_CJK_MAX_WIDTHS]; /* widths array */ + FT_Pos edge_distance_threshold; /* used for creating edges */ + FT_Pos standard_width; /* the default stem thickness */ + FT_Bool extra_light; /* is standard width very light? */ /* used for horizontal metrics too for CJK */ FT_Bool control_overshoot; FT_UInt blue_count; - AF_CJKBlueRec blues[AF_CJK_BLUE_MAX]; + AF_CJKBlueRec blues[AF_BLUE_STRINGSET_MAX]; FT_Fixed org_scale; FT_Pos org_delta; |