1. 16 3月, 2017 1 次提交
    • R
      In greedy line breaking, repeat breaks until the line fits · 67d1601c
      Roozbeh Pournader 提交于
      Previously, in greedy line breaking, when a line overflowed, we found
      the best line breaking candidate before it and broke the line there.
      But we didn't check to see if the remaining part now fits in a line.
      
      With this change, we now repeat checking for overflows, and break
      again until we have no breaking opportunity or the remaining text now
      fits in a line.
      
      Also found an issue with greedy line breaking and keeping the
      hyphenation edit for the next line which is now fixed.
      
      Test: Manual. The issue reported in the bug is now fixed.
      Bug: 34185255
      Bug: https://code.google.com/p/android/issues/detail?id=231437
      Bug: 33560754
      Change-Id: I93bdd341e4f8e1257710e453e4938f224cb2a1ff
      67d1601c
  2. 15 3月, 2017 2 次提交
    • R
      Break grapheme clusters after viramas if they end a cluster · b01028d1
      Roozbeh Pournader 提交于
      Previously, we stayed on the conservative side and disallowed any
      grapheme breaks (and thus cursoring) where a virama was followed by a
      letter, since we did not know if the virama would be forming a
      cluster with the letter or not. This created problems with Indic
      languages with infrequent conjuncts, such as Tamil.
      
      Now we use the information in calculated advances to find if a
      cluster is formed. If there is no cluster, we break the grapheme and
      allow cursoring after the virama.
      
      Test: Unit tests added to GraphemeBreakTests and MeasurementTests.
      Test: Also manually tested Tamil sequences.
      Bug: 35721792
      Change-Id: Ib159edb94b3ad6f693f0d3dad016b332b2cef447
      b01028d1
    • S
      Revert "Use std::mutex instead of android::Mutex" · fd4124c5
      Seigo Nonaka 提交于
      This reverts commit 62ad5653.
      
      Bug: 36208043
      Test: N/A
      
      Change-Id: I165ab7a0718ea50a8034adb6277809e271fd762c
      fd4124c5
  3. 14 3月, 2017 4 次提交
  4. 13 3月, 2017 1 次提交
    • S
      Reduce memory usage of FontCollection. · c436e925
      Seigo Nonaka 提交于
      This is 2nd attempt at I9e01d237c9adcb05e200932401cb1a4780049f86.
      
      The previous CL was reverted because 8-bit integers were too small to
      store the indices of mFamilyVec. This CL changes it to 16-bit integers
      since size_t is still unnecessary large.
      
      Theoretically, 32-bit integers are necessary for the indices of
      mFamilyVec since the size of mFamilyVec can be 0x10EE01. However, in
      practice, 16-bit integers are enough for the indices of mFamilyVec.
      The length of mFamilyVec for the system fonts is 2084. Even if the
      developers load their own very large fonts, it can only increase the
      number of elements in mFamilyVec to at most 0x10FF.
      
      As the result, memory usage of the FontCollections for the system fonts
      decreases as follows.
      64-bit process: before: 398,264 bytes, after: 282,568 bytes (-115,696 bytes)
      32-bit process: before: 199,132 bytes, after: 149,548 bytes (-49,584 bytes)
      
      Bug: 33562608
      Test: Verified Emoji and CJK characters are present.
      Test: android.text.cts.EmojiTest passed
      Test: Minikin unit tests passed
      Change-Id: I6796fd55ac30fe30528a212ebf6097b1d672e2f8
      c436e925
  5. 07 3月, 2017 3 次提交
    • R
      Customizable min suffix/prefix length for hyphenation in Minikin · d78f260a
      Roozbeh Pournader 提交于
      With this change, different languages can have a different minimum
      length for suffix and prefixes when hyphenating. Previously, the
      defaults used for English, 2 and 3, were used for every language.
      
      Bug: 35712376
      Test: Minikin unit tests were updated and the pass
      Change-Id: Iffaf11c6b208c57d28d45b17246e177572dc1210
      d78f260a
    • T
      Merge "Remove sample directory" · 8dd05e83
      TreeHugger Robot 提交于
      8dd05e83
    • R
      Remove sample directory · 66da9e9f
      Roozbeh Pournader 提交于
      Since there are no known users of Minikin outside Android yet, these
      files are simply a maintenance burden with no actual benefit.
      Removing the samples until there are potential external users.
      
      Test: Not needed
      Change-Id: If7f1fb775cae427fbe31b86c202d1380c701bf28
      66da9e9f
  6. 03 3月, 2017 1 次提交
    • R
      Correct hyphenation for various complex cases · c7ef4000
      Roozbeh Pournader 提交于
      This adds better support for Arabic script languages, Armenian,
      Catalan, Hebrew, Kannada, Malayalam, Polish, Tamil, and Telugu by
      adding various hyphenation types and edits appropriate for the
      locales.
      
      For Arabic script languages, soft hyphens act transparently with
      regard to joining: If a line is broken at a soft hyphen where the two
      characters around the soft hyphen were joining each other before,
      they will continue to appear joining if the line is broken at the
      soft hyphen and a hyphen glyph is inserted.  This is needed for
      Central Asian languages such as Uighur.
      
      For Armenian, U+058A ARMENIAN HYPHEN is used for line breaks caused
      by either automatic hyphenation or soft hyphens.
      
      For Catalan, nonstandard line breaks are implemented for "l·l", which
      hyphenates as "l-/l".
      
      For Polish, when there is a line break at a hyphen, the hyphen is
      repeated at the next line.
      
      For the South Indic languages, when breaks happen due to soft breaks
      or automatic hyphenation, no visible hyphen is inserted, although a
      penalty is added.
      
      For Hebrew, support for using U+05BE HEBREW PUNCTUATION MAQAF has
      been implemented, but it's turned off pending confirmation of
      desirability.
      
      Also, hard hyphens, which previously had no penalty added for
      breaking the line after them, now have the same penalty as an
      automatic or soft break, with the difference that no hyphen is
      inserted when they break.
      
      Finally, some bugs have been fixed with hyphenating multiscript and
      multi-font words.
      
      Bug: 19950445
      Bug: 19955011
      Bug: 25623243
      Bug: 26154469
      Bug: 26154471
      Bug: 33387871
      Bug: 33560754
      Bug: 33752592
      Bug: 33754204
      Test: Unit tests added, plus thorough manual testing
      Change-Id: Iaccf776ce8d1d434ee8b1c534ff3659d80fdc338
      c7ef4000
  7. 27 2月, 2017 1 次提交
  8. 24 2月, 2017 5 次提交
  9. 23 2月, 2017 1 次提交
    • R
      Add exception for Bulgarian to mk_hyb_file · 3e203b7b
      Roozbeh Pournader 提交于
      The Bulgarian hyphenation patterns contain a line consisting of '0ь0'
      which has no practical effect on hyphenation. Add an exception in
      roundtrip testing to make sure we don't fail while comparing our tables
      with the input data.
      
      Test: make -j works and creates .hyb files for bg and cu
      Change-Id: Ia46b8a45fe522f5194d8105d31b34b0e27528cc9
      3e203b7b
  10. 22 2月, 2017 1 次提交
  11. 15 2月, 2017 2 次提交
    • S
      Pass region code to HarfBuzz. · 22462be7
      Seigo Nonaka 提交于
      Keep the region code and pass it to HarfBuzz during doing layout.
      
      Test: minikin_tests
      Bug: 30746293
      Change-Id: I7c908701ca677238f663c82c597f8615d190e055
      22462be7
    • R
      Add U+202F NARROW NO-BREAK SPACE to the sticky white list · 90d8b567
      Roozbeh Pournader 提交于
      Mongolian fonts need to shape across U+202F NARROW NO-BREAK SPACE
      (NNBSP). But if the first font in the fallback chain supports NNBSP,
      it would break Mongolian shaping since the text would be broken into
      three font runs. By making NNBSP sticky, we make sure Mongolian text
      is kept in one font run and is shaped properly.
      
      See http://www.unicode.org/L2/L2017/17036-mongolian-suffix.pdf for
      background. The proposed character in the proposal was not accepted
      for encoding by the Unicode Techincal Committee, but the document
      explains in more detail why this change in needed.
      
      Bug: 34344220
      Test: manual
      Change-Id: I344a63f383fa5485875603570025eac3c4eb2574
      90d8b567
  12. 09 2月, 2017 1 次提交
  13. 08 2月, 2017 1 次提交
    • S
      Introduce unittests for flag sequence. · e05034f3
      Seigo Nonaka 提交于
      The Flag sequence is well handled by latest ICU.
      Just add unit tests for catching regression in future.
      
      Test: ran minikin_tests
      Change-Id: I78d5461de8ff4d002ca06fb5bb81fcd7bc45d95e
      e05034f3
  14. 07 2月, 2017 1 次提交
    • S
      Update the instruction to run tests. · f980baa2
      Seigo Nonaka 提交于
      "adb sync data" pushes test data as well as test executables.
      
      Test: ran minikin_perftests
      Test: ran minikin_tests
      Change-Id: I08219f8abc4b59bd26d8f9155975b65b56a88b7b
      f980baa2
  15. 31 1月, 2017 1 次提交
    • S
      Introduce createCollectionWithVariation. · 065c46a6
      Seigo Nonaka 提交于
      This is 2nd attempt of I08e9b74192f8af1d045f1276498fa4e60d73863e.
      The original CL was reverted due to conflicting with another CL submitted
      before.
      
      Here is the original commit message of reverted change.
      
      This lays the groundwork for variation settings support.
      Since we should regard different variations of a font as different fonts, we
      need to create new typefaces. To reuse the same instance of MinikinFont, as
      much as possible, FontFamily::createFamilyWithVariation now reuses an
      existence instance, while incrementing the reference count.
      
      Test: minikin_tests
      Bug: 33062398
      Change-Id: Ib25bf1bb5a5191e15a6523954146521464c91906
      065c46a6
  16. 20 1月, 2017 4 次提交
  17. 13 1月, 2017 3 次提交
  18. 12 1月, 2017 7 次提交