Hi, I am just about to finish a Turkish book about Pure Data. I am writing my book using Latex. The patch file example figures I use are directly printed (to file) as postscript files. But the fonts inside the object boxes are vertically justified to the top and that looks ugly (see the sample in attachment).
Any ideas ? Thanks.
Hi all -
I've used awk scripts. The exact thing to do depends on font size and on windowing system. Most recently my awk script was this:
BEGIN {last = -10} /findfont 8/ { last=NR $1 = "/Courier-Bold" $3 = 11.7 + 2 } { if (NR == last+2) { $1 = $1+1 $2 = $2-3 } print }
cheers Miller
On Tue, Dec 10, 2013 at 12:47:18AM +0200, Arda Eden wrote:
Hi, I am just about to finish a Turkish book about Pure Data. I am writing my book using Latex. The patch file example figures I use are directly printed (to file) as postscript files. But the fonts inside the object boxes are vertically justified to the top and that looks ugly (see the sample in attachment).
Any ideas ? Thanks.
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Mr. Puckette, Actually I am not familiar with awk and I couldn’t figure out how to use this script. Anyway, your script gave me an idea. I edited a postscript file and found the line related to the text justification. I think I can write a shell script now and mass change the necessary lines in all my .ps files by using the Gnu 'sed’ command. Thanks.
On 10 Dec 2013, at 01:19, Miller Puckette msp@ucsd.edu wrote:
Hi all -
I've used awk scripts. The exact thing to do depends on font size and on windowing system. Most recently my awk script was this:
BEGIN {last = -10} /findfont 8/ { last=NR $1 = "/Courier-Bold" $3 = 11.7 + 2 } { if (NR == last+2) { $1 = $1+1 $2 = $2-3 } print }
cheers Miller
On Tue, Dec 10, 2013 at 12:47:18AM +0200, Arda Eden wrote:
Hi, I am just about to finish a Turkish book about Pure Data. I am writing my book using Latex. The patch file example figures I use are directly printed (to file) as postscript files. But the fonts inside the object boxes are vertically justified to the top and that looks ugly (see the sample in attachment).
Any ideas ? Thanks.
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hi, After a few hours of work I decided that my solution was not a good idea. :) If I go back with Mr. Puckette’s script, how can I use it ? Is it a command line script or a piece of code that will work in pure data ?
Thanks.
On 10 Dec 2013, at 10:34, Arda Eden ardaeden@gmail.com wrote:
Mr. Puckette, Actually I am not familiar with awk and I couldn’t figure out how to use this script. Anyway, your script gave me an idea. I edited a postscript file and found the line related to the text justification. I think I can write a shell script now and mass change the necessary lines in all my .ps files by using the Gnu 'sed’ command. Thanks.
On 10 Dec 2013, at 01:19, Miller Puckette msp@ucsd.edu wrote:
Hi all -
I've used awk scripts. The exact thing to do depends on font size and on windowing system. Most recently my awk script was this:
BEGIN {last = -10} /findfont 8/ { last=NR $1 = "/Courier-Bold" $3 = 11.7 + 2 } { if (NR == last+2) { $1 = $1+1 $2 = $2-3 } print }
cheers Miller
On Tue, Dec 10, 2013 at 12:47:18AM +0200, Arda Eden wrote:
Hi, I am just about to finish a Turkish book about Pure Data. I am writing my book using Latex. The patch file example figures I use are directly printed (to file) as postscript files. But the fonts inside the object boxes are vertically justified to the top and that looks ugly (see the sample in attachment).
Any ideas ? Thanks.
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
On 2013-12-10 14:28, Arda Eden wrote:
Hi, After a few hours of work I decided that my solution was not a good idea. :) If I go back with Mr. Puckette?s script, how can I use it ? Is it a command line script or a piece of code that will work in pure data ?
it' an 'awk' script, design to be executed by awk.
something like the following should work:
see man awk for more information.
fgamsdr IOhannes
Oh thank you, I’ll check it.
On 10 Dec 2013, at 16:29, IOhannes m zmoelnig zmoelnig@iem.at wrote:
Signed PGP part On 2013-12-10 14:28, Arda Eden wrote:
Hi, After a few hours of work I decided that my solution was not a good idea. :) If I go back with Mr. Puckette?s script, how can I use it ? Is it a command line script or a piece of code that will work in pure data ?
it' an 'awk' script, design to be executed by awk.
something like the following should work:
- save the script snippet as "fixfonts.awk"
- then run: awk -f fixfonts.awk exportedpatchfile.ps > fixed.ps
see man awk for more information.
fgamsdr IOhannes
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hi Arda,
Whatever script you use doesn't matter. The point is that you search and replace text in the ps-file, so open the file with a text editor (e.g. gedit). For me it usually works to change the following line for all textfields in the patch (e.g. use Ctrl-H):
Old: 13 -0.0 0.0 0 false DrawText
New: 13 -0.0 -0.3 0 false DrawText
I prefer to use Courier-Bold for pd.ps-images. To change the font search for the word "font" and look for any font family (Ctrl-F or Ctrl-H). The standard is DejaVu...etc.. (I guess something with mono and bold, but I don't know exactly for I changed the default to UbuntuMono-Bold). Do the same trick again with search and replace and try again until you like the result. If you have lots of files it would make sense to write a script for the search and replace thing.
Have fun!
Thanks for your interest Funs. This is actually what I figured out. I wrote a script using Gnu 'sed' and now I am able to change multiple ps files at once. 13 0 -0.5 0 works for my case. :)
On 11 Dec 2013, at 01:52, Funs Seelen funsseelen@gmail.com wrote:
Hi Arda,
Whatever script you use doesn't matter. The point is that you search and replace text in the ps-file, so open the file with a text editor (e.g. gedit). For me it usually works to change the following line for all textfields in the patch (e.g. use Ctrl-H):
Old: 13 -0.0 0.0 0 false DrawText
New: 13 -0.0 -0.3 0 false DrawText
I prefer to use Courier-Bold for pd.ps-images. To change the font search for the word "font" and look for any font family (Ctrl-F or Ctrl-H). The standard is DejaVu...etc.. (I guess something with mono and bold, but I don't know exactly for I changed the default to UbuntuMono-Bold). Do the same trick again with search and replace and try again until you like the result. If you have lots of files it would make sense to write a script for the search and replace thing.
Have fun!