From a8b1e2cf1a2ea29dc4ddd3032aad32c65267c247 Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Thu, 19 Jan 2017 17:56:30 -0800 Subject: [PATCH] Fix font preload --- templates/haxe/DefaultAssetLibrary.hx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/templates/haxe/DefaultAssetLibrary.hx b/templates/haxe/DefaultAssetLibrary.hx index 61c9f2b70..4fe5c372c 100644 --- a/templates/haxe/DefaultAssetLibrary.hx +++ b/templates/haxe/DefaultAssetLibrary.hx @@ -62,7 +62,10 @@ import sys.FileSystem; var id; ::if (assets != null)::::foreach assets::id = "::id::";::if (type == "font"):: classTypes.set (id, __ASSET__::flatName::); - types.set (id, AssetType.$$upper(::type::)); ::else::::if (embed):: + types.set (id, AssetType.$$upper(::type::)); + #if html5 + preload.set (id, true); + #end ::else::::if (embed):: #if html5 preload.set (id, true); #elseif (desktop || cpp)