Commit f5c3b75d authored by Jason Simmons's avatar Jason Simmons

Merge pull request #2876 from jason-simmons/font_include_asset

Add embedded font assets to the asset list
parents dff356fc f17b68d2
......@@ -81,6 +81,23 @@ Map<_Asset, List<_Asset>> _parseAssets(Map<String, dynamic> manifestDescriptor,
}
}
}
// Add assets referenced in the fonts section of the manifest.
if (manifestDescriptor.containsKey('fonts')) {
for (Map<String, dynamic> family in manifestDescriptor['fonts']) {
List<Map<String, dynamic>> fonts = family['fonts'];
if (fonts == null) continue;
for (Map<String, dynamic> font in fonts) {
String asset = font['asset'];
if (asset == null) continue;
_Asset baseAsset = new _Asset(base: assetBase, key: asset);
result[baseAsset] = <_Asset>[];
}
}
}
return result;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment