andrioid / gatsby-plugin-social-cards

Automatically generates social preview cards for various social networks
https://www.gatsbyjs.org/packages/gatsby-plugin-social-cards
6 stars 2 forks source link

Weird font spacing issue #5

Open motin opened 4 years ago

motin commented 4 years ago

Example output, using the following frontmatter:

title: "Foo bar foo bar"
description: "Foo bar foo bar foo bar foo bar"

defaultAuthor: "Foo bar author" (... and a custom background image from unsplash)

social-card-7aafe5b8-345c-5242-8995-05e1ad65ca48

Have you considered using Jimp as per https://codeburst.io/how-to-automate-social-sharing-cards-on-your-gatsby-blog-77a356a58b38? Fonts are supplied so results out to be the same regardless of the underlying build system.

andrioid commented 4 years ago

What platform are you building it on? This looks like a fallback font to me. Our conversion of SVG is dependant on the sharp library, and what fonts are available on the system that converts the images from SVG to PNG.

I created this library, because I thought the Jimp based plugins were ugly and hard to customize. I'm very happy with SVG, although I would like to support custom fonts at some point.

I have some experiments where I use fontkit to import custom fonts and convert them to SVG paths, but it's very early stage atm, and time is in short supply.

Maybe try to build this on Netlify or Vercel? Both systems appear to build the cards fine. Best of luck.