gtkhtml r8882 - trunk/gtkhtml
- From: mbarnes svn gnome org
- To: svn-commits-list gnome org
- Subject: gtkhtml r8882 - trunk/gtkhtml
- Date: Mon, 30 Jun 2008 16:05:12 +0000 (UTC)
Author: mbarnes
Date: Mon Jun 30 16:05:11 2008
New Revision: 8882
URL: http://svn.gnome.org/viewvc/gtkhtml?rev=8882&view=rev
Log:
2008-06-30 Matthew Barnes <mbarnes redhat com>
** Fixes the final issue in bug #446894
* htmlprinter.c (html_printer_new):
Use the widget style's font rather than a hardcoded font. Fixes
both the font kerning issue and the issue where the printed font
does not match the on-screen font.
Modified:
trunk/gtkhtml/ChangeLog
trunk/gtkhtml/htmlprinter.c
Modified: trunk/gtkhtml/htmlprinter.c
==============================================================================
--- trunk/gtkhtml/htmlprinter.c (original)
+++ trunk/gtkhtml/htmlprinter.c Mon Jun 30 16:05:11 2008
@@ -654,7 +654,6 @@
HTMLPainter *
html_printer_new (GtkWidget *widget, GtkPrintContext *context)
{
- const PangoFontDescription *desc;
HTMLPrinter *printer;
HTMLPainter *painter;
@@ -663,9 +662,11 @@
painter = HTML_PAINTER (printer);
html_painter_set_widget (painter, widget);
- desc = pango_font_description_from_string ("sans 8");/* FIXME font hardcoded*/
- painter->pango_context = gtk_print_context_create_pango_context (context);
- pango_context_set_font_description (painter->pango_context, desc);
+ painter->pango_context =
+ gtk_print_context_create_pango_context (context);
+ pango_context_set_font_description (
+ painter->pango_context, widget->style->font_desc);
+
return painter;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]