Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

use glyphfonts with text delegate#105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
itslenny wants to merge1 commit intoxvrh:master
base:master
Choose a base branch
Loading
fromJoe-Coffee:use-glyphfonts-with-text-delegate

Conversation

@itslenny
Copy link

@itslennyitslenny commentedSep 28, 2020
edited
Loading

Hi, this should maybe be an "issue" but I needed a fix right away for my own uses so this is my little hack fix. Hoping this can open a discussion. Obviously, I don't expect this to PR to be merged as-is.

In my app I'm using glyph fonts to represent numbers. There are several labels some with words and some with numbers. Two labels display a score to the user which needs to be modified at runtime. In our AE file we include numbers 0-9 to enable the use of glyph fonts for this, but for some reason when the text delegate is used glyph fonts are disabled... why?

Simply adding the text delegates causes all glyphs in the entire animation to break...

delegates: LottieDelegates(          text: (text) => text)

This simple PR just re-enables it and adds delegate support to the text_layer code. Works perfectly.

Why were glyph fonts disabled when text delegate is used? How can this be changed to provide the user the option to use font text of glyph font (regardless of if the delegate is used)?

For now we're using this forked version to un-break our app, but I'd love to switch back to your package.

@xvrh
Copy link
Owner

Hi@itslenny,
Thank you for the PR.

This package is a pure translation of theLottie-android project and that condition seems to exist in the original library:https://github.com/airbnb/lottie-android/blob/master/lottie/src/main/java/com/airbnb/lottie/LottieDrawable.java#L896

So, to be honest, I don't known why glyph font are disabled when there is a delegate.

If you think it doesn't have side effects. I'm totally ok to remove the check and merge your pull request.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@itslenny@xvrh

[8]ページ先頭

©2009-2025 Movatter.jp