summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Larsson <alexl@redhat.com>2001-11-27 19:19:53 +0000
committerAlexander Larsson <alexl@src.gnome.org>2001-11-27 19:19:53 +0000
commit02d26fc118ad513f66cf9e9ebf6de1ec3ce548ba (patch)
treef9186285c6544c351c6b0b11aa8ab9768ab5038a
parente369baa4f65aaceb31d8aeaf322e5d1fe0869311 (diff)
downloadpango-02d26fc118ad513f66cf9e9ebf6de1ec3ce548ba.tar.gz
pango/pangoft2-private.h Take extra parameter include_size that determines
2001-11-27 Alex Larsson <alexl@redhat.com> * pango/pangoft2-private.h * pango/pangoft2-fontmap.c (_pango_ft2_font_desc_from_pattern): Take extra parameter include_size that determines if the descriptor includes the size. * pango/pangoft2.c (_pango_ft2_font_new): Include size in ft2font->description. * pango/pangoxft-private.h * pango/pangoxft-fontmap.c (_pango_xft_font_desc_from_pattern): Take extra parameter include_size that determines if the descriptor includes the size. * pango/pangoxft-font.c: Include size in xfont->description.
-rw-r--r--ChangeLog18
-rw-r--r--ChangeLog.pre-1-018
-rw-r--r--ChangeLog.pre-1-1018
-rw-r--r--ChangeLog.pre-1-218
-rw-r--r--ChangeLog.pre-1-418
-rw-r--r--ChangeLog.pre-1-618
-rw-r--r--ChangeLog.pre-1-818
-rw-r--r--pango/pangoft2-fontmap.c9
-rw-r--r--pango/pangoft2-private.h3
-rw-r--r--pango/pangoft2.c3
-rw-r--r--pango/pangoxft-font.c2
-rw-r--r--pango/pangoxft-fontmap.c8
-rw-r--r--pango/pangoxft-private.h3
13 files changed, 145 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 2800c802..028eed74 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2001-11-27 Alex Larsson <alexl@redhat.com>
+
+ * pango/pangoft2-private.h
+ * pango/pangoft2-fontmap.c (_pango_ft2_font_desc_from_pattern):
+ Take extra parameter include_size that determines if the
+ descriptor includes the size.
+
+ * pango/pangoft2.c (_pango_ft2_font_new):
+ Include size in ft2font->description.
+
+ * pango/pangoxft-private.h
+ * pango/pangoxft-fontmap.c (_pango_xft_font_desc_from_pattern):
+ Take extra parameter include_size that determines if the
+ descriptor includes the size.
+
+ * pango/pangoxft-font.c:
+ Include size in xfont->description.
+
Mon Nov 26 19:24:21 2001 Owen Taylor <otaylor@redhat.com>
* configure.in tests/Makefile.am tests/cxx-test.C: Add
diff --git a/ChangeLog.pre-1-0 b/ChangeLog.pre-1-0
index 2800c802..028eed74 100644
--- a/ChangeLog.pre-1-0
+++ b/ChangeLog.pre-1-0
@@ -1,3 +1,21 @@
+2001-11-27 Alex Larsson <alexl@redhat.com>
+
+ * pango/pangoft2-private.h
+ * pango/pangoft2-fontmap.c (_pango_ft2_font_desc_from_pattern):
+ Take extra parameter include_size that determines if the
+ descriptor includes the size.
+
+ * pango/pangoft2.c (_pango_ft2_font_new):
+ Include size in ft2font->description.
+
+ * pango/pangoxft-private.h
+ * pango/pangoxft-fontmap.c (_pango_xft_font_desc_from_pattern):
+ Take extra parameter include_size that determines if the
+ descriptor includes the size.
+
+ * pango/pangoxft-font.c:
+ Include size in xfont->description.
+
Mon Nov 26 19:24:21 2001 Owen Taylor <otaylor@redhat.com>
* configure.in tests/Makefile.am tests/cxx-test.C: Add
diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10
index 2800c802..028eed74 100644
--- a/ChangeLog.pre-1-10
+++ b/ChangeLog.pre-1-10
@@ -1,3 +1,21 @@
+2001-11-27 Alex Larsson <alexl@redhat.com>
+
+ * pango/pangoft2-private.h
+ * pango/pangoft2-fontmap.c (_pango_ft2_font_desc_from_pattern):
+ Take extra parameter include_size that determines if the
+ descriptor includes the size.
+
+ * pango/pangoft2.c (_pango_ft2_font_new):
+ Include size in ft2font->description.
+
+ * pango/pangoxft-private.h
+ * pango/pangoxft-fontmap.c (_pango_xft_font_desc_from_pattern):
+ Take extra parameter include_size that determines if the
+ descriptor includes the size.
+
+ * pango/pangoxft-font.c:
+ Include size in xfont->description.
+
Mon Nov 26 19:24:21 2001 Owen Taylor <otaylor@redhat.com>
* configure.in tests/Makefile.am tests/cxx-test.C: Add
diff --git a/ChangeLog.pre-1-2 b/ChangeLog.pre-1-2
index 2800c802..028eed74 100644
--- a/ChangeLog.pre-1-2
+++ b/ChangeLog.pre-1-2
@@ -1,3 +1,21 @@
+2001-11-27 Alex Larsson <alexl@redhat.com>
+
+ * pango/pangoft2-private.h
+ * pango/pangoft2-fontmap.c (_pango_ft2_font_desc_from_pattern):
+ Take extra parameter include_size that determines if the
+ descriptor includes the size.
+
+ * pango/pangoft2.c (_pango_ft2_font_new):
+ Include size in ft2font->description.
+
+ * pango/pangoxft-private.h
+ * pango/pangoxft-fontmap.c (_pango_xft_font_desc_from_pattern):
+ Take extra parameter include_size that determines if the
+ descriptor includes the size.
+
+ * pango/pangoxft-font.c:
+ Include size in xfont->description.
+
Mon Nov 26 19:24:21 2001 Owen Taylor <otaylor@redhat.com>
* configure.in tests/Makefile.am tests/cxx-test.C: Add
diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4
index 2800c802..028eed74 100644
--- a/ChangeLog.pre-1-4
+++ b/ChangeLog.pre-1-4
@@ -1,3 +1,21 @@
+2001-11-27 Alex Larsson <alexl@redhat.com>
+
+ * pango/pangoft2-private.h
+ * pango/pangoft2-fontmap.c (_pango_ft2_font_desc_from_pattern):
+ Take extra parameter include_size that determines if the
+ descriptor includes the size.
+
+ * pango/pangoft2.c (_pango_ft2_font_new):
+ Include size in ft2font->description.
+
+ * pango/pangoxft-private.h
+ * pango/pangoxft-fontmap.c (_pango_xft_font_desc_from_pattern):
+ Take extra parameter include_size that determines if the
+ descriptor includes the size.
+
+ * pango/pangoxft-font.c:
+ Include size in xfont->description.
+
Mon Nov 26 19:24:21 2001 Owen Taylor <otaylor@redhat.com>
* configure.in tests/Makefile.am tests/cxx-test.C: Add
diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6
index 2800c802..028eed74 100644
--- a/ChangeLog.pre-1-6
+++ b/ChangeLog.pre-1-6
@@ -1,3 +1,21 @@
+2001-11-27 Alex Larsson <alexl@redhat.com>
+
+ * pango/pangoft2-private.h
+ * pango/pangoft2-fontmap.c (_pango_ft2_font_desc_from_pattern):
+ Take extra parameter include_size that determines if the
+ descriptor includes the size.
+
+ * pango/pangoft2.c (_pango_ft2_font_new):
+ Include size in ft2font->description.
+
+ * pango/pangoxft-private.h
+ * pango/pangoxft-fontmap.c (_pango_xft_font_desc_from_pattern):
+ Take extra parameter include_size that determines if the
+ descriptor includes the size.
+
+ * pango/pangoxft-font.c:
+ Include size in xfont->description.
+
Mon Nov 26 19:24:21 2001 Owen Taylor <otaylor@redhat.com>
* configure.in tests/Makefile.am tests/cxx-test.C: Add
diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8
index 2800c802..028eed74 100644
--- a/ChangeLog.pre-1-8
+++ b/ChangeLog.pre-1-8
@@ -1,3 +1,21 @@
+2001-11-27 Alex Larsson <alexl@redhat.com>
+
+ * pango/pangoft2-private.h
+ * pango/pangoft2-fontmap.c (_pango_ft2_font_desc_from_pattern):
+ Take extra parameter include_size that determines if the
+ descriptor includes the size.
+
+ * pango/pangoft2.c (_pango_ft2_font_new):
+ Include size in ft2font->description.
+
+ * pango/pangoxft-private.h
+ * pango/pangoxft-fontmap.c (_pango_xft_font_desc_from_pattern):
+ Take extra parameter include_size that determines if the
+ descriptor includes the size.
+
+ * pango/pangoxft-font.c:
+ Include size in xfont->description.
+
Mon Nov 26 19:24:21 2001 Owen Taylor <otaylor@redhat.com>
* configure.in tests/Makefile.am tests/cxx-test.C: Add
diff --git a/pango/pangoft2-fontmap.c b/pango/pangoft2-fontmap.c
index bb4f076a..e472a08d 100644
--- a/pango/pangoft2-fontmap.c
+++ b/pango/pangoft2-fontmap.c
@@ -653,11 +653,13 @@ pango_ft2_font_map_cache_clear (PangoFT2FontMap *ft2fontmap)
*/
PangoFontDescription *
-_pango_ft2_font_desc_from_pattern (MiniXftPattern *pattern)
+_pango_ft2_font_desc_from_pattern (MiniXftPattern *pattern,
+ gboolean include_size)
{
PangoFontDescription *desc;
PangoStyle style;
PangoWeight weight;
+ double size;
char *s;
int i;
@@ -700,6 +702,9 @@ _pango_ft2_font_desc_from_pattern (MiniXftPattern *pattern)
else
weight = PANGO_WEIGHT_NORMAL;
+ if (include_size && MiniXftPatternGetDouble (pattern, XFT_SIZE, 0, &size) == MiniXftResultMatch)
+ pango_font_description_set_size (desc, size * PANGO_SCALE);
+
pango_font_description_set_weight (desc, weight);
pango_font_description_set_variant (desc, PANGO_VARIANT_NORMAL);
@@ -730,7 +735,7 @@ pango_ft2_face_describe (PangoFontFace *face)
result_pattern = MiniXftFontMatch ((Display *)1, 0, match_pattern, &res);
if (result_pattern)
{
- desc = _pango_ft2_font_desc_from_pattern (result_pattern);
+ desc = _pango_ft2_font_desc_from_pattern (result_pattern, FALSE);
MiniXftPatternDestroy (result_pattern);
}
diff --git a/pango/pangoft2-private.h b/pango/pangoft2-private.h
index 5dd5b3d5..e7276bd3 100644
--- a/pango/pangoft2-private.h
+++ b/pango/pangoft2-private.h
@@ -112,6 +112,7 @@ void _pango_ft2_font_map_add (PangoFontMap *fontmap,
void _pango_ft2_font_map_remove (PangoFontMap *fontmap,
PangoFT2Font *ft2font);
const char *_pango_ft2_ft_strerror (FT_Error error);
-PangoFontDescription *_pango_ft2_font_desc_from_pattern (MiniXftPattern *pattern);
+PangoFontDescription *_pango_ft2_font_desc_from_pattern (MiniXftPattern *pattern,
+ gboolean include_size);
#endif /* __PANGOFT2_PRIVATE_H__ */
diff --git a/pango/pangoft2.c b/pango/pangoft2.c
index 9823c61f..a5b83ba1 100644
--- a/pango/pangoft2.c
+++ b/pango/pangoft2.c
@@ -97,7 +97,7 @@ _pango_ft2_font_new (PangoFontMap *fontmap,
ft2font->font_pattern = pattern;
g_object_ref (G_OBJECT (fontmap));
- ft2font->description = _pango_ft2_font_desc_from_pattern (pattern);
+ ft2font->description = _pango_ft2_font_desc_from_pattern (pattern, TRUE);
ft2font->face = NULL;
if (MiniXftPatternGetDouble (pattern, XFT_PIXEL_SIZE, 0, &d) == MiniXftResultMatch)
@@ -573,7 +573,6 @@ pango_ft2_font_describe (PangoFont *font)
ft2font = PANGO_FT2_FONT (font);
desc = pango_font_description_copy (ft2font->description);
- pango_font_description_set_size (desc, ft2font->size);
return desc;
}
diff --git a/pango/pangoxft-font.c b/pango/pangoxft-font.c
index a5355dc5..c8392fb5 100644
--- a/pango/pangoxft-font.c
+++ b/pango/pangoxft-font.c
@@ -125,7 +125,7 @@ _pango_xft_font_new (PangoFontMap *fontmap,
xfont->font_pattern = pattern;
g_object_ref (G_OBJECT (fontmap));
- xfont->description = _pango_xft_font_desc_from_pattern (pattern);
+ xfont->description = _pango_xft_font_desc_from_pattern (pattern, TRUE);
xfont->xft_font = NULL;
_pango_xft_font_map_add (xfont->fontmap, xfont);
diff --git a/pango/pangoxft-fontmap.c b/pango/pangoxft-fontmap.c
index eef3ce77..53dbaec1 100644
--- a/pango/pangoxft-fontmap.c
+++ b/pango/pangoxft-fontmap.c
@@ -725,11 +725,12 @@ _pango_xft_font_map_get_info (PangoFontMap *fontmap,
*/
PangoFontDescription *
-_pango_xft_font_desc_from_pattern (XftPattern *pattern)
+_pango_xft_font_desc_from_pattern (XftPattern *pattern, gboolean include_size)
{
PangoFontDescription *desc;
PangoStyle style;
PangoWeight weight;
+ double size;
char *s;
int i;
@@ -772,6 +773,9 @@ _pango_xft_font_desc_from_pattern (XftPattern *pattern)
else
weight = PANGO_WEIGHT_NORMAL;
+ if (include_size && XftPatternGetDouble (pattern, XFT_SIZE, 0, &size) == XftResultMatch)
+ pango_font_description_set_size (desc, size * PANGO_SCALE);
+
pango_font_description_set_weight (desc, weight);
pango_font_description_set_variant (desc, PANGO_VARIANT_NORMAL);
@@ -802,7 +806,7 @@ pango_xft_face_describe (PangoFontFace *face)
result_pattern = XftFontMatch (xfontmap->display, xfontmap->screen, match_pattern, &res);
if (result_pattern)
{
- desc = _pango_xft_font_desc_from_pattern (result_pattern);
+ desc = _pango_xft_font_desc_from_pattern (result_pattern, FALSE);
XftPatternDestroy (result_pattern);
}
diff --git a/pango/pangoxft-private.h b/pango/pangoxft-private.h
index 65ca2c85..57db3efa 100644
--- a/pango/pangoxft-private.h
+++ b/pango/pangoxft-private.h
@@ -64,7 +64,8 @@ void _pango_xft_font_map_get_info (PangoFontMap *fo
Display **display,
int *screen);
-PangoFontDescription * _pango_xft_font_desc_from_pattern (XftPattern *pattern);
+PangoFontDescription * _pango_xft_font_desc_from_pattern (XftPattern *pattern,
+ gboolean include_size);
G_END_DECLS