summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
Diffstat (limited to 'pango')
-rw-r--r--pango/itemize.c8
-rw-r--r--pango/meson.build1
-rw-r--r--pango/pango-trace-private.h4
-rw-r--r--pango/pangofc-fontmap.c24
4 files changed, 26 insertions, 11 deletions
diff --git a/pango/itemize.c b/pango/itemize.c
index 9aa0c29c..442fe8e9 100644
--- a/pango/itemize.c
+++ b/pango/itemize.c
@@ -772,7 +772,8 @@ get_font (ItemizeState *state,
GetFontInfo info;
/* We'd need a separate cache when fallback is disabled, but since lookup
- * with fallback disabled is faster anyways, we just skip caching */
+ * with fallback disabled is faster anyways, we just skip caching
+ */
if (state->enable_fallback && font_cache_get (state->cache, wc, font, position))
return TRUE;
@@ -783,8 +784,9 @@ get_font (ItemizeState *state,
if (state->enable_fallback)
pango_fontset_foreach (state->current_fonts, get_font_foreach, &info);
- else
- get_font_foreach (NULL, get_base_font (state), &info);
+
+ if (!info.font)
+ info.font = get_base_font (state);
*font = info.font;
*position = info.position;
diff --git a/pango/meson.build b/pango/meson.build
index 2273f413..9f4c49be 100644
--- a/pango/meson.build
+++ b/pango/meson.build
@@ -46,6 +46,7 @@ pango_headers = [
'pango-font.h',
'pango-fontmap.h',
'pango-fontset.h',
+ 'pango-fontset-simple.h',
'pango-glyph.h',
'pango-glyph-item.h',
'pango-gravity.h',
diff --git a/pango/pango-trace-private.h b/pango/pango-trace-private.h
index 5d2a4fdf..8d5ebf51 100644
--- a/pango/pango-trace-private.h
+++ b/pango/pango-trace-private.h
@@ -42,9 +42,9 @@ void pango_trace_mark (gint64 begin_time,
#ifndef HAVE_SYSPROF
/* Optimise the whole call out */
#if defined(G_HAVE_ISO_VARARGS)
-#define g_trace_mark(b, n, m, ...)
+#define pango_trace_mark(b, n, m, ...) G_STMT_START { } G_STMT_END
#elif defined(G_HAVE_GNUC_VARARGS)
-#define g_trace_mark(b, n, m...)
+#define pango_trace_mark(b, n, m...) G_STMT_START { } G_STMT_END
#else
/* no varargs macro support; the call will have to be optimised out by the compiler */
#endif
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c
index d198df45..5b0c4999 100644
--- a/pango/pangofc-fontmap.c
+++ b/pango/pangofc-fontmap.c
@@ -835,7 +835,9 @@ match_in_thread (gpointer task_data)
ThreadData *td = task_data;
FcResult result;
FcPattern *match;
- gint64 before = PANGO_TRACE_CURRENT_TIME;
+ gint64 before G_GNUC_UNUSED;
+
+ before = PANGO_TRACE_CURRENT_TIME;
match = FcFontSetMatch (td->config,
&td->fonts, 1,
@@ -860,7 +862,9 @@ sort_in_thread (gpointer task_data)
ThreadData *td = task_data;
FcResult result;
FcFontSet *fontset;
- gint64 before = PANGO_TRACE_CURRENT_TIME;
+ gint64 before G_GNUC_UNUSED;
+
+ before = PANGO_TRACE_CURRENT_TIME;
fontset = FcFontSetSort (td->config,
&td->fonts, 1,
@@ -1023,9 +1027,11 @@ pango_fc_patterns_get_font_pattern (PangoFcPatterns *pats, int i, gboolean *prep
if (i == 0)
{
- gint64 before = PANGO_TRACE_CURRENT_TIME;
+ gint64 before G_GNUC_UNUSED;
gboolean waited = FALSE;
+ before = PANGO_TRACE_CURRENT_TIME;
+
g_mutex_lock (&pats->mutex);
while (!pats->match && !pats->fontset)
@@ -1050,9 +1056,11 @@ pango_fc_patterns_get_font_pattern (PangoFcPatterns *pats, int i, gboolean *prep
}
else
{
- gint64 before = PANGO_TRACE_CURRENT_TIME;
+ gint64 before G_GNUC_UNUSED;
gboolean waited = FALSE;
+ before = PANGO_TRACE_CURRENT_TIME;
+
g_mutex_lock (&pats->mutex);
while (!pats->fontset)
@@ -1354,7 +1362,9 @@ G_DEFINE_ABSTRACT_TYPE_WITH_CODE (PangoFcFontMap, pango_fc_font_map, PANGO_TYPE_
static gpointer
init_in_thread (gpointer task_data)
{
- gint64 before = PANGO_TRACE_CURRENT_TIME;
+ gint64 before G_GNUC_UNUSED;
+
+ before = PANGO_TRACE_CURRENT_TIME;
FcInit ();
@@ -1388,9 +1398,11 @@ start_init_in_thread (PangoFcFontMap *fcfontmap)
static void
wait_for_fc_init (void)
{
- gint64 before = PANGO_TRACE_CURRENT_TIME;
+ gint64 before G_GNUC_UNUSED;
gboolean waited = FALSE;
+ before = PANGO_TRACE_CURRENT_TIME;
+
g_mutex_lock (&fc_init_mutex);
while (fc_initialized < DEFAULT_CONFIG_INITIALIZED)
{