Hi guys, im working on a text adventure library for flashpunk, im looking for the easiest way for using multiple fonts in a flashpunk Project. Do you have any ideas or links that can help me out?
Font Management
Copying
(Martí Angelats i Ribera)
#2
The way to use multiple fonts using FlashPunk is done following this steps:
- Add the fonts to the project.
- Embeding the font (usually in the Main.as). The name that you set to the font family will be the used one (it’s done using the regular way).
- Use the options
font
property to change it. It must be the same string as the embed font (code below). - (optional) If you want to change the font after making the
Text
simply use thefont
property.
var options:Object = {font: "My font"}; //Add all the other options here
var text:Text = new Text("Hello World!", 0, 0, options);
text.font = "My other font";
PS: I don’t know if there is any program that can help you to make the code faster after design.