[gcompris] Replaced hard coded fonts with fontset fonts
- From: Bruno Coudoin <bcoudoin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcompris] Replaced hard coded fonts with fontset fonts
- Date: Mon, 12 Aug 2013 23:09:47 +0000 (UTC)
commit bc6051d6b2e6b2cd07a26df227038de759432545
Author: GunChleoc <fios foramnagaidhlig net>
Date: Fri May 17 19:56:13 2013 +0100
Replaced hard coded fonts with fontset fonts
src/awele-activity/awele.c | 6 +++---
src/gcompris/about.c | 2 +-
src/gcompris/file_selector.c | 6 +++---
src/gcompris/gcompris.h | 29 ++++++++++++++++++-----------
src/gcompris/skin.c | 6 ++++++
src/gcompris/skin.h | 2 ++
src/hanoi-activity/hanoi.c | 2 +-
src/scalesboard-activity/scale.c | 4 ++--
8 files changed, 36 insertions(+), 21 deletions(-)
---
diff --git a/src/awele-activity/awele.c b/src/awele-activity/awele.c
index 68e5365..f827f20 100644
--- a/src/awele-activity/awele.c
+++ b/src/awele-activity/awele.c
@@ -482,7 +482,7 @@ awele_create_item (GooCanvasItem * parent)
((i < 6) ? 288 : 4) + OFFSET_Y,
-1,
GTK_ANCHOR_CENTER,
- "font", "sans 20",
+ "font", gc_skin_font_board_big,
"fill-color", "black",
NULL);
}
@@ -506,7 +506,7 @@ awele_create_item (GooCanvasItem * parent)
156 + OFFSET_Y,
-1,
GTK_ANCHOR_CENTER,
- "font", "sans 24",
+ "font", gc_skin_font_board_big,
"fill-color", "white",
NULL);
}
@@ -536,7 +536,7 @@ awele_create_item (GooCanvasItem * parent)
(double) 410 + OFFSET_Y,
-1,
GTK_ANCHOR_CENTER,
- "font", "sans 20",
+ "font", gc_skin_font_board_medium_bold,
"fill-color", "red",
NULL);
diff --git a/src/gcompris/about.c b/src/gcompris/about.c
index 6ef0725..f345981 100644
--- a/src/gcompris/about.c
+++ b/src/gcompris/about.c
@@ -209,7 +209,7 @@ void gc_about_start ()
(gdouble) y - 40,
-1,
GTK_ANCHOR_CENTER,
- "font", "sans 8",
+ "font", gc_skin_font_board_minuscule,
"fill-color-rgba", gc_skin_color_content,
NULL);
diff --git a/src/gcompris/file_selector.c b/src/gcompris/file_selector.c
index 0cf5a89..0bca149 100644
--- a/src/gcompris/file_selector.c
+++ b/src/gcompris/file_selector.c
@@ -374,7 +374,7 @@ display_files(GooCanvasItem *root_item, gchar *rootdir)
(gdouble)directory_label_y,
-1,
GTK_ANCHOR_NW,
- "font", "Sans 7",
+ "font", gc_skin_font_board_minuscule,
"fill-color-rgba",
gc_skin_get_color("gcompris/fileselectcol"),
NULL);
@@ -464,7 +464,7 @@ display_files(GooCanvasItem *root_item, gchar *rootdir)
iy + 10,
-1,
GTK_ANCHOR_CENTER,
- "font", "Sans 6",
+ "font", gc_skin_font_board_minuscule,
"fill-color-rgba",
gc_skin_get_color("gcompris/fileselectcol"),
NULL);
@@ -482,7 +482,7 @@ display_files(GooCanvasItem *root_item, gchar *rootdir)
iy + IMAGE_HEIGHT - 30,
-1,
GTK_ANCHOR_CENTER,
- "font", "Sans 7",
+ "font", gc_skin_font_board_minuscule,
"fill-color-rgba", gc_skin_get_color("gcompris/fileselectcol"),
NULL);
g_free(file_wo_ext);
diff --git a/src/gcompris/gcompris.h b/src/gcompris/gcompris.h
index a8d96c3..b34f0b7 100644
--- a/src/gcompris/gcompris.h
+++ b/src/gcompris/gcompris.h
@@ -257,17 +257,24 @@ gint gc_timing (gint timeout, gint actors_number);
#define FONT_SUBTITLE_FALLBACK "sans 12"
#define FONT_CONTENT "sans 12"
#define FONT_CONTENT_FALLBACK "sans 12"
-
-#define FONT_BOARD_TINY "sans 10"
-#define FONT_BOARD_SMALL "sans 12"
-#define FONT_BOARD_MEDIUM "sans 14"
-#define FONT_BOARD_BIG "sans 16"
-#define FONT_BOARD_BIG_BOLD "sans bold 16"
-#define FONT_BOARD_FIXED "fixed 12"
-#define FONT_BOARD_TITLE "sans 20"
-#define FONT_BOARD_TITLE_BOLD "sans bold 20"
-#define FONT_BOARD_HUGE "sans 28"
-#define FONT_BOARD_HUGE_BOLD "sans bold 28"
+#define FONT_HELPTEXT "sans 10"
+
+#define FONT_MENU_TITLE "sans 16"
+#define FONT_MENU_DESCRIPTION "sans 10"
+
+#define FONT_BOARD_MINUSCULE "sans 6"
+#define FONT_BOARD_TINY "sans 10"
+#define FONT_BOARD_SMALL "sans 12"
+#define FONT_BOARD_MEDIUM "sans 14"
+#define FONT_BOARD_MEDIUM_BOLD "sans bold 14"
+#define FONT_BOARD_BIG "sans 16"
+#define FONT_BOARD_BIG_BOLD "sans bold 16"
+#define FONT_BOARD_FIXED "fixed 12"
+#define FONT_BOARD_TITLE "sans 20"
+#define FONT_BOARD_TITLE_BOLD "sans bold 20"
+#define FONT_BOARD_LEVELMENU "sans bold 28"
+#define FONT_BOARD_HUGE "sans 28"
+#define FONT_BOARD_HUGE_BOLD "sans bold 28"
/*=========================================================*/
// These are gcompris defined cursors
diff --git a/src/gcompris/skin.c b/src/gcompris/skin.c
index 8f4d4d0..1f68dcd 100644
--- a/src/gcompris/skin.c
+++ b/src/gcompris/skin.c
@@ -36,9 +36,11 @@ gchar* gc_skin_font_title;
gchar* gc_skin_font_subtitle;
gchar* gc_skin_font_content;
+gchar* gc_skin_font_board_minuscule;
gchar* gc_skin_font_board_tiny;
gchar* gc_skin_font_board_small;
gchar* gc_skin_font_board_medium;
+gchar* gc_skin_font_board_medium_bold;
gchar* gc_skin_font_board_big;
gchar* gc_skin_font_board_big_bold;
gchar* gc_skin_font_board_fixed;
@@ -198,12 +200,16 @@ gc_skin_setup_vars(void)
gc_skin_font_content =
gc_skin_get_font_default("gcompris/content", FONT_CONTENT);
+ gc_skin_font_board_minuscule =
+ gc_skin_get_font_default("gcompris/board/minuscule", FONT_BOARD_MINUSCULE);
gc_skin_font_board_tiny =
gc_skin_get_font_default("gcompris/board/tiny", FONT_BOARD_TINY);
gc_skin_font_board_small =
gc_skin_get_font_default("gcompris/board/small", FONT_BOARD_SMALL);
gc_skin_font_board_medium =
gc_skin_get_font_default("gcompris/board/medium", FONT_BOARD_MEDIUM);
+ gc_skin_font_board_medium_bold =
+ gc_skin_get_font_default("gcompris/board/medium bold", FONT_BOARD_MEDIUM_BOLD);
gc_skin_font_board_big =
gc_skin_get_font_default("gcompris/board/big", FONT_BOARD_BIG);
gc_skin_font_board_big_bold =
diff --git a/src/gcompris/skin.h b/src/gcompris/skin.h
index 8602367..6cb2f91 100644
--- a/src/gcompris/skin.h
+++ b/src/gcompris/skin.h
@@ -32,9 +32,11 @@ extern gchar* gc_skin_font_title;
extern gchar* gc_skin_font_subtitle;
extern gchar* gc_skin_font_content;
+extern gchar* gc_skin_font_board_minuscule;
extern gchar* gc_skin_font_board_tiny;
extern gchar* gc_skin_font_board_small;
extern gchar* gc_skin_font_board_medium;
+extern gchar* gc_skin_font_board_medium_bold;
extern gchar* gc_skin_font_board_big;
extern gchar* gc_skin_font_board_big_bold;
extern gchar* gc_skin_font_board_fixed;
diff --git a/src/hanoi-activity/hanoi.c b/src/hanoi-activity/hanoi.c
index 11d1b45..19e6286 100644
--- a/src/hanoi-activity/hanoi.c
+++ b/src/hanoi-activity/hanoi.c
@@ -537,7 +537,7 @@ hanoi_create_item(GooCanvasItem *parent)
0,
-1,
GTK_ANCHOR_NORTH,
- "font", "sans bold 14",
+ "font", gc_skin_font_board_medium_bold,
"fill-color", "white",
NULL);
diff --git a/src/scalesboard-activity/scale.c b/src/scalesboard-activity/scale.c
index ed120b6..e3ecd29 100644
--- a/src/scalesboard-activity/scale.c
+++ b/src/scalesboard-activity/scale.c
@@ -659,9 +659,9 @@ scale_list_add_weight(GooCanvasItem *group,
}
if (show_weight < 1000) {
- weight_text = g_strdup_printf("%d%s", weight, show_weight ? "\ng" : "");
+ weight_text = g_strdup_printf("%d%s", weight, show_weight ? "\ng" : "");
} else {
- weight_text = g_strdup_printf("%.1f\nkg", (double)weight / 1000);
+ weight_text = g_strdup_printf("%.1f\nkg", (double)weight / 1000);
}
pixmap = gc_pixmap_load("scale/masse.png");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]