OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 [ | 5 [ |
6 { | 6 { |
7 "namespace": "experimental.fontSettings", | 7 "namespace": "experimental.fontSettings", |
8 "types": [ | 8 "types": [ |
9 { | 9 { |
10 "id": "FontName", | 10 "id": "FontName", |
(...skipping 28 matching lines...) Expand all Loading... |
39 }, | 39 }, |
40 { | 40 { |
41 "id": "LevelOfControl", | 41 "id": "LevelOfControl", |
42 "description": "One of<br><var>not_controllable</var>: cannot be control
led by any extension<br><var>controlled_by_other_extensions</var>: controlled by
extensions with higher precedence<br><var>controllable_by_this_extension</var>:
can be controlled by this extension<br><var>controlled_by_this_extension</var>:
controlled by this extension", | 42 "description": "One of<br><var>not_controllable</var>: cannot be control
led by any extension<br><var>controlled_by_other_extensions</var>: controlled by
extensions with higher precedence<br><var>controllable_by_this_extension</var>:
can be controlled by this extension<br><var>controlled_by_this_extension</var>:
controlled by this extension", |
43 "type": "string", | 43 "type": "string", |
44 "enum": ["not_controllable", "controlled_by_other_extensions", "controll
able_by_this_extension", "controlled_by_this_extension"] | 44 "enum": ["not_controllable", "controlled_by_other_extensions", "controll
able_by_this_extension", "controlled_by_this_extension"] |
45 } | 45 } |
46 ], | 46 ], |
47 "functions": [ | 47 "functions": [ |
48 { | 48 { |
49 "name": "getFont", | 49 "name": "clearFont", |
50 "description": "Gets the current font setting for a given script and gen
eric font family.", | 50 "description": "Clears the font set by this extension, if any.", |
51 "parameters": [ | 51 "parameters": [ |
52 { | 52 { |
53 "name": "details", | 53 "name": "details", |
| 54 "type": "object", |
| 55 "properties": { |
| 56 "script": { |
| 57 "$ref": "ScriptCode", |
| 58 "description": "The script for which the font should be cleared.
If omitted, the global script font setting is cleared.", |
| 59 "optional": true |
| 60 }, |
| 61 "genericFamily": { |
| 62 "$ref": "GenericFamily", |
| 63 "description": "The generic font family for which the font shoul
d be cleared." |
| 64 } |
| 65 } |
| 66 }, |
| 67 { |
| 68 "type": "function", |
| 69 "name": "callback", |
| 70 "optional": true, |
| 71 "parameters": [] |
| 72 } |
| 73 ] |
| 74 }, |
| 75 { |
| 76 "name": "getFont", |
| 77 "description": "Gets the font for a given script and generic font family
.", |
| 78 "parameters": [ |
| 79 { |
| 80 "name": "details", |
54 "type": "object", | 81 "type": "object", |
55 "properties": { | 82 "properties": { |
56 "script": { | 83 "script": { |
57 "$ref": "ScriptCode", | 84 "$ref": "ScriptCode", |
58 "description": "The script for which the font setting should be
retrieved. If omitted, the global script font setting is retrieved.", | 85 "description": "The script for which the font should be retrieve
d. If omitted, the font for the global script is retrieved.", |
59 "optional": true | 86 "optional": true |
60 }, | 87 }, |
61 "genericFamily": { | 88 "genericFamily": { |
62 "$ref": "GenericFamily", | 89 "$ref": "GenericFamily", |
63 "description": "The generic font family for which the font setti
ng should be retrieved." | 90 "description": "The generic font family for which the font shoul
d be retrieved." |
64 } | 91 } |
65 } | 92 } |
66 }, | 93 }, |
67 { | 94 { |
68 "type": "function", | 95 "type": "function", |
69 "name": "callback", | 96 "name": "callback", |
70 "optional": true, | 97 "optional": true, |
71 "parameters": [ | 98 "parameters": [ |
72 { | 99 { |
73 "name": "details", | 100 "name": "details", |
74 "type": "object", | 101 "type": "object", |
75 "properties": { | 102 "properties": { |
76 "fontName": { | 103 "fontName": { |
77 "type": "string", | 104 "type": "string", |
78 "description": "The font name. Rather than the literal font
name preference value, this may be the name of the font that the system resolves
the preference value to. The empty string signifies fallback to the global scri
pt font setting." | 105 "description": "The font name. Rather than the literal font
name preference value, this may be the name of the font that the system resolves
the preference value to. The empty string signifies fallback to the global scri
pt font setting." |
79 } | 106 } |
80 } | 107 } |
81 } | 108 } |
82 ] | 109 ] |
83 } | 110 } |
84 ] | 111 ] |
85 }, | 112 }, |
86 { | 113 { |
87 "name": "setFont", | 114 "name": "setFont", |
88 "description": "Sets the font setting for a given script and generic fon
t family.", | 115 "description": "Sets the font for a given script and generic font family
.", |
89 "parameters": [ | 116 "parameters": [ |
90 { | 117 { |
91 "name": "details", | 118 "name": "details", |
92 "type": "object", | 119 "type": "object", |
93 "properties": { | 120 "properties": { |
94 "script": { | 121 "script": { |
95 "$ref": "ScriptCode", | 122 "$ref": "ScriptCode", |
96 "description": "The script code which the font setting should be
set. If omitted, the global script font setting is set.", | 123 "description": "The script code which the font should be set. If
omitted, the font for the global script is set.", |
97 "optional": true | 124 "optional": true |
98 }, | 125 }, |
99 "genericFamily": { | 126 "genericFamily": { |
100 "$ref": "GenericFamily", | 127 "$ref": "GenericFamily", |
101 "description": "The generic font family for which the font setti
ng should be set." | 128 "description": "The generic font family for which the font shoul
d be set." |
102 }, | 129 }, |
103 "fontName": { | 130 "fontName": { |
104 "type": "string", | 131 "type": "string", |
105 "description": "The font name. If a script is specified, the emp
ty string means to fallback to the global script font setting." | 132 "description": "The font name. If a script is specified, the emp
ty string means to fallback to the global script font setting." |
106 } | 133 } |
107 } | 134 } |
108 }, | 135 }, |
109 { | 136 { |
110 "type": "function", | 137 "type": "function", |
111 "name": "callback", | 138 "name": "callback", |
(...skipping 13 matching lines...) Expand all Loading... |
125 { | 152 { |
126 "name": "results", | 153 "name": "results", |
127 "type": "array", | 154 "type": "array", |
128 "items": { "$ref": "FontName" } | 155 "items": { "$ref": "FontName" } |
129 } | 156 } |
130 ] | 157 ] |
131 } | 158 } |
132 ] | 159 ] |
133 }, | 160 }, |
134 { | 161 { |
| 162 "name": "clearDefaultFontSize", |
| 163 "description": "Clears the default font size set by this extension, if a
ny.", |
| 164 "parameters": [ |
| 165 { |
| 166 "name": "details", |
| 167 "type": "object", |
| 168 "optional": true, |
| 169 "description": "This parameter is currently unused." |
| 170 }, |
| 171 { |
| 172 "type": "function", |
| 173 "name": "callback", |
| 174 "optional": true, |
| 175 "parameters": [] |
| 176 } |
| 177 ] |
| 178 }, |
| 179 { |
135 "name": "getDefaultFontSize", | 180 "name": "getDefaultFontSize", |
136 "description": "Gets the default font size.", | 181 "description": "Gets the default font size.", |
137 "parameters": [ | 182 "parameters": [ |
138 { | 183 { |
139 "name": "details", | 184 "name": "details", |
140 "type": "object", | 185 "type": "object", |
141 "optional": true, | 186 "optional": true, |
142 "description": "This parameter is currently unused." | 187 "description": "This parameter is currently unused." |
143 }, | 188 }, |
144 { | 189 { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 }, | 221 }, |
177 { | 222 { |
178 "type": "function", | 223 "type": "function", |
179 "name": "callback", | 224 "name": "callback", |
180 "optional": true, | 225 "optional": true, |
181 "parameters": [] | 226 "parameters": [] |
182 } | 227 } |
183 ] | 228 ] |
184 }, | 229 }, |
185 { | 230 { |
| 231 "name": "clearDefaultFixedFontSize", |
| 232 "description": "Clears the default fixed font size set by this extension
, if any.", |
| 233 "parameters": [ |
| 234 { |
| 235 "name": "details", |
| 236 "type": "object", |
| 237 "optional": true, |
| 238 "description": "This parameter is currently unused." |
| 239 }, |
| 240 { |
| 241 "type": "function", |
| 242 "name": "callback", |
| 243 "optional": true, |
| 244 "parameters": [] |
| 245 } |
| 246 ] |
| 247 }, |
| 248 { |
186 "name": "getDefaultFixedFontSize", | 249 "name": "getDefaultFixedFontSize", |
187 "description": "Gets the default size for fixed width fonts.", | 250 "description": "Gets the default size for fixed width fonts.", |
188 "parameters": [ | 251 "parameters": [ |
189 { | 252 { |
190 "name": "details", | 253 "name": "details", |
191 "type": "object", | 254 "type": "object", |
192 "optional": true, | 255 "optional": true, |
193 "description": "This parameter is currently unused." | 256 "description": "This parameter is currently unused." |
194 }, | 257 }, |
195 { | 258 { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 }, | 290 }, |
228 { | 291 { |
229 "type": "function", | 292 "type": "function", |
230 "name": "callback", | 293 "name": "callback", |
231 "optional": true, | 294 "optional": true, |
232 "parameters": [] | 295 "parameters": [] |
233 } | 296 } |
234 ] | 297 ] |
235 }, | 298 }, |
236 { | 299 { |
| 300 "name": "clearMinimumFontSize", |
| 301 "description": "Clears the minimum font size set by this extension, if a
ny.", |
| 302 "parameters": [ |
| 303 { |
| 304 "name": "details", |
| 305 "type": "object", |
| 306 "optional": true, |
| 307 "description": "This parameter is currently unused." |
| 308 }, |
| 309 { |
| 310 "type": "function", |
| 311 "name": "callback", |
| 312 "optional": true, |
| 313 "parameters": [] |
| 314 } |
| 315 ] |
| 316 }, |
| 317 { |
237 "name": "getMinimumFontSize", | 318 "name": "getMinimumFontSize", |
238 "description": "Gets the minimum font size.", | 319 "description": "Gets the minimum font size.", |
239 "parameters": [ | 320 "parameters": [ |
240 { | 321 { |
241 "name": "details", | 322 "name": "details", |
242 "type": "object", | 323 "type": "object", |
243 "optional": true, | 324 "optional": true, |
244 "description": "This parameter is currently unused." | 325 "description": "This parameter is currently unused." |
245 }, | 326 }, |
246 { | 327 { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 }, | 359 }, |
279 { | 360 { |
280 "type": "function", | 361 "type": "function", |
281 "name": "callback", | 362 "name": "callback", |
282 "optional": true, | 363 "optional": true, |
283 "parameters": [] | 364 "parameters": [] |
284 } | 365 } |
285 ] | 366 ] |
286 }, | 367 }, |
287 { | 368 { |
| 369 "name": "clearDefaultCharacterSet", |
| 370 "description": "Clears the default character set set by this extension,
if any.", |
| 371 "parameters": [ |
| 372 { |
| 373 "name": "details", |
| 374 "type": "object", |
| 375 "optional": true, |
| 376 "description": "This parameter is currently unused." |
| 377 }, |
| 378 { |
| 379 "type": "function", |
| 380 "name": "callback", |
| 381 "optional": true, |
| 382 "parameters": [] |
| 383 } |
| 384 ] |
| 385 }, |
| 386 { |
288 "name": "getDefaultCharacterSet", | 387 "name": "getDefaultCharacterSet", |
289 "description": "Gets the default character set.", | 388 "description": "Gets the default character set.", |
290 "parameters": [ | 389 "parameters": [ |
291 { | 390 { |
292 "name": "details", | 391 "name": "details", |
293 "type": "object", | 392 "type": "object", |
294 "optional": true, | 393 "optional": true, |
295 "description": "This parameter is currently unused." | 394 "description": "This parameter is currently unused." |
296 }, | 395 }, |
297 { | 396 { |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 "$ref": "LevelOfControl", | 538 "$ref": "LevelOfControl", |
440 "description": "The level of control this extension has over the
setting." | 539 "description": "The level of control this extension has over the
setting." |
441 } | 540 } |
442 } | 541 } |
443 } | 542 } |
444 ] | 543 ] |
445 } | 544 } |
446 ] | 545 ] |
447 } | 546 } |
448 ] | 547 ] |
OLD | NEW |