OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 [ | |
6 { | |
7 "namespace": "experimental.fontSettings", | |
8 "types": [ | |
9 { | |
10 "id": "FontName", | |
11 "type": "object", | |
12 "description": "Represents a font name.", | |
13 "properties": { | |
14 "fontName": { | |
15 "type": "string", | |
16 "description": "The font name." | |
17 }, | |
18 "localizedName": { | |
19 "type": "string", | |
20 "description": "The font name localized for the current locale." | |
21 } | |
22 } | |
23 } | |
24 ], | |
25 "functions": [ | |
26 { | |
27 "name": "getFontName", | |
28 "type": "function", | |
29 "description": "Gets the font name of the current setting for a given sc
ript and generic font family.", | |
30 "parameters": [ | |
31 { | |
32 "name": "details", | |
33 "type": "object", | |
34 "properties": { | |
35 "script": { | |
36 "type": "string", | |
37 "enum": ["Arab", "Hang", "Hans", "Hant", "Hrkt"], | |
38 "description": "The ISO 15924 script code for which the font set
ting should be retrieved. If omitted, the global script font setting is retrieve
d.", | |
39 "optional": true | |
40 }, | |
41 "genericFamily": { | |
42 "type": "string", | |
43 "enum": ["standard", "sansserif", "serif", "fixed", "cursive", "
fantasy"], | |
44 "description": "The CSS generic font family for which the font s
etting should be retrieved." | |
45 } | |
46 } | |
47 }, | |
48 { | |
49 "type": "function", | |
50 "name": "callback", | |
51 "optional": "true", | |
52 "parameters": [ | |
53 { | |
54 "name": "details", | |
55 "type": "object", | |
56 "properties": { | |
57 "fontName": { | |
58 "type": "string", | |
59 "description": "The font name." | |
60 } | |
61 } | |
62 } | |
63 ] | |
64 } | |
65 ] | |
66 }, | |
67 { | |
68 "name": "setFontName", | |
69 "type": "function", | |
70 "description": "Sets the font name of the current setting for a given sc
ript and generic font family.", | |
71 "parameters": [ | |
72 { | |
73 "name": "details", | |
74 "type": "object", | |
75 "properties": { | |
76 "script": { | |
77 "type": "string", | |
78 "enum": ["Arab", "Hang", "Hans", "Hant", "Hrkt"], | |
79 "description": "The ISO 15924 script code for which the font set
ting should be retrieved. If omitted, the global script font setting is retrieve
d.", | |
80 "optional": true | |
81 }, | |
82 "genericFamily": { | |
83 "type": "string", | |
84 "enum": ["standard", "sansserif", "serif", "fixed", "cursive", "
fantasy"], | |
85 "description": "The CSS generic font family for which the font s
etting should be retrieved." | |
86 }, | |
87 "fontName": { | |
88 "type": "string", | |
89 "description": "The font name." | |
90 } | |
91 } | |
92 }, | |
93 { | |
94 "type": "function", | |
95 "name": "callback", | |
96 "optional": "true", | |
97 "parameters": [] | |
98 } | |
99 ] | |
100 }, | |
101 { | |
102 "name": "getFontList", | |
103 "type": "function", | |
104 "description": "Gets a list of fonts on the system.", | |
105 "parameters": [ | |
106 { | |
107 "type": "function", | |
108 "name": "callback", | |
109 "parameters": [ | |
110 { | |
111 "name": "results", | |
112 "type": "array", | |
113 "items": { "$ref": "FontName" } | |
114 } | |
115 ] | |
116 } | |
117 ] | |
118 } | |
119 ] | |
120 } | |
121 ] | |
OLD | NEW |