SwiftFortuneWheel
SwiftFortuneWheel copied to clipboard
Can we shrink or scale the slice text? Some of slice Word is skipped
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:

@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.
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.