%D \module
%D   [     file=enco-st1,
%D      version=2005.03.22,
%D        title=\CONTEXT\ Encoding Macros,
%D     subtitle=Encoding for Storm font (ec, t1 derivative),
%D       author=Vit Zyka,
%D         date=\currentdate,
%D    copyright=PRAGMA-ADE]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

%D This encoding was prepared by Petr Olsak.
%D Use for Storm Type Foundry fonts.

\startmapping[st1]

\definecasemaps 160 to 188 lc +32 uc 0
\definecasemaps 192 to 255 lc 0 uc -32

\stopmapping

\startcoding[st1]

\definecharacter textgrave		0
\definecharacter textacute		1
\definecharacter textcircumflex		2
\definecharacter texttilde		3
\definecharacter textdiaeresis		4
\definecharacter texthungarumlaut	5
\definecharacter textring		6
\definecharacter textcaron		7
\definecharacter textbreve		8
\definecharacter textmacron		9
\definecharacter textdotaccent		10
\definecharacter textcedilla		11
\definecharacter textogonek		12
\definecharacter quotesinglebase	13
\definecharacter guilsingleleft		14
\definecharacter guilsingleright	15
\definecharacter quotedblleft		16
\definecharacter quotedblright		17
\definecharacter quotedblbase		18
\definecharacter guillemotleft		19
\definecharacter guillemotright		20
\definecharacter endash			21
\definecharacter emdash			22
\definecharacter cmw			23 % not present in Storm
\definecharacter perthousand		24
\definecharacter dotlessi		25
%\definecharacter greekpi		26
\definecharacter ffligature		27
\definecharacter filigature		28
\definecharacter flligature		29
\definecharacter ffiligature		30
\definecharacter fflligature		31
\definecharacter exclam			33
\definecharacter quotedblright		34
\definecharacter numbersign		35
\definecharacter dollar			36
\definecharacter percent		37
\definecharacter ampersand		38
\definecharacter quoteright		39
\definecharacter parenleft		40
\definecharacter parenright		41
\definecharacter asterisk		42
\definecharacter plus			43
\definecharacter comma			44
\definecharacter hyphen			45
\definecharacter period			46
\definecharacter textslash		47
\definecharacter colon			58
\definecharacter semicolon		59
\definecharacter exclamdown		60
\definecharacter equal			61
\definecharacter questiondown		62
\definecharacter question		63
\definecharacter textat			64
\definecharacter bracketleft		91
\definecharacter backslash		92
\definecharacter bracketright		93
\definecharacter textcircumflex     	94
\definecharacter underscore      	95
\definecharacter quoteleft		96
\definecharacter braceleft		123
\definecharacter bar			124
\definecharacter braceright		125
\definecharacter asciitilde		126
\definecharacter hyphen			127
\definecharacter Abreve			128
\definecharacter Aogonek		129
\definecharacter Cacute 		130
\definecharacter Ccaron			131
\definecharacter Dcaron			132
\definecharacter Ecaron			133
\definecharacter Eogonek		134
\definecharacter Gbreve			135
\definecharacter Lacute			136
\definecharacter Lcaron			137 
\definecharacter Lslash			138
\definecharacter Nacute			139
\definecharacter Ncaron			140
%\definecharacter Eng			141
\definecharacter Ohungarumlaut 		142
\definecharacter Racute 		143
\definecharacter Rcaron 		144
\definecharacter Sacute			145
\definecharacter Scaron			146
\definecharacter Scedilla		147 
\definecharacter Tcaron			148
\definecharacter Tcedilla		149 
\definecharacter Uhungarumlaut		150
\definecharacter Uring			151
\definecharacter Ydiaeresis		152
\definecharacter Zacute			153
\definecharacter Zcaron			154
\definecharacter Zdotaccent		155
\definecharacter IJligature		156
\definecharacter Idotaccent		157
\definecharacter dmacron		158
\definecharacter sectionmark		159
\definecharacter abreve			160
\definecharacter aogonek		161
\definecharacter cacute			162
\definecharacter ccaron			163
\definecharacter dcaron			164 
\definecharacter ecaron			165
\definecharacter eogonek		166
\definecharacter gbreve			167
\definecharacter lacute			168
\definecharacter lcaron			169
\definecharacter lslash			170
\definecharacter nacute			171
\definecharacter ncaron			172
%\definecharacter eng			173
\definecharacter ohungarumlaut		174
\definecharacter racute			175
\definecharacter rcaron			176
\definecharacter sacute			177
\definecharacter scaron			178
\definecharacter scedilla		179
\definecharacter tcaron			180
\definecharacter tcedilla		181
\definecharacter uhungarumlaut		182
\definecharacter uring			183
\definecharacter ydiaeresis		184
\definecharacter zacute			185
\definecharacter zcaron			186
\definecharacter zdotaccent		187
\definecharacter ijligature		188
\definecharacter exclamdown		189
\definecharacter questiondown		190
\definecharacter textsterling		191
\definecharacter Agrave			192
\definecharacter Aacute			193
\definecharacter Acircumflex		194
\definecharacter Atilde			195
\definecharacter Adiaeresis		196
\definecharacter Aring			197
\definecharacter AEligature		198
\definecharacter Ccedilla		199
\definecharacter Egrave			200
\definecharacter Eacute			201
\definecharacter Ecircumflex		202
\definecharacter Ediaeresis		203
\definecharacter Igrave			204
\definecharacter Iacute			205
\definecharacter Icircumflex		206
\definecharacter Idiaeresis		207
\definecharacter Eth			208
\definecharacter Ntilde			209
\definecharacter Ograve			210
\definecharacter Oacute			211
\definecharacter Ocircumflex		212
\definecharacter Otilde			213
\definecharacter Odiaeresis		214
\definecharacter OEligature		215
\definecharacter Oslash			216
\definecharacter Ugrave			217
\definecharacter Uacute			218
\definecharacter Ucircumflex		219
\definecharacter Udiaeresis		220
\definecharacter Yacute			221
\definecharacter Thorn			222
%\definecharacter Ssharp			223
\definecharacter agrave			224
\definecharacter aacute			225
\definecharacter acircumflex		226
\definecharacter atilde			227
\definecharacter adiaeresis		228
\definecharacter aring			229
\definecharacter aeligature		230
\definecharacter ccedilla		231
\definecharacter egrave			232
\definecharacter eacute			233
\definecharacter ecircumflex		234
\definecharacter ediaeresis		235
\definecharacter igrave			236
\definecharacter iacute			237
\definecharacter icircumflex		238
\definecharacter idiaeresis		239
\definecharacter eth			240
\definecharacter ntilde			241
\definecharacter ograve			242
\definecharacter oacute			243
\definecharacter ocircumflex		244
\definecharacter otilde			245
\definecharacter odiaeresis		246
\definecharacter oeligature		247
\definecharacter oslash			248
\definecharacter ugrave			249
\definecharacter uacute			250
\definecharacter ucircumflex		251
\definecharacter udiaeresis		252
\definecharacter yacute			253
\definecharacter thorn			254
\definecharacter ssharp			255

