summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/api/experimental.fonts.json
blob: 98ce2eb0b0a4078139119c35dbe49fda6ee074f2 (plain)
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
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

[
  {
    "namespace": "experimental.fontSettings",
    "types": [
      {
        "id": "FontName",
        "type": "object",
        "description": "Represents a font name.",
        "properties": {
          "fontName": {
            "type": "string",
            "description": "The font name."
          },
          "localizedName": {
            "type": "string",
            "description": "The font name localized for the current locale."
          }
        }
      }
    ],
    "functions": [
      {
        "name": "getFontName",
        "type": "function",
        "description": "Gets the font name of the current setting for a given script and generic font family.",
        "parameters": [
          {
            "name": "details",
            "type": "object",
            "properties": {
              "script": {
                "type": "string",
                "enum": ["Arab", "Hang", "Hans", "Hant", "Hrkt"],
                "description": "The ISO 15924 script code for which the font setting should be retrieved. If omitted, the global script font setting is retrieved.",
                "optional": true
              },
              "genericFamily": {
                "type": "string",
                "enum": ["standard", "sansserif", "serif", "fixed", "cursive", "fantasy"],
                "description": "The CSS generic font family for which the font setting should be retrieved."
              }
            }
          },
          {
            "type": "function",
            "name": "callback",
            "optional": "true",
            "parameters": [
              {
                "name": "details",
                "type": "object",
                "properties": {
                  "fontName": {
                    "type": "string",
                    "description": "The font name."
                  }
                }
              }
            ]
          }
        ]
      },
      {
        "name": "setFontName",
        "type": "function",
        "description": "Sets the font name of the current setting for a given script and generic font family.",
        "parameters": [
          {
            "name": "details",
            "type": "object",
            "properties": {
              "script": {
                "type": "string",
                "enum": ["Arab", "Hang", "Hans", "Hant", "Hrkt"],
                "description": "The ISO 15924 script code for which the font setting should be retrieved. If omitted, the global script font setting is retrieved.",
                "optional": true
              },
              "genericFamily": {
                "type": "string",
                "enum": ["standard", "sansserif", "serif", "fixed", "cursive", "fantasy"],
                "description": "The CSS generic font family for which the font setting should be retrieved."
              },
              "fontName": {
                "type": "string",
                "description": "The font name."
              }
            }
          },
          {
            "type": "function",
            "name": "callback",
            "optional": "true",
            "parameters": []
          }
        ]
      },
      {
        "name": "getFontList",
        "type": "function",
        "description": "Gets a list of fonts on the system.",
        "parameters": [
          {
            "type": "function",
            "name": "callback",
            "parameters": [
              {
                "name": "results",
                "type": "array",
                "items": { "$ref": "FontName" }
              }
            ]
          }
        ]
      }
    ]
  }
]