Convert-Ethiopic

 view release on metacpan or  search on metacpan

lib/Convert/Ethiopic/System.pm  view on Meta::CPAN

package Convert::Ethiopic::System;
use base qw(Exporter);


sub enumerate
{
my ($index) = 0;

  foreach (@_) {
	  $_ =  $index++;
  }
}


sub BEGIN
{

	$VERSION = '0.14';

	require 5.000;
	require Exporter;

	@ISA = qw(Exporter);
	@EXPORT = qw(
			$noOps
			$debug
			$ethOnly
			$gColon
			$qMark
			$gSpace
			$ungeminate
			$uppercase

			$WITHETHHOUR
			$WITHETHDATE
			$WITHQEN
			$WITHETHYEAR
			$WITHNETEB
			$WITHAM
			$WITHSLASH
			$WITHDAYCOMMA
			$WITHUTF8

			$unicode
			$utf8
			$sera
			$image

			$amh
			$eng
			$gez
			$orm
			$tir

			%ISOLanguages;
			);

	enumerate ( $TTName, $LESysNum, $LESysTV, $LEFontNum, $HasNum, $HTMLName );

	enumerate ( $nocs, $acis, $acuwork, $addisword1, $addisword2, $alpas, $branai, $branaii, $cbhalea, $cbhaleb, $dehai, $dejene1, $dejene2, $ecoling, $ed, $enhpfr, $ethcitap, $ethcitas, $ethcitau, $ethiome, $ethiomex, $ethiop, $ethiopic1, $ethiopic2, $...

	enumerate ( $notv, $clike, $decimal, $dos, $java, $uname, $uplus, $utf7, $utf8, $utf16, $zerox );


	$noOps        =   0;
	$aynIsZero    =   1;
	$debug        =   2;
	$ethOnly      =   4;
	$gColon       =   8;
	$qMark        =  16;
	$gSpace       =  32;
	$ungeminate   =  64;
	$uppercase    = 128;


%FontInfo = (

##############################################################################################################################################
#
#
#
#	'LiveGe'ezName'			=>	[ 'TrueType Name',	LibEth_Enumeration,	XferSystem,	LibEth_FontNumber,	HasEthiopicNumber?,	HTML_DisplayName ],
#
#	LiveGe'ez Name     :  These are not _truly_ typeface names but the enocoding system request values as
#                         specified in the LiveGe'ez Remote Processing Protocol.  A LGRPP "system" may in fact be
#                         be a collection of encoding systems when the Fidel is spread out over multiple typefaces.
#                         In such systems only the first name in the font group is used, usually truncated, the
#                         following fonts of the font group are in the hash table but are not specifiec in the
#                         LGRPP.  For these companion fonts in a font group the real TrueType name is applied in
#                         these fields for the purpose of document decoding.
#
#	TrueType Name      :  The typeface name of the font as seen in font menus, "face" attributes and RTF files.
#                         "Bold" and "Italic" versions of fonts are not included as the OS will make the names
#                         transparent.  The names _are_ added in the case that the encoding of the font changes.
#
#                         For output systems where this does not apply 'none' may be entered or the field is
#                         recycled to store a LibEth processing "option".
#
#   LibEth Enueration  :  The enumerated value of the encoding system within LibEth.
#
#   Xfer System        :  The default Transfer Variant (8-bit,UTF7,8) of an Ethiopic encoding system. 
#
#	LibEth Font Number :  The numeric value for a typeface of a given encoding system within LibEth.
#
#	Has Ethiopic Number:  A boolean value to indicate if the font has Ethiopic Numerals (use LibEth later).
#
#	HTML Display Name  :  A SERA string for the font name itself as it would appear in Ethiopic HTML.
#
##############################################################################################################################################

#
#	Wazema http://members.aol.com/w4z5m4/wazema.html
#
	'A1-Desta' 			=>	[ 'A1 Desta',				$wazema1,		0,	0,	0,	'\\A1 \\desta' ],
	'A2-Desta' 			=>	[ 'A2 Desta',				$wazema2,		0,	1,	1,	'\\A2 \\desta' ],
	'A1-Tesfa' 			=>	[ 'A1 Tesfa',				$wazema1,		0,	2,	0,	'\\A1 \\tesfa' ],
	'A2-Tesfa' 			=>	[ 'A2 Tesfa',				$wazema2,		0,	3,	1,	'\\A2 \\tesfa' ],

#
#	Alex Ethiopian http://www.acuwork.com/

lib/Convert/Ethiopic/System.pm  view on Meta::CPAN

	'AmharicBook 3'  		=>	[ 'Amharic Book 3',				$monotype3,		0,	5,	1,	'\\MonoType\\amarNa_\\Book\\' ],
	'Amharic_Alt' 			=>	[ 'Amharic_Alt',				$monoalt,		0,	0,	1,	'\\MonoType\\amarNa_\\Alt\\'  ],
	'Amharic_Num' 			=>	[ 'Amharic_Num',				$mononum,		0,	1,	1,	'\\MonoType\\amarNa_\\Alt\\'  ],

#
#	NCI/Ethiopian Software Family
#
	'ET-NCI' 				=>	[ 'ET-NCI',						$nci,			0,	0,	0,	'it-\\NCI\\' ],
	'ET-NEBAR' 				=>	[ 'ET-NEBAR',					$nci,			0,	2,	0,	'it-\\NCI\\' ],
	'ET-SAMI' 				=>	[ 'ET-SAMI',					$nci,			0,	4,	0,	'it-\\NCI\\' ],

#
#	NCIC
#
	'AGF-Zemen' 			=>	[ 'AGF - Zemen',				$ncic,			0,	0,	1,	'agafari-zemen'       ],
	'AGF-Dawit' 			=>	[ 'AGF - Dawit',				$ncic,			0,	1,	1,	'agafari-dawit'       ],
	'AGF-Ejji-Tsihuf' 		=>	[ 'AGF - Ejji Tsihuf',			$ncic_et,		0,	0,	1,	'agafari-Iji-Shuf'    ],
	'AGF-Rejim' 			=>	[ 'AGF - Rejim',				$ncic,			0,	3,	1,	'agafari-rejm'        ],
	'AGF-Yigezu-Bisrat' 	=>	[ 'AGF - Yigezu Bisrat',		$ncic,			0,	4,	1,	'agafari-ygezu-bsrat' ],
	'Agaw' 					=>	[ 'Agaw',						$dejene1,		0,	0,	0,	'dejnE'           	  ],
	'AgawBd' 				=>	[ 'AgawBd',						$dejene2,		0,	1,	0,	'dejnE'           	  ],

#
#	OmniTech http://omnitech.ethiopiaonline.net/
#
	'AmharicKechin'  		=>	[ 'Amharic  Kechin',			$omnitech,		0,	0,	0,	'amarNa qCn'        ],
	'AmharicYigezuBisrat'	=> 	[ 'Amharic Yigezu Bisrat',		$omnitech,		0,	1,	0,	'amarNa ygzu-bsrat' ],
	'AmharicGazetta' 		=>	[ 'Amharic Gazetta',			$omnitech,		0,	2,	0,	'amarNa gezETa'     ],

#
#   Dehai  http://www.primenet.com/~ephrem
#   Ed     http://www.sil.org/
#	Ethio Micro Emacs 
#          http://www.neosoft.com/~ethiosys/
# 	Mainz  http://www.uni-mainz.de/~kropp/
#	SERA   http://www.cs.indiana.edu/hyplan/dmulholl/fidel/sera-faq.html
#	Ethiop http://www.informatik.uni-hamburg.de/TGI/mitarbeiter/wimis/kummer/ethiop_eng.html
#
	'Dehai' 				=>	[ 'none',						$dehai,			0,	0,	1,	'deHay'				],
	'ed' 					=>	[ 'none',						$ed,			0,	0,	1,	'\\Ed\\'			],
	'ethiome' 				=>	[ 'none',						$ethiome,		0,	0,	1,	'ityo\\ME\\'		],
	'ethiop'				=>	[ 'none',						$ethiop,		0,	0,	1,	'ityoP'				],
	'sera' 					=>	[ 'none',						$sera,			0,	0,	1,	'\\SERA\\' 			],
	'Mainz' 				=>	[ 'none',						$mainz,			0,	0,	1,	'\\Mainz\\'			],

#
#	TFanus Based Systems
#
	'TfanusGeez01'  		=> 	[ 'TFanusGeez01',				$tfanus,		0,	0,	1,	'\\T\\fanus'       ],
	'Amharisch'  			=>	[ 'Amharisch',					$tfanus,		0,	1,	1,	'\\Amharisch\\'	   ],
	'GeezBausi'  			=>	[ 'GeezBausi',					$gezbausi,		0,	0,	1,	'gI2z\\Bausi\\'    ],
	'GeezTimesNew'  		=>	[ 'GeezTimesNew',				$tfanusnew,		0,	0,	1,	'gI2z\\TimesNew\\' ],

#
#	EthioSoft http://www.ethiosoft.com/
#
	'EthioSoft'  			=>	[ 'EthioSoft',					$ethiosoft,		0,	0,	1,	'ityo\\Soft\\' ],


#
#	Unicode Based http://www.unicode.org/
#
	'UTF7' 					=>	[ 'none',						$unicode,	 $utf7,	0,	1,	'\\UTF7\\'  ],
	'UTF8' 					=>	[ 'none',						$unicode,	 $utf8,	0,	1,	'\\UTF8\\'  ],
	'utf16'  				=>	[ 'none',						$unicode,	$utf16,	0,	1,	'\\UTF16\\' ],
	'unicode' 				=>	[ 'none',						$unicode,	$utf16,	0,	1,	'\\UTF16\\' ],
	'FirstTime' 				=>	[ 'none',						$unicode,	 $utf8,	0,	1,	'\\UTF8\\'  ],

#
#	Visual Ge'ez
#
	'VG2-Main'				=>	[ 'VG2 Main',					$visualgez,		0,	0,	0,	'\\Visual\\gI2z' ],
	'VG2-Agazian'			=>	[ 'VG2 Agazian',				$visualgez,		0,	1,	0,	'\\Visual\\gI2z' ],
	'VG2-Title'	 			=>	[ 'VG2 Title',					$visualgez,		0,	2,	0,	'\\Visual\\gI2z' ],

#
#	Visual Ge'ez 2000
#
	'VG2K-Main'				=>	[ 'VG2000 Main',				$visualgez2k,		0,	0,	0,	'\\Visual\\gI2z\\2K' ],
	'VG2K-Agazian'				=>	[ 'VG2000 Agazian',				$visualgez2k,		0,	1,	0,	'\\Visual\\gI2z\\2K' ],
	'VG2K-Title'	 			=>	[ 'VG2000 Title',				$visualgez2k,		0,	2,	0,	'\\Visual\\gI2z\\2K' ],

#
#	Unknown Companies
#
	'Fidel' 				=>	[ 'FIDEL~`_SOFTWARE',			$fidelxtr1,		0,	0,	1,	'fidel' ],
	'EXTRA~\`_FIDEL' 		=>	[ 'EXTRA~`_FIDEL',				$fidelxtr2,		0,	1,	1,	'fidel' ],

#
#	Extraneous Systems
#
	'clike'					=>	[ $noOps,						$unicode,	    $clike,	0,	1,	'\\ \\\\xABCD\\'  ],
	'Clike'					=>	[ $uppercase,					$unicode,	    $clike,	0,	1,	'\\ \\\\xABCD\\'  ],
	'debug' 				=>	[ $debug,						$sera,		 		 0,	0,	1,	'\\Debugging\\'   ],
	'decimal' 				=>	[ $noOps,						$unicode,	  $decimal,	0,	1,	'\\Debugging\\'   ],
#	'image' 				=>	[ $noOps,						$image,				 0,	0,	1,	'\\Image Fonts\\' ],
#	'Image' 				=>	[ $noOps,						$image,				 0,	0,	1,	'\\Image Fonts\\' ],
	'Image' 				=>	[ 'GF Zemen Primary',			$gezfree1,		 	 0,	0,	1,	'gI2z\\Free\\'    ],
	'java'					=>	[ $noOps,						$unicode,		 $java,	0,	1,	'\\Java\\'        ],
	'Java'					=>	[ $uppercase,					$unicode,		 $java,	0,	1,	'\\Java\\'        ],
	'UPlus'					=>	[ $noOps,						$unicode,		$uplus,	0,	1,	'\\U+abcd\\'      ],
	'UPlus'					=>	[ $uppercase,					$unicode,		$uplus,	0,	1,	'\\U+ABCD\\'      ],
	'zerox'					=>	[ $noOps,						$unicode,		$zerox,	0,	1,	'\\0xabcd\\'      ],
	'Zerox'					=>	[ $uppercase,					$unicode,		$zerox,	0,	1,	'\\0xABCD\\'      ]
);


%TransferVariant = ( notv      => $notv,
					 clike     => $clike,
					 decimal   => $decimal,
					 dos       => $dos,
					 java      => $java,
					 uname     => $uname,
					 uplus     => $uplus,
					 utf7      => $utf7,
					 utf8      => $utf8,
					 utf16     => $utf16,
					 zerox     => $zerox
);


enumerate ( $aiz, $aar, $qim, $zlb, $amh, $myo, $anu, $arv, $agj, $awn, $bsw, $myf, $bst, $bej, $bcq, $wti, $byn, $bxe, $bwo, $bji, $dox, $cra, $dsh, $dim, $gdl, $mdx, $doz, $gft, $gmo, $gza, $gwd, $drs, $gez, $gto, $guk, $guy, $gru, $zgu, $hdy, $amf...

%ISOLanguages = (
	aiz	=>	$aiz,
	aar	=>	$aar,
	qim	=>	$qim,
	zlb	=>	$zlb,
	amh	=>	$amh,
	myo	=>	$myo,
	anu	=>	$anu,
	arv	=>	$arv,
	agj	=>	$agj,
	awn	=>	$awn,
	bsw	=>	$bsw,
	myf	=>	$myf,
	bst	=>	$bst,
	bej	=>	$bej,
	bcq	=>	$bcq,
	wti	=>	$wti,
	byn	=>	$byn,
	bxe	=>	$bxe,
	bwo	=>	$bwo,
	bji	=>	$bji,
	dox	=>	$dox,
	cra	=>	$cra,
	dsh	=>	$dsh,
	dim	=>	$dim,
	gdl	=>	$gdl,
	mdx	=>	$mdx,
	doz	=>	$doz,
	gft	=>	$gft,
	gmo	=>	$gmo,
	gza	=>	$gza,
	gwd	=>	$gwd,
	drs	=>	$drs,
	gez	=>	$gez,
	gto	=>	$gto,
	guk	=>	$guk,
	guy	=>	$guy,
	gru	=>	$gru,
	zgu	=>	$zgu,
	hdy	=>	$hdy,
	amf	=>	$amf,



( run in 0.799 second using v1.01-cache-2.11-cpan-2398b32b56e )