- 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
-
- 26 1月, 2016 1 次提交
-
-
由 Stephen Hines 提交于
Bug: http://b/26781196 Bug: http://b/25884483 Bug: http://b/26432628 Although this issue was first only manifesting on Fugu, it now affects N9 and N6p as well. This change disables unsigned overflow sanitization on all platforms. The real fix for libc++ (r257368) can't be committed until we have updated Clang at least one more time. Change-Id: I71e9c50d25ae4566d4c06f348183c4b22a4bb60a
-
- 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
-
- 15 1月, 2016 1 次提交
-
-
由 Seigo Nonaka 提交于
The motivation of this CL is enhance the font fallback score design to support multiple language font fallback. This CL contains following changes: - Break language based font score into two: script-based score and primary-language-based score. - The primary-language-based score is 0 if the script-based score is 0. If the script-based score is not 0 and the primary language is the as same as the requested one, the font gets an extra score of 1. - The language score gets a higher multiplier for languages higher in the locale list. Bug: 25122318 Bug: 26168983 Change-Id: Ib999997a88e6977e341f4c325e2a1b41a59db2d5
-
- 14 1月, 2016 2 次提交
-
-
由 Raph Levien 提交于
Make it so it's not possible to position the cursor inside an emoji formed by a sequence including zero-width joiners. Bug: 25368653 Change-Id: I67ec0874cd1505f3c82ab91492ffc3d39a52fae6
-
由 Raph Levien 提交于
Make it so it's not possible to position the cursor inside an emoji formed by a sequence including zero-width joiners. Bug: 25368653 Change-Id: I67ec0874cd1505f3c82ab91492ffc3d39a52fae6
-
- 08 1月, 2016 2 次提交
-
-
由 Raph Levien 提交于
A corrupt or malicious font may have a negative size in its cmap range, which in turn could lead to memory corruption. This patch detects the case and rejects the font, and also includes an assertion in the sparse bit set implementation if we missed any such case. External issue: https://code.google.com/p/android/issues/detail?id=192618 Bug: 26413177 Change-Id: Icc0c80e4ef389abba0964495b89aa0fae3e9f4b2
-
由 Raph Levien 提交于
A corrupt or malicious font may have a negative size in its cmap range, which in turn could lead to memory corruption. This patch detects the case and rejects the font, and also includes an assertion in the sparse bit set implementation if we missed any such case. External issue: https://code.google.com/p/android/issues/detail?id=192618 Bug: 26413177 Change-Id: Icc0c80e4ef389abba0964495b89aa0fae3e9f4b2
-
- 07 1月, 2016 3 次提交
-
-
由 Andreas Gampe 提交于
Disable unsigned-integer-overflow sanitizer on x86, as it crashes. Bug: 25884483 Bug: 26432628 Change-Id: Ia658ed56a6c81660a36edf71f7116118056aa917
-
由 Dan Austin 提交于
Enable signed and unsigned integer sanitization in libminikin. Bug: 25884483 Change-Id: I98905827174d16138d20bb443fe2e1d7228ea1a3
-
由 Dan Austin 提交于
This reverts commit 9c13a3dc. Change-Id: Iecd1f61a5fdf5955d871a920cb243553857d46ff
-
- 06 1月, 2016 2 次提交
-
-
由 Seigo Nonaka 提交于
The caller of FontFamily::hasVariationSelector needs to acquire the lock before calling it, but FontCollection::hasVariationSelector didn't acquire the lock. This caused a race condition. This CL fixes this race condition. Also, it turned out that assertMinikinLocked didn't assert even on eng or userdebug device. This CL enables assertion on eng and userdebug device since this assertion must be treated as bug. BUG: 26323806 Change-Id: I9c4b1e1f09c6793e387fbdb8bb654cc0a13c65d5
-
由 Dan Austin 提交于
Enable signed and unsigned integer sanitization in libminikin. Bug: 25884483 Change-Id: I53abf6affea8e2bb3a5abd381a9f19003a306b36
-
- 05 1月, 2016 2 次提交
-
-
由 Seigo Nonaka 提交于
The emoji variant script "Zsye" is registered in ISO 15924. Bug: 26226285 Change-Id: Ibc2bc740d57c48f99b6f66b1ad7595bfa8c3cff4
-
由 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
-
- 12 12月, 2015 1 次提交
-
-
由 Dan Austin 提交于
Replaced two instances of negating an unsigned long, which was resulting in aborts from unsigned integer sanitization with the equivalent logical not-add 1. Bug: 25884483 Change-Id: Ic7498e0af638dcd438ce69803021d3cdc3acd4f6
-
- 11 12月, 2015 1 次提交
-
-
由 Seigo Nonaka 提交于
Removing the extra score of 2 for the script matching from the font fallback score calculation. If the two langauges have different scripts, we should treat them as different languages. Change-Id: Ie0d6f27bd1086248895935a7bd01b5d404044ad0
-
- 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
-
- 08 12月, 2015 2 次提交
-
-
由 Seigo Nonaka 提交于
If U+FE0E is appended to the emoji code point, the glyph should have a text presentation. On the other hand, if U+FE0F is appended to the emoji code point, the glyph should have an emoji presentation. Bug: 11256006 Change-Id: I5187d44500b13a138e7ffbcf2c72e2da06374c8c
-
由 Raph Levien 提交于
A malformed TTF can cause size calculations to overflow. This patch checks the maximum reasonable value so that the total size fits in 32 bits. It also adds some explicit casting to avoid possible technical undefined behavior when parsing sized unsigned values. Bug: 25645298 Change-Id: Id4716132041a6f4f1fbb73ec4e445391cf7d9616 (cherry picked from commit 183c9ec2)
-
- 01 12月, 2015 1 次提交
-
-
由 Raph Levien 提交于
A malformed TTF can cause size calculations to overflow. This patch checks the maximum reasonable value so that the total size fits in 32 bits. It also adds some explicit casting to avoid possible technical undefined behavior when parsing sized unsigned values. Bug: 25645298 Change-Id: Id4716132041a6f4f1fbb73ec4e445391cf7d9616
-
- 19 11月, 2015 4 次提交
-
-
由 Seigo Nonaka 提交于
To optimize the font family search, mRanges is used for narrowing down the search range. However, mRanges is constructed from format 4 or format 12 entries. So, if the font supports a variation sequence but doesn't support the base character of the sequence, the font may not be listed in mRanges. The proper way to fix this issue is using format 14 subtable information for mRanges construction. However, this is not a trivial work since currently we rely on HarfBuzz for variation sequence lookup and it doesn't provide any API for retrieving coverage information. Thus, as the quick fix, iterate all font families in font fallback chain if the variation sequence is specified. Change-Id: I278da84be8fb8f553590e2e42ed450b7e4a34eca
-
由 Seigo Nonaka 提交于
To implement Paint.hasGlyph(), we need a new method to ask the FontCollection if it has a glyph for the code point and variation selector pair. Bug: 11256006 Change-Id: Ie4185c91bcaa4d01aee6beb97784b1f9d2a88f12
-
由 Raph Levien 提交于
Due to the way emoji ZWJ sequences are defined, the ICU line breaking algorithm determines that there are valid line breaks inside the sequence. This patch suppresses these line breaks. Bug: 25433289 Change-Id: I225ebebc0f4186e4b8f48fee399c4a62b3f0218a
-
由 Raph Levien 提交于
This patch basically ignores variation selectors for the purpose of itemization into font runs. This allows GSUB to be applied when input sequences contain variation selectors. Bug: 25368653 Change-Id: I9c1d325ae0cd322c21b7e850d0ec4d73551b2372
-
- 13 11月, 2015 1 次提交
-
-
由 Seigo Nonaka 提交于
This issue was introduced by I22ce0e9eadc941f84e3a9b23462f194e51dd7180. Need to decrement the two utf16 chars in KEYCAP handling. To add unit tests, this CL also addresses the Bug: 24184208 by introducing self built fonts since there is no good example in system installed fonts. Bug: 24184208 Change-Id: I23fa008adbaced78a3cb96442a6bc8892ab84ce8
-
- 03 11月, 2015 1 次提交
-
-
由 Raph Levien 提交于
Due to the way emoji ZWJ sequences are defined, the ICU line breaking algorithm determines that there are valid line breaks inside the sequence. This patch suppresses these line breaks. Bug: 25433289 Change-Id: I225ebebc0f4186e4b8f48fee399c4a62b3f0218a
-
- 30 10月, 2015 1 次提交
-
-
由 Raph Levien 提交于
This patch basically ignores variation selectors for the purpose of itemization into font runs. This allows GSUB to be applied when input sequences contain variation selectors. Bug: 25368653 Change-Id: I9c1d325ae0cd322c21b7e850d0ec4d73551b2372
-
- 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
-
- 23 10月, 2015 1 次提交
-
-
由 Roozbeh Pournader 提交于
The behavior hasn't changed much yet: all languages are ignored for rendering text, except the very first supported language. Change-Id: I1695fb985927ae5e28e4f59c1b531e4993af8688
-
- 20 10月, 2015 1 次提交
-
-
由 Seigo Nonaka 提交于
This CL contains the following changes: - Add a variation selector argument into getFamilyForChar to be able to select fonts which support variation selector. - In case no fonts support the codepoint and variation selector pair, add a fallback rule which selects font family with ignoring variation selector. - Change FontCollection::itemize to not change the font family immediately preceding a variation selector. - Introduce unit tests for variation selectors. With this CL, TextView can render the variation selectors correctly. Bug: 11256006 Change-Id: I22ce0e9eadc941f84e3a9b23462f194e51dd7180
-
- 15 10月, 2015 3 次提交
-
-
由 Seigo Nonaka 提交于
MinikinFont:GetGlyph is no longer used. No behavior chnages are expected with this CL. Change-Id: I13398503841ac06f930b04815017d4b33338efa1
-
由 Roozbeh Pournader 提交于
The previous commit, 6e2cccdc, was incompletely cherry-picked. This adds the missing parts. Bug: 24570591 Change-Id: I1097c60587fb8a88cfe6b8ffed5b1689d9bdd429
-
由 Raph Levien 提交于
In the current state, hyphenation in all languages than Sanskrit seems to work (case-folding edge cases). Thus, we just disable Sanskrit. Packed tries are implemented, but not the finite state machine (space/speed tradeoff). This commit contains a throw-away test app, which runs on the host. I think I want to replace it with unit tests, but I'm including it in the CL because it's useful during development. Bug: 21562869 Bug: 21826930 Bug: 23317038 Bug: 23317904 Bug: 24570591 Change-Id: I7479a565a4a062fa319651c2c14c0fa18c5ceaea (cherry picked from commit f0be43de)
-
- 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
-
- 01 10月, 2015 1 次提交
-
-
由 Raph Levien 提交于
In the current state, hyphenation in all languages than Sanskrit seems to work (case-folding edge cases). Thus, we just disable Sanskrit. Packed tries are implemented, but not the finite state machine (space/speed tradeoff). This commit contains a throw-away test app, which runs on the host. I think I want to replace it with unit tests, but I'm including it in the CL because it's useful during development. Bug: 21562869 Bug: 21826930 Bug: 23317038 Bug: 23317904 Change-Id: I7479a565a4a062fa319651c2c14c0fa18c5ceaea
-