SpeedText ( Beta )

Blitz3D Forums/Blitz3D Userlibs/SpeedText ( Beta )

ChristianK(Posted 2008) [#1]
What is SpeedText?

SpeedText is a function library which allows loading fonts in Blitz3D and rendering them with maximum speed. The functions provided by SpeedText are much faster than the text functions of Blitz3D. Furthermore SpeedText offers many options for text alignment and formatting.

Features

• Very fast rendering
• Many alignment and formatting options
• Antialiasing ( Standard and ClearType )
• Unicode support ( UTF-8 )
• Render text into any buffer ( BackBuffer, TextureBuffer, ImageBuffer )
• Lock buffers for even more speed

Samples and Documentation

You can find 4 examples in the "samples" folder. The "docs" folder contains a documentation ( English and German ).

Beta-Version

This is a beta version, so there may be still bugs. Additional speed optimizations may also be possible. :)


Download


_33(Posted 2008) [#2]
Nice!

Note, these also exist in fastText, which is pretty popular:

TextRect%(x%,y%,w%,h%,text$,format%,encoding%)
TextBackground(r%,g%,b%)

I removed them and it works fine. The 3 declarations on the blank lib name are more trouble to me than not having them.

I found that rendering direct to the texdture buffer is the nicest feature here. I copied the portion where it render the text to the texture buffer in the main loop, and I still had 60 fps! Nice!




MikhailV(Posted 2008) [#3]
Sometimes MAV. Seldom, do not know why...
Can't load my font - see source file


ChristianK(Posted 2008) [#4]
_33,
Thanks. I will rename the two functions in the next version.

MikhailV,
the filename of the font must be [real name].ttf -> "memory lapses.ttf". I know that you solved it better, but I'm still working on that. ;)
Can you tell me, where the MAV occurs?


MikhailV(Posted 2008) [#5]
MAV after Graphics3D command (on my worker computer. On home comp. all well) :(

>> [real name].ttf
He he :) Take name of the font from TTF-file! Example (PureBasic syntax):



See my FastText library, there no such problem.


ChristianK(Posted 2008) [#6]
Wow. That's it.
Thanks a lot, Mikhail. :)

> MAV after Graphics3D command
SpeedText does not do anything before ST_Initialize ... strange.


MikhailV(Posted 2008) [#7]
Very strange. I was too surprised... Check your source-code!


ChristianK(Posted 2008) [#8]
Sorry, I checked the code again, but returning 1 is the only thing that is done when loading the DLL. What B3D-Version do you use?


MikhailV(Posted 2008) [#9]
Hmm... 1.99