\let\startrelax\relax
\let\stoprelax\relax

\definefontfeature
  [lmos]
  [mode=node,language=dflt,script=latn,onum=yes,tnum=yes]

\starttypescript [serif] [lmodern-os] [name]

\startrelax
    \definefontsynonym [LMRoman5-Regular]      [file:lmroman5-regular]      [features=lmos]
    \definefontsynonym [LMRoman6-Regular]      [file:lmroman6-regular]      [features=lmos]
    \definefontsynonym [LMRoman7-Regular]      [file:lmroman7-regular]      [features=lmos]
    \definefontsynonym [LMRoman8-Regular]      [file:lmroman8-regular]      [features=lmos]
    \definefontsynonym [LMRoman9-Regular]      [file:lmroman9-regular]      [features=lmos]
    \definefontsynonym [LMRoman10-Regular]     [file:lmroman10-regular]     [features=lmos]
    \definefontsynonym [LMRoman12-Regular]     [file:lmroman12-regular]     [features=lmos]
    \definefontsynonym [LMRoman17-Regular]     [file:lmroman17-regular]     [features=lmos]
    \definefontsynonym [LMRoman5-Bold]         [file:lmroman5-bold]         [features=lmos]
    \definefontsynonym [LMRoman6-Bold]         [file:lmroman6-bold]         [features=lmos]
    \definefontsynonym [LMRoman7-Bold]         [file:lmroman7-bold]         [features=lmos]
    \definefontsynonym [LMRoman8-Bold]         [file:lmroman8-bold]         [features=lmos]
    \definefontsynonym [LMRoman9-Bold]         [file:lmroman9-bold]         [features=lmos]
    \definefontsynonym [LMRoman10-Bold]        [file:lmroman10-bold]        [features=lmos]
    \definefontsynonym [LMRoman12-Bold]        [file:lmroman12-bold]        [features=lmos]
    \definefontsynonym [LMRoman7-Italic]       [file:lmroman7-italic]       [features=lmos]
    \definefontsynonym [LMRoman8-Italic]       [file:lmroman8-italic]       [features=lmos]
    \definefontsynonym [LMRoman9-Italic]       [file:lmroman9-italic]       [features=lmos]
    \definefontsynonym [LMRoman10-Italic]      [file:lmroman10-italic]      [features=lmos]
    \definefontsynonym [LMRoman12-Italic]      [file:lmroman12-italic]      [features=lmos]
    \definefontsynonym [LMRoman10-BoldItalic]  [file:lmroman10-bolditalic]  [features=lmos]
    \definefontsynonym [LMRoman8-Oblique]      [file:lmroman8-oblique]      [features=lmos]
    \definefontsynonym [LMRoman9-Oblique]      [file:lmroman9-oblique]      [features=lmos]
    \definefontsynonym [LMRoman10-Oblique]     [file:lmroman10-oblique]     [features=lmos]
    \definefontsynonym [LMRoman12-Oblique]     [file:lmroman12-oblique]     [features=lmos]
    \definefontsynonym [LMRoman17-Oblique]     [file:lmroman17-oblique]     [features=lmos]
    \definefontsynonym [LMRoman10-BoldOblique] [file:lmroman10-boldoblique] [features=lmos]
    \definefontsynonym [LMRoman10-Demi]        [file:lmroman10-demi]        [features=lmos]
    \definefontsynonym [LMRoman10-DemiOblique] [file:lmroman10-demioblique] [features=lmos]
    \definefontsynonym [LMRoman10-CapsRegular] [file:lmroman10-capsregular] [features=lmos] % features=smallcaps?
    \definefontsynonym [LMRoman10-CapsOblique] [file:lmroman10-capsoblique] [features=lmos]
    \definefontsynonym [LMRoman10-Dunhill]        [file:lmroman10-dunhill]        [features=lmos]
    \definefontsynonym [LMRoman10-DunhillOblique] [file:lmroman10-dunhilloblique] [features=lmos]
