Help for FastText library (version 1.xx)




	Attention! The version 1.22 of the library and above is forbidden
	use in commercial project without consent of the author.
	PLEASE READ LICENSE AGREEMENT. (Use translator if you can not read in russian).
	(c) 2007 Created by MixailV aka Monster^Sage [monster-sage@mail.ru]




WARNING! Use FastText library WITH Blitz3D 1.98 & Blitz3D 1.99 ONLY!

; v1.22
; - added support OpenType (*.OTF) fonts
; - new algorithm of the recognition of the name of the font from files *.TTF and *.OTF
; - are created two variants DLL for Blitz3D 1.98 and Blitz3D 1.99
; - added new option when load font with vertical (from top to bottom) writing (prefix @)


; v1.21
; - available support all smoothing (antialising) modes of the fonts
;   (new parameter is added in command LoadFont, refer to in detail in help on given command)
;   + new example FastText_Example_Antialising.bb

; v1.1
; - TextRect function added (+example FastText_Example_TextRect.bb)




LoadFont (fontname$, height, bold, italic, underline, angle#, smooth, encoding)
	Create (or load from file) new font with next property:
		fontname$ - font name in OS, or path to font-file.
			Supported only *.OTF, *.TTF, *.FON, *.FNT, *.FOT types of fonts.
			*.OTF & *.TTF with new font-name detection algorithm.
			Use prefix "@" before font-name (font-filename) for up-down writing fonts (if font support this option).

		height - font height in pixels
		bold - bold flag (0 or 1)
		italic - italic flag (0 or 1)
		underline - underline flag (0 or 1)
		angle# - angle of font rotation (in degree)
		smooth - font antialising mode (v1.21), available following values:
			FT_DEFAULT = 0		- OS default antialising (user adjustment in OS Windows)
			FT_NONANTIALIASED = 1	- without smoothing (without antialising)
			FT_ANTIALIASED = 2	- standart antialising - normal quality and  FAST (small fonts without antialising automatically!)
			FT_CLEARTYPE = 3	- ClearType (c)Microsoft antialising - best? quality and SLOW
 
		encoding - encoding of fontname string ( = FT_ASCII or FT_UNICODE only)	
	Return font id.



SetFont (font)
FreeFont (font)
FontWidth ()
FontHeight ()

	/\ Like Blitz3D	



Text (x, y, text$, HorisontalAlign=FT_LEFT, VerticalAlign=FT_TOP, encoding=FT_UNICODE)
	Supported horisontal align flags:
		FT_LEFT = 0
		FT_CENTER = 1
		FT_RIGHT = 2
	Supported vertical align flags:
		FT_TOP = 0
		FT_MIDDLE = 1
		FT_BOTTOM = 2
		FT_BASELINE = 3
	/\ Like Blitz3D with new param encoding - encoding of txt$ string ( = FT_ASCII or FT_UNICODE only)



TextRect (x, y, width, height, text$, formatting=FT_LEFT, encoding=FT_UNICODE)
	x,y,width,height - set rectangle for drawing formatted text
	Supported horisontal align formatting:
		FT_LEFT = 0
		FT_CENTER = 1
		FT_RIGHT = 2
	Supported other formatting flags (see also example FastText_Example_TextRect.bb):
		FT_NOBREAK = 256	- draw without words breaks 
		FT_NOCLIP = 512		- draw without clipping
		FT_CALCRECT = 1024	- not draw, calculate height of text rectangle*
	Return height of text rectangle.



StringWidth (text$, encoding=FT_UNICODE)
StringHeight (text$, encoding=FT_UNICODE)

	/\ Like Blitz3D with new param encoding - encoding of txt$ string ( = FT_ASCII or FT_UNICODE only)


TextBackground (red%=-1, green%=-1, blue%=-1)
	Set background for text drawing... Values from 0 to 255 only.
	If value of the colour (red or green or blue) zero less, then backgraund will is unplugged (OFF).




* FT-CALCRECT:
	Determines the width and height of the rectangle. If there are multiple lines
	of text, TextRect uses the width parameter of the rectangle and extends the base
	of the rectangle to bound the last line of text.
	If there is only one line of text, TextRect modifies the right side of
	the rectangle so that it bounds the last character in the line. In either case,
	TextRect return the height of the formatted text but does not draw the text.
