-
-
Notifications
You must be signed in to change notification settings - Fork 914
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
Describe the Issue
There is an error in the current configuration of Noto Sans for OG Image generation. When this configuration is used, an error occurs because the corresponding Google Fonts page does not exist.
Proposed Changes
You can avoid the error by making the following changes. Simply, remove :wght@700 from font property.
// file: loadGoogleFont.ts
async function loadGoogleFonts(
text: string
): Promise<
Array<{ name: string; data: ArrayBuffer; weight: number; style: string }>
> {
const fontsConfig = [
{
name: "Noto Sans JP",
font: "Noto+Sans+JP",
weight: 400,
style: "normal",
},
{
name: "Noto Sans JP",
font: "Noto+Sans+JP",
weight: 700,
style: "normal",
},
{ name: "Noto Sans", font: "Noto+Sans", weight: 400, style: "normal" },
{
name: "Noto Sans",
font: "Noto+Sans",
weight: 700,
style: "normal",
},
];
// other codes
}
Additional Context
When the error occurs, accessing the URL obtained by parsing the API variable leads to a page like the one below.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
