_____ ___ ____ __ _ | ___||_ _|/ ___| / _| ___ _ __ | |_ ___ | |_ | || | _ | |_ / _ \ | '_ \ | __|/ __| | _| | || |_| || _|| (_) || | | || |_ \__ \ |_| |___|\____||_| \___/ |_| |_| \__||___/ Irrlicht FIGlet font driver v1.0 --------------------------------------------------------------- 1. FIG-what fonts? --------------------------------------------------------------- FIGlet is a tool for converting text into ASCII art. You probably only know about FIGlet fonts if you've used JavE to paint in text. See www.jave.de for more info and lots of fun making ASCII art :) --------------------------------------------------------------- 2. This is stupid, a 3D engine doesn't need this. --------------------------------------------------------------- You're right, but I was bored and it seemed like an interesting mini project, I like retro things like this. --------------------------------------------------------------- 3. What's it (not) got? --------------------------------------------------------------- This directory contains a FIGlet font loader and rudementary driver in the form of an Irrlicht IGUIFont. Loading from zip files, loading FIGlet layout files and smushing rules are not supported, though they should be easy to add. Basic kerning is supported, so the fonts look reasonably nice. --------------------------------------------------------------- 4. How do I use it? --------------------------------------------------------------- // First use the Irrlicht font tool to generate a fixed-width font, // use the one provided, or the Console device's built-in font. IGUIFont* font = guienv->getFont("fixed.xml"); // create an instance of a figlet font CGUIFIGletFont* figFont = new CGUIFIGletFont(font); // open a FIGlet file for reading io::IReadFile* file = device->getFileSystem()->createAndOpenFile("figlets/big.flf"); // load the font data figFont->load(file); // set the font to the skin's default font guienv->getSkin()->setFont(figFont); // remember to drop the things you created! file->drop(); figFont->drop(); // all done! --------------------------------------------------------------- 5. License --------------------------------------------------------------- Copyright (c) 2009 Gaz Davidson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------------------------------- 6. Todo --------------------------------------------------------------- - Load filter rules file - Detect zip archive, add to filesystem, load the font - Follow smushing rules - Cache for generated text