Skip to content

Commit

Permalink
fix #524 fix use of fonts whose names end in digits.
Browse files Browse the repository at this point in the history
  • Loading branch information
karlkleinpaste committed Sep 3, 2017
1 parent ce5f263 commit b11949c
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 18 deletions.
15 changes: 13 additions & 2 deletions ChangeLog
@@ -1,7 +1,18 @@
2017-08-23 karl <charcoal@users.sf.net>

* #524 fix use of fonts whose names end in digits.
(ex. Goudy Bookletter 1911.)

2017-08-23 karl <charcoal@users.sf.net>

* #821 update ubuntu installation instructions.
* update french and trad.chinese translations.
* tweak TODO to ref github wiki.

2017-08-21 karl <charcoal@users.sf.net>

* add #791 full-screen of current bible on F11.
* make Japanese glosses default on.
* #791 add full-screen of current bible on F11.
* make glosses default on.

2017-08-20 karl <charcoal@users.sf.net>

Expand Down
8 changes: 3 additions & 5 deletions TODO
@@ -1,6 +1,4 @@
* Abbreviation support
* remove inconsistent use cases
* add manual abbrev choice

For more information on bugs and feature requests:
See the Xiphos Wiki at:
https://github.com/crosswire/xiphos/wiki
For information on bugs and requests:
https://github.com/crosswire/xiphos/issues
20 changes: 9 additions & 11 deletions src/gnome2/font_dialog.c
Expand Up @@ -64,18 +64,16 @@ static MOD_FONT *mf;
static gchar *get_html_font_name(gchar *fontname)
{
gchar buf[80];
gint len, i = 0;

len = strlen(fontname);
for (i = 0; (i < 79 && i < len - 3); i++) {
if (!isdigit(fontname[i])) {
buf[i] = fontname[i];
buf[i + 1] = '\0';
} else
break;
}
gint idx, i = 0;

/* strip trailing size digits from picker-chosen name. */
idx = strlen(fontname) - 1;
while ((idx > 0) && isdigit(fontname[idx]))
fontname[idx--] = '\0';
if (fontname[idx] = ' ')
fontname[idx] = '\0';

return g_strdup(buf);
return g_strdup(fontname);
}

/******************************************************************************
Expand Down

0 comments on commit b11949c

Please sign in to comment.