1. 26 6月, 2014 1 次提交
    • R
      Add purgeCaches() method · 22e41754
      Raph Levien 提交于
      Expose a method to purge caches used for TextLayout, useful for low
      memory conditions.
      
      Change-Id: I92f41afe987b7be4af5ca0a0c50fb51be35a2758
      22e41754
  2. 20 6月, 2014 2 次提交
    • R
      Implement grapheme cluster breaking · 3d28a3fc
      Raph Levien 提交于
      This patch includes an implementation of grapheme cluster breaking,
      which is especially useful for repositioning the cursor for left and
      right arrow key presses. The implementation is closely based on Unicode
      TR29, and uses the ICU grapheme cluster break property, but is tailored
      to more closely match the existing implementation and expected behavior.
      
      Part of a fix for b/15653110 Improve behavior of arrow keys in EditText
      
      Change-Id: I8eb742f77039c9ab7b2838285018cf8a8fc88343
      3d28a3fc
    • R
      Make font runs less sticky · bb601b67
      Raph Levien 提交于
      Fixes b/15734816 In the text "Wi-Fi", "-Fi" appears bolder than "Wi"
      
      The problem was caused by "stickiness" in choosing fonts, where layout
      would prefer using a font used for preceding characters as long as it
      mapped the following characters in a run, in favor of the "best match"
      rules. This patch adds a whitelist for making the stickiness more
      conservative, only applying it for characters necessary for correct
      shaping (ZWJ and ZWNJ in particular) and basic punctuation, where it is
      desirable to match the style of the preceding text.
      
      Change-Id: I1cf116879f074a5a71c351846707bfdd07b0d320
      bb601b67
  3. 13 6月, 2014 4 次提交
  4. 12 6月, 2014 1 次提交
  5. 13 6月, 2014 1 次提交
    • R
      Tighten requirements for fake bold · 9f9f3b1e
      Raph Levien 提交于
      The simple predicate for fake bold (2 or more grades darker than
      requested) was applying it to thin (100 weight) when normal was
      requested. This patch tightens the predicate to also require that
      the requested weight be in the bold range.
      
      Fix for bug 15588352 "sans-serif-thin doesn't work on lockscreen"
      
      Change-Id: Id9988bd149a9c8a7c943e3b221f7fb4b37fb6ddb
      9f9f3b1e
  6. 12 6月, 2014 3 次提交
    • R
      Fix missing text on nonexistent font file · bd36ec76
      Raph Levien 提交于
      Fix for bug 15570313 "Missing text on nonexistent font file"
      
      This patch makes sure that the lastChar and mInstances arrays are in
      sync with each other even when a FontFamily being added has no valid
      fonts in it. Previously, when they got out of sync, unicode coverage
      calculation would be wrong, resulting in missing text.
      
      Change-Id: I69c727ef69e2c61e2b2d6b81d5a28c806327f865
      bd36ec76
    • R
      Support for fake bold and italics · 15651697
      Raph Levien 提交于
      This patch adds support for computing when fake bold and fake italics
      are needed (because the styles are requested but not provided by the
      matching FontFamily), and providing them as part of the layout result.
      
      Part of the fix for bug 15436379 Fake bold doesn't fully work (Minikin)
      
      Change-Id: I180c034b559837943673b5c272c8e890178dff0d
      15651697
    • R
      Add baseFont method to FontCollection · b1eae5ea
      Raph Levien 提交于
      This patch adds a method to retrieve the base font from a
      FontCollection, which is useful when querying global font metrics.
      
      Part of the fix for bug 15467288 "Inconsistent line heights on
      Minikin builds"
      
      Change-Id: I268ae5128d0852a020d746bc22af81fc1a623228
      b1eae5ea
  7. 11 6月, 2014 2 次提交
    • R
      Merge "Provisionally enable "palt" OpenType feature" · 1c7b403a
      Raph Levien 提交于
      1c7b403a
    • R
      Support for fake bold and italics · 9a5f713a
      Raph Levien 提交于
      This patch adds support for computing when fake bold and fake italics
      are needed (because the styles are requested but not provided by the
      matching FontFamily), and providing them as part of the layout result.
      
      Part of the fix for bug 15436379 Fake bold doesn't fully work (Minikin)
      
      Change-Id: I180c034b559837943673b5c272c8e890178dff0d
      9a5f713a
  8. 07 6月, 2014 2 次提交
    • R
      Provisionally enable "palt" OpenType feature · 4043f6f6
      Raph Levien 提交于
      We want to test configurations where the Noto Japanese font will have
      its "palt" feature (to select tighter spacing in kana) will be enabled
      for framework but not WebView or Chrome rendering of Japanese text. This
      patch simply hardcodes this feature on.
      
      This is also a first step towards more general setting of OpenType
      features. The hardcoded feature list will grow into one set by
      parameters which will eventually be plumbed up to Java.
      
      Change-Id: Ie284e0487a1434155c8ac1cb68ddc4fc4b3c018a
      4043f6f6
    • R
      Add baseFont method to FontCollection · 89566f0a
      Raph Levien 提交于
      This patch adds a method to retrieve the base font from a
      FontCollection, which is useful when querying global font metrics.
      
      Part of the fix for bug 15467288 "Inconsistent line heights on
      Minikin builds"
      
      Change-Id: I268ae5128d0852a020d746bc22af81fc1a623228
      89566f0a
  9. 06 6月, 2014 5 次提交
  10. 05 6月, 2014 1 次提交
    • R
      Fix unmatching type · 89339973
      Raph Levien 提交于
      Missed a slightly mismatched type (int vs int32_t) from a previous code
      review.
      
      Change-Id: Ib56775a3a1a6ec3763da7f7432186954251cc048
      89339973
  11. 04 6月, 2014 1 次提交
    • R
      Support for scaleX and skewX · 448b0fd7
      Raph Levien 提交于
      Adds pseudo-css properties for scaleX and skewX, as well as paint flags,
      and plumb them through to the MinikinPaint abstraction and to Harfbuzz,
      to support nontrivial scale and stretch of text.
      
      This is the Minikin part of the fix for bug 15186705 "Usability of the
      suggestion strip in recent OTA's is severely reduced"
      
      Change-Id: Ifa60355e086e4691ff92c5d50d84eb7cea0fea95
      448b0fd7
  12. 30 5月, 2014 6 次提交
    • R
      am 066e8575: Fix ZWJ not working for Indic fonts · 67841bf0
      Raph Levien 提交于
      * commit '066e8575':
        Fix ZWJ not working for Indic fonts
      67841bf0
    • R
      am 7b221d97: Language and variant selection · b4a27545
      Raph Levien 提交于
      * commit '7b221d97':
        Language and variant selection
      b4a27545
    • R
      Fix ZWJ not working for Indic fonts · 066e8575
      Raph Levien 提交于
      This is a fix for bug 15185229 ZWJ not working in Sinhala and Kannada.
      
      Indic fonts (unlike Arabic) require the entire string, including ZWJ,
      to be passed to Harfbuzz; it's not enough for the ZWJ to be present in
      the context. The solution is to be "sticky" in font itemization,
      continuing to use the same font as long as it has Unicode coverage.
      
      Change-Id: I7673bc56fbda09f1e1a4582e8d88342343b706f1
      066e8575
    • R
      Language and variant selection · 7b221d97
      Raph Levien 提交于
      This patch adds a "lang" pseudo-CSS property and uses it both to select
      an appropriate font and control the "locl" OpenType feature to get the
      most appropriate rendering for the langauge and script.  In addition,
      the "-minikin-variant" property selects between "compact" and "elegant"
      variants of a font, as the former is needed for vertically cramped
      spaces.
      
      This is part of the fix for bug 15179652 "Japanese font isn't shown on
      LMP".
      
      Change-Id: I7fab23c12d4c797a6d339a16e497b79a3afe9df1
      7b221d97
    • R
      am 0297ee98: Fix for Minikin native crash · 7d190a2b
      Raph Levien 提交于
      * commit '0297ee98':
        Fix for Minikin native crash
      7d190a2b
    • R
      Fix for Minikin native crash · 0297ee98
      Raph Levien 提交于
      The context start offset wasn't being taken into account for
      accumulating the advance values, leading in some cases to array index
      overflow.
      
      This is a fix for bug 15327918 "SIGSEGV in
      android::MinikinFontSkia::GetSkTypeface()"
      
      Change-Id: I9b646785724c9b72d862b822cd84661c106fbe52
      0297ee98
  13. 27 5月, 2014 7 次提交
    • R
      am 7c382381: Fix for bug 15252902 native crash in Minikin · fb9c6e2e
      Raph Levien 提交于
      * commit '7c382381':
        Fix for bug 15252902 native crash in Minikin
      fb9c6e2e
    • R
      am 4d4e6bc8: Caching for layouts and harfbuzz faces · 8eef0a2e
      Raph Levien 提交于
      * commit '4d4e6bc8':
        Caching for layouts and harfbuzz faces
      8eef0a2e
    • R
      am d973b392: (-s ours) Merge "Do BiDi algorithm for text layout" into lmp-preview-dev · 4af2976a
      Raph Levien 提交于
      * commit 'd973b392':
        Do BiDi algorithm for text layout
      4af2976a
    • R
      Fix for bug 15252902 native crash in Minikin · 7c382381
      Raph Levien 提交于
      This is a fix for bug 15252902 "Crash observed on keep launch or
      existing youtube app after playing video". It was doing the test for a
      null font after trying to resolve the font in a cache, which caused a
      crash when there was no font for the run. This patch just tests before
      cache lookup.
      
      Change-Id: Iee41f7ce6b69cb09438462b6aaa916f242da7b77
      7c382381
    • R
      Caching for layouts and harfbuzz faces · 4d4e6bc8
      Raph Levien 提交于
      This patch adds caching for both layouts and for HarfBuzz face objects.
      The granularity of the cache for layouts is words, so it splits the
      input string at word boundaries (using a heuristic). There are is also
      some refactoring to reduce the amount of allocation and copying, and
      movement towards properly supporting contexts.
      
      The size of the caches is a fixed number of entries; thus, it is
      possible to consume a large amount of memory by filling the cache with
      lots of large strings. This should be refined towards a scheme that
      bounds the total memory used by the cache.
      
      This patch fixes bug 15237293 "Regression: Measure performance is
      significantly slower with minikin".
      
      Change-Id: Ie8176857e2d78656ce5479a7c04969819ef2718d
      4d4e6bc8
    • R
      d973b392
    • R
      Do BiDi algorithm for text layout · 86fa46c5
      Raph Levien 提交于
      This is a fix for bug 15130102 "Language name for Hebrew displayed the
      wrong way around on keyboard".
      
      This patch extends the previous BiDi support (when the direction for the
      entire string was given by the caller) to run the BiDi algorithm
      (provided by ICU) over the string to break it into BiDi runs. Thus, it
      handles mixed LTR and RTL strings in a single layout, and also respects
      heuristics for inferring the paragraph direction from the string.
      
      Change-Id: Ia4b869de3c139c5a7d16b8ce7766870b98a815ea
      (cherry picked from commit 4b3a9411)
      86fa46c5
  14. 24 5月, 2014 3 次提交
  15. 23 5月, 2014 1 次提交
    • R
      Caching for layouts and harfbuzz faces · cf6d68c3
      Raph Levien 提交于
      This patch adds caching for both layouts and for HarfBuzz face objects.
      The granularity of the cache for layouts is words, so it splits the
      input string at word boundaries (using a heuristic). There are is also
      some refactoring to reduce the amount of allocation and copying, and
      movement towards properly supporting contexts.
      
      The size of the caches is a fixed number of entries; thus, it is
      possible to consume a large amount of memory by filling the cache with
      lots of large strings. This should be refined towards a scheme that
      bounds the total memory used by the cache.
      
      Change-Id: Ie8176857e2d78656ce5479a7c04969819ef2718d
      cf6d68c3