Question about Font Style

Discuss any general programming issues here
Post Reply
User avatar
Allanon
Posts: 436
Joined: Sun Feb 14, 2010 8:53 pm
Location: Italy
Contact:

Question about Font Style

Post by Allanon » Sat Apr 22, 2017 8:01 pm

Hello guys,

is there a way to get the current font style?

I'm trying to refine a function I've written some time ago to calculate the text width taking into account the Hollywood formatting tags, actually they are stripped out because native TextWidth() calculate, for example, character as they were printable characters.

So my plan is to clean up the string from the tags except the bold one, on the cleaned string I want to parse the bold portions of text and calculate the real text width using SetFontStyle() instead of the .

But when I call this function I need to know what is the current Font Style so I can restore it back at the end of my function.

:)
----------------------------
[Allanon] Fabio Falcucci
AMC - Creative Development // Docs Site // Support Forum
Support me on Patreon for Hollywood libraries!

User avatar
airsoftsoftwair
Posts: 2483
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany
Contact:

Re: Question about Font Style

Post by airsoftsoftwair » Mon Apr 24, 2017 4:32 pm

Hmm, doesn't seem possible. I'll add this for the next update. It doesn't seem possible to get the current form style either so I think this also needs to be implemented.

User avatar
Allanon
Posts: 436
Joined: Sun Feb 14, 2010 8:53 pm
Location: Italy
Contact:

Re: Question about Font Style

Post by Allanon » Tue Apr 25, 2017 8:19 am

Thank you Andreas, I will wait for it :)
----------------------------
[Allanon] Fabio Falcucci
AMC - Creative Development // Docs Site // Support Forum
Support me on Patreon for Hollywood libraries!

User avatar
airsoftsoftwair
Posts: 2483
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany
Contact:

Re: Question about Font Style

Post by airsoftsoftwair » Sat Aug 12, 2017 2:14 pm

Code: Select all

- New: Added several functions to get information about the current style settings: GetFontStyle(),
  GetFontColor(), GetFillStyle(), GetFormStyle(), GetLineWidth(), GetLineJoin(), GetLineCap(),
  GetFillRule() and GetDash()

User avatar
Allanon
Posts: 436
Joined: Sun Feb 14, 2010 8:53 pm
Location: Italy
Contact:

Re: Question about Font Style

Post by Allanon » Sun Aug 13, 2017 4:37 pm

Great!
Thank you!
:D
----------------------------
[Allanon] Fabio Falcucci
AMC - Creative Development // Docs Site // Support Forum
Support me on Patreon for Hollywood libraries!

Post Reply