B4J Question Text in Snapshot of TextFlow is being Cut

xulihang

Active Member
Licensed User
Longtime User
I am using TextFlow to render text into images using the Snapshot method. But for some fonts, the text in the snapshot is being cut. Are there any parameters I can use to solve this problem? I've attached the test project.

Textflow in the left and the snapshot in the right:

 

Attachments

  • SnapshotTest.zip
    78.4 KB · Views: 92
Last edited:

xulihang

Active Member
Licensed User
Longtime User
Setting the insets seems a solution. But if the font size becomes bigger, I have to adjust the insets as well.

B4X:
Dim insets As JavaObject
insets.InitializeNewInstance("javafx.geometry.Insets",Array(5.0,5.0,5.0,5.0))
Dim jo As JavaObject = p
jo.RunMethod("setPadding",Array(insets))
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…