diff --git a/doric-demo/assets/The_Parthenon_in_Athens.jpeg b/doric-demo/assets/The_Parthenon_in_Athens.jpeg new file mode 100644 index 00000000..95b7b1f4 Binary files /dev/null and b/doric-demo/assets/The_Parthenon_in_Athens.jpeg differ diff --git a/doric-demo/bundle/assets/The_Parthenon_in_Athens.jpeg b/doric-demo/bundle/assets/The_Parthenon_in_Athens.jpeg new file mode 100644 index 00000000..95b7b1f4 Binary files /dev/null and b/doric-demo/bundle/assets/The_Parthenon_in_Athens.jpeg differ diff --git a/doric-demo/src/ImageDemo.ts b/doric-demo/src/ImageDemo.ts index 35824685..dd84bac8 100644 --- a/doric-demo/src/ImageDemo.ts +++ b/doric-demo/src/ImageDemo.ts @@ -1,4 +1,4 @@ -import { Base64Resource, Group, Panel, coordinator, text, gravity, Color, LayoutSpec, log, vlayout, scroller, layoutConfig, image, ScaleType, Image, modal, RemoteResource, MainBundleResource } from "doric"; +import { Base64Resource, Group, Panel, coordinator, text, gravity, Color, LayoutSpec, log, vlayout, scroller, layoutConfig, image, ScaleType, Image, modal, RemoteResource, MainBundleResource, AssetResource } from "doric"; import { colors, label } from "./utils"; import { img_base64 } from "./image_base64"; @@ -28,8 +28,8 @@ class ImageDemo extends Panel { label('Button'), image({ image: Environment.platform === 'Android' - ? new DrawableResource("doric_icon_back") - : new MainBundleResource("Hanabi.ttf"), + ? new AssetResource("assets/The_Parthenon_in_Athens.jpeg") + : new MainBundleResource("assets/The_Parthenon_in_Athens.jpeg"), }), image({ image: new RemoteResource("https://p.upyun.com/demo/webp/webp/jpg-0.webp"), diff --git a/doric-demo/src/TextDemo.ts b/doric-demo/src/TextDemo.ts index ea08bccc..74f98c78 100644 --- a/doric-demo/src/TextDemo.ts +++ b/doric-demo/src/TextDemo.ts @@ -200,12 +200,12 @@ class TextDemo extends Panel { text({ text: "Icon Font text from assets/fonts/ \ue631 ", textSize: 10, - font: 'fonts/assets_iconfont' + font: 'assets/fonts/assets_iconfont' }), text({ text: "Icon Font text from assets/fonts/ \ue631 ", textSize: 30, - font: 'fonts/assets_iconfont.ttf' + font: 'assets/fonts/assets_iconfont.ttf' }), text({ text: "This is line Spaceing 0,\nSecond line", diff --git a/doric-iOS/Example/Example.xcodeproj/project.pbxproj b/doric-iOS/Example/Example.xcodeproj/project.pbxproj index 2e1c5d1e..2b44c32e 100644 --- a/doric-iOS/Example/Example.xcodeproj/project.pbxproj +++ b/doric-iOS/Example/Example.xcodeproj/project.pbxproj @@ -10,9 +10,6 @@ 0D90124EDB10BB254CBAD76B /* libPods-ExampleTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8A68295410FE7498FAFBB726 /* libPods-ExampleTests.a */; }; 1BCA4753C9D35032A0288028 /* libPods-ExampleUITests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD2D6CCC8DCDABA7F86EAE7C /* libPods-ExampleUITests.a */; }; 52F56220E3A039DD5E3EA3B2 /* libPods-Example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4650C6577493F533466F084B /* libPods-Example.a */; }; - 8B429D94241B66A300572570 /* iconfont.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 8B429D93241B66A200572570 /* iconfont.ttf */; }; - 8B5E51F126A6B68E00D06220 /* Hanabi.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 8B5E51F026A6B68900D06220 /* Hanabi.ttf */; }; - 8B71685F26A5AF0E0087291A /* DINPro.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 8B71685E26A5AE9A0087291A /* DINPro.ttf */; }; 8BCADA7C23CD5B65005EEF96 /* NavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BCADA7B23CD5B64005EEF96 /* NavigationController.m */; }; D751D4B065D8D4FA6594B5EE /* DemoVC.m in Sources */ = {isa = PBXBuildFile; fileRef = D751D19E97EF4EDD7588FEBE /* DemoVC.m */; }; D751DDB012BAF476A252CD93 /* DemoLibrary.m in Sources */ = {isa = PBXBuildFile; fileRef = D751D2175D09F2C10691FB81 /* DemoLibrary.m */; }; @@ -25,6 +22,8 @@ E2334B0822E9D2070098A085 /* ExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2334B0722E9D2070098A085 /* ExampleTests.m */; }; E2334B1322E9D2070098A085 /* ExampleUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2334B1222E9D2070098A085 /* ExampleUITests.m */; }; E2C9315923B0A263007933D9 /* src in Resources */ = {isa = PBXBuildFile; fileRef = E2C9315823B0A263007933D9 /* src */; }; + E2EF0C0F275F6702007801C5 /* iconfont.ttf in Resources */ = {isa = PBXBuildFile; fileRef = E2EF0C0E275F6702007801C5 /* iconfont.ttf */; }; + E2EF0C13275F6934007801C5 /* assets in Resources */ = {isa = PBXBuildFile; fileRef = E2EF0C12275F6934007801C5 /* assets */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -50,9 +49,6 @@ 4650C6577493F533466F084B /* libPods-Example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Example.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 8231E841CCAF382F85C9F576 /* Pods-Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Example/Pods-Example.debug.xcconfig"; sourceTree = ""; }; 8A68295410FE7498FAFBB726 /* libPods-ExampleTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ExampleTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 8B429D93241B66A200572570 /* iconfont.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = iconfont.ttf; path = "../../../doric-demo/bundle/iconfont.ttf"; sourceTree = ""; }; - 8B5E51F026A6B68900D06220 /* Hanabi.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = Hanabi.ttf; path = "../../../doric-demo/bundle/Hanabi.ttf"; sourceTree = ""; }; - 8B71685E26A5AE9A0087291A /* DINPro.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = DINPro.ttf; path = "../../../doric-demo/bundle/DINPro.ttf"; sourceTree = ""; }; 8BCADA7A23CD5B5F005EEF96 /* NavigationController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NavigationController.h; sourceTree = ""; }; 8BCADA7B23CD5B64005EEF96 /* NavigationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NavigationController.m; sourceTree = ""; }; B93423722F2E06DC238CDD18 /* Pods-ExampleUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExampleUITests.release.xcconfig"; path = "Pods/Target Support Files/Pods-ExampleUITests/Pods-ExampleUITests.release.xcconfig"; sourceTree = ""; }; @@ -79,6 +75,8 @@ E2334B1222E9D2070098A085 /* ExampleUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ExampleUITests.m; sourceTree = ""; }; E2334B1422E9D2070098A085 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; E2C9315823B0A263007933D9 /* src */ = {isa = PBXFileReference; lastKnownFileType = folder; name = src; path = "../../../doric-demo/bundle/src"; sourceTree = ""; }; + E2EF0C0E275F6702007801C5 /* iconfont.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = iconfont.ttf; path = "../../doric-demo/bundle/assets/iconfont.ttf"; sourceTree = ""; }; + E2EF0C12275F6934007801C5 /* assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = assets; path = "../../../doric-demo/bundle/assets"; sourceTree = ""; }; FD2D6CCC8DCDABA7F86EAE7C /* libPods-ExampleUITests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ExampleUITests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -136,6 +134,7 @@ E2334AE222E9D2060098A085 = { isa = PBXGroup; children = ( + E2EF0C0E275F6702007801C5 /* iconfont.ttf */, E2334AED22E9D2060098A085 /* Example */, E2334B0622E9D2070098A085 /* ExampleTests */, E2334B1122E9D2070098A085 /* ExampleUITests */, @@ -158,9 +157,7 @@ E2334AED22E9D2060098A085 /* Example */ = { isa = PBXGroup; children = ( - 8B71685E26A5AE9A0087291A /* DINPro.ttf */, - 8B5E51F026A6B68900D06220 /* Hanabi.ttf */, - 8B429D93241B66A200572570 /* iconfont.ttf */, + E2EF0C12275F6934007801C5 /* assets */, E2C9315823B0A263007933D9 /* src */, E2334AEE22E9D2060098A085 /* AppDelegate.h */, E2334AEF22E9D2060098A085 /* AppDelegate.m */, @@ -308,12 +305,11 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 8B5E51F126A6B68E00D06220 /* Hanabi.ttf in Resources */, - 8B71685F26A5AF0E0087291A /* DINPro.ttf in Resources */, + E2EF0C0F275F6702007801C5 /* iconfont.ttf in Resources */, E2334AFB22E9D2070098A085 /* LaunchScreen.storyboard in Resources */, E2334AF822E9D2070098A085 /* Assets.xcassets in Resources */, + E2EF0C13275F6934007801C5 /* assets in Resources */, E2334AF622E9D2060098A085 /* Main.storyboard in Resources */, - 8B429D94241B66A300572570 /* iconfont.ttf in Resources */, E2C9315923B0A263007933D9 /* src in Resources */, ); runOnlyForDeploymentPostprocessing = 0;