16 Commits

Author SHA1 Message Date
Seigo Nonaka
210dfa01db Remove MinikinFont::GetGlyph interface.
MinikinFont:GetGlyph is no longer used.
No behavior chnages are expected with this CL.

Change-Id: I13398503841ac06f930b04815017d4b33338efa1
2015-10-15 02:54:18 +00:00
John Reck
8920e81717 Move Bitmap to a different namespace
namespace naming collision. Move minikin's
Bitmap out of android:: and into minikin::

Change-Id: I5ae3925f81b848dc79576429ab55243b96f7fed2
2015-04-27 17:23:29 +00:00
Narayan Kamath
5870d4f0d4 Remove hardcoded ICU include paths.
ICU exports them using LOCAL_EXPORT_C_INCLUDE_DIRS.

bug: 18581021
Change-Id: Ia57b3b4d231966203274b0e7e7b850beb1bd11c0
2015-01-05 11:44:09 +00:00
Andreas Gampe
cb20a2f0b3 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
2014-12-03 14:20:11 -08:00
Dan Albert
69d4fba2f2 Move frameworks/minikin over to libc++.
Bug: 15193147
Change-Id: I5e15c95415c39515340e2663acd5fd26666db720
2014-11-11 19:32:48 -08:00
Behdad Esfahbod
9802b0dc8e Fix examples build
Was broken after recent CSS removal.

Change-Id: I160fbc73286b21336d6f3943ff92d7d150dff74b
2014-07-29 16:57:00 -04:00
Behdad Esfahbod
f0a1e5b2da Remove deprecated API
It has been unused outside minikin.

Change-Id: Iaa2237767d81c77f90d0264e633375e601dd72f1
2014-07-24 19:18:14 -04:00
Elliott Hughes
fbe7ebf529 Switch minikin to the new icu.
Change-Id: I29a59edfe6102257c9f308aac1b4348ef7a18db7
2014-07-10 10:39:07 -07:00
Mike Reed
f8134eff00 setConfig is deprecated
Change-Id: Iffad3ef724b565d5d8fed17722630fd74cda9234
2014-07-07 10:59:40 -04:00
Raph Levien
4d4e6bc811 Caching for layouts and harfbuzz faces
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
2014-05-27 15:39:33 +00:00
Leon Scroggins III
a3998d4f51 Remove references to SkFloatToScalar.
The macro has been deprecated, now that SkScalar is never fixed point.

Fixes minikin build.

Change-Id: I02838a7fa167c5cf58ad225f3f2f52659495492c
2014-05-15 10:52:56 -04:00
Raph Levien
d133eab2a1 Fix build breakage in sample code
This updates the Skia sample implementation to implement GetBounds,
but the FreeType implementation is NYI (to be fixed in future commit).

Change-Id: I24eda14d5fb11c2a1e81394ad8c779de3292dd79
2014-05-14 11:01:32 -07:00
Raph Levien
ecc2d34ac2 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
2014-05-12 09:08:15 -07:00
Victoria Lease
1686c1d7a2 Use shared ft2 lib, deal with libpng/zlib deps
Bug: 9603326
Change-Id: I7df1f68fa3a44b37b1b279387f4ddfe942928bb0
2013-06-27 15:43:55 -07:00
Raph Levien
bcc3dc5a25 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
2013-06-14 11:22:35 -07:00
Raph Levien
9cc9bbe146 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
2013-04-25 12:23:57 -07:00