[SOLVED] HtmlCanvas: bold text?

Please post public support tickets here. Note: for private support tickets, please send an email to support@cshtml5.com instead.
Rourke
Posts: 11
Joined: Mon Jun 06, 2016 7:26 pm

[SOLVED] HtmlCanvas: bold text?

Postby Rourke » Thu Sep 12, 2019 8:42 pm

It seems like the suggested JavaScript Font string format for HtmlCanvas TextElements such as "bold 14px Arial" only actually sets the Font Family. I can set the height using FontHeight, but nothing seems to work for bold or "700". Please let me know

Rourke
Posts: 11
Joined: Mon Jun 06, 2016 7:26 pm

Re: HtmlCanvas: bold text?

Postby Rourke » Wed Sep 25, 2019 4:09 am

I've written a solution to this issue by adding FontWeight to TextElement. I've used git with small teams before, but not github on an open-source project like this. What is your procedure for me to upload the fix?

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

Re: HtmlCanvas: bold text?

Postby JS-Support @Userware » Wed Sep 25, 2019 4:13 am

Thanks. Please create a GutHub account, then create a fork of the CSHTML5 repository by clicking the "fork" button on GitHub, then clone the fork on your local computer, make the change, commit and push, and the create a Pull Request by following the tutorial at:
https://help.github.com/en/articles/creating-a-pull-request-from-a-fork
Thanks!

Rourke
Posts: 11
Joined: Mon Jun 06, 2016 7:26 pm

Re: HtmlCanvas: bold text?

Postby Rourke » Wed Sep 25, 2019 9:10 pm

Thank you!

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

Re: [SOLVED] HtmlCanvas: bold text?

Postby JS-Support @Userware » Wed Oct 02, 2019 9:30 am

The pull request has just been merged. The fix is now available on NuGet.org (version "2.0.0-alpha48-067").

Thank you for your contribution!


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 1 guest