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

Can we shrink or scale the slice text? Some of slice Word is skipped #31

Open
chirag05k opened this issue Jun 16, 2022 · 2 comments
Open

Comments

@chirag05k
Copy link

chirag05k commented Jun 16, 2022

Hello, @sh-khashimov thanks for your awesome library.

I am using Podium Wheel Layout using variousWheelPodiumConfiguration

- What is the issue I am facing

  • In the slice, the text does not fully appear it's cropping somehow, I have also added an image for your reference

- What I have tried

  • I have set up the content margin & TextPreferences as well
          var wheelPreferences = SFWConfiguration.WheelPreferences(circlePreferences: circlePreferences,
                                                                 slicePreferences: slicePreferences,
                                                                 startPosition: .right)
        wheelPreferences.contentMargins = Margins(top: 0, left: 0, right: 0, bottom: 0)
       var preferences = TextPreferences(textColorType: textColorType,
                                         font: font,
                                         verticalOffset: 0)
       preferences.alignment = .left
       preferences.orientation = .vertical
       preferences.isCurved = false
       preferences.spacing = -1
       preferences.numberOfLines = 0
       public extension ImagePreferences {
          static var variousWheelPodiumImage: ImagePreferences {
             let imagePreferences = ImagePreferences(preferredSize: CGSize(width: 50, height: 50), verticalOffset: 0)
           return imagePreferences
         }
      }
  • I have decreased the font size but the large screen device shows a really small size of the font

- Questions ❓

  • Can we auto-shrink the font according to the device?
  • Do you have a temporary solution for it? If yes I will add it and also work on this project and I will create the PR
  • Could you please quickly suggest to me a file where I can review and temporarily fix my problem in the project?

Issue Reference:

Screenshot 2022-06-16 at 11 32 55 AM

@chirag05k chirag05k changed the title Can shrink the slice text? Can we shrink or scale the slice text? Jun 16, 2022
@chirag05k chirag05k changed the title Can we shrink or scale the slice text? Can we shrink or scale the slice text? Some of slice Word is skipped Jun 21, 2022
@chirag05k
Copy link
Author

chirag05k commented Dec 15, 2022

@sh-khashimov Any updates? We are still facing the issue any workaround I can apply for or any other details you require from my end? for more understanding
You can also share the file which I have to look out I will more focus on that part and will create PR for the same.

@chirag05k chirag05k reopened this Dec 15, 2022
@sh-khashimov
Copy link
Owner

Hi chirag05k, the easiest way is to change the font size for TextPreferences on your side according to your view or device size.
If you want to contribute, TextDrawing.swift contains logic on how the text is drawn. However, it's the most completed part of the project.
Before sending the PR, make sure that your feature works cross-platform.
Cheers.

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

2 participants