- 30 9月, 2015 1 次提交
-
-
由 Keisuke Kuroyanagi 提交于
This doesn't change current behavior. It's a preparation for the following CLs. Bug: 22408712 Change-Id: Ic018422254aa3904655f499194caad74f0c0fc5d
-
- 08 8月, 2015 1 次提交
-
-
由 Roozbeh Pournader 提交于
Also handle the case of weird language code that we don't understand properly better, by treating them not equal to each other. Change-Id: Iaccb251fa38d700932f6eadac254d3d1fa09b3ea
-
- 10 7月, 2015 1 次提交
-
-
由 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
-
- 09 6月, 2015 1 次提交
-
-
由 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
-
- 13 5月, 2015 1 次提交
-
-
由 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
-
- 28 4月, 2015 1 次提交
-
-
由 John Reck 提交于
namespace naming collision. Move minikin's Bitmap out of android:: and into minikin:: Change-Id: I5ae3925f81b848dc79576429ab55243b96f7fed2
-
- 16 4月, 2015 3 次提交
-
-
由 Raph Levien 提交于
New functions for computing the correspondence between cursor position and advance, respecting grapheme boundaries. Change-Id: I620378d5f64cd74300cd43db522adeb555825dff
-
由 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
-
由 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
-
- 31 3月, 2015 3 次提交
-
-
由 Raph Levien 提交于
This reverts commit 0b25d5ac.
-
由 Raph Levien 提交于
This patch adds hyphenation using the Liang hyphenation algorithm, similar to TeX. It also improves the optimized line breaker so that it works correctly and efficiently even when the line width is not constant (there is a specialization for constant width, which is probably worthwhile, but performance TODOs remain). Still to be done: * hyphenator has many shortcuts, only tested with English * interaction between punctuation and hyphenation is problematic Change-Id: I2d94a1668ebc536398b7c43fcf486333eeb7c6aa
-
- 27 3月, 2015 1 次提交
-
-
由 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
-
- 13 3月, 2015 1 次提交
-
-
由 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
-
- 04 12月, 2014 2 次提交
-
-
由 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
-
由 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
-
- 30 10月, 2014 1 次提交
-
-
由 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
-
- 04 9月, 2014 1 次提交
-
-
由 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
-
- 22 8月, 2014 2 次提交
-
-
由 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
-
由 Behdad Esfahbod 提交于
Avoid copying the string for cache lookup. Bug: 17111260 Change-Id: Ic220bfc991fc6b3dada197304aabdf72a8941bd7
-
- 31 7月, 2014 1 次提交
-
-
由 Behdad Esfahbod 提交于
Bug: 15246510 Change-Id: I544915d29b2be4fb9f82f1989188a3a918c50fbc
-
- 30 7月, 2014 3 次提交
-
-
由 Behdad Esfahbod 提交于
We are stack-allocating MinikinPaint objects in Minikin clients, and without a constructor adding new members to the struct cannot be done without updating all clients (only one right now!). Change-Id: I4170f16498bb6b07cb795495011aca58087ed0bd
-
由 Behdad Esfahbod 提交于
New API removes CSS string and directly takes needed objects. Bug: 16651112 Change-Id: Ie5f7c2ab05be6cbd77cae0a5fd6bb453771ada59
-
由 Behdad Esfahbod 提交于
All usage is ported to the new doLayout() API now. Bug: 16651112 Change-Id: I2c959138a69853b5e30098889d771fe5f4cfaa66
-
- 25 7月, 2014 2 次提交
-
-
由 Behdad Esfahbod 提交于
Extract language from FontStyle during shaping. Don't attach CSS to LayoutContext. Change-Id: Ie621d3415410178d0d15fa7b810eb8e412342ab6
-
由 Behdad Esfahbod 提交于
It has been unused outside minikin. Change-Id: Iaa2237767d81c77f90d0264e633375e601dd72f1
-
- 23 7月, 2014 1 次提交
-
-
由 Behdad Esfahbod 提交于
Bug: 15594400 Change-Id: Ied94d7674be4097b0f44c9b0770d3294dc6433c1
-
- 26 6月, 2014 1 次提交
-
-
由 Raph Levien 提交于
Expose a method to purge caches used for TextLayout, useful for low memory conditions. Change-Id: I92f41afe987b7be4af5ca0a0c50fb51be35a2758
-
- 20 6月, 2014 1 次提交
-
-
由 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
-
- 12 6月, 2014 2 次提交
-
-
由 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
-
由 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
-
- 11 6月, 2014 1 次提交
-
-
由 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
-
- 07 6月, 2014 1 次提交
-
-
由 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
-
- 06 6月, 2014 2 次提交
-
-
由 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
-
由 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
-
- 04 6月, 2014 1 次提交
-
-
由 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
-
- 30 5月, 2014 2 次提交
-
-
由 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
-
由 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
-
- 27 5月, 2014 2 次提交
-
-
由 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
-
由 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)
-