a5fa9e8a63e5764244b709f37bc4a54d2bb96890 |
|
05-May-2017 |
Seigo Nonaka <nona@google.com> |
Resolve styles by font table if not specified. android:fontStyle and android:fontWeight is an optional attribute. If they are missing, we are using non-italic 400 weight, but this is not good idea. We should resolve these style value from font metadata. Bug: 37988154 Test: am instrument -w -e class android.content.res.cts.ResourcesTest android.content.cts/android.support.test.runner.AndroidJUnitRunner Change-Id: I80a436cd3632d8c58fa3d8bdaedac73b95f61a8c
/frameworks/base/core/tests/coretests/src/android/content/res/FontResourcesParserTest.java
|
fb483cc90c27a9c0fcafa28343a8fd644f8384a4 |
|
21-Feb-2017 |
Clara Bayarri <clarabayarri@google.com> |
XML Support for non system font providers The certs needed to identify non preinstalled providers can now be declared in XML, using a resources array. Test: runtest --path frameworks/base/core/tests/coretests/src/android/provider/FontsContractTest.java runtest --path frameworks/base/core/tests/coretests/src/android/content/res/FontResourcesParserTest.java Bug: 35025705 Change-Id: Ibf12ad409aa5a873ddb32b1383c147728e664c23
/frameworks/base/core/tests/coretests/src/android/content/res/FontResourcesParserTest.java
|
ac873c9f25d2a687c9195226b9d680f51c91fa30 |
|
08-Mar-2017 |
Seigo Nonaka <nona@google.com> |
Clean up public FontConfig APIs This CL contains following clean up: - Hide unnecessary constructors. - Change List<XX> to XX[] since actually all fields are immutable. - Change font's variant type from String to int. - Decouple resource related members to FontResourcesParser. - Add NonNull/Nullable to all fields. Test: ran android.content.res.FontResourcesParserTest Change-Id: If456266ffff86d41342572a19662cc8f3cd13181
/frameworks/base/core/tests/coretests/src/android/content/res/FontResourcesParserTest.java
|
3c4be77db95ea716889568bde853be082e764da9 |
|
07-Feb-2017 |
Clara Bayarri <clarabayarri@google.com> |
Support non-system Font Providers To do this, the developer must specify the set of certificate hashes that represent the authority's app. This allows us to verify that the authority we find is indeed the one intended by the developer. Bug: 35025705 Test: runtest --path frameworks/base/core/tests/coretests/src/android/provider/FontsContractTest.java runtest --path frameworks/base/core/tests/coretests/src/android/content/res/FontResourcesParserTest.java CTS attached to topic Change-Id: I605f9a93bbca8705936ead08efb4a5b4fdcc4882
/frameworks/base/core/tests/coretests/src/android/content/res/FontResourcesParserTest.java
|
4b5a4d221f377686a730182a3bffb8c6f190e313 |
|
27-Jan-2017 |
Clara Bayarri <clarabayarri@google.com> |
Declarative downloadable fonts Implement support for downloadable font requests in xml. Given the xml fonts feature in O, this adds support to not only declare local font files as font resources, but also Downloadable fonts from a fonts provider. A provider returns a font family (of one or more files) given a query, so the new attributes are added to the font-family tag. Additionally, add support to pre-declare downloadable font resources in the Android Manifest. These will then be fetched at app startup time so they are available to use from the Typeface cache asap. When retrieving downloadable fonts via resources, the cache is checked to see if the font is already there and is used, otherwise a request is sent to the provider and the default font is returned as we need a result synchronously. To do this, the developer declares an additional fonts xml resource file with the list of fonts to preload and links it in the manifest with a meta-data tag. E.g.: res/font/mydownloadedfont.xml <font-family xmlns:android="http://schemas.android.com/apk/res/android" android:fontProviderAuthority="com.example.test.fontprovider" android:fontProviderQuery="myrequestedfont"> </font-family> res/font/preloaded_fonts.xml <?xml version="1.0" encoding="utf-8"?> <font-family xmlns:android="http://schemas.android.com/apk/res/android"> <font android:font="@font/mydownloadedfont" /> </font-family> and in the AndroidManifest.xml <meta-data android:name="preloaded_fonts" android:resource="@font/preloaded_fonts" /> Bug: 34660500, 34658116 Test: WIP, need to add more Change-Id: I1d92555e115e241bf23b59e6f5c6cca6c7361de7
/frameworks/base/core/tests/coretests/src/android/content/res/FontResourcesParserTest.java
|
9b161fbdbc198d0162c02e28c1c5573cc1d66215 |
|
02-Feb-2017 |
Clara Bayarri <clarabayarri@google.com> |
Fix bugs in FontResourcesParser and add coretests Bug: 34920360 Test: runtest --path frameworks/base/core/tests/coretests/src/android/content/res/FontResourcesParserTest.java Change-Id: I41da558957d25a6f7ee62a4ed9fecf470b74f1d0
/frameworks/base/core/tests/coretests/src/android/content/res/FontResourcesParserTest.java
|