[goffice] introduce #defines regarding super/subscripts
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] introduce #defines regarding super/subscripts
- Date: Sat, 22 Oct 2011 19:05:16 +0000 (UTC)
commit 2efcba5091fe1049a31f2e456dbb33a24ba1e037
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date: Sat Oct 22 13:03:06 2011 -0600
introduce #defines regarding super/subscripts
2011-10-22 Andreas J. Guelzow <aguelzow pyrshep ca>
* goffice/utils/go-format.h: add format defines
* goffice/utils/go-format.c (go_format_execute): use these defines
ChangeLog | 9 +++++++--
goffice/utils/go-format.c | 7 ++++---
goffice/utils/go-format.h | 6 ++++++
3 files changed, 17 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f8ece52..04cab8a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-10-22 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * goffice/utils/go-format.h: add format defines
+ * goffice/utils/go-format.c (go_format_execute): use these defines
+
2011-10-22 Jean Brefort <jean brefort normalesup org>
* goffice/gtk/go-image-sel.c (cb_entry_focus_out),
@@ -12,8 +17,8 @@
2011-10-21 Jean Brefort <jean brefort normalesup org>
* configure.in: make GSettings the default configuration backend.
- * goffice/graph/gog-renderer.c (gog_renderer_export_image): use GdkPixbuf
- even in the no gtk build.
+ * goffice/graph/gog-renderer.c (gog_renderer_export_image): use
+ GdkPixbuf even in the no gtk build.
* goffice/gtk/go-image-sel.c: redesigned.
* goffice/gtk/go-image-sel.ui: ditto.
* goffice/gtk/goffice-gtk.c (go_gtk_select_image),
diff --git a/goffice/utils/go-format.c b/goffice/utils/go-format.c
index a20e899..f2e3e9c 100644
--- a/goffice/utils/go-format.c
+++ b/goffice/utils/go-format.c
@@ -3474,12 +3474,13 @@ SUFFIX(go_format_execute) (PangoLayout *layout, GString *dst,
start = (guint)GPOINTER_TO_SIZE (markup_stack->data);
markup_stack = g_slist_delete_link (markup_stack, markup_stack);
}
- /* FIXME: we need to calculate the right rise value */
- attr = pango_attr_rise_new (5000);
+ attr = pango_attr_rise_new
+ (GO_SUPERSCRIPT_RISE);
attr->start_index = start;
attr->end_index = end;
pango_attr_list_insert (attrs, attr);
- attr = pango_attr_scale_new (PANGO_SCALE_SMALL);
+ attr = pango_attr_scale_new
+ (GO_SUPERSCRIPT_SCALE);
attr->start_index = start;
attr->end_index = end;
pango_attr_list_insert (attrs, attr);
diff --git a/goffice/utils/go-format.h b/goffice/utils/go-format.h
index ddc517f..d36b739 100644
--- a/goffice/utils/go-format.h
+++ b/goffice/utils/go-format.h
@@ -26,6 +26,12 @@
G_BEGIN_DECLS
+#define GO_SUPERSCRIPT_SCALE PANGO_SCALE_SMALL
+#define GO_SUBSCRIPT_SCALE PANGO_SCALE_SMALL
+#define GO_SUPERSCRIPT_RISE 5000
+#define GO_SUBSCRIPT_RISE -5000
+
+
/* Keep these sequential, they are used as the index for _go_format_builtins */
typedef enum {
GO_FORMAT_UNKNOWN = -1,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]