summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--ChangeLog.pre-1-107
-rw-r--r--ChangeLog.pre-1-67
-rw-r--r--ChangeLog.pre-1-87
-rw-r--r--examples/pangoft2topgm.c2
-rw-r--r--examples/renderdemo.c41
-rw-r--r--examples/renderdemo.h25
-rw-r--r--pango/pango-ot.h1
8 files changed, 90 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index d8317c3f..d4a17954 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Mon Aug 16 13:42:38 2004 Owen Taylor <otaylor@redhat.com>
+
+ * pango/pango-ot.h (struct _PangoOTGlyph): Sync with
+ change to OTL_GlyphItemRec.
+ (https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=129982,
+ Jatin Nansi)
+
Tue Aug 10 11:51:10 2004 Owen Taylor <otaylor@redhat.com>
* modules/arabic/arabic-fc.c (arabic_engine_shape): Fix
diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10
index d8317c3f..d4a17954 100644
--- a/ChangeLog.pre-1-10
+++ b/ChangeLog.pre-1-10
@@ -1,3 +1,10 @@
+Mon Aug 16 13:42:38 2004 Owen Taylor <otaylor@redhat.com>
+
+ * pango/pango-ot.h (struct _PangoOTGlyph): Sync with
+ change to OTL_GlyphItemRec.
+ (https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=129982,
+ Jatin Nansi)
+
Tue Aug 10 11:51:10 2004 Owen Taylor <otaylor@redhat.com>
* modules/arabic/arabic-fc.c (arabic_engine_shape): Fix
diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6
index d8317c3f..d4a17954 100644
--- a/ChangeLog.pre-1-6
+++ b/ChangeLog.pre-1-6
@@ -1,3 +1,10 @@
+Mon Aug 16 13:42:38 2004 Owen Taylor <otaylor@redhat.com>
+
+ * pango/pango-ot.h (struct _PangoOTGlyph): Sync with
+ change to OTL_GlyphItemRec.
+ (https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=129982,
+ Jatin Nansi)
+
Tue Aug 10 11:51:10 2004 Owen Taylor <otaylor@redhat.com>
* modules/arabic/arabic-fc.c (arabic_engine_shape): Fix
diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8
index d8317c3f..d4a17954 100644
--- a/ChangeLog.pre-1-8
+++ b/ChangeLog.pre-1-8
@@ -1,3 +1,10 @@
+Mon Aug 16 13:42:38 2004 Owen Taylor <otaylor@redhat.com>
+
+ * pango/pango-ot.h (struct _PangoOTGlyph): Sync with
+ change to OTL_GlyphItemRec.
+ (https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=129982,
+ Jatin Nansi)
+
Tue Aug 10 11:51:10 2004 Owen Taylor <otaylor@redhat.com>
* modules/arabic/arabic-fc.c (arabic_engine_shape): Fix
diff --git a/examples/pangoft2topgm.c b/examples/pangoft2topgm.c
index 52370383..f3a1a15c 100644
--- a/examples/pangoft2topgm.c
+++ b/examples/pangoft2topgm.c
@@ -81,7 +81,9 @@ main(int argc, char *argv[])
}
fontmap = pango_ft2_font_map_new ();
+
pango_ft2_font_map_set_resolution (PANGO_FT2_FONT_MAP (fontmap), opt_dpi, opt_dpi);
+ pango_ft2_font_map_set_default_substitute (PANGO_FT2_FONT_MAP (fontmap), fc_substitute_func, NULL, NULL);
context = pango_ft2_font_map_create_context (PANGO_FT2_FONT_MAP (fontmap));
/* Write contents as pgm file */
diff --git a/examples/renderdemo.c b/examples/renderdemo.c
index b6940380..0cc30fff 100644
--- a/examples/renderdemo.c
+++ b/examples/renderdemo.c
@@ -55,6 +55,7 @@ gboolean opt_waterfall = FALSE;
int opt_width = -1;
int opt_indent = 0;
PangoEllipsizeMode opt_ellipsize = PANGO_ELLIPSIZE_NONE;
+HintMode opt_hinting = HINT_DEFAULT;
/* Text (or markup) to render */
char *text;
@@ -299,6 +300,23 @@ show_help (ArgContext *context,
exit (0);
}
+/* This function gets called to convert a matched pattern into what
+ * we'll use to actually load the font. We turn off hinting since we
+ * want metrics that are independent of scale.
+ */
+void
+fc_substitute_func (FcPattern *pattern, gpointer data)
+{
+ if (opt_hinting != HINT_DEFAULT)
+ {
+ FcPatternDel (pattern, FC_HINTING);
+ FcPatternAddBool (pattern, FC_HINTING, opt_hinting != HINT_NONE);
+
+ FcPatternDel (pattern, FC_AUTOHINT);
+ FcPatternAddBool (pattern, FC_AUTOHINT, opt_hinting != HINT_AUTO);
+ }
+}
+
void
parse_ellipsis (ArgContext *arg_context,
const char *name,
@@ -319,6 +337,27 @@ parse_ellipsis (ArgContext *arg_context,
}
void
+parse_hinting (ArgContext *arg_context,
+ const char *name,
+ const char *arg,
+ gpointer data)
+{
+ static GEnumClass *class = NULL;
+
+ if (!class)
+ class = g_type_class_ref (PANGO_TYPE_ELLIPSIZE_MODE);
+
+ if (strcmp (arg, "none") == 0)
+ opt_hinting = HINT_NONE;
+ else if (strcmp (arg, "auto") == 0)
+ opt_hinting = HINT_AUTO;
+ else if (strcmp (arg, "full") == 0)
+ opt_hinting = HINT_FULL;
+ else
+ fail ("--hinting option must be one of none/auto/full");
+}
+
+void
parse_options (int argc, char *argv[])
{
static const ArgDesc args[] = {
@@ -336,6 +375,8 @@ parse_options (int argc, char *argv[])
ARG_BOOL, &opt_header },
{ "help", "Show this output",
ARG_CALLBACK, NULL, show_help, },
+ { "hinting", "Hinting style [=none/auto/full]",
+ ARG_CALLBACK, NULL, parse_hinting, },
{ "margin", "Set the margin on the output in pixels",
ARG_INT, &opt_margin },
{ "markup", "Interpret contents as Pango markup",
diff --git a/examples/renderdemo.h b/examples/renderdemo.h
index 94a27f49..cffea109 100644
--- a/examples/renderdemo.h
+++ b/examples/renderdemo.h
@@ -20,6 +20,14 @@
*/
#include <pango/pango-layout.h>
+#include <pango/pangofc-fontmap.h>
+
+typedef enum {
+ HINT_DEFAULT,
+ HINT_NONE,
+ HINT_AUTO,
+ HINT_FULL
+} HintMode;
typedef void (*RenderCallback) (PangoLayout *layout,
int x,
@@ -28,13 +36,15 @@ typedef void (*RenderCallback) (PangoLayout *layout,
void fail (const char *format, ...) G_GNUC_PRINTF (1, 2);
-void parse_options (int argc,
- char *argv[]);
-void do_output (PangoContext *context,
- RenderCallback render_cb,
- gpointer render_data,
- int *width,
- int *height);
+void parse_options (int argc,
+ char *argv[]);
+void do_output (PangoContext *context,
+ RenderCallback render_cb,
+ gpointer render_data,
+ int *width,
+ int *height);
+void fc_substitute_func (FcPattern *pattern,
+ gpointer data);
gchar *get_options_string (void);
extern char *prog_name;
@@ -54,3 +64,4 @@ extern gboolean opt_waterfall;
extern int opt_width;
extern int opt_indent;
extern PangoEllipsizeMode opt_ellipsize;
+extern HintMode opt_hinting;
diff --git a/pango/pango-ot.h b/pango/pango-ot.h
index 12091c13..79af9ff9 100644
--- a/pango/pango-ot.h
+++ b/pango/pango-ot.h
@@ -51,6 +51,7 @@ struct _PangoOTGlyph
guint cluster;
gushort component;
gushort ligID;
+ gushort property_cache; /* Internal */
};
PangoOTInfo *pango_ot_info_get (FT_Face face);