% Deutsche Normalschrift (DN) wedne
% Walter Entenmann
% 12.10.2010
% 21.09.2011
% 07.10.2011: e-Problem
% 22.11.2011: Verbindung zu spitzen Buchstaben
% 14.11.2014: einheitliche Sonderzeichen $,%,&,...
%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% #
beginchar("#",50ut#,Ht#,0);
  pickup wedn_pen;
  p:=(0,0)--(0,Ht);
  draw p slanted 0.176 shifted (15ut,0);
  draw p slanted 0.176 shifted (30ut,0);
  q:=((0,0)--(35ut,0)) shifted (5ut,0);
  draw q shifted(0,Ht/3) slanted 0.176;
  draw q shifted(0,2Ht/3) slanted 0.176;
endchar;

% §
  beginchar(oct"237",43.333ut#,Ht#,dt#);
  pickup wedn_pen;
sep:=10ut; breit:=20ut;
p := ((8ut,20ut){curl 10}..(0ut,30ut){left}..(-breit/2,22ut){down}..
  (breit/2,-2.5ut){down}..{-1,2/3}(2ut,-11ut)) scaled ((Ht+dt)/60ut);
  draw p shifted (sep+breit*0.583,ht/2);
  draw p rotated 180 shifted (sep+breit*0.583,ht/2);
  endchar;
  
% *
beginchar("*",30ut#,Ht#,0);
  pickup wedn_pen;
  p:= (-dt/2,0)--(dt/2,0);
  draw p rotated 90 shifted (15ut,ht+dt/2);
  draw p rotated 30 shifted (15ut,ht+dt/2);
  draw p rotated -30 shifted (15ut,ht+dt/2);
endchar;

% Prozentzeichen (%)
beginchar("%",50ut#,Ht#,0);
  pickup wedn_pen;
  q := (-23.6ut,0)--(23.6ut,0);
  breit:=12.5ut;hoch:=17.5ut;
  p := (breit/2,0){up}..(0,hoch/2){left}..(-breit/2,0){down}..(0,-hoch/2){right}..{up}(breit/2,0);
  x0:=whatever;y0:=whatever;
  z0=(directionpoint (-1,2) of (subpath (0,1) of p)) shifted (7.5ut+breit/2,40ut-hoch/2);
  draw (p shifted (7.5ut+breit/2,40ut-hoch/2)) scaled1.25;
  draw (p shifted (7.5ut+25ut-breit/2,hoch/2)) scaled1.25;
  draw( q rotated 58 shifted (20ut,20ut)) scaled1.25;
  draw (z0{1,-2}..{dir 58}(7.5ut+25ut,40ut)) scaled1.25;
endchar;

% &
  beginchar("&",50ut#,Ht#,0);
  pickup wedn_pen;
  p := ((22.5ut,12.5ut)..tension 1.2..(7.5ut,0){left}..(0,8ut){up}..
  %(8.167ut,21ut){3,2}..
  tension 1.2..(17ut,34.5ut){up}..(11.5ut,40ut){left}..(4ut,30ut){down}..{2,-3}(8.167ut,21ut)--(22.5ut,0)) scaled 1.25;
  draw p shifted (5ut,0);
  endchar;

% $
beginchar("$",30ut#,Ht#,0);
  pickup wedn_pen;
  draw (halfcircle xscaled 20ut yscaled 20ut shifted (15ut,30ut)) scaled 1.25;
   draw ((halfcircle rotated 180 xscaled 20ut yscaled 20ut) shifted (15ut,10ut)) scaled 1.25;
   draw (((-10ut,10ut){down}..{down}(10ut,-10ut)) shifted (15ut,20ut)) scaled 1.25;
   draw (((0,20ut+2.5ut)--(0,-20ut-2.5ut)) shifted (15ut,20ut)) scaled 1.25;
endchar;

% "+"
beginchar("+",30ut#,22.5ut#,0);
  path p;
  pickup wedn_pen;
  z0=(15ut,hmath);
  z1=(0ut,10ut);
  z2=(0ut,-10ut);
  p := z1--z2;
  draw p   shifted z0 ;
  draw p   rotated 90 shifted z0 ;
  labels(range 0 thru 2); 
endchar;

% ASCII Bindestrich oct"055" (OT1: auch Trennstrich)
beginchar("-",27.5ut#,ht#,0);
  pickup wedn_pen;
  draw ((0,0)--(12.5ut,0)) shifted (7.5ut,hdash);
endchar;

% T1: Trennstrich
beginchar(oct"177",27.5ut#,ht#,0);
  pickup wedn_pen;
  draw ((0,0)--(12.5ut,0)) shifted (7.5ut,hdash);
endchar;

% "/" 
beginchar("/",25ut#,Ht#,0);
  pickup wedn_pen;
draw ((5ut,0)--(20ut,Ht));
endchar;

% ">" 
beginchar(">",30ut#,Ht#,0);
  path p;
  pickup wedn_pen;
p:=(0,0)--(20ut,0);
draw p rotated 30 shifted (6.33ut,hmath);
  draw p rotated -30 shifted (6.33ut,hmath);
endchar;

% "=" 
beginchar("=",30ut#,ht#,0);
    pickup wedn_pen;
  draw((0,0)--(20ut,0)) shifted (5ut,hmath-2.5ut);
  draw((0,0)--(20ut,0)) shifted (5ut,hmath+2.5ut);
endchar;

% "<" 
beginchar("<",30ut#,Ht#,0);
  path p;
  pickup wedn_pen;
p:=(0,0)--(-20ut,0);
draw p rotated 30 shifted (23.66ut,hmath);
  draw p rotated -30 shifted (23.66ut,hmath);
endchar;

% oct"025" Bis-Strich --, Gedankenstrich 
beginchar(oct"025",30ut#,ht#,0);
  pickup wedn_pen;
draw ((0,0)--(20ut,0)) shifted (5ut,hdash);
endchar;

% engl. Gedankenstrich ---
beginchar(oct"026",45ut#,ht#,0);
  pickup wedn_pen;
draw ((0,0)--(30ut,0)) shifted (7.5ut,hdash);
endchar;

% oct"023" franz. Anfz. <<
beginchar(oct"023",32.5ut#,ht#,0);
  path p, q;
  pickup wedn_pen;
  z1=(0ut,0ut);
  z2=(1.1*ht/2,0);
  z3=(6,-1);
  z4=(6,1);
  z5=(7.5ut,ht/2);
z6=(15ut,ht/2);
  p := (z1{z3}..z2) rotated 45;
    q := (z1{z4}..z2) rotated -45;
  draw p shifted z5  ;
  draw p shifted z6 ;
    draw q shifted z5 ;
  draw q shifted z6 ;
  labels(range 1 thru 6);
endchar;  

% oct"024" franz. Anfz. >>
beginchar(oct"024",32.5ut#,ht#,0);
  path p, q;
  pickup wedn_pen;
  z1=(0ut,0ut);
  z2=(1.1*ht/2,0);
  z3=(6,-1);
    z4=(6,1);
  z5=(17.5ut,ht/2);
  z6=(25ut,ht/2);

  p := (z1{z4}..z2) rotated 135;
    q := (z1{z3}..z2) rotated -135;
  draw p shifted z5 ;
  draw p shifted z6 ;
    draw q shifted z5 ;
  draw q shifted z6 ;
  labels(range 1 thru 6);
endchar;  

% oct"016" franz. Anfz. <
beginchar(oct"016",25ut#,ht#,0);
  path p, q;
  pickup wedn_pen;
  z1=(0ut,0ut);
  z2=(1.1*ht/2,0);
  z3=(6,-1);
  z4=(6,1);
  z5=(7.5ut,ht/2);
  p := (z1{z3}..z2) rotated 45;
    q := (z1{z4}..z2) rotated -45;
  draw p shifted z5  ;
    draw q shifted z5 ;
  labels(range 1 thru 5);
endchar;  

% oct"017" franz. Anfz. >
beginchar(oct"017",25ut#,ht#,0);
  path p, q;
  pickup wedn_pen;
  z1=(0ut,0ut);
  z2=(1.1*ht/2,0);
  z3=(6,-1);
    z4=(6,1);
  z5=(17.5ut,ht/2);
  p := (z1{z4}..z2) rotated 135;
    q := (z1{z3}..z2) rotated -135;
  draw p shifted z5 ;
    draw q shifted z5 ;
  labels(range 1 thru 5);
endchar;  

% "@":
beginchar("@",50ut#,Ht#,0);
  pickup wedn_pen;
sep:=10ut;gap:=8ut;
draw ((superellipse((dt/(2k),0),(0,dt/2),(-dt/(2k),0),(0,-dt/2),sigma)) shifted (gap+dt/(2k)+sep,dt)) xscaled1.1 yscaled1.25;
draw (((0,dt)--(0,5ut){down}..(2ut,0){right}..tension 1.5..(gap,dt/2){up}..
  (-dt/(2k),3dt/2){left}..(-2*dt/(2k)-gap,dt/2){down}..
  (-dt/(2k),-dt/2){right}..(7.5ut,-5ut)) shifted (2*dt/(2k)+gap+sep,dt/2)) xscaled1.1 yscaled1.25;
endchar;

% Euro (\symbol{160})
beginchar(oct"240",60ut#,Ht#,0);
  pickup wedn_pen;
  sep:=7.5ut; gap:=7.5ut;
    draw ((halfcircle rotated 90) xscaled 30ut yscaled 40ut shifted (15ut+gap+sep,20ut)) scaled1.25;
  draw (((0,0){right}..(7.5ut,-3ut)) shifted (15ut+gap+sep,40ut)) scaled1.25;
  draw (((0,0){right}..(7.5ut,3ut)) shifted (15ut+gap+sep,0)) scaled1.25;
  draw ((((-25ut,2.5ut)--(0,2.5ut))  shifted (15ut+gap+sep,20ut)) slanted 0.25) scaled1.25;
  draw ((((-25ut,-2.5ut)--(0,-2.5ut)) shifted (15ut+gap+sep,20ut)) slanted 0.25) scaled1.25;
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Aufstrich am Wortanfang bei spitzen Buchstaben i j p u ü, nicht t
beginchar(oct"030",6ut#,ht#,0);
  pickup wedn_pen;
draw ((0,ht/2){1,m}..{up}(6ut,ht));
endchar;

% Verbindungsstrich normal
beginchar(oct"005",19.669ut#,ht#,0);
  pickup wedn_pen;
  draw ((0,0){right}..tension2 and 3.5..{1,m}(rho+(ht-Delta)/m,ht-Delta));
  xpos:=rho+(ht-Delta)/m;
  zeigen;
endchar;

 % Vorstrich am Wortanfang  bei s und Oberlaengen
beginchar(oct"200",7ut#,ht#,0);
  pickup wedn_pen;
draw ((0,ht/2)--((ht/2-Delta)/m,ht-Delta));
endchar;

% Endstueck gerade
beginchar(oct"007",7.5ut#,ht#,0);
    pickup wedn_pen;
draw ((0,0)--(7.5ut,m'*7.5ut));
  endchar;

% Endstueck  rund
  beginchar(oct"006",7.5ut#,ht#,0);
      pickup wedn_pen;
draw ((0,0){right}..(7.5ut,5ut));
endchar;

% Endstueck rund nach A und f
  beginchar(oct"014",7.5ut#,ht#,0);
      pickup wedn_pen;
draw ((0,7.5ut){right}..(7.5ut,12.5ut));
endchar;

% Verbindungsstrich spitz nach A, f
beginchar(oct"015",20ut#,ht#,0);
        pickup wedn_pen;
axe:=20ut;		    
draw ((0,7.5ut){right}..{up}(axe,ht));
endchar;

% e mit Verlaengerung
% 7.5ut
  beginchar(oct"000",32.5ut#,ht#,0);
     pickup wedn_pen;
    axe:=7.5ut;
    draw ((0,0){right}..(axe+27.5ut,22.5ut){up}..(axe+22.5ut,ht){left}..(axe+12.5ut,ht/2){down}..{right}(axe+25ut,0));
endchar;

% 10ut
  beginchar(oct"001",35ut#,ht#,0);
     pickup wedn_pen;
        axe:=10ut;
        draw ((0,0){right}..(axe+27.5ut,22.5ut){up}..(axe+22.5ut,ht){left}..(axe+12.5ut,ht/2){down}..{right}(axe+25ut,0));
endchar;

% 12.5ut
  beginchar(oct"002",37.5ut#,ht#,0);
     pickup wedn_pen;
	    axe:=12.5ut;
	    draw ((0,0){right}..(axe+27.5ut,22.5ut){up}..(axe+22.5ut,ht){left}..(axe+12.5ut,ht/2){down}..{right}(axe+25ut,0));
endchar;

% 15ut
  beginchar(oct"003",40ut#,ht#,0);
     pickup wedn_pen;
	        axe:=15ut;
		draw ((0,0){right}..(axe+27.5ut,22.5ut){up}..(axe+22.5ut,ht){left}..(axe+12.5ut,ht/2){down}..{right}(axe+25ut,0));
endchar;

% 17.5ut
  beginchar(oct"004",42.5ut#,ht#,0);
     pickup wedn_pen;
		    axe:=17.5ut;
		    draw ((0,0){right}..(axe+27.5ut,22.5ut){up}..(axe+22.5ut,ht){left}..(axe+12.5ut,ht/2){down}..{right}(axe+25ut,0));
endchar;

% Verbindungsstrich spitz
% Normalform 
  beginchar(oct"035",18ut#,ht#,0);
     pickup wedn_pen;
axe:=18ut;		    
draw ((0,0){right}..{up}(axe,ht));
endchar;

% nach Unterlaengen 
  beginchar(oct"036",18ut#,ht#,0);
     pickup wedn_pen;
axe:=18ut;		    
draw ((0,0){1,m'}..{up}(axe,ht));
endchar;

% Fahnen zu spitzen BSt. i j p t u ü
% nach r  
  beginchar(oct"037",13.75ut#,ht#,0);
     pickup wedn_pen;
draw ((0,ht){down}..tension 1.2..{up}(rfahne,ht));	    
endchar;

% nach b o v w	 
  beginchar(oct"027",18.33ut#,ht#,0);
     pickup wedn_pen;
draw ((0,ht){1,-mfahne}..tension 1.2..{up}(bfahne,ht));
endchar;

% Verbindungsstriche lang zu spitzen Buchst.
  beginchar(oct"021",27.5ut#,ht#,0);
     pickup wedn_pen;
	    axe:=27.5ut; sigm:=0.71;
	    draw ((0,0){right}..{axe,ht}(sigm*axe,(1-sigm)*ht)..{up}(axe,ht));
	  endchar;
	  
  beginchar(oct"031",30ut#,ht#,0);
     pickup wedn_pen;	  
	    axe:=30ut; sigm:=0.72;
	    draw ((0,0){right}..{axe,ht}(sigm*axe,(1-sigm)*ht)..{up}(axe,ht));
	  endchar;

	    beginchar(oct"032",34.5ut#,ht#,0);
     pickup wedn_pen;
	    axe:=34.5ut; sigm:=0.73;
	    draw ((0,0){right}..{axe,ht}(sigm*axe,(1-sigm)*ht)..{up}(axe,ht));
	  endchar;
	  
  beginchar(oct"033",39ut#,ht#,0);
     pickup wedn_pen;	  
	    axe:=39ut; sigm:=0.74;
	    draw ((0,0){right}..{axe,ht}(sigm*axe,(1-sigm)*ht)..{up}(axe,ht));
	  endchar;
	  
  beginchar(oct"034",41.5ut#,ht#,0);
     pickup wedn_pen;	  
	    axe:=41.5ut; sigm:=0.75;
	    draw ((0,0){right}..{axe,ht}(sigm*axe,(1-sigm)*ht)..{up}(axe,ht));
	  endchar;
	  
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Ziffern und Satzzeichen
%
% Ziffern
beginchar("0",Wz#,Hz#,0);
  pickup wedn_pen;
draw (fullcircle xscaled w' yscaled h) shifted (w/2,h/2);
endchar;

beginchar("1",Wz#,Hz#,0);
  pickup wedn_pen;
draw ((-w'/2,0.6*h)--(0,h)--(0,0))  shifted (w/2+s'/2,0);
endchar;

beginchar("2",Wz#,Hz#,0);
  pickup wedn_pen;
draw ((0,h-r)..(r,h){right}..(2r,h-r){down}..tension2 and 3..{-1,-1}(0,0))  shifted (s',0);
schwalbe;
draw p scaled (w'/ht) shifted (s',0);
endchar;

beginchar("3",Wz#,Hz#,0);
    pickup wedn_pen;
draw ((w'/8,7h/8)..(w'/2,h){right}..(7w'/8,0.75h){down}..(w'/2,0.5h){left}..(6w'/16,0.55h){up}..(w'/2,0.6h){right}..tension1.2..(w',w'/2){down}..(w'/2,0){left}..(0,w'/4)) shifted (s',0);
endchar;

beginchar("4",Wz#,Hz#,0);
  pickup wedn_pen;
draw ((h/5,h)--(0,h/4)--(w',h/4)) shifted (s',0);
draw ((3w'/5,3h/4)--(3w'/5,0)) shifted (s',0);
endchar;


beginchar("5",Wz#,Hz#,0);
  pickup wedn_pen;
draw ((7w'/8,h)--(0,h)--(0,3h/5){1,1}..(w'/2,3h/4){right}..(w',3h/8){down}..(w'/2,0){left}..(0,h/8)) shifted (s',0);
endchar;


beginchar("6",Wz#,Hz#,0);
    pickup wedn_pen;
draw ((2w'/3,h){left}..(0,3h/8){down}..(w'/2,0){right}..(w',3h/8){up}..(w'/2,3h/4){left}..(0,3h/8){down}) shifted (s',0);
endchar;


beginchar("7",Wz#,Hz#,0);
  pickup wedn_pen;
schwalbe;
draw ((p rotated 180) xscaled (w'/ht)) shifted (w'+s',h);
draw ((w',h)--(w'/4,0)) shifted (s',0);
endchar;

beginchar("8",Wz#,Hz#,0);
  pickup wedn_pen;
draw ((0,0.5625h){1,0.15}..(3w'/8,h-3w'/8){up}..(0,h){left}..(-3w'/8,h-3w'/8){down}..(0,0.5625h){1,-0.15}..
  (w'/2,h/4){down}..(0,0){left}..(-w'/2,h/4){up}..{1,0.15}(0,0.5625h)) shifted (s'+w'/2,0);
endchar;



beginchar("9",Wz#,Hz#,0);
  pickup wedn_pen;
draw (fullcircle xscaled w' yscaled (3h/4)) shifted (w/2,0.625*h);
draw ((w',7h/8)--(w',h/2){down}..(w'/2,0){left}..(w'/8,h/16)) shifted (s',0);
endchar;


% Satzzeichen
% ASCII-Zeichen
% !
beginchar("!",25ut#,Hz#,0);
  pickup wedn_pen;
  stamm(Hz,10ut,12.5ut);
  pickup wedn_pen_thick;
  drawdot (0,0) shifted (12.5ut,0);
endchar;

% ", oct"042", ASCII-Doppelapostroph, hier identisch mit oct"020", dt. Anfz. o.
beginchar(oct"042",25ut#,Ht#,0);
  pickup wedn_pen;
  komma(Ht,10ut);
  komma(Ht,15ut);
endchar;

% ' (Apostroph)
beginchar("'",20ut#,Ht#,0);
  pickup wedn_pen;
komma(Ht,10ut);
endchar;

% "("
beginchar("(",27.5ut#,Ht#,dt#);
  pickup wedn_pen;
draw ((7.5ut,Ht)..(0,ht/2){down}..(7.5ut,-dt)) shifted (10ut,0);
endchar;

% ")"
beginchar(")",27.5ut#,Ht#,dt#);
  pickup wedn_pen;
draw ((-7.5ut,Ht)..(0,ht/2){down}..(-7.5ut,-dt)) shifted (17.5ut,0);
endchar;

% "," Komma
beginchar(",",25ut#,ht#,dt#);
  pickup wedn_pen;
komma(2.5ut,12.5ut);
endchar;

% "." Punkt
beginchar(".",25ut#,ht#,0);
  pickup wedn_pen_thick;
  drawdot (0,0) shifted (12.5ut,0);
endchar;

% ":" Doppelpunkt
beginchar(":",25ut#,ht#,0);
  pickup wedn_pen_thick;
  drawdot (0,0) shifted (12.5ut,0);
  drawdot (0,0) shifted (12.5ut,17.5ut);
endchar;

% ";" Strichpunkt
beginchar(";",25ut#,ht#,dt#);
  pickup wedn_pen;
komma(2.5ut,12.5ut);
  pickup wedn_pen_thick;
  drawdot (0,0) shifted (12.5ut,17.5ut);
endchar;

% ?
beginchar("?",35ut#,Hz#,0);
  radi:=7.5ut;
  pickup wedn_pen;
  z1=(-radi,Hz-radi);
  z2=(0,Hz);
  z3=(radi,Hz-radi);
  z5=(-radi,10ut+radi);
  z6=(0,10ut);
  z7=(radi,10ut+radi);
  p := z1..z2{right}..z3{down}..{down}z5..z6{right}..z7;
  draw p shifted (17.5ut,0);
  pickup wedn_pen_thick;
  drawdot (0,0) shifted (17.5ut,0);
endchar;

% spezielle Sonderzeichen (ec-Kodierung(
% oct"020", wie ASCII " (oct"042"), dt. Anfuehrungszeichen oben
beginchar(oct"020",25ut#,Ht#,0);
  pickup wedn_pen;
  komma(Ht,10ut);
  komma(Ht,15ut);
endchar;

% oct"022", dt. Anfuehrungszeichen unten
beginchar(oct"022",25ut#,ht#,dt#);
  pickup wedn_pen;
  komma(2.5ut,10ut);
  komma(2.5ut,15ut);
endchar;

% oct"133" [
beginchar("[",17.5ut#,Ht#,dt#);
  pickup wedn_pen;
  stamm(Ht,-dt,5ut);
  draw ((0,0)--(5ut,0)) shifted (5ut,Ht);
  draw ((0,0)--(5ut,0)) shifted (5ut,-dt);
endchar;

% oct"135" ]
beginchar("]",17.5ut#,Ht#,dt#);
  pickup wedn_pen;
  stamm(Ht,-dt,10ut);
  draw ((0,0)--(5ut,0)) shifted (5ut,Ht);
  draw ((0,0)--(5ut,0)) shifted (5ut,-dt);
endchar;



%%%%%%%%%%%%%%%%%%%% End of File %%%%%%%%%%%%%%%%%
