S
S
Sergey Kotov2019-05-17 09:16:44
Canvas
Sergey Kotov, 2019-05-17 09:16:44

How to draw text with different font-size in canvas. and then how to make a button to download this canvas?

There is a canvas for the certificate, that is, the name and date are superimposed on the picture. I need another ctx.font for the date and the ability to download this canvas as img

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
dedalqq, 2019-05-17
@dedalqq

You probably don’t need a canvas here, but some kind of work with images. You create an image right on the backend through this lib with the text you need in the right place and different sizes, as well as other elements, and at the output you get an image in the desired format, it shows it in the browser and gives it for download. And canvas, you can only take a screenshot. The browser does not have the necessary tools to convert the canvas to image format.

G
GreatRash, 2019-05-17
@GreatRash

Well, set a different font for the date, what's the problem? Canvas cannot be downloaded, but you can take its pixels and download them.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question