Closed robboerman closed 12 years ago
Hey Rob,
awesome work in CAAT's font field. Just one note i'd like to have accounted: the supplied method initializeAsFontMap honors the following objects for every map supplied element:
This method is originally develop to parse the output of this tool http://glyphdesigner.71squared.com/ which gives a very fine glypth control. Since we're using it, will merge your changes and keep the method with another name. But to make your methods and this one compatible with a call to drawString/stringWidth, will honor the code in every font initialization method:
helper.xoffset= typeof value.xoffset==='undefined' ? 0 : value.xoffset;
helper.yoffset= typeof value.yoffset==='undefined' ? 0 : value.yoffset;
helper.xadvance= typeof value.xadvance==='undefined' ? value.width : value.xadvance;
Should be easy to do so.
Thanks for the code. -ibon
Hi Ibon,
Using a SpriteImage as a sprited font is a great idea, thanks for that. I noticed a couple of shortcoming though:
Because of this I changed the interface of the font to any of the following:
OR for monospaced fonts
The font can then be used in a TextActor simply by calling
This even works with a sprited TextActor traversing a path :D
Let me know what you think, Rob