\stoprelax

\startrelax	
    \definefontsynonym [Serif5-Regular]  			[LMRoman5-Regular]  		[features=lmos]      
    \definefontsynonym [Serif6-Regular]  			[LMRoman6-Regular]  		[features=lmos]      
    \definefontsynonym [Serif7-Regular]  			[LMRoman7-Regular]  		[features=lmos]      
    \definefontsynonym [Serif8-Regular]  			[LMRoman8-Regular]  		[features=lmos]      
    \definefontsynonym [Serif9-Regular]  			[LMRoman9-Regular]  		[features=lmos]      
    \definefontsynonym [Serif10-Regular]  			[LMRoman10-Regular]  		[features=lmos]     
    \definefontsynonym [Serif12-Regular]  			[LMRoman12-Regular]  		[features=lmos]     
    \definefontsynonym [Serif17-Regular]  			[LMRoman17-Regular]  		[features=lmos]     
    \definefontsynonym [Serif5-Bold]  				[LMRoman5-Bold]  		 	[features=lmos]         
    \definefontsynonym [Serif6-Bold]  				[LMRoman6-Bold]  		 	[features=lmos]         
    \definefontsynonym [Serif7-Bold]  				[LMRoman7-Bold]  		 	[features=lmos]         
    \definefontsynonym [Serif8-Bold]  				[LMRoman8-Bold]  		 	[features=lmos]         
    \definefontsynonym [Serif9-Bold]  				[LMRoman9-Bold]  		 	[features=lmos]         
    \definefontsynonym [Serif10-Bold]  				[LMRoman10-Bold]  		 	[features=lmos]        
    \definefontsynonym [Serif12-Bold]  				[LMRoman12-Bold]  		 	[features=lmos]        
    \definefontsynonym [Serif7-Italic]  			[LMRoman7-Italic]  		 	[features=lmos]       
    \definefontsynonym [Serif8-Italic]  			[LMRoman8-Italic]  			[features=lmos]       
    \definefontsynonym [Serif9-Italic]  			[LMRoman9-Italic]  			[features=lmos]       
    \definefontsynonym [Serif10-Italic]  			[LMRoman10-Italic]  		[features=lmos]      
    \definefontsynonym [Serif12-Italic]  			[LMRoman12-Italic]  		[features=lmos]      
    \definefontsynonym [Serif10-BoldItalic]  		[LMRoman10-BoldItalic]  	[features=lmos]  
    \definefontsynonym [Serif8-Oblique]  			[LMRoman8-Oblique] 			[features=lmos]      
    \definefontsynonym [Serif9-Oblique]  			[LMRoman9-Oblique]  		[features=lmos]      
    \definefontsynonym [Serif10-Oblique]  			[LMRoman10-Oblique]  		[features=lmos]     
    \definefontsynonym [Serif12-Oblique]  			[LMRoman12-Oblique]  		[features=lmos]     
    \definefontsynonym [Serif17-Oblique]  			[LMRoman17-Oblique]  		[features=lmos]     
    \definefontsynonym [Serif10-BoldOblique] 	 	[LMRoman10-BoldOblique]  	[features=lmos] 
    \definefontsynonym [Serif10-Demi]			 	[LMRoman10-Demi]  			[features=lmos]        
    \definefontsynonym [Serif10-DemiOblique] 		[LMRoman10-DemiOblique]  	[features=lmos] 
    \definefontsynonym [Serif10-CapsRegular] 		[LMRoman10-CapsRegular]  	[features=lmos]  
    \definefontsynonym [Serif10-CapsOblique]  		[LMRoman10-CapsOblique]  	[features=lmos] 
    \definefontsynonym [Serif10-Dunhill]  			[LMRoman10-Dunhill]  		[features=lmos]        
    \definefontsynonym [Serif10-DunhillOblique]  	[LMRoman10-DunhillOblique]	[features=lmos] 
	
    \definefontsynonym [Serif] 						[Serif12-Regular]  			[features=lmos] 	   
