This CL enables developers to specify axis values to the underlying
font collection. The specification of the font variation settings is
the same as the CSS font-variation-settings attribute in CSS working
draft as of 2016-11-30.
Code example: Here is an example to set width 100 and weight 1.5.
TextView tv = (TextView) findViewById(R.id.textView);
tv.setFontVariationSettings("'wdth' 100, 'wght' 1.5");
Bug: 33062398
Test: Manually done. Ran FrameworksGraphicsTests, CtsGraphicsTestCases
and CtsWidgetTestCases
Change-Id: I249d464f8cdaa56017a987588b94ed685aadeb58
minikin::FontFamily no longer has addFont function, instead it accept
vector of Fonts in its constructor. To follow this signature change,
holding minikin::Font instance in native and build minikin::FontFamily
instance in FontFamily.freeze() method.
Test: hwui test passed
Change-Id: Id10ca97f6f6f5bbe4999c1ad2736423a204d6e87
This API is difficult to support for printing and has other negative
effects as it does not respect the current matrix/clip.
Test: compile
Bug: 14650725
Change-Id: I71f9bd687d446c7ce8910d755421aad8e09458db
This configuration uses 64 bits per pixel. Heach component is stored as a
half precision float value (16 bits). Half floats can be decoded/encoded
using android.util.Half.
RGBA_F16 bitmaps are used to decode wide-gamut images stored in 16 bit
formats (PNG 16 bit for instance). aapt is currently not aware of PNG
16 bits so such files must be placed in raw/ resource directories.
This first pass provides only partial drawing support with hardware
acceleration. RGBA_F16 bitmaps are stored in linear space and need
to be encoded to gamma space with the appropriate OETF to be rendered
properly on Android's current surfaces. They are however suitable for
linear blending. Full rendering support will be provided in a future
CL (BitmapShaders might be a bit tricky to handle properly during
shader generation).
Bug: 32984164
Test: bit CtsGraphicsTestCases:android.graphics.cts.BitmapRGBAF16Test
Change-Id: I328e6b567441a1b9d152a3e7be944a2cf63193bd
CSS Font4 only allows U+0020..U+007E characters for tag string.
Reject outside of this range.
Bug: 33062398
Test: am instrument -w -e class android.graphics.VariationParserTest \
com.android.frameworks.graphicstests/android.test.InstrumentationTestRunner
Change-Id: Ia119151bc67caebfdaacda17aa3ee261a9e5d872
fix:32705240
fix:32683765
fix:32831830
fix:32705244
Test: make offline-sdk-docs and view the HTML file.
Merged-In: I6ae3e5850494f13a241b2e9e4d2c5b95d5199aae
Change-Id: I6ae3e5850494f13a241b2e9e4d2c5b95d5199aae
Introduce a new internal flag MATCH_ANY_USER for genuine uses
of searching through all apps on the device.
Some temporary accommodations for Launchers that reach across
to the work profile until we have a new LauncherApps API to do
that officially.
Bug: 31000380
Test: CTS tests added
Change-Id: I2e43dc49d6c2e11814a8f8d1eb07ef557f31af34
ColorSpace.createRenderer() returns a ColorSpace.Renderer which
can be used to visualize multiple color spaces and colors (each
associated with a specific color space) in the same CIE 1931 xyY
chromaticity diagram. This API was used to generate all the
diagrams shown in the documentation.
Bug: 32984164
Test: ColorSpaceTest in CTS
Change-Id: Ic94d939d5cfd563d826701f5e876b67b47ed56ec
Font variation settings enables developer to specify font axes for
configuring glyph looking. This CL parse Font Variation settings to
make a array of Axis. More work is needed for using parsed axes.
Bug: 33062398
Test: Done by unittests.
Change-Id: I529b98b28df1c738237bee0729d9f479bd656dd3
Some initial cleanup before making changes to either class.
Test: n/a, refactoring only
Bug: 33124798
Change-Id: Idf0328bcc6de72b694ca7b35122ecad845cf1c4b
This class can be used to define color spaces. A color space has a color model
and a profile connection space (CIE XYZ D50). This implementation can be used
to query various properties of RGB color spaces or perform conversions between
various color spaces (RGB, XYZ and Lab).
Refer to the documentation for more details.
Test: cts-tradefed run singleCommand cts-dev --module CtsGraphicsTestCases --test android.graphics.cts.ColorSpaceTest
Bug: 32984164
Change-Id: Ie2117c1212c1375a7d403d3c1afaf73d7c2e0b47
fix:32705240
fix:32683765
fix:32831830
fix:32705244
Test: make offline-sdk-docs and view the HTML file.
Change-Id: I6ae3e5850494f13a241b2e9e4d2c5b95d5199aae
Adds the ability to control word spacing from Java, wiring up the
plumbing to the corresponding change that adds it at the Minikin
level.
Bug: 31707212
Test: ran graphicstests
Change-Id: I568186aca961d51ee5231cb0331f882b7b005e90
update-api orders methods alhabetically by name, but when
there's multiple methods with the same name it falls back to
the ordering within the file.
Re-order the methods in canvas.java to match what's already in
current.txt to avoid unnecessary changes.
Also auto-formatted the draw methods as some were mis-indented.
Test: No behavior change, just method re-ordering
Change-Id: I2a7d313c8e7a6bd9187c4ed7dbde944b88aa32bb