-
Notifications
You must be signed in to change notification settings - Fork 11
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
Support setting tabs width #174
Comments
A great idea, however I don't think it is quite that straight forward - I think you also need to have a starting position, because tab alignment is actually relative to the page and not to the first character of a run... |
Well, I think what I've in mind is indeed a lot simpler than tabs alignement. I think what you describe is something about "dynamic" adjustment, depending on the position of the run with respect to the page start ? |
What you outline I think only works when the tabs are right at the beginning of a line. But for example "\t\tpoint a:\t detail here" won't work as expected. A while back I hoped to contribute the algorithm we use in Fyne for this work but licensing doesn't allow. |
Tabs work in much more complicated way in e.g. MS Word's tab stops. Are tabs really this library's scope? |
I'm not sure it is really possible to provide a generic model for various use cases including MS Word, but I keep my fingers crossed :) |
They way we do it in Fyne is to pass in the "current offset" into the tabletop function so that they incremented by "offset mod tabwidth" and after that it's just the basic math. OK not quite that simple - you might need 2 offsets: the current offset and the offset used on subsequent lines. |
I would like to support setting the width of tabs in a run, following the CSS 'tab-size' property.
That could be exposed with the method
(At a first glance, the implementation would be somewhat similar to
Output.AddWordSpacing
)What do you think ?
The text was updated successfully, but these errors were encountered: