History log of /frameworks/minikin/libs/minikin/FontFamily.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
9196194d76e4325c5bb0c23f22a5787a717067ed 18-Mar-2017 Seigo Nonaka <nona@google.com> Compute SparseBitSet for cmap format 14 subtables.

By computing cmap format 14 subtables similar to cmap format 4 or 12,
there are following benefits:
- FontCollection::hasVariationSelector becomes 70x faster for the worst
case, 10x faster for the normal case.
- FontFamily::hasGlyph becomes lock-free.
- FontCollection::itemize becomes 2x faster than before for some cases.

On the other hand, following negative things happen:
- Initial FontFamily construction takes 2.5x longer than before, but this
only happens in Zygote and should not happen at application launch time.
- FontFamily construction from buffer takes longer time than before but
it is still around 800µs.
- Consumes additionally memory (about 30kB for NotoSansCJK-Regular.ttc
of ttc index 0, 2.5kB for NotoColorEmoji.ttf), but this is shared across
all applications. No additional memory is necessary if the font doesn't
support variation sequences.

Bug: 36401726
Test: minikin_tests passed
Test: minikin_stress_tests passed
Test: android.graphics.cts.PaintTest passed
Merged-In: I3ebc9ad5050fb9ab6283810d31ae8d13af168ec5
Change-Id: Ia84c4b56aed35a899223e33c1a4a15734de58c33
/frameworks/minikin/libs/minikin/FontFamily.cpp
db1b6cb7765091453d9b4dc7f6c2fb4d7123ab11 25-Mar-2017 Seigo Nonaka <nona@google.com> Support cmap tables with platform ID == 0

Some fonts don't have cmap subtables of Microsoft Platform ID (3) and
only have cmap subtables of Unicode Platform ID (0).

Bug: 32505843
Test: minikin_unittest passed
Test: android.graphics.cts.TypefaceTest passed
Change-Id: I24aa49860790c0ae8d8e578efd728b95ec0f93ae
/frameworks/minikin/libs/minikin/FontFamily.cpp
dff5e5d5a1d0f17a1b5d2fd197b5a6389bc41e28 22-Mar-2017 Seigo Nonaka <nona@google.com> Remove unused functions.

This CL is essentially reverting following changes:
- "Serialize and deserialize supported axes."
I4086fb887e13f872390b533584bce6f1d5598ea0
- "Make SparseBitSet serializable."
I0463138adcf234739bb3ce1cdadf382021921f3e

Bug: 36232655
Test: N/A
Change-Id: I25c701e1805e92b01034142147a9925f86533819
/frameworks/minikin/libs/minikin/FontFamily.cpp
1adbccfd0f40ef416e4f76ea16cbc0bae549d669 15-Mar-2017 Seigo Nonaka <nona@google.com> Serialize and deserialize supported axes.

To avoid reading font files during FontFamily construction, serialize
and deserialize supported axes and cmap coverage at the same time.

Bug: 36232655
Test: ran minikin_tests
Change-Id: I4086fb887e13f872390b533584bce6f1d5598ea0
/frameworks/minikin/libs/minikin/FontFamily.cpp
fd4124c53399581dd94eac5a9749bc07b474a294 14-Mar-2017 Seigo Nonaka <nona@google.com> Revert "Use std::mutex instead of android::Mutex"

This reverts commit 62ad565335d4774bc5b31ced462e92566b48d197.

Bug: 36208043
Test: N/A

Change-Id: I165ab7a0718ea50a8034adb6277809e271fd762c
/frameworks/minikin/libs/minikin/FontFamily.cpp
2cb3214e55f360fc76bc2ef1fe34359847c9d03f 14-Mar-2017 Seigo Nonaka <nona@google.com> Fix build failure due to unexpected merge.

FontLanguageListCache::kEmptyListId is gone, use kEmptyLanguageListId
instead.

Test: N/A
Change-Id: I96075849c53f23fbce8dbc180a51d8f97e45f316
/frameworks/minikin/libs/minikin/FontFamily.cpp
44075ee9fa0e1c64defe1c2534d6ce1ff0f775a2 14-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Make SparseBitSet serializable."
fbbc5a6b361c623e47a433f83e7200b4e2ba3501 05-Jan-2017 Seigo Nonaka <nona@google.com> Make SparseBitSet serializable.

To share the calculated coverage information across the processes, make
SparseBitSet serializable.

