1. 18 2月, 2016 6 次提交
  2. 13 2月, 2016 2 次提交
  3. 16 1月, 2016 5 次提交
  4. 08 1月, 2016 1 次提交
  5. 09 12月, 2015 5 次提交
  6. 08 12月, 2015 1 次提交
    • R
      Avoid integer overflows in parsing fonts · 6299a6ba
      Raph Levien 提交于
      A malformed TTF can cause size calculations to overflow. This patch
      checks the maximum reasonable value so that the total size fits in 32
      bits. It also adds some explicit casting to avoid possible technical
      undefined behavior when parsing sized unsigned values.
      
      Bug: 25645298
      Change-Id: Id4716132041a6f4f1fbb73ec4e445391cf7d9616
      (cherry picked from commit 183c9ec2)
      6299a6ba
  7. 03 11月, 2015 1 次提交
    • R
      Suppress linebreaks in emoji ZWJ sequences - DO NOT MERGE · c65e6f1e
      Raph Levien 提交于
      Due to the way emoji ZWJ sequences are defined, the ICU line breaking
      algorithm determines that there are valid line breaks inside the
      sequence. This patch suppresses these line breaks.
      
      Bug: 25433289
      Change-Id: I225ebebc0f4186e4b8f48fee399c4a62b3f0218a
      c65e6f1e
  8. 30 10月, 2015 1 次提交
    • R
      Accept variation selector in emoji sequences - DO NOT MERGE · adaf42f0
      Raph Levien 提交于
      This patch basically ignores variation selectors for the purpose of
      itemization into font runs. This allows GSUB to be applied when input
      sequences contain variation selectors.
      
      Bug: 25368653
      Change-Id: I9c1d325ae0cd322c21b7e850d0ec4d73551b2372
      adaf42f0
  9. 15 10月, 2015 3 次提交
    • R
      Complete half-done cherry-picking of Android.mk. DO NOT MERGE · e8264e06
      Roozbeh Pournader 提交于
      The previous commit, 6e2cccdc, was
      incompletely cherry-picked. This adds the missing parts.
      
      Bug: 24570591
      Change-Id: I1097c60587fb8a88cfe6b8ffed5b1689d9bdd429
      e8264e06
    • R
      Explicitly set utf-8 encoding for hyb file verification · e5e7aa0e
      Raph Levien 提交于
      Not all platforms default to UTF-8 encoding, so we set it explicitly.
      This patch should fix build breakages resulting from failed verification
      of binary hyb files for hyphenation patterns.
      
      Bug: 24570591
      Change-Id: I65ac4536d3436586c2633e2b57554fc6ff16d3a8
      (cherry picked from commit 138b93f0)
      e5e7aa0e
    • R
      Binary format for hyphenation patterns · 6e2cccdc
      Raph Levien 提交于
      In the current state, hyphenation in all languages than Sanskrit seems
      to work (case-folding edge cases). Thus, we just disable Sanskrit.
      Packed tries are implemented, but not the finite state machine
      (space/speed tradeoff).
      
      This commit contains a throw-away test app, which runs on the host.
      I think I want to replace it with unit tests, but I'm including it in
      the CL because it's useful during development.
      
      Bug: 21562869
      Bug: 21826930
      Bug: 23317038
      Bug: 23317904
      Bug: 24570591
      Change-Id: I7479a565a4a062fa319651c2c14c0fa18c5ceaea
      (cherry picked from commit f0be43de)
      6e2cccdc
  10. 30 7月, 2015 1 次提交
    • R
      Improve fallback where explicit variant is not given · 90a09c3f
      Raph Levien 提交于
      In computing scores for which fallback font to choose, a match of a
      variant given explicitly in the xml config file scores higher than a
      family with no explicit variant. One consequence is that U+2010
      HYPHEN is chosen from the Naskh Arabic font in the fallback case.
      
      This patch scores families with no variants as a match (effectively
      the same as if the xml file specified both variants). Thus, it will
      choose the first matching font (Roboto), which is a better choice.
      
      This patch also revises the list of "sticky" characters to include
      various hyphens, so Arabic (and potentially other scripts) text that
      includes hyphens can access the script-specific variants matched to
      the underlying text.
      
      Bug: 22824219
      Change-Id: I6ec1043037f89cad50ca99ac24c473395546bcdf
      90a09c3f
  11. 22 7月, 2015 2 次提交
  12. 21 7月, 2015 1 次提交
    • R
      Consistently apply break opportunities in text spans · e9ec9a1d
      Raph Levien 提交于
      It's essential not to apply a break opportunity within a replacement
      span, otherwise things can happen such as displaying the span twice.
      The old code tested this case based on zero-width characters.
      However, this test was both imprecise, and also in some cases read
      uninitialized values from the mCharWidths array, which in turn led
      to inconsistent line breaking of the same text.
      
      This patch applies all line break opportunities (as identified by
      ICU) within text (as opposed to replacement spans), and also applies
      break opportunities at the beginning and end of replacement spans,
      but avoids breaks within a replacement span.
      
      Bug: 20138621
      Change-Id: I36baeb44d6808356649e1bb69ca57f093fc8c723
      e9ec9a1d
  13. 16 7月, 2015 2 次提交
    • R
      Use ICU to lowercase words to hyphenate. · cdd19dad
      Roozbeh Pournader 提交于
      Previously, the standard C tolower() function was used, which
      didn't support any characters beyond the basic ASCII letters.
      
      Bug: 22506121
      Change-Id: Ibb81121caa29be44fbb59aa98891e9faafc57592
      cdd19dad
    • R
      Add missing hyphen-like characters. · daf62d0e
      Roozbeh Pournader 提交于
      This adds various hyphen-like characters missed in the previous
      patch, that should disallow automatic hyphenation of words containing
      them.
      
      Bug: 22484266
      Change-Id: Ie972cb50384dbe0aa1ab5ec50286b75f9877953a
      daf62d0e
  14. 15 7月, 2015 1 次提交
    • R
      Avoid re-hyphenating already-hyphenated phrases. · baf6d0a4
      Roozbeh Pournader 提交于
      Previously, automatic hyphenation blindly took almost every line
      breaking opportunity as a word break, so words like "low-budget" were
      treated as two separate words, "low-", and "budget", each
      automatically hyphenated.
      
      This patch makes sure the subwords in already-hyphenated phrases are
      not passed to the automatic hyphenator, while keeping the possibility
      of a potential line break where a hyphen already exists.
      
      Bug: 22484266
      Bug: 22287425
      Change-Id: Ie46dbdd70e993d64a9b9cf44b4ae93b21459dbc2
      baf6d0a4
  15. 10 7月, 2015 1 次提交
    • R
      Add HyphenEdit to layout cache · 6c4d167b
      Raph Levien 提交于
      We bypass the word layout cache for "complex" cases, which includes
      things like OpenType features. We were counting a hyphen edit as such
      a case, but the problem is that we measure a _lot_ of these when
      doing layout with hyphenation.
      
      This patch adds plumbing for hyphen edits to the layout cache, so
      that word fragments with hyphens can be cached as well.
      
      Bug: 22378829
      
      Change-Id: Idba4df4faa14f48a5faccc8a7a7955a36c19ef27
      6c4d167b
  16. 01 7月, 2015 1 次提交
    • R
      Allow clusters to start with zero-width characters · 3e0fc64d
      Raph Levien 提交于
      The logic in getRunAdvance() assumed that any zero-width character was
      part of the preceding cluster, which is valid most of the time. However,
      characters such as ZWNBSP (U+FEFF) renders as a zero width glyph
      and is also a grapheme cluster boundary. This patch adds a clause to
      handle that case.
      
      Bug: 22121742
      Change-Id: Iad79a7d988bded1ef05f0fd7905d20669ea22051
      3e0fc64d
  17. 30 6月, 2015 1 次提交
    • R
      Fix logspam and incorrect cluster offset · 91425f05
      Raph Levien 提交于
      An incorrect cluster offset calculation was causing a lot of log
      messages to appear. Separately, a confusion between #if and #ifdef was
      causing unintended logging of line breaks. This patch fixes both.
      
      Bug: 22178333
      Change-Id: I2b3673ed66c784f5082fd127a8dc10bd3df6ed79
      91425f05
  18. 27 6月, 2015 1 次提交
    • R
      Disable letterspacing for connected scripts · e8721b2d
      Raph Levien 提交于
      The appearance of letterspacing with scripts with cursive connections
      is poor, so we simply disable letterspacing for those scripts. There
      may be some cases where some form of letterspacing is desirable, but
      this gives the highest likelihood that the final result will be good
      without requiring additional work from clients.
      
      Bug: 21935803
      Change-Id: Ie25266249ac3a2605aa89ef5132e8edbe3a06d35
      e8721b2d
  19. 25 6月, 2015 1 次提交
    • R
      Separate additional penalty for last line with hyphen · a6f8bf6f
      Raph Levien 提交于
      A recent change added a penalty for a hyphen at the last line break,
      which is visually undesirable. However, the penalty was assessed to
      "widthScore", which broke the assumption (used for another
      optimization) that widthScore increases monotonically. This patch
      separates the penalty into a different parameter, restoring the
      validity of the monotonicity assumption.
      
      Bug: 22066119
      Change-Id: I6a47a350ef3ceee2f00ee430d6954d0c307227f0
      a6f8bf6f
  20. 13 6月, 2015 3 次提交