Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9227063
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T04:58:41+00:00 2026-06-18T04:58:41+00:00

I am trying to add text on a canvas using kinetic JS library. Kinetic

  • 0

I am trying to add text on a canvas using kinetic JS library. Kinetic JS Provides the setFontStyle() method to support the styles on fonts.

http://kineticjs.com/docs/symbols/Kinetic.Text.php#setFontStyle

According to the documentation It supports ‘normal’, ‘italic’, or ‘bold’.
But what I do if I want to apply bold and Italic at once. Also I want to underline the text. How I can do in kinetic JS.

Isn’t there anyone to tell me :'(

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T04:58:42+00:00Added an answer on June 18, 2026 at 4:58 am

    Like EliteOctagon already mentioned, KineticJS does not support underlining text yet. This is mainly due to the fact that text-decoration (including underlining) isn’t supported in the html canvas element.

    To add (multiple) font styles, is relatively easy.
    The most recommended way is by defining it at the initiation, like this:

    var text = new Kinetic.Text({
        x: 0,
        y: 0,
        fontSize: 20,
        fontStyle: 'bold italic'
        fill: 'black',
    });
    

    If you need to set the font style differently at another time then initiation, you can use the method setFontStyle() like you mentioned. For instance like this:

    var text = new Kinetic.Text();
    text.setFontStyle('bold italic');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying yo add text to the editor using some buttons, So actualy I've
I'm using Sonata admin on Symfony 2.1.3 . Now trying to add text input
I am trying to use canvas.create_text(...) to add text to a drawing. I have
I using codeigniter to trying add text in routes.php , What I want to
I am trying to add text into a hidden text box in the div
I'm trying to add text input's element to my array when user pressed enter
I 'm trying to add text on a specific image. Its working perfectly but
I'm trying to add text to textarea in current pointer position, here's the code
Im trying to add the text contained inside an <li> element when the user
I am trying to add full text search capabilities to my RoR app, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.