Skip to content

fix: resolve issue with non-Latin characters not displaying correctly on OG images using Google Fonts API#318

Merged
satnaing merged 5 commits into
satnaing:mainfrom
cantpr09ram:fix-ogimages
Jul 27, 2024
Merged

fix: resolve issue with non-Latin characters not displaying correctly on OG images using Google Fonts API#318
satnaing merged 5 commits into
satnaing:mainfrom
cantpr09ram:fix-ogimages

Conversation

@cantpr09ram
Copy link
Copy Markdown
Contributor

hello-你好-안녕-こんにちは-χαίρετε-hallå

before after
before_jp after_jp
before_cn after_cn

if you want more language support you can add it on your own

const fontsConfig = [
   { name: "Noto Sans JP", font: "Noto+Sans+JP", weight: 400, style: "normal", },
   { name: "Noto Sans JP", font: "Noto+Sans+JP:wght@700", weight: 700, style: "normal", }, 
   { name: "Noto Sans", font: "Noto+Sans", weight: 400, style: "normal" },
   { name: "Noto Sans", font: "Noto+Sans:wght@700", weight: 700, style: "normal", },
  ];

@satnaing
Copy link
Copy Markdown
Owner

Thanks for your PR @cantpr09ram.
I need to check this in detail along with dependency (Satori) upgrade.
BRB.

@satnaing
Copy link
Copy Markdown
Owner

satnaing commented Jul 22, 2024

Hello @cantpr09ram
Are you able to build the project?
I've got First argument to DataView constructor must be an ArrayBuffer error when I tried building the project.

Screenshot 2024-07-22 at 8 22 50 PM

cantpr09ram and others added 5 commits July 27, 2024 14:00
Changes made
- resolve conflicts with the main branch
- fix font loading issue in og.png.ts via site.tsx
- add a new section in blog post
@satnaing
Copy link
Copy Markdown
Owner

Hello @cantpr09ram
I co-authored some changes

  • resolved conflicts with the main branch and rebased
  • fixed font loading issue in og.png.ts via site.tsx
  • added a new section in blog post

Thanks for your contribution.

@satnaing satnaing merged commit 2f82feb into satnaing:main Jul 27, 2024
@cantpr09ram
Copy link
Copy Markdown
Contributor Author

hi @satnaing

Sorry for the delay in getting back to you. I've been swamped with final exams. Thanks a ton for your project and for merging my changes. It’s much appreciated!

jxgla pushed a commit to jxgla/astro-paper that referenced this pull request Mar 10, 2026
Changes made
- update font source with Google font
- add error handling in font fetching logic
- update docs in dynamic-og-images blog post

---------

Co-authored-by: satnaing <satnaingdev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants