-
Notifications
You must be signed in to change notification settings - Fork 546
/
Copy pathtxt-font-props.feature
149 lines (114 loc) · 4.83 KB
/
txt-font-props.feature
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
Feature: Change appearance of font used to render text
In order to fine-tune the appearance of text
As a developer using python-pptx
I need a set of properties on the font used to render text
Scenario Outline: Get Font.bold
Given a font with bold set <bold-state>
Then font.bold is <expected-value>
Examples: font.bold states
| bold-state | expected-value |
| on | True |
| off | False |
| to inherit | None |
Scenario Outline: Set Font.bold
Given a font with bold set <initial-state>
When I assign <new-value> to font.bold
Then font.bold is <new-value>
Examples: Expected results of changing font.bold setting
| initial-state | new-value |
| on | True |
| off | True |
| to inherit | True |
| on | False |
| off | False |
| to inherit | False |
| on | None |
| off | None |
| to inherit | None |
Scenario Outline: Get Font.italic
Given a font with italic set <italic-state>
Then font.italic is <expected-value>
Examples: font.italic states
| italic-state | expected-value |
| on | True |
| off | False |
| to inherit | None |
Scenario Outline: Set Font.italic
Given a font with italic set <initial-state>
When I assign <new-value> to font.italic
Then font.italic is <new-value>
Examples: Expected results of changing font.italic setting
| initial-state | new-value |
| on | True |
| off | True |
| to inherit | True |
| on | False |
| off | False |
| to inherit | False |
| on | None |
| off | None |
| to inherit | None |
Scenario Outline: Get Font.language_id
Given a font having language id <lang-id-state>
Then font.language_id is MSO_LANGUAGE_ID.<member>
Examples: font.language_id states
| lang-id-state | member |
| of no explicit setting | NONE |
| MSO_LANGUAGE_ID.POLISH | POLISH |
Scenario Outline: Set Font.language_id
Given a font having language id <initial-state>
When I assign <new-value> to font.language_id
Then font.language_id is MSO_LANGUAGE_ID.<member>
Examples: font.language_id assignment state changes
| initial-state | new-value | member |
| of no explicit setting | MSO_LANGUAGE_ID.FRENCH | FRENCH |
| MSO_LANGUAGE_ID.FRENCH | MSO_LANGUAGE_ID.POLISH | POLISH |
| MSO_LANGUAGE_ID.POLISH | MSO_LANGUAGE_ID.NONE | NONE |
| MSO_LANGUAGE_ID.FRENCH | None | NONE |
Scenario Outline: Get Font.underline
Given a font with underline set <underline-state>
Then font.underline is <expected-value>
Examples: font.underline states
| underline-state | expected-value |
| on | True |
| off | False |
| to inherit | None |
| to DOUBLE_LINE | DOUBLE_LINE |
| to WAVY_LINE | WAVY_LINE |
Scenario Outline: Set Font.underline
Given a font with underline set <initial-state>
When I assign <new-value> to font.underline
Then font.underline is <expected-value>
Examples: Expected results of changing font.underline setting
| initial-state | new-value | expected-value |
| on | True | True |
| off | SINGLE_LINE | True |
| to inherit | True | True |
| to WAVY_LINE | False | False |
| to inherit | NONE | False |
| to DOUBLE_LINE | None | None |
| off | DOUBLE_LINE | DOUBLE_LINE |
| to WAVY_LINE | DOUBLE_LINE | DOUBLE_LINE |
Scenario Outline: Get Font.size
Given a font having size of <value>
Then font.size is <reported-size>
Examples: Font sizes
| value | reported-size |
| no explicit value | None |
| 42pt | 42.0 points |
Scenario: Set Font.name
Given a font
When I assign a typeface name to the font
Then the font name matches the typeface I set
Scenario: Add hyperlink
Given a text run
When I set the hyperlink address
Then run.text is a hyperlink
Scenario: Add hyperlink in table cell
Given a text run in a table cell
When I set the hyperlink address
Then run.text is a hyperlink
Scenario: Remove hyperlink
Given a text run having a hyperlink
When I assign None to hyperlink.address
Then run.text is not a hyperlink