-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tab indents should align correctly #1791
Comments
I have already worked on tabs and have a POC branch working. I have used the simplest way in which I have extended the image/font so that DrawString and MeasureString implement the tabs by moving the dot to the required offset before drawing the next rune. |
I had not considered the former approach, I assumed we had to do it in the label because the tab could be programatic. |
Implementing it in DrawString is definitely the fastest, both in coding time and runtime and very easy to back out. I still have to look at how tabs should work with justification, left is easy, the rest ...? Assuming I have not made a huge mistake, I could see that it could be dropped in as a bug fix for 2.0. |
As I understand it tabs need to align to a position to be completed properly - i.e. "1 inch" or "8 spaces". |
Yeup, correct at the moment to prove it works I have it hardcoded at 4 spaces. Which is the same as it is now. I started looking at adding it to the theme under text style but was waiting for approval of the concept before digging into the new theme code. |
That sounds like a good plan |
This is now landed on |
In #761 we made a rough approximation.
In full implementation we need to align to the next tab-location so that " \tfoo" and "\tfoo" align.
The text was updated successfully, but these errors were encountered: