Skip to content

Commit

Permalink
fix: add missing Inter font
Browse files Browse the repository at this point in the history
  • Loading branch information
juanmahidalgo committed Jan 12, 2024
1 parent a7cfe57 commit e4b7ac2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Binary file added src/fonts/Inter/Inter-SemiBold.ttf
Binary file not shown.
4 changes: 3 additions & 1 deletion src/ports/ens/component.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { PNGStream, createCanvas, loadImage } from 'canvas'
import { PNGStream, createCanvas, loadImage, registerFont } from 'canvas'
import { IENSComponent } from './types'
import { getGradientColors } from './utils'

export function createENS(): IENSComponent {
async function generateImage(name: string, width: number, height: number): Promise<PNGStream> {
// register the font first
registerFont('src/fonts/Inter/Inter-SemiBold.ttf', { family: 'Inter', weight: '600' })
// Create a canvas and get the context
const canvas = createCanvas(width, height)
const ctx = canvas.getContext('2d')
Expand Down

0 comments on commit e4b7ac2

Please sign in to comment.