Lib_font32 - Implementation of graphic fonts --------------------------------------------------------------------------------------------------------------- Init(k: integer) - Initializing the library. k - necessary fonts count May be called repeatedly (for example - to clean memory from unused fonts), all settings will be set to default values, all fonts will be unloaded rotate(k: integer) - set rotation angle 0 - 0 degrees 5 - 90 degrees 3 - 180 degrees 6 - 270 degrees repaint - Updating display if rotation is used. If rotation angle is zero, standart Repaint my be used. Font(i: integer) - Select current font. i - font's number, should be from 0 to k-1 (see function "Init") Color(a: integer; r: integer; g: integer; b: integer) - set text color a - transparency (0 - 255) r, g, b - RGB color LoadFont(fname: string) - Load font. Font's number should be set in advance by procedure "Font()". fname - font's name (without extension and "/" character) LoadFont2(fname: string; fname2: string) - Another variation of font loader. fname - font's name (without extension and "/" character); fname2 - Name of font's table (without extension and "/" character). This function is convenient, if you have some fonts with different colors, but with one table. DrawString(s: string; x: integer; y: integer) - Draw one string on the screen(without carries) s - the text x, y - output coordinates TextWindow(x: integer; y: integer; w: integer; h: integer) - Set the output window x, y - left top point coordinates w, h - width and height Default is fullscreen window integer TextHeight - Returns current font height in pixels integer TextWidth(s: string) - returns length of the text "s". Modify(im: image) - Modify current font. Used to change color/transparency of the font for example, using Lib_alpha. integer Format(s: string; b: integer) - Divide the text to place it in the window, defined by procedure "TextWindow". Returns calculated height of the divided text in pixels. Parametr b defines dividing text method: 0 - format the new text (old text will be removed); 1 - Add the string to the end of the formatted text; If is necessary to insert a carry, should act like this: s:='Сейчас будет пере-' + chr(13) + 'нос текста.'; or, for double carry: s:='Михаил Булгаков' + chr(13) + chr(13) + 'Мастер и Маргарита'; DrawTextWindow - Draw text, earlier divided by "Format" in the window. The window should be set by "TextWindow" before formatting. MoveUp(px: integer) - Move the text on px pixels up MoveDown(px: integer) - Move the text on px pixels down Spacing(i: integer) - Set a distance between a characters. i - distance between a characters in pixels. Default is Spacing=0. May be both positive and negative. Leading(i: integer) - Set the spacing between a strings (if drawing text by DrawTextWindow) i - spacing between a strings in pixels. Default is Leading=0. May be both positive and negative. Align(i: integer) - Set text align if drawing text using "DrawTextWindow" i - alignment type, should be one of: 0 - By left edge (default) 1 - Centered 2 - By right edge GetPosition - Get current position of the text in pixels. AddImage(im: image) - Add illustration to the illustrations array. All illustrations a numbered by internal indexes beginning from 0. To insert illustration, you should insert to the text the line like this: "[IMG N]" where N - illustration;s number (from 0) All illustrations must be loaded befre formatting the text, or the formatting wil cause an error! It will be better to place blank lines before and after the illustrations. RemoveImages - Clear illustrations array --------------------------------------------------------------------------------------------------------------- 2008 - 20010 (с) odd Tested on SE K550i, SE C510i