rpms/gfontview/devel gfontview-0.5.0-gcc4.patch, NONE, 1.1 gfontview-0.5.0-makefile.patch, NONE, 1.1 gfontview.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Michael A. Peters (mpeters) fedora-extras-commits at redhat.com
Sat Oct 1 08:44:53 UTC 2005


Author: mpeters

Update of /cvs/extras/rpms/gfontview/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17262/devel

Modified Files:
	.cvsignore sources 
Added Files:
	gfontview-0.5.0-gcc4.patch gfontview-0.5.0-makefile.patch 
	gfontview.spec 
Log Message:
auto-import gfontview-0.5.0-4 on branch devel from gfontview-0.5.0-4.src.rpm
approved by Aurelien Bompard

gfontview-0.5.0-gcc4.patch:

--- NEW FILE gfontview-0.5.0-gcc4.patch ---
diff -ur gfontview-0.5.0/dialogs.C gfontview-0.5.0-new/dialogs.C
--- gfontview-0.5.0/dialogs.C	2001-03-18 12:03:00.000000000 -0500
+++ gfontview-0.5.0-new/dialogs.C	2005-08-02 01:19:38.000000000 -0400
@@ -333,18 +333,18 @@
   char* message = NULL;
 
   // Construct a string (message) with the arguments  
-  va_start(args, msg);
   while(1) {  
     if (message == NULL) message = (char*)g_malloc(size);
     else message = (char*)g_realloc(message, size);
     if (message == NULL) out_of_memory(size, __FILE__, __LINE__);
 
+    va_start(args, msg);
     int nchars = vsnprintf(message, size, msg, args);
+    va_end(args);
     if (nchars < size) break;  // if enough space
     // if not enough space, enlarge size and try again
     size = nchars + 1; /* as in glibc >= 2.1 */
   }
-  va_end(args);
 
 #ifdef USE_GNOME
   GtkWidget *errw = gnome_message_box_new(message, 
@@ -1327,7 +1327,7 @@
   /* Entry field is DnD target */
   gtk_drag_dest_set(prtdiag->fileentry, GTK_DEST_DEFAULT_ALL,
 		    dnd_target_table, dnd_targets-1,
-		    (enum GdkDragAction)(GDK_ACTION_COPY | GDK_ACTION_MOVE)); 
+		    (GdkDragAction)(GDK_ACTION_COPY | GDK_ACTION_MOVE));
   gtk_signal_connect(GTK_OBJECT(prtdiag->fileentry), "drag_data_received",
 		     GTK_SIGNAL_FUNC(combo_drag_data_received), NULL);
 
diff -ur gfontview-0.5.0/gfont.C gfontview-0.5.0-new/gfont.C
--- gfontview-0.5.0/gfont.C	2001-03-19 16:04:14.000000000 -0500
+++ gfontview-0.5.0-new/gfont.C	2005-08-02 01:19:38.000000000 -0400
@@ -635,7 +635,7 @@
 static GList* get_some_cool_dirs(void)
 {
   GList *list = NULL;
-  const char *dlist[] = {"/usr/share/ghostscript/fonts", "/usr/X11/lib/X11/fonts", "/usr/share/texmf/fonts", "/usr/share/fonts", "/usr/local/share/texmf/fonts", "/usr/local/fonts"};
+  const char *dlist[] = {"/usr/share/fonts/default/ghostscript", "/usr/X11/lib/X11/fonts", "/usr/share/texmf/fonts", "/usr/share/fonts", "/usr/local/share/texmf/fonts", "/usr/local/fonts"};
 
   gchar *homefonts = g_strconcat(g_get_home_dir(), "/fonts", NULL);
   list = get_dirtree(list, homefonts);
@@ -1103,7 +1103,7 @@
   // Entry field of the combo box is DnD target
   gtk_drag_dest_set(entry, GTK_DEST_DEFAULT_ALL,
 		    dnd_target_table, dnd_targets-1,
-		    (enum GdkDragAction)(GDK_ACTION_COPY | GDK_ACTION_MOVE)); 
+		    (GdkDragAction) (GDK_ACTION_COPY | GDK_ACTION_MOVE));
   gtk_signal_connect(GTK_OBJECT(entry), "drag_data_received",
 		     GTK_SIGNAL_FUNC(combo_drag_data_received), NULL);
 
