iOS text font support from custom loader.

This commit is contained in:
吴尚昆
2022-03-02 17:09:26 +08:00
committed by osborn
parent 92bbe90165
commit 93e949ef41
11 changed files with 3163 additions and 1697 deletions

View File

@@ -1,4 +1,4 @@
import { Panel, Group, scroller, vlayout, layoutConfig, LayoutSpec, Input, Gravity, log, input, text, Color, Text, InputType, hlayout, GradientOrientation } from "doric";
import { Panel, Group, scroller, vlayout, layoutConfig, LayoutSpec, Input, Gravity, log, input, text, Color, Text, InputType, hlayout, GradientOrientation, AssetsResource } from "doric";
import { title } from "./utils";
@Entry
class TextDemo extends Panel {
@@ -207,6 +207,17 @@ class TextDemo extends Panel {
textSize: 30,
font: 'assets/fonts/assets_iconfont.ttf'
}),
text({
text: "Font from custom loader.",
textSize: 10,
font: 'Hanabi'
}),
text({
text: "Font from custom loader.",
textSize: 30,
textColor: Color.BLUE,
font: new AssetsResource('Hanabi.ttf')
}),
text({
text: "This is line Spaceing 0,\nSecond line",
maxLines: 0,