- Fixed font-option patch.

This commit is contained in:
Tim Waugh 2006-06-29 14:11:58 +00:00
parent a61d0bea3d
commit d5c1021042
2 changed files with 9 additions and 10 deletions

View File

@ -1,4 +1,3 @@
diff -ruN paps-0.6.6.orig/src/paps.1 paps-0.6.6/src/paps.1
--- paps-0.6.6.orig/src/paps.1 2006-06-20 04:09:58.000000000 +0900
+++ paps-0.6.6/src/paps.1 2006-06-20 04:12:23.000000000 +0900
@@ -34,11 +34,8 @@
@ -15,19 +14,18 @@ diff -ruN paps-0.6.6.orig/src/paps.1 paps-0.6.6/src/paps.1
.TP
.B \-\-rtl
Do rtl layout.
diff -ruN paps-0.6.6.orig/src/paps.c paps-0.6.6/src/paps.c
--- paps-0.6.6.orig/src/paps.c 2006-06-20 04:09:58.000000000 +0900
+++ paps-0.6.6/src/paps.c 2006-06-20 04:01:57.000000000 +0900
--- paps-0.6.6/src/paps.c 2006-06-20 04:01:57.000000000 +0900
+++ paps-0.6.6/src/paps.c 2006-06-29 15:08:48.000000000 +0100
@@ -30,7 +30,11 @@
#include <time.h>
#define BUFSIZE 1024
-#define HEADER_FONT_SCALE 12
+#define DEFAULT_FONT_FAMILY "Monospace"
+#define DEFAULT_FONT_SIZE 12
+#define DEFAULT_FONT_SIZE "12"
+#define HEADER_FONT_FAMILY "Monospace Bold"
+#define HEADER_FONT_SCALE 12
+#define MAKE_FONT_NAME(f,s) f " " #s
+#define HEADER_FONT_SCALE "12"
+#define MAKE_FONT_NAME(f,s) f " " s
typedef enum {
PAPER_TYPE_A4 = 0,
@ -67,10 +65,10 @@ diff -ruN paps-0.6.6.orig/src/paps.c paps-0.6.6/src/paps.c
int do_duplex = -1;
gchar *paps_header = NULL;
- gchar *header_font_desc = "Monospace Bold 12";
+ gchar *header_font_desc = MAKE_FONT_NAME (HEADER_FONT_FAMILY, HEADER_FONT_SIZE);
+ gchar *header_font_desc = MAKE_FONT_NAME (HEADER_FONT_FAMILY, HEADER_FONT_SCALE);
+ gchar *filename_in, *title, *text;
int header_sep = 20;
GIConv *cvh = NULL;
GIConv cvh = NULL;
@@ -271,13 +272,12 @@
pango_context_set_language (pango_context, pango_language_from_string ("en_US"));
@ -88,7 +86,7 @@ diff -ruN paps-0.6.6.orig/src/paps.c paps-0.6.6/src/paps.c
+ if ((pango_font_description_get_set_fields (font_description) & PANGO_FONT_MASK_FAMILY) == 0)
+ pango_font_description_set_family (font_description, DEFAULT_FONT_FAMILY);
+ if ((pango_font_description_get_set_fields (font_description) & PANGO_FONT_MASK_SIZE) == 0)
+ pango_font_description_set_size (font_description, DEFAULT_FONT_SIZE * PANGO_SCALE);
+ pango_font_description_set_size (font_description, atoi(DEFAULT_FONT_SIZE) * PANGO_SCALE);
pango_context_set_font_description (pango_context, font_description);

View File

@ -74,6 +74,7 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Thu Jun 29 2006 Tim Waugh <twaugh@redhat.com> - 0.6.6-9
- Fixed font-option patch.
- Adjusted CUPS patch: CUPS invokes the filter with the destination
printer name in argv[0], not the binary name.
- CUPS filter lives in CUPS_SERVERBIN, which is /usr/lib/cups on all