Bug: 34042446
Test: minikin_tests passes
Change-Id: I0463138adcf234739bb3ce1cdadf382021921f3e
/frameworks/minikin/libs/minikin/FontFamily.cpp
62ad565335d4774bc5b31ced462e92566b48d197 21-Feb-2017 Seigo Nonaka <nona@google.com> Use std::mutex instead of android::Mutex

This CL includes:
- Stop using utils/Mutex and use std::mutex instead.
- Stop using utils/Singleton.

Test: minikin_tests passed
Change-Id: Ib3f75b83397a546472bb5f91e066e44506e78263
/frameworks/minikin/libs/minikin/FontFamily.cpp
dfbc6e374259f9d81940b5195ac013b02429af27 10-Feb-2017 Seigo Nonaka <nona@google.com> Remove MinikinRefCounted and use shared_ptr instead

Let's use shared_ptr since manual ref counting can be a bug-prone and
using the global mutex inside destructor is not useful for some time.

To remove raw pointer manipulation, needed to change Layout
constructors. Layout is no longer copyable and need to pass
FontCollection to constructor.

Bug: 28119474
Test: minikin_tests passed
Test: hwui_unit_tests passed
Test: No performance regression in minikin_perftest.
Change-Id: I8824593206ecba74cbc9731e298f045e1ae442a3
/frameworks/minikin/libs/minikin/FontFamily.cpp
065c46a665d562c93ffa82fda10dee52a16ac23b 22-Nov-2016 Seigo Nonaka <nona@google.com> Introduce createCollectionWithVariation.

This is 2nd attempt of I08e9b74192f8af1d045f1276498fa4e60d73863e.
The original CL was reverted due to conflicting with another CL submitted
before.

Here is the original commit message of reverted change.

This lays the groundwork for variation settings support.
Since we should regard different variations of a font as different fonts, we
need to create new typefaces. To reuse the same instance of MinikinFont, as
much as possible, FontFamily::createFamilyWithVariation now reuses an
existence instance, while incrementing the reference count.

Test: minikin_tests
Bug: 33062398
Change-Id: Ib25bf1bb5a5191e15a6523954146521464c91906
/frameworks/minikin/libs/minikin/FontFamily.cpp
41718c770d0ae12133270a4ee4a8dbd27851480d 28-Dec-2016 Seigo Nonaka <nona@google.com> Remove FontFamily.addFont and make FontFamily immutable.

This is 2nd attempt of 41e02e96131c1ec66d013e4615348be013518dc4
The difference is adding clearElementsEithLock to Font class which
is necessary to delete Fonts object outside of minikin. This method
should be removed once http://b/28119474 is fixed.

Here is original commit message of reverted change.

This lays the groundwork for making SparseBitSet serializable.
FontFamily.addFont is only used when the FontFamily is constructed.
Thus, instead of calling FontFamily.addFont multiple time, passes
Font list to the constructor. By this change, FontFamily can be
immutable now.

By making FontFamily immutable, We can create FontFamily with
pre-calculated SparseBitSet.

Bug: 34042446
Bug: 28119474
Bug: 34378805
Test: minikin_tests has passed
Change-Id: Ice433931196f5ae79a1a7ee0c98020f914aeb5f2
/frameworks/minikin/libs/minikin/FontFamily.cpp
cc0352cc677e4ecea6ae12f734a010d290734e86 20-Jan-2017 Siyamed Sinir <siyamed@google.com> Revert "Remove FontFamily.addFont and make FontFamily immutable."

This reverts commit 41e02e96131c1ec66d013e4615348be013518dc4.

Bug: 34378805
Change-Id: I8f1ee00b365c8b17c6140e9e286fbea082e31364
/frameworks/minikin/libs/minikin/FontFamily.cpp
1c7b0261542f8a54e7b3e52236070f62d073e17f 20-Jan-2017 Siyamed Sinir <siyamed@google.com> Revert "Introduce createCollectionWithVariation."

This reverts commit 90e6b1885d44c33b1da9477a85dc7dd066acd33f.

Bug: 34378805
Change-Id: I22b683f774813724f220b1b8584ab188f3cf4fa7
/frameworks/minikin/libs/minikin/FontFamily.cpp
90e6b1885d44c33b1da9477a85dc7dd066acd33f 22-Nov-2016 Seigo Nonaka <nona@google.com> Introduce createCollectionWithVariation.

This lays the groundwork for variation settings support.
Since we should regard different variations of a font as different fonts, we
need to create new typefaces. To reuse the same instance of MinikinFont, as
much as possible, FontFamily::createFamilyWithVariation now reuses an
existence instance, while incrementing the reference count.

Test: minikin_tests
Bug: 33062398
Change-Id: I08e9b74192f8af1d045f1276498fa4e60d73863e
/frameworks/minikin/libs/minikin/FontFamily.cpp
41e02e96131c1ec66d013e4615348be013518dc4 28-Dec-2016 Seigo Nonaka <nona@google.com> Remove FontFamily.addFont and make FontFamily immutable.

This lays the groundwork for making SparseBitSet serializable.
FontFamily.addFont is only used when the FontFamily is constructed.
Thus, instead of calling FontFamily.addFont multiple time, passes
Font list to the constructor. By this change, FontFamily can be
immutable now.

By making FontFamily immutable, We can create FontFamily with
pre-calculated SparseBitSet.

Bug: 34042446
Test: minikin_tests has passed
Change-Id: I2576789fba6cb27687e920e2488e8bedbcf7d36f
/frameworks/minikin/libs/minikin/FontFamily.cpp
77baca2bda0f8d313f48af2df0b397d5de94a132 10-Jan-2017 Mark Salyzyn <salyzyn@google.com> resolve merge conflicts of dff2a9d to master

Test: compile
Bug: 30465923
Change-Id: I9bcbf910e90a9160ed2fd2f75c5d72dba6ad6fcf
39ab40115fae6d0c948e435233b3dd997ee7d8e5 09-Jan-2017 Mark Salyzyn <salyzyn@google.com> minikin: use log/log.h when utilizing ALOG macros

Use log/log.h to harden code against liblog changes.

Test: compile
Bug: 30465923
Change-Id: I3dea82e76d28d9ef52d7c0f11e038c4298863eb9
/frameworks/minikin/libs/minikin/FontFamily.cpp
32c12c0ac825453f4c3bba07718cfe684ec90bec 28-Dec-2016 Mark Salyzyn <salyzyn@google.com> resolve merge conflicts of 2377a00 to master

Test: build
Bug: 26552300
Bug: 31289077
Change-Id: I6181ae7e84f9bdcbed50841c70d07f6906a10eb7
555d84c6f98eafcbe677cdcb8e9605760acd8ce5 29-Sep-2016 Mark Salyzyn <salyzyn@google.com> minikin: Replace cutils/log.h with android/log.h or log/log.h

- replace cutils/log.h with android/log.h (main buffer logging)
- replace cutils/log.h with log.log.h (+SafetyNet logging)
- define LOG_TAG before use.

Test: compile
Bug: 26552300
Bug: 31289077
Change-Id: I7a4803dd66f31b7103e09e5ff5b8fa523fa0fd60
/frameworks/minikin/libs/minikin/FontFamily.cpp
e1d7f6168a0a485ecac75cfc9ae3bdc5143d0fb1 12-Sep-2016 yirui <yirui@google.com> Parse Emoji subtag and store it to FontLanguage

Parse Emoji subtag and store into 4 different styles: default, text,
color and empty. Replace hasEmojiFlag function with getEmojiStyle to
get effective status according to script and subtag. However, score
calculation for the font selection needs to be completed in the next
stage. No performance regression is observed with this CL.

Bug: 31608997
Test: Done by unittests.
Change-Id: I923243641c946248dd5a0aa9fb9c940515310d34
/frameworks/minikin/libs/minikin/FontFamily.cpp
57e469e6f8616c4de758441547a97c9ed4dbfcdf 13-Sep-2016 Elliott Hughes <enh@google.com> Switch minikin to std::unique_ptr. am: 6261d82459 am: e716bdbd48 am: 2583c5c86b
am: bb3df55710

Change-Id: I56cce90607bce82d337d4da3b4ac5f167c7cc1b4
6261d824595d3590b5355d8dea80949769d8e38e 11-Sep-2016 Elliott Hughes <enh@google.com> Switch minikin to std::unique_ptr.

Bug: http://b/22403888
Change-Id: I9e18496fcc38ad2e6b922455daa9f2a46778ec55
/frameworks/minikin/libs/minikin/FontFamily.cpp
14e2d136aaef271ba131f917cf5f27baa31ae5ad 09-Jun-2016 Seigo Nonaka <nona@google.com> Always use minikin namespace.

Here is a new policy of the namespace of minikin.
- All components should be in minikin namespace.
- All tests are also in minikin namespace and no anonymous namespace.

Bug: 29233740
Change-Id: I71a8a35049bb8d624f7a78797231e90fed1e2b8c
/frameworks/minikin/libs/minikin/FontFamily.cpp
994aa84f7b18466806fe552ea57da1852b909f24 08-Mar-2016 Seigo Nonaka <nona@google.com> Returns hasVariationSelector true for VS15/VS16

