[pango] [fc] List all bitmap sizes of FcPattern
- From: Behdad Esfahbod <behdad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango] [fc] List all bitmap sizes of FcPattern
- Date: Sun, 8 Jul 2018 15:50:05 +0000 (UTC)
commit 293d56ceeaf64b9909ba296965603edd0a656203
Author: Behdad Esfahbod <behdad behdad org>
Date: Sun Jul 8 17:47:59 2018 +0200
[fc] List all bitmap sizes of FcPattern
Apple Color Emoji for example has multiple strikes... We were
only listing first.
pango/pangofc-fontmap.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c
index cc4694d2..97a07307 100644
--- a/pango/pangofc-fontmap.c
+++ b/pango/pangofc-fontmap.c
@@ -2410,13 +2410,15 @@ pango_fc_face_list_sizes (PangoFontFace *face,
{
GArray *size_array;
double size, dpi = -1.0;
- int i, size_i;
+ int i, size_i, j;
size_array = g_array_new (FALSE, FALSE, sizeof (int));
for (i = 0; i < fontset->nfont; i++)
{
- if (FcPatternGetDouble (fontset->fonts[i], FC_PIXEL_SIZE, 0, &size) == FcResultMatch)
+ for (j = 0;
+ FcPatternGetDouble (fontset->fonts[i], FC_PIXEL_SIZE, j, &size) == FcResultMatch;
+ j++)
{
if (dpi < 0)
dpi = pango_fc_font_map_get_resolution (fcface->family->fontmap, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]