Closed Kababaer closed 5 years ago
Hi, please attach here the fnt file. Phaser only supports Xml and Json.
Cannot attach that file typ. I don't wanna write the complete file here as it has more than hundred lines. Littera offered the file typ XML (fnt) but only gives me the .fnt and the *.png.
Can you suggest a workaround?
Hi, you can find here the tools Phaser supports. https://phaser.io/docs/2.6.2/Phaser.Loader.html#bitmapFont
By the way, if littera exports to XML, try with it, no matter if the file extension if fnt
.
The unfunny thing is that littera offers the xml export but just give the .fnt which actually looks like .xml as it has a lot of tags and attributes like <char xSpacing=""..../char>. However, this is information seems to be "not enough" for phaser editor as something seems to be missing. The bitmap font is working ingame, but not in preview. The idea was to design a complete dialoge as group prefab inclusive the text and make the text wrapping in the prefab too, if necessary (instead of calculate all that).
Please, just paste a few lines of the content of the xml/fnt file here. Other users had issues with the format of the xml.
Sry, wasn't here a long time ago.
<font>
<info face="font" size="72" bold="1" italic="0" charset="" unicode="" stretchH="100" smooth="1" aa="1" padding="2,2,2,2" spacing="0,0" outline="0"/>
<common lineHeight="72" base="63" scaleW="694" scaleH="511" pages="1" packed="0"/>
<pages>
<page id="0" file="font.png"/>
</pages>
<chars count="93">
<char id="97" x="2" y="2" width="56" height="47" xoffset="9" yoffset="18" xadvance="72" page="0" chnl="15"/>
<char id="98" x="2" y="51" width="56" height="65" xoffset="9" yoffset="0" xadvance="72" page="0" chnl="15"/>
<char id="99" x="2" y="118" width="56" height="47" xoffset="9" yoffset="18" xadvance="72" page="0" chnl="15"/>
<char id="100" x="2" y="167" width="56" height="65" xoffset="9" yoffset="0" xadvance="72" page="0" chnl="15"/>
<char id="101" x="2" y="234" width="56" height="47" xoffset="9" yoffset="18" xadvance="72" page="0" chnl="15"/>
<char id="102" x="2" y="283" width="56" height="65" xoffset="9" yoffset="0" xadvance="63" page="0" chnl="15"/>
<char id="103" x="2" y="350" width="56" height="56" xoffset="9" yoffset="18" xadvance="72" page="0" chnl="15"/>
</chars>
</font>
Within the chars-tag, there a many more chars. Just excluded them to keep the lines of xml small.
Well, I don't see any problem with the format. If you can send me the whole file and texture I can test here and find the problem.
Sent you guys an e-mail due to upload restrictions.
Hi,
Thanks for sending me the files.
It is working to me! The trick is to rename the file Pixel8Active.fnt
to assets/Pixel8Active.fnt.xml
, you should add a .xml
extension. Please, try and tell me if it works for you.
By the way, I recommend to use the latest version of the v1 series: 1.5.3
.
Can I close this?
Sry, had vacation. Will test it out tomorrow and will give feedback then.
@Kababaer there is no hurry! Enjoy the vacations!
Done, will be included in 1.4.5 very soon.
Version
Description
Within a Group Prefab, right click in the canvas editor -> Text -> Add Bitmap Text -> Enter a random text -> choosing a bitmap font from the menu which is showing -> hit ok -> confirm, that nothing happens. It's not added to the canvas nor to the left "asset window". The bitmap file is *.fnt.
Edit: The bitmap was created using littera. I just see, when I drop the bitmap font into the preview, it says: Missing bitmap font descriptor.
Possible solution