@volter/twin-googlefonts 0.0.0-stage → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +15 -2
- package/api/spec/SOURCE.md +17 -0
- package/api/spec/discovery.json +306 -0
- package/api/spec/openapi.json +647 -0
- package/api/spec/sources.json +16 -0
- package/api/src/fetch.ts +16 -0
- package/api/src/generated/surface.gen.json +1 -0
- package/api/src/generated/ui.gen.json +1 -0
- package/api/src/index.ts +3 -0
- package/api/src/manifest.ts +31 -0
- package/api/src/semantics/doors.ts +135 -0
- package/api/src/semantics/index.ts +8 -0
- package/api/src/semantics/shared.ts +1 -0
- package/api/src/semantics/states.ts +6 -0
- package/api/src/semantics/webfonts.ts +32 -0
- package/assets/spec/SOURCE.md +11 -0
- package/assets/spec/openapi.json +162 -0
- package/assets/spec/sources.json +1 -0
- package/assets/src/fetch.ts +14 -0
- package/assets/src/generated/surface.gen.json +1 -0
- package/assets/src/generated/ui.gen.json +1 -0
- package/assets/src/index.ts +3 -0
- package/assets/src/manifest.ts +19 -0
- package/assets/src/semantics/index.ts +10 -0
- package/assets/src/semantics/l.ts +4 -0
- package/assets/src/semantics/s.ts +4 -0
- package/assets/src/semantics/shared.ts +13 -0
- package/css/spec/SOURCE.md +17 -0
- package/css/spec/openapi.json +142 -0
- package/css/spec/sources.json +1 -0
- package/css/src/fetch.ts +14 -0
- package/css/src/generated/surface.gen.json +1 -0
- package/css/src/generated/ui.gen.json +1 -0
- package/css/src/index.ts +3 -0
- package/css/src/manifest.ts +19 -0
- package/css/src/semantics/css.ts +19 -0
- package/css/src/semantics/css2.ts +20 -0
- package/css/src/semantics/index.ts +10 -0
- package/css/src/semantics/shared.ts +1 -0
- package/dist/api/spec/SOURCE.md +17 -0
- package/dist/api/spec/discovery.json +306 -0
- package/dist/api/spec/openapi.json +647 -0
- package/dist/api/spec/sources.json +16 -0
- package/dist/api/src/fetch.d.ts +2 -0
- package/dist/api/src/fetch.js +15 -0
- package/dist/api/src/generated/surface.gen.json +1 -0
- package/dist/api/src/generated/ui.gen.json +1 -0
- package/dist/api/src/index.d.ts +2 -0
- package/dist/api/src/index.js +3 -0
- package/dist/api/src/manifest.d.ts +2 -0
- package/dist/api/src/manifest.js +29 -0
- package/dist/api/src/semantics/doors.d.ts +3 -0
- package/dist/api/src/semantics/doors.js +142 -0
- package/dist/api/src/semantics/index.d.ts +2 -0
- package/dist/api/src/semantics/index.js +4 -0
- package/dist/api/src/semantics/shared.d.ts +1 -0
- package/dist/api/src/semantics/shared.js +1 -0
- package/dist/api/src/semantics/states.d.ts +8 -0
- package/dist/api/src/semantics/states.js +6 -0
- package/dist/api/src/semantics/webfonts.d.ts +2 -0
- package/dist/api/src/semantics/webfonts.js +34 -0
- package/dist/assets/spec/SOURCE.md +11 -0
- package/dist/assets/spec/openapi.json +162 -0
- package/dist/assets/spec/sources.json +1 -0
- package/dist/assets/src/fetch.d.ts +2 -0
- package/dist/assets/src/fetch.js +13 -0
- package/dist/assets/src/generated/surface.gen.json +1 -0
- package/dist/assets/src/generated/ui.gen.json +1 -0
- package/dist/assets/src/index.d.ts +2 -0
- package/dist/assets/src/index.js +3 -0
- package/dist/assets/src/manifest.d.ts +2 -0
- package/dist/assets/src/manifest.js +17 -0
- package/dist/assets/src/semantics/index.d.ts +2 -0
- package/dist/assets/src/semantics/index.js +6 -0
- package/dist/assets/src/semantics/l.d.ts +2 -0
- package/dist/assets/src/semantics/l.js +3 -0
- package/dist/assets/src/semantics/s.d.ts +2 -0
- package/dist/assets/src/semantics/s.js +3 -0
- package/dist/assets/src/semantics/shared.d.ts +2 -0
- package/dist/assets/src/semantics/shared.js +13 -0
- package/dist/css/spec/SOURCE.md +17 -0
- package/dist/css/spec/openapi.json +142 -0
- package/dist/css/spec/sources.json +1 -0
- package/dist/css/src/fetch.d.ts +2 -0
- package/dist/css/src/fetch.js +13 -0
- package/dist/css/src/generated/surface.gen.json +1 -0
- package/dist/css/src/generated/ui.gen.json +1 -0
- package/dist/css/src/index.d.ts +2 -0
- package/dist/css/src/index.js +3 -0
- package/dist/css/src/manifest.d.ts +2 -0
- package/dist/css/src/manifest.js +16 -0
- package/dist/css/src/semantics/css.d.ts +2 -0
- package/dist/css/src/semantics/css.js +19 -0
- package/dist/css/src/semantics/css2.d.ts +2 -0
- package/dist/css/src/semantics/css2.js +21 -0
- package/dist/css/src/semantics/index.d.ts +2 -0
- package/dist/css/src/semantics/index.js +6 -0
- package/dist/css/src/semantics/shared.d.ts +1 -0
- package/dist/css/src/semantics/shared.js +1 -0
- package/dist/generated/pack-facts.json +68 -0
- package/dist/journeys/customer-life.json +544 -0
- package/dist/journeys/decisions.json +64 -0
- package/dist/journeys/demand.json +101 -0
- package/dist/journeys/first-use.json +20 -0
- package/dist/src/cli.d.ts +2 -0
- package/dist/src/cli.js +22 -0
- package/dist/src/fetch.d.ts +2 -0
- package/dist/src/fetch.js +10 -0
- package/dist/src/index.d.ts +5 -0
- package/dist/src/index.js +15 -0
- package/dist/src/manifest.d.ts +2 -0
- package/dist/src/manifest.js +27 -0
- package/dist/src/semantics/seed.d.ts +2 -0
- package/dist/src/semantics/seed.js +181 -0
- package/dist/src/semantics/shared.d.ts +9 -0
- package/dist/src/semantics/shared.js +23 -0
- package/dist/src/server.d.ts +7 -0
- package/dist/src/server.js +7 -0
- package/generated/pack-facts.json +68 -0
- package/journeys/customer-life.json +544 -0
- package/journeys/decisions.json +64 -0
- package/journeys/demand.json +101 -0
- package/journeys/first-use.json +20 -0
- package/package.json +57 -4
- package/src/cli.ts +22 -0
- package/src/fetch.ts +11 -0
- package/src/index.ts +17 -0
- package/src/manifest.ts +29 -0
- package/src/semantics/seed.ts +183 -0
- package/src/semantics/shared.ts +25 -0
- package/src/server.ts +8 -0
- package/vendor/Inter-OFL.txt +93 -0
- package/vendor/OFL.txt +94 -0
- package/vendor/SOURCE.md +40 -0
- package/vendor/antic.json +93 -0
- package/vendor/inputs.json +460 -0
- package/vendor/inter-variable.json +52 -0
- package/vendor/inter.json +44 -0
- package/vendor/noto-sans-sc-text.json +24 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.0.3",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "Google Fonts CSS API",
|
|
5
|
+
"version": "v1"
|
|
6
|
+
},
|
|
7
|
+
"servers": [
|
|
8
|
+
{
|
|
9
|
+
"url": "https://fonts.googleapis.com"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"paths": {
|
|
13
|
+
"/css": {
|
|
14
|
+
"get": {
|
|
15
|
+
"operationId": "getStylesheet",
|
|
16
|
+
"description": "The Google Fonts API provides the regular version of the requested fonts by default. To request other styles or weights, append a colon to the name of the font. The subset parameter specifies script subsets. The representation is selected for the requesting browser.",
|
|
17
|
+
"parameters": [
|
|
18
|
+
{
|
|
19
|
+
"name": "family",
|
|
20
|
+
"in": "query",
|
|
21
|
+
"required": true,
|
|
22
|
+
"schema": {
|
|
23
|
+
"type": "string"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "subset",
|
|
28
|
+
"in": "query",
|
|
29
|
+
"required": false,
|
|
30
|
+
"schema": {
|
|
31
|
+
"type": "string"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "User-Agent",
|
|
36
|
+
"in": "header",
|
|
37
|
+
"schema": {
|
|
38
|
+
"type": "string"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"responses": {
|
|
43
|
+
"200": {
|
|
44
|
+
"description": "A stylesheet referring to font-file URLs",
|
|
45
|
+
"content": {
|
|
46
|
+
"text/css": {
|
|
47
|
+
"schema": {
|
|
48
|
+
"type": "string"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"400": {
|
|
54
|
+
"description": "Bad font request",
|
|
55
|
+
"content": {
|
|
56
|
+
"text/html": {
|
|
57
|
+
"schema": {
|
|
58
|
+
"type": "string"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"/css2": {
|
|
67
|
+
"get": {
|
|
68
|
+
"operationId": "getStylesheet2",
|
|
69
|
+
"description": "It all starts with a new base URL: https://fonts.googleapis.com/css2 The syntax for specifying styles within each family has changed to describe variable font ‘design spaces.’ To request multiple families, specify the family= param for each family. Please note that the 'text=' parameter can only be specified once. It applies to all families in the request. As a general note, the updated CSS API is more strict about what requests are accepted than the original CSS API. The representation is selected for the requesting browser.",
|
|
70
|
+
"parameters": [
|
|
71
|
+
{
|
|
72
|
+
"name": "family",
|
|
73
|
+
"in": "query",
|
|
74
|
+
"required": true,
|
|
75
|
+
"style": "form",
|
|
76
|
+
"explode": true,
|
|
77
|
+
"description": "<family_name>[:<axis_tag_list>@<axis_tuple_list>]",
|
|
78
|
+
"schema": {
|
|
79
|
+
"type": "array",
|
|
80
|
+
"items": {
|
|
81
|
+
"type": "string"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": "text",
|
|
87
|
+
"in": "query",
|
|
88
|
+
"required": false,
|
|
89
|
+
"description": "The text that will be displayed in the requested typeface",
|
|
90
|
+
"schema": {
|
|
91
|
+
"type": "string"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"name": "display",
|
|
96
|
+
"in": "query",
|
|
97
|
+
"required": false,
|
|
98
|
+
"schema": {
|
|
99
|
+
"type": "string",
|
|
100
|
+
"enum": [
|
|
101
|
+
"auto",
|
|
102
|
+
"block",
|
|
103
|
+
"swap",
|
|
104
|
+
"fallback",
|
|
105
|
+
"optional"
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"name": "User-Agent",
|
|
111
|
+
"in": "header",
|
|
112
|
+
"schema": {
|
|
113
|
+
"type": "string"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
"responses": {
|
|
118
|
+
"200": {
|
|
119
|
+
"description": "A stylesheet referring to font-file URLs",
|
|
120
|
+
"content": {
|
|
121
|
+
"text/css": {
|
|
122
|
+
"schema": {
|
|
123
|
+
"type": "string"
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"400": {
|
|
129
|
+
"description": "Bad font request",
|
|
130
|
+
"content": {
|
|
131
|
+
"text/html": {
|
|
132
|
+
"schema": {
|
|
133
|
+
"type": "string"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
package/css/src/fetch.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// GENERATED by scripts/create-pack.ts (--init, --index): a fixed file. The kernel serves the discovery door, the clock,
|
|
2
|
+
// the World's doors, the vendor's screens and the API from the pack's parts (architecture, "The pack contract").
|
|
3
|
+
import { createPackFetch, type DerivedFetch, type DerivedSurface, type PackFetchOptions } from '@volter/world-core';
|
|
4
|
+
import surface from './generated/surface.gen.json' with { type: 'json' };
|
|
5
|
+
import { manifest } from './manifest.ts';
|
|
6
|
+
import { cssSemantics } from './semantics/index.ts';
|
|
7
|
+
|
|
8
|
+
export function createCssLaneFetch(options: PackFetchOptions = {}): DerivedFetch {
|
|
9
|
+
return createPackFetch({
|
|
10
|
+
manifest,
|
|
11
|
+
surface: surface as DerivedSurface,
|
|
12
|
+
handlers: cssSemantics,
|
|
13
|
+
}, options);
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"generatedBy":"scripts/derive-pack.ts","spec":"openapi.json","format":"openapi","version":"v1","resources":[],"operations":[{"id":"getStylesheet","method":"get","path":"/css","pathParams":[],"query":[{"name":"family","type":"string","required":true},{"name":"subset","type":"string","required":false}],"body":[],"bodyEncoding":"none","successStatus":200,"class":"computed"},{"id":"getStylesheet2","method":"get","path":"/css2","pathParams":[],"query":[{"name":"display","type":"string","required":false},{"name":"family","type":"array","required":true},{"name":"text","type":"string","required":false}],"body":[],"bodyEncoding":"none","successStatus":200,"class":"computed"}]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"generatedBy":"scripts/derive-pack.ts","resources":{}}
|
package/css/src/index.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Vendor wire facts; the surface is derived from the retained spec.
|
|
2
|
+
import type { DerivedManifest } from '@volter/world-core';
|
|
3
|
+
export const manifest: DerivedManifest = {
|
|
4
|
+
vendor: 'googlefonts', service: 'googlefonts', body: { json: 'always' },
|
|
5
|
+
ids: { template: '{uuid}' }, time: 'iso',
|
|
6
|
+
error: { error: { code: '{status}', message: '{message}', status: '{kind}' } },
|
|
7
|
+
readOnly: { status: 403, kind: 'PERMISSION_DENIED', message: 'Read-only World' },
|
|
8
|
+
notFound: { status: 404, kind: 'NOT_FOUND', message: 'Not Found' },
|
|
9
|
+
gap: { status: 404, kind: 'NOT_FOUND', message: 'Not Found' },
|
|
10
|
+
list: { style: 'envelope', envelope: { items: '{data}' }, limit: { param: 'limit', default: 100, max: 100 } },
|
|
11
|
+
deleted: {},
|
|
12
|
+
resources: {},
|
|
13
|
+
discovery: { twinOf: 'Google Fonts browser-selected CSS', stores: 'Published catalog and font representations in the shared googlefonts store' },
|
|
14
|
+
|
|
15
|
+
descriptor: { protocol: '3', transport: 'rest', archetype: 'crud', bin: 'world-googlefonts-css',
|
|
16
|
+
resources: [], specSource: 'css/spec/SOURCE.md', description: 'Google Fonts browser-selected CSS',
|
|
17
|
+
adoption: { sdks: [], envStems: [] }, hosts: [{ host: 'fonts.googleapis.com', pathPattern: '^/css2?$' }],
|
|
18
|
+
endpointEnvNone: 'The application hardcodes this vendor lane host.' },
|
|
19
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { HandlerContext } from '@volter/world-core';
|
|
2
|
+
import { CATALOG, CSS, cssKey, htmlError } from './shared.ts';
|
|
3
|
+
|
|
4
|
+
// source: spec:getStylesheet "The representation is selected for the requesting browser."
|
|
5
|
+
export async function getStylesheet(ctx: HandlerContext): Promise<Response> {
|
|
6
|
+
const query = new URL(ctx.call.request.url).searchParams;
|
|
7
|
+
const family = query.get('family'), subset = query.get('subset') ?? 'latin';
|
|
8
|
+
if (!family || [...query.keys()].some(k => !['family','subset'].includes(k)))
|
|
9
|
+
return htmlError(400, 'Bad font request');
|
|
10
|
+
const generation = ctx.row(CATALOG, 'published')?.fingerprint;
|
|
11
|
+
const key = cssKey(ctx, family, subset, ctx.call.request.headers.get('user-agent') ?? '');
|
|
12
|
+
const row = generation === undefined ? undefined : ctx.row(CSS, String(generation) + ':' + key);
|
|
13
|
+
// Where the documentation stops: no supplied representation is a named
|
|
14
|
+
// refusal, not an invented conversion or another browser's font format.
|
|
15
|
+
if (!row) return htmlError(400, 'Font family or browser representation is not published');
|
|
16
|
+
const body = await ctx.blobs.get(String(row.blob));
|
|
17
|
+
if (!body) return htmlError(404, 'Font stylesheet not found');
|
|
18
|
+
return new Response(Uint8Array.from(body).buffer, { headers: { 'content-type': 'text/css; charset=utf-8', 'content-length': String(body.length), 'vary': 'User-Agent' } });
|
|
19
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { HandlerContext } from '@volter/world-core';
|
|
2
|
+
import { CATALOG, CSS, css2Key, css2Query, htmlError } from './shared.ts';
|
|
3
|
+
|
|
4
|
+
// source: spec:getStylesheet2 "To request multiple families, specify the family= param for each family."
|
|
5
|
+
export async function getStylesheet2(ctx: HandlerContext): Promise<Response> {
|
|
6
|
+
const pairs = css2Query(new URL(ctx.call.request.url).searchParams);
|
|
7
|
+
if (!pairs) return htmlError(400, 'Bad font request');
|
|
8
|
+
const generation = ctx.row(CATALOG, 'published')?.fingerprint;
|
|
9
|
+
const userAgent = ctx.call.request.headers.get('user-agent') ?? '';
|
|
10
|
+
const sheet = (agent: string) => generation === undefined ? undefined : ctx.row(CSS, String(generation) + ':' + css2Key(ctx, pairs, agent));
|
|
11
|
+
// Where the evidence stops: Google answered the same truetype stylesheet to no User-Agent, "node" and "undici"
|
|
12
|
+
// (vendor/inter.json). A request whose agent is not a browser's ("Mozilla/...") and has no representation of its
|
|
13
|
+
// own reads the one published for no agent; a browser without its own representation is refused, never sent
|
|
14
|
+
// another browser's format.
|
|
15
|
+
const row = sheet(userAgent) ?? (userAgent.startsWith('Mozilla/') ? undefined : sheet(''));
|
|
16
|
+
if (!row) return htmlError(400, 'Font family or browser representation is not published');
|
|
17
|
+
const body = await ctx.blobs.get(String(row.blob));
|
|
18
|
+
if (!body) return htmlError(404, 'Font stylesheet not found');
|
|
19
|
+
return new Response(Uint8Array.from(body).buffer, { headers: { 'content-type': 'text/css; charset=utf-8', 'content-length': String(body.length), 'access-control-allow-origin': '*' } });
|
|
20
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// GENERATED by scripts/create-pack.ts --index: the handler map, by operationId, from the families' files (each
|
|
2
|
+
// handler named as its operation). Do not edit; add a handler to its family's file and generate again.
|
|
3
|
+
import type { Handler } from '@volter/world-core';
|
|
4
|
+
import * as css from './css.ts';
|
|
5
|
+
import * as css2 from './css2.ts';
|
|
6
|
+
|
|
7
|
+
export const cssSemantics: Record<string, Handler> = {
|
|
8
|
+
getStylesheet: css.getStylesheet,
|
|
9
|
+
getStylesheet2: css2.getStylesheet2,
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../../src/semantics/shared.ts';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Google Fonts Developer API
|
|
2
|
+
|
|
3
|
+
The unchanged Discovery document is Google's webfonts v1 contract, fetched
|
|
4
|
+
2026-10-12 from https://www.googleapis.com/discovery/v1/apis/webfonts/v1/rest.
|
|
5
|
+
It is converted by twin-world/scripts/spec-discovery-to-openapi.ts with that
|
|
6
|
+
explicit date, retaining its revision, method id, schemas and parameter metadata.
|
|
7
|
+
The vendor's documentation is https://developers.google.com/fonts/docs/developer_api.
|
|
8
|
+
The application uses the documented older www.googleapis.com/webfonts prefix;
|
|
9
|
+
the manifest's pathPrefix strips that prefix before the same derived operation.
|
|
10
|
+
The Discovery base webfonts.googleapis.com/v1/webfonts is also served. Sort values
|
|
11
|
+
are case-normalized, because the documentation and actual pinned app use lowercase
|
|
12
|
+
popularity while Discovery lists uppercase enums. Advanced capabilities are outside
|
|
13
|
+
this static-TTF catalog's demanded path and return a named refusal.
|
|
14
|
+
|
|
15
|
+
SHA-256 `openapi.json`: 81395430e46dbeba78ab69301daa459d4e8fcfe80dfdf493118ce1c6e5a255b1
|
|
16
|
+
|
|
17
|
+
SHA-256 `discovery.json`: `9dfed5186ad6ee434a82a33737af9ddc3a157005d7d6922820ac5d42ccef41f1`.
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
{
|
|
2
|
+
"revision": "20260903",
|
|
3
|
+
"title": "Web Fonts Developer API",
|
|
4
|
+
"resources": {
|
|
5
|
+
"webfonts": {
|
|
6
|
+
"methods": {
|
|
7
|
+
"list": {
|
|
8
|
+
"parameterOrder": [],
|
|
9
|
+
"parameters": {
|
|
10
|
+
"capability": {
|
|
11
|
+
"location": "query",
|
|
12
|
+
"repeated": true,
|
|
13
|
+
"enum": [
|
|
14
|
+
"CAPABILITY_UNSPECIFIED",
|
|
15
|
+
"WOFF2",
|
|
16
|
+
"VF",
|
|
17
|
+
"FAMILY_TAGS"
|
|
18
|
+
],
|
|
19
|
+
"description": "Controls the font urls in `Webfont.files`, by default, static ttf fonts are sent.",
|
|
20
|
+
"type": "string",
|
|
21
|
+
"enumDescriptions": [
|
|
22
|
+
"Default means static ttf fonts.",
|
|
23
|
+
"Use WOFF2(Compressed)instead of ttf.",
|
|
24
|
+
"Prefer variable font files instead of static fonts instantiated at standard weights.",
|
|
25
|
+
"Include tags that apply to the entire family in the response."
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"category": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"description": "Filters by Webfont.category, if category is found in Webfont.categories. If not set, returns all families.",
|
|
31
|
+
"location": "query"
|
|
32
|
+
},
|
|
33
|
+
"subset": {
|
|
34
|
+
"description": "Filters by Webfont.subset, if subset is found in Webfont.subsets. If not set, returns all families.",
|
|
35
|
+
"type": "string",
|
|
36
|
+
"location": "query"
|
|
37
|
+
},
|
|
38
|
+
"sort": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"description": "Enables sorting of the list.",
|
|
41
|
+
"location": "query",
|
|
42
|
+
"enumDescriptions": [
|
|
43
|
+
"No sorting specified, use the default sorting method.",
|
|
44
|
+
"Sort alphabetically",
|
|
45
|
+
"Sort by date added",
|
|
46
|
+
"Sort by popularity",
|
|
47
|
+
"Sort by number of styles",
|
|
48
|
+
"Sort by trending"
|
|
49
|
+
],
|
|
50
|
+
"enum": [
|
|
51
|
+
"SORT_UNDEFINED",
|
|
52
|
+
"ALPHA",
|
|
53
|
+
"DATE",
|
|
54
|
+
"POPULARITY",
|
|
55
|
+
"STYLE",
|
|
56
|
+
"TRENDING"
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
"family": {
|
|
60
|
+
"description": "Filters by Webfont.family, using literal match. If not set, returns all families",
|
|
61
|
+
"type": "string",
|
|
62
|
+
"location": "query",
|
|
63
|
+
"repeated": true
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"response": {
|
|
67
|
+
"$ref": "WebfontList"
|
|
68
|
+
},
|
|
69
|
+
"httpMethod": "GET",
|
|
70
|
+
"description": "Retrieves the list of fonts currently served by the Google Fonts Developer API.",
|
|
71
|
+
"id": "webfonts.webfonts.list",
|
|
72
|
+
"path": "v1/webfonts",
|
|
73
|
+
"flatPath": "v1/webfonts"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"basePath": "",
|
|
79
|
+
"parameters": {
|
|
80
|
+
"quotaUser": {
|
|
81
|
+
"location": "query",
|
|
82
|
+
"description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.",
|
|
83
|
+
"type": "string"
|
|
84
|
+
},
|
|
85
|
+
"uploadType": {
|
|
86
|
+
"location": "query",
|
|
87
|
+
"type": "string",
|
|
88
|
+
"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\")."
|
|
89
|
+
},
|
|
90
|
+
"access_token": {
|
|
91
|
+
"description": "OAuth access token.",
|
|
92
|
+
"location": "query",
|
|
93
|
+
"type": "string"
|
|
94
|
+
},
|
|
95
|
+
"callback": {
|
|
96
|
+
"description": "JSONP",
|
|
97
|
+
"location": "query",
|
|
98
|
+
"type": "string"
|
|
99
|
+
},
|
|
100
|
+
"key": {
|
|
101
|
+
"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
|
|
102
|
+
"location": "query",
|
|
103
|
+
"type": "string"
|
|
104
|
+
},
|
|
105
|
+
"prettyPrint": {
|
|
106
|
+
"description": "Returns response with indentations and line breaks.",
|
|
107
|
+
"location": "query",
|
|
108
|
+
"type": "boolean",
|
|
109
|
+
"default": "true"
|
|
110
|
+
},
|
|
111
|
+
"alt": {
|
|
112
|
+
"description": "Data format for response.",
|
|
113
|
+
"type": "string",
|
|
114
|
+
"default": "json",
|
|
115
|
+
"enum": [
|
|
116
|
+
"json",
|
|
117
|
+
"media",
|
|
118
|
+
"proto"
|
|
119
|
+
],
|
|
120
|
+
"location": "query",
|
|
121
|
+
"enumDescriptions": [
|
|
122
|
+
"Responses with Content-Type of application/json",
|
|
123
|
+
"Media download with context-dependent Content-Type",
|
|
124
|
+
"Responses with Content-Type of application/x-protobuf"
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
"upload_protocol": {
|
|
128
|
+
"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
|
|
129
|
+
"type": "string",
|
|
130
|
+
"location": "query"
|
|
131
|
+
},
|
|
132
|
+
"oauth_token": {
|
|
133
|
+
"type": "string",
|
|
134
|
+
"description": "OAuth 2.0 token for the current user.",
|
|
135
|
+
"location": "query"
|
|
136
|
+
},
|
|
137
|
+
"fields": {
|
|
138
|
+
"description": "Selector specifying which fields to include in a partial response.",
|
|
139
|
+
"type": "string",
|
|
140
|
+
"location": "query"
|
|
141
|
+
},
|
|
142
|
+
"$.xgafv": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"location": "query",
|
|
145
|
+
"enum": [
|
|
146
|
+
"1",
|
|
147
|
+
"2"
|
|
148
|
+
],
|
|
149
|
+
"enumDescriptions": [
|
|
150
|
+
"v1 error format",
|
|
151
|
+
"v2 error format"
|
|
152
|
+
],
|
|
153
|
+
"description": "V1 error format."
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"rootUrl": "https://webfonts.googleapis.com/",
|
|
157
|
+
"batchPath": "batch",
|
|
158
|
+
"discoveryVersion": "v1",
|
|
159
|
+
"protocol": "rest",
|
|
160
|
+
"mtlsRootUrl": "https://webfonts.mtls.googleapis.com/",
|
|
161
|
+
"servicePath": "",
|
|
162
|
+
"kind": "discovery#restDescription",
|
|
163
|
+
"ownerName": "Google",
|
|
164
|
+
"canonicalName": "Webfonts",
|
|
165
|
+
"id": "webfonts:v1",
|
|
166
|
+
"documentationLink": "https://developers.google.com/fonts/docs/developer_api",
|
|
167
|
+
"baseUrl": "https://webfonts.googleapis.com/",
|
|
168
|
+
"name": "webfonts",
|
|
169
|
+
"ownerDomain": "google.com",
|
|
170
|
+
"description": "The Google Web Fonts Developer API lets you retrieve information about web fonts served by Google.",
|
|
171
|
+
"icons": {
|
|
172
|
+
"x16": "http://www.google.com/images/icons/product/search-16.gif",
|
|
173
|
+
"x32": "http://www.google.com/images/icons/product/search-32.gif"
|
|
174
|
+
},
|
|
175
|
+
"schemas": {
|
|
176
|
+
"WebfontList": {
|
|
177
|
+
"properties": {
|
|
178
|
+
"items": {
|
|
179
|
+
"type": "array",
|
|
180
|
+
"items": {
|
|
181
|
+
"$ref": "Webfont"
|
|
182
|
+
},
|
|
183
|
+
"description": "The list of fonts currently served by the Google Fonts API."
|
|
184
|
+
},
|
|
185
|
+
"kind": {
|
|
186
|
+
"description": "This kind represents a list of webfont objects in the webfonts service.",
|
|
187
|
+
"type": "string"
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
"type": "object",
|
|
191
|
+
"id": "WebfontList",
|
|
192
|
+
"description": "Response containing the list of fonts currently served by the Google Fonts API."
|
|
193
|
+
},
|
|
194
|
+
"Tag": {
|
|
195
|
+
"description": "Metadata for a tag.",
|
|
196
|
+
"type": "object",
|
|
197
|
+
"id": "Tag",
|
|
198
|
+
"properties": {
|
|
199
|
+
"weight": {
|
|
200
|
+
"format": "float",
|
|
201
|
+
"type": "number",
|
|
202
|
+
"description": "The weight of the tag."
|
|
203
|
+
},
|
|
204
|
+
"name": {
|
|
205
|
+
"description": "The name of the tag.",
|
|
206
|
+
"type": "string"
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"Webfont": {
|
|
211
|
+
"description": "Metadata describing a family of fonts.",
|
|
212
|
+
"id": "Webfont",
|
|
213
|
+
"type": "object",
|
|
214
|
+
"properties": {
|
|
215
|
+
"colorCapabilities": {
|
|
216
|
+
"type": "array",
|
|
217
|
+
"items": {
|
|
218
|
+
"type": "string"
|
|
219
|
+
},
|
|
220
|
+
"description": "The color format(s) available for this family."
|
|
221
|
+
},
|
|
222
|
+
"category": {
|
|
223
|
+
"type": "string",
|
|
224
|
+
"description": "The category of the font."
|
|
225
|
+
},
|
|
226
|
+
"tags": {
|
|
227
|
+
"items": {
|
|
228
|
+
"$ref": "Tag"
|
|
229
|
+
},
|
|
230
|
+
"type": "array",
|
|
231
|
+
"description": "The tags that apply to this family."
|
|
232
|
+
},
|
|
233
|
+
"files": {
|
|
234
|
+
"additionalProperties": {
|
|
235
|
+
"type": "string"
|
|
236
|
+
},
|
|
237
|
+
"type": "object",
|
|
238
|
+
"description": "The font files (with all supported scripts) for each one of the available variants, as a key : value map."
|
|
239
|
+
},
|
|
240
|
+
"variants": {
|
|
241
|
+
"items": {
|
|
242
|
+
"type": "string"
|
|
243
|
+
},
|
|
244
|
+
"type": "array",
|
|
245
|
+
"description": "The available variants for the font."
|
|
246
|
+
},
|
|
247
|
+
"lastModified": {
|
|
248
|
+
"description": "The date (format \"yyyy-MM-dd\") the font was modified for the last time.",
|
|
249
|
+
"type": "string"
|
|
250
|
+
},
|
|
251
|
+
"subsets": {
|
|
252
|
+
"description": "The scripts supported by the font.",
|
|
253
|
+
"type": "array",
|
|
254
|
+
"items": {
|
|
255
|
+
"type": "string"
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
"axes": {
|
|
259
|
+
"description": "Axis for variable fonts.",
|
|
260
|
+
"type": "array",
|
|
261
|
+
"items": {
|
|
262
|
+
"$ref": "Axis"
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
"kind": {
|
|
266
|
+
"type": "string",
|
|
267
|
+
"description": "This kind represents a webfont object in the webfonts service."
|
|
268
|
+
},
|
|
269
|
+
"menu": {
|
|
270
|
+
"description": "Font URL for menu subset, a subset of the font that is enough to display the font name",
|
|
271
|
+
"type": "string"
|
|
272
|
+
},
|
|
273
|
+
"version": {
|
|
274
|
+
"description": "The font version.",
|
|
275
|
+
"type": "string"
|
|
276
|
+
},
|
|
277
|
+
"family": {
|
|
278
|
+
"type": "string",
|
|
279
|
+
"description": "The name of the font."
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
"Axis": {
|
|
284
|
+
"type": "object",
|
|
285
|
+
"id": "Axis",
|
|
286
|
+
"properties": {
|
|
287
|
+
"start": {
|
|
288
|
+
"format": "float",
|
|
289
|
+
"type": "number",
|
|
290
|
+
"description": "minimum value"
|
|
291
|
+
},
|
|
292
|
+
"tag": {
|
|
293
|
+
"description": "tag name.",
|
|
294
|
+
"type": "string"
|
|
295
|
+
},
|
|
296
|
+
"end": {
|
|
297
|
+
"format": "float",
|
|
298
|
+
"description": "maximum value",
|
|
299
|
+
"type": "number"
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
"description": "Metadata for a variable font axis."
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
"version": "v1"
|
|
306
|
+
}
|