First off this is a SWIFT project, but I am pretty sure the same issue exists using Xojo controls.
- A Canvas Vertically aligned to the right of a TextView (both the same height)
- The Textview contains lines of text in a mono-space font
- Attempt to write characterss in the Canvas to line up with the textview text
First… I “could” use another TextView, but I have a future need to “draw” over this “canvas”
The problem is determining two things
- How far from the top of the canvas to place the FIRST characters
- The line spacing to use
I have expermented with various font sizes attempting to find some combination of the font metrics the would provide values for these two situatons. and I’ve come close, the problem is (I think) partially due to the fact that text is “drawn” at a pixel/point level, but the metrics are DOUBLES
In this graphic the cyan is a canvas, the white is a textview, I need to have the “T” in both align…