Minikin has a special font fallback for VS15/VS16, so
hasVariationSelector for emojis with VS15/VS16 should always return
true.

Bug: 27531970
Change-Id: Ieebd58f48b135b6ec50d999df68dcc09b1284606
/frameworks/minikin/libs/minikin/FontFamily.cpp
aaa4e3470270496e6eb80704eadecb2cb7c56bf0 07-Apr-2016 Raph Levien <raph@google.com> Avoid copying of font table data

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
/frameworks/minikin/libs/minikin/FontFamily.cpp
6b1c227da6492a435f0341d7fe95d9992669920e 02-Feb-2016 Seigo Nonaka <nona@google.com> Improve Paint.measureText and Paint.hasGlyph for variation sequences.

Before this patch, the font fallback chain iterated all installed font
families if a variation selector was specified.

This CL narrows down the range of iteration.
To decide the font family for the variation sequence, we need to search
for both the variation sequence and its base code point.
The new range of the iteration is a union of them.

With this change, the running time of Paint.hasGlyph for the variation
sequence improves 50% and the running time of Paint.measureText for the
variation sequence improves 40% for the large text case on Nexus 6
userdebug.

Bug: 26784699
Bug: 11750374

Change-Id: Iced1349e3ca750821d8882c551551f65bb569794
/frameworks/minikin/libs/minikin/FontFamily.cpp
89e80237bc27af084c9ff316d4f47abf426eced8 03-Feb-2016 Seigo Nonaka <nona@google.com> Improve Paint.hasGlyph performance by caching hb_font_t

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
/frameworks/minikin/libs/minikin/FontFamily.cpp
198b46f1fea3f47ef8eb6317799c0d77aaec52f6 15-Dec-2015 Seigo Nonaka <nona@google.com> Save all kind of script tags into FontLanguage.

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
/frameworks/minikin/libs/minikin/FontFamily.cpp
6c4c098cbd37eccef483ab1986127250b4d2ddf2 22-Dec-2015 Bart Sears <bsears@google.com> Revert "Save all kind of script tags into FontLanguage."

This reverts commit 5e995fb850c2b32631914c3815dfb421855fba9b.

Change-Id: I761e0e41906742fbe3d3ac34170af3101e18042a
/frameworks/minikin/libs/minikin/FontFamily.cpp
5e995fb850c2b32631914c3815dfb421855fba9b 15-Dec-2015 Seigo Nonaka <nona@google.com> Save all kind of script tags into FontLanguage.

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
/frameworks/minikin/libs/minikin/FontFamily.cpp
43bb9743ca91a761b9723674ac862660dd2be834 10-Dec-2015 Seigo Nonaka <nona@google.com> Remove script matching score from the font selection fallback.

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
/frameworks/minikin/libs/minikin/FontFamily.cpp
6d9dcd2cf3d3ed26a886e02d94c907311e7b1f83 02-Dec-2015 Seigo Nonaka <nona@google.com> Introduce FontLanguageListCache.

FontLanguageListCache is an intentionally leaky singleton and its
internal cache won't be purged.

BUG: 25122318

Change-Id: I272097e979fe44b83fd86822235350e12eda8f51
/frameworks/minikin/libs/minikin/FontFamily.cpp
369d2d44cb09ac4346cdd9e3b131bb173d764f88 29-Oct-2015 Seigo Nonaka <nona@google.com> Select emoji font based on variation selectors.

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
/frameworks/minikin/libs/minikin/FontFamily.cpp
bae347682989d2627081310129a5b60541ed6ad0 27-Oct-2015 Seigo Nonaka <nona@google.com> Add -Werror -Wall -Wextra to compiler option.

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
/frameworks/minikin/libs/minikin/FontFamily.cpp
4b723bf22b1bbc5fcdaa9bd96178c921199905d5 20-Oct-2015 Roozbeh Pournader <roozbeh@google.com> Basic scaffolding for handling a language list.

The behavior hasn't changed much yet: all languages are ignored for
rendering text, except the very first supported language.

