10 Commits

Author SHA1 Message Date
Seigo Nonaka
41e02e9613 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
2017-01-12 13:27:00 +09:00
Hal Canary
4fe92f2bdb SkImageEncoder->SkEncodeImage
Test: none
Change-Id: I9115c41f1699ab5d9d677251d96ea8f4fb844845
2016-11-24 12:09:19 -05:00
Ben Wagner
e6adb66ae9 Move SkTypeface::CreateXXX to SkTypeface::MakeXXX.
Skia is moving to returning smart pointers from its factory methods.
This updates uses of SkTypeface::CreateXXX to SkTypeface::MakeXXX and
generally updates use of SkTypeface to sk_sp. This will allow for the
removal of the SK_SUPPORT_LEGACY_TYPEFACE_PTR define.

Change-Id: If3e600c6cb86080576667bc77d427da4f6560afa
2016-08-05 13:57:22 -04:00
Seigo Nonaka
14e2d136aa 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
2016-06-11 00:11:17 +09: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
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
Mike Reed
f8134eff00 setConfig is deprecated
Change-Id: Iffad3ef724b565d5d8fed17722630fd74cda9234
2014-07-07 10:59:40 -04: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
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