Merge branch 'master' into harfbuzz-ng-external
authorBehdad Esfahbod <behdad@behdad.org>
Tue, 21 Sep 2010 19:47:17 +0000 (15:47 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Tue, 21 Sep 2010 19:49:07 +0000 (15:49 -0400)
Conflicts:
pango/Makefile.am
pango/pango-ot-buffer.c
pango/pango-ot-info.c

Removed:
pango/opentype/Makefile.am
pango/opentype/hb-blob.c
pango/opentype/hb-open-file-private.hh
pango/opentype/hb-open-type-private.hh
pango/opentype/hb-ot-layout-common-private.hh
pango/opentype/hb-ot-layout-gdef-private.hh
pango/opentype/hb-ot-layout-gpos-private.hh
pango/opentype/hb-ot-layout-gsub-private.hh
pango/opentype/hb-ot-layout-gsubgpos-private.hh
pango/opentype/hb-ot-layout.cc
pango/opentype/hb-ot-layout.h
pango/opentype/hb-private.h

1  2 
configure.in
modules/basic/Makefile.am
modules/basic/basic-fc.c
pango/Makefile.am
pango/pango-ot-buffer.c
pango/pangofc-private.h

diff --cc configure.in
Simple merge
Simple merge
@@@ -25,8 -25,8 +25,9 @@@
  #include "config.h"
  #include <string.h>
  
 +#define PANGO_ENABLE_BACKEND 1 /* XXX */
  #include <glib/gprintf.h>
  #include "pango-engine.h"
  #include "pango-utils.h"
  #include "pangofc-font.h"
@@@ -4,10 -4,21 +4,13 @@@
  # which are more like other make's VPATH.
  GPATH = $(srcdir)
  
- EXTRA_DIST = 
- BUILT_GIRSOURCES =
+ include $(INTROSPECTION_MAKEFILE)
+ INTROSPECTION_GIRS =
+ INTROSPECTION_SCANNER_ARGS = --warn-all --add-include-path=$(srcdir) --add-include-path=.
+ INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) --includedir=.
  
 -if HAVE_FREETYPE
 -OPENTYPE_SUBDIR=opentype
 -endif
 -
 -FRIBIDI_SUBDIR=mini-fribidi
 -
 -SUBDIRS = $(OPENTYPE_SUBDIR) $(FRIBIDI_SUBDIR)
 -
 -DIST_SUBDIRS = mini-fribidi opentype
 +SUBDIRS = mini-fribidi
  
  INCLUDES =                                            \
        -DG_LOG_DOMAIN=\"Pango\"                        \
@@@ -211,29 -201,123 +212,9 @@@ pango_ot_buffer_get_glyphs (const Pango
      *glyphs = (PangoOTGlyph *) hb_buffer_get_glyph_infos (buffer->buffer);
  
    if (n_glyphs)
 -    *n_glyphs = hb_buffer_get_len (buffer->buffer);
 -}
 -
 -static void
 -apply_gpos_ltr (PangoGlyphString    *glyphs,
 -              hb_glyph_position_t *positions,
 -              gboolean             scale,
 -              double               xscale,
 -              double               yscale,
 -              gboolean             is_hinted)
 -{
 -  int i;
 -
 -  for (i = 0; i < glyphs->num_glyphs; i++)
 -    {
 -      FT_Pos x_pos = positions[i].x_pos;
 -      FT_Pos y_pos = positions[i].y_pos;
 -      int back = i;
 -      int j;
 -      int adjustment;
 -
 -
 -      adjustment = PANGO_UNITS_26_6(positions[i].x_advance);
 -
 -      if (is_hinted)
 -      adjustment = PANGO_UNITS_ROUND (adjustment);
 -      if (G_UNLIKELY (scale))
 -      adjustment *= xscale;
 -
 -      if (positions[i].new_advance)
 -      glyphs->glyphs[i].geometry.width  = adjustment;
 -      else
 -      glyphs->glyphs[i].geometry.width += adjustment;
 -
 -
 -      while (positions[back].back != 0)
 -      {
 -        back  -= positions[back].back;
 -        x_pos += positions[back].x_pos;
 -        y_pos += positions[back].y_pos;
 -      }
 -
 -      for (j = back; j < i; j++)
 -      glyphs->glyphs[i].geometry.x_offset -= glyphs->glyphs[j].geometry.width;
 -
 -      if (G_UNLIKELY (scale))
 -        {
 -        glyphs->glyphs[i].geometry.x_offset += xscale * PANGO_UNITS_26_6(x_pos);
 -        glyphs->glyphs[i].geometry.y_offset -= yscale * PANGO_UNITS_26_6(y_pos);
 -      }
 -      else
 -        {
 -        glyphs->glyphs[i].geometry.x_offset += PANGO_UNITS_26_6(x_pos);
 -        glyphs->glyphs[i].geometry.y_offset -= PANGO_UNITS_26_6(y_pos);
 -      }
 -    }
 -}
 -
 -static void
 -apply_gpos_rtl (PangoGlyphString    *glyphs,
 -              hb_glyph_position_t *positions,
 -              gboolean             scale,
 -              double               xscale,
 -              double               yscale,
 -              gboolean             is_hinted)
 -{
 -  int i;
 -
 -  for (i = 0; i < glyphs->num_glyphs; i++)
 -    {
 -      int i_rev = glyphs->num_glyphs - i - 1;
 -      int back_rev = i_rev;
 -      int back;
 -      FT_Pos x_pos = positions[i_rev].x_pos;
 -      FT_Pos y_pos = positions[i_rev].y_pos;
 -      int j;
 -      int adjustment;
 -
 -
 -      adjustment = PANGO_UNITS_26_6(positions[i_rev].x_advance);
 -
 -      if (is_hinted)
 -      adjustment = PANGO_UNITS_ROUND (adjustment);
 -      if (G_UNLIKELY (scale))
 -      adjustment *= xscale;
 -
 -      if (positions[i_rev].new_advance)
 -      glyphs->glyphs[i].geometry.width  = adjustment;
 -      else
 -      glyphs->glyphs[i].geometry.width += adjustment;
 -
 -
 -      while (positions[back_rev].back != 0)
 -      {
 -        back_rev -= positions[back_rev].back;
 -        x_pos += positions[back_rev].x_pos;
 -        y_pos += positions[back_rev].y_pos;
 -      }
 -
 -      back = glyphs->num_glyphs - back_rev - 1;
 -
 -      for (j = i; j < back; j++)
 -      glyphs->glyphs[i].geometry.x_offset += glyphs->glyphs[j].geometry.width;
 -
 -      if (G_UNLIKELY (scale))
 -        {
 -        glyphs->glyphs[i].geometry.x_offset += xscale * PANGO_UNITS_26_6(x_pos);
 -        glyphs->glyphs[i].geometry.y_offset -= yscale * PANGO_UNITS_26_6(y_pos);
 -      }
 -      else
 -        {
 -        glyphs->glyphs[i].geometry.x_offset += PANGO_UNITS_26_6(x_pos);
 -        glyphs->glyphs[i].geometry.y_offset -= PANGO_UNITS_26_6(y_pos);
 -      }
 -    }
 +    *n_glyphs = hb_buffer_get_length (buffer->buffer);
  }
  
