summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2000-05-29 19:43:10 +0000
committerOwen Taylor <otaylor@src.gnome.org>2000-05-29 19:43:10 +0000
commitf5692a3d420b3430deaf20ac6be3953966c4c479 (patch)
tree79c032733c14efeaee659313aeb9965bdd21fc9a
parentf138d945460f2c6e287e098d0bfe04ed20d57f18 (diff)
downloadpango-f5692a3d420b3430deaf20ac6be3953966c4c479.tar.gz
New function to retrieve the XLFD for a given subfont.
Mon May 29 13:22:36 2000 Owen Taylor <otaylor@redhat.com> * pango/pangox.c pango/pangox.h (pango_x_font_subfont_xlfd): New function to retrieve the XLFD for a given subfont.
-rw-r--r--ChangeLog7
-rw-r--r--ChangeLog.pre-1-07
-rw-r--r--ChangeLog.pre-1-107
-rw-r--r--ChangeLog.pre-1-27
-rw-r--r--ChangeLog.pre-1-47
-rw-r--r--ChangeLog.pre-1-67
-rw-r--r--ChangeLog.pre-1-87
-rw-r--r--pango/pangox-fontmap.c6
-rw-r--r--pango/pangox.c45
-rw-r--r--pango/pangox.h3
10 files changed, 90 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index ab8bdddb..81ed39bd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon May 29 13:22:36 2000 Owen Taylor <otaylor@redhat.com>
+
+ * pango/pangox.c pango/pangox.h (pango_x_font_subfont_xlfd): New
+ function to retrieve the XLFD for a given subfont.
+
Mon May 29 11:14:34 2000 Owen Taylor <otaylor@redhat.com>
* pango/pangox-fontcache.c (pango_x_font_cache_load): Fix bug
@@ -8,7 +13,7 @@ Mon May 29 11:14:34 2000 Owen Taylor <otaylor@redhat.com>
whitespace follows that must go onto the same line.
* examples/viewer-qt.h: Minor changes so it compiles with
- qt-2.0. (Though the utf8 codec in qt-2.0 seems to be slightly
+ Qt-2.0. (Though the utf8 codec in Qt-2.0 seems to be slightly
buggy.)
Sun May 28 16:24:43 2000 Owen Taylor <otaylor@redhat.com>
diff --git a/ChangeLog.pre-1-0 b/ChangeLog.pre-1-0
index ab8bdddb..81ed39bd 100644
--- a/ChangeLog.pre-1-0
+++ b/ChangeLog.pre-1-0
@@ -1,3 +1,8 @@
+Mon May 29 13:22:36 2000 Owen Taylor <otaylor@redhat.com>
+
+ * pango/pangox.c pango/pangox.h (pango_x_font_subfont_xlfd): New
+ function to retrieve the XLFD for a given subfont.
+
Mon May 29 11:14:34 2000 Owen Taylor <otaylor@redhat.com>
* pango/pangox-fontcache.c (pango_x_font_cache_load): Fix bug
@@ -8,7 +13,7 @@ Mon May 29 11:14:34 2000 Owen Taylor <otaylor@redhat.com>
whitespace follows that must go onto the same line.
* examples/viewer-qt.h: Minor changes so it compiles with
- qt-2.0. (Though the utf8 codec in qt-2.0 seems to be slightly
+ Qt-2.0. (Though the utf8 codec in Qt-2.0 seems to be slightly
buggy.)
Sun May 28 16:24:43 2000 Owen Taylor <otaylor@redhat.com>
diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10
index ab8bdddb..81ed39bd 100644
--- a/ChangeLog.pre-1-10
+++ b/ChangeLog.pre-1-10
@@ -1,3 +1,8 @@
+Mon May 29 13:22:36 2000 Owen Taylor <otaylor@redhat.com>
+
+ * pango/pangox.c pango/pangox.h (pango_x_font_subfont_xlfd): New
+ function to retrieve the XLFD for a given subfont.
+
Mon May 29 11:14:34 2000 Owen Taylor <otaylor@redhat.com>
* pango/pangox-fontcache.c (pango_x_font_cache_load): Fix bug
@@ -8,7 +13,7 @@ Mon May 29 11:14:34 2000 Owen Taylor <otaylor@redhat.com>
whitespace follows that must go onto the same line.
* examples/viewer-qt.h: Minor changes so it compiles with
- qt-2.0. (Though the utf8 codec in qt-2.0 seems to be slightly
+ Qt-2.0. (Though the utf8 codec in Qt-2.0 seems to be slightly
buggy.)
Sun May 28 16:24:43 2000 Owen Taylor <otaylor@redhat.com>
diff --git a/ChangeLog.pre-1-2 b/ChangeLog.pre-1-2
index ab8bdddb..81ed39bd 100644
--- a/ChangeLog.pre-1-2
+++ b/ChangeLog.pre-1-2
@@ -1,3 +1,8 @@
+Mon May 29 13:22:36 2000 Owen Taylor <otaylor@redhat.com>
+
+ * pango/pangox.c pango/pangox.h (pango_x_font_subfont_xlfd): New
+ function to retrieve the XLFD for a given subfont.
+
Mon May 29 11:14:34 2000 Owen Taylor <otaylor@redhat.com>
* pango/pangox-fontcache.c (pango_x_font_cache_load): Fix bug
@@ -8,7 +13,7 @@ Mon May 29 11:14:34 2000 Owen Taylor <otaylor@redhat.com>
whitespace follows that must go onto the same line.
* examples/viewer-qt.h: Minor changes so it compiles with
- qt-2.0. (Though the utf8 codec in qt-2.0 seems to be slightly
+ Qt-2.0. (Though the utf8 codec in Qt-2.0 seems to be slightly
buggy.)
Sun May 28 16:24:43 2000 Owen Taylor <otaylor@redhat.com>
diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4
index ab8bdddb..81ed39bd 100644
--- a/ChangeLog.pre-1-4
+++ b/ChangeLog.pre-1-4
@@ -1,3 +1,8 @@
+Mon May 29 13:22:36 2000 Owen Taylor <otaylor@redhat.com>
+
+ * pango/pangox.c pango/pangox.h (pango_x_font_subfont_xlfd): New
+ function to retrieve the XLFD for a given subfont.
+
Mon May 29 11:14:34 2000 Owen Taylor <otaylor@redhat.com>
* pango/pangox-fontcache.c (pango_x_font_cache_load): Fix bug
@@ -8,7 +13,7 @@ Mon May 29 11:14:34 2000 Owen Taylor <otaylor@redhat.com>
whitespace follows that must go onto the same line.
* examples/viewer-qt.h: Minor changes so it compiles with
- qt-2.0. (Though the utf8 codec in qt-2.0 seems to be slightly
+ Qt-2.0. (Though the utf8 codec in Qt-2.0 seems to be slightly
buggy.)
Sun May 28 16:24:43 2000 Owen Taylor <otaylor@redhat.com>
diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6
index ab8bdddb..81ed39bd 100644
--- a/ChangeLog.pre-1-6
+++ b/ChangeLog.pre-1-6
@@ -1,3 +1,8 @@
+Mon May 29 13:22:36 2000 Owen Taylor <otaylor@redhat.com>
+
+ * pango/pangox.c pango/pangox.h (pango_x_font_subfont_xlfd): New
+ function to retrieve the XLFD for a given subfont.
+
Mon May 29 11:14:34 2000 Owen Taylor <otaylor@redhat.com>
* pango/pangox-fontcache.c (pango_x_font_cache_load): Fix bug
@@ -8,7 +13,7 @@ Mon May 29 11:14:34 2000 Owen Taylor <otaylor@redhat.com>
whitespace follows that must go onto the same line.
* examples/viewer-qt.h: Minor changes so it compiles with
- qt-2.0. (Though the utf8 codec in qt-2.0 seems to be slightly
+ Qt-2.0. (Though the utf8 codec in Qt-2.0 seems to be slightly
buggy.)
Sun May 28 16:24:43 2000 Owen Taylor <otaylor@redhat.com>
diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8
index ab8bdddb..81ed39bd 100644
--- a/ChangeLog.pre-1-8
+++ b/ChangeLog.pre-1-8
@@ -1,3 +1,8 @@
+Mon May 29 13:22:36 2000 Owen Taylor <otaylor@redhat.com>
+
+ * pango/pangox.c pango/pangox.h (pango_x_font_subfont_xlfd): New
+ function to retrieve the XLFD for a given subfont.
+
Mon May 29 11:14:34 2000 Owen Taylor <otaylor@redhat.com>
* pango/pangox-fontcache.c (pango_x_font_cache_load): Fix bug
@@ -8,7 +13,7 @@ Mon May 29 11:14:34 2000 Owen Taylor <otaylor@redhat.com>
whitespace follows that must go onto the same line.
* examples/viewer-qt.h: Minor changes so it compiles with
- qt-2.0. (Though the utf8 codec in qt-2.0 seems to be slightly
+ Qt-2.0. (Though the utf8 codec in Qt-2.0 seems to be slightly
buggy.)
Sun May 28 16:24:43 2000 Owen Taylor <otaylor@redhat.com>
diff --git a/pango/pangox-fontmap.c b/pango/pangox-fontmap.c
index 125aada5..ac552e04 100644
--- a/pango/pangox-fontmap.c
+++ b/pango/pangox-fontmap.c
@@ -31,8 +31,8 @@
#define PANGO_TYPE_X_FONT_MAP (pango_x_font_map_get_type ())
#define PANGO_X_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_X_FONT_MAP, PangoXFontMap))
#define PANGO_X_FONT_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_X_FONT_MAP, PangoXFontMapClass))
-#define PANGO_IS_X_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_X_FONT_MAP))
-#define PANGO_IS_X_FONT_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_X_FONT_MAP))
+#define PANGO_X_IS_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_X_FONT_MAP))
+#define PANGO_X_IS_FONT_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_X_FONT_MAP))
#define PANGO_X_FONT_MAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_X_FONT_MAP, PangoXFontMapClass))
typedef struct _PangoXFamilyEntry PangoXFamilyEntry;
@@ -1396,7 +1396,7 @@ PangoXFontCache *
pango_x_font_map_get_font_cache (PangoFontMap *font_map)
{
g_return_val_if_fail (font_map != NULL, NULL);
- g_return_val_if_fail (PANGO_IS_X_FONT_MAP (font_map), NULL);
+ g_return_val_if_fail (PANGO_X_IS_FONT_MAP (font_map), NULL);
return PANGO_X_FONT_MAP (font_map)->font_cache;
}
diff --git a/pango/pangox.c b/pango/pangox.c
index 26b5a31b..f28a0381 100644
--- a/pango/pangox.c
+++ b/pango/pangox.c
@@ -35,8 +35,8 @@
#define PANGO_TYPE_X_FONT (pango_x_font_get_type ())
#define PANGO_X_FONT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_X_FONT, PangoXFont))
#define PANGO_X_FONT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_X_FONT, PangoXFontClass))
-#define PANGO_IS_X_FONT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_X_FONT))
-#define PANGO_IS_X_FONT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_X_FONT))
+#define PANGO_X_IS_FONT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_X_FONT))
+#define PANGO_X_IS_FONT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_X_FONT))
#define PANGO_X_FONT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_X_FONT, PangoXFontClass))
typedef struct _PangoXFontClass PangoXFontClass;
@@ -838,6 +838,16 @@ pango_x_list_subfonts (PangoFont *font,
return n_subfonts;
}
+/**
+ * pango_x_has_glyph:
+ * @font: a #PangoFont which must be from the X backend.
+ * @glyph: the index of a glyph in the font. (Formed
+ * using the PANGO_X_MAKE_GLYPH macro)
+ *
+ * Check if the given glyph is present in a X font.
+ *
+ * Return value: %TRUE if the glyph is present.
+ **/
gboolean
pango_x_has_glyph (PangoFont *font,
PangoGlyph glyph)
@@ -860,6 +870,36 @@ pango_x_has_glyph (PangoFont *font,
return FALSE;
}
+/**
+ * pango_x_font_subfont_xlfd:
+ * @font: a #PangoFont which must be from the X backend
+ * @subfont_id: the id of a subfont within the font.
+ *
+ * Determine the X Logical Font Description for the specified
+ * subfont.
+ *
+ * Return value: A newly allocated string containing the XLFD for the
+ * subfont. This string must be freed with g_free().
+ **/
+char *
+pango_x_font_subfont_xlfd (PangoFont *font,
+ PangoXSubfont subfont_id)
+{
+ PangoXSubfontInfo *subfont;
+
+ g_return_val_if_fail (font != NULL, NULL);
+ g_return_val_if_fail (PANGO_X_IS_FONT (font), NULL);
+
+ subfont = pango_x_find_subfont (font, subfont_id);
+ if (!subfont)
+ {
+ g_warning ("pango_x_font_subfont_xlfd: Invalid subfont_id specified");
+ return NULL;
+ }
+
+ return g_strdup (subfont->xlfd);
+}
+
static void
subfonts_foreach (gpointer key, gpointer value, gpointer data)
{
@@ -1294,4 +1334,3 @@ pango_x_get_item_properties (PangoItem *item,
tmp_list = tmp_list->next;
}
}
-
diff --git a/pango/pangox.h b/pango/pangox.h
index d71bb2dd..5e44ab30 100644
--- a/pango/pangox.h
+++ b/pango/pangox.h
@@ -98,6 +98,9 @@ void pango_x_font_cache_unload (PangoXFontCache *cache,
PangoFontMap * pango_x_font_map_for_display (Display *display);
PangoXFontCache *pango_x_font_map_get_font_cache (PangoFontMap *font_map);
+char *pango_x_font_subfont_xlfd (PangoFont *font,
+ PangoXSubfont subfont_id);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */