Closed DotWith closed 2 years ago
I can merge this when you're done, but since it looks like it has breaking changes we'll have to bump the version number a full point when it's done.
What's the main thing you're trying to achieve here?
I can merge this when you're done, but since it looks like it has breaking changes we'll have to bump the version number a full point when it's done.
What's the main thing you're trying to achieve here?
I'm attempting to make the library more easier to use.
Cool! What are the chief improvements in this PR?
Cool! What are the chief improvements in this PR?
I need to add backwards compatibly with the old init function and getFontSize. I mark them as deprecated.
Init now uses params
tongue.init({
locale: "en-US",
finishedCallback: onLoaded
});
getFontSize has been removed and instead replaced with this.
var oldfont = "verdana";
var oldsize = 12;
var newfont = tongue.getFont(oldfont, oldsize);
trace(newfont.name); // returns "comicsans"
trace(newfont.size); // returns 14
Ah, that's much more convenient. Looks good, thanks for doing this!
Ah, that's much more convenient. Looks good, thanks for doing this!
I was hoping to add other property's like position, etc. To the FontData, but I haven't found a reason to add it so far.
<?xml version="1.0" encoding="utf-8" ?>
<data>
<font value="verdana" replace="arial">
<x value="13" replace="199"/>
<y value="18" replace="456"/>
</font>
</data>
I'll add xml support into another pull request.
@larsiusprime You shouldn't have to bump up the version to a full point anymore. Now that backwards compatibly has been added. Once you do merge, please update the CHANGELOG.md
.
Cool, let me know when you're done!
@larsiusprime I'm done. I've tested the example project. This pr will close #40 and #43.
@larsiusprime For reference, I collaborated with DotWith on this, and made sure that the improvements they made were backwards compatible, so they should work without interfering with existing projects.
Happy to make you a collaborator on this repo too, but I'll try to rule on this PR by end of day nonetheless.
Major Changes
Added hxformat. getFont returns name and size. Removed getFontSize.
TODO