How can I tell if an outline font is already installed please?

G’day

Some time ago StefanK helped me out by writing an installer for fonts.

I’ve managed to stop the over-installation of plain fonts by using their open window names, but cannot find a way to do it with outline fonts.

We get lots of fonts, some of which are corrupt, and we would prefer to not reinstall over existing ‘clean’ fonts. Also, installed font names seem to often vary from the font file names.

The install line for outline fonts is…


do shell script "mv -f " & quoted form of POSIX path of (aFont as alias) & space & quoted form of POSIX path of installPath

Is there a shell script that will indicate that the font already exists please?

Regards

Santa

Model: intel 24" iMac
Browser: Safari 525.20
Operating System: Mac OS X (10.5)

make the "-f’ into a “-n”. Here are the relevant bits from mv’s man page.

The following options are available:

 -f      Do not prompt for confirmation before overwriting the destination
         path.  (The -f option overrides any previous -i or -n options.)
 -n     Do not overwrite an existing file.  (The -n option overrides any
         previous -f or -i options.)

G’day, and thanks James.

I’m also setting a flag if fonts are actually installed, is there any way of monitoring the results of this shell script?

ie set flag to true if new font installed, set to false if already existing and not overwritten.

Thanks again

Regards

Santa

G’day again

It’s OK, I found a workaround.

I’m trashing the font after installation.

If it trashes, then the font existed, and wasn’t re-installed.

If the trash routine errors, then the font was moved (installed).

Regards

Santa

Model: intel 24" iMac
Browser: Safari 525.20
Operating System: Mac OS X (10.5)