-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Description
Its hit or miss but it seems like fonts that are more "stylish" or complex are the ones that don't render correctly. A group of fonts within the same family will all render using, what appears to be, the exact same font.
This is occurring on OSX and Freebsd.
Example fonts:
https://drive.google.com/drive/folders/1tBD2RnuEpLHofEdS4Eeg7VvSgk6nt7S1?usp=sharing
The code i'm using:
import text2png from 'text2png'
import fontkit from 'fontkit'
const textToImage = ({ text, file }) => {
const name = text || fontkit.openSync(file).fullName
return text2png(name, {
padding: 10,
font: `20px ${name}`,
localFontPath: file,
localFontName: name
})
}
export default textToImage
I'll continue my research upstream but wanted to drop an issue on this project in case someone has some info related to this.
david90
Metadata
Metadata
Assignees
Labels
No labels