Improve handling of font family name, move AssetHelper.processLibraries and fix a couple colors

This commit is contained in:
Joshua Granick
2014-10-22 21:40:38 -07:00
parent 33d25eaf16
commit 58e70d4b76
4 changed files with 40 additions and 44 deletions

View File

@@ -469,15 +469,9 @@ class CommandLineTools {
}
if (command == "update" || command == "build" || command == "test") {
AssetHelper.processLibraries (project);
}
if (project.targetHandlers.exists (Std.string (project.target))) {
LogHelper.info ("", "\x1b[32;1mUsing target platform: " + Std.string (project.target).toUpperCase () + "\x1b[0m");
LogHelper.info ("", LogHelper.accentColor + "Using target platform: " + Std.string (project.target).toUpperCase () + "\x1b[0m");
var handler = project.targetHandlers.get (Std.string (project.target));
var projectData = Serializer.run (project);
@@ -593,7 +587,7 @@ class CommandLineTools {
private function createTemplate () {
LogHelper.info ("", "\x1b[32;1mRunning command: CREATE\x1b[0m");
LogHelper.info ("", LogHelper.accentColor + "Running command: CREATE\x1b[0m");
if (words.length > 0) {

View File

@@ -295,11 +295,11 @@ class FlashHelper {
// More code ripped off from "samhaxe"
var src = name;
var font_name = Path.withoutExtension (name);
//var font_name = Path.withoutExtension (name);
var face = new Font (src);
var font = face.decompose ();
font_name = font.family_name;
var font_name = font.family_name;
var glyphs = new Array <Font2GlyphData> ();
var glyph_layout = new Array <FontLayoutGlyphData> ();
@@ -316,7 +316,7 @@ class FlashHelper {
var shapeRecords = new Array <ShapeRecord> ();
var i:Int = 0;
var styleChanged:Bool = false;
while (i < native_glyph.points.length) {
var type = native_glyph.points[i++];

View File

@@ -2,6 +2,7 @@ package project;
import haxe.rtti.Meta;
import helpers.AssetHelper;
import helpers.LogHelper;
@@ -53,6 +54,7 @@ class PlatformTarget {
if (!Reflect.hasField (metaFields.update, "ignore") && (command == "update" || command == "build" || command == "test")) {
LogHelper.info ("", "\n" + LogHelper.accentColor + "Running command: UPDATE" + LogHelper.resetColor);
AssetHelper.processLibraries (project);
update ();
}