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
To share the calculated coverage information across the processes, make
SparseBitSet serializable.
Bug: 34042446
Test: minikin_tests passes
Change-Id: I0463138adcf234739bb3ce1cdadf382021921f3e
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
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
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
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