[pango/harfbuzz-ng-external: 90/92] Merge branch 'master' into harfbuzz-ng-external



commit 64ada662476f5b5506a9a455f4c39242ab51ff38
Merge: e008ca8 254f429
Author: Behdad Esfahbod <behdad behdad org>
Date:   Tue Sep 21 15:47:17 2010 -0400

    Merge branch 'master' into harfbuzz-ng-external
    
    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

 Makefile.am                           |    6 +-
 NEWS                                  |   33 +++
 README.win32                          |   28 +--
 acinclude.m4                          |   96 ++++++++
 autogen.sh                            |    1 +
 build/Makefile.am                     |    1 +
 build/win32/Makefile.am               |    1 +
 build/win32/vs9/Makefile.am           |   11 +
 build/win32/vs9/README.txt            |   35 +++
 build/win32/vs9/install.vcproj        |   78 +++++++
 build/win32/vs9/pango.sln             |   79 +++++++
 build/win32/vs9/pango.vcprojin        |  211 +++++++++++++++++
 build/win32/vs9/pango.vsprops         |  137 +++++++++++
 build/win32/vs9/pangocairo.vcprojin   |  170 ++++++++++++++
 build/win32/vs9/pangoft2.vcprojin     |  408 +++++++++++++++++++++++++++++++++
 build/win32/vs9/pangowin32.vcproj     |  165 +++++++++++++
 build/win32/vs9/stdint.h              |   36 +++
 build/win32/vs9/unistd.h              |    1 +
 config.h.win32.in                     |  151 ++++++++++++
 configure.in                          |   52 +----
 docs/pango-docs.sgml                  |    3 +
 docs/pango-sections.txt               |    1 +
 docs/tmpl/atsui-fonts.sgml            |    9 +
 examples/Makefile.am                  |    1 +
 git.mk                                |    7 +-
 modules/basic/Makefile.am             |    3 +-
 modules/basic/basic-atsui.c           |   15 +-
 modules/basic/basic-fc.c              |    1 +
 modules/basic/basic-win32.c           |  187 ++++++---------
 modules/hebrew/hebrew-fc.c            |    1 +
 modules/indic/indic-fc.c              |    1 +
 modules/indic/indic-lang.c            |   73 ++++++
 modules/indic/indic-ot-class-tables.c |   12 +-
 modules/khmer/khmer-fc.c              |    1 +
 modules/thai/thai-fc.c                |    2 +
 modules/tibetan/tibetan-fc.c          |    1 +
 pango-view/Makefile.am                |   19 +-
 pango-view/viewer-render.c            |   49 ++++-
 pango/Makefile.am                     |  207 +++++++++--------
 pango/glyphstring.c                   |    4 +-
 pango/mini-fribidi/Makefile.am        |   10 +
 pango/module-defs-fc.c.win32          |   40 +---
 pango/module-defs-lang.c.win32        |   11 +
 pango/module-defs-win32.c.win32       |   26 +--
 pango/module-defs.h.win32             |   74 ++++++
 pango/modules.c                       |   44 +++-
 pango/pango-engine-private.h          |    2 +-
 pango/pango-engine.c                  |    3 +
 pango/pango-gravity.c                 |    2 +-
 pango/pango-impl-utils.h              |   26 ++-
 pango/pango-layout.c                  |   28 ++-
 pango/pango-ot-buffer.c               |   23 +--
 pango/pango-utils.c                   |   26 ++-
 pango/pangoatsui-fontmap.c            |    8 +-
 pango/pangoatsui-private.h            |    2 +
 pango/pangoatsui.c                    |   30 +++-
 pango/pangoatsui.h                    |    3 +-
 pango/pangocairo-atsuifont.c          |  101 ++++-----
 pango/pangocairo-fcfont.c             |   13 +-
 pango/pangocairo-font.c               |   83 +++++++-
 pango/pangocairo-private.h            |    6 +-
 pango/pangocairo-win32font.c          |   31 +--
 pango/pangocairo.rc.in                |   30 +++
 pango/pangofc-font.c                  |   90 +++++---
 pango/pangofc-private.h               |   48 ++++-
 pango/pangoft2.def                    |    2 +-
 pango/pangowin32-private.h            |    7 +-
 pango/pangowin32.c                    |   29 +--
 pango/pangowin32.def                  |    3 +-
 pango/shape.c                         |   34 +++-
 tests/Makefile.am                     |   19 +-
 71 files changed, 2562 insertions(+), 589 deletions(-)
---
diff --cc modules/basic/basic-fc.c
index b3619c3,e3852c3..cd5cebe
--- a/modules/basic/basic-fc.c
+++ b/modules/basic/basic-fc.c
@@@ -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"
diff --cc pango/Makefile.am
index e1285b5,07f3675..7e033b4
--- a/pango/Makefile.am
+++ b/pango/Makefile.am
@@@ -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\"			\
diff --cc pango/pango-ot-buffer.c
index e818d61,f5a6851..e4b6436
--- a/pango/pango-ot-buffer.c
+++ b/pango/pango-ot-buffer.c
@@@ -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);
  }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]