0023415: OSD_FontMgr can't idenify aspect for fonts with names dependant on system...
[occt.git] / src / Font / Font_SystemFont.cdl
CommitLineData
b311480e 1-- Created on: 2008-01-20
2-- Created by: Alexander A. BORODIN
3-- Copyright (c) 2008-2012 OPEN CASCADE SAS
4--
5-- The content of this file is subject to the Open CASCADE Technology Public
6-- License Version 6.5 (the "License"). You may not use the content of this file
7-- except in compliance with the License. Please obtain a copy of the License
8-- at http://www.opencascade.org and read it completely before using this file.
9--
10-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
11-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
12--
13-- The Original Code and all software distributed under the License is
14-- distributed on an "AS IS" basis, without warranty of any kind, and the
15-- Initial Developer hereby disclaims all such warranties, including without
16-- limitation, any warranties of merchantability, fitness for a particular
17-- purpose or non-infringement. Please see the License for the specific terms
18-- and conditions governing the rights and limitations under the License.
19
eeaaaefb 20class SystemFont from Font inherits TShared from MMgt
21---Purpose: Structure for store of Font System Information
7fd59977 22
23uses FontAspect,
24 HAsciiString from TCollection
7fd59977 25
26is
eeaaaefb 27 Create returns SystemFont;
28 ---Purpose: Creates empty font object
29 ---Level: Public
7fd59977 30
aff395a3 31 Create (theFontName : HAsciiString;
32 theFontAspect : FontAspect;
33 theFilePath : HAsciiString ) returns SystemFont;
eeaaaefb 34 ---Purpose: Creates Font object initialized with <FontName> as name
35 --- <FontAspect>.... TODO
36 ---Level: Public
7fd59977 37
aff395a3 38 Create (theXLFD : HAsciiString;
39 theFilePath : HAsciiString ) returns SystemFont;
40 ---Purpose: Creates Font object and initialize class fields with
41 --- values taken from XLFD (X Logical Font Description)
eeaaaefb 42 ---Level: Public
7fd59977 43
eeaaaefb 44 FontName (me) returns HAsciiString;
45 --- Purpose: Returns font family name
46 ---Level: Public
7fd59977 47
eeaaaefb 48 FontPath (me) returns HAsciiString;
49 --- Purpose: Returns font file path
50 --- Level: Public
7fd59977 51
eeaaaefb 52 FontAspect (me) returns FontAspect;
53 --- Purpose: Returns font aspect
54 --- Level: Public
7fd59977 55
eeaaaefb 56 FontHeight (me) returns Integer from Standard;
57 --- Purpose: Returns font height
58 --- If returned value is equal -1 it means that font is resizable
59 --- Level: Public
7fd59977 60
eeaaaefb 61 IsValid (me) returns Boolean;
aff395a3 62
63 IsEqual (me;
64 theOtherFont: SystemFont) returns Boolean;
65 --- Purpose: Return true if the FontName, FontAspect and FontSize are the same.
66 --- Level: Public
67
eeaaaefb 68fields
7fd59977 69 MyFontName: HAsciiString; --Font family name
70 MyFontAspect: FontAspect;
71 MyFaceSize: Integer; --height of font
72 MyFilePath: HAsciiString; --absolute path to font file
73 MyVerification: Boolean; --indicator of font initialization errors. False if initialization is failed.
74
75end SystemFont;