File: Font.html

package info (click to toggle)
polyml 5.6-8
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 31,892 kB
  • ctags: 34,453
  • sloc: cpp: 44,983; ansic: 24,520; asm: 14,850; sh: 11,730; makefile: 551; exp: 484; python: 253; awk: 91; sed: 9
file content (181 lines) | stat: -rw-r--r-- 5,778 bytes parent folder | download | duplicates (5)
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

<head>
<title>Windows Interface Reference: Font structure</title>
</head>

<body>

<h1>Fonts and Text </h1>

<p>The Font structure contains functions and structures to manipulate fonts and draw text.</p>

<pre>structure Font :
  sig
    type HDC and HFONT
    type COLORREF = Color.COLORREF
    type POINT = {x: int, y: int}
    and  SIZE = {cx: int, cy: int }
    and  RECT = { top: int, left: int, bottom: int, right: int }

    datatype FontFamily =
          FF_DECORATIVE
        | FF_DONTCARE
        | FF_MODERN
        | FF_ROMAN
        | FF_SCRIPT
        | FF_SWISS
    and FontPitch = DEFAULT_PITCH | FIXED_PITCH | VARIABLE_PITCH
    and OutputPrecision =
          OUT_CHARACTER_PRECIS
        | OUT_DEFAULT_PRECIS
        | OUT_DEVICE_PRECIS
        | OUT_OUTLINE_PRECIS
        | OUT_RASTER_PRECIS
        | OUT_SCREEN_OUTLINE_PRECIS
        | OUT_STRING_PRECIS
        | OUT_STROKE_PRECIS
        | OUT_TT_ONLY_PRECIS
        | OUT_TT_PRECIS
    and OutputQuality =
          DEFAULT_QUALITY
        | DRAFT_QUALITY
        | OTHER_QUALITY of int
        | PROOF_QUALITY
    and CharacterSet =
          ANSI_CHARSET
        | CHINESEBIG5_CHARSET
        | DEFAULT_CHARSET
        | HANGEUL_CHARSET
        | OEM_CHARSET
        | OTHER_CHARSET of int
        | SHIFTJIS_CHARSET
        | SYMBOL_CHARSET

    type FontWeight =  int
    val FW_BLACK : FontWeight
    val FW_BOLD : FontWeight
    val FW_DEMIBOLD : FontWeight
    val FW_DONTCARE : FontWeight
    val FW_EXTRABOLD : FontWeight
    val FW_EXTRALIGHT : FontWeight
    val FW_HEAVY : FontWeight
    val FW_LIGHT : FontWeight
    val FW_MEDIUM : FontWeight
    val FW_NORMAL : FontWeight
    val FW_REGULAR : FontWeight
    val FW_SEMIBOLD : FontWeight
    val FW_THIN : FontWeight
    val FW_ULTRABOLD : FontWeight
    val FW_ULTRALIGHT : FontWeight

    type ClippingPrecision
    val CLIP_CHARACTER_PRECIS : ClippingPrecision
    val CLIP_DEFAULT_PRECIS : ClippingPrecision
    val CLIP_EMBEDDED : ClippingPrecision
    val CLIP_LH_ANGLES : ClippingPrecision
    val CLIP_MASK : ClippingPrecision
    val CLIP_STROKE_PRECIS : ClippingPrecision
    val CLIP_TT_ALWAYS : ClippingPrecision

    type LOGFONT =
    {
        height : int,
        width : int,
        escapement : int,
        orientation : int,
        weight : FontWeight,
        italic : bool,
        underline : bool,
        strikeOut : bool,
        charSet : CharacterSet,
        outputPrecision: OutputPrecision,
        clipPrecision : ClippingPrecision,
        quality : OutputQuality,
        pitch: FontPitch,
        family: FontFamily,
        faceName : string
    }

    datatype DrawTextMode =
          DT_BOTTOM
        | DT_CALCRECT
        | DT_CENTER
        | DT_EXPANDTABS
        | DT_EXTERNALLEADING
        | DT_INTERNAL
        | DT_LEFT
        | DT_NOCLIP
        | DT_NOPREFIX
        | DT_RIGHT
        | DT_SINGLELINE
        | DT_TABSTOP of int
        | DT_TOP
        | DT_VCENTER
        | DT_WORDBREAK
    and TextAlign =
          TA_BASELINE
        | TA_BOTTOM
        | TA_CENTER
        | TA_LEFT
        | TA_NOUPDATECP
        | TA_RIGHT
        | TA_TOP
        | TA_UPDATECP
    and TextMetricPitch =
          TMPF_DEVICE
        | TMPF_FIXED_PITCH
        | TMPF_TRUETYPE
        | TMPF_VECTOR
    and ExtendedTextMode =
          ETO_CLIPPED
        | ETO_GLYPH_INDEX
        | ETO_IGNORELANGUAGE
        | ETO_OPAQUE
        | ETO_RTLREADING

    type TEXTMETRIC =
            { height: int, ascent: int, descent: int, internalLeading: int, externalLeading: int,
              aveCharWidth: int, maxCharWidth: int, weight: int, overhang: int,
              digitizedAspectX: int, digitizedAspectY: int, firstChar: char, lastChar: char,
              defaultChar: char, breakChar: char, italic: bool, underlined: bool, struckOut: bool,
              pitch: TextMetricPitch list, family: FontFamily, charSet : CharacterSet }

    val AddFontResource : string -&gt; int
    val <a
name="CreateFont">CreateFont</a> : LOGFONT -&gt; HFONT
    val CreateFontIndirect : LOGFONT -&gt; HFONT
    val CreateScalableFontResource : int * string * string * string -&gt; unit
    val DrawText : HDC * string * RECT * DrawTextMode list -&gt; int
    val <a
name="ExtTextOut">ExtTextOut</a> : HDC * POINT * ExtendedTextMode list *
       RECT option * string * int list -&gt; unit
    val GetAspectRatioFilterEx : HDC -&gt; SIZE
    val GetCharABCWidths : HDC * char * char -&gt; (int * int * int) list
    val GetCharABCWidthsFloat : HDC * char * char -&gt; (real * real * real) list
    val GetCharWidth32 : HDC * char * char -&gt; int list
    val GetTabbedTextExtent : HDC * string * int list -&gt; SIZE
    val GetCharWidthFloat : HDC * int * int -&gt; real list
    val GetTextAlign : HDC -&gt; TextAlign list
    val GetTextCharacterExtra : HDC -&gt; int
    val GetTextColor : HDC -&gt; COLORREF
    val GetTextExtentExPoint : HDC * string * int option -&gt;
       {fit: int option, size: SIZE, extents: int list}
    val GetTextExtentPoint32 : HDC * string -&gt; SIZE
    val GetTextFace : HDC -&gt; string
    val <a
name="GetTextMetrics">GetTextMetrics</a> : HDC -&gt; TEXTMETRIC
    val RemoveFontResource : string -&gt; unit
    val SetMapperFlags : HDC * bool -&gt; bool
    val SetTextAlign : HDC * TextAlign list -&gt; TextAlign list
    val SetTextCharacterExtra : HDC * int -&gt; int
    val <a
name="SetTextColor">SetTextColor</a> : HDC * COLORREF -&gt; COLORREF
    val SetTextJustification : HDC * int * int -&gt; unit
    val <a
name="TabbedTextOut">TabbedTextOut</a>: HDC * POINT * string * int list * int -&gt; SIZE
    val TextOut : HDC * POINT * String.string -&gt; unit
  end</pre>
</body>
</html>