diff -ur gfontview-0.5.0/Makefile.am gfontview-0.5.0-new/Makefile.am
--- gfontview-0.5.0/Makefile.am	2001-03-18 10:17:45.000000000 -0500
+++ gfontview-0.5.0-new/Makefile.am	2005-08-02 01:20:25.000000000 -0400
@@ -1,7 +1,7 @@
 ## Process this file with automake to produce Makefile.in
 
 SUBDIRS = po intl
-INCLUDES =  -DLOCALEDIR=\""$(datadir)/locale"\" -I/usr/include/freetype
+INCLUDES =  -DLOCALEDIR=\""$(datadir)/locale"\" -I/usr/include/freetype1/freetype
 bin_PROGRAMS = gfontview
 gfontview_SOURCES = gfont.C dialogs.C t1.C tt.C gfont.h ps.h t1enc.h
 EXTRA_DIST = ABOUT-NLS gfv.m4 emptypixmap.xpm error.xpm font.xpm mini-ofolder.xpm openhand.xpm t1.xpm tt.xpm stipple.xbm gfontview.lsm gfontview.spec gfontview.desktop gfontview.png gfontviewrc 
Only in gfontview-0.5.0-new: .Makefile.am.swp
diff -ur gfontview-0.5.0/Makefile.in gfontview-0.5.0-new/Makefile.in
--- gfontview-0.5.0/Makefile.in	2001-03-19 16:14:01.000000000 -0500
+++ gfontview-0.5.0-new/Makefile.in	2005-08-02 01:43:45.000000000 -0400
@@ -90,7 +90,7 @@
 l = @l@
 
 SUBDIRS = po intl
-INCLUDES = -DLOCALEDIR=\""$(datadir)/locale"\" -I/usr/include/freetype
+INCLUDES = -DLOCALEDIR=\""$(datadir)/locale"\" -I/usr/include/freetype1/freetype
 bin_PROGRAMS = gfontview
 gfontview_SOURCES = gfont.C dialogs.C t1.C tt.C gfont.h ps.h t1enc.h
 EXTRA_DIST = ABOUT-NLS gfv.m4 emptypixmap.xpm error.xpm font.xpm mini-ofolder.xpm openhand.xpm t1.xpm tt.xpm stipple.xbm gfontview.lsm gfontview.spec gfontview.desktop gfontview.png gfontviewrc 
Binary files gfontview-0.5.0/po/de.gmo and gfontview-0.5.0-new/po/de.gmo differ
diff -ur gfontview-0.5.0/po/de.po gfontview-0.5.0-new/po/de.po
--- gfontview-0.5.0/po/de.po	2001-03-19 16:14:02.000000000 -0500
+++ gfontview-0.5.0-new/po/de.po	2005-08-02 01:19:50.000000000 -0400
@@ -158,7 +158,7 @@
 
 #: gfont.C:442
 msgid "Could not init the PostScript extension\n"
-msgstr "Kann die PostScript-Erweiterung nicht initalisieren\n"
+msgstr "Kann die PostScript-Erweiterung nicht initialisieren\n"
 
 #: dialogs.C:1211 dialogs.C:1503 dialogs.C:1666 gfont.C:550
 msgid "No row selected"
