skip to content
Frictional Game Wiki
User Tools
Register
Log In
Site Tools
Search
Tools
Show page
Old revisions
Backlinks
Recent Changes
Media Manager
Sitemap
Log In
Register
>
Recent Changes
Media Manager
Sitemap
Trace:
hpl3:tutorials:adding_fonts
<h1>Adding custom fonts</h1> <div class="level1"> </div> <h2>Step 1: Get the font</h2> <div class="level2"> <p> First thing first, get the font you want to use and install it on your computer (right-click on it and hit Install). Make sure it is in OTF or TTF format, otherwise convert it to one of those file types. </p> </div> <h2>Step 2: Get BMFont</h2> <div class="level2"> <p> For a font to work in game, the font first needs to be converted into an atlas. To do this, we need to use the tool <a href="https://www.angelcode.com/products/bmfont/" class="urlextern" title="https://www.angelcode.com/products/bmfont/" rel="nofollow">BMFont</a>. It is advised to use the 64bit beta version since it has proven to have better OTF compatibility.<br/> <br/> BMFont supports both OTF and TTF file types. </p> </div> <h2>Step 3: Font Settings</h2> <div class="level2"> <ul> <li class="level1"> Go to Options > Font Settings</li> <li class="level1"> Font: Select your font from the list</li> <li class="level1"> Add font file: Select the OTF or TTF file</li> <li class="level1"> Size: Advised to use 96/72/56 to cover the majority of needed sizes while keeping the font sharp</li> <li class="level1"> Bold/Italic: Select these if your font is a bold/italic</li> <li class="level1"> Font Smoothing: OFF</li> <li class="level1"> Super Sampling: ON</li> <li class="level1"> Level: 4</li> </ul> </div> <h2>Step 4: Export Options</h2> <div class="level2"> <ul> <li class="level1"> Go to Options > Export Options</li> <li class="level1"> Padding: Advised to use 1 pixel padding in every direction</li> <li class="level1"> Width/Height: advised to use 512/512 or 1024/1024 to make sure the font is rendered in few textures. Big fonts require more space.</li> <li class="level1"> Bit depth: 8</li> <li class="level1"> Font Descriptor: XML</li> <li class="level1"> Textures: dds - DirectDraw Surface</li> <li class="level1"> Compression: none</li> </ul> </div> <h2>Step 5: Generate font atlas</h2> <div class="level2"> <ul> <li class="level1"> From the right panel, select all the glyph groups you want to export</li> <li class="level1"> Go to Options > Save bitmap font as…</li> </ul> <p> This process will generate a .fnt file as well as dds atlases. You can now reference the font by name via script to use the font. </p> </div>
hpl3/tutorials/adding_fonts.txt
· Last modified: 2019/11/26 16:36 by
alexkalopsia
Page Tools
Show page
Old revisions
Backlinks
Export to PDF
Back to top