Blob | File data.
List available fonts
@font-face declarations or use the file names supplied by your reader integration. Keep the exact spelling and casing returned by Komga when passing fontFamily.
The CSS and file routes are reader resources, but deployment security and browser origin still matter. Fetch them through the SDK when the reader needs the configured base URL, session credentials, or API key; a direct CSS
<link> cannot use the SDK client’s headers.Load a font in a browser reader
Use the CSS endpoint when you want the server’s@font-face declarations. Use getFontFile when a reader needs an explicit FontFace and remember to release the object URL:
Get font-family CSS
Pass the family as the flatfontFamily parameter. The response is a Blob | File, so read it as text before injecting it:
Get a font file
The file operation takes bothfontFamily and fontFile as flat parameters:
Save a font file in Node.js
The generated response is binary in every runtime. In Node.js, use the nativeBlob and ArrayBuffer APIs and write the bytes with node:fs/promises:
Error handling
Font calls return the generated result union by default. Useunwrap when you want a typed throwing boundary:
Next steps
Book content
Access pages, manifests, and resources.
Authentication
Configure Basic or API-key authentication.