• Advertisement
  • entries
    707
  • comments
    1173
  • views
    434376

Font Engine

Sign in to follow this  

378 views

I got into working on the UI system and I realized that I hadn't finished the font engine. So, I went back and started finishing that up. I reorganized a bunch of it, fixed a few errors, and added some functionality. One of the big things I added was built in support for scrolling. I might end up putting it elsewhere, but it'll be useful for now. I still need some more functionality for string formatting, but I'll get to that later.

Here's a couple screenshots:

This shows rendering 9 strings. The first is in the bottom right corner, rendered with just supplying a point. The white boxes show the visible bounds of the output and the green box shows the "canvas" area. This is what is used for scrolling, alignment, and other formatting. So, with the first box, it would run to the end of the screen and wrap back around to the white box. The second string is the top left; a simple operation using a box. It basically just wraps to the width and continues until it goes off the bottom of the bounds (I forgot this part in the code lol. It just continues until it's finished rendering the string ATM.)

The rest of the boxes show the possible alignments - top + left, top + horizontal center, left + vertical center, vertical center + horizontal center, top + right, bottom + left, and bottom + right.


This one shows some scrolling on the ones that share the same string. Note that the white boxes haven't moved, the green boxes have. Nothing fancy, just rendering using formatting and an offset.


Last but not least, I've turned clipping back on, made my background visible again, and changed the border color and background color (note that these borders and backgrounds are just for testing; they're not built into the font engine.)

Back to UI stuff tomorrow after work...as long as I can stay away from Fable 3, Fallout: New Vegas, and WoW. Gnight Journal Land!

[edit]
I have to point out that I've shown restraint. I have yet to add any kind of inline coloring formatting yet. YET.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement