Nothing Special   »   [go: up one dir, main page]

Skip to content
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

First-line indentation #40

Open
emilk opened this issue Oct 15, 2020 · 2 comments
Open

First-line indentation #40

emilk opened this issue Oct 15, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@emilk
Copy link
emilk commented Oct 15, 2020

First-line indentation is very common in typesetting, and looks like this:

   The first line starts
further to the right than
the subsequent lines of
text.

It would be wonderful if fontdue could support it, e.g. with a simple first_line_indentation: f32 in LayoutSettings, especially if this is simple to implement. Of course the setting only makes sense for HorizontalAlign::Left.

I am writing an immediate mode GUI and this would enable me to seemlessly mix text with others widgets (in a row-based fashion). Basically I would use first_line_indentation to indicate that I've already used up the first few pixels of the first line (maybe there is a button there or some other text using a different font).

@mooman219
Copy link
Owner

I see your goal but I don't like this idea specifically. A compromise would be the ability to define a TextStyle with a minimum size such that you can insert blank sections of any size anywhere. Is that sufficient?

@emilk
Copy link
Author
emilk commented Oct 16, 2020

That sounds like more than sufficient to me! And it's not at all a compromise, but a cleaner and more general solution to the problem I want to solve - good call!

@mooman219 mooman219 added the enhancement New feature or request label Oct 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants