Ultra FastText for Blitz3D (+Unicode)

Blitz3D Forums/Blitz3D Userlibs/Ultra FastText for Blitz3D (+Unicode)

MixailV(Posted 2007) [#1]
Ultra fast library for work with text and fonts (TrueType, OpenType and etc.) in the Blitz3D 1.98 ONLY.

Features:
- Drawing text quicker ~50x-70x once than Blitz3D
- New types of the text aligning
- Drawing text with antialising
- Unicode (UTF-8) support (wait new release IDEal or use Notepad)
- Support old ASCII mode
- Replace old text-functions in Blitz3D by one include

See also topics about support Unicode in IDEal:
http://fungamesfactory.com/forum/index.php?topic=14.0
http://fungamesfactory.com/forum/index.php?topic=24.0


Download: FastText 1.21 (98 Kb)


Wayne(Posted 2007) [#2]
Thats really sweet !


Naughty Alien(Posted 2007) [#3]
..this is very cool...I'm going to use this


Pinete(Posted 2007) [#4]
MixailV,
this is absolutely amazing!!!!!
absolutely incredible!!!!
works perfectly on my computers (XP sp2), 6600GT, 7900GS, 9800XT and 6800.
Thanks a lot for sharing this marvelous library! it was something really needed during ages for the blitz community!!
By the way, just two more things:

- Could you please put the last version of the old lib (FastImageLib) I've seen that you've quit and should be great to have the latest stable version of Fastimage lib for download... I've the previous one (almost the final), it works perfectly but I would like to have the last because I read it fixed a bug... I will be very glad.

- Could you talk a little more about the process, for example, of traslating a game? How should be the better way to do it? for example to russian and chinesse?

Thanks again for this lib.

All the best!


Pinete(Posted 2007) [#5]
sorry,
I've just seen that the old version is still available for downloading...
;)
again, thanks a lot for sharing!!

all the best!


MixailV(Posted 2007) [#6]
Mini update, see 1st post :)

; v1.1
; - TextRect function added (+example) - very useful function!!!


MixailV(Posted 2007) [#7]
to Pinete:
FastImage 1.433 - is latest version without bugs! I do not understand...


Filax(Posted 2007) [#8]
Why don't merge Fast image lib and Fast Text lib into one ? :)

Very good job MixailV :) You are a very good blitz killer :)


MixailV(Posted 2007) [#9]
to Pinete:

... little more about the process, for example, of traslating a game ...


I not professional in localizations of applications. Think better to get this information from other peoples.

to Filax:

Why don't merge Fast image lib and Fast Text lib into one ? :)


I consider that unnecessary this does. If bugs will are found in library, me will more simply their fix !


... good blitz killer


:) I'm not killer, may be I prolong life a Blitz :)))


John Blackledge(Posted 2007) [#10]
Thanks, MixailV. Absolutely stunning work!
Now I've just got to replace all the text code in my projects with this.


Pinete(Posted 2007) [#11]
MixailV,
I didn't see the old post about Fastimage, and I guess that you've substituted by the new library!! :P
;)
next time I'll see much better!

I've just download v1.433!!
Thanks a lot Mixail! and sorry for my bad eyes!
:)

Best regards!


John Blackledge(Posted 2007) [#12]
Mixail - I would only ask one more thing.
As part of the FastText library could you also create a fast Rect(x,y,w,h,solid) command (which I personally use a lot behind text). That would make it perfect.
Thanks.


MixailV(Posted 2007) [#13]
to John Backledge:
Sorry. Quick drawing the Rect is already created in FastImage library (DrawRect function), me not to want once again to write much codes...
Please use FastImage (20 Kb small will enlarge size of your application)


John Blackledge(Posted 2007) [#14]
Excellent - I didn't realise.
Thanks, I'll look into that.


mongia2(Posted 2007) [#15]
wowwww!!!
it is fast and simple!
i use it for unicode font!!!
thanks!!!
mongia


Barliesque(Posted 2007) [#16]
re: version 1.1

Running "FastText_SpeedTest_BlitzText_VS_FastText.bb"

FastText: 180 msec
BlitzText: 68 msec

FastImage runs extremely fast, but for some reason I'm not seeing the same results here. Presumably others are seeing different results from this test?

On a different note, this is another terrific library for ease of use alone! Good to finally have Unicode support as well.

My specs: Core 2 Duo, 1GB RAM, ATI Radeon X1650 256MB, DirectX 9.0c, WinXP Home SP2


MixailV(Posted 2007) [#17]
FastText: 2-3 msec
BlitzText: 148-152 msec
on my Athlon 2000+ and Radeon 9600


John Blackledge(Posted 2007) [#18]
FastText: 5 msec
BlitzText: 89 msec
Pentium 4 (1.6) GeForce 4 Ti4200


Pinete(Posted 2007) [#19]
FastText: 16-17 msec
BlitzText: 137-140 msec
on my Pentium 4 3.0 and 6600GT

:)
regards!


Boiled Sweets(Posted 2007) [#20]
Does this rebuild the mesh every time the text is changed? i.e. is it fast enough for stat displays that might change every frame?


John Blackledge(Posted 2007) [#21]
Boiled, as far as I can tell he he's not using a mesh at all, but writing directly to the draw surface using a faster method than Blitz, so changing stats every frame shouldn't be a problem.


Boiled Sweets(Posted 2007) [#22]
WOAH!!!!!!!! COOL!


MixailV(Posted 2007) [#23]
This library is founded on GDI completely and does not use Direct3D. Drawing the text is done absolutely also as in Blitz3D - only in Blitz this foolishly realized - he when drawing of each string creates font in OS but after drawing destroys :)

p.s. FastImage uses Direct3D...


Barliesque(Posted 2007) [#24]
I've updated my graphics drivers, with almost no change. I think we all hope to use this library for projects to be distributed to the world at large, so I hope that this problem can be resolved for my configuration.

Are there any tests you'd like me to run?


ZJP(Posted 2007) [#25]
FastText: 1-2 msec
BlitzText: 69-71 msec
on my AMD A64 3400+ and Radeon 9600Pro.

Very Very good job. Thx

JP


Boiled Sweets(Posted 2007) [#26]
I get 30 on both!


John Blackledge(Posted 2007) [#27]
@Boiled: how can you get 30 on both?
Even on my ultra slow machine (see above) there's a massive difference.

@Barliesque: Well, I'm stumped; since most of us are seeing a significant improvement. Mixhail, any ideas?


Barliesque(Posted 2007) [#28]
Why's it always gotta be me?! What did I do? ...Still, I'd rather be the bearer of bad news than for us all to be unaware of an issue our future customers might bring forward.

Boiled must have either a super-fast machine, or a video card that can blend 2D and 3D with none of the typical slowdown--not that I knew such a thing existed.


Boiled Sweets(Posted 2007) [#29]
It's a laptop - Inspiron 640M T2300@..., 980 Mhz, 0.99GB RAM with a Mobile Intel 945GM express card.

That's what I do all my development on.


ToM C.(Posted 2007) [#30]
Hi MixailV ,
great job again!!!
What's about alpha blending the Text like it was possible in fastImage.dll
It is still possible?


Boiled Sweets(Posted 2007) [#31]
Also how about allowing the text background colour to be set?


MixailV(Posted 2007) [#32]
UPDATE !!! See 1st post.

v1.2
- now name of the font and name of the font-file can be different ( for LoadFont function )
- new function TextBackground, see example of the use - FastText_Example.bb


What's about alpha blending ...


OS Windows GDI don't support alpha for text... :( Use FastImage font and text.


... text background colour


Yes, download new version.


John Blackledge(Posted 2007) [#33]
Arrgghh!! 404 in the first post link.
Nooooooooo.
Please fix - eager to see this.


MixailV(Posted 2007) [#34]
Fixed :)


popcade(Posted 2007) [#35]
Hi,

the v 1.2 works pretty well, just one little thing for Chinese.

I get a 90' rotated font with load TTF font, like this pic:



I have include the cyan text as expected result (made in PhotoShop)

This is the required code/font:
http://bugdie.org/_tmp/MSHeiTTF.zip
http://bugdie.org/_tmp/MSHeiTTF_FT.txt (UTF-8 with BOM for easy reading)

It seems Chinese fonts are not regulated, or have weird format.for example, "MS Hei" is the original, "@MS Hei" is 90' rotated.


MixailV(Posted 2007) [#36]
ok, try to correct this...


John Blackledge(Posted 2007) [#37]
Works perfectly for me.
Mixhail many thanks for such a comprehensive library.
I'm beginnig to think that FastText+FastImage means that there is really no point to using mesh-based text or huds.


Boiled Sweets(Posted 2007) [#38]
Mixhal,

you ROCK!


t3K|Mac(Posted 2007) [#39]
i am going to check fastimage out too. i already did my complete hud using meshbased stuff... if you lib is fast enough, i think blackledge is right. no more need for meshing/messing around.


Boiled Sweets(Posted 2007) [#40]
HOLY COW!

Just done a test on my main machine (Radeon X1600 PRO) and I get...

Blitz = 109 millisecs (basically ground to a halt)
FastText = 1 millisec (SUPER FAST!!!!!!!!!!!!!!!!)

WOAH!!!!!!!!!!!!


John Blackledge(Posted 2007) [#41]
@Boiled: so what do you think was happening on the other machine?


Boiled Sweets(Posted 2007) [#42]
I have no idea. Um, rerun it and its...

FastText = 7 (FAST!!!!!!!!)
Blitz = 57 (VERY SLUGGISH)

So thats good.

I really wish someone could tidy up the documentation. The library is SOOOOOOOO GOOOOOOOOD but the docs let it down :-(


John Blackledge(Posted 2007) [#43]
What docs?


Boiled Sweets(Posted 2007) [#44]
the help files...


Leto(Posted 2007) [#45]
Looks brilliant and gives me renewed hope for my project.

Is there some way this could do text outline too? e.g. white text with black outline. That would be fantastic.


John Blackledge(Posted 2007) [#46]
@Leto:
(Blitz code style)

Function JSurroundText(x1,y1, txt$, tr,tg,tb, sr,sg,sb, flag1,flag2)
Local size= 1
Color sr,sg,sb
Text x1-size,y1-size,Txt$,flag1,flag2
Text x1+size,y1-size,Txt$,flag1,flag2
Text x1-size,y1+size,Txt$,flag1,flag2
Text x1+size,y1+size,Txt$,flag1,flag2
Color tr,tg,tb
Text x1,y1,Txt$,flag1,flag2
End Function


Barliesque(Posted 2007) [#47]
Sadly, no change to report here. :(

@MixailV: Do you have any ideas how to overcome this problem? Any tests you'd like me to run?


MixailV(Posted 2007) [#48]
to Barliesque:
Much strange, Blitz draws text through ExtTextOut - my library also! Library must work quicker than Blitz. Do not know what test it...


MixailV(Posted 2007) [#49]
to Yoko:
I can not turn each letter separately. :(

Each symbol in the MSHei font is already rotated on to -90 degrees. I see here is this:


I can mistaken, but word on chinese write from top to bottom. Use ANGLE=90 param in function LoadFont, and text will drawing it is correct!
LoadFont(name$, height, bold, italic, underline, ANGLE#, encoding=FT_UNICODE)

If you want to draw text left-to-right, that draw each symbol apart... (with font, rotated on to 90 degree)


Trixx(Posted 2007) [#50]
Again, excellent work MixailV !!!

By the way, new Unicode test build of IDEal is available :
http://fungamesfactory.com/forum/index.php?topic=24.0
@Everyone: FastText is the only library that I know of that supports unicode UTF-8, so if you're using unicode in IDEal, please report any bugs so I can make it stable release.


DJWoodgate(Posted 2007) [#51]
Very impressive. 3-4msec versus 83msec on my laptop with an old mobility radeon`


popcade(Posted 2007) [#52]
Thanks MixaliV, I'll try to work it out.

Most CJK fonts are 90' rotated, and many are incomptable with standard, so it need other workouts, thanks very much.

You are right, as I thinnk it's some problem related with Windows handling the font, for example:

1.UnicodeFont0=LoadFont("media\mshei.ttf",25)
Works, but 90' rotated.

2.UnicodeFont0=LoadFont("MS Hei",25)
Can't work, system displays default font, so font it's not loaded.

2.UnicodeFont0=LoadFont("@MS Hei",25)
Works, but 90' rotated.

Anyway thanks for this GREAT library. very powerful and useful.


Barliesque(Posted 2007) [#53]
@MixailV
You must be doing something different from Blitz3D, otherwise it would be just the same speed. So maybe it is to do with how the text is applied over the scene?

Maybe if you can have the library save timing information at various stages in your code, it would at least confirm where the problem is happening. I can let you know what info is saved.

Of course you don't want this test to slow things down itself, so just store msec's for each test-point in memory, and then when I press a key on the keyboard, save the stored values to a file.


ksalomao(Posted 2007) [#54]
Great library. I loved it.
I cannot compile the final exe. The exe always say "user lib not found". I cannot even compile the exe of the exemples: "user lib not found". Of course the FastText.dll was in the same dir. In the IDE it compiles ok.
I don't know what is the problem.

I also noticed that you must always call RenderWorld or Cls, otherwise the text is not displayed.
you can't just do:
;3d stuff
RendeWorld
;Text stuff
flip
;more text
flip

any way I will use fasttext a lot.
thanks.


MixailV(Posted 2007) [#55]
to Barliesque:

Blitz does so:

BlitzProcedure LoadFont(fontname, ...)
	;save fontname and other params to local blitz-font-object
	BlitzFont\fontname = fontname
	BlitzFont\... = ...
EndProcedure

BlitzProcedure Text(x,y,text, ...)
	...
	res=AddFontResource ( BlitzFont\fontname )	;add font to OS (resource)
	id=CreateFont ( ... , BlitzFont\fontname )	;create font for drawing
	SelectObject ( hDC, id )			;select font
	ExtTextOut ( hDC, ... , text )			;DRAW TEXT
	RemoveFontResource (res)			;remove font from OS
	...
EndProcedure

My library does so:

MyProcedure LoadFont(fontname, ...)
	...
	res=AddFontResource ( BlitzFont\fontname )	;add font to OS (resource)
	id=CreateFont ( ... , BlitzFont\fontname )	;create font for drawing
	; save ID to my local structure
	...
EndProcedure

MyProcedure Text(x,y,text, ...)
	...
	SelectObject ( hDC, current_ID )			;select font
	ExtTextOut ( hDC, ... , text )			;DRAW TEXT
	...
EndProcedure


FastText must work quicker than Blitz... Hmm...


MixailV(Posted 2007) [#56]
to Ksalomao:

I cannot compile the final exe.


Strange, compilation in my Blitz occurs successfully. I have once again checked it.
May be a version of your Blitz (compiler) not 1.98 ?


John Blackledge(Posted 2007) [#57]
@MixailV:
Nice, obvious and simple explanation. Thanks.
As you say, to create the font every time a piece of text is needed... well, I just laughed.

@Ksalomao:
Check out MixailV's demos carefully.
Then adapt your own code.


Barliesque(Posted 2007) [#58]
WHOAH!!!

I've made some kind of break-through. Maybe the problem is in the loading of the font? I tried changing what font is being loaded, and I end up with some very strange results...



(This screenshots have not been re-sized at all)


Barliesque(Posted 2007) [#59]
Here's another font selection that renders correctly in both, but still not quickly in FastText...



(Note that I just changed the font size--the screenshot is again not resized)

Confusing, no? :S


John Blackledge(Posted 2007) [#60]
Hang on - if your LoadFont params say "media\fontname.etc" then the code will try to load the font from FastText's "media" folder.

If you _don't_ specify a folder "fontname.etc" then Windows will try to provide the font from it's default Windows\Fonts\ folder, and will probably substitute a default if the one you ask for isn't there.

This may go some way to explaining the differences in your examples.

Anyway, FastText does not use a method like the one you show: SetFont_ LoadFont_ () etc.
You really do not want to load the font every time you set it - this is what Mixhail was saying that Blitz does, which is why it's so slow.
See the "FastText_Example.bb" for the correct method.


Barliesque(Posted 2007) [#61]
Hang on - if your LoadFont params say "media\fontname.etc" then the code will try to load the font from FastText's "media" folder.


I'm well aware of that. All of the tested fonts above, apart from Selfish are installed on my machine. Selfish.ttf is in FastText's media folder.

Anyway, FastText does not use a method like the one you show: SetFont_ LoadFont_ () etc.

That's the original demo--the speed test--not my own code. All I've changed is the selection of font.


MixailV(Posted 2007) [#62]
to Barliesque:
I have understood where problem. Adjusting the smoothing of the font in your Windows - ClearType. Your videocard (+ OS) slowly draws ClearType-antialised fonts! I am add new param in LoadFont-func to possible was draw without antialising (smoothing)... And then all will quickly...


MixailV(Posted 2007) [#63]
Small update!
Special for Barliesque ;) (try once again SpeedTest)

Download new version 1.21 from 1st post...

; v1.21
; - available support all antialising modes of the font; (new parameter is added in function LoadFont, refer to in detail in example)
; + new example FastText_Example_Antialising.bb
; - also changed exmaple FastText_SpeedTest_BlitzText_VS_FastText.bb (non antialised mode also as in Blitz3D)


popcade(Posted 2007) [#64]
This information should help, as I did some test with the "MS Hei" font

1. Install the MS Hei font by dragging it to Windows Fonts folder.

2.You can get the font name in PhotoShop etc as "MS Hei" and one with a @ sybol called "@MS Hei", both should work and displays correctly.

3.With this code piece while using FastImage
http://bugdie.org/_tmp/MSHeiTTF_FT2.txt

4.This is the result


It's strange , but the "MS Hei" wa not successfully loaded, but it did exist, however, "@MS Hei" works correctly.

This is wierd, both are same string, or something wrong with my system?


Barliesque(Posted 2007) [#65]
Hooray!!! Success at last! Excellent work MixailV!

You're absolutely right--I had ClearType smoothing turned on in Windows Display Properties. It makes a big difference to a lot of applications--but for FastText the standard anti-aliasing is just as good.

Thank you, MixailV. :)


Barliesque(Posted 2007) [#66]
Anti-aliasing does still take some processing power. However, I've just been reading about "Ultra-Pixel Fonts" or "Super Pixel Fonts" ...which are bitmap fonts that contain pre-calculated anti-aliasing for one font size. Are you familiar with these? And would it be possible to support them? I suppose the next question is how to create an Ultra-Pixel Font from a TrueType font..... Is this a can of worms?


John Blackledge(Posted 2007) [#67]
Strangely, I get no antialiasing on any of the demo fonts - I guess that must be down to my drivers/card (?)

Still, nice work Mixhail - good to kow we can definitely switch off antialiasing for slower machines.


Barton(Posted 2007) [#68]
great work !!!

very very thanks !!


Barliesque(Posted 2007) [#69]
@John Blackledge
Have you tried turning on text smoothing in Windows? Right click on the desktop and click Properties, to bring up Display Properties. Click on the "Appearance" tab, then click the "Effects..." button. Is the text smoothing option enabled? ...and which method is selected?


John Blackledge(Posted 2007) [#70]
Hi Barli, Font Smoothing is ticked, and set to Standard. I've never touched this. That's why I say that it's probably still up to the drivers/card what actually happens.


Barliesque(Posted 2007) [#71]
Is anti-aliasing of text handled by the video card? That would make sense. Guess you're right about that. Have you tried updating your video driver?


John Blackledge(Posted 2007) [#72]
Yes - latest drivers.
I'm personally not bothered about font-smoothing.
But I would like to see AnitAliasing properly implemented across the board on all graphics cards; my last one did it, this one doesn't.
It would be nice to have e.g. characters in a 3D app whose sholders slope properly, and dont go down like steps.


lo-tekk(Posted 2007) [#73]
With an old Win ME Installation, i got the same problem as Ksalomao: userlib not found. It's the latest Blitz version and the decls and dll were placed properly. Any Ideas ?


Barliesque(Posted 2007) [#74]
I'm personally not bothered about font-smoothing.
But I would like to see AnitAliasing properly implemented across the board on all graphics cards; my last one did it, this one doesn't.


My understanding is that "Font Smoothing" is just another term for anti-aliasing.

Yes, I also hope anti-aliasing can be implemented for all machines, for the sake of this library being viable for commercial apps. Mind you, anti-aliasing takes a toll on performance. Depending on the font, it can be quite significant. Chances are, the best solution for in-game graphics will still be to create a bitmap font and put it up with FastImage. Either that, or use a font that has very simple lines, not loads of detail. ...or maybe it'd be possible to create a bitmap font within your code, with FastText...?


cYB0rG(Posted 2007) [#75]
apparently, it doesn't take care of the "origin" command.
Is there a way to fix it ?
Anyway, great lib MixailV !


MixailV(Posted 2007) [#76]
>> Is there a way to fix it ?
May be... ;)


Shifty Geezer(Posted 2007) [#77]
This is just the most amazing lib, along with the fast image lib, to come to B3D in ages. I spend so much time trying to get decent UIs running, and this solves it in a doddle with the visual class professional software needs.

I can't thank you enough!


Shifty Geezer(Posted 2007) [#78]
Here's a heads-up advice for users of this lib (and fonts in general). When you use fonts in creating bitmap screens and logos and UI widgets, you're generally not violating copyright (depending on if the font is commercial and needs a license or not). But the moment you start packaging and distributing the font file with your Blitz application, you're in a heap of trouble! Font's aren't allowed to be redistributed in the main. Even free ones normally aren't allowed to be redistributed in a package that costs anything.

So you have this lovely vector font drawing library, producing excellent quality effects, and you have lots of fonts to use with it...but you're not allowed :(

The only solution I can think of is the usual 'make your own'! Thankfully there's a couple tools out there that make this pretty painless, depending on how complex you want your fonts to be, by creating vector fonts from bitmap images; the freeware FontForge, and the professional but not too pricey FontCreator. This means as long as you're capable of writing letters (and scanning them in via a scanner or digital camera), you're capable of creating your own fonts to use.

I haven't tried FontForge as, like so much open source freebies, it's a confusing mess to download and install, needing all sorts of ancillary applications to do the job. I have just tried FontCreator, which for the 30 days trial period is fully functional! It's a bit time consuming, but it's a doddle to scan in characters into a paint package, cut out the characters and save them as files, and then load and process these letter by letter. The end result even for a first attempt looks fantastic!

Conclusion :
If you're intending to use Fast Text and distribute font files, remember unless you own the font, you need permission. If you plan ahead, you can grab FontCreator and use it for free for 30 days, where you can create a load of fonts of your own, free to do what you want with.


Barliesque(Posted 2007) [#79]
There shouldn't be any problem with this as long as your font file (royalty free or otherwise) is placed in an encrypted media pack that only your program can access.

Check here for possible solutions:
http://www.blitzbasic.com/toolbox/toolbox.php?cat=10
http://www.amt-lab.com/index.php?page=paprew
http://www.molebox.com/


Mesh(Posted 2007) [#80]
Best lib! Thx!


Shifty Geezer(Posted 2007) [#81]
Barliesque - Interesting point, and useful links too!

MixailV - Is it possible to use/add font kerning? Certain letter combos like 'AW' look pretty rubbish without it!


GrumpyOldMan(Posted 2007) [#82]
Hi

Both the links for FastImage and FastText are broken, are they available anywhere else?

Cheers

GrumpyOldMan


John Blackledge(Posted 2007) [#83]
Both now available here:
(Sorry - link broken for 5 mins. OK now. Try again)

http://www.tla.2bhosting.co.uk/download.htm


Abrexxes(Posted 2007) [#84]
wow, excellent docu.


MadMunky(Posted 2007) [#85]
I get the same as some people here: "User lib not found", when running my compiled code. I got B3D 1.98, WinXP... no big deal I would say.

But overall, it's a great lib!


_33(Posted 2007) [#86]
MadMunky, is the DLL in the save directory as your compiled program when you have that "User lib not found" error?


MadMunky(Posted 2007) [#87]
u were too fast _33 .. indeed i made a basic mistake here. but thanks for the reaction. :D
Though compiling+running and all is working now, I found another strange thing. Some of my custom truetype fonts arent showing anymore. Instead it shows some older font it regularily loaded (from another bb program even). Any tips here?


MadMunky(Posted 2007) [#88]
I might found the (somewhat strange) reason. Whenever I install a certain font in my windows\fonts folder, it's unreadable in blitz. I removed all used fonts so its only reading the embedded. But now it's still only working for a selection of fonts.


_33(Posted 2007) [#89]
I'd suggest putting the needed fonts in a font directory and loading them from there. I suspect there are issues by dealing directly with the font directory of windows. I had the same problems as you state. Font names are tricky sometimes. Try to put the full name and extension when you load a font, to make sure it finds it. Even more, look at the name of the font by double clicking it, and try that full name if you have problems. Depending on the format of the font, sometimes in windows/fonts, the management of those prefer the name inside the font file as windows picks it.

It's a little hellish with the font names. I dropped supporting TTFs and so on, and prefer making my own bitmap fonts. In that case, I don't have to worry about copyright of the font, I can multicolor it and tweak it in any paint program, I can use it as tiles in a game, or as 2D/3D text, depending on how I read the bitmap...

ANyhow, hope this info helps.

Cheers.


MadMunky(Posted 2007) [#90]
All true.
The fonts I used for my game however, were indeed in a font directory inside my game folder. It all worked before I found out about this lovely gem.
Though, I downloaded a totally new bunch of - I believe they are free and made by all those generous hobbyists like us - fonts. And they seem to work. Maybe the fonts I use were more or less corrupt anyway.


Shifty Geezer(Posted 2007) [#91]
I've had fonts not load properly. I think it's a bug in Windows handling of fonts or somesuch. I'd be working on a font in FontCreator and load it with a font manager. After doing this a few times Blitz wouldn't load the font. Resetting the PC fixed the problem. At the moment I've had no problems with Blitz starting and fonts not being loaded properly. The only time I have issues it's when I've been messing around with loading and unloading fonts into Windows.


John Blackledge(Posted 2007) [#92]
I found that I always had to use absolute paths and filenames to my fonts, not just 'Fonts\Myfont.ttf'.
Also, if Windows already has a font of the same name then Blitz/Windows will say 'Nah, I've already got one of those, I'm ignoring yours.'


(tu) ENAY(Posted 2007) [#93]
The "Download: FastText 1.21 (98 Kb)" is broken.

I just get a 5kb corrupted file :(


big10p(Posted 2007) [#94]
The guy got banned so prolly took his ball home with him.


(tu) ENAY(Posted 2007) [#95]
Bugger! Can anyone who already has this spare 98kb of their bandwidth for me? :)

[edit] I found it here

http://www.blitzbasic.com/Community/posts.php?topic=66995#783866

Thanks for whoever is hosting that!


John Blackledge(Posted 2007) [#96]
My link is still ok:
www.tla.2bhosting.co.uk/download.htm


MadMunky(Posted 2007) [#97]
Too bad he left :(
There are still some minor buggies that makes this unusable in my game. It doesnt support all fonts, and not more than around 8.


(tu) ENAY(Posted 2007) [#98]
What fonts doesn't it not support? What are the bugs? :)


Nack(Posted 2007) [#99]
This lib seems pretty useful. From what I read, I can use this in commerical IF i dont include the fonts rite? And is there anyone to reach the author?


Pinete(Posted 2007) [#100]
some idea about the malfunction with last update (beta2) of Blitz3D??
if you include this lib and compile with beta2 of v1.99 it reports the runtime error message "user lib not found"..


regards!


(tu) ENAY(Posted 2007) [#101]
Yep you're right, this library is sadly now broken, I guess we've got to stick with v1.98 for now.


MadMunky(Posted 2007) [#102]
I guess it's time that someone start working on a new version of FastText ;)


John Blackledge(Posted 2007) [#103]
As I said in another thread I get the impression from these forums that there are an awful lot of people using FastText (and FastImage), so that's an awaful lot of people who will be sticking with 1.98.


big10p(Posted 2007) [#104]
I haven't looked into FastText/FastImage so how are they able to do things so much faster than blitz? How hard would it be to incorporate this functionality into Blitz3D, itself? Surely that would be the best solution?!


John Blackledge(Posted 2007) [#105]
Eek. Someone else really needs to explain this.

But apparently there's this thing called a 'draw surface' which FastText hooks into and uses, but Blitz doesn't.
The draw surface is apparently a standard feature of Windows, and is incredibly fast. I think this is because the 3D part of the graphics card is not asked to do it (as such), since most of them only offer a cursory support of 2D.

We really need one of the Win32 guys to explain this.


chwaga(Posted 2007) [#106]
I'm getting a 404 on the download link...


John Blackledge(Posted 2007) [#107]
Try this:
http://www.tla.2bhosting.co.uk/download.htm


chwaga(Posted 2007) [#108]
thanks


Boiled Sweets(Posted 2007) [#109]
Just wondering if there will ever be support for 1.99 when it finally arrives?

I hope so as FastImage / FastText are pretty cool.

OR...

MARK! How about souping up the text / image routines in the B3D to work the same way as Fast Image / Text.

PLEASE!!!!!!


MadMunky(Posted 2007) [#110]
/signing Boiled Sweets' last post :)


_33(Posted 2007) [#111]
MARK! How about souping up the text / image routines in the B3D to work the same way as Fast Image / Text.

+1 here


John Blackledge(Posted 2007) [#112]
And another voter here.


Pinete(Posted 2007) [#113]
my vote too..


Shifty Geezer(Posted 2007) [#114]
FastText is great when it works, but is proving buggy in loading texts. It sometimes loads the wrong font.

I would pay for a replacement that gets the support needed.

Having said that, and looking up all sorts of other possible solutions, I've decided that copying a few fonts to the system Fonts folder is the easiest solution. No bugs for me doing things that way.


Pinete(Posted 2007) [#115]
Really?
The problem is loadingfont?
I will try it!!
and.. I would pay too for a replacement.

regards!


John Blackledge(Posted 2007) [#116]
I think it's still loading a font through the Windows API, as is Blitz.
If, for whatever reason, the def-line is wrong or the font is not found then Windows will provide the address to the next one in it's 'family'.

The only way I've found to be absolutely sure is to create your own font folder with the specified font in, then explicitly reference that using a full-path.


Neochrome(Posted 2007) [#117]
this needs to be updated for the 1.99 update runtime.. im getting some errors.

it works in 1.98, but not in 1.99


Abrexxes(Posted 2007) [#118]
We know, but i think the author spends more time into fastimage. There is at the moment no update to get it working under 1.99.

bye


Neochrome(Posted 2007) [#119]
ahh, ok, sorry to waste time ;)


(tu) ENAY(Posted 2007) [#120]
There is a new update of this brilliant FastText program available here:-

http://blitz.pp.ru/forum/showthread.php?s=&threadid=1953

Look for the download in the very first post (1.22). This version works in 1.99!

If you have any bugs or questions post them here.


Abrexxes(Posted 2007) [#121]
Hmm, i have no chance to translate the license (also not with google).

So, fast and simple please. What kind of license has 1.22 ?

thanks


Pinete(Posted 2007) [#122]
great!!! GREAT!!!
Thanks a lot MixailV!!!!!!
and thanks to Enay for advising!!!! :)
downloading...
:)
Thanks!!


all the best!


John Blackledge(Posted 2007) [#123]
Yeah, thanks to both. Testing later.


John Blackledge(Posted 2007) [#124]
Yep - seems to work fine with 1.99.

Interestingly there seems to be less of a difference between Blitz text() speeds and FastText speeds now than there was before.

Did Mark sneak something into 1.99?


Danny(Posted 2007) [#125]
Does anyone know if FastImage is affected by the same problem? Does it work on 1.99 or does it need updating as well?

Danny


Danny(Posted 2007) [#126]
Yes FastImage works fine with 1.99. No worries mate;

D.


sting(Posted 2007) [#127]
I get a Lib not found error from just running the examples. All the decls and dlls are in place.


John Blackledge(Posted 2007) [#128]
As Enay said:

There is a new update of this brilliant FastText program available here:-
http://blitz.pp.ru/forum/showthread.php?s=&threadid=1953
Look for the download in the very first post (1.22). This version works in 1.99!


@rtur(Posted 2008) [#129]
Hi!
MixailV asked me to post news about his libraries.
All his libs available for legaly purchase from his new site: http://www.fastlibs.com/
There are FastText, FastImage and new library- FastExtend(which is realy great IMHO:).

[Edit]
There is also discount coupon for libs: 50blitzersoff


Pinete(Posted 2008) [#130]
Thanks @rtur!
great news!!
:)
and thanks to Mixail too!


All the best!


Uber Jase(Posted 2008) [#131]
Is fasttext slower than blitz3d for anyone else? In a window the speed is about the same for both (26ms) but in fullscren blitz3d is fast at 15ms. Is Vista the cause?


Dreamora(Posted 2008) [#132]
More likely that your graphic chip is a bad joke and you were still crazy enough to enable aero.

Dont use aero with onboard or outdated drivers. Both will cause issues that are between "slowness" and "graphic errors / crash"


Uber Jase(Posted 2008) [#133]
LOL 2x8800Ultras and a quad core QX6850. I think I can just about handle aero:D


Dreamora(Posted 2008) [#134]
Yes but you remember you are using a DX7 language. DX7 does not support SLI, on XP it would most likely just crash out.
So you are actually lucky that it does not instantan crash at all with your "SLI want to be coolness"
And the main problem remains: Aero is 3D accelerated
so if you want to test it really, do it in fullscreen and most likely disable anything that could interfer (UAC)


Uber Jase(Posted 2008) [#135]
Funny that because Fastimage is VERY fast and othe libs like PhysX wrapper are fine.


Dreamora(Posted 2008) [#136]
Yupp
But the chances are that the font related stuff, due to WPF, has changed and that the "old way" has its cost or something the like.
don't ask me what the problem is ... I've kicked Vista long ago and will not install it until an SP comes out that solves the massivep process handling issues and performance bottlenecks that are the worst since WinME.


Uber Jase(Posted 2008) [#137]
Vista seems better than XP for performance now. But lets not argue about it mate, lifes too short:)


Kryzon(Posted 2008) [#138]
[EDIT] If you wanna get FastText, you can buy it at www.fastlibs.com




@MikhailV: soooorrry!


MikhailV(Posted 2008) [#139]
@rafael_blitz:

FastText v1.22 not freeware! But very small price — $10 with discount coupon [ 50blitzersoff ]. For this low price you get library and official support!

You can download FastText v1.22 here — http://fastlibs.com/libraries.php#fasttext


GfK(Posted 2008) [#140]
Your licence is in Russian. How do you expect people to agree to something that they can't even read?


KingPod(Posted 2008) [#141]
i couldnt get any of the demo's to work. everything came up with function not found errors.


MikhailV(Posted 2008) [#142]
@GfK:
I not compel buy this library. About license (briefly):
1. You can use libraries in ALL your applications (commercial, games and etc.)
2. You can redistribute DLL file only with your application and with small sub-license file — it is obligatory.
3. All other files included in archive may not be redistributed.
4. Rest in license file — a standard and classic juridical rules.
5. Use translator if you can not read in Russian, I bad know English and shall not be able to write whole license of English language, sorry.

@KingPod:
This library is tested for one year, its uses more than 200 persons without any problems.


Moraldi(Posted 2008) [#143]
@MikhailV: How will I get the last update (v1.72) of the FastImage library?
I am a registered user but I didn't receive any e-mail from you.

Thanks in advance.


MikhailV(Posted 2008) [#144]
@Moraldi: Check your e-mail... :)


KingPod(Posted 2008) [#145]
@Sorry MikhailV my bad. the .decls file ended up in the wrong place when i extracted it :)


Kryzon(Posted 2008) [#146]
I changed my post...sorry MikhailV.


MikhailV(Posted 2008) [#147]
@rafael_blitz: Ok, good :)


MikhailV(Posted 2009) [#148]
New version of the FastText v1.23 library is available, now library support Blitz3D v1.100 and Blitz3D v1.101

Check fastlibs.com site or your personal account. And do not forget to update dll, decls and included files!


RifRaf(Posted 2009) [#149]
Thanks, now I can update B3D :)


Virtech(Posted 2009) [#150]
Does it work properly under Vista now?


MikhailV(Posted 2009) [#151]
@Virtech: Check it! :)


Pinete(Posted 2009) [#152]
Thank you very much!


Virtech(Posted 2009) [#153]
Still very slow under Vista :(


RGR(Posted 2009) [#154]
.

Last edited 2012


MikhailV(Posted 2009) [#155]
Do not use DX7 emulator ;)
p.s. Eh, beginner, you funny.


Virtech(Posted 2009) [#156]
Emulator or not, blitz3d works just fine with vista. I cant see whats the problem with speedtext and vista. XP only its too limited. Many people use vista now.


MikhailV(Posted 2009) [#157]
Blitz3D not support Unicode (multilanguage), FastText library support!

If you need antialiasing - it's real in FastText, and impossible in Blitz3D.

If you need real speed - use FastImage library! Not Blitz3D text - it's very slow.

p.s. You may use that you like, this only your opinion.
And many people use Windows Seven now, not vista!


Virtech(Posted 2009) [#158]
So i guess proper fasttext support for vista is not possible then? What about window7?


MikhailV(Posted 2009) [#159]
New version of the FastText v1.24 library is available!
Now library support Blitz3D v1.103 and older versions.
Do not forget to update dll, decls and included files!

You can download library from a FastLibs.com site or from your personal account.


Pinete(Posted 2009) [#160]
thanks!! ;)