Fix OpenFL font embed

This commit is contained in:
Joshua Granick
2017-03-07 08:57:25 -08:00
parent f5fb0de232
commit 3185e383d6

View File

@@ -46,14 +46,19 @@ import sys.FileSystem;
Assets.defaultRootPath = rootPath;
#if (openfl && !flash)
::if (assets != null)::::foreach assets::::if (type == "font")::openfl.text.Font.registerFont (__ASSET__OPENFL__::flatName::);
::end::::end::::end::
#end
var data, manifest, library;
::foreach assets::::if (type == "manifest")::::if (embed)::data = '::data::';
::if (assets != null)::::foreach assets::::if (type == "manifest")::::if (embed)::data = '::data::';
manifest = AssetManifest.parse (data, rootPath);
library = AssetLibrary.fromManifest (manifest);
Assets.registerLibrary ("::library::", library);
::else::Assets.libraryPaths["::library::"] = rootPath + "::resourceName::";
::end::::end::::end::
::end::::end::::end::::end::
::foreach libraries::::if (preload)::library = Assets.getLibrary ("::name::");
if (library != null) preloadLibraries.push (library);