Commit 5009f44a authored by Jason Simmons's avatar Jason Simmons

Merge pull request #2029 from jason-simmons/font_custom_load

Generate a font manifest JSON file from flutter.yaml
parents 9323d4ed 59351a79
......@@ -167,6 +167,11 @@ ArchiveFile _createAssetManifest(Map<_Asset, List<_Asset>> assets) {
return new ArchiveFile.noCompress(key, content.length, content);
}
ArchiveFile _createFontManifest(Map manifestDescriptor) {
List<int> content = UTF8.encode(JSON.encode(manifestDescriptor['fonts']));
return new ArchiveFile.noCompress('FontManifest.json', content.length, content);
}
ArchiveFile _createSnapshotFile(String snapshotPath) {
File file = new File(snapshotPath);
List<int> content = file.readAsBytesSync();
......@@ -273,6 +278,7 @@ Future<int> assemble({
}
archive.addFile(_createAssetManifest(assets));
archive.addFile(_createFontManifest(manifestDescriptor));
await CipherParameters.get().seedRandom();
......
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