Merge branch 'master' into var-subset
This commit is contained in:
commit
bcd689bb10
|
@ -36,7 +36,7 @@ ChangeLog: $(srcdir)/ChangeLog
|
||||||
$(srcdir)/ChangeLog:
|
$(srcdir)/ChangeLog:
|
||||||
$(AM_V_GEN) if test -d "$(top_srcdir)/.git"; then \
|
$(AM_V_GEN) if test -d "$(top_srcdir)/.git"; then \
|
||||||
(GIT_DIR=$(top_srcdir)/.git \
|
(GIT_DIR=$(top_srcdir)/.git \
|
||||||
$(GIT) log $(CHANGELOG_RANGE) --stat) | fmt --split-only > $@.tmp \
|
$(GIT) log $(CHANGELOG_RANGE) --stat) > $@.tmp \
|
||||||
&& mv -f $@.tmp "$(srcdir)/ChangeLog" \
|
&& mv -f $@.tmp "$(srcdir)/ChangeLog" \
|
||||||
|| ($(RM) $@.tmp; \
|
|| ($(RM) $@.tmp; \
|
||||||
echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
|
echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
|
||||||
|
|
|
@ -136,6 +136,7 @@
|
||||||
<index id="api-index-full"><title>API Index</title><xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include></index>
|
<index id="api-index-full"><title>API Index</title><xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include></index>
|
||||||
<index id="deprecated-api-index" role="deprecated"><title>Index of deprecated API</title><xi:include href="xml/api-index-deprecated.xml"><xi:fallback /></xi:include></index>
|
<index id="deprecated-api-index" role="deprecated"><title>Index of deprecated API</title><xi:include href="xml/api-index-deprecated.xml"><xi:fallback /></xi:include></index>
|
||||||
|
|
||||||
|
<index id="api-index-2-2-0" role="2.2.0"><title>Index of new symbols in 2.2.0</title><xi:include href="xml/api-index-2.2.0.xml"><xi:fallback /></xi:include></index>
|
||||||
<index id="api-index-2-1-0" role="2.1.0"><title>Index of new symbols in 2.1.0</title><xi:include href="xml/api-index-2.1.0.xml"><xi:fallback /></xi:include></index>
|
<index id="api-index-2-1-0" role="2.1.0"><title>Index of new symbols in 2.1.0</title><xi:include href="xml/api-index-2.1.0.xml"><xi:fallback /></xi:include></index>
|
||||||
<index id="api-index-2-0-0" role="2.0.0"><title>Index of new symbols in 2.0.0</title><xi:include href="xml/api-index-2.0.0.xml"><xi:fallback /></xi:include></index>
|
<index id="api-index-2-0-0" role="2.0.0"><title>Index of new symbols in 2.0.0</title><xi:include href="xml/api-index-2.0.0.xml"><xi:fallback /></xi:include></index>
|
||||||
<index id="api-index-1-9-0" role="1.9.0"><title>Index of new symbols in 1.9.0</title><xi:include href="xml/api-index-1.9.0.xml"><xi:fallback /></xi:include></index>
|
<index id="api-index-1-9-0" role="1.9.0"><title>Index of new symbols in 1.9.0</title><xi:include href="xml/api-index-1.9.0.xml"><xi:fallback /></xi:include></index>
|
||||||
|
|
|
@ -76,6 +76,7 @@ struct ankr
|
||||||
TRACE_SANITIZE (this);
|
TRACE_SANITIZE (this);
|
||||||
return_trace (likely (c->check_struct (this) &&
|
return_trace (likely (c->check_struct (this) &&
|
||||||
version == 0 &&
|
version == 0 &&
|
||||||
|
c->check_range (this, anchorData) &&
|
||||||
lookupTable.sanitize (c, this, &(this+anchorData))));
|
lookupTable.sanitize (c, this, &(this+anchorData))));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -418,15 +418,11 @@ struct Lookup
|
||||||
} /* Close namespace. */
|
} /* Close namespace. */
|
||||||
/* Ugly hand-coded null objects for template Lookup<> :(. */
|
/* Ugly hand-coded null objects for template Lookup<> :(. */
|
||||||
extern HB_INTERNAL const unsigned char _hb_Null_AAT_Lookup[2];
|
extern HB_INTERNAL const unsigned char _hb_Null_AAT_Lookup[2];
|
||||||
template <>
|
template <typename T>
|
||||||
/*static*/ inline const AAT::Lookup<OT::HBUINT16>& Null<AAT::Lookup<OT::HBUINT16> > ()
|
struct Null<AAT::Lookup<T> > {
|
||||||
{ return *reinterpret_cast<const AAT::Lookup<OT::HBUINT16> *> (_hb_Null_AAT_Lookup); }
|
static AAT::Lookup<T> const & get_null ()
|
||||||
template <>
|
{ return *reinterpret_cast<const AAT::Lookup<T> *> (_hb_Null_AAT_Lookup); }
|
||||||
/*static*/ inline const AAT::Lookup<OT::HBUINT32>& Null<AAT::Lookup<OT::HBUINT32> > ()
|
};
|
||||||
{ return *reinterpret_cast<const AAT::Lookup<OT::HBUINT32> *> (_hb_Null_AAT_Lookup); }
|
|
||||||
template <>
|
|
||||||
/*static*/ inline const AAT::Lookup<OT::Offset<OT::HBUINT16, false> >& Null<AAT::Lookup<OT::Offset<OT::HBUINT16, false> > > ()
|
|
||||||
{ return *reinterpret_cast<const AAT::Lookup<OT::Offset<OT::HBUINT16, false> > *> (_hb_Null_AAT_Lookup); }
|
|
||||||
namespace AAT {
|
namespace AAT {
|
||||||
|
|
||||||
enum { DELETED_GLYPH = 0xFFFF };
|
enum { DELETED_GLYPH = 0xFFFF };
|
||||||
|
|
|
@ -105,15 +105,18 @@ hb_vector_size_impl_t const _hb_NullPool[(HB_NULL_POOL_SIZE + sizeof (hb_vector_
|
||||||
|
|
||||||
/* Generic nul-content Null objects. */
|
/* Generic nul-content Null objects. */
|
||||||
template <typename Type>
|
template <typename Type>
|
||||||
static inline Type const & Null () {
|
struct Null {
|
||||||
static_assert (hb_null_size (Type) <= HB_NULL_POOL_SIZE, "Increase HB_NULL_POOL_SIZE.");
|
static Type const & get_null ()
|
||||||
return *reinterpret_cast<Type const *> (_hb_NullPool);
|
{
|
||||||
}
|
static_assert (hb_null_size (Type) <= HB_NULL_POOL_SIZE, "Increase HB_NULL_POOL_SIZE.");
|
||||||
|
return *reinterpret_cast<Type const *> (_hb_NullPool);
|
||||||
|
}
|
||||||
|
};
|
||||||
template <typename QType>
|
template <typename QType>
|
||||||
struct NullHelper
|
struct NullHelper
|
||||||
{
|
{
|
||||||
typedef typename hb_remove_const (typename hb_remove_reference (QType)) Type;
|
typedef typename hb_remove_const (typename hb_remove_reference (QType)) Type;
|
||||||
static const Type & get_null () { return Null<Type> (); }
|
static const Type & get_null () { return Null<Type>::get_null (); }
|
||||||
};
|
};
|
||||||
#define Null(Type) NullHelper<Type>::get_null ()
|
#define Null(Type) NullHelper<Type>::get_null ()
|
||||||
|
|
||||||
|
@ -122,9 +125,11 @@ struct NullHelper
|
||||||
} /* Close namespace. */ \
|
} /* Close namespace. */ \
|
||||||
extern HB_INTERNAL const unsigned char _hb_Null_##Namespace##_##Type[Namespace::Type::null_size]; \
|
extern HB_INTERNAL const unsigned char _hb_Null_##Namespace##_##Type[Namespace::Type::null_size]; \
|
||||||
template <> \
|
template <> \
|
||||||
/*static*/ inline const Namespace::Type& Null<Namespace::Type> () { \
|
struct Null<Namespace::Type> { \
|
||||||
return *reinterpret_cast<const Namespace::Type *> (_hb_Null_##Namespace##_##Type); \
|
static Namespace::Type const & get_null () { \
|
||||||
} \
|
return *reinterpret_cast<const Namespace::Type *> (_hb_Null_##Namespace##_##Type); \
|
||||||
|
} \
|
||||||
|
}; \
|
||||||
namespace Namespace { \
|
namespace Namespace { \
|
||||||
static_assert (true, "Just so we take semicolon after.")
|
static_assert (true, "Just so we take semicolon after.")
|
||||||
#define DEFINE_NULL_NAMESPACE_BYTES(Namespace, Type) \
|
#define DEFINE_NULL_NAMESPACE_BYTES(Namespace, Type) \
|
||||||
|
@ -134,10 +139,12 @@ struct NullHelper
|
||||||
#define DECLARE_NULL_INSTANCE(Type) \
|
#define DECLARE_NULL_INSTANCE(Type) \
|
||||||
extern HB_INTERNAL const Type _hb_Null_##Type; \
|
extern HB_INTERNAL const Type _hb_Null_##Type; \
|
||||||
template <> \
|
template <> \
|
||||||
/*static*/ inline const Type& Null<Type> () { \
|
struct Null<Type> { \
|
||||||
return _hb_Null_##Type; \
|
static Type const & get_null () { \
|
||||||
} \
|
return _hb_Null_##Type; \
|
||||||
static_assert (true, "Just so we take semicolon after.")
|
} \
|
||||||
|
}; \
|
||||||
|
static_assert (true, "Just so we take semicolon after.")
|
||||||
#define DEFINE_NULL_INSTANCE(Type) \
|
#define DEFINE_NULL_INSTANCE(Type) \
|
||||||
const Type _hb_Null_##Type
|
const Type _hb_Null_##Type
|
||||||
|
|
||||||
|
|
|
@ -99,8 +99,7 @@ _populate_gids_to_retain (hb_face_t *face,
|
||||||
const hb_set_t *input_glyphs_to_retain,
|
const hb_set_t *input_glyphs_to_retain,
|
||||||
bool close_over_gsub,
|
bool close_over_gsub,
|
||||||
hb_set_t *unicodes_to_retain,
|
hb_set_t *unicodes_to_retain,
|
||||||
hb_map_t *codepoint_to_glyph,
|
hb_map_t *codepoint_to_glyph)
|
||||||
hb_vector_t<hb_codepoint_t> *glyphs)
|
|
||||||
{
|
{
|
||||||
OT::cmap::accelerator_t cmap;
|
OT::cmap::accelerator_t cmap;
|
||||||
OT::glyf::accelerator_t glyf;
|
OT::glyf::accelerator_t glyf;
|
||||||
|
@ -145,10 +144,6 @@ _populate_gids_to_retain (hb_face_t *face,
|
||||||
|
|
||||||
_remove_invalid_gids (all_gids_to_retain, face->get_num_glyphs ());
|
_remove_invalid_gids (all_gids_to_retain, face->get_num_glyphs ());
|
||||||
|
|
||||||
glyphs->alloc (all_gids_to_retain->get_population ());
|
|
||||||
gid = HB_SET_VALUE_INVALID;
|
|
||||||
while (all_gids_to_retain->next (&gid))
|
|
||||||
glyphs->push (gid);
|
|
||||||
|
|
||||||
cff.fini ();
|
cff.fini ();
|
||||||
glyf.fini ();
|
glyf.fini ();
|
||||||
|
@ -160,26 +155,29 @@ _populate_gids_to_retain (hb_face_t *face,
|
||||||
static void
|
static void
|
||||||
_create_old_gid_to_new_gid_map (const hb_face_t *face,
|
_create_old_gid_to_new_gid_map (const hb_face_t *face,
|
||||||
bool retain_gids,
|
bool retain_gids,
|
||||||
const hb_vector_t<hb_codepoint_t> &glyphs,
|
hb_set_t *all_gids_to_retain,
|
||||||
hb_map_t *glyph_map, /* OUT */
|
hb_map_t *glyph_map, /* OUT */
|
||||||
hb_map_t *reverse_glyph_map, /* OUT */
|
hb_map_t *reverse_glyph_map, /* OUT */
|
||||||
unsigned int *num_glyphs /* OUT */)
|
unsigned int *num_glyphs /* OUT */)
|
||||||
{
|
{
|
||||||
for (unsigned int i = 0; i < glyphs.length; i++) {
|
hb_codepoint_t gid = HB_SET_VALUE_INVALID;
|
||||||
|
unsigned int length = 0;
|
||||||
|
for (unsigned int i = 0; all_gids_to_retain->next (&gid); i++) {
|
||||||
if (!retain_gids)
|
if (!retain_gids)
|
||||||
{
|
{
|
||||||
glyph_map->set (glyphs[i], i);
|
glyph_map->set (gid, i);
|
||||||
reverse_glyph_map->set (i, glyphs[i]);
|
reverse_glyph_map->set (i, gid);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
glyph_map->set (glyphs[i], glyphs[i]);
|
glyph_map->set (gid, gid);
|
||||||
reverse_glyph_map->set (glyphs[i], glyphs[i]);
|
reverse_glyph_map->set (gid, gid);
|
||||||
}
|
}
|
||||||
|
++length;
|
||||||
}
|
}
|
||||||
if (!retain_gids || glyphs.length == 0)
|
if (!retain_gids || length == 0)
|
||||||
{
|
{
|
||||||
*num_glyphs = glyphs.length;
|
*num_glyphs = length;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -207,7 +205,6 @@ hb_subset_plan_create (hb_face_t *face,
|
||||||
plan->drop_layout = input->drop_layout;
|
plan->drop_layout = input->drop_layout;
|
||||||
plan->desubroutinize = input->desubroutinize;
|
plan->desubroutinize = input->desubroutinize;
|
||||||
plan->unicodes = hb_set_create();
|
plan->unicodes = hb_set_create();
|
||||||
plan->glyphs_deprecated.init();
|
|
||||||
plan->source = hb_face_reference (face);
|
plan->source = hb_face_reference (face);
|
||||||
plan->dest = hb_face_builder_create ();
|
plan->dest = hb_face_builder_create ();
|
||||||
plan->codepoint_to_glyph = hb_map_create();
|
plan->codepoint_to_glyph = hb_map_create();
|
||||||
|
@ -218,12 +215,11 @@ hb_subset_plan_create (hb_face_t *face,
|
||||||
input->glyphs,
|
input->glyphs,
|
||||||
!plan->drop_layout,
|
!plan->drop_layout,
|
||||||
plan->unicodes,
|
plan->unicodes,
|
||||||
plan->codepoint_to_glyph,
|
plan->codepoint_to_glyph);
|
||||||
&plan->glyphs_deprecated);
|
|
||||||
|
|
||||||
_create_old_gid_to_new_gid_map (face,
|
_create_old_gid_to_new_gid_map (face,
|
||||||
input->retain_gids,
|
input->retain_gids,
|
||||||
plan->glyphs_deprecated,
|
plan->_glyphset,
|
||||||
plan->glyph_map,
|
plan->glyph_map,
|
||||||
plan->reverse_glyph_map,
|
plan->reverse_glyph_map,
|
||||||
&plan->_num_output_glyphs);
|
&plan->_num_output_glyphs);
|
||||||
|
@ -242,7 +238,6 @@ hb_subset_plan_destroy (hb_subset_plan_t *plan)
|
||||||
if (!hb_object_destroy (plan)) return;
|
if (!hb_object_destroy (plan)) return;
|
||||||
|
|
||||||
hb_set_destroy (plan->unicodes);
|
hb_set_destroy (plan->unicodes);
|
||||||
plan->glyphs_deprecated.fini ();
|
|
||||||
hb_face_destroy (plan->source);
|
hb_face_destroy (plan->source);
|
||||||
hb_face_destroy (plan->dest);
|
hb_face_destroy (plan->dest);
|
||||||
hb_map_destroy (plan->codepoint_to_glyph);
|
hb_map_destroy (plan->codepoint_to_glyph);
|
||||||
|
|
|
@ -53,9 +53,6 @@ struct hb_subset_plan_t
|
||||||
hb_map_t *glyph_map;
|
hb_map_t *glyph_map;
|
||||||
hb_map_t *reverse_glyph_map;
|
hb_map_t *reverse_glyph_map;
|
||||||
|
|
||||||
// Deprecated members:
|
|
||||||
hb_vector_t<hb_codepoint_t> glyphs_deprecated;
|
|
||||||
|
|
||||||
// Plan is only good for a specific source/dest so keep them with it
|
// Plan is only good for a specific source/dest so keep them with it
|
||||||
hb_face_t *source;
|
hb_face_t *source;
|
||||||
hb_face_t *dest;
|
hb_face_t *dest;
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue