shithub: neatpost

Download patch

ref: 93329251a3a8a9bb2a99af6ecd8ddaac4836224a
parent: f33908e77d5b637d3f33f244ab7f1fdc7f63f6bb
author: Ali Gholami Rudi <ali@rudi.ir>
date: Sun Jul 7 19:11:54 EDT 2013

out: update ps font when a font is mounted in the same position

--- a/out.c
+++ b/out.c
@@ -166,6 +166,13 @@
 	o_f = f;
 }
 
+/* a font was mounted at pos f */
+void outmnt(int f)
+{
+	if (p_f == f)
+		p_f = -1;
+}
+
 void outsize(int s)
 {
 	o_s = s;
--- a/post.c
+++ b/post.c
@@ -210,6 +210,7 @@
 		pos = nextnum();
 		nextword(dev);
 		dev_mnt(pos, dev, dev);
+		outmnt(pos);
 		break;
 	case 'i':
 		dev_open(devpath);
--- a/post.h
+++ b/post.h
@@ -73,6 +73,7 @@
 void outsize(int s);
 void outcolor(int c);
 void outpage(void);
+void outmnt(int f);
 extern char o_fonts[];
 
 void drawbeg(char *s);