[HB] Remove glib dependency

This commit is contained in:
Behdad Esfahbod 2009-08-01 21:06:11 -04:00
parent df66028781
commit baec684fde
4 changed files with 22 additions and 18 deletions

View File

@ -2,10 +2,6 @@
NULL =
INCLUDES = \
-I $(srcdir) \
$(FREETYPE_CFLAGS) \
$(GLIB_CFLAGS)
CXX = gcc -g -O2 -fno-rtti -fno-exceptions -Wabi -Wpadded -Wcast-align
noinst_LTLIBRARIES = libharfbuzz-1.la
@ -37,11 +33,12 @@ HBHEADERS = \
$(NULL)
libharfbuzz_1_la_SOURCES = $(HBSOURCES) $(HBHEADERS)
libharfbuzz_1_la_LIBADD = $(FREETYPE_LIBS)
libharfbuzz_1_la_LIBADD =
noinst_PROGRAMS = main
main_SOURCES = main.cc
main_CXXFLAGS = $(GLIB_CFLAGS)
main_LDADD = $(GLIB_LIBS)
EXTRA_DIST = README COPYING

View File

@ -269,7 +269,7 @@ _hb_buffer_add_output_glyphs (hb_buffer_t *buffer,
for (i = 0; i < num_out; i++)
{
hb_glyph_info_t *info = &buffer->out_string[buffer->out_pos + i];
info->gindex = hb_be_uint16_t (glyph_data_be[i]);
info->gindex = hb_be_uint16 (glyph_data_be[i]);
info->properties = properties;
info->cluster = cluster;
info->component = component;

View File

@ -38,18 +38,6 @@
#include "hb-common.h"
#include <glib.h>
/* Macros to convert to/from BigEndian */
#define hb_be_uint8
#define hb_be_int8
#define hb_be_uint16 GUINT16_TO_BE
#define hb_be_int16 GINT16_TO_BE
#define hb_be_uint32 GUINT32_TO_BE
#define hb_be_int32 GINT32_TO_BE
#define hb_be_uint64 GUINT64_TO_BE
#define hb_be_int64 GINT64_TO_BE
/* Basics */
#undef MIN
@ -150,6 +138,24 @@ _hb_popcount32 (uint32_t mask)
#endif
}
static HB_GNUC_UNUSED inline uint16_t
_hb_be_uint16 (uint16_t v)
{
return (v>>8) + (v<<8);
}
static HB_GNUC_UNUSED inline uint32_t
_hb_be_uint32 (uint32_t v)
{
return _hb_be_uint16 (v>>16) + (_hb_be_uint16 (v) <<16);
}
/* Macros to convert to/from BigEndian */
#define hb_be_uint8
#define hb_be_int8
#define hb_be_uint16(v) _hb_be_uint16 (v)
#define hb_be_int16(v) ((int16_t) hb_be_uint16 (v))
#define hb_be_uint32(v) _hb_be_uint32 (v)
#define hb_be_int32(v) ((int32_t) hb_be_uint32 (v))
#include "hb-object-private.h"

View File

@ -29,6 +29,7 @@
#include "hb-ot-layout-gdef-private.h"
#include "hb-ot-layout-gsub-private.h"
#include <glib.h>
#include <stdlib.h>
#include <stdio.h>