glk_set_style_stream(glk_data->current_stream, styl);
}
+/* The first 11 tag names must correspond to the first 11 glk tag names as defined below */
static const gchar* TAG_NAMES[] = {
- "default",
"normal",
"emphasized",
"preformatted",
"user1",
"user2",
"hyperlink",
- "pager"
+ "pager",
+ "default"
};
+/* The first 11 glk tag names must correspond to the first 11 tag names as defined above */
static const gchar* GLK_TAG_NAMES[] = {
"glk-normal",
"glk-emphasized",
tag = gtk_text_tag_new("header");
//g_object_set(tag, "font-desc", default_font_desc, "size-points", 18.0, "weight", PANGO_WEIGHT_BOLD, NULL);
- g_object_set(tag, "size-points", 18.0, "weight", PANGO_WEIGHT_BOLD, NULL);
+ g_object_set(tag, "weight", PANGO_WEIGHT_BOLD, NULL);
g_hash_table_insert(default_text_buffer_styles, "header", tag);
tag = gtk_text_tag_new("subheader");
//g_object_set(tag, "font-desc", default_font_desc, "size-points", 14.0, "weight", PANGO_WEIGHT_BOLD, NULL);
- g_object_set(tag, "size-points", 14.0, "weight", PANGO_WEIGHT_BOLD, NULL);
+ g_object_set(tag, "weight", PANGO_WEIGHT_BOLD, NULL);
g_hash_table_insert(default_text_buffer_styles, "subheader", tag);
tag = gtk_text_tag_new("alert");
for(i=0; i<style_NUMSTYLES; i++) {
tag = gtk_text_tag_new(GLK_TAG_NAMES[i]);
g_hash_table_insert(glk_text_grid_styles, (gchar*) GLK_TAG_NAMES[i], tag);
+ tag = gtk_text_tag_new(GLK_TAG_NAMES[i]);
g_hash_table_insert(glk_text_buffer_styles, (gchar*) GLK_TAG_NAMES[i], tag);
}
get_current_font(guint32 wintype)
{
ChimaraGlkPrivate *glk_data = g_private_get(glk_data_key);
- GtkTextTag *normal;
+ GtkTextTag *tag;
switch(wintype) {
case wintype_TextGrid:
- normal = g_hash_table_lookup(glk_data->styles->text_grid, "normal");
+ tag = g_hash_table_lookup(glk_data->styles->text_grid, "default");
break;
case wintype_TextBuffer:
- normal = g_hash_table_lookup(glk_data->styles->text_buffer, "normal");
+ tag = g_hash_table_lookup(glk_data->styles->text_buffer, "default");
break;
default:
return NULL;
}
PangoFontDescription *font;
- g_object_get( G_OBJECT(normal), "font-desc", &font, NULL );
+ g_object_get( G_OBJECT(tag), "font-desc", &font, NULL );
return font;
}