Documentation

bmGlyph Help

(bitmap font generator)

* Toolbar menu:

- Open: Open a bmGlyph project in the current window.

- Save: Save the current project if it exists, without asking confirmation, or will save as a new file.

- Save as: Save the current project as a new file.

- Publish: Publish the project depending on the publish settings.

- Select All: Select all glyph

- Select Reverse: Reverse the glyph selection

*a right click mouse button will unselect all glyph

- Work on selected glyph(s) only: when this option is checked, changing the fill mode (texture / color / gradient) will only affect the selected glyph.

- Preview / Texture: Switch to preview mode or texture mode. While in preview mode, you can drag & drop a background picture in the view.

- Preview text: Change the preview text for the available glyphs. You can use \n .

- xAdvance offset: Adjust yourself the glyphs advancement. If you add shadow or stroke, the space between each letter can increase. This option allows to make nice effects, such as sticking each letters.

- xOffset and yOffset: adjust the final bounding box, as it should appear on a device. The bounding box appears in red, and is positioned like the cocos2d bounding box (same method). It allows to tune the result depending on what you want, and to be able to center your label easily when you code…

- 1536×2048 / 768×1024 / 640×960 / 320×480: Load a background for the preview mode.

* You can also drag & drop your on background picture directly in the view.

- Color: Change the background color. It will also clear any existing background picture.

- Rotate: rotate the background picture by 90°.

- Save: Export the preview text in a PNG. Allows to write custom text and use it as sprite or for illustration without having to render it on a device.

* Fonts:

- Font name: Select the font. A Green color means bmGlyph has found kernings table, Black means no kerning.

- Trait : Normal / Bold / Italic / BoldItalic - Choose the font trait. if not available, choosing bold and/or italic won’t affect the glyph output.

- Weight: weight used for drawing char.

- Font size: adjust the font size with the slider or textfield.

- Fixed xAdvance: force the xdavance value for all chars, allows better HUD display for numbers.

- Search Filter: Filter the font list.

- Load ttf: Load a .ttf file which is not installed on your system.

- Letters: Customize your letters…

- Charsets: Here you can quickly add the latin and latin-1 supplement charset, erase the current letters, add a custom range (1000 max or it won’t be added), display a popup with a huge charset list where you can select any charset and add it to the current list.

- Use kernings: load kerning tables (kern format 0, and camp format 0 & 4 currently supported). Kernings are used in preview mode and will appear in the atlas file.

* Color Tools:

- Shadow: Add shadow to all glyphs. Change x and y offset, the shadow radius and the shadow color. Inner/Outer shadow, but not both at the same time.

- Stroke: Stroke all glyphs. Adjust the color and stroke size. Choose between gradient or color mode. Stroke can be center,inner or outer.

- Fill Mode:

- Don’t fill: Don’t fill the glyph. If ever Shadow is enabled, glyphs will be filled with gray color.

- Color / Glossy: Fill with the selected color. Glossy: makes the color glossy (you will obtain a better result with dark colors).

- Texture: Drag & Drop a picture in the box, glyphs will be filled with this picture. Please try to load a small file, like 200×200 or it may be very slow to update….

- Gradient: Apply a gradient, choose the angle and the start/end colors.

- Anti Alias: Draw with or without anti alias.

* Texture:

- Width x Height: the output picture format. maximum is 2048×2048

- Background: Allows to change the background color. This color won’t appear in published picture, it allows only to work with the desired color…

- CheckerBoard: Show or Hide the checkerboard. If the option is On, you won’t see the background color.

- Auto Size: Auto Size will adjust alone the width and height , and will try to fit all the glyph in it.

* Publish Settings:

The publish setting will now appear as a sheet when you click on the Publish button (top of the window).

You can add as much as targets as you want. Keep in mind you work in the highest resolution.

Best practice is to configure the default target with the Directory Path, File Name, Suffix … Then to duplicate the current

target for the desired scale (ex: 50 to duplicate the current target with a 50% scale). A scale ratio reminder is displayed to help you…

You need to enter yourself the suffixes (-ipadhd, -ipad, @4x, -hd, @2x, etc…).

Force Font Face: can be left empty, it will use the default font name.

- Export format: Cocos2d, Corona (using .fnt font atlas, and hd extension), Sparrow (.fnt font atlas in xml, and @2x extension), Unity/ezgui (.txt font atlas and -hd

- SD Quality: interpolation quality when downscaling to SD format.

- Redraw when downscaling: when downscaling, bmGlyph will redraw the texture sheet with a new glyph size. it avoids bad round values and wrong offsets especially for the SD versions. Please note that the letters positions might be in different order on the texture. (stroke size, shadows, advanced offset and fixed advance parameter are also changed during that operation).

you can export only the texture or atlas file with the Texture and Coordinates checkbox.

Files will be exported as follow:

Texture: {PATH}/{FILE}{SUFFIX}.png

Coordinates: {PATH}/{FILE}{SUFFIX}.fnt (or .txt depending on the export format)

* Packing:

- Bounding Box (+ px): increase the bounding box of each char by X pixels around. (width += value * 2). the char will be centered. it allows to add new effect with other tools (deformations, outer glows etc…)

- Padding: adjust the padding between each glyph. Keep it at 2px or 4px is recommended while using the AutoSD feature.

- Sort Method: Manually change the way the glyphs are packed. Keep the default settings for better result. You can sort by letters as displayed in the settings.

- Reversed: Reverse or not the sort order. Default settings gives the better result.

- Refresh: Force a re-pack. Usually everything is auto-repacked…

- Align on Grid: don’t use the best packing algorithm, but align the letters on a grid. You can set yourself the width/height of the letters. You will need to play with the size in order to have the best glyph size/grid size. This option is only needed if you have a basic bitmap font parser (no need to use a font atlas file). Anyway, the result might look strange depending on the fonts, as the kerning and advanced parameter won’t be used.

——————————————————————

How to use the published files in a cocos2d application:

- In order to use the -hd files (with the AutoSD feature), check that you have enabled the retina support in your AppDelegate.m :

if( ! [director enableRetinaDisplay:YES] )

CCLOG(@”Retina Display Not supported”);

- Create a CCLabelBMFont and add it on your Layer:

CGSize size = [[CCDirector sharedDirector] winSize];

CCLabelBMFont *label = [CCLabelBMFont labelWithString:@”Preview text” fntFile:@”preview.fnt”];

// position the label on the center of the screen

label.position = ccp( size.width /2 , size.height/2 );

// add the label as a child to this Layer

[self addChild: label];

——————————————————————

Legal Stuff:

DISCLAIMER

THIS SOFTWARE IS PROVIDED “AS IS” AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)

HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

PERMITTED USE

You agree not to reproduce, duplicate, copy, sell this software.

Special Thanks:

——————–

//icons & color

//This framework is free for every use, even for commercial project, but you need to credit me by linking to this page : http://www.webalys.com/design-interface-application-framework.php

——————–

SFBInspectorPane:

Copyright (C) 2009 Stephen F. Booth <me@sbooth.org>

All rights reserved.

Redistribution and use in source and binary forms, with or without

modification, are permitted provided that the following conditions

are met:

1. Redistributions of source code must retain the above copyright

notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright

notice, this list of conditions and the following disclaimer in the

documentation and/or other materials provided with the distribution.

3. The name of the author may not be used to endorse or promote products

derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR “AS IS” AND ANY EXPRESS OR

IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES

OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.

IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,

INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT

NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,

DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY

THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT

(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF

THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

——————-