= Font Creator
:revnumber: 2.0
:revdate: 2020/07/25
:keywords: gui, documentation, hud


This SDK plugin provides font support for jMonkeyEngine games. It creates AngelFont files from system fonts. Make sure you have the rights/license to use this font! You can link:https://www.google.com/search?q=free+fonts[search for and download free fonts] from many sites.


== Installation

If the plugin is installed, you see it under `Plugins → Installed`


image::plugin/install-font-plugin.png[install-font-plugin.png,width="450",height="275",align="center"]


(If you don't see it, go to `Tools → Plugins → Available Plugins` to install Font Creator.)


== Create Font

The following example creates the custom font `Orbitron.fnt` in the `assets/Interface/Fonts` directory.


image::plugin/font-1.png[font-1.png,width="",height="",align="center"]



image::plugin/font-2.png[font-2.png,width="",height="",align="center"]



image::plugin/font-3.png[font-3.png,width="",height="",align="center"]



image::plugin/font-4.png[font-4.png,width="",height="",align="center"]



image::plugin/font-5.png[font-5.png,width="",height="",align="center"]



== Use Font

The following example loads text in the custom font `Orbitron.fnt` from the `assets/Interface/Fonts` directory. You use `com.jme3.font.*` package to handle text on the screen. `guiNode` is a preconfigured node in any `SimpleApplication`-based game.

[source,java]
----

BitmapFont myFont = assetManager.loadFont("Interface/Fonts/Orbitron.fnt");
BitmapText hudText = new BitmapText(myFont, false);
hudText.setText("You can write any string here");
guiNode.attachChild(hudText);

----

== create font for RTL languages like persian and arabic

to create and use persian bitmap fonts use this tool.
link:https://github.com/younes-noori/bitMapFontCreator[bitMapFontCreator for RTL languages]
