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:

1719554139396.png
 

Attachments

  • SnapshotTest.zip
    78.4 KB · Views: 85
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
Top