| 49 | // Get specific fonts (fixed charsets) including links |
| 50 | // /api/fonts/:id |
| 51 | interface IAPIFont { |
| 52 | id: string; |
| 53 | family: string; |
| 54 | subsets: string[]; |
| 55 | category: string; |
| 56 | version: string; |
| 57 | lastModified: string; // e.g. 2022-09-22 |
| 58 | popularity: number; |
| 59 | defSubset: string; |
| 60 | defVariant: string; |
| 61 | subsetMap: { |
| 62 | [subset: string]: boolean; |
| 63 | }; |
| 64 | storeID: string; |
| 65 | variants: { |
| 66 | id: string; |
| 67 | fontFamily: string | null; |
| 68 | fontStyle: string | null; |
| 69 | fontWeight: string | null; |
| 70 | eot?: string; |
| 71 | woff?: string; |
| 72 | woff2?: string; |
| 73 | svg?: string; |
| 74 | ttf?: string; |
| 75 | }[]; |
| 76 | } |
| 77 | export async function getApiFontsById(req: Request, res: Response<IAPIFont | string | NodeJS.WritableStream>, next: NextFunction) { |
| 78 | try { |
| 79 | // get the subset string if it was supplied... |
nothing calls this directly
no outgoing calls
no test coverage detected