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", |
11 "type": "object", | 11 "type": "object", |
12 "description": "Represents a font name.", | 12 "description": "Represents a font name.", |
13 "properties": { | 13 "properties": { |
14 "fontName": { | 14 "fontName": { |
15 "type": "string", | 15 "type": "string", |
16 "description": "The font name." | 16 "description": "The font name." |
17 }, | 17 }, |
18 "localizedName": { | 18 "localizedName": { |
19 "type": "string", | 19 "type": "string", |
20 "description": "The font name localized for the current locale." | 20 "description": "The font name localized for the current locale." |
21 } | 21 } |
22 } | 22 } |
23 }, | 23 }, |
24 { | 24 { |
25 "id": "ScriptCode", | 25 "id": "ScriptCode", |
26 "type": "string", | 26 "type": "string", |
27 "enum": [ "Arab", "Armn", "Beng", "Cans", "Cher", "Cyrl", "Deva", "Ethi"
, "Geor", | 27 "enum": [ "Arab", "Armn", "Beng", "Cans", "Cher", "Cyrl", "Deva", "Ethi"
, "Geor", |
28 "Grek", "Gujr", "Guru", "Hang", "Hans", "Hant", "Hebr", "Hrkt"
, "Knda", | 28 "Grek", "Gujr", "Guru", "Hang", "Hans", "Hant", "Hebr", "Hrkt"
, "Knda", |
29 "Khmr", "Laoo", "Mlym", "Mong", "Mymr", "Orya", "Sinh", "Taml"
, "Telu", | 29 "Khmr", "Laoo", "Mlym", "Mong", "Mymr", "Orya", "Sinh", "Taml"
, "Telu", |
30 "Thaa", "Thai", "Tibt", "Yiii" | 30 "Thaa", "Thai", "Tibt", "Yiii", "Zyyy" |
31 ], | 31 ], |
32 "description": "An ISO 15924 script code." | 32 "description": "An ISO 15924 script code. The default, or global, script
is represented by script code \"Zyyy\"." |
33 }, | 33 }, |
34 { | 34 { |
35 "id": "GenericFamily", | 35 "id": "GenericFamily", |
36 "type": "string", | 36 "type": "string", |
37 "enum": ["standard", "sansserif", "serif", "fixed", "cursive", "fantasy"
], | 37 "enum": ["standard", "sansserif", "serif", "fixed", "cursive", "fantasy"
], |
38 "description": "A CSS generic font family." | 38 "description": "A CSS generic font family." |
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", |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 { | 75 { |
76 "name": "getFont", | 76 "name": "getFont", |
77 "description": "Gets the font for a given script and generic font family
.", | 77 "description": "Gets the font for a given script and generic font family
.", |
78 "parameters": [ | 78 "parameters": [ |
79 { | 79 { |
80 "name": "details", | 80 "name": "details", |
81 "type": "object", | 81 "type": "object", |
82 "properties": { | 82 "properties": { |
83 "script": { | 83 "script": { |
84 "$ref": "ScriptCode", | 84 "$ref": "ScriptCode", |
85 "description": "The script for which the font should be retrieve
d. If omitted, the font for the global script is retrieved.", | 85 "description": "The script for which the font should be retrieve
d. If omitted, the font setting for the global script (script code \"Zyyy\") is
retrieved.", |
86 "optional": true | 86 "optional": true |
87 }, | 87 }, |
88 "genericFamily": { | 88 "genericFamily": { |
89 "$ref": "GenericFamily", | 89 "$ref": "GenericFamily", |
90 "description": "The generic font family for which the font shoul
d be retrieved." | 90 "description": "The generic font family for which the font shoul
d be retrieved." |
91 } | 91 } |
92 } | 92 } |
93 }, | 93 }, |
94 { | 94 { |
95 "type": "function", | 95 "type": "function", |
(...skipping 21 matching lines...) Expand all Loading... |
117 { | 117 { |
118 "name": "setFont", | 118 "name": "setFont", |
119 "description": "Sets the font for a given script and generic font family
.", | 119 "description": "Sets the font for a given script and generic font family
.", |
120 "parameters": [ | 120 "parameters": [ |
121 { | 121 { |
122 "name": "details", | 122 "name": "details", |
123 "type": "object", | 123 "type": "object", |
124 "properties": { | 124 "properties": { |
125 "script": { | 125 "script": { |
126 "$ref": "ScriptCode", | 126 "$ref": "ScriptCode", |
127 "description": "The script code which the font should be set. If
omitted, the font for the global script is set.", | 127 "description": "The script code which the font should be set. If
omitted, the font setting for the global script (script code \"Zyyy\") is set."
, |
128 "optional": true | 128 "optional": true |
129 }, | 129 }, |
130 "genericFamily": { | 130 "genericFamily": { |
131 "$ref": "GenericFamily", | 131 "$ref": "GenericFamily", |
132 "description": "The generic font family for which the font shoul
d be set." | 132 "description": "The generic font family for which the font shoul
d be set." |
133 }, | 133 }, |
134 "fontName": { | 134 "fontName": { |
135 "type": "string", | 135 "type": "string", |
136 "description": "The font name. If a script is specified, the emp
ty string means to fallback to the global script font setting." | 136 "description": "The font name. If a script is specified, the emp
ty string means to fallback to the global script font setting." |
137 } | 137 } |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 "name": "onFontChanged", | 468 "name": "onFontChanged", |
469 "description": "Fired when a font setting changes.", | 469 "description": "Fired when a font setting changes.", |
470 "parameters": [ | 470 "parameters": [ |
471 { | 471 { |
472 "type": "object", | 472 "type": "object", |
473 "name": "details", | 473 "name": "details", |
474 "properties": { | 474 "properties": { |
475 "fontName": { "type": "string" }, | 475 "fontName": { "type": "string" }, |
476 "script": { | 476 "script": { |
477 "$ref": "ScriptCode", | 477 "$ref": "ScriptCode", |
478 "description": "The script code for which the font setting has c
hanged. If omitted, the global script font setting has changed.", | 478 "description": "The script code for which the font setting has c
hanged.", |
479 "optional": true | 479 "optional": true |
480 }, | 480 }, |
481 "genericFamily": { | 481 "genericFamily": { |
482 "$ref": "GenericFamily", | 482 "$ref": "GenericFamily", |
483 "description": "The generic font family for which the font setti
ng has changed." | 483 "description": "The generic font family for which the font setti
ng has changed." |
484 }, | 484 }, |
485 "levelOfControl": { | 485 "levelOfControl": { |
486 "$ref": "LevelOfControl", | 486 "$ref": "LevelOfControl", |
487 "description": "The level of control this extension has over the
setting." | 487 "description": "The level of control this extension has over the
setting." |
488 } | 488 } |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 "$ref": "LevelOfControl", | 566 "$ref": "LevelOfControl", |
567 "description": "The level of control this extension has over the
setting." | 567 "description": "The level of control this extension has over the
setting." |
568 } | 568 } |
569 } | 569 } |
570 } | 570 } |
571 ] | 571 ] |
572 } | 572 } |
573 ] | 573 ] |
574 } | 574 } |
575 ] | 575 ] |
OLD | NEW |