\stoprelax
	
\stoptypescript

\starttypescript [serif] [lmodern] [size]
%% Caption
%  predefined
\definebodyfont [4pt,5pt]
  [rm]
  [tf= Serif5-Regular           sa 1,
   bf= Serif5-Bold       		sa 1,
   it= Serif7-Italic     		sa 1,
   bi= Serif10-BoldItalic 		sa 1,
   sl= Serif8-Oblique			sa 1,			
   bs= Serif10-BoldOblique		sa 1,
   sc= Serif10-CapsRegular      sa 1]
\definebodyfont [6pt]
  [rm]
  [tf= Serif6-Regular           sa 1,
   bf= Serif6-Bold       		sa 1,
   it= Serif7-Italic     		sa 1,
   bi= Serif10-BoldItalic 		sa 1,
   sl= Serif8-Oblique			sa 1,
   bs= Serif10-BoldOblique		sa 1,
   sc= Serif10-CapsRegular      sa 1]
\definebodyfont [7pt]
  [rm]
  [tf= Serif7-Regular           sa 1,
   bf= Serif7-Bold       		sa 1,
   it= Serif7-Italic     		sa 1,
   bi= Serif10-BoldItalic 		sa 1,
   sl= Serif8-Oblique			sa 1,
   bs= Serif10-BoldOblique		sa 1,
   sc= Serif10-CapsRegular      sa 1]
\definebodyfont [8pt]
  [rm]
  [tf= Serif8-Regular           sa 1,
   bf= Serif8-Bold       		sa 1,
   it= Serif8-Italic     		sa 1,
   bi= Serif10-BoldItalic 		sa 1,
   sl= Serif8-Oblique			sa 1,
   bs= Serif10-BoldOblique		sa 1,
   sc= Serif10-CapsRegular      sa 1]
\definebodyfont [9pt]
  [rm]
  [tf= Serif9-Regular           sa 1,
   bf= Serif9-Bold       		sa 1,
   it= Serif9-Italic     		sa 1,
   bi= Serif10-BoldItalic 		sa 1,
   sl= Serif9-Oblique			sa 1,
   bs= Serif10-BoldOblique		sa 1,
   sc= Serif10-CapsRegular      sa 1]
\definebodyfont [10pt,11pt]
  [rm]
  [tf= Serif10-Regular          sa 1,
   bf= Serif10-Bold       		sa 1,
   it= Serif10-Italic     		sa 1,
   bi= Serif10-BoldItalic 		sa 1,
   sl= Serif10-Oblique			sa 1,
   bs= Serif10-BoldOblique		sa 1,
   sc= Serif10-CapsRegular      sa 1]
\definebodyfont [12pt,14.4pt]
  [rm]
  [tf= Serif           			sa 1,
   % tf= Serif12-Regular           sa 1,
   bf= Serif12-Bold       		sa 1,
   it= Serif12-Italic     		sa 1,
   bi= Serif10-BoldItalic 		sa 1,
   sl= Serif12-Oblique			sa 1,
   bs= Serif10-BoldOblique		sa 1,
   sc= Serif10-CapsRegular      sa 1]
\definebodyfont [17.3pt,20.7pt,24.9pt]
  [rm]
  [tf= Serif17-Regular          sa 1,
   bf= Serif12-Bold       		sa 1,
   it= Serif12-Italic     		sa 1,
   bi= Serif10-BoldItalic 		sa 1,
   sl= Serif17-Oblique			sa 1,
   bs= Serif10-BoldOblique		sa 1,
   sc= Serif10-CapsRegular      sa 1]
\stoptypescript

\starttypescript [LModern-OS]
\definebodyfontenvironment
  [lmodern-os]
  [default]
  [interlinespace=2.8ex]

\definetypeface [lmodern-os] 
[rm] [serif] [lmodern-os] [lmodern]
\stoptypescript 