<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#!/usr/bin/perl
# vim:ts=4 sw=4
#
# (c) Oliver Corff. Ulaanbaatar, Beijing, Berlin
#
# This file generates the set of Metafont top level files for
# the Mongol writing support. This generator can be used instead
# of copying the individual files.
#
# 2001-10-01
#
$Filename   ="";
#
@Languages  =(Mongol,Manju,'Mongol Glyph');
%glyph		=(	Mongol =&gt; Mongol,
				Manju =&gt; Manju,
				'Mongol Glyph' =&gt; 'Mongolian and all derived');
%Encoding   =(Manju =&gt; LMA,	Mongol =&gt; LMO,	'Mongol Glyph' =&gt; LMX);
%comment    =(Manju =&gt; '',	Mongol =&gt; '',	'Mongol Glyph' =&gt; '% ');
%tab	    =(Manju =&gt; '	',	Mongol =&gt; '	',	'Mongol Glyph' =&gt; '');
%Writing    =(Manju =&gt; Bithe,	Mongol =&gt; Bicig,	'Mongol Glyph' =&gt; Container);
%wrtng      =(Manju =&gt; bth,	Mongol =&gt; bcg, 'Mongol Glyph' =&gt; bxg);
%Abbr	    =(Manju =&gt; 'a',	Mongol =&gt; 'o', 'Mongol Glyph' =&gt; 'x');
@LRs	    =(Horizontal,Vertical);
%LRvalue    =(Horizontal =&gt; true,	Vertical =&gt; false);
%lrv	    =(Horizontal =&gt; 'h',	Vertical =&gt; 'v');
@Styles	    =(Wood,Steel);
%StyleValue =(Wood =&gt; wood,		Steel =&gt; steel);
%stv	    =(Wood =&gt; 'w',		Steel =&gt; 's');
@Weights    =(Medium,Bold);
%WeightValue=(Medium =&gt; 'm',	Bold =&gt; 'b');

sub redefined {
	$output = qq{%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%        File: $Filename
%      Author: Oliver Corff and Dorjpalam Dorj
%        Date: October 1st, 2001
%     Version: 0.8
%   Copyright: Ulaanbaatar, Beijing, Berlin
%
% Description: Local $Language Script in Ligature Mode (Encoding: $Encoding{$Language})
%              $Language $Writing{$Language} $LR $Style $Weight Font Definition
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
font_identifier:=		"TeX $Language $Writing{$Language}";
font_coding_scheme:=		"$Encoding{$Language}";
input mbatoms.mf;		% Load Atoms
style:=$StyleValue{$Style};			% Defines titem and suul shapes, etc.
writing:=$Writing{$Language};$tab{$Language}		% Font: $Language $Writing{$Language}
LR:=$LRvalue{$LR};			% This is a $LR Font
input mbparm$WeightValue{$Weight}.mf;		% Load $Weight Weight Parameters
$comment{$Language}input mbcodes.mf;		% Load Common Encoding Vectors
input m$Abbr{$Language}codes.mf;		% Load $Language Encoding Vectors
$comment{$Language}input m$Abbr{$Language}ntrlig.mf;		% Load $Language Transliteration Ligatures
input mbpunc.mf;		% Oh yes, we build punctuation
input mbnums.mf;		% Oh yes, we build digits
input mbglyphs.mf;		% Oh yes, we build common glyphs
input m$Abbr{$Language}glyphs.mf;		% And we build $glyph{$Language} glyphs
end.}
}

for $Language (@Languages) {
	for $LR (@LRs) {
		for $Style (@Styles) {
			for $Weight (@Weights) {
				$Filename=	$wrtng{$Language}.
						$lrv{$LR}.
						$stv{$Style}.
						$WeightValue{$Weight}.
						".mf";
						
				print "$Filename: ";
				print "$Language\t-&gt; $Writing{$Language} ";
				print "($Encoding{$Language}) ";
				print "$LR\t$Style$Weight\n";

				redefined;

				open(OUTPUT,"&gt;$Filename");
				print OUTPUT $output;
				close OUTPUT;
			}
		}
	}
}
</pre></body></html>