Git Product home page Git Product logo

Comments (4)

BrOrlandi avatar BrOrlandi commented on May 29, 2024

Let me see if I understand your issue.
I think you having this spacing problem because the text-align is justify.
You want an option to set the text-align to center?

from starwarsintrocreator.

zawsx avatar zawsx commented on May 29, 2024

Here's an example using the first three lines:
..
It is a period of civil war. Rebel
spaceships, striking from a
hidden base, have won their first
...
The line:
spaceships, striking from a

has more inter-word spaces than most other lines.
http://www.w3.org/wiki/CSS/Properties/word-spacing
If that line was spaced differently, it might be able to accommodate an extra word:

spaceships, striking from a hidden

that in turn might allow the final line to not be a single word:
...
It is a period of civil war. Rebel
spaceships, striking from a hidden
base, have won their first victory
against the evil Galactic Empire.
...
Just a suggested feature improvement. No big deal.
Might make your work look better when other than your default text is being used.

from starwarsintrocreator.

BrOrlandi avatar BrOrlandi commented on May 29, 2024

I've tested here and I figure out, with -4px in word-spacing will get the result you proposed to the default text. But in other texts we may not have the same result because it depends on the last word on a line.
Take the two lines, from lorem ipsum, bellow:

ligula pretium, bibendum ex sit
amet, mollis risus. Donec
sollicitudin hendrerit mollis

The word "sollicitudin" will take the last line because the word is too big for the second line.
Therefore I will not change the word-spacing because it will not improve the spacing on most cases.

from starwarsintrocreator.

zawsx avatar zawsx commented on May 29, 2024

Thanks Bruno - I appreciate the care you take. If I can discover an algorithm that will do 'best fit' then I'll post it here.
Thanks again for the good work.
C.

from starwarsintrocreator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.