%\catcode`\@=11
\newif\if@psfont
\def\p@rsefontname#1#2#3#4\endf@ntname{\@psfontfalse%
\if#1p%
	\if#2a%
		\if#3d% pad = AdobeGaramond
			\@psfonttrue%
		\fi%
		\if#3d% ag = AvantGarde
			\@psfonttrue
		\fi%
	\fi%
	\if#2b\if#3k% pbk = Bookman
		\@psfonttrue%
	\fi\fi%
	\if#2c\if#3r% pcr = Courier
		\@psfonttrue%
	\fi\fi%
	\if#2h\if#3v% phr = Helvetica
		\@psfonttrue%
	\fi\fi%
	\if#2n\if#3c% pnc = New Century Schoolbook
		\@psfonttrue%
	\fi\fi%
	\if#2o\if#3p% pop = Optima
		\@psfonttrue%
	\fi\fi%
	\if#2p\if#3l% ppl = Palatino
		\@psfonttrue%
	\fi\fi%
	\if#2s\if#3t% pst = StoneSerif
		\@psfonttrue%
	\fi\fi%
	\if#2t\if#3m% ptm = Times
		\@psfonttrue%
	\fi\fi%
\fi}
\def\fix@parname#1{\expandafter\p@rsefontname#1\endf@ntname%
\endf@ntname\endf@ntname\endf@ntname}
\let\endf@ntname=\relax
\def\whatf@nt{\fix@parname{\fontname\font}}
%
\let\ogr@ve=\`
\let\o@cute=\'
\let\ocirc@m=\^
\let\odi@resis=\"
\let\otild@=\~
%\let\ocedill@=\c
\let\o@@=\AA
\let\oa@=\aa
\let\o@H=\H
\let\o@d@t=\.
\let\o@dot=\dot
%\def\`#1{\whatf@nt\if@psfont\char18#1\else\ogr@ve#1\fi}
%\def\'#1{\whatf@nt\if@psfont\char19#1\else\o@cute#1\fi}
%\def\^#1{\whatf@nt\if@psfont\char94#1\else\ocirc@m#1\fi}
%\def\"#1{\whatf@nt\if@psfont\char"7F#1\else\odi@resis#1\fi}
%\def\~#1{\whatf@nt\if@psfont\char"7E#1\else\otild@#1\fi}
%\def\c#1{\whatf@nt\if@psfont\char24#1\else\ocedill@#1\fi}
\def\H#1{\whatf@nt\if@psfont\accent"CD#1\else\o@H#1\fi}
\def\.#1{\whatf@nt\if@psfont\accent"C7#1\else\o@dot#1\fi}
\def\dot{\whatf@nt\if@psfont\mathaccent"70C7\else\o@dot\fi}
\def\AA{\whatf@nt\if@psfont\char23A\else\o@@\fi}
\def\aa{\whatf@nt\if@psfont\char23a\else\oa@\fi}
