H hanyelmehy Active Member Licensed User Longtime User Sep 17, 2016 #1 And idea how to adjust font size when using DrawTextRotated (something like AdjustFontSizeToFit)
Erel B4X founder Staff member Licensed User Longtime User Sep 18, 2016 #2 You can find the maximum font size with this code: B4X: Sub MaxFontToFitWidth(text As String, width As Int) As Font Dim f As Font For i = 5 To 50 f = Font.CreateNew(i) If text.MeasureWidth(f) > width Then Exit End If Next Return f End Sub Upvote 0
You can find the maximum font size with this code: B4X: Sub MaxFontToFitWidth(text As String, width As Int) As Font Dim f As Font For i = 5 To 50 f = Font.CreateNew(i) If text.MeasureWidth(f) > width Then Exit End If Next Return f End Sub