Merge branch 'master' into cff-subset

This commit is contained in:
Michiharu Ariza 2018-11-16 17:38:47 -08:00
commit 515f1a1614
13 changed files with 60 additions and 37 deletions

19
NEWS
View File

@ -1,4 +1,21 @@
Overview of changes leading to 2.1.1
Overview of changes leading to 2.1.3
Friday, November 16, 2018
====================================
- Fix AAT 'mort' shaping, which was broken in 2.1.2
Overview of changes leading to 2.1.2
Friday, November 16, 2018
====================================
- Various internal changes.
- AAT shaping improvements:
o Implement kern table Format 1 state-machine-based kerning.
o Implement cross-stream kerning (cursive positioning, etc).
o Ignore emptyish GSUB tables (zero scripts) if morx present.
o Don't apply GPOS if morx is being applied. Matches Apple.
-Overview of changes leading to 2.1.1
Monday, November 5, 2018
====================================
- AAT improvements:

View File

@ -1,6 +1,6 @@
AC_PREREQ([2.64])
AC_INIT([HarfBuzz],
[2.1.1],
[2.1.3],
[https://github.com/harfbuzz/harfbuzz/issues/new],
[harfbuzz],
[http://harfbuzz.org/])

View File

@ -169,7 +169,7 @@ struct trak
{
static const hb_tag_t tableTag = HB_AAT_TAG_trak;
inline bool has_data (void) const { return version.to_int () != 0; }
inline bool has_data (void) const { return version.to_int (); }
inline bool apply (hb_aat_apply_context_t *c) const
{

View File

@ -215,7 +215,7 @@ hb_aat_layout_substitute (const hb_ot_shape_plan_t *plan,
return;
}
hb_blob_t *mort_blob = font->face->table.morx.get_blob ();
hb_blob_t *mort_blob = font->face->table.mort.get_blob ();
const AAT::mort& mort = *mort_blob->as<AAT::mort> ();
if (mort.has_data ())
{

View File

@ -339,16 +339,18 @@ struct UnsizedArrayOf
HB_NO_CREATE_COPY_ASSIGN_TEMPLATE (UnsizedArrayOf, Type);
/* Unlikely other places, use "int i" instead of "unsigned int i" for our
* indexing operator. For two reasons:
* 1. For UnsizedArrayOf, it's not totally unimaginable to want to look
* at items before the start of current array.
* 2. Fixes MSVC 2008 "overloads have similar conversions" issue with the
* built-in operator [] that takes int, in expressions like sizeof (array[0])).
* I suppose I could fix that by replacing 0 with 0u, but like this fix
* more now. */
inline const Type& operator [] (int i) const { return arrayZ[i]; }
inline Type& operator [] (int i) { return arrayZ[i]; }
inline const Type& operator [] (unsigned int i) const
{
const Type *p = &arrayZ[i];
if (unlikely (p < arrayZ)) return Null (Type); /* Overflowed. */
return *p;
}
inline Type& operator [] (unsigned int i)
{
Type *p = &arrayZ[i];
if (unlikely (p < arrayZ)) return Crap (Type); /* Overflowed. */
return *p;
}
template <typename T> inline operator T * (void) { return arrayZ; }
template <typename T> inline operator const T * (void) const { return arrayZ; }

View File

@ -348,7 +348,7 @@ struct GDEF
ComponentGlyph = 4
};
inline bool has_data (void) const { return version.to_int () != 0; }
inline bool has_data (void) const { return version.to_int (); }
inline bool has_glyph_classes (void) const { return glyphClassDef != 0; }
inline unsigned int get_glyph_class (hb_codepoint_t glyph) const
{ return (this+glyphClassDef).get_class (glyph); }

View File

@ -2657,7 +2657,7 @@ struct hb_ot_layout_lookup_accelerator_t
struct GSUBGPOS
{
inline bool has_data (void) const { return version.to_int () != 0; }
inline bool has_data (void) const { return version.to_int (); }
inline unsigned int get_script_count (void) const
{ return (this+scriptList).len; }
inline const Tag& get_script_tag (unsigned int i) const

View File

@ -684,7 +684,7 @@ struct MATH
{
static const hb_tag_t tableTag = HB_OT_TAG_MATH;
inline bool has_data (void) const { return version.to_int () != 0; }
inline bool has_data (void) const { return version.to_int (); }
inline bool sanitize (hb_sanitize_context_t *c) const
{

View File

@ -509,16 +509,16 @@ _hb_ot_shape_fallback_spaces (const hb_ot_shape_plan_t *plan HB_UNUSED,
case t::SPACE_EM_6:
case t::SPACE_EM_16:
if (horizontal)
pos[i].x_advance = (font->x_scale + ((int) space_type)/2) / (int) space_type;
pos[i].x_advance = +(font->x_scale + ((int) space_type)/2) / (int) space_type;
else
pos[i].y_advance = (font->y_scale + ((int) space_type)/2) / (int) space_type;
pos[i].y_advance = -(font->y_scale + ((int) space_type)/2) / (int) space_type;
break;
case t::SPACE_4_EM_18:
if (horizontal)
pos[i].x_advance = (int64_t) font->x_scale * 4 / 18;
pos[i].x_advance = (int64_t) +font->x_scale * 4 / 18;
else
pos[i].y_advance = (int64_t) font->y_scale * 4 / 18;
pos[i].y_advance = (int64_t) -font->y_scale * 4 / 18;
break;
case t::SPACE_FIGURE:

View File

@ -62,7 +62,11 @@ _hb_apply_morx (hb_face_t *face)
hb_aat_layout_has_substitution (face))
return true;
return !hb_ot_layout_has_substitution (face) &&
/* Ignore empty GSUB tables. */
return (!hb_ot_layout_has_substitution (face) ||
!hb_ot_layout_table_get_script_tags (face,
HB_OT_TAG_GSUB,
0, nullptr, nullptr)) &&
hb_aat_layout_has_substitution (face);
}
@ -122,7 +126,7 @@ hb_ot_shape_planner_t::compile (hb_ot_shape_plan_t &plan,
if (hb_options ().aat && hb_aat_layout_has_positioning (face))
plan.apply_kerx = true;
else if (!disable_gpos && hb_ot_layout_has_positioning (face))
else if (!apply_morx && !disable_gpos && hb_ot_layout_has_positioning (face))
plan.apply_gpos = true;
else if (hb_aat_layout_has_positioning (face))
plan.apply_kerx = true;

View File

@ -88,7 +88,7 @@ struct fvar
{
static const hb_tag_t tableTag = HB_OT_TAG_fvar;
inline bool has_data (void) const { return version.to_int () != 0; }
inline bool has_data (void) const { return version.to_int (); }
inline bool sanitize (hb_sanitize_context_t *c) const
{

View File

@ -38,9 +38,9 @@ HB_BEGIN_DECLS
#define HB_VERSION_MAJOR 2
#define HB_VERSION_MINOR 1
#define HB_VERSION_MICRO 1
#define HB_VERSION_MICRO 3
#define HB_VERSION_STRING "2.1.1"
#define HB_VERSION_STRING "2.1.3"
#define HB_VERSION_ATLEAST(major,minor,micro) \
((major)*10000+(minor)*100+(micro) <= \

View File

@ -18,17 +18,17 @@
../fonts/1c2c3fc37b2d4c3cb2ef726c6cdaaabd4b7f3eb9.ttf:--font-funcs=ot --direction=ttb:U+0020:[gid1=0@-280,0+0,-2048]
../fonts/1c2c3fc37b2d4c3cb2ef726c6cdaaabd4b7f3eb9.ttf:--font-funcs=ot --direction=ttb:U+00A0:[gid1=0@-280,0+0,-2048]
../fonts/1c2c3fc37b2d4c3cb2ef726c6cdaaabd4b7f3eb9.ttf:--font-funcs=ot --direction=ttb:U+1680:[gid0=0@-346,0+0,-2048]
../fonts/1c2c3fc37b2d4c3cb2ef726c6cdaaabd4b7f3eb9.ttf:--font-funcs=ot --direction=ttb:U+2000:[gid1=0@-280,0+0,1024]
../fonts/1c2c3fc37b2d4c3cb2ef726c6cdaaabd4b7f3eb9.ttf:--font-funcs=ot --direction=ttb:U+2001:[gid1=0@-280,0+0,2048]
../fonts/1c2c3fc37b2d4c3cb2ef726c6cdaaabd4b7f3eb9.ttf:--font-funcs=ot --direction=ttb:U+2002:[gid1=0@-280,0+0,1024]
../fonts/1c2c3fc37b2d4c3cb2ef726c6cdaaabd4b7f3eb9.ttf:--font-funcs=ot --direction=ttb:U+2003:[gid1=0@-280,0+0,2048]
../fonts/1c2c3fc37b2d4c3cb2ef726c6cdaaabd4b7f3eb9.ttf:--font-funcs=ot --direction=ttb:U+2004:[gid1=0@-280,0+0,683]
../fonts/1c2c3fc37b2d4c3cb2ef726c6cdaaabd4b7f3eb9.ttf:--font-funcs=ot --direction=ttb:U+2005:[gid1=0@-280,0+0,512]
../fonts/1c2c3fc37b2d4c3cb2ef726c6cdaaabd4b7f3eb9.ttf:--font-funcs=ot --direction=ttb:U+2006:[gid1=0@-280,0+0,341]
../fonts/1c2c3fc37b2d4c3cb2ef726c6cdaaabd4b7f3eb9.ttf:--font-funcs=ot --direction=ttb:U+2000:[gid1=0@-280,0+0,-1024]
../fonts/1c2c3fc37b2d4c3cb2ef726c6cdaaabd4b7f3eb9.ttf:--font-funcs=ot --direction=ttb:U+2001:[gid1=0@-280,0+0,-2048]
../fonts/1c2c3fc37b2d4c3cb2ef726c6cdaaabd4b7f3eb9.ttf:--font-funcs=ot --direction=ttb:U+2002:[gid1=0@-280,0+0,-1024]
../fonts/1c2c3fc37b2d4c3cb2ef726c6cdaaabd4b7f3eb9.ttf:--font-funcs=ot --direction=ttb:U+2003:[gid1=0@-280,0+0,-2048]
../fonts/1c2c3fc37b2d4c3cb2ef726c6cdaaabd4b7f3eb9.ttf:--font-funcs=ot --direction=ttb:U+2004:[gid1=0@-280,0+0,-683]
../fonts/1c2c3fc37b2d4c3cb2ef726c6cdaaabd4b7f3eb9.ttf:--font-funcs=ot --direction=ttb:U+2005:[gid1=0@-280,0+0,-512]
../fonts/1c2c3fc37b2d4c3cb2ef726c6cdaaabd4b7f3eb9.ttf:--font-funcs=ot --direction=ttb:U+2006:[gid1=0@-280,0+0,-341]
../fonts/1c2c3fc37b2d4c3cb2ef726c6cdaaabd4b7f3eb9.ttf:--font-funcs=ot --direction=ttb:U+2007:[gid1=0@-280,0+0,-2048]
../fonts/1c2c3fc37b2d4c3cb2ef726c6cdaaabd4b7f3eb9.ttf:--font-funcs=ot --direction=ttb:U+2008:[gid1=0@-280,0+0,-2048]
../fonts/1c2c3fc37b2d4c3cb2ef726c6cdaaabd4b7f3eb9.ttf:--font-funcs=ot --direction=ttb:U+2009:[gid1=0@-280,0+0,410]
../fonts/1c2c3fc37b2d4c3cb2ef726c6cdaaabd4b7f3eb9.ttf:--font-funcs=ot --direction=ttb:U+200A:[gid1=0@-280,0+0,128]
../fonts/1c2c3fc37b2d4c3cb2ef726c6cdaaabd4b7f3eb9.ttf:--font-funcs=ot --direction=ttb:U+2009:[gid1=0@-280,0+0,-410]
../fonts/1c2c3fc37b2d4c3cb2ef726c6cdaaabd4b7f3eb9.ttf:--font-funcs=ot --direction=ttb:U+200A:[gid1=0@-280,0+0,-128]
../fonts/1c2c3fc37b2d4c3cb2ef726c6cdaaabd4b7f3eb9.ttf:--font-funcs=ot --direction=ttb:U+202F:[gid1=0@-280,0+0,-1024]
../fonts/1c2c3fc37b2d4c3cb2ef726c6cdaaabd4b7f3eb9.ttf:--font-funcs=ot --direction=ttb:U+205F:[gid1=0@-280,0+0,455]
../fonts/1c2c3fc37b2d4c3cb2ef726c6cdaaabd4b7f3eb9.ttf:--font-funcs=ot --direction=ttb:U+3000:[gid1=0@-280,0+0,2048]
../fonts/1c2c3fc37b2d4c3cb2ef726c6cdaaabd4b7f3eb9.ttf:--font-funcs=ot --direction=ttb:U+205F:[gid1=0@-280,0+0,-455]
../fonts/1c2c3fc37b2d4c3cb2ef726c6cdaaabd4b7f3eb9.ttf:--font-funcs=ot --direction=ttb:U+3000:[gid1=0@-280,0+0,-2048]