Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

HTML5 Canvas and local font

Community Beginner ,
Jul 29, 2023 Jul 29, 2023

Hello, I have created a HTML5 Canvas Banner and used a custom local font. Now I was looking for a solution to embed the font. I would just put it in the HTML code.

 

But I noticed that the font is also displayed like this on machines where the font is not installed. The font is not in paths. How can this be? Does Animate do the embedding automatically and I don't have to do anything?

976
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert ,
Jul 29, 2023 Jul 29, 2023
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 29, 2023 Jul 29, 2023

Ok, thanks. That was super helpful!

Two more questions about this:

1. is it not possible to set the letter spacing for dynamic text?

2. is there no setting for capital letters in Animate?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 29, 2023 Jul 29, 2023

letterspacing in canvas, no.  you need to create your own "component".

 

what do you mean be a setting for capital letters?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 29, 2023 Jul 29, 2023

I mean that you can set the text to be written in uppercase.

What do you mean by create your own component?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 29, 2023 Jul 29, 2023

you can use to UpperCase() for any string.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 29, 2023 Jul 29, 2023

so as script? Sorry i am beginner

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 29, 2023 Jul 29, 2023

this.yourtextfield.text=whatever.toUpperCase()

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 29, 2023 Jul 29, 2023

Ok, thank you so much, perfect!

Just one more question: you wrote this: letterspacing in canvas, no. you need to create your own "component".
What exactly do you mean by your own component?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 30, 2023 Jul 30, 2023
LATEST

that's a topic for advanced coders.  ie, it can be done because letterSpacing is a javascript property (of style), but it requires some coding expertise.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines