diff options
author | Damon Chaplin <damon@ximian.com> | 2001-11-15 07:53:39 +0800 |
---|---|---|
committer | Damon Chaplin <damon@src.gnome.org> | 2001-11-15 07:53:39 +0800 |
commit | fcd45ee224da7408c098b65e47d51a8711d56b07 (patch) | |
tree | 30b02219aefe6653a6f8201ca8e9cf63c7dbee3a /calendar/gui | |
parent | 61a5f681e8447286f59078ee1baad8701eaee361 (diff) | |
download | gsoc2013-evolution-fcd45ee224da7408c098b65e47d51a8711d56b07.tar.gz gsoc2013-evolution-fcd45ee224da7408c098b65e47d51a8711d56b07.tar.zst gsoc2013-evolution-fcd45ee224da7408c098b65e47d51a8711d56b07.zip |
Substituted gnome_font_get_width_string() with gnome_font_get_width_utf8()
2001-11-14 Damon Chaplin <damon@ximian.com>
* gui/print.c: Substituted gnome_font_get_width_string() with
gnome_font_get_width_utf8() and gnome_font_get_width_string_n()
with gnome_font_get_width_utf8_sized(). Fixes calendar part of #15379.
svn path=/trunk/; revision=14722
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/print.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/calendar/gui/print.c b/calendar/gui/print.c index 20c1d00fd3..41b72aeb02 100644 --- a/calendar/gui/print.c +++ b/calendar/gui/print.c @@ -337,7 +337,7 @@ print_text(GnomePrintContext *pc, GnomeFont *font, const char *text, gnome_print_gsave (pc); - w = gnome_font_get_width_string (font, text); + w = gnome_font_get_width_utf8 (font, text); switch (align & 3) { case ALIGN_LEFT: @@ -545,7 +545,7 @@ print_month_small (GnomePrintContext *pc, GnomeCalendar *gcal, time_t month, /* Get a reasonable estimate of the largest number we will need, and use it to calculate the offset from the right edge of the cell that we should put the numbers. */ - w = gnome_font_get_width_string (font_bold, "23"); + w = gnome_font_get_width_utf8 (font_bold, "23"); text_xpad = (col_width - w) / 2; gnome_print_setrgbcolor (pc, 0, 0, 0); @@ -679,7 +679,7 @@ bound_text(GnomePrintContext *pc, GnomeFont *font, const char *text, gnome_print_show(pc, outbuffer); *wordstart=c; memcpy(outbuffer, wordstart, o-wordstart); - width = gnome_font_get_width_string_n(font, outbuffer, o-wordstart); + width = gnome_font_get_width_utf8_sized(font, outbuffer, o-wordstart); o=outbuffer+(o-wordstart); wordstart = outbuffer; top -= gnome_font_get_size (font); @@ -959,7 +959,7 @@ print_day_long_event (GnomePrintContext *pc, GnomeFont *font, x1 += 4; print_text (pc, font, buffer, ALIGN_LEFT, x1, x2, y1, y2); - x1 += gnome_font_get_width_string (font, buffer); + x1 += gnome_font_get_width_utf8 (font, buffer); } /* If the event ends before the end of the last day being printed, @@ -978,7 +978,7 @@ print_day_long_event (GnomePrintContext *pc, GnomeFont *font, x2 -= 4; print_text (pc, font, buffer, ALIGN_RIGHT, x1, x2, y1, y2); - x2 -= gnome_font_get_width_string (font, buffer); + x2 -= gnome_font_get_width_utf8 (font, buffer); } /* Print the text. */ @@ -1274,7 +1274,7 @@ print_week_long_event (GnomePrintContext *pc, GnomeFont *font, x1 += 4; print_text (pc, font, buffer, ALIGN_LEFT, x1, x2, y1, y2); - x1 += gnome_font_get_width_string (font, buffer); + x1 += gnome_font_get_width_utf8 (font, buffer); } /* If the event ends before the end of the last day being printed, @@ -1293,7 +1293,7 @@ print_week_long_event (GnomePrintContext *pc, GnomeFont *font, x2 -= 4; print_text (pc, font, buffer, ALIGN_RIGHT, x1, x2, y1, y2); - x2 -= gnome_font_get_width_string (font, buffer); + x2 -= gnome_font_get_width_utf8 (font, buffer); } x1 += 4; @@ -1324,7 +1324,7 @@ print_week_day_event (GnomePrintContext *pc, GnomeFont *font, buffer, sizeof (buffer)); print_text (pc, font, buffer, ALIGN_LEFT, x1, x2, y1, y2); - x1 += gnome_font_get_width_string (font, buffer); + x1 += gnome_font_get_width_utf8 (font, buffer); x1 += 4; print_text (pc, font, text, ALIGN_LEFT, x1, x2, y1, y2); |