Can i custom style text inside canvas?

i make an apps that taking picture from camera. then after camera take there a canvas that load the image from taked photos.
i want to add my custom style text by automatically inside the image, can i do that?

RIght now the text still black

You mean your own font?

1 Like

Hi, there are some properties you can use , to set the canvas text style :wink:

You can set text custom font using this property:
image

You can change the paint color , the text will be changed also :

For changing text font size:
image
You can check all of the canvas properties here :
https://docs.kodular.io/components/drawing-and-animation/canvas/

2 Likes

yes, i want to make the text inside the canvas have style not black text as default.
ex : background gray, with 15px font size and font color to yellow or something like that

If by style you mean changing the font face, size, angle and color, then yes you can do that.
Any more than that, not directly. You will have to build your custom procedure or extension to do anything else.
Like this procedure I made once for drawing the outline of the text in canvas: http://ai2.appinventor.mit.edu/?galleryId=6673426826395648

2 Likes

yes i have try this, Font color and font size its success to moderating
but how about the background?
i try change it but nothing happen
blocks (1)

The background color property’d change the background color of the canvas , and not the text.And as you add an image as your canvas background , you can’t set a background color for it.

ohh i forgot about this one, any solution for this?
i try using a labeltext to call global custom_text, then i set text value to global

then i call the label inside the canvas as text, if i add background color on the label, does it make an effect?

You only can set the text color using the paint color property, but probably a procedure can do this.

ok thanks for helping me, atleast can change the font size with color first. background text color just for bonus

anyway, can i store the canvas as image on firebase or mysql?

1 Like

Yes you can, but you should open a new topic for this :wink:

ok, ill do that, thanks for your help

1 Like

To change the background color and see the change, you have to clear the canvas. If you don’t do that the color will keep being the previous one.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.