googlefont -> coolfont

This commit is contained in:
Rizky 2024-03-10 09:43:22 +07:00
parent 3d3e4be5f3
commit 95640ea6f1
3 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@ export const _ = {
async api() {
const { req } = apiContext(this);
const pathname = req.url.split("/_font").pop();
const f = await fetch(`https://fonts.googleapis.com${pathname}`);
const f = await fetch(`https://api.fonts.coollabs.io${pathname}`);
const body = await f.arrayBuffer();
const res = new Response(body);

View File

@ -240,7 +240,7 @@ export const PanelFont: FC<{
const doc = document;
let weight = `:wght@${[300, 400, 500, 600].join(";")}`;
let fontName = item.value.replace(/ /g, "+");
const _href = `https://fonts.googleapis.com/css2?family=${fontName}${weight}`;
const _href = `https://api.fonts.coollabs.io/css2?family=${fontName}${weight}`;
if (!doc.querySelector(`link[href="${_href}]`)) {
const link = doc.createElement("link");
link.type = "text/css";

View File

@ -238,7 +238,7 @@ export const PanelFont: FC<{
const doc = document;
let weight = `:wght@${[300, 400, 500, 600].join(";")}`;
let fontName = item.value.replace(/ /g, "+");
const _href = `https://fonts.googleapis.com/css2?family=${fontName}${weight}`;
const _href = `https://api.fonts.coollabs.io/css2?family=${fontName}${weight}`;
if (!doc.querySelector(`link[href="${_href}]`)) {
const link = doc.createElement("link");
link.type = "text/css";