- 08 4月, 2016 1 次提交
-
-
由 Raph Levien 提交于
The hb_font_t object holds on to tables of font data, acquired through the MinikinFont::GetTable interface, which is based on copying data into caller-owned buffers. Now that we're caching lots of hb_font_t's, the cost of these buffers is significant. This patch moves to a different interface, inspired by HarfBuzz's hb_reference_table API, where the font can provide a pointer to the actual font data (which will often be mmap'ed, so it doesn't even consume physical RAM). Bug: 27860101 Change-Id: Id766ab16a8d342bf7322a90e076e801271d527d4
-
- 12 2月, 2016 1 次提交
-
-
由 Dan Albert 提交于
Bug: http://b/26936282 Change-Id: I91b3bc246a4a8c45bde223cfc25df18ae9af8c5b
-
- 08 2月, 2016 1 次提交
-
-
由 Keisuke Kuroyanagi 提交于
Bug: 24505153 Change-Id: If61c063c175086dec88cda187eafd9ce923e4cb1
-
- 04 2月, 2016 1 次提交
-
-
由 Seigo Nonaka 提交于
It turned out that hb_font_t creation is not a lightweight operation. Especially, Paint.hasGlyph creates hb_font_t for all existing fonts every time. To improve the performance, cache hb_font_t instead of hb_face_t. Note that to calculate horizontal advance, MinikinPaint needs to be associated with hb_font_t by calling hb_font_set_funcs. With this patch, hb_font_set_funcs may be called multiple times for the same hb_font_t object. However this is not an issue since MinikinPaint is unique during layout. Bug: 26784699 Change-Id: I516498ae9f0127d700fc9829327e9789845a1416
-
- 21 1月, 2016 1 次提交
-
-
由 Keisuke Kuroyanagi 提交于
The intruduced method measureText can be used instead of doLayout for text measurement purpose. Bug: 24505153 Change-Id: Ic29bbb347daf18d1f6c13f86970dcdd11dd6a2bd
-
- 05 1月, 2016 1 次提交
-
-
由 Seigo Nonaka 提交于
This is 2nd attempt of I8df992a6851021903478972601a9a5c9424b100c. The main purpose of this CL is expanding FontLanguage to be able to save full script tag. Previously, FontLangauge kept only limited script tags. With this CL, FontLanguage keeps all script tags. This CL contains the following changes: - FontLanguage changes: -- Moved to private directory not to be instantiated outside of Minikin. -- Removed bool(), bits(), FontLanguage(uint32_t) methods which are no longer used. -- Change the FontLanguage internal data structure. -- Introduces script match logic. - FontLanguages changes: -- Moved to private directory not to be instantiated outside of Minikin. -- This is now std::vector<FontLanguage> - FontLanguageListCache changes: -- Now FontLanguageListCache::getId through FontStyle::registerLanguageList is the only way to instantiate the FontLanguage. -- Normalize input to be BCP47 compliant identifier by ICU. Bug: 26168983 Change-Id: I431b3f361a7635497c05b85e8ecbeb48d9aef63e
-
- 22 12月, 2015 2 次提交
-
-
由 Bart Sears 提交于
This reverts commit 5e995fb8. Change-Id: I761e0e41906742fbe3d3ac34170af3101e18042a
-
由 Seigo Nonaka 提交于
The main purpose of this CL is expanding FontLanguage to be able to save full script tag. Previously, FontLangauge kept only limited script tags. With this CL, FontLanguage keeps all script tags. This CL contains the following changes: - FontLanguage changes: -- Moved to private directory not to be instantiated outside of Minikin. -- Removed bool(), bits(), FontLanguage(uint32_t) methods which are no longer used. -- Change the FontLanguage internal data structure. -- Introduces script match logic. - FontLanguages changes: -- Moved to private directory not to be instantiated outside of Minikin. -- This is now std::vector<FontLanguage> - FontLanguageListCache changes: -- Now FontLanguageListCache::getId through FontStyle::registerLanguageList is the only way to instantiate the FontLanguage. -- Normalize input to be BCP47 compliant identifier by ICU. Bug: 26168983 Change-Id: I8df992a6851021903478972601a9a5c9424b100c
-
- 09 12月, 2015 1 次提交
-
-
由 Seigo Nonaka 提交于
FontLanguageListCache is an intentionally leaky singleton and its internal cache won't be purged. BUG: 25122318 Change-Id: I272097e979fe44b83fd86822235350e12eda8f51
-
- 28 10月, 2015 2 次提交
-
-
由 Seigo Nonaka 提交于
This is 2nd trial of I30a0914a4633bd93eb60957cdf378770f04d8428 - To suppress noisy unused parameter warnings, comment out unused arguments. - Add -Werror for suppressing further warning. - Add -Wall -Wextra for safety. - Use "z" prefix for format string of size_t. Verified that compile succeeded on all arm,arm64,mips,x86,x86_64. Change-Id: I7ad208464486b8a35da53929cb1cfe541ed0052f
-
由 Bart Sears 提交于
This reverts commit 63635cff. Change-Id: I2b4b10e8afedc85dbe2d07f3e47315652b65cd14
-
- 27 10月, 2015 1 次提交
-
-
由 Seigo Nonaka 提交于
- To suppress noisy unused parameter warnings, comment out unused arguments. - Add -Werror for suppressing further warning. - Add -Wall -Wextra for safety. Change-Id: I30a0914a4633bd93eb60957cdf378770f04d8428
-
- 12 10月, 2015 1 次提交
-
-
由 Seigo Nonaka 提交于
This CL introduces new method hasVariationSelector into FontFamily but it is not used in production code. So no behavior changes are expected. This CL contains the following changes: - Introduce hasVariationSelector which returns true if the corresponding font has a glyph for a code point and variation selector pair. - Introduce purgeHbFontCache since hb_face_t won't be released by keeping hb_font_t. - Introduce unit tests with self-built font. Change-Id: I659a6d03d9ec446b409e1fba2758452abb9f44fa
-
- 30 9月, 2015 2 次提交
-
-
由 Seigo Nonaka 提交于
This CL does following things: - Extract hb_face_t object cache mechanism from Layout.cpp to be able to use it from other cpp file, especially from FontFamily.cpp. To address Bug 11256006 and Bug 17759267, need to touch hb_face_t from FontFamily. - Make hb_face_t cache mechanism thread-safe. - Add unit tests for HbFaceCache test cases. Bug: 11256006 Bug: 17759267 Change-Id: Ic183634ef34326793bd9a32167236611d0af34d6
-
由 Keisuke Kuroyanagi 提交于
This doesn't change current behavior. It's a preparation for the following CLs. Bug: 22408712 Change-Id: Ic018422254aa3904655f499194caad74f0c0fc5d
-
- 11 9月, 2015 1 次提交
-
-
由 Seigo Nonaka 提交于
Currently codepoint to glyph ID resolution is done through MinikinFont interface. To support variation selector, use HarfBuzz API instead of calling this interface since one of its implementation Skia doesn't support variation selector. On the other hand, we don't want to get glyph horizontal advance values by HarfBuzz since HarfBuzz doesn't return correct values when the hinting is active. Thus, use ot_font as a parent font and override glyph_h_advance/glyph_h_origin functions as is. With this change, MinikinFont::GetGlyph is no longer necessary but not removing in this CL for easy reverting since removing interface requires multi-repository commit. This is a base work of b/11256006 and this patch doesn't provide any user visible changes. Bug: 11256006 Change-Id: I061172c0b674bb649ce8bc013ffecf38708bdc41
-
- 29 8月, 2015 1 次提交
-
-
由 Seigo Nonaka 提交于
This CL does: 1. Move the getNextWordBreak/getPrevWordBreak function to a separate source file. 2. Adding "ForCache" suffix for function name for making clear these function is for layout cache. 3. Introduce unit tests for them. Bug: 11256006 Change-Id: I4138751a4570915f1a0d6c8921f89700f8ec7f35
-
- 12 8月, 2015 1 次提交
-
-
由 Roozbeh Pournader 提交于
Reported externally at https://code.google.com/p/android/issues/detail?id=167715. Bug: 21498085 Change-Id: I73f22de03b0151ce31a6b3070d051a2a701b33d2
-
- 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
-
- 30 6月, 2015 1 次提交
-
-
由 Raph Levien 提交于
An incorrect cluster offset calculation was causing a lot of log messages to appear. Separately, a confusion between #if and #ifdef was causing unintended logging of line breaks. This patch fixes both. Bug: 22178333 Change-Id: I2b3673ed66c784f5082fd127a8dc10bd3df6ed79
-
- 27 6月, 2015 1 次提交
-
-
由 Raph Levien 提交于
The appearance of letterspacing with scripts with cursive connections is poor, so we simply disable letterspacing for those scripts. There may be some cases where some form of letterspacing is desirable, but this gives the highest likelihood that the final result will be good without requiring additional work from clients. Bug: 21935803 Change-Id: Ie25266249ac3a2605aa89ef5132e8edbe3a06d35
-
- 13 6月, 2015 1 次提交
-
-
由 Roozbeh Pournader 提交于
Previously, we just assumed the font in use had a U+2010 HYPHEN character, resulting in a tofu (or an empty space) being shown when U+2010 was not supported in the font used to render the hyphenated word. Now we try to fallback to U+002D HYPHEN-MINUS, which has a very good chance of being available in at least any Latin font. We still show a tofu when neither character is supported, to intentionally alert that something is missing. Bug: 20497913 Bug: 21088552 Bug: 21570828 Change-Id: Iff69bbc38836c03495e9124502b5207c39270da2
-
- 28 4月, 2015 1 次提交
-
-
由 John Reck 提交于
namespace naming collision. Move minikin's Bitmap out of android:: and into minikin:: Change-Id: I5ae3925f81b848dc79576429ab55243b96f7fed2
-
- 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
-
- 26 2月, 2015 1 次提交
-
-
由 Roozbeh Pournader 提交于
Previously, HarfBuzz's default fallback to compatibility decompositions resulted in Mathematical Alphanumeric Symbols getting rendered as normal letters and digits when there was no font available to render them. This patch disables that fallback, to ensure they are displayed as tofus. Based on a patch by Behdad Esfahbod. Bug: 19202569 Change-Id: I357f172302448d4ab0b24efc86119f1977b5996b
-
- 04 12月, 2014 1 次提交
-
-
由 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
-
- 12 11月, 2014 1 次提交
-
-
由 Dan Albert 提交于
Bug: 15193147 Change-Id: I5e15c95415c39515340e2663acd5fd26666db720
-
- 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 3 次提交
-
-
由 Behdad Esfahbod 提交于
This reduces another allocation (last one?) we were doing when fulfilling shaping requests from the cache. Bug: 17111260 Change-Id: Ieb8ae1ccfcaacedb257e1e9263777f10623aaf98
-
由 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 2 次提交
-
-
由 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
-
- 26 7月, 2014 1 次提交
-
-
由 Behdad Esfahbod 提交于
Replaces invalid unicode with replacement character U+FFFD and always makes forward progress. Bug: 15849380 Change-Id: Ic59ef6c64b0f5c4450bcae61597adcc269d6e7c5
-
- 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
-
- 26 7月, 2014 1 次提交
-
-
由 Behdad Esfahbod 提交于
After update to HarfBuzz 0.9.33 we don't need this anymore. HarfBuzz takes care of invalid input and passes U+FFFD to us. This reverts commit 4422f4dd. Change-Id: Icfd0dc836a8d684fb1723fc215aa01f99639ff59
-
- 23 7月, 2014 1 次提交
-
-
由 Behdad Esfahbod 提交于
Bug: 15594400 Change-Id: Ied94d7674be4097b0f44c9b0770d3294dc6433c1
-