james_lohr's picture

QuickFont

I'd just like to announce the release of QuickFont, a text printing and font generation library: http://www.opentk.com/project/QuickFont

I could only upload 4 images on the project page, so I've uploaded the remaining screenshots here.

Enjoy. :)

James L.

Images

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
migueltk's picture

I like QuickFont, but whenever I look at the picture it seems that something is wrong. I think the problem is that the character of white space is abnormally wide.

What do you think of this?

Miguel

migueltk's picture

I like QuickFont, but whenever I look at the picture it seems that something is wrong. I think the problem is that the character of white space is abnormally wide.

What do you think of this?

Miguel

mastertnt's picture

Agree with you, the white space size seems exagerated.

The library is promising but I looked at the code regarding my problem (Fixed size font), the rendering strategy seems strange for me.

james_lohr's picture

>>Agree with you, the white space size seems exagerated.

If you're referring to the second image, it looks exaggerate because I deliberately messed it up to make kerning more visible. If you're referring to the first image, well it doesn't matter because white-space size is configurable:

myFont.Options.WordSpacing = 0.5f;

Setting word spacing to 1.0f means that a white space will be the size of the mean glyph width. Setting it to 0.5f will mean it will be half the mean glyph width etc.

>>Fixed size font

Currently QuickFont does not support monospace fonts (it will still always measure + kern glyphs irrespective ). Tomorrow I'll add a render option to allow any font to be rendered in monospace mode. :)

james_lohr's picture

[edit]

I'll also set the default white-space size a bit smaller as I think you're right about it being a wee bit too large. :)

mastertnt's picture

There is also a bug with shadow (I am not sure). If the shadow is deactivated, there is a pass for shadow.

migueltk's picture

I would like to recreate the process by which files have been created "woodenFont.qfont" and "woodenFont.png." I understand that the process should be a call to the "QFont.CreateTextureFontFiles (" woodenFont.ttf ", float size," woodenFont ")."

Is this correct? Where I can find the source woodenFont.ttf?

Miguel

puklaus's picture

Nice, I think I will use this library for text printing.
I noticed that you're using GL.Vertex* calls, you really should use VBOs or at least display lists.

james_lohr's picture

Monospacing support has been added. :)

>>There is also a bug with shadow (I am not sure). If the shadow is deactivated, there is a pass for shadow.

Could you explain in more detail please?

>>Is this correct? Where I can find the source woodenFont.ttf?

Pretty much. The ttf comes with the example. It is called "BURNSTOW.TTF"; however, I have no idea what the licencing on the original font is, so I would not recommend using it.

>>I noticed that you're using GL.Vertex* calls, you really should use VBOs or at least display lists.

Yes I should; however some rough calculations showed the performance boost to be negligible when displaying readable amounts of text. Aside from performance, is there any other reason to use VBOs?

mastertnt's picture

>> Monospacing support has been added. :)

Thanks, i will test it :) I've made an hack to manage it but i will take your version, i am sure it is better.

>>There is also a bug with shadow (I am not sure). If the shadow is deactivated, there is a pass for shadow.

If the shadow is disabled, with a breakpoint in the method to render glyphs, the rendering is called twice.

Regards