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

Rewrite the line breaking algorithm #301

Closed
liZe opened this issue Mar 8, 2016 · 0 comments
Closed

Rewrite the line breaking algorithm #301

liZe opened this issue Mar 8, 2016 · 0 comments
Labels
Milestone

Comments

@liZe
Copy link
Member

@liZe liZe commented Mar 8, 2016

Line breaking currently relies on Pango. That's bad, because (1) Pango is not aware of the CSS-specific rules, and (2) the current implementation always allows line breaking when a tag is open or close.

Many reported bugs rely on this feature. But unfortunately, implementing a real line breaking algorithm needs right-to-left and bidi (see #106).

@liZe liZe added the feature label Mar 8, 2016
liZe added a commit that referenced this issue Jan 2, 2017
As ::first-letter depends on white space handling, we must create the
box after collapsing spaces, not during the build of the box tree.

This commit makes WeasyPrint pass most of the W3C tests related to
first-letter (and never crash). Known problems left include:

- list markers are considered as the first letter,
- lines may break between the first letter and the rest of the text
  (see #163 and #301),
- the CSS attributes are all kept, some should probably be removed (the
  spec doesn't give a whole list).

Even if W3C tests makes me quite confident (some of them are crazy),
tests must be added in WeasyPrint too.
@liZe liZe mentioned this issue May 13, 2017
@liZe liZe mentioned this issue Aug 4, 2017
@liZe liZe mentioned this issue Sep 6, 2017
liZe added a commit that referenced this issue Oct 23, 2017
Fix #301.
@liZe liZe added this to the v0.42 milestone Oct 23, 2017
@liZe liZe closed this in #528 Nov 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
@liZe and others
You can’t perform that action at this time.