- static void
- swap_range (PangoGlyphString *glyphs, int start, int end)
- {
-   int i, j;
-   for (i = start, j = end - 1; i < j; i++, j--)
-     {
-       PangoGlyphInfo glyph_info;
-       gint log_cluster;
-       glyph_info = glyphs->glyphs[i];
-       glyphs->glyphs[i] = glyphs->glyphs[j];
-       glyphs->glyphs[j] = glyph_info;
-       log_cluster = glyphs->log_clusters[i];
-       glyphs->log_clusters[i] = glyphs->log_clusters[j];
-       glyphs->log_clusters[j] = log_cluster;
-     }
- }
  /**
   * pango_ot_buffer_output
   * @buffer: a #PangoOTBuffer
@@@ -285,7 -394,42 +266,7 @@@ pango_ot_buffer_output (const PangoOTBu
      }
  
    if (buffer->rtl)
-     swap_range (glyphs, 0, glyphs->num_glyphs);
 -    {
 -      /* Swap all glyphs */
 -      pango_glyph_string_reverse_range (glyphs, 0, glyphs->num_glyphs);
 -    }
 -
 -  positions = hb_buffer_get_glyph_positions (buffer->buffer);
 -  if (buffer->applied_gpos)
 -    {
 -      gboolean scale = FALSE;
 -      double xscale = 1, yscale = 1;
 -      PangoFcFontKey *key = _pango_fc_font_get_font_key (buffer->font);
 -
 -      /* This is a kludge, and dupped in pango_fc_font_kern_glyphs().
 -       * Should move the scale factor to PangoFcFont layer. */
 -      if (key) {
 -      const PangoMatrix *matrix = pango_fc_font_key_get_matrix (key);
 -      PangoMatrix identity = PANGO_MATRIX_INIT;
 -      if (G_UNLIKELY (matrix && 0 != memcmp (&identity, matrix, 4 * sizeof (double))))
 -        {
 -          scale = TRUE;
 -          pango_matrix_get_font_scale_factors (matrix, &xscale, &yscale);
 -          if (xscale) xscale = 1 / xscale;
 -          if (yscale) yscale = 1 / yscale;
 -        }
 -      }
 -
 -      if (buffer->rtl)
 -      apply_gpos_rtl (glyphs, positions, scale, xscale, yscale, buffer->font->is_hinted);
 -      else
 -      apply_gpos_ltr (glyphs, positions, scale, xscale, yscale, buffer->font->is_hinted);
 -    }
 -  else
 -    {
 -      /* FIXME we should only do this if the 'kern' feature was requested */
 -      pango_fc_font_kern_glyphs (buffer->font, glyphs);
 -    }
 -
 -  pango_fc_font_unlock_face (buffer->font);
++    pango_glyph_string_reverse_range (glyphs, 0, glyphs->num_glyphs);
 +  if (!buffer->applied_gpos)
 +    pango_fc_font_kern_glyphs (buffer->font, glyphs);
  }
Simple merge