%% Modifications copyright 2010 Clea F. Rees
%% Code from ts1.etx copyright 2005 Alan Jeffrey and Sebastian
%% Rahtz and Ulrik Vieth and Lars Hellstr{\"o}m (see below)
%% 
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%   http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%% 
%% This work has the LPPL maintenance status `maintained'.
%% 
%% The Current Maintainer of this work is Clea F. Rees.
%% 
%% This work consists of all files listed in manifest.txt.
%% 
%% ts1-dotoldstyle-yes.etx is a derived work under the terms of the LPPL. The 
%% original file, ts1.etx, is supplied with fontinst. A copy 
%% of fontinst including an unmodified copy of ts1.etx is 
%% available from
%% http://tug.ctan.org/tex-archive/fonts/utilities/fontinst.
%% The main modifications made to this file are as follows:
%% - The original notices at the top of that file concerning authors,
%% maintenance etc. are replaced by this notice.
%% - The file is renamed.
%% - The encoding is modified for oldstyle Electrum figures.
%% Adapted from ts1.etx - see that file for documentation
\relax
\encoding

\setstr{codingscheme}{TEX TEXT COMPANION - DOTOLDSTYLE ELECTRUM}

\ifisglyph{x}\then
   \setint{xheight}{\height{x}}
\else
   \setint{xheight}{500}
\fi

\ifisglyph{space}\then
   \setint{interword}{\width{space}}
\else\ifisglyph{i}\then
   \setint{interword}{\width{i}}
\else
   \setint{interword}{333}
\fi\fi


\setint{italicslant}{0}


\setint{fontdimen(1)}{\int{italicslant}}              % italic slant
\setint{fontdimen(2)}{\int{interword}}                % interword space
\setint{fontdimen(3)}{0}                              % interword stretch
\setint{fontdimen(4)}{0}                              % interword shrink
\setint{fontdimen(5)}{\int{xheight}}                  % x-height
\setint{fontdimen(6)}{1000}                           % quad
\setint{fontdimen(7)}{\int{interword}}                % extra space after .


\nextslot{0}
\setslot{capitalgrave}
   \comment{The grave accent `\capitalgrave{}', intended for use with
      capital letters.}
\endsetslot

\setslot{capitalacute}
   \comment{The acute accent `\capitalacute{}', intended for use with
      capital letters.}
\endsetslot

\setslot{capitalcircumflex}
   \comment{The circumflex accent `\capitalcircumflex{}', intended for
      use with capital letters.}
\endsetslot

\setslot{capitaltilde}
   \comment{The tilde accent `\capitaltilde{}', intended for use with
      capital letters.}
\endsetslot

\setslot{capitaldieresis}
   \comment{The umlaut or dieresis accent `\capitaldieresis{}',
      intended for use with capital letters.}
\endsetslot

\setslot{capitalhungarumlaut}
   \comment{The long Hungarian umlaut `\capitalhungarumlaut{}',
      intended for use with capital letters.}
\endsetslot

\setslot{capitalring}
   \comment{The ring accent `\capitalring{}', intended for use with
      capital letters.}
\endsetslot

\setslot{capitalcaron}
   \comment{The caron or h\'a\v cek accent `\capitalcaron{}', intended
      for use with capital letters.}
\endsetslot

\setslot{capitalbreve}
   \comment{The breve accent `\capitalbreve{}', intended for use with
      capital letters.}
\endsetslot

\setslot{capitalmacron}
   \comment{The macron accent `\capitalmacron{}', intended for use with
      capital letters.}
\endsetslot

\setslot{capitaldotaccent}
   \comment{The dot accent `\capitaldotaccent{}', intended for use with
      capital letters.}
\endsetslot

\setslot{cedilla}
   \comment{The cedilla accent `\capitalcedilla{}', intended for use
      with capital letters.}
\endsetslot

\setslot{ogonek}
   \comment{The ogonek accent `\capitalogonek{}', intended for use with
      capital letters.}
\endsetslot

\nextslot{13}
\setslot{quotesinglbase}
   \comment{A straight single quote mark on the baseline,
      `\textquotestraightbase'.}
\endsetslot

\nextslot{18}
\setslot{quotedblbase}
   \comment{A straight double quote mark on the baseline,
      `\textquotestraightdblbase'.}
\endsetslot

\nextslot{21}
\setslot{twelveudash}
   \comment{A 2/3~em dash, `\texttwelveudash'.}
\endsetslot

\setslot{threequartersemdash}
   \comment{A 3/4~em dash, `\textthreequartersemdash'.}
\endsetslot

\nextslot{23}
\setslot{capitalcompwordmark}
    \comment{An invisible glyph, with zero width and depth, but the
      height of capital letters.
      It is used to stop ligaturing in words like `shelf{}ful'.}
\endsetslot

\nextslot{24}
\setslot{arrowleft}
   \comment{A left pointing arrow, `\textleftarrow', unavailable in
      most PostScript fonts.}
\endsetslot

\setslot{arrowright}
   \comment{A right pointing arrow, `\textrightarrow', unavailable in
      most PostScript fonts.}
\endsetslot

\nextslot{26}
\setslot{tieaccentlowercase}
   \comment{The original tie accent `\t{}', intended for use with
      lowercase letters.}
\endsetslot

\setslot{tieaccentcapital}
   \comment{The tie accent `\capitaltie{}', intended for use with
      capital letters.}
\endsetslot

\setslot{newtieaccentlowercase}
   \comment{A new tie accent `\newtie{}', intended for use with
      lowercase letters.}
\endsetslot

\setslot{newtieaccentcapital}
   \comment{A new tie accent `\capitalnewtie{}', intended for use
      with capital letters.}
\endsetslot

\nextslot{31}
\setslot{ascendercompwordmark}
    \comment{An invisible glyph, with zero width and depth, but the
      height of lowercase letters with ascenders.
      It is used to stop ligaturing in words like `shelf{}ful'.}
\endsetslot

\nextslot{32}
\setslot{blank}
   \comment{The blank indicator `\textblank', similar to the letter `b'
      with an oblique bar throgh the stem.}
\endsetslot

\nextslot{36}
\setslot{dollar.oldstyle}
   \comment{The dollar sign `\textdollar'.}
\endsetslot

\nextslot{39}
\setslot{quotesingle}
   \comment{A straight single quote mark, `\textquotesingle'.}
\endsetslot

\nextslot{42}
\setslot{asteriskcentered}
   \comment{The centered asterisk, `\textasteriskcentered'.}
\endsetslot

\nextslot{44}
\setslot{comma}
   \comment{The decimal comma `,'.}
\endsetslot

\nextslot{45}
\setslot{hyphendbl}
   \comment{An alternate double hyphen, `\textdblhyphen'.}
\endsetslot

\nextslot{46}
\setslot{period}
   \comment{The decimal point `.'.}
\endsetslot

\nextslot{47}
\setslot{fraction}
   \comment{The fraction slash `\textfractionsolidus'.}
\endsetslot

\nextslot{48}
\setslot{zero.oldstyle}
   \comment{The oldstyle number `\oldstylenums{0}'.}
\endsetslot

\setslot{one.oldstyle}
   \comment{The oldstyle number `\oldstylenums{1}'.}
\endsetslot

\setslot{two.oldstyle}
   \comment{The oldstyle number `\oldstylenums{2}'.}
\endsetslot

\setslot{three.oldstyle}
   \comment{The oldstyle number `\oldstylenums{3}'.}
\endsetslot

\setslot{four.oldstyle}
   \comment{The oldstyle number `\oldstylenums{4}'.}
\endsetslot

\setslot{five.oldstyle}
   \comment{The oldstyle number `\oldstylenums{5}'.}
\endsetslot

\setslot{six.oldstyle}
   \comment{The oldstyle number `\oldstylenums{6}'.}
\endsetslot

\setslot{seven.oldstyle}
   \comment{The oldstyle number `\oldstylenums{7}'.}
\endsetslot

\setslot{eight.oldstyle}
   \comment{The oldstyle number `\oldstylenums{8}'.}
\endsetslot

\setslot{nine.oldstyle}
   \comment{The oldstyle number `\oldstylenums{9}'.}
\endsetslot

\nextslot{60}
\setslot{angbracketleft}
   \comment{The opening angle bracket `\textlangle', unavailable in
      most PostScript fonts.}
\endsetslot

\nextslot{61}
\setslot{minus}
   \comment{The subtraction sign `\textminus'.}
\endsetslot

\nextslot{62}
\setslot{angbracketright}
   \comment{The closing angle bracket `\textrangle', unavailable in
      most PostScript fonts.}
\endsetslot

\nextslot{77}
\setslot{Omegainv}
   \comment{The inverted Ohm sign `\textmho', unavailable in most fonts.}
\endsetslot

\nextslot{79}
   \comment{A circle `\textbigcircle', big enough to enclose a letter
      as in `\textcopyright' or `\textregistered'.}
\setslot{bigcircle}
\endsetslot

\nextslot{87}
\setslot{Omega}
   \comment{The upright Ohm sign `\textohm', unavailable in most fonts.
      Even if it is available in Mac-encoded fonts, it isn't directly
      accessible in the 8r or 8y encodings.}
\endsetslot

\nextslot{91}
\setslot{openbracketleft}
   \comment{The opening double square bracket `\textlbrackdbl',
      unavailable in most PostScript fonts.}
\endsetslot

\nextslot{93}
\setslot{openbracketright}
   \comment{The closing double square bracket `\textrbrackdbl',
      unavailable in most PostScript fonts.}
\endsetslot

\nextslot{94}
\setslot{arrowup}
   \comment{An upwards pointing arrow `\textuparrow', unavailable in
      most PostScript fonts.}
\endsetslot

\nextslot{95}
\setslot{arrowdown}
   \comment{An downwards pointing arrow `\textdownarrow', unavailable
      in most PostScript fonts.}
\endsetslot

\nextslot{96}
\setslot{asciigrave}
   \comment{An ASCII-style grave `\textasciigrave'. This is supposed
      to be a character by itself rather than a combining accents.}
\endsetslot

\nextslot{98}
\setslot{born}
   \comment{The born symbol `\textborn', unavailable in most PostScript
      fonts.}
\endsetslot

\nextslot{99}
\setslot{divorced}
   \comment{The divorced symbol `\textdivorced', unavailable in most
      PostScript fonts.}
\endsetslot

\nextslot{100}
\setslot{died}
   \comment{The died symbol `\textdied', unavailable in most PostScript
      fonts.}
\endsetslot

\nextslot{108}
\setslot{leaf}
   \comment{The leaf symbol `\textleaf', unavailable in most PostScript
      fonts.}
\endsetslot

\nextslot{109}
\setslot{married}
   \comment{The married symbol `\textmarried', unavailable in most
      PostScript  fonts.}
\endsetslot

\nextslot{110}
\setslot{musicalnote}
   \comment{A musical note symbol `\textmusicalnote', unavailable in
      most PostScript fonts.}
\endsetslot

\nextslot{126}
\setslot{tildelow}
   \comment{A lowered tilde `\texttildelow'.  In most PostScript fonts
      it can be substituted by `asciitilde', while `\textasciitilde'
      is supposed to be a raised `tilde'.}
\endsetslot

\nextslot{127}
\setslot{hyphendblchar}
    \comment{The glyph used for hyphenation in this font, which will
      almost always be the same as `hyphendbl'.}
\endsetslot

\nextslot{128}
\setslot{asciibreve}
   \comment{An ASCII-style breve `\textasciibreve'. This is supposed
      to be a character by itself rather than a combining accents.}
\endsetslot

\setslot{asciicaron}
   \comment{An ASCII-style caron `\textasciicaron'. This is supposed
      to be a character by itself rather than a combining accents.}
\endsetslot

\setslot{asciiacutedbl}
   \comment{An ASCII-style double tick mark, `\textacutedbl'.}
\endsetslot

\setslot{asciigravedbl}
   \comment{An ASCII-style double backtick mark, `\textgravedbl'.}
\endsetslot

\setslot{dagger}
   \comment{The single dagger `\textdagger'.}
\endsetslot

\setslot{daggerdbl}
   \comment{The double dagger `\textdaggerdbl'.}
\endsetslot

\setslot{bardbl}
   \comment{The double vertical bar `\textbardbl'.}
\endsetslot

\setslot{perthousand.oldstyle}
   \comment{The perthousand sign `\textperthousand'.}
\endsetslot

\setslot{bullet}
   \comment{The centered bullet `\textbullet'.}
\endsetslot

\setslot{centigrade}
   \comment{The degree centigrade symbol `\textcelsius'.}
\endsetslot

\setslot{dollar.oldstyle}
   \comment{An oldstyle dollar sign `\textdollaroldstyle'.}
\endsetslot

\setslot{cent.oldstyle}
   \comment{An oldstyle cent sign `\textcentoldstyle'.}
\endsetslot

\setslot{florin}
   \comment{The florin sign `\textflorin'.}
\endsetslot

\setslot{colonmonetary}
   \comment{The Colon currency sign `\textcolonmonetary', similar to
      a capital `C' with a vertical bar through the middle.}
\endsetslot

\setslot{won}
   \comment{The Won currency sign `\textwon', similar to a capital `W'
      with two horizontal bars.}
\endsetslot

\setslot{naira}
   \comment{The Naira currency sign `\textnaira', similar to a
      capital `N' with two horizontal bars.}
\endsetslot

\setslot{guarani}
   \comment{The Guarani currency sign `\textguarani',  similar to
      a capital `G' with a vertical bar through the middle.}
\endsetslot

\setslot{peso}
   \comment{The Peso currency sign `\textpeso', similar to a capital `P'
      with a horizontal bar through the bowl or below the bowl.}
\endsetslot

\setslot{lira}
   \comment{The Lira currency sign `\textlira', similar to a sterling
      sign `\textsterling' with two horizontal bars.}
\endsetslot

\setslot{recipe}
   \comment{The recipe symbol `\textrecipe', similar to a capital `R'
      with an oblique bar through the tail.}
\endsetslot

\setslot{interrobang}
   \comment{The interrobang symbol `\textinterrobang', similar to
      a combination of an exclamation mark and a question mark.}
\endsetslot

\setslot{interrobangdown}
   \comment{The inverted interrobang symbol `\textinterrobangdown',
      similar to a combination of an inverted exclamation mark
      and an inverted question mark.}
\endsetslot

\setslot{dong}
   \comment{The Dong currency sign `\textdong', similar to a lowercase
      `d'  with a horizontal bar through the stem and another bar below
      the letter.}
\endsetslot

\setslot{trademark}
   \comment{The trademark sign `\texttrademark', similar to the raised
     letters `TM'.}
\endsetslot

\setslot{pertenthousand}
   \comment{The pertenthousand sign `\textpertenthousand', unavailable
     in most PostScript fonts.}
\endsetslot

\setslot{pilcrow}
   \comment{The pilcrow mark `\textpilcrow', similar to a paragraph
      mark `\textparagraph' with a single stem.}
\endsetslot

\setslot{baht}
   \comment{The Baht currency sign `\textbaht', similar to a capital `B'
      with a vertical bar through the middle.}
\endsetslot

\setslot{numero}
   \comment{The numero sign `\textnumero', similar to the letter `N'
      with a raised `o', unavailable in most PostScript fonts.}
\endsetslot

\setslot{discount}
   \comment{The discount sign `\textdiscount', similar to a stylized
      percent sign, unavailable in most PostScript fonts.}
\endsetslot

\setslot{estimated}
   \comment{The estimated sign `\textestimated', similar to an enlarged
      lowercase `e', unavailable in most PostScript fonts.}
\endsetslot

\setslot{openbullet}
   \comment{The centered open bullet `\textopenbullet'', unavailable
      in most PostScript fonts.}
\endsetslot

\setslot{servicemark}
   \comment{The service mark sign `\textservicemark', similar to the
      raised letters `SM', unavailable in most PostScript fonts.}
\endsetslot

\nextslot{160}
\setslot{quillbracketleft}
   \comment{The opening quill bracket `\textlquill', unavailable in
      most PostScript fonts.}
\endsetslot

\setslot{quillbracketright}
   \comment{The closing quill bracket `\textrquill', unavailable in
      most PostScript fonts.}
\endsetslot

\setslot{cent.oldstyle}
   \comment{The cent sign `\textcent'.}
\endsetslot

\setslot{sterling.oldstyle}
   \comment{The British currency sign, `\textsterling'.}
\endsetslot

\setslot{currency}
   \comment{The international currency sign, `\textcurrency'.}
\endsetslot

\setslot{yen.oldstyle}
   \comment{The Japanese currency sign, `\textyen'.}
\endsetslot

\setslot{brokenbar}
   \comment{A broken vertical bar, `\textbrokenbar', similar to
      `\textbar' with a gap through the middle.}
\endsetslot

\setslot{section}
   \comment{The section mark `\textsection'.}
\endsetslot

\setslot{asciidieresis}
   \comment{An ASCII-style dieresis `\textasciidieresis'. This is
       supposed to be character by itself  rather than an accents.}
\endsetslot

\setslot{copyright}
   \comment{The copyright sign `\textcopyright',  similar to a small
       letter `C' enclosed by a circle.}
\endsetslot

\setslot{ordfeminine}
   \comment{The raised letter `\textordfeminine'.}
\endsetslot

\setslot{copyleft}
   \comment{The reversed copyright sign `\textcopyleft', similar to
      a small reversed `C' enclosed by a circle.}
\endsetslot

\setslot{logicalnot}
   \comment{The logical not sign `\textlnot'.}
\endsetslot

\setslot{circledP}
   \comment{A small letter `P' enclosed by a circle, `\textcircledP',
      unavailable in most fonts.}
\endsetslot

\setslot{registered}
   \comment{The registered trademark sign `\textregistered', similar to
      a small letter `R' enclosed by a circle.}
\endsetslot

\setslot{asciimacron}
   \comment{An ASCII-style macron `\textasciimacron'. This is supposed
      to be a character by itself rather than a combining accents.}
\endsetslot

\setslot{degree}
   \comment{The degree sign `\textdegree'.}
\endsetslot

\setslot{plusminus}
   \comment{The plus or minus sign `\textpm'.}
\endsetslot

\setslot{two.superior}
   \comment{The raised digit `\texttwosuperior'.}
\endsetslot

\setslot{three.superior}
   \comment{The raised digit `\textthreesuperior'.}
\endsetslot

\setslot{asciiacute}
   \comment{An ASCII-style acute `\textasciiacute'. This is supposed
      to be a character by itself rather than a combining accents.}
\endsetslot

\setslot{mu}
   \comment{The lowercase Greek letter `\textmu', intended  for use as
      a prefix `micro' in physical units.}
\endsetslot

\setslot{paragraph}
   \comment{The paragraph mark `\textparagraph'.}
\endsetslot

\setslot{periodcentered}
   \comment{The centered period `\textperiodcentered'.}
\endsetslot

\setslot{referencemark}
   \comment{The reference mark `\textreferencemark', similar to
      a combination of the `multiply' and `divide' symbols.}
\endsetslot

\setslot{one.superior}
   \comment{The raised digit `\textonesuperior'.}
\endsetslot

\setslot{ordmasculine}
   \comment{The raised letter `\textordmasculine'.}
\endsetslot

\setslot{radical}
   \comment{The radical sign `\textsurd', unavailable in most fonts.
      Even if it is available in Mac-encoded fonts, it isn't directly
      accessible in the 8r or 8y encodings.}
\endsetslot

\setslot{onequarter}
   \comment{The fraction `\textonequarter'.}
\endsetslot

\setslot{onehalf}
   \comment{The fraction `\textonehalf'.}
\endsetslot

\setslot{threequarters}
   \comment{The fraction `\textthreequarters'.}
\endsetslot

\ifisglyph{euro.oldstyle}\then
	\setslot{euro.oldstyle}
		\comment{The European currency sign, similar to `\texteuro'.}
	\endsetslot
\Else
	\setslot{Euro.oldstyle}
		\comment{The European currency sign, similar to `\texteuro'.}
	\endsetslot
\Fi

\setslot{Euro.oldstyle}
	\comment{This just makes sure that any glyph labelled `Euro' in the font gets encoded. The TS1 encoding will use the previous slot when the font is actually used by tex. At least, I think so. That is, since we've got spare slots in this encoding, we can use them to enable "either... or..." encoding options both for reencoding the fonts for fontinst and for the tex encodings. (?!)}
\endsetslot
	
\setslot{euro.oldstyle}
	\comment{This just makes sure that any glyph labelled `euro' in the font gets encoded. The TS1 encoding will use the previous slot when the font is actually used by tex. At least, I think so. That is, since we've got spare slots in this encoding, we can use them to enable "either... or..." encoding options both for reencoding the fonts for fontinst and for the tex encodings. (?!)}
\endsetslot

\nextslot{214}
\setslot{multiply}
   \comment{The multiplication sign `\texttimes'.
      This symbol was originally intended to be put into slot~215,
      but ended up in this slot by mistake, at which time it was
      considered too late to change it.}
\endsetslot

\nextslot{246}
\setslot{divide}
   \comment{The divison sign `\textdiv'.
      This symbol was originally intended to be put into slot~247,
      but ended up in this slot by mistake, at which time it was
      onsidered too late to change it.}
\endsetslot

\setslot{percent.oldstyle}
	\comment{This doesn't really belong here but seems the most natural place for it. It is not part of the TS1 encoding. Hopefully it will at least do no harm.}
\endsetslot

\endencoding


