summaryrefslogtreecommitdiff
path: root/src/MFT/MFT.cdl
blob: 1ca53601f4b4eeb7966b58de368f969e945875b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
--
-- File:	MFT.cdl
-- Created:	Lundi 3 Mars 1997
-- Author:	GG
--
---Copyright:	MatraDatavision 1993
--

package MFT

	---Version:

	---Purpose: This package contains a Meta Font toolkit and utilities.
	--	    1) Enable to creates MDTV outline fonts from others specific fonts
	--	       (i.e: PostScript fonts,Euclid3 fonts,...)
	--	    2) Enable to retrieves a string or  extended string
	--	       outline vector list according of the current font and
	--	       text attribs :
	--	       (policy,size,slant,orientation and curve precision)
	--	    3) Enable to retrieve policy or text attribs
	--	       (i.e: Foundry,Family,..,font or text size).

	---Keywords: Font 

	---References:

uses

	Aspect,TCollection,Quantity,MMgt,OSD,TColStd

is

	---------------------------
	-- Category: Imported types 
	---------------------------

	imported FileRecord;
	imported FileHandle;
	imported FilePosition;
	imported CommandDescriptor;

	--------------------
	-- Category: Classes
	--------------------

	class FontManager;
	---Purpose: Creates a font manager.
	--	    Enable to reads or writes a MetaFont file.

	class TextManager;
	---Purpose: Facilities to draw a font.

	---------------------------------
	-- Category: Instantiated classes
	---------------------------------

        alias ListOfFontName is SequenceOfAsciiString from TColStd;

	class ListOfFontHandle instantiates
                Sequence from TCollection (FileHandle from MFT);

	alias ListOfFontReference is SequenceOfInteger from TColStd;

        -------------------------
        -- Category: Enumerations
        -------------------------

        enumeration TypeOfCommand is 
   		TOC_UNKNOWN,
		TOC_HSTEM,	-- Declare an horizontal stem zone 
		TOC_VSTEM,	-- Declare a vertical stem zone
		TOC_VMOVETO,	-- Relative vertical move
		TOC_RLINETO,	-- Relative segment
		TOC_HLINETO,	-- Relative horizontal segment
		TOC_VLINETO,	-- Relative vertical segment
		TOC_RRCURVETO,	-- Relative curve
		TOC_CLOSEPATH,	-- Close current path
--		TOC_CALLSUBR,	-- Call preregistered macro
--	Must be extracted by the translator.
--		TOC_RETURN,	-- Returns from preregistered macro
--	Must be extracted by the translator.
--		TOC_ESCAPE,	-- Skip ????????
		TOC_HSBW,	-- Sets the char width horizontal vector & left sidebearing.
		TOC_ENDCHAR,	-- End char definition
		TOC_RMOVETO,	-- Relative move
		TOC_HMOVETO,	-- Relative horizontal move
		TOC_VHCURVETO,	-- Vertical and Horizontal tangential curve
		TOC_HVCURVETO,	-- Horizontal and Vertical tangential curve
		TOC_DOTSECTION,	-- Dot section for special chars (i.e: i,j)
		TOC_VSTEM3,	-- Declare three vertical stem zone
		TOC_HSTEM3,	-- Declare three horizontal stem zone
		TOC_SEAC,	-- Accented char description
		TOC_SBW,	-- Sets the char width vector & left sidebearing.
--		TOC_DIV,	-- Divide operation
--	Must be extracted by the translator.
--		TOC_CALLOTHERSUBR,--  ????????
--	Must be extracted by the translator.
--		TOC_POP,	--  ????????
--	Must be extracted by the translator.
		TOC_SETCURRENTPOINT,-- Sets the current absolute point
		TOC_CHARSTRING,	-- Char string command (i.e: "/dollar")
		TOC_NUMERIC,	-- Numeric command
		TOC_MINMAX	-- Optionnal Char bounding box
        end TypeOfCommand ;
        ---Purpose: Definition of the MFT font descriptor commands. 
	--  Warning: Based on Type 1 font descriptor commands.

        enumeration TypeOfValue is   
		TOV_UNKNOWN,	
		TOV_INTEGER,
		TOV_FLOAT,	
		TOV_STRING	
        end TypeOfValue ;
        ---Purpose: Definition of the MFT command parameters. 

        -----------------------
        -- Category: Exceptions
        -----------------------

        exception FontManagerDefinitionError inherits NoSuchObject from Standard;

        exception FontManagerError inherits TypeMismatch from Standard;

        ----------------------------
        -- Category: Package methods 
        ----------------------------

        Convert ( aCommandType: TypeOfCommand from MFT)
                returns CString from Standard is private;
        ---Purpose: Converts the type of command to string.

        Convert ( aValueType: TypeOfValue from MFT)
                returns CString from Standard is private;
        ---Purpose: Converts the type of value to string.

end MFT;