1signature CHAR_INFO  =
2sig
3  val charWidth  : FontTypes.fontNr * BasicTypes.charCode -> BasicTypes.dist
4  val charHeight : FontTypes.fontNr * BasicTypes.charCode -> BasicTypes.dist
5  val charDepth  : FontTypes.fontNr * BasicTypes.charCode -> BasicTypes.dist
6  val charItalic : FontTypes.fontNr * BasicTypes.charCode -> BasicTypes.dist
7  val charLarger : FontTypes.fontNr * BasicTypes.charCode -> BasicTypes.charCode option
8  val charAccentSkew : FontTypes.fontNr * BasicTypes.charCode -> BasicTypes.dist
9  val charExtensible : FontTypes.fontNr * BasicTypes.charCode -> bool
10  val charExtensibleTop : FontTypes.fontNr * BasicTypes.charCode -> BasicTypes.charCode option
11  val charExtensibleRep : FontTypes.fontNr * BasicTypes.charCode -> BasicTypes.charCode
12  val charExtensibleBot : FontTypes.fontNr * BasicTypes.charCode -> BasicTypes.charCode option
13
14end  (* signature CHAR_INFO *)
15(*----------*)
16
17structure CharInfo: CHAR_INFO  =
18struct
19  open Vector
20(* infix 8 sub *)
21  open BasicTypes;  open FontTypes
22  open FontVector
23
24  fun charInfo (fontNr, ch)  =  sub(sub(fontVector, fontNr), ch): charInfo
25
26  fun charWidth   pair  =  #width  (charInfo pair)
27  fun charHeight  pair  =  #height (charInfo pair)
28  fun charDepth   pair  =  #depth  (charInfo pair)
29  fun charItalic  pair  =  #itCorr (charInfo pair)
30  fun charLarger  pair  =  #larger (charInfo pair)
31  fun charAccentSkew pair = #accentSkew (charInfo pair)
32  fun charExtensible pair = (isSome o #varChar) (charInfo pair)
33  fun charExtensibleTop pair = (#top o valOf o #varChar) (charInfo pair)
34  fun charExtensibleRep pair = (#rep o valOf o #varChar) (charInfo pair)
35  fun charExtensibleBot pair = (#bot o valOf o #varChar) (charInfo pair)
36
37end  (* structure CharInfo *)
38