[gnome-control-center] [font-viewer] Use pango_language_get_sample_string for sample text
- From: Jens Granseuer <jensg src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-control-center] [font-viewer] Use pango_language_get_sample_string for sample text
- Date: Sat, 14 Nov 2009 13:20:52 +0000 (UTC)
commit db072ff49f7996339dc44d5802368f4dfcbc3658
Author: Jens Granseuer <jensgr gmx net>
Date: Sat Nov 14 14:03:59 2009 +0100
[font-viewer] Use pango_language_get_sample_string for sample text
Closes bug #595107.
font-viewer/font-view.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/font-viewer/font-view.c b/font-viewer/font-view.c
index 336ecf2..987937e 100644
--- a/font-viewer/font-view.c
+++ b/font-viewer/font-view.c
@@ -79,7 +79,7 @@ draw_string(Display *xdisplay, XftDraw *draw, XftFont *font, XftColor *colour,
}
static gboolean
-check_font_contain_text (FT_Face face, gchar *text)
+check_font_contain_text (FT_Face face, const gchar *text)
{
while (text && *text)
{
@@ -98,7 +98,7 @@ create_text_pixmap(GtkWidget *drawing_area, FT_Face face)
{
gint i, pixmap_width, pixmap_height, pos_y, textlen;
GdkPixmap *pixmap = NULL;
- gchar *text;
+ const gchar *text;
Display *xdisplay;
Drawable xdrawable;
Visual *xvisual;
@@ -110,10 +110,10 @@ create_text_pixmap(GtkWidget *drawing_area, FT_Face face)
gint *sizes = NULL, n_sizes, alpha_size;
FcCharSet *charset = NULL;
- text = _("The quick brown fox jumps over the lazy dog. 0123456789");
+ text = pango_language_get_sample_string(NULL);
if (! check_font_contain_text (face, text))
{
- text = "The quick brown fox jumps over the lazy dog. 0123456789";
+ pango_language_get_sample_string (pango_language_from_string ("en_US"));
}
textlen = strlen(text);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]