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

Text: look for hyphenation in more words if needed #320

Merged
merged 3 commits into from
Nov 28, 2019

Commits on Nov 27, 2019

  1. Text: look for hyphenation in more words if needed

    When laying out lines and looking for wrap possibilities,
    we use the last breakable space found. But we also try to
    hyphenate the word that follows it to grab a bit of it.
    In the case where there are more words after that last
    breakable space (words separated by a non-breakable spaces,
    or where our AVOID_WRAP_BEFORE/AFTER checks decided that
    wrap is to be avoided at these spaces), we would only look
    at hyphenating the last word of this series of words: if
    that fails, we would not try to hyphenate previous words.
    We know check hyphenation in all these words.
    
    Sample test case: a french line ending with "pourqu'elle"
    overflowing max line width (wrap at ' is avoided):
    - if max line width ($) is met at "pourq$u'elle", "pour-qu"
      hyphenation would be found and used.
    - if max line width is met at "pourqu'el$le", only "elle"
      would be checked, and no hyphenation found and we would wrap
      before "pourqu" ; "pour-qu" would not be considered at all.
      It will be now.
    poire-z committed Nov 27, 2019
    Configuration menu
    Copy the full SHA
    ae0399f View commit details
    Browse the repository at this point in the history

Commits on Nov 28, 2019

  1. Configuration menu
    Copy the full SHA
    a9c718f View commit details
    Browse the repository at this point in the history
  2. getHtml(): grab dir= and lang= attributes from upper nodes

    Might be useful with popup footnotes (the HTML snippet
    is given to MuPDF, even if its RTL support is currently
    limited).
    poire-z committed Nov 28, 2019
    Configuration menu
    Copy the full SHA
    1720c04 View commit details
    Browse the repository at this point in the history