Jump to content

OO Font


L B
 Share

Recommended Posts

In LE3, I'd like to see some Object-Oriented font working, instead of always only current.

 

Example:

DrawText(string text, Font font, int x, int y);

 

I've found it particularly needed when making an interface with multiple components.

I did try to make an OO hack around it with our headers, but it's incredibly slow.

 

(Or even better, with a Vector4 color parameter.)

Link to comment
Share on other sites

+1

 

I agree with this, possibly creating a TFont class where we can set everything (name, size [if possible, it's a pain to do DDS for each font size we need], color, styles [italic/underline/bold even all at once]). The only addition of Vector4 color is not enough for me, since it saves only one line of code.

?? FRANCESCO CROCETTI ??

http://skaredcreations.com

Link to comment
Share on other sites

Why would it be slow? What did the code look like?

In C#:

CustomDrawText(string text, Font font, int x, int y)
{
Font old = Font.Current;
Font.Current = font;
Core.DrawString(text, x, y);
Font.Current = old;
}

 

(P.S.: getting the current font requires .NET headers/the custom engine Dll)

 

I don't know why it's slow, but it ate all my FPS. I was at < 1 FPS.

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...