~ubuntu-branches/ubuntu/utopic/pango1.0/utopic

« back to all changes in this revision

Viewing changes to pango/pangofc-fontmap.c

  • Committer: Package Import Robot
  • Author(s): Iain Lane
  • Date: 2013-02-21 17:58:07 UTC
  • mfrom: (1.6.6)
  • Revision ID: package-import@ubuntu.com-20130221175807-jtjv8iqwt3ix2px8
Tags: 1.32.5-0ubuntu1
* New upstream release; several changes from Rico Tzschichholz - thanks!
* debian/control:
  - Add build-depend on libharfbuzz-dev (>= 0.9.9)
  - Bump build-depend on libfonconfig1-dev (>= 2.5.0)
* debian/libpango1.0-0.symbols:
  - Updated
* debian/patches:
  - 00git_*.patch, dropped, they are upstream
  - 10_scan-module-files-in-dirs.patch,
    11_module-files-append-module-files-d.patch. refeshed
  - readd-pangox.patch, Readd libpangox library to temporarily
    preserve backwards compat
  - 0001-Link-basicfc-module-to-HarfBuzz.patch: Add, git backport to link
    correctly against harfbuzz.

Show diffs side-by-side

added added

removed removed

Lines of Context:
235
235
static gpointer
236
236
get_gravity_class (void)
237
237
{
238
 
  static GEnumClass *class = NULL;
 
238
  static GEnumClass *class = NULL; /* MT-safe */
239
239
 
240
 
  if (G_UNLIKELY (!class))
241
 
    class = g_type_class_ref (PANGO_TYPE_GRAVITY);
 
240
  if (g_once_init_enter ((gsize*)&class))
 
241
    g_once_init_leave ((gsize*)&class, (gsize)g_type_class_ref (PANGO_TYPE_GRAVITY));
242
242
 
243
243
  return class;
244
244
}
299
299
                    PangoMatrix *matrix)
300
300
{
301
301
  const PangoMatrix *set_matrix;
302
 
  static const PangoMatrix identity = PANGO_MATRIX_INIT;
 
302
  const PangoMatrix identity = PANGO_MATRIX_INIT;
303
303
 
304
304
  set_matrix = context ? pango_context_get_matrix (context) : NULL;
305
305
  *matrix = set_matrix ? *set_matrix : identity;
841
841
  FcPattern *pattern, *font_pattern;
842
842
  PangoFont *font;
843
843
 
844
 
  pattern = pango_fc_patterns_get_pattern (fontset->patterns),
 
844
  pattern = pango_fc_patterns_get_pattern (fontset->patterns);
845
845
  font_pattern = pango_fc_patterns_get_font_pattern (fontset->patterns,
846
846
                                                     fontset->patterns_i++);
847
847
  if (G_UNLIKELY (!font_pattern))
1015
1015
static void
1016
1016
pango_fc_font_map_init (PangoFcFontMap *fcfontmap)
1017
1017
{
1018
 
  static gboolean registered_modules = FALSE;
 
1018
  static gsize registered_modules = 0; /* MT-safe */
1019
1019
  PangoFcFontMapPrivate *priv;
1020
1020
 
1021
1021
  priv = fcfontmap->priv = G_TYPE_INSTANCE_GET_PRIVATE (fcfontmap,
1022
1022
                                                        PANGO_TYPE_FC_FONT_MAP,
1023
1023
                                                        PangoFcFontMapPrivate);
1024
1024
 
1025
 
  if (!registered_modules)
 
1025
  if (g_once_init_enter (&registered_modules))
1026
1026
    {
1027
1027
      int i;
1028
1028
 
1029
 
      registered_modules = TRUE;
1030
 
 
1031
1029
      for (i = 0; _pango_included_fc_modules[i].list; i++)
1032
1030
        pango_module_register (&_pango_included_fc_modules[i]);
 
1031
 
 
1032
      g_once_init_leave(&registered_modules, 1);
1033
1033
    }
1034
1034
 
1035
1035
  priv->n_families = -1;