3

I'm using a vanilla TeX Live installation, on top of which I have installed some non-free fonts with the getnonfreefonts script. Btw, I was well warned and installed it with getnonfreefonts --sys.

Now I've reconsidered, and think I'd get things better sorted out by installing the same fonts from tlcontrib, so that I handled everything from tlmgr, get updates etc. (not to mention to be able to uninstall...).

I wouldn't like both installations to step on each other's toes, so I want to uninstall the fonts installed with getnonfreefonts. However, the script doesn't seem to offer uninstallation (as far as I know). So I suppose I have to do it manually.

As far as I can see, the installed fonts went into texmf-local, but I don't know exactly what to delete. I also presume I'd have to manually rerun updmap --sys after deleting, but I'm not sure how to do it.

So, how to properly uninstall fonts installed with getnonfreefonts?

gusbrs
  • 13,740
  • Likely useful: https://tex.stackexchange.com/a/88424/105447. – gusbrs Dec 31 '22 at 19:36
  • But, as far as I'm digging the scripts, there's really no clean way backwards. getnonfreefonts calls getfont.pl (https://www.tug.org/~kotucha/getnonfreefonts/getfont.pl) which does the actual installation, and what is installed or not is determined for each of the fonts individually in the subroutine install. – gusbrs Dec 31 '22 at 20:25
  • Although the TUG website recommends checking for updates from time to time, the set of installed fonts is actually rather stable - in the last 13 years only two fonts were added (see http://web.archive.org/web/20100615013145/https://tug.org/fonts/getnonfreefonts/ for a 2009 snapshot). So I guess you can just use your existing installation without bothering yourself about 'getting things better sorted out', updating or having a tlmgr-only installation - and if you do want to update it can still be done very easily through getnonfreefonts itself. – Marijn Jan 01 '23 at 20:35
  • 1
    @Marijn While I do recognize this to be good advice (thanks for that, btw), isn't it a legitimate demand that I want to uninstall some software? Just because? Even if the fonts are stable. Whats more, texmf-local isn't replaced when I install the next TeX Live version, it will still be there. So, just live with it until next reformatting? True, not a big deal, and just doing nothing is possibly the wisest thing to do. Still it bothers me. You certainly won't see me installing getnonfreefonts again... – gusbrs Jan 02 '23 at 00:35

1 Answers1

1

This is not really an "answer" to the question, but the summary of why, as far as I can tell, it is difficult to answer it properly.

getnonfreefonts --help (or its man page) does not list any uninstallation options and, as far as I can see, the script really does not provide for it.

getnonfreefonts calls another script getfont.pl (https://www.tug.org/~kotucha/getnonfreefonts/getfont.pl) which actually performs the installation of the fonts. And the installation is handled for each font, case by case. So you may have, for example, classico which is installed from a TDS zip file with:

elsif ($font_package eq "classico") {
local $description="Classico (URW)";
local @mapfiles=qw(classico);

return if installed "doc/fonts/classico/README";

download "${CTAN}/install/fonts/urw/classico.tds.zip" or return;

remove_obsolete_files (
  'fonts/type1/urw/optima',
  'fonts/afm/urw/optima',
  'fonts/pfm/urw/optima',
  'fonts/tfm/urw/optima',
  'fonts/vf/urw/optima',
  'fonts/map/dvips/uop',
  'tex/latex/uop',
  'doc/fonts/urw/classico.txt'
    );

begin_zipfile "classico.tds.zip";
extract_tds_exclude;
end_zipfile;

disable_map 'uop';

install_maps;

}

Whereas, another example, eurofont is installed with:

 elsif ($font_package eq "eurofont") {
local $description="Euro Symbols (Adobe)";
local @mapfiles=qw(zpeu);
my $TYPE1DIR="$TYPE1ROOT/adobe/eurofont";
my $AFMDIR="$AFMROOT/adobe/eurofont";
my $TFMDIR="$TFMROOT/adobe/eurofont";
my $LTXDIR="$LTXROOT/eurofont";
my $DOCDIR="$DOCROOT/eurofont";
my $MAPDIR="$MAPROOT/eurofont";
my $SRCDIR="$SRCROOT/eurofont";

return if installed "$TYPE1DIR/zpeur.pfb",
"$LTXDIR/eurosans.sty";

return if ($opt_http and $http{'eurofont'}==0); 

download "${ADOBE}/eurofont.exe" or return;
download "${CTAN}/macros/latex/contrib/euro.zip" or return;

begin_zipfile 'eurofont.exe';
extract_rename "eurofont/_1______.PFB", $TYPE1DIR, "zpeurs.pfb";
extract_rename "eurofont/_1B_____.PFB", $TYPE1DIR, "zpeubs.pfb";
extract_rename "eurofont/_1I_____.PFB", $TYPE1DIR, "zpeuris.pfb";
extract_rename "eurofont/_1BI____.PFB", $TYPE1DIR, "zpeubis.pfb";
extract_rename "eurofont/_2______.PFB", $TYPE1DIR, "zpeurt.pfb";
extract_rename "eurofont/_2B_____.PFB", $TYPE1DIR, "zpeubt.pfb";
extract_rename "eurofont/_2I_____.PFB", $TYPE1DIR, "zpeurit.pfb";
extract_rename "eurofont/_2BI____.PFB", $TYPE1DIR, "zpeubit.pfb";
extract_rename "eurofont/_3______.PFB", $TYPE1DIR, "zpeur.pfb";
extract_rename "eurofont/_3B_____.PFB", $TYPE1DIR, "zpeub.pfb";
extract_rename "eurofont/_3I_____.PFB", $TYPE1DIR, "zpeuri.pfb";
extract_rename "eurofont/_3BI____.PFB", $TYPE1DIR, "zpeubi.pfb";

extract_rename "eurofont/_1______.AFM", $AFMDIR, "zpeurs.afm";
extract_rename "eurofont/_1B_____.AFM", $AFMDIR, "zpeubs.afm";
extract_rename "eurofont/_1I_____.AFM", $AFMDIR, "zpeuris.afm";
extract_rename "eurofont/_1BI____.AFM", $AFMDIR, "zpeubis.afm";
extract_rename "eurofont/_2______.AFM", $AFMDIR, "zpeurt.afm";
extract_rename "eurofont/_2B_____.AFM", $AFMDIR, "zpeubt.afm";
extract_rename "eurofont/_2I_____.AFM", $AFMDIR, "zpeurit.afm";
extract_rename "eurofont/_2BI____.AFM", $AFMDIR, "zpeubit.afm";
extract_rename "eurofont/_3______.AFM", $AFMDIR, "zpeur.afm";
extract_rename "eurofont/_3B_____.AFM", $AFMDIR, "zpeub.afm";
extract_rename "eurofont/_3I_____.AFM", $AFMDIR, "zpeuri.afm";
extract_rename "eurofont/_3BI____.AFM", $AFMDIR, "zpeubi.afm";
end_zipfile;

begin_zipfile "euro.zip";
extract "euro/font-support/tfm/*.tfm", $TFMDIR;
extract "euro/font-support/dvips/zpeu.map", $MAPDIR;
extract "euro/latex/europs/README.europs", $DOCDIR;
extract "euro/latex/europs/europs.ins", $SRCDIR;
extract "euro/latex/europs/europs.dtx", $SRCDIR;
extract "euro/latex/europs/eutest.*", $DOCDIR;
extract "euro/plaintex/eurosamp.*", $DOCDIR;
extract "euro/readme.txt", $DOCDIR;
extract "euro/latex/eurosans/README.eurosans", $DOCDIR;
extract "euro/latex/eurosans/eurosans.sty", $LTXDIR;
extract "euro/latex/europs/europs.ins";
extract "euro/latex/europs/europs.dtx";
end_zipfile;

run_tex "tex europs.ins";
move_file "europs.sty", $LTXDIR;
move_file "uzpeu.fd", $LTXDIR;
move_file "uzpeus.fd", $LTXDIR;
move_file "uzpeut.fd", $LTXDIR;

run_tex "pdflatex europs.dtx";
move_file "europs.pdf", $DOCDIR;

install_maps;

}

And so on, for each one of them. Technically, one can trace each installation step from the script and "undo" them. But it's quite a task. Probably not for the uninitiated.

If you're reading this, it is probably too late for you, as it is for me. But, if it's not, an alternative is to install these fonts from tlcontrib (https://contrib.texlive.info), which also contains the fonts available from getnonfreefonts, but manages things by adding an extra repository to tlmgr from where you can install the fonts as usual. Also uninstall them. Theoretically, we could also upgrade the fonts, but I'm not sure of how in sync these things are being kept. I know that, at the time of writing, the current version of classico obtained from the TDS zip that getnonfreefonts installs contains the version from 2022/09/29, while the one installed from tlcontrib contains the version from 2014/08/28.

gusbrs
  • 13,740