Image fonts - Will not change(??)

BlitzMax Forums/BlitzMax Programming/Image fonts - Will not change(??)

I have been trying for hours to change the default font but NOTHING seems to work. I tried copying the font to the local directory, different fonts, all sorts of tricks with the URL link, DX7, GL .. ...

I always get a null image font:

SuperStrict

Framework BRL.D3D7Max2D
Import BRL.PolledInput
Import BRL.Max2D

SetGraphicsDriver D3D7Max2DDriver()
Graphics 512,384

Global fnt:TImageFont=LoadImageFont("C:\WINDOWS\Fonts\tahoma.ttf",40)
If fnt=Null DebugLog "no image font"
SetImageFont fnt

Global txt$="edit me"
Global editmode%

While Not KeyHit(KEY_ESCAPE)
	Cls
	Delay 5
	SetColor $88,$88,$88
	DrawText "F2 to edit text    RETURN when done",5,5
	If editmode=True
		SetColor $00,$ff,$00
		GetInput txt
		DrawText " "+txt$+"_",30,30
		If KeyHit(KEY_RETURN) Then editmode=False
	Else
		If KeyHit(KEY_F2)
			FlushKeys
			editmode=True
		EndIf
		SetColor $ff,$ff,$ff
		DrawText "~q"+txt$+"~q",30,30
	EndIf
	
	Flip
Wend
End

Function GetInput(a$ Var)
	Local c%=GetChar()
	If c=0 Return
	If c=8
		a=a[..a.Length-1]
	Else
		a:+Chr(c)
	EndIf
End Function


add
Import BRL.freetypefont


to the importsection of your app


bye MB

Didn't you write Framework Assistant, Jim? ;)

@GfK: Nice one! ;)

Doink!
For quick speed I normally F1 over a Blitz command and check what module is used. In this case Max2D so I assumed all bases were covered

I really *ought* to use my own software sometimes hehehe