Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compose Image clips edges of some icons #648

Open
8 tasks done
crowleysimon opened this issue Jul 24, 2024 · 0 comments
Open
8 tasks done

Compose Image clips edges of some icons #648

crowleysimon opened this issue Jul 24, 2024 · 0 comments

Comments

@crowleysimon
Copy link

About this issue

While working with the library I noticed some of my icons were being clipped/cropped at the edges. Through some experimentation I got it working by setting respectFontBounds to false and paddingDP to 0. I assume this isn't intentional/expected though.

I have created a small sample project using the crown icon from FontAwesome demonstrating the behaviour using Compose vs Views vs Compose with respectFontBounds set to false.

I had a quick dig around in IconicsPainter and the pathBounds are larger than the viewBounds, setting respectFontBounds impacts the textSize instead of the pathBounds though.

https://github.com/crowleysimon/IconicsClipDemo

Details

  •  Used library version - Tested with 5.40 and 5.5.0-b01
  •  Other used libraries, potential conflicting libraries - used only the core compose libraries

Checklist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant