astro-paper icon indicating copy to clipboard operation
astro-paper copied to clipboard

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

Open cantpr09ram opened this issue 1 year ago • 2 comments

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", },
  ];

cantpr09ram avatar Jul 01 '24 08:07 cantpr09ram

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

satnaing avatar Jul 15 '24 15:07 satnaing

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

satnaing avatar Jul 22 '24 13:07 satnaing

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 avatar Jul 27 '24 07:07 satnaing

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!

cantpr09ram avatar Aug 03 '24 06:08 cantpr09ram