googlefont -> coolfont
This commit is contained in:
parent
3d3e4be5f3
commit
95640ea6f1
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
Loading…
Reference in New Issue