Change-Id: I1695fb985927ae5e28e4f59c1b531e4993af8688
/frameworks/minikin/libs/minikin/FontFamily.cpp
0f2a025d135f9ca52cc3cf917fffc29d6c126094 24-Sep-2015 Seigo Nonaka <nona@google.com> Introduce FontFamily::hasVariationSelector

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
/frameworks/minikin/libs/minikin/FontFamily.cpp
71ec97055357b6ccb13a2697a56254bb19f43ae9 08-Aug-2015 Roozbeh Pournader <roozbeh@google.com> Support three-letter language codes in FontLanguage.

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
/frameworks/minikin/libs/minikin/FontFamily.cpp
cb20a2f0b366bfc16db3a489a60156dec7a9fe21 25-Nov-2014 Andreas Gampe <agampe@google.com> Minikin: Remove unused variables, fix init order

For build-system CFLAGS clean-up, fix unused variables.

Reorder initializer list to initialize in the order of member
declarations.

Change-Id: I64358b2dcf0e39d0f4e18fdc3473de867f84fcba
/frameworks/minikin/libs/minikin/FontFamily.cpp
13f1aae02bacd475722bc8ea3fc2cf6abc1a82e3 29-Oct-2014 Raph Levien <raph@google.com> Move coverage bitmap from FontCollection to FontFamily

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
/frameworks/minikin/libs/minikin/FontFamily.cpp
d5804e3937a961736e5cef0e8a70eacf91ee00bb 22-Sep-2014 Raph Levien <raph@google.com> Fine-tune fake-bolding condition

The old logic for fake bolding results in no fake bolding for a bold
span on a light weight (300) because the target weight (600 in this
case) didn't meet the condition. This patch fine-tunes the threshold
to enable fake bolding for this.

Bug: 17587185

Change-Id: I04abd00a74240cbed79c417f81486aa2158b2806
/frameworks/minikin/libs/minikin/FontFamily.cpp
a5bb91190edbea0be0e78a8511b3c920b6e99c4e 25-Jul-2014 Behdad Esfahbod <behdad@google.com> Towards CSS removal

Extract language from FontStyle during shaping. Don't attach CSS
to LayoutContext.

Change-Id: Ie621d3415410178d0d15fa7b810eb8e412342ab6
/frameworks/minikin/libs/minikin/FontFamily.cpp
9f9f3b1ef40f7358dca6acd9dfef686cedefb6aa 12-Jun-2014 Raph Levien <raph@google.com> Tighten requirements for fake bold

The simple predicate for fake bold (2 or more grades darker than
requested) was applying it to thin (100 weight) when normal was
requested. This patch tightens the predicate to also require that
the requested weight be in the bold range.

Fix for bug 15588352 "sans-serif-thin doesn't work on lockscreen"

Change-Id: Id9988bd149a9c8a7c943e3b221f7fb4b37fb6ddb
/frameworks/minikin/libs/minikin/FontFamily.cpp
9a5f713add8cfb91ac2c9ed5c917309053201ab6 07-Jun-2014 Raph Levien <raph@google.com> Support for fake bold and italics

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
/frameworks/minikin/libs/minikin/FontFamily.cpp
7b221d97b7b64dc5ce457e19666d55d042e22e62 27-May-2014 Raph Levien <raph@google.com> Language and variant selection

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
/frameworks/minikin/libs/minikin/FontFamily.cpp
c31e3883456e018d742e9f29815ba5ff8b315ea1 19-May-2014 Raph Levien <raph@google.com> Fix incomplete refcounting and locking

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
/frameworks/minikin/libs/minikin/FontFamily.cpp
b80c1f19c58b927820a8a24bf2218e5645724608 06-May-2014 Raph Levien <raph@google.com> Better refcounting and locking

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
/frameworks/minikin/libs/minikin/FontFamily.cpp
ecc2d34ac23a497988f21e5f415b53c007b9d8c5 15-Jul-2013 Raph Levien <raph@google.com> A basket of features: itemization, bounds, refcount

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
/frameworks/minikin/libs/minikin/FontFamily.cpp
1279a3bf5ec6131efefbc51d52d24850fd81f676 12-Sep-2013 Kenny Root <kroot@google.com> Use canonical UniquePtr.h header

Change-Id: Id50e9d6fe2f08d3121b168b45791a8e8fb045d7f
/frameworks/minikin/libs/minikin/FontFamily.cpp
bcc3dc5a2591a95a57e379e27cbad69c18e91e67 23-May-2013 Raph Levien <raph@google.com> Introduce MinikinFont abstraction

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
/frameworks/minikin/libs/minikin/FontFamily.cpp
9cc9bbe1461f359f0b27c5e7645c17dda001ab1d 24-Apr-2013 Raph Levien <raph@google.com> Initial commit of Minikin library

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
/frameworks/minikin/libs/minikin/FontFamily.cpp