-
Notifications
You must be signed in to change notification settings - Fork 0
/
typeTextBaseLine.go
57 lines (45 loc) · 1.14 KB
/
typeTextBaseLine.go
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
package textBaseLine
import "strings"
type TextBaseLine int
func (el TextBaseLine) String() string {
return textBaseLineString[el]
}
func (el TextBaseLine) ToType(value string) TextBaseLine {
return textBaseLineStringStringToTextBaseLineStringMap[strings.ToLower(value)]
}
var textBaseLineString = [...]string{
"KAlphabetic",
"KTop",
"KHanging",
"KMiddle",
"KIdeographic",
"KBottom",
}
var textBaseLineStringStringToTextBaseLineStringMap = map[string]TextBaseLine{
"KAlphabetic": KAlphabetic,
"KTop": KTop,
"KHanging": KHanging,
"KMiddle": KMiddle,
"KIdeographic": KIdeographic,
"KBottom": KBottom,
}
const (
// KAlphabetic
// en: Default. The text baseline is the normal alphabetic baseline
KAlphabetic TextBaseLine = iota
// KTop
// en: The text baseline is the top of the em square
KTop
// KHanging
// en: The text baseline is the hanging baseline
KHanging
// KMiddle
// en: The text baseline is the middle of the em square
KMiddle
// KIdeographic
// en: The text baseline is the ideographic baseline
KIdeographic
// KBottom
// en: The text baseline is the bottom of the bounding box
KBottom
)