summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Provisionally enable "palt" OpenType featureRaph Levien2014-06-071-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Support for fake bold and italicsRaph Levien2014-06-107-39/+70
|/ / | | | | | | | | | | | | | | | | | | 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
* | Add baseFont method to FontCollectionRaph Levien2014-06-062-0/+11
| | | | | | | | | | | | | | | | | | 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
* | reset sha1 3f1ea5d with historyQiwen Zhao2014-06-050-0/+0
|\ \ | |/ |/|
| * am 89339973: Fix unmatching typeRaph Levien2014-06-051-1/+1
| |\ | | | | | | | | | | | | * commit '893399732b64203133c22ad3c1f3535e46bf35a7': Fix unmatching type
| * \ am 448b0fd7: Support for scaleX and skewXRaph Levien2014-06-054-15/+43
| |\ \ | | | | | | | | | | | | | | | | * commit '448b0fd720d7ba902b9be224a287d08abe3ebea8': Support for scaleX and skewX
| * \ \ am 066e8575: Fix ZWJ not working for Indic fontsRaph Levien2014-05-292-27/+25
| |\ \ \ | | | | | | | | | | | | | | | | | | | | * commit '066e8575af64fb452617ac6005de6ccf6509553b': Fix ZWJ not working for Indic fonts
| * \ \ \ am 7b221d97: Language and variant selectionRaph Levien2014-05-297-22/+214
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * commit '7b221d97b7b64dc5ce457e19666d55d042e22e62': Language and variant selection
| * \ \ \ \ am 0297ee98: Fix for Minikin native crashRaph Levien2014-05-291-1/+1
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '0297ee985c26b49fc2a3b0941db354c27f436bbf': Fix for Minikin native crash
| * \ \ \ \ \ am 7c382381: Fix for bug 15252902 native crash in MinikinRaph Levien2014-05-271-4/+4
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '7c382381191b2280b53c375fe83dfc6217bbdfa9': Fix for bug 15252902 native crash in Minikin
| * \ \ \ \ \ \ am 4d4e6bc8: Caching for layouts and harfbuzz facesRaph Levien2014-05-270-0/+0
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '4d4e6bc8118d15542f1f2a9218f0f7a91a29474f': Caching for layouts and harfbuzz faces
| * \ \ \ \ \ \ \ am d973b392: (-s ours) Merge "Do BiDi algorithm for text layout" into ↵Raph Levien2014-05-270-0/+0
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lmp-preview-dev * commit 'd973b3926b3a34c19d3d6f309fae1138e782e4dc': Do BiDi algorithm for text layout
| * \ \ \ \ \ \ \ \ am 72fe9422: Fix native crash in Latin-1 typefacesRaph Levien2014-05-241-1/+1
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '72fe9422c869b7878240a23e4650d9d90edb1c2a': Fix native crash in Latin-1 typefaces
| * \ \ \ \ \ \ \ \ \ am b43357ad: merge in master-release history after reset to ↵The Android Automerger2014-05-240-0/+0
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c31e3883456e018d742e9f29815ba5ff8b315ea1 * commit 'b43357ad71782b4d1df03ee7e89b30705fcc6a93': Fix incomplete refcounting and locking
| * | | | | | | | | | | Caching for layouts and harfbuzz facesRaph Levien2014-05-228-82/+389
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | | | | | | | | Do BiDi algorithm for text layoutRaph Levien2014-05-193-10/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | | | | | | | Support for context in APIRaph Levien2014-06-052-22/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | | | | | | | Make paint flags consistently uint32_tRaph Levien2014-06-054-19/+20
| |_|_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | | | | | | Fix unmatching typeRaph Levien2014-06-041-1/+1
| |_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Missed a slightly mismatched type (int vs int32_t) from a previous code review. Change-Id: Ib56775a3a1a6ec3763da7f7432186954251cc048
* | | | | | | | | | Support for scaleX and skewXRaph Levien2014-06-034-15/+43
| |_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | | | | Fix ZWJ not working for Indic fontsRaph Levien2014-05-292-27/+25
| |_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | | | Language and variant selectionRaph Levien2014-05-297-22/+214
| |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | | Fix for Minikin native crashRaph Levien2014-05-291-1/+1
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | Fix for bug 15252902 native crash in MinikinRaph Levien2014-05-271-4/+4
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | Caching for layouts and harfbuzz facesRaph Levien2014-05-278-82/+389
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Merge "Do BiDi algorithm for text layout" into lmp-preview-devRaph Levien2014-05-273-10/+85
|\ \ \ \ | |_|_|/ |/| | |
| * | | Do BiDi algorithm for text layoutRaph Levien2014-05-273-10/+85
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 4b3a941128454e55893d65433a835e78a9e9781d)
* / | Fix native crash in Latin-1 typefacesRaph Levien2014-05-231-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | This is a fix for bug 15171911 Timely crashes (native crash in libminikin) when I go to add a new alarm This patch fixes an off-by-one error that caused typefaces with only one page of Unicode coverage (ASCII or Latin-1) to have nPages = 0 instead of the correct value of 1 in the corresponding FontCollection. Change-Id: Id8be0c9e5713b8af22d863992921ee6382416a34
* | merge in master-release history after reset to ↵The Android Automerger2014-05-220-0/+0
|\ \ | |/ |/| | | c31e3883456e018d742e9f29815ba5ff8b315ea1
| * merge in master-release history after reset to ↵The Android Automerger2014-05-220-0/+0
|/| | | | | | | c31e3883456e018d742e9f29815ba5ff8b315ea1
| * merge in master-release history after reset to ↵The Android Automerger2014-05-210-0/+0
|/| | | | | | | c31e3883456e018d742e9f29815ba5ff8b315ea1
| * merge in master-release history after reset to ↵The Android Automerger2014-05-200-0/+0
|/| | | | | | | c31e3883456e018d742e9f29815ba5ff8b315ea1
| * Fix incomplete refcounting and lockingRaph Levien2014-05-195-2/+26
| | | | | | | | | | | | | | | | These changes were supposed to be committed in the previous patch "Better refcounting and locking" but seem to have gotten lost in a rebase. It fixes a memory leak and some possible race conditions. Change-Id: I54ca1e37500ec49756fe317cc6d6d03da9911501
* | Fix incomplete refcounting and lockingRaph Levien2014-05-195-2/+26
|/ | | | | | | | These changes were supposed to be committed in the previous patch "Better refcounting and locking" but seem to have gotten lost in a rebase. It fixes a memory leak and some possible race conditions. Change-Id: I54ca1e37500ec49756fe317cc6d6d03da9911501
* Remove references to SkFloatToScalar.Leon Scroggins III2014-05-151-2/+2
| | | | | | | | The macro has been deprecated, now that SkScalar is never fixed point. Fixes minikin build. Change-Id: I02838a7fa167c5cf58ad225f3f2f52659495492c
* Initial BiDi supportRaph Levien2014-05-143-2/+14
| | | | | | | | | | | | | | This patch contains a very basic implementation of BiDi. It respects the BiDi flags passed in as an explicit parameter (through the "-minikin-bidi" pseudo-CSS property), but doesn't yet do its own BiDi run detection. It also takes some shortcuts (marked as TODO) that are based on reasonable assumptions of the current font stack, but not universally valid. Even with these shortcomings, it seems to display RTL text from TextView correctly. Change-Id: I223433923c4eb06f90c0327e86bfbe0aff71d4f5
* Fix 64-bit cleanliness problemRaph Levien2014-05-141-2/+2
| | | | | | This patch fixes a problem where int and ssize_t were being conflated. Change-Id: I642a4ee1d59d81723034fdfe33bd8ca29a5dc322
* Fix build breakage in sample codeRaph Levien2014-05-144-9/+37
| | | | | | | This updates the Skia sample implementation to implement GetBounds, but the FreeType implementation is NYI (to be fixed in future commit). Change-Id: I24eda14d5fb11c2a1e81394ad8c779de3292dd79
* Better refcounting and lockingRaph Levien2014-05-1211-30/+164
| | | | | | | | | | | All major externally accessible objects (especially FontFamily and FontCollection) are now reference counted. In addition, there is a global lock intended to make operations thread-safe. WIP notice: in this version of the patch, not all external API entry points are protected by the lock. That should be fixed. Change-Id: I14106196e99eb101e8bf1bcb4b81359759d2086c
* A basket of features: itemization, bounds, refcountRaph Levien2014-05-1210-37/+499
| | | | | | | | | | | | | | | This patch improves script run itemization and also exposes metrics and bounds for layouts. In addition, there is a fair amount of internal cleanup, including ref counting, and making the MinikinFont abstraction strong enough to support both FreeType and Skia implementations. There is also a sample implementation using Skia, in the sample directory. As part of its functionality, his patch measures the bounds of the layout and gives access through Layout::GetBounds(). The corresponding method is not implemented in the FreeType-only implementation of MinikinFont, so that will probably have to be fixed. Change-Id: Ib1a3fe9d7c90519ac651fb4aa957848e4bb758ec
* Use canonical UniquePtr.h fileKenny Root2013-09-111-1/+1
| | | | Change-Id: I00953971034a7d00ca165accdab528d2b8ff27a7
* Use canonical UniquePtr.h headerKenny Root2013-09-111-1/+1
| | | | Change-Id: Id50e9d6fe2f08d3121b168b45791a8e8fb045d7f
* Use shared ft2 lib, deal with libpng/zlib depsVictoria Lease2013-06-272-5/+8
| | | | | Bug: 9603326 Change-Id: I7df1f68fa3a44b37b1b279387f4ddfe942928bb0
* Fix build breakageRaph Levien2013-06-141-2/+1
| | | | | | | | | The MinikinFont class was missing a destructor. The build error was not caught because incremental builds didn't see fit to relink after I deleted one of the source files (that contained the impl of this destructor). Change-Id: Ic72d56fe28316cd2b2f808910e34ca6f177a1220
* Introduce MinikinFont abstractionRaph Levien2013-06-1411-90/+343
| | | | | | | | | | | This commit removes the direct dependency on FreeType and replaces it with a MinikinFont abstraction, which is designed to support both FreeType and Skia fonts (and possibly others in the future). Also adds a "total advance" to the Layout, with an API for retrieving it. Change-Id: If20f92db9a43fd15b0fe9794b761ba00fb21338c
* Initial commit of Minikin libraryRaph Levien2013-04-2517-0/+1706
| | | | | | | | | | | This is the initial draft of Minikin, a library intended to perform text layout functions. This version does basic weight selection and font runs for scripts, and also has a simple renderer for drawing into bitmaps, but is lacking measurement, line breaking, and a number of other important features. It also lacks caching and other performance refinements. Change-Id: I789a2e47d11d71202dc84b4751b51a5e2cd9c451
* Initial empty repositoryChad Jones2013-04-190-0/+0