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 "fontId": { |
15 "type": "string", | 15 "type": "string", |
16 "description": "The font name." | 16 "description": "The font ID." |
17 }, | 17 }, |
18 "localizedName": { | 18 "diplayName": { |
19 "type": "string", | 19 "type": "string", |
20 "description": "The font name localized for the current locale." | 20 "description": "The display name of the font." |
21 } | 21 } |
22 } | 22 } |
23 }, | 23 }, |
24 { | 24 { |
25 "id": "ScriptCode", | 25 "id": "ScriptCode", |
26 "type": "string", | 26 "type": "string", |
27 "enum": [ "Afak", "Arab", "Armi", "Armn", "Avst", "Bali", "Bamu", "Bass"
, "Batk", | 27 "enum": [ "Afak", "Arab", "Armi", "Armn", "Avst", "Bali", "Bamu", "Bass"
, "Batk", |
28 "Beng", "Blis", "Bopo", "Brah", "Brai", "Bugi", "Buhd", "Cakm"
, "Cans", | 28 "Beng", "Blis", "Bopo", "Brah", "Brai", "Bugi", "Buhd", "Cakm"
, "Cans", |
29 "Cari", "Cham", "Cher", "Cirt", "Copt", "Cprt", "Cyrl", "Cyrs"
, "Deva", | 29 "Cari", "Cham", "Cher", "Cirt", "Copt", "Cprt", "Cyrl", "Cyrs"
, "Deva", |
30 "Dsrt", "Dupl", "Egyd", "Egyh", "Egyp", "Elba", "Ethi", "Geor"
, "Geok", | 30 "Dsrt", "Dupl", "Egyd", "Egyh", "Egyp", "Elba", "Ethi", "Geor"
, "Geok", |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 }, | 105 }, |
106 { | 106 { |
107 "type": "function", | 107 "type": "function", |
108 "name": "callback", | 108 "name": "callback", |
109 "optional": true, | 109 "optional": true, |
110 "parameters": [ | 110 "parameters": [ |
111 { | 111 { |
112 "name": "details", | 112 "name": "details", |
113 "type": "object", | 113 "type": "object", |
114 "properties": { | 114 "properties": { |
115 "fontName": { | 115 "fontId": { |
116 "type": "string", | 116 "type": "string", |
117 "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." | 117 "description": "The font ID. Rather than the literal font ID
preference value, this may be the ID of the font that the system resolves the p
reference value to. So, <var>fontId</var> can differ from the font passed to <co
de>setFont</code>, if, for example, the font is not available on the system. The
empty string signifies fallback to the global script font setting." |
118 }, | 118 }, |
119 "levelOfControl": { | 119 "levelOfControl": { |
120 "$ref": "LevelOfControl", | 120 "$ref": "LevelOfControl", |
121 "description": "The level of control this extension has over
the setting." | 121 "description": "The level of control this extension has over
the setting." |
122 } | 122 } |
123 } | 123 } |
124 } | 124 } |
125 ] | 125 ] |
126 } | 126 } |
127 ] | 127 ] |
128 }, | 128 }, |
129 { | 129 { |
130 "name": "setFont", | 130 "name": "setFont", |
131 "description": "Sets the font for a given script and generic font family
.", | 131 "description": "Sets the font for a given script and generic font family
.", |
132 "parameters": [ | 132 "parameters": [ |
133 { | 133 { |
134 "name": "details", | 134 "name": "details", |
135 "type": "object", | 135 "type": "object", |
136 "properties": { | 136 "properties": { |
137 "script": { | 137 "script": { |
138 "$ref": "ScriptCode", | 138 "$ref": "ScriptCode", |
139 "description": "The script code which the font should be set. If
omitted, the font setting for the global script (script code \"Zyyy\") is set."
, | 139 "description": "The script code which the font should be set. If
omitted, the font setting for the global script (script code \"Zyyy\") is set."
, |
140 "optional": true | 140 "optional": true |
141 }, | 141 }, |
142 "genericFamily": { | 142 "genericFamily": { |
143 "$ref": "GenericFamily", | 143 "$ref": "GenericFamily", |
144 "description": "The generic font family for which the font shoul
d be set." | 144 "description": "The generic font family for which the font shoul
d be set." |
145 }, | 145 }, |
146 "fontName": { | 146 "fontId": { |
147 "type": "string", | 147 "type": "string", |
148 "description": "The font name. If a script is specified, the emp
ty string means to fallback to the global script font setting." | 148 "description": "The font ID. The empty string means to fallback
to the global script font setting." |
149 } | 149 } |
150 } | 150 } |
151 }, | 151 }, |
152 { | 152 { |
153 "type": "function", | 153 "type": "function", |
154 "name": "callback", | 154 "name": "callback", |
155 "optional": true, | 155 "optional": true, |
156 "parameters": [] | 156 "parameters": [] |
157 } | 157 } |
158 ] | 158 ] |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 ], | 402 ], |
403 "events": [ | 403 "events": [ |
404 { | 404 { |
405 "name": "onFontChanged", | 405 "name": "onFontChanged", |
406 "description": "Fired when a font setting changes.", | 406 "description": "Fired when a font setting changes.", |
407 "parameters": [ | 407 "parameters": [ |
408 { | 408 { |
409 "type": "object", | 409 "type": "object", |
410 "name": "details", | 410 "name": "details", |
411 "properties": { | 411 "properties": { |
412 "fontName": { "type": "string" }, | 412 "fontId": { |
| 413 "type": "string", |
| 414 "description": "The font ID. See the description in <code>getFon
t</code>." |
| 415 }, |
413 "script": { | 416 "script": { |
414 "$ref": "ScriptCode", | 417 "$ref": "ScriptCode", |
415 "description": "The script code for which the font setting has c
hanged.", | 418 "description": "The script code for which the font setting has c
hanged.", |
416 "optional": true | 419 "optional": true |
417 }, | 420 }, |
418 "genericFamily": { | 421 "genericFamily": { |
419 "$ref": "GenericFamily", | 422 "$ref": "GenericFamily", |
420 "description": "The generic font family for which the font setti
ng has changed." | 423 "description": "The generic font family for which the font setti
ng has changed." |
421 }, | 424 }, |
422 "levelOfControl": { | 425 "levelOfControl": { |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 "$ref": "LevelOfControl", | 486 "$ref": "LevelOfControl", |
484 "description": "The level of control this extension has over the
setting." | 487 "description": "The level of control this extension has over the
setting." |
485 } | 488 } |
486 } | 489 } |
487 } | 490 } |
488 ] | 491 ] |
489 } | 492 } |
490 ] | 493 ] |
491 } | 494 } |
492 ] | 495 ] |
OLD | NEW |