xvrh / lottie-flutter

Render After Effects animations natively on Flutter. This package is a pure Dart implementation of a Lottie player.
https://pub.dev/packages/lottie
MIT License
1.15k stars 197 forks source link

Font not Rendering properly #299

Closed linslouis closed 11 months ago

linslouis commented 11 months ago

I am trying to display a Lottie in flutter with this flutter package. But the fonts are not properly rendering . I am using a Zip file to store Lottie json and font. the same zip Lottie package working fine in android .Here is the Result in android ScreenShot1 And her is what showing in flutter ScreenShot2

And this is my animation.zip Zip FIle

Here is my Lottie Json `{ "v": "5.9.0", "fr": 29.9700012207031, "ip": 0, "op": 30.0000012219251, "w": 1920, "h": 1080, "nm": "TEXTFONTTEST", "ddd": 0, "assets": [

], "fonts": { "list": [ { "origin": 3, "fPath": "images/font_0", "fClass": "", "fFamily": "Vegan Style Personal Use", "fWeight": "", "fStyle": "Regular", "fName": "VeganStylePersonalUse", "ascent": 101.086743354797 } ] }, "layers": [ { "ddd": 0, "ind": 1, "ty": 5, "nm": "LINS LOUIS", "sr": 1, "ks": { "o": { "a": 0, "k": 100, "ix": 11 }, "r": { "a": 0, "k": 0, "ix": 10 }, "p": { "a": 0, "k": [ 965, 749, 0 ], "ix": 2, "l": 2 }, "a": { "a": 0, "k": [ 0, 0, 0 ], "ix": 1, "l": 2 }, "s": { "a": 0, "k": [ 100, 100, 100 ], "ix": 6, "l": 2 } }, "ao": 0, "t": { "d": { "k": [ { "s": { "sz": [ 1534, 212 ], "ps": [ -767, -287 ], "s": 224, "f": "VeganStylePersonalUse", "t": "LINS LOUIS", "ca": 0, "j": 5, "tr": 0, "lh": 268.800018310547, "ls": 0, "fc": [ 0, 1, 0.444 ], "sc": [ 0, 0.404, 0.032 ], "sw": 8, "of": true }, "t": 0 } ] }, "p": {

    },
    "m": {
      "g": 1,
      "a": {
        "a": 0,
        "k": [
          0,
          0
        ],
        "ix": 2
      }
    },
    "a": [

    ]
  },
  "ip": 0,
  "op": 900.000036657751,
  "st": 0,
  "bm": 0
}

], "markers": [

] }`

My Code Lottie.asset('assets/lottiefiles/animation.zip'),

How to show my Lottie Properly in flutter with this library?

xvrh commented 11 months ago

Can you try with the latest version from git and let me know if it works for you?

In your pubspec.yaml

dependencies:
  lottie:
    git:
      url: https://github.com/xvrh/lottie-flutter.git
      ref: 'ab9b583'
linslouis commented 11 months ago

It worked