examples: Add default font fallback to LottieExpressions demo

Text Doc Expressions sample requires default font to show.
This commit is contained in:
Jinny You 2025-03-28 16:11:30 +09:00 committed by Hermet Park
parent 11f59c03ae
commit 1928f46e6a
2 changed files with 4 additions and 0 deletions

View file

@ -93,6 +93,9 @@ struct UserExample : tvgexam::Example
{ {
if (!canvas) return false; if (!canvas) return false;
//The default font for fallback in case
tvg::Text::load(EXAMPLE_DIR"/font/Arial.ttf");
//Background //Background
auto shape = tvg::Shape::gen(); auto shape = tvg::Shape::gen();
shape->appendRect(0, 0, w, h); shape->appendRect(0, 0, w, h);

View file

@ -0,0 +1 @@
{"v":"5.6.5","fr":25,"ip":0,"op":88,"w":1920,"h":1080,"nm":"Composizione 1","ddd":0,"assets":[],"fonts":{"list":[{"origin":0,"fPath":"","fClass":"","fFamily":"Gotham","fWeight":"700","fStyle":"Ultra","fName":"Gotham-Ultra","ascent":72.9995727539062}]},"layers":[{"ddd":0,"ind":1,"ty":5,"nm":"10","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[568.018,698.615,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"t":{"d":{"x":"var $bm_rt;\nvar beginCount, stopCount, beginTime, countDur;\nbeginCount = 0;\nstopCount = 10;\nbeginTime = 0;\ncountDur = 1.3;\n$bm_rt = $bm_sum($bm_sum('', Math.round(linear(time, beginTime, $bm_sum(beginTime, countDur), beginCount, stopCount))), '+');","k":[{"s":{"s":450,"f":"Gotham-Ultra","t":"10","j":0,"tr":0,"lh":540,"ls":0,"fc":[0,0,0]},"t":0}]},"p":{},"m":{"g":1,"a":{"a":0,"k":[0,0],"ix":2}},"a":[]},"ip":0,"op":750,"st":0,"bm":0}],"markers":[]}