captionbob docs

Version 1.0.0
Contents ↓

HTTP API

Font routes

The routes of the fonts: the font files of a font name of a script, the font for the letters that the fonts of a script do not have, and one font file, so that libass in the browser draws the captions with the fonts of the burn; and the font families for the font list of the editor.

Source file: captionbob_server/font_routes.js

GET /api/fonts

Access: any. A route that a dashboard login or an API key may call.

GET /api/fonts?name=<font name>. The font files that libass can use for a font name of a script, each with the path of its file. When no font has the name, fallbackFamily names the family that libass uses in its place, and the files are the files of that family.

GET /api/fonts/:fontId

Access: any. A route that a dashboard login or an API key may call.

Path values: fontId.

GET /api/fonts/:fontId. One font file of the font list.

POST /api/font-fallback

Access: any. A route that a dashboard login or an API key may call.

POST /api/font-fallback with the body {"names": [<font name>, ...], "letters": <text>}. The family that the burn takes for the most letters of a script that the fonts of the script do not have, with its font files, so that the preview makes it its default font. The family is null when the fonts of the script have every letter.

GET /api/font-families

Access: any. A route that a dashboard login or an API key may call.

GET /api/font-families. The font families that a style can name, for the font list of the editor.