-- -- File: Aspect_FontStyle.cdl -- Created: Mardi 7 Septembre 1993 -- Author: GG -- ---Copyright: MatraDatavision 1991-1993 -- class FontStyle from Aspect ---Version: ---Purpose: This class defines a Font Style. -- The Style can be Predefined or defined by the user ---Keywords: FontStyle ---Warning: ---References: uses Length from Quantity, PlaneAngle from Quantity, TypeOfFont from Aspect, AsciiString from TCollection raises FontStyleDefinitionError from Aspect is Create returns FontStyle from Aspect ---Level: Public ---Purpose: Creates a font style with the default values of -- FontStyle type : DEFAULT -- raises FontStyleDefinitionError from Aspect; -- if the maximum number of font style is exceeded Create ( Type : TypeOfFont from Aspect; Size : Length from Quantity; Slant : PlaneAngle from Quantity = 0.0; CapsHeight : Boolean from Standard = Standard_False) returns FontStyle from Aspect ---Level: Public ---Purpose: Creates the font style depending of -- Size given in the basic LENGTH unit and Slant in -- the basic PLANE ANGLE unit. -- When CapsHeight is TRUE the size defines the -- ascent height of the font;if FALSE,the size -- defines the ascent+descent part of the font. raises FontStyleDefinitionError from Aspect; -- if the Size is <= 0. Create ( Style : CString from Standard; Size : Length from Quantity; Slant : PlaneAngle from Quantity = 0.0; CapsHeight : Boolean from Standard = Standard_False) returns FontStyle from Aspect ---Level: Public ---Purpose: Creates a font style from Adobe font style descriptor -- depending of Size given in MM and Slant in RADIAN. -- When CapsHeight is TRUE the size defines the -- ascent height of the font;if FALSE,the size -- defines the ascent+descent part of the font. -- Font Style Descriptor must be : -- Simple form is "family" Ex: "helvetica" -- More complex form is "family-weight" Ex: "helvetica-bold" -- Full form is : -- "-foundry-family-weight-slant-swdth-adstyl-pixelsize" -- "-pointsize-resx-resy-spacing-avgWidth-registry-encoding" -- where each field must be replaced by an "*" -- Warning: create the smalest font size if the foundry height --and the are null. raises FontStyleDefinitionError from Aspect; -- if