NULL =
-CXX = gcc -g -O2 -fno-rtti -fno-exceptions -Wabi -Wpadded -Wcast-align
+CXX = $(CC) -fno-rtti -fno-exceptions -Wabi -Wpadded -Wcast-align
noinst_LTLIBRARIES = libharfbuzz-1.la
* hb_face_t
*/
-hb_blob_t *
-_hb_face_get_table (hb_tag_t tag, void *user_data)
+static hb_blob_t *
+_hb_face_get_table_from_blob (hb_tag_t tag, void *user_data)
{
hb_face_t *face = (hb_face_t *) user_data;
const char *data = hb_blob_lock (face->blob);
return blob;
}
-void
-_hb_face_destroy_blob (void *user_data)
-{
- hb_face_t *face = (hb_face_t *) user_data;
-
- hb_blob_destroy (face->blob);
- face->blob = NULL;
-}
-
static hb_face_t _hb_face_nil = {
HB_REFERENCE_COUNT_INVALID, /* ref_count */
face->blob = hb_blob_reference (blob);
face->index = index;
- face->get_table = _hb_face_get_table;
+ face->get_table = _hb_face_get_table_from_blob;
face->user_data = face;
_hb_ot_layout_init (face);
inline bool sanitize (SANITIZE_ARG_DEF) {
if (!SANITIZE_GET_SIZE()) return false;
- unsigned int count = len ? len - 1 : 0;
/* Note; for non-recursive types, this is not much needed
+ unsigned int count = len ? len - 1 : 0;
for (unsigned int i = 0; i < count; i++)
if (!SANITIZE (array[i]))
return false;
struct LangSys
{
- inline const unsigned int get_feature_index (unsigned int i) const { return featureIndex[i]; }
+ inline unsigned int get_feature_index (unsigned int i) const { return featureIndex[i]; }
inline unsigned int get_feature_count (void) const { return featureIndex.len; }
inline bool has_required_feature (void) const { return reqFeatureIndex != 0xffff; }
struct Feature
{
- inline const unsigned int get_lookup_index (unsigned int i) const { return lookupIndex[i]; }
+ inline unsigned int get_lookup_index (unsigned int i) const { return lookupIndex[i]; }
inline unsigned int get_lookup_count (void) const { return lookupIndex.len; }
inline bool sanitize (SANITIZE_ARG_DEF) {
int delta = bits & mask;
- if (delta >= ((mask + 1) >> 1))
+ if ((unsigned int) delta >= ((mask + 1) >> 1))
delta -= mask + 1;
return delta;
{
/* XXX vertical */
return context->font->x_scale * coordinate / 0x10000 +
- (this+deviceTable).get_delta (context->font->x_ppem) << 6;
+ ((this+deviceTable).get_delta (context->font->x_ppem) << 6);
}
private:
inline unsigned int get_size () const
{ return get_len () * sizeof (Value); }
- const void apply_value (hb_ot_layout_context_t *context,
- const char *base,
- const Value *values,
- hb_internal_glyph_position_t *glyph_pos) const
+ void apply_value (hb_ot_layout_context_t *context,
+ const char *base,
+ const Value *values,
+ hb_internal_glyph_position_t *glyph_pos) const
{
unsigned int x_ppem, y_ppem;
hb_16dot16_t x_scale, y_scale;
- unsigned int pixel_value;
unsigned int format = *this;
if (!format)
hb_ot_layout_t *layout = &face->ot_layout;
hb_ot_layout_class_t gdef_klass;
- int len = layout->new_gdef.len;
+ unsigned int len = layout->new_gdef.len;
if (HB_UNLIKELY (glyph > 65535))
return;
printf (" %d table(s) found in font\n", num_tables);
for (int n_table = 0; n_table < num_tables; n_table++) {
const OpenTypeTable &table = font.get_table (n_table);
- printf (" Table %2d of %2d: %.4s (0x%08lx+0x%08lx)\n", n_table, num_tables,
+ printf (" Table %2d of %2d: %.4s (0x%08x+0x%08x)\n", n_table, num_tables,
(const char *)table.tag,
(unsigned int) table.offset,
(unsigned int) table.length);
int num_features = langsys.get_feature_count ();
printf (" %d feature(s) found in language system\n", num_features);
for (int n_feature = 0; n_feature < num_features; n_feature++) {
- unsigned int feature_index = langsys.get_feature_index (n_feature);
printf (" Feature index %2d of %2d: %d\n", n_feature, num_features,
langsys.get_feature_index (n_feature));
}
int num_lookups = feature.get_lookup_count ();
printf (" %d lookup(s) found in feature\n", num_lookups);
for (int n_lookup = 0; n_lookup < num_lookups; n_lookup++) {
- unsigned int lookup_index = feature.get_lookup_index (n_lookup);
printf (" Lookup index %2d of %2d: %d\n", n_lookup, num_lookups,
feature.get_lookup_index (n_lookup));
}