In anticipation for buffer revamp coming.
HBSOURCES = \
hb-blob.c \
hb-blob-private.h \
- hb-buffer.c \
- hb-buffer-private.h \
+ hb-buffer.cc \
+ hb-buffer-private.hh \
hb-font.cc \
- hb-font-private.h \
+ hb-font-private.hh \
hb-object-private.h \
hb-open-file-private.hh \
hb-open-type-private.hh \
hb-language.c \
hb-private.h \
- hb-shape.c \
+ hb-shape.cc \
hb-unicode.c \
hb-unicode-private.h \
$(NULL)
hb-ot-layout-gpos-private.hh \
hb-ot-layout-gsubgpos-private.hh \
hb-ot-layout-gsub-private.hh \
- hb-ot-layout-private.h \
- hb-ot-shape.c \
- hb-ot-shape-private.h \
+ hb-ot-layout-private.hh \
+ hb-ot-shape.cc \
+ hb-ot-shape-private.hh \
hb-ot-tag.c \
$(NULL)
HBHEADERS += \
HBCFLAGS += $(FREETYPE_CFLAGS)
HBLIBS += $(FREETYPE_LIBS)
HBSOURCES += \
- hb-ft.c \
+ hb-ft.cc \
$(NULL)
HBHEADERS += \
hb-ft.h \
/*
* Copyright (C) 1998-2004 David Turner and Werner Lemberg
- * Copyright (C) 2004,2007,2009 Red Hat, Inc.
+ * Copyright (C) 2004,2007,2009,2010 Red Hat, Inc.
*
* This is part of HarfBuzz, a text shaping library.
*
/*
* Copyright (C) 1998-2004 David Turner and Werner Lemberg
- * Copyright (C) 2004,2007 Red Hat, Inc.
+ * Copyright (C) 2004,2007,2009,2010 Red Hat, Inc.
*
* This is part of HarfBuzz, a text shaping library.
*
* Red Hat Author(s): Owen Taylor, Behdad Esfahbod
*/
-#include "hb-buffer-private.h"
+#include "hb-buffer-private.hh"
#include <string.h>
{
assert (buffer->have_output);
if (!buffer->positions)
- buffer->positions = calloc (buffer->allocated, sizeof (buffer->positions[0]));
+ buffer->positions = (hb_internal_glyph_position_t *) calloc (buffer->allocated, sizeof (buffer->positions[0]));
buffer->out_string = (hb_internal_glyph_info_t *) buffer->positions;
memcpy (buffer->out_string, buffer->in_string, buffer->out_length * sizeof (buffer->out_string[0]));
new_allocated += (new_allocated >> 1) + 8;
if (buffer->positions)
- buffer->positions = realloc (buffer->positions, new_allocated * sizeof (buffer->positions[0]));
+ buffer->positions = (hb_internal_glyph_position_t *) realloc (buffer->positions, new_allocated * sizeof (buffer->positions[0]));
if (buffer->out_string != buffer->in_string)
{
- buffer->in_string = realloc (buffer->in_string, new_allocated * sizeof (buffer->in_string[0]));
+ buffer->in_string = (hb_internal_glyph_info_t *) realloc (buffer->in_string, new_allocated * sizeof (buffer->in_string[0]));
buffer->out_string = (hb_internal_glyph_info_t *) buffer->positions;
}
else
{
- buffer->in_string = realloc (buffer->in_string, new_allocated * sizeof (buffer->in_string[0]));
+ buffer->in_string = (hb_internal_glyph_info_t *) realloc (buffer->in_string, new_allocated * sizeof (buffer->in_string[0]));
buffer->out_string = buffer->in_string;
}
if (unlikely (!buffer->positions))
{
- buffer->positions = calloc (buffer->allocated, sizeof (buffer->positions[0]));
+ buffer->positions = (hb_internal_glyph_position_t *) calloc (buffer->allocated, sizeof (buffer->positions[0]));
return;
}
#define HB_DIRECTION_IS_VERTICAL(dir) ((dir) == HB_DIRECTION_TTB || (dir) == HB_DIRECTION_BTT)
#define HB_DIRECTION_IS_FORWARD(dir) ((dir) == HB_DIRECTION_LTR || (dir) == HB_DIRECTION_TTB)
#define HB_DIRECTION_IS_BACKWARD(dir) ((dir) == HB_DIRECTION_RTL || (dir) == HB_DIRECTION_BTT)
+#define HB_DIRECTION_REVERSE(dir) ((hb_direction_t) (((unsigned int) (dir)) ^ 1))
#endif /* HB_COMMON_H */
#include "hb-font.h"
-#include "hb-ot-layout-private.h"
+#include "hb-ot-layout-private.hh"
HB_BEGIN_DECLS
#include "hb-private.h"
-#include "hb-font-private.h"
+#include "hb-font-private.hh"
#include "hb-blob-private.h"
#include "hb-open-file-private.hh"
-#include "hb-ot-layout-private.h"
+#include "hb-ot-layout-private.hh"
#include <string.h>
#include "hb-ft.h"
-#include "hb-font-private.h"
+#include "hb-font-private.hh"
#include FT_TRUETYPE_TABLES_H
return hb_blob_create_empty ();
/* TODO Use FT_Memory? */
- buffer = malloc (length);
+ buffer = (FT_Byte *) malloc (length);
if (buffer == NULL)
return NULL;
static void
hb_ft_face_finalize (FT_Face ft_face)
{
- hb_face_destroy (ft_face->generic.data);
+ hb_face_destroy ((hb_face_t *) ft_face->generic.data);
}
hb_face_t *
ft_face->generic.finalizer = (FT_Generic_Finalizer) hb_ft_face_finalize;
}
- return hb_face_reference (ft_face->generic.data);
+ return hb_face_reference ((hb_face_t *) ft_face->generic.data);
}
#ifndef HB_OT_LAYOUT_COMMON_PRIVATE_HH
#define HB_OT_LAYOUT_COMMON_PRIVATE_HH
-#include "hb-ot-layout-private.h"
+#include "hb-ot-layout-private.hh"
#include "hb-open-type-private.hh"
#include "hb-ot-layout-common-private.hh"
-#include "hb-font-private.h"
+#include "hb-font-private.hh"
/*
#ifndef HB_OT_LAYOUT_GSUBGPOS_PRIVATE_HH
#define HB_OT_LAYOUT_GSUBGPOS_PRIVATE_HH
-#include "hb-buffer-private.h"
+#include "hb-buffer-private.hh"
#include "hb-ot-layout-gdef-private.hh"
#include "hb-ot-layout.h"
#include "hb-font.h"
-#include "hb-buffer-private.h"
+#include "hb-buffer-private.hh"
HB_BEGIN_DECLS
#define HB_OT_LAYOUT_CC
-#include "hb-ot-layout-private.h"
+#include "hb-ot-layout-private.hh"
#include "hb-ot-layout-gdef-private.hh"
#include "hb-ot-layout-gsub-private.hh"
* Red Hat Author(s): Behdad Esfahbod
*/
-#include "hb-ot-shape-private.h"
+#include "hb-ot-shape-private.hh"
-#include "hb-buffer-private.h"
+#include "hb-buffer-private.hh"
#include "hb-ot-layout.h"
#include "hb-shape.h"
-#include "hb-buffer-private.h"
+#include "hb-buffer-private.hh"
-#include "hb-ot-shape-private.h"
+#include "hb-ot-shape-private.hh"
/* Prepare */
original_direction != _hb_script_get_horizontal_direction (buffer->script))
{
hb_buffer_reverse_clusters (buffer);
- buffer->direction ^= 1;
+ buffer->direction = HB_DIRECTION_REVERSE (buffer->direction);
}
return original_direction;