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

Change font size dynamically

New Here ,
Jan 15, 2019 Jan 15, 2019

Hi, I have created a page using AnimateCC HTML5 canvas with different text fields with different sizes and the page is loaded in html file, i would like to increase font size of total content by 1px when user clicks a button which is placed in main html file. How can i access the text fields and change the font size dynamically.

242
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
LEGEND ,
Jan 15, 2019 Jan 15, 2019

Why not just change the scale?

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
New Here ,
Jan 15, 2019 Jan 15, 2019

Hi, Images will also be part for page, if i use scale, then images will also scale, so i want to change the font size only.

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
LEGEND ,
Jan 15, 2019 Jan 15, 2019
LATEST

vamshik19145210  wrote

Hi, Images will also be part for page, if i use scale, then images will also scale, so i want to change the font size only.

I mean just change the scale of the textfield directly.

this.myTextField.scaleX = 1.1;

this.myTextField.scaleY = 1.1;

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
New Here ,
Jan 15, 2019 Jan 15, 2019

Hi Clay, the reference site link i can share you, User can click on A- &  A+ buttons to increase & decrease the font size. The link is: gov.sg | Home

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