%--- pointers to variants (extension excoding)
\def\defineVarcharacter#1 #2 #3 % 1-glyph name 2-glyph code 3-variant
  {\definecharacter #1 {{\Var[#3]#2}} } % spaces important!
\unexpanded\def\defineVarExtcharacter#1 #2 % 1-glyph name 2-glyph code
  {\defineVarcharacter #1 #2 ext }
\unexpanded\def\defineVarExtAutocharacter#1 % 1-glyph name
  {\defineVarExtcharacter #1 {\csname#1\endcsname} }

\defineVarExtAutocharacter minus
\defineVarExtAutocharacter onesuperior
\defineVarExtAutocharacter twosuperior
\defineVarExtAutocharacter threesuperior
\defineVarExtAutocharacter lessequal
\defineVarExtAutocharacter notequal
\defineVarExtAutocharacter greaterequal
\defineVarExtAutocharacter plusminus
\defineVarExtAutocharacter onequarter
\defineVarExtAutocharacter onehalf
\defineVarExtAutocharacter threequarters
\defineVarExtAutocharacter textfraction
\defineVarExtAutocharacter degree
\defineVarExtAutocharacter brokenbar
\defineVarExtAutocharacter textmultiply
\defineVarExtAutocharacter textdivide
\defineVarExtAutocharacter summation
\defineVarExtAutocharacter greekOmega
\defineVarExtAutocharacter greekpi
\defineVarExtAutocharacter mu
\defineVarExtAutocharacter greekDelta
\defineVarExtAutocharacter logicalnot
\defineVarExtAutocharacter infinity
\defineVarExtAutocharacter textradical
\defineVarExtAutocharacter ordfeminine
\defineVarExtAutocharacter ordmasculine
\defineVarExtAutocharacter UCtextgrave
\defineVarExtAutocharacter UCtextacute
\defineVarExtAutocharacter UCtextcaron
\defineVarExtAutocharacter UCtextcircumflex
\defineVarExtAutocharacter UCtextbreve
\defineVarExtAutocharacter UCtextring
\defineVarExtAutocharacter nbspace
%\defineVarExtAutocharacter exclam
\defineVarExtAutocharacter quotedbl
\defineVarExtAutocharacter UCtextmacron
\defineVarExtAutocharacter UCtextdotaccent
\defineVarExtAutocharacter UCtexthungarumlaut
\defineVarExtAutocharacter UCtextogonek
\defineVarExtAutocharacter UCtextcedilla
\defineVarExtAutocharacter UCtexttilde
\defineVarExtAutocharacter UCtextdiaeresis
\defineVarExtAutocharacter commaaccent
\defineVarExtAutocharacter less
\defineVarExtAutocharacter greater
%\defineVarExtAutocharacter backslash
\defineVarExtAutocharacter asciicircum
%\defineVarExtAutocharacter underscore
%\defineVarExtAutocharacter braceleft
%\defineVarExtAutocharacter bar
%\defineVarExtAutocharacter braceright
%\defineVarExtAutocharacter asciitilde
\defineVarExtAutocharacter periodcentered
\defineVarExtAutocharacter ctligature
\defineVarExtAutocharacter stligature
\defineVarExtAutocharacter ftligature
\defineVarExtAutocharacter longstligature
\defineVarExtAutocharacter longs
\defineVarExtAutocharacter textlozenge
\defineVarExtAutocharacter textflorin
%\defineVarExtAutocharacter florin
%\defineVarExtAutocharacter dmacron
\defineVarExtAutocharacter Euro
\defineVarExtAutocharacter franc
\defineVarExtAutocharacter currency
\defineVarExtAutocharacter Tbar
\defineVarExtAutocharacter Tcommaaccent
\defineVarExtAutocharacter Umacron
\defineVarExtAutocharacter Ubreve
%\defineVarExtAutocharacter Thorn
%\defineVarExtAutocharacter Ydiaeresis
\defineVarExtAutocharacter Rcedilla
\defineVarExtAutocharacter Scircumflex
%\defineVarExtAutocharacter Ucircumflex
\defineVarExtAutocharacter Uogonek
\defineVarExtAutocharacter Utilde
\defineVarExtAutocharacter Ncommaaccent
\defineVarExtAutocharacter Gacute
%\defineVarExtAutocharacter Gbreve
\defineVarExtAutocharacter Jcircumflex
%\defineVarExtAutocharacter IJligature
%\defineVarExtAutocharacter Idotaccent
\defineVarExtAutocharacter Lcedilla
\defineVarExtAutocharacter Ldotaccent
\defineVarExtAutocharacter dagger
\defineVarExtAutocharacter daggerdbl
\defineVarExtAutocharacter bullet
\defineVarExtAutocharacter paragraph
\defineVarExtAutocharacter ellipsis
\defineVarExtAutocharacter trademark
\defineVarExtAutocharacter copyright
\defineVarExtAutocharacter registered
\defineVarExtAutocharacter cent
\defineVarExtAutocharacter yen
\defineVarExtAutocharacter tbar
\defineVarExtAutocharacter tcommaaccent
\defineVarExtAutocharacter umacron
\defineVarExtAutocharacter ubreve
%\defineVarExtAutocharacter eth
%\defineVarExtAutocharacter thorn
%\defineVarExtAutocharacter ydiaeresis
\defineVarExtAutocharacter rcedilla
\defineVarExtAutocharacter scircumflex
%\defineVarExtAutocharacter ucircumflex
\defineVarExtAutocharacter uogonek
\defineVarExtAutocharacter utilde
\defineVarExtAutocharacter ncommaaccent
\defineVarExtAutocharacter gacute
%\defineVarExtAutocharacter gbreve
\defineVarExtAutocharacter jcircumflex
%\defineVarExtAutocharacter ijligature
\defineVarExtAutocharacter lcedilla
\defineVarExtAutocharacter ldotaccent
\defineVarExtAutocharacter Wcircumflex
\defineVarExtAutocharacter Edotaccent
\defineVarExtAutocharacter Ycircumflex
%\defineVarExtAutocharacter Atilde
\defineVarExtAutocharacter Amacron
%\defineVarExtAutocharacter Aring
\defineVarExtAutocharacter Ccircumflex
\defineVarExtAutocharacter Cdotaccent
%\defineVarExtAutocharacter Egrave
\defineVarExtAutocharacter Ebreve
%\defineVarExtAutocharacter Ecircumflex
\defineVarExtAutocharacter Emacron
%\defineVarExtAutocharacter Igrave
\defineVarExtAutocharacter Itilde
\defineVarExtAutocharacter Imacron
%\defineVarExtAutocharacter Idiaeresis
\defineVarExtAutocharacter Iogonek
%\defineVarExtAutocharacter Ntilde
%\defineVarExtAutocharacter Ograve
\defineVarExtAutocharacter Omacron
\defineVarExtAutocharacter Obreve
%\defineVarExtAutocharacter Otilde
\defineVarExtAutocharacter Ncedilla
\defineVarExtAutocharacter Kcedilla
%\defineVarExtAutocharacter Ugrave
\defineVarExtAutocharacter Gcircumflex
\defineVarExtAutocharacter Gdotaccent
\defineVarExtAutocharacter Gcedilla
\defineVarExtAutocharacter Scommaaccent
\defineVarExtAutocharacter Hcircumflex
\defineVarExtAutocharacter Hbar
\defineVarExtAutocharacter wcircumflex
\defineVarExtAutocharacter edotaccent
\defineVarExtAutocharacter ycircumflex
%\defineVarExtAutocharacter atilde
\defineVarExtAutocharacter amacron
%\defineVarExtAutocharacter aring
\defineVarExtAutocharacter ccircumflex
\defineVarExtAutocharacter cdotaccent
%\defineVarExtAutocharacter egrave
\defineVarExtAutocharacter ebreve
%\defineVarExtAutocharacter ecircumflex
\defineVarExtAutocharacter emacron
%\defineVarExtAutocharacter igrave
\defineVarExtAutocharacter itilde
\defineVarExtAutocharacter imacron
%\defineVarExtAutocharacter idiaeresis
\defineVarExtAutocharacter iogonek
%\defineVarExtAutocharacter ntilde
%\defineVarExtAutocharacter ograve
\defineVarExtAutocharacter omacron
\defineVarExtAutocharacter obreve
%\defineVarExtAutocharacter otilde
\defineVarExtAutocharacter ncedilla
\defineVarExtAutocharacter kcedilla
%\defineVarExtAutocharacter ugrave
\defineVarExtAutocharacter gcircumflex
\defineVarExtAutocharacter gdotaccent
\defineVarExtAutocharacter gcedilla
\defineVarExtAutocharacter scommaaccent
\defineVarExtAutocharacter hcircumflex
\defineVarExtAutocharacter hbar

%--- Uppercase accents
\def\buildUCaccent#1#2% 1-accent 2-base char
  {\ifignoreaccent
     \expandafter\nobuildtextaccent
   \else
     \expandafter\dobuildUCaccent
   \fi{#1}{#2}}

%\unexpanded\def\dobuildUCaccent#1#2%
%  {\leavevmode\ooalign{#1\crcr#2}}
%
%\unexpanded\def\dobuildUCaccent#1#2%
%  {{\setbox0=\hbox{\def\char{\normalchar}#2}%
%    \hbox to\wd0{\hss\def\char{\normalchar}#1\hss}%
%   \kern-\wd0\def\char{\normalchar}#2}}
%
\unexpanded\def\dobuildUCaccent#1#2%
  {{\leavevmode\lineskiplimit=-\maxdimen
    \vtop{\baselineskip=0pt \ialign{\hfil##\hfil\crcr#1\crcr#2\crcr}}}}

\definecommand UCgrave        {\buildUCaccent{\UCtextgrave}}
\definecommand UCacute        {\buildUCaccent{\UCtextacute}}
\definecommand UCcaron        {\buildUCaccent{\UCtextcaron}}
\definecommand UCcircumflex   {\buildUCaccent{\UCtextcircumflex}}
\definecommand UCbreve        {\buildUCaccent{\UCtextbreve}}
\definecommand UCring         {\buildUCaccent{\UCtextring}}
\definecommand UCmacron       {\buildUCaccent{\UCtextmacron}}
\definecommand UCdotaccent    {\buildUCaccent{\UCtextdotaccent}}
\definecommand UChungarumlaut {\buildUCaccent{\UCtexthungarumlaut}}
\definecommand UCogonek       {\buildUCaccent{\UCtextogonek}}
\definecommand UCcedilla      {\buildUCaccent{\UCtextcedilla}}
\definecommand UCtilde        {\buildUCaccent{\UCtexttilde}}
\definecommand UCdiaeresis    {\buildUCaccent{\UCtextdiaeresis}}

%\def\splitcharandaccent#1#2 {\def\chartmp{#1}\def\accenttmp{#2}}
%\def\defineVarExtUCcharacter#1 % 1-glyph name with accent
%  {\splitcharandaccent#1 
%   \defineVarExtcharacter #1
%     {\expandafter\buildUCaccent\csname UCtext\accenttmp\endcsname\chartmp } }
\def\defineVarExtUCcharacter#1#2 % 12-glyph name with accent
%  {\expaned{\defineVarExtcharacter #1#2 {\buildUCaccent{\csname UCtext#2\endcsname}{#1} }} }
  {\defineVarExtcharacter #1#2 {\buildUCaccent{\csname UCtext#2\endcsname}{#1}} }

\defineVarExtUCcharacter Ygrave
\defineVarExtUCcharacter Ytilde
\defineVarExtUCcharacter Ibreve
\defineVarExtUCcharacter Ycaron
\defineVarExtUCcharacter Etilde

%\definecharacter   Tslash  {\buildUCaccent{\slash} T }
%\definecharacter   tslash  {\buildUCaccent{\slash} t }

%--- synonyms
\definecharacter textbottomdot		46  % period
\definecharacter textplus		43  % plus
\definecharacter textdollar		36  % dollar

\definecharacter textdag		{\dagger}
\definecharacter textddag		{\daggerdbl}
\definecharacter textdagger		{\dagger}
\definecharacter textdaggerdbl		{\daggerdbl}
\definecharacter textbullet		{\bullet}
\definecharacter paragraphmark		{\paragraph}
\definecharacter textellipsis		{\ellipsis}
%\definecharacter ostroke		{\oslash}
%\definecharacter Ostroke		{\Oslash}
%\definecharacter Lstroke		{\Lslash}
%\definecharacter lstroke		{\lslash}
\definecharacter Ostroke		216
\definecharacter ostroke		248
\definecharacter Lstroke		138
\definecharacter lstroke		170
\definecharacter Hstroke		{\Hbar}
\definecharacter hstroke		{\hbar}
\definecharacter textdegree		{\degree}
\definecharacter dotlessI		{I}
\definecharacter dotlessJ		{J}
\definecharacter Ssharp			{SS}
\definecharacter textminus		{\minus}
\definecharacter textdiv		{\textdivide}
\definecharacter threequarter		{\threequarters}
\definecharacter textpm			{\plusminus}
\definecharacter textless		{\less}
\definecharacter textgreater		{\greater}
\definecharacter textlognot		{\logicalnot}
\definecharacter textbackslash		{\backslash}
\definecharacter slash		        {\textslash}
\definecharacter textunderscore		{\underscore}
\definecharacter textbraceleft		{\braceleft}
\definecharacter textbar		{\bar}
\definecharacter textbrokenbar		{\brokenbar}
\definecharacter textbraceright		{\braceright}
\definecharacter textasciitilde		{\asciitilde}
\definecharacter textasciicircum	{\asciicircum}
\definecharacter florin	                {\textflorin}
\definecharacter texteuro		{\Euro}
\definecharacter textfranc		{\franc}
\definecharacter textcent		{\cent}
\definecharacter textyen		{\yen}
\definecharacter textcurrency		{\currency}
\definecharacter textmu			{\mu}
\definecharacter quotesingle		{\quoteleft}
\definecharacter leftguillemot		{\guillemotleft}
\definecharacter rightguillemot		{\guillemotright}
\definecharacter greekSigma		{\summation}
%\definecharacter Tstroke		{\Tslash}
%\definecharacter tstroke		{\tslash}

\stopcoding
