X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-0.2 required=5.0 tests=AWL,BAYES_50,J_CHICKENPOX_72,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: <408995400905111832m55a059e4l82a3a6c90f9e2018@mail.gmail.com> References: <408995400905080237y1ac5f951t4c3260a86fd23f16 AT mail DOT gmail DOT com> <408995400905111832m55a059e4l82a3a6c90f9e2018 AT mail DOT gmail DOT com> From: Hugh Myers Date: Tue, 12 May 2009 10:18:15 -0600 Message-ID: <408995400905120918v4504a792n296a44bde9e51d7c@mail.gmail.com> Subject: Re: 2 questions about fonts To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Oops, rush to judgment here. Caught in the old assumption trap--- I thought that if it worked for gs then it would follow that it should work for gv! Silly me!! However both will work with a symlink to the appropiate .PFB. So a change to the script: $ cat fonts.pl #!/usr/bin/perl # # fonts.pl -- create list of fonts for fontmap.GS from commandline use strict; use warnings; use PostScript::Font; use File::Basename; our $VERSION =3D '1.01'; my @files; for (@ARGV) { push(@files,glob($_)); } print "\n% -- Additional User Fonts --\n\n"; for (@files) { my $info =3D new PostScript::Font ($_,format =3D> 'pfb'); my $filename =3D basename($info->FileName()); print "/",$info->FontName(),"\t\t($filename)\t;\n"; } Now I cleaned out the full path version of my fonts from Fontmap.GS and then ran: $ perl ./fonts.pl /cygdrive/c/windows/fonts/*.PFB | cat >> /usr/share/ghostscript/8.63/lib/Fontmap.GS Next I created the symlinks in /usr/share/ghostscript/fonts with the follow= ing: $ ln /cygdrive/c/windows/fonts/*.PFB . At this point I have a working gs and gv. This makes writing raw postscript about as easy as it is going to get. --hsm On Mon, May 11, 2009 at 7:32 PM, Hugh Myers wrote: > The primary answer is yes. And since my belief is that lpr goes > through ghostscript for Postscript evaluation, things all resolve down > to getting ghostscript to "find" wanted fonts. After a great deal of > trial and error, it came down to a single file: Fontmap.GS. On my > system this is found at /usr/share/ghostscript/8.63/lib-- your mileage > may vary. Modifying this file leads to the desired result: for > instance in order for the /BriemMono line in gs to work, you need an > entry in Fontmap.GS that looks like: > > /BriemMono =A0 =A0 =A0 =A0 =A0 =A0 =A0(/cygdrive/c/windows/fonts/BRIEM___= .PFB) =A0 =A0 =A0 =A0; > > Two things to note--- the whitespace you see is comprised of tabs (old > tradition in unix, possible makes no difference, but still...) and the > location of the file (which may be different for you) is couched in > cygwin terms; /cygdrive/c/ etc. > > There after font name resolution is no longer a problem. > > Actually, since annotation by hand would in my case be a very large > PIA =A0(190 fonts to add), I wrote a small script that creates output > suitable for concatenation with Fontmap.GS: > > #!/usr/bin/perl > # > # fonts.pl -- create list of fonts for fontmap.GS from commandline > use strict; > use warnings; > use PostScript::Font; > > my @files; > > for (@ARGV) { > =A0 =A0push(@files,glob($_)); > } > print "\n% -- Additional User Fonts --\n\n"; > for (@files) { > =A0 =A0my $info =3D new PostScript::Font ($_,format =3D> 'pfb'); > =A0 =A0print "/",$info->FontName(),"\t\t(",$info->FileName(),")\t;\n"; > } > > Given the above, the following command gratifies greatly! > > =A0perl ./fonts.pl /cygdrive/c/windows/fonts/*.PFB | cat >> > /usr/share/ghostscript/8.63/lib/Fontmap.GS > > Problem solved, back to work;) > > On Fri, May 8, 2009 at 3:37 AM, Hugh Myers wrote: >> I've a great many postscript fonts installed under Windows XP--- is >> there a way to acquaint cygwin of these? >> >> How are font names resolved for lpr? For instance in a non cygwin >> situation, I might have a line in a postscript file such as: >> /BriemMono findfont 8 scalefont setfont (typeset these words) show. >> This runs without problems, I'd like to be able to do something >> similar using cygwin (obviously using cygwin installed fonts). I am >> somewhat clueless here, hence these questions. Thanks for any help... >> >> --hsm >> > -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/