1. 30 9月, 2015 1 次提交
  2. 08 8月, 2015 1 次提交
  3. 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
  4. 09 6月, 2015 1 次提交
    • R
      Increase hyphenation penalty for short last line · abae97a3
      Raph Levien 提交于
      Tuning for hyphenation parameters. We discourage hyphenation on the
      last line, but offset this penalty by also applying a penalty for
      each line, which optimizes for minimizing the number of lines. Thus,
      when hyphenation can reduce the number of lines, it increases the
      chance they're used.
      
      There's probably more tuning and refinement that can be done, but
      testing suggests that the tunable parameters are appropriate.
      
      Bug: 20883322
      
      Change-Id: Ida7eaf8aced109e426694f5a386924a842d29c4b
      abae97a3
  5. 13 5月, 2015 1 次提交
    • R
      Support hyphenation frequency in Minikin. · 0dc07c0b
      Roozbeh Pournader 提交于
      Three hyphenation frequencies are now supported:
      
      kHyphenationFrequency_None, which turns off both automatic
      hyphenation and soft hyphens.
      
      kHyphenationFrequency_Normal, which has aconservative amount of
      hyphenation useful as a conservative default.
      
      kHyphenationFrequency_Full, which has a typographic-quality amount of
      hyphenation useful for running text and tight screens.
      
      Bug: 21038249
      Change-Id: I2800f718c887c9389a1a059d7ec07d7fa2ca1dee
      0dc07c0b
  6. 28 4月, 2015 1 次提交
    • J
      Move Bitmap to a different namespace · 8920e817
      John Reck 提交于
      namespace naming collision. Move minikin's
      Bitmap out of android:: and into minikin::
      
      Change-Id: I5ae3925f81b848dc79576429ab55243b96f7fed2
      8920e817
  7. 16 4月, 2015 3 次提交
    • R
      Add functions for measuring cursor positioning · 40beb774
      Raph Levien 提交于
      New functions for computing the correspondence between cursor
      position and advance, respecting grapheme boundaries.
      
      Change-Id: I620378d5f64cd74300cd43db522adeb555825dff
      40beb774
    • R
      Rename "margins" to "indents" · bb86b433
      Raph Levien 提交于
      The name "margin" conflicts with another meaning, so we're making the
      name in the public api "idents" and the code consistent in naming.
      
      Change-Id: I9170116b4d972e4b25f0f319e78376310288eb41
      bb86b433
    • R
      Add margins array to line widths object · dc7bc6e3
      Raph Levien 提交于
      In order to support layout in non-rectangular regions, the LineWidths
      object needs to accept an arbitrary array of margins. This is
      implemented in addition to the existing firstWidthLineCount/restWidth
      mechanism for convenience, though using only arrays would have the
      same expressive power.
      
      Bug: 20182243
      Change-Id: Iea96bca1a92012314ac27e617c67f306c1f1b2f2
      dc7bc6e3
  8. 31 3月, 2015 3 次提交
  9. 27 3月, 2015 1 次提交
    • R
      Add LineBreaker to Minikin · 01f52661
      Raph Levien 提交于
      This patch adds a LineBreaker class to Minikin, which will be used for
      computing line breaks in StaticLayout. The version in this patch
      contains basically the same functionality that existed before, but
      hopefully better performance and an interface that's suitable for more
      sophisticated paragraph layout.
      
      Note that this version contains a high quality strategy, which mostly
      works but doesn't respect varying line width.
      
      Change-Id: I02485d58b1e52856296a72cdd4efd963bc572933
      01f52661
  10. 13 3月, 2015 1 次提交
    • R
      HyphenEdit in support of hyphenation · d692d6a9
      Raph Levien 提交于
      Adds a "HyphenEdit" field to the Minikin Paint object, which represents
      an edit to the text to add a hyphen (and, in the future, other edits to
      support nonstandard hyphenation).
      
      Change-Id: Ib4ee690b0fe2137e1d1e2c9251e5526b274ec3a7
      d692d6a9
  11. 04 12月, 2014 2 次提交
    • A
      Minikin: Remove unused variables, fix init order · cb20a2f0
      Andreas Gampe 提交于
      For build-system CFLAGS clean-up, fix unused variables.
      
      Reorder initializer list to initialize in the order of member
      declarations.
      
      Change-Id: I64358b2dcf0e39d0f4e18fdc3473de867f84fcba
      cb20a2f0
    • R
      Move coverage bitmap from FontCollection to FontFamily · 13f1aae0
      Raph Levien 提交于
      This will significantly reduce memory usage and also speed the creation
      of new font families. In particular, the coverage bitmaps for the fonts
      in the fallback stack will be computed once in the Zygote, rather than
      separately in each app process.
      
      Bug: 17756900
      Change-Id: I66f5706bddd4658d78fe5b709f7251ca9d2ff4f8
      13f1aae0
  12. 30 10月, 2014 1 次提交
    • R
      Move coverage bitmap from FontCollection to FontFamily · 253320d2
      Raph Levien 提交于
      This will significantly reduce memory usage and also speed the creation
      of new font families. In particular, the coverage bitmaps for the fonts
      in the fallback stack will be computed once in the Zygote, rather than
      separately in each app process.
      
      Bug: 17756900
      Change-Id: I66f5706bddd4658d78fe5b709f7251ca9d2ff4f8
      253320d2
  13. 04 9月, 2014 1 次提交
    • R
      Snap advance widths to integers · 6740536e
      Raph Levien 提交于
      Fractional advance widths were causing subtle problems with text
      positioning when the same text was drawn with different spans in the
      hwui renderer. Quantizing the coordinates on layout (as opposed to
      waiting until the renderer draws the glyphs) solves the problem.
      
      This patch also fixes a discrepancy between x position and advance
      widths when letterspacing.
      
      Bug: 17347779
      Change-Id: Ia705944047408c2839d5ad078eefd6bbec446872
      6740536e
  14. 22 8月, 2014 2 次提交
    • B
      Fix Layout initialization in the skipCache path · 6da7796c
      Behdad Esfahbod 提交于
      C++ local var initialization always tricks me.  Previously, Layout
      didn't have a constructor, which meant that defining it on the stack
      left mAdvance uninitialized.  This was not an issue when we were doing
      "new Layout()", since that invokes zero-initialization, but was an
      issue for the skipCache path that was allocating layout on stack by
      just "Layout l" instead of "Layout l = Layout()".  To avoid surprises,
      add a constructors that clears everything.
      
      Also adds reset() method to reset the layout for reuse.
      
      Change-Id: I3e02f00da9dd7d360abe13f63c310f6882292d0a
      6da7796c
    • B
      Speed up cache lookup · 288c9159
      Behdad Esfahbod 提交于
      Avoid copying the string for cache lookup.
      
      Bug: 17111260
      Change-Id: Ic220bfc991fc6b3dada197304aabdf72a8941bd7
      288c9159
  15. 31 7月, 2014 1 次提交
  16. 30 7月, 2014 3 次提交
  17. 25 7月, 2014 2 次提交
    • B
      Towards CSS removal · a5bb9119
      Behdad Esfahbod 提交于
      Extract language from FontStyle during shaping.  Don't attach CSS
      to LayoutContext.
      
      Change-Id: Ie621d3415410178d0d15fa7b810eb8e412342ab6
      a5bb9119
    • B
      Remove deprecated API · f0a1e5b2
      Behdad Esfahbod 提交于
      It has been unused outside minikin.
      
      Change-Id: Iaa2237767d81c77f90d0264e633375e601dd72f1
      f0a1e5b2
  18. 23 7月, 2014 1 次提交
  19. 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
  20. 20 6月, 2014 1 次提交
    • 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
  21. 12 6月, 2014 2 次提交
    • 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
  22. 11 6月, 2014 1 次提交
    • 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
  23. 07 6月, 2014 1 次提交
    • 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
  24. 06 6月, 2014 2 次提交
    • R
      Support for context in API · 3f1ea5da
      Raph Levien 提交于
      This patch completes support for adding context for complex script
      layout, for example when a string with joins straddles two spans.
      
      Part of the fix for 15431028: "Properly support context for joining
      scripts (Minikin)"
      
      Change-Id: I65b0833be92eb477aa531bbef0ac6eddeb3a962a
      3f1ea5da
    • R
      Make paint flags consistently uint32_t · 3164d1a7
      Raph Levien 提交于
      Change internal plumbing of paint flags (including CssParse) to uint32_t
      consistently, to match the type used in the client. This will probably
      prevent compiler warnings. Also renames "float" to "double" to avoid
      confusion about precision.
      
      Change-Id: I80374712c4067ca9e7711cc2d4ec33c440ab9c7c
      3164d1a7
  25. 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
  26. 30 5月, 2014 2 次提交
    • 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
  27. 27 5月, 2014 2 次提交
    • 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
      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