diff -ur gfontview-0.5.0/ps.h gfontview-0.5.0-new/ps.h
--- gfontview-0.5.0/ps.h	2000-06-25 08:17:29.000000000 -0400
+++ gfontview-0.5.0-new/ps.h	2005-08-02 01:19:42.000000000 -0400
@@ -72,302 +72,302 @@
 
 
 const char *text_samples = "\
-/TextSamplerDict 40 dict def
-TextSamplerDict begin
-/Inch {72 mul} def
-/linewidth 7 Inch def
-/yline 9.7 Inch def
-/LM 0.7 Inch def
-/wordbreak ( ) def
-/buf 8 string def
-
-/DoTitle { % fontname DoTitle
-  /Helvetica findfont 18 scalefont setfont
-  LM 10.5 Inch moveto
-  show 
-  ( at ) show fontsize buf cvs show ( points, spacing = ) show
-  spacing buf cvs show
-} def
-
-/DoSamples { % fontname fontsize spacing DoSamples
-  /spacing exch def
-  /fontsize exch def
-  /fontname exch def
-
-  fontname findfont fontsize scalefont setfont
-  /newline {/yline yline fontsize spacing mul sub def LM yline moveto} def
-  /breakwidth wordbreak stringwidth pop def
-  /curwidth 0 def
-  /lastwordbreak 0 def
-  /startchar 0 def
-  /restoftext textstring def
-
-
-  LM yline moveto
-  { restoftext wordbreak search
-    {
-      /nextword exch def pop
-      /restoftext exch def
-      /wordwidth nextword stringwidth pop def
-    
-      curwidth wordwidth add linewidth gt
-      {
-        textstring startchar lastwordbreak startchar sub getinterval
-        show newline
-        /startchar lastwordbreak def
-        /curwidth wordwidth breakwidth add def
-      }
-      {
-        /curwidth curwidth wordwidth breakwidth add add def
-      } 
-      ifelse
-      /lastwordbreak lastwordbreak nextword length 1 add add def
-    }
-    {pop exit}
-    ifelse
-  } loop
-  /lastchar textstring length def
-  textstring startchar lastchar startchar sub getinterval show
-} def
-end
+/TextSamplerDict 40 dict def\n\
+TextSamplerDict begin\n\
+/Inch {72 mul} def\n\
+/linewidth 7 Inch def\n\
+/yline 9.7 Inch def\n\
+/LM 0.7 Inch def\n\
+/wordbreak ( ) def\n\
+/buf 8 string def\n\
+\n\
+/DoTitle { % fontname DoTitle\n\
+  /Helvetica findfont 18 scalefont setfont\n\
+  LM 10.5 Inch moveto\n\
+  show \n\
+  ( at ) show fontsize buf cvs show ( points, spacing = ) show\n\
+  spacing buf cvs show\n\
+} def\n\
+\n\
+/DoSamples { % fontname fontsize spacing DoSamples\n\
+  /spacing exch def\n\
+  /fontsize exch def\n\
+  /fontname exch def\n\
+\n\
+  fontname findfont fontsize scalefont setfont\n\
+  /newline {/yline yline fontsize spacing mul sub def LM yline moveto} def\n\
+  /breakwidth wordbreak stringwidth pop def\n\
+  /curwidth 0 def\n\
+  /lastwordbreak 0 def\n\
+  /startchar 0 def\n\
+  /restoftext textstring def\n\
+\n\
+\n\
+  LM yline moveto\n\
+  { restoftext wordbreak search\n\
+    {\n\
+      /nextword exch def pop\n\
+      /restoftext exch def\n\
+      /wordwidth nextword stringwidth pop def\n\
+    \n\
+      curwidth wordwidth add linewidth gt\n\
+      {\n\
+        textstring startchar lastwordbreak startchar sub getinterval\n\
+        show newline\n\
+        /startchar lastwordbreak def\n\
+        /curwidth wordwidth breakwidth add def\n\
+      }\n\
+      {\n\
+        /curwidth curwidth wordwidth breakwidth add add def\n\
+      } \n\
+      ifelse\n\
+      /lastwordbreak lastwordbreak nextword length 1 add add def\n\
+    }\n\
+    {pop exit}\n\
+    ifelse\n\
+  } loop\n\
+  /lastchar textstring length def\n\
+  textstring startchar lastchar startchar sub getinterval show\n\
+} def\n\
+end\n\
 ";
 
 
 
 const char *check_type42 = "\
-languagelevel 2 lt
-{
-  /Helvetica findfont 14 scalefont setfont
-  72 420 moveto
-  (Your printer or PostScript interpreter does not support PostScript Level 2) show
-  showpage
-  quit
-} if
-
-42 /FontType resourcestatus not
-{
-  /Helvetica findfont 14 scalefont setfont
-  72 420 moveto
-  (Your printer or PostScript interpreter does not support Type 42 fonts) show
-  showpage
-  quit
-} if
-pop pop
+languagelevel 2 lt\n\
+{\n\
+  /Helvetica findfont 14 scalefont setfont\n\
+  72 420 moveto\n\
+  (Your printer or PostScript interpreter does not support PostScript Level 2) show\n\
+  showpage\n\
+  quit\n\
+} if\n\
+\n\
+42 /FontType resourcestatus not\n\
+{\n\
+  /Helvetica findfont 14 scalefont setfont\n\
+  72 420 moveto\n\
+  (Your printer or PostScript interpreter does not support Type 42 fonts) show\n\
+  showpage\n\
+  quit\n\
+} if\n\
+pop pop\n\
 ";
 
 
 const char *phrase_samples = "\
-/PhraseSamplerDict 20 dict def
-PhraseSamplerDict begin
-/Inch {72 mul} def
-/LM 0.5 Inch def
-/RM 7.6 Inch def
-/Temp 64 string def
-/T /Helvetica findfont 10 scalefont def
-/T6 /Helvetica findfont 6 scalefont def 
-/Header {  % text height Header
-  RM exch moveto T6 setfont dup stringwidth pop neg 0 rmoveto show
-} def
-/FontName { % fontname fontfile height FontName
-  /y exch def
-  /FFile exch def
-  /FName exch def
-
-  LM y moveto
-  T setfont FName Temp cvs show
-  LM y 8 sub moveto
-  T6 setfont FFile show
-} def
-/FontSample {  % fontname size height FontSample
-  /y exch def
-  /FSize exch def
-  /FName exch def
-
-  LM 160 add y moveto
-  mark
-  {
-    FName findfont FSize scalefont setfont 
-    StringSample show
-  }
-  stopped {
-    LM 160 add y moveto
-    T6 setfont (Error: ) show
-    $error /errorname get Temp cvs show
-    ( [) show
-    $error /command get Temp cvs show
-    (] ) show               
-  }
-  if
-  cleartomark
-} def
-end
+/PhraseSamplerDict 20 dict def\n\
+PhraseSamplerDict begin\n\
+/Inch {72 mul} def\n\
+/LM 0.5 Inch def\n\
+/RM 7.6 Inch def\n\
+/Temp 64 string def\n\
+/T /Helvetica findfont 10 scalefont def\n\
+/T6 /Helvetica findfont 6 scalefont def \n\
+/Header {  % text height Header\n\
+  RM exch moveto T6 setfont dup stringwidth pop neg 0 rmoveto show\n\
+} def\n\
+/FontName { % fontname fontfile height FontName\n\
+  /y exch def\n\
+  /FFile exch def\n\
+  /FName exch def\n\
+\n\
+  LM y moveto\n\
+  T setfont FName Temp cvs show\n\
+  LM y 8 sub moveto\n\
+  T6 setfont FFile show\n\
+} def\n\
+/FontSample {  % fontname size height FontSample\n\
+  /y exch def\n\
+  /FSize exch def\n\
+  /FName exch def\n\
+\n\
+  LM 160 add y moveto\n\
+  mark\n\
+  {\n\
+    FName findfont FSize scalefont setfont \n\
+    StringSample show\n\
+  }\n\
+  stopped {\n\
+    LM 160 add y moveto\n\
+    T6 setfont (Error: ) show\n\
+    $error /errorname get Temp cvs show\n\
+    ( [) show\n\
+    $error /command get Temp cvs show\n\
+    (] ) show               \n\
+  }\n\
+  if\n\
+  cleartomark\n\
+} def\n\
+end\n\
 ";
 
 
 const char *size_samples = "\
-/SizeSamplerDict 40 dict def
-SizeSamplerDict begin
-/Strings 
-{ [
-	(ABCDEFGHIJKLMNOPQRSTUVWXYZ)
-	(abcdefghijklmnopqrstuvwxyz)
-	(0123456789<=>:;?@!\"#$%&')
-	(\\( \\)*+,-./ [ \\\\ ]^_`{|}~)
-] } def
-
-
-/Sizes 
-{ [
-  8 10 12 14 20 24 28
-] } def
-
-/infofont /Helvetica findfont 10 scalefont def
-/msg 8 string def
-/Inch {72 mul} def
-/DoTitle { % fontname DoTitle
-  % Write the font name on top of the page
-  /Helvetica findfont 18 scalefont setfont
-  dup stringwidth
-  exch 8 Inch exch sub 2 div exch
-  10.5 Inch exch sub
-  moveto show
-} def
-/DoSamples { % font DoSamples
-  % Make the font samples
-  /fontname exch def
-  /testfont fontname findfont def
-  1 setlinewidth
-  60 50 moveto
-
-  Sizes
-  {
-    /size exch def
-    testfont size scalefont setfont
-    currentpoint translate % start of line
-    5 0 rmoveto
-
-    Strings 
-    {
-      currentpoint
-      3 -1 roll show
-      moveto
-      0 1.2 size mul rmoveto  % add 30% of the size vertically
-    } forall  % Strings
-
-    -5 0 rmoveto
-    currentpoint         % end of line
-    newpath 0 0 moveto lineto
-    currentpoint stroke  % leave end of line pos in stack
-  
-  % Print the font size in the middle of the line
-    dup                            % leave y in the stack (x is 0)
-    infofont setfont
-    size msg cvs dup stringwidth   % Push string 'n' and its size on the stack
-    4 -1 roll exch sub 2 div         % Stack is 'string width ypos'
-    exch 5 add neg exch moveto show  % Move to the left and print
-
-    moveto         % take end of line pos from stack
-    0 15 rmoveto   % Add vertical space between groups
-  } forall % Sizes
-} def
-end
+/SizeSamplerDict 40 dict def\n\
+SizeSamplerDict begin\n\
+/Strings \n\
+{ [\n\
+	(ABCDEFGHIJKLMNOPQRSTUVWXYZ)\n\
+	(abcdefghijklmnopqrstuvwxyz)\n\
+	(0123456789<=>:;?@!\"#$%&')\n\
+	(\\( \\)*+,-./ [ \\\\ ]^_`{|}~)\n\
+] } def\n\
+\n\
+\n\
+/Sizes \n\
+{ [\n\
+  8 10 12 14 20 24 28\n\
+] } def\n\
+\n\
+/infofont /Helvetica findfont 10 scalefont def\n\
+/msg 8 string def\n\
+/Inch {72 mul} def\n\
+/DoTitle { % fontname DoTitle\n\
+  % Write the font name on top of the page\n\
+  /Helvetica findfont 18 scalefont setfont\n\
+  dup stringwidth\n\
+  exch 8 Inch exch sub 2 div exch\n\
+  10.5 Inch exch sub\n\
+  moveto show\n\
+} def\n\
+/DoSamples { % font DoSamples\n\
+  % Make the font samples\n\
+  /fontname exch def\n\
+  /testfont fontname findfont def\n\
+  1 setlinewidth\n\
+  60 50 moveto\n\
+\n\
+  Sizes\n\
+  {\n\
+    /size exch def\n\
+    testfont size scalefont setfont\n\
+    currentpoint translate % start of line\n\
+    5 0 rmoveto\n\
+\n\
+    Strings \n\
+    {\n\
+      currentpoint\n\
+      3 -1 roll show\n\
+      moveto\n\
+      0 1.2 size mul rmoveto  % add 30% of the size vertically\n\
+    } forall  % Strings\n\
+\n\
+    -5 0 rmoveto\n\
+    currentpoint         % end of line\n\
+    newpath 0 0 moveto lineto\n\
+    currentpoint stroke  % leave end of line pos in stack\n\
+  \n\
+  % Print the font size in the middle of the line\n\
+    dup                            % leave y in the stack (x is 0)\n\
+    infofont setfont\n\
+    size msg cvs dup stringwidth   % Push string 'n' and its size on the stack\n\
+    4 -1 roll exch sub 2 div         % Stack is 'string width ypos'\n\
+    exch 5 add neg exch moveto show  % Move to the left and print\n\
+\n\
+    moveto         % take end of line pos from stack\n\
+    0 15 rmoveto   % Add vertical space between groups\n\
+  } forall % Sizes\n\
+} def\n\
+end\n\
 ";
 
 
 
 const char *map_samples = "\
-/MapSamplerDict 40 dict def
-MapSamplerDict begin
-/T /Helvetica findfont 10 scalefont def
-/T6 /Times-Roman findfont 6 scalefont def
-/Temp 64 string def
-/Inch {72 mul} def
-/Base 16 def    % char code output base
-/TempEncoding [ 256 { /.notdef } repeat ] def
-/ISOLatin1Dict 256 dict def
-ISOLatin1Encoding { ISOLatin1Dict exch true put } forall
-/min { 2 copy gt { exch } if pop } bind def
-/DoChar {
-  /C exch def
-  /S (_) dup 0 C put def
-  /N F /Encoding get C get def
-  /W F setfont S stringwidth pop def
-  T6 setfont
-  0 -20 moveto N Temp cvs show
-  0 -12 moveto
-  W 0.0005 add Temp cvs 0 5 getinterval show
-  N /.notdef ne {
-    3 0 translate
-    0 0 moveto F24 setfont S show
-    /W S stringwidth pop def
-    0 -6 moveto 0 24 lineto
-    W -6 moveto W 24 lineto
-    -3 0 moveto W 3 add 0 lineto
-    0 setlinewidth stroke
-  } if
-} def                            
-/DoTitle { % fontname DoTitle
-  /Helvetica findfont 18 scalefont setfont
-  dup stringwidth
-  exch 8 Inch exch sub 2 div exch
-  10.7 Inch exch sub
-  moveto show
-} def
-/Header {  % header Header
-  7.6 Inch 10.7 Inch moveto T setfont dup stringwidth pop neg 0 rmoveto show
-} def
-/DoBlock {      % firstcode lastcode DoBlock
-  /FirstCode 2 index def
-  1 exch {
-    /I exch def
-    /Xn I FirstCode sub 16 mod def /Yn I FirstCode sub 16 idiv def
-    gsave
-    Xn 36 mul 9 add Yn -56 mul 9.5 Inch add translate
-    I DoChar
-    grestore
-  } for
-} def                          
-/FontShow0 {  % fontname FontShow0
-  /FName exch def       % font name
-  /F FName findfont def
-  /Done 256 dict def
-  /NewEncoding [
-      ISOLatin1Encoding {
-        dup F /CharStrings get exch known {
-          dup Done exch known { pop } { dup Done exch true put } ifelse
-        } { pop } ifelse
-      } forall
-      F /CharStrings get {
-        pop dup ISOLatin1Dict exch known { pop } if
-      } forall
-  ] def
-  F length dict F {
-    1 index /FID eq { pop pop } { 2 index 3 1 roll put } ifelse
-  } forall
-  dup /Encoding NewEncoding put
-  /* exch definefont
-  /F exch def
-  /F24 F 24 scalefont def
-  70 160 translate
-  0.80 dup scale
-  0 NewEncoding length 1 sub DoBlock
-} def                        
-/FontShowV {  % encoding fontname FontShowV
-  /FName exch def       
-  /NewEncoding exch def
-  /F FName findfont def
-  F length dict F {
-    1 index /FID eq { pop pop } { 2 index 3 1 roll put } ifelse
-  } forall
-  dup /Encoding NewEncoding put
-  /* exch definefont
-  /F exch def
-  /F24 F 24 scalefont def
-  70 160 translate
-  0.80 dup scale
-  0 NewEncoding length 1 sub DoBlock
-} def
-end  
+/MapSamplerDict 40 dict def\n\
+MapSamplerDict begin\n\
+/T /Helvetica findfont 10 scalefont def\n\
+/T6 /Times-Roman findfont 6 scalefont def\n\
+/Temp 64 string def\n\
+/Inch {72 mul} def\n\
+/Base 16 def    % char code output base\n\
+/TempEncoding [ 256 { /.notdef } repeat ] def\n\
+/ISOLatin1Dict 256 dict def\n\
+ISOLatin1Encoding { ISOLatin1Dict exch true put } forall\n\
+/min { 2 copy gt { exch } if pop } bind def\n\
+/DoChar {\n\
+  /C exch def\n\
+  /S (_) dup 0 C put def\n\
+  /N F /Encoding get C get def\n\
+  /W F setfont S stringwidth pop def\n\
+  T6 setfont\n\
+  0 -20 moveto N Temp cvs show\n\
+  0 -12 moveto\n\
+  W 0.0005 add Temp cvs 0 5 getinterval show\n\
+  N /.notdef ne {\n\
+    3 0 translate\n\
+    0 0 moveto F24 setfont S show\n\
+    /W S stringwidth pop def\n\
+    0 -6 moveto 0 24 lineto\n\
+    W -6 moveto W 24 lineto\n\
+    -3 0 moveto W 3 add 0 lineto\n\
+    0 setlinewidth stroke\n\
+  } if\n\
+} def                            \n\
+/DoTitle { % fontname DoTitle\n\
+  /Helvetica findfont 18 scalefont setfont\n\
+  dup stringwidth\n\
+  exch 8 Inch exch sub 2 div exch\n\
+  10.7 Inch exch sub\n\
+  moveto show\n\
+} def\n\
+/Header {  % header Header\n\
+  7.6 Inch 10.7 Inch moveto T setfont dup stringwidth pop neg 0 rmoveto show\n\
+} def\n\
+/DoBlock {      % firstcode lastcode DoBlock\n\
+  /FirstCode 2 index def\n\
+  1 exch {\n\
+    /I exch def\n\
+    /Xn I FirstCode sub 16 mod def /Yn I FirstCode sub 16 idiv def\n\
+    gsave\n\
+    Xn 36 mul 9 add Yn -56 mul 9.5 Inch add translate\n\
+    I DoChar\n\
+    grestore\n\
+  } for\n\
+} def                          \n\
+/FontShow0 {  % fontname FontShow0\n\
+  /FName exch def       % font name\n\
+  /F FName findfont def\n\
+  /Done 256 dict def\n\
+  /NewEncoding [\n\
+      ISOLatin1Encoding {\n\
+        dup F /CharStrings get exch known {\n\
+          dup Done exch known { pop } { dup Done exch true put } ifelse\n\
+        } { pop } ifelse\n\
+      } forall\n\
+      F /CharStrings get {\n\
+        pop dup ISOLatin1Dict exch known { pop } if\n\
+      } forall\n\
+  ] def\n\
+  F length dict F {\n\
+    1 index /FID eq { pop pop } { 2 index 3 1 roll put } ifelse\n\
+  } forall\n\
+  dup /Encoding NewEncoding put\n\
+  /* exch definefont\n\
+  /F exch def\n\
+  /F24 F 24 scalefont def\n\
+  70 160 translate\n\
+  0.80 dup scale\n\
+  0 NewEncoding length 1 sub DoBlock\n\
+} def                        \n\
+/FontShowV {  % encoding fontname FontShowV\n\
+  /FName exch def       \n\
+  /NewEncoding exch def\n\
+  /F FName findfont def\n\
+  F length dict F {\n\
+    1 index /FID eq { pop pop } { 2 index 3 1 roll put } ifelse\n\
+  } forall\n\
+  dup /Encoding NewEncoding put\n\
+  /* exch definefont\n\
+  /F exch def\n\
+  /F24 F 24 scalefont def\n\
+  70 160 translate\n\
+  0.80 dup scale\n\
+  0 NewEncoding length 1 sub DoBlock\n\
+} def\n\
+end  \n\
 ";
 
 

gfontview-0.5.0-makefile.patch:

--- NEW FILE gfontview-0.5.0-makefile.patch ---
diff -ur gfontview-0.5.0/Makefile.in gfontview-0.5.0.new/Makefile.in
--- gfontview-0.5.0/Makefile.in	2001-03-19 13:14:01.000000000 -0800
+++ gfontview-0.5.0.new/Makefile.in	2005-09-27 12:54:27.000000000 -0700
@@ -96,10 +96,10 @@
 EXTRA_DIST = ABOUT-NLS gfv.m4 emptypixmap.xpm error.xpm font.xpm mini-ofolder.xpm openhand.xpm t1.xpm tt.xpm stipple.xbm gfontview.lsm gfontview.spec gfontview.desktop gfontview.png gfontviewrc 
 CLEANFILES = *~ t1lib.log
 
-defaultsdir = $(datadir)
+defaultsdir = $(datadir)/gfontview
 defaults_DATA = gfontviewrc
 
-applicationsdir = $(datadir)/gnome/apps/Utilities
+applicationsdir = $(datadir)/applications
 applications_DATA = gfontview.desktop
 
 pixmapdir = $(datadir)/pixmaps
diff -ur gfontview-0.5.0/po/Makefile.in.in gfontview-0.5.0.new/po/Makefile.in.in
--- gfontview-0.5.0/po/Makefile.in.in	2000-03-23 12:55:38.000000000 -0800
+++ gfontview-0.5.0.new/po/Makefile.in.in	2005-09-27 12:56:32.000000000 -0700
@@ -111,16 +111,16 @@
 install-data-no: all
 install-data-yes: all
 	if test -r "$(MKINSTALLDIRS)"; then \
-	  $(MKINSTALLDIRS) $(datadir); \
+	  $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
 	else \
-	  $(SHELL) $(top_srcdir)/mkinstalldirs $(datadir); \
+	  $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \
 	fi
 	@catalogs='$(CATALOGS)'; \
 	for cat in $$catalogs; do \
 	  cat=`basename $$cat`; \
 	  case "$$cat" in \
-	    *.gmo) destdir=$(gnulocaledir);; \
-	    *)     destdir=$(localedir);; \
+	    *.gmo) destdir=$(DESTDIR)$(gnulocaledir);; \
+	    *)     destdir=$(DESTDIR)$(localedir);; \
 	  esac; \
 	  lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
 	  dir=$$destdir/$$lang/LC_MESSAGES; \


--- NEW FILE gfontview.spec ---
Name:           gfontview
Version:        0.5.0
Release:        4%{?dist}
Summary:        A font viewer for Type 1 and TrueType fonts

Group:          User Interface/X
License:        GPL
URL:            http://gfontview.sourceforge.net
Source0:        ftp://metalab.unc.edu/pub/Linux/X11/fonts/%{name}-%{version}.tar.gz
Patch0:         gfontview-0.5.0-gcc4.patch
Patch1:         gfontview-0.5.0-makefile.patch

BuildRequires:  libungif-devel, gtk+-devel, t1lib-devel
BuildRequires:  desktop-file-utils, gettext
# it needs to know the spooling system and thus needs /usr/bin/lpr
BuildRequires:  cups

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

%description
gfontview is a Font Viewer for outline fonts (PostScript Type 1 and TrueType).
It will display all fonts present in the chosen directory in a list,
with a preview of the font also present in the main window. 


%prep
%setup -q
%patch0 -p 1
%patch1 -p 1
cp gfontview.desktop gfontview.desktop.orig
sed -e s?"^Terminal=0"?"Terminal=false"? < gfontview.desktop.orig > gfontview.desktop

%build
%configure \
 --enable-gnome=no \
 --with-libungif \
 --with-fontdir=%{_datadir}/fonts
make %{?_smp_mflags}


%install
make  DESTDIR=$RPM_BUILD_ROOT install
#rm $RPM_BUILD_ROOT%{prefix}/share/gfontviewrc

desktop-file-install --vendor fedora --delete-original \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
  --add-category X-Fedora \
  --add-category Application \
  --add-category Utility \
  --copy-name-to-generic-name \
  $RPM_BUILD_ROOT%{_datadir}/applications/gfontview.desktop

%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT

%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING ChangeLog INSTALL README TODO gfontview.lsm
%{_bindir}/gfontview
%{_datadir}/pixmaps/gfontview.png
%{_datadir}/applications/fedora-gfontview.desktop
%{_datadir}/gfontview

%changelog
* Tue Sep 27 2005 Michael A. Peters <mpeters at mac.com> 0.5.0-4
- changed the name of patch0 to be more specific
- replaced patch1 to include better gfontviewrc location
- changed Group to User Interface/X
- Cleaned up install of the Desktop file
- Do not build for gnome, this is not a gnome2 or gtk2+ app

* Mon Sep 26 2005 Michael A. Peters <mpeters at mac.com> 0.5.0-3
- cleaned up spec file to take care of bug 165612 comment 1
- added patch for proper locale install with DESTDIR

* Tue Aug 2 2005 Kirby Files <ksfiles at gmail.com> 0.5.0-2
- borrowed some patches from Debian to fix gcc4 breakages.



Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/gfontview/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	1 Oct 2005 08:43:12 -0000	1.1
+++ .cvsignore	1 Oct 2005 08:44:51 -0000	1.2
@@ -0,0 +1 @@
+gfontview-0.5.0.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/gfontview/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	1 Oct 2005 08:43:12 -0000	1.1
+++ sources	1 Oct 2005 08:44:51 -0000	1.2
@@ -0,0 +1 @@
+f06e0e9d67f7d8b3af251fa593e83eeb  gfontview-0.5.0.tar.gz




More information about the fedora-extras-commits mailing list