0f07dd5b14e76695bbae758e948e00b86935232c |
|
28-Apr-2017 |
Seigo Nonaka <nona@google.com> |
Remove FontVariationAxis.InvalidFormatException. Use IllegalArgumentException instead. Bug: 37769084 Bug: 37765945 Test: am instrument -w -e class android.widget.cts.TextViewTest android.widget.cts/android.support.test.runner.AndroidJUnitRunner Test: am instrument -w -e class android.graphics.cts.TypefaceTest android.graphics.cts/android.support.test.runner.AndroidJUnitRunner Test: am instrument -w -e class android.graphics.cts.PaintTest android.graphics.cts/android.support.test.runner.AndroidJUnitRunner Test: am instrument -w -e class android.graphics.cts.FontVariationAxisTest android.graphics.cts/android.support.test.runner.AndroidJUnitRunner Test: am instrument -w -e class android.text.VariationParserTest com.android.frameworks.coretests/\ android.support.test.runner.AndroidJUnitRunner Change-Id: I50b70e3e7e37585c937dcce2416a83353de62a5d
/frameworks/base/graphics/java/android/graphics/FontListParser.java
|
ff55115121a7a2753ba2265cb3201a3a14c0874d |
|
29-Mar-2017 |
Seigo Nonaka <nona@google.com> |
Reorganize font enumeration API. This CL cleans up APIs around font variation settings. - Remove FontConfig and FontManager public API. - Remove FontManagerService from system service. - Extract inner class FontConfig.Axis as top-level class FontVariationAxis. This is used by Typeface.Builder public API to create new Typeface. - Introduce and expose FontVariationAxis utility functions from/to string. - Throws if the invalid font variation settings is passed. Test: android.text.cts.FontVariationAxisTest passes Test: android.graphics.cts.TypefaceTest passes Test: android.graphics.cts.PaintTest passes Change-Id: I9ccafe7a53935960566243e2856e166878ca59ae
/frameworks/base/graphics/java/android/graphics/FontListParser.java
|
c0cf4f09f4c520b2aaafbe8a0cb0feb530c2e021 |
|
28-Mar-2017 |
Seigo Nonaka <nona@google.com> |
Do not use many FDs in FontManagerService. Currently there are over 170 font files are installed in system directory. Opening 170+ files and keep them is not unacceptable. Pass URI instead. At the same time, this CL hides full font path from FontConfig since /system/fonts directory will be deprecated in future. Bug: 36660849 Test: android.text.cts.FontManagerTest passed Change-Id: I1d216dc9c6dec702a4ce3b946bfda6dcbe12b7fe (cherry picked from commit 455f1bfc05bf972ee4fe8cd5fa135ed232126bb7)
/frameworks/base/graphics/java/android/graphics/FontListParser.java
|
20e5d91739fb88a02afb4888bf9f938308bc9b7b |
|
18-Jan-2017 |
Seigo Nonaka <nona@google.com> |
Expose Typeface creation APIs with ttc and font variation. Introduce Builder class for creating Typeface from various sources with optional TTC index and font variation settings. Bug: 33062398 Test: Manually verified new Builder create Typeface. Change-Id: Ia23ee6a73516707d854c7387fe75fbb22f80673d
/frameworks/base/graphics/java/android/graphics/FontListParser.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/graphics/java/android/graphics/FontListParser.java
|
9ff994d98846d24bc488939af6e7dc440149a4bc |
|
30-Nov-2016 |
Seigo Nonaka <nona@google.com> |
Introduce set/getFontVariationSettings. This is 2nd attempt of I249d464f8cdaa56017a987588b94ed685aadeb58. The original CL was reverted due to conflicting with another CL submitted before. Nothing has changed except for following class name changes. Here is the original commit message of reverted change. 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: I9cdfbdecc87c995d805096883ef2652768c6c21e
/frameworks/base/graphics/java/android/graphics/FontListParser.java
|
04d72abde1efc963ebb2f145f859552e83b92d13 |
|
10-Jan-2017 |
Clara Bayarri <clarabayarri@google.com> |
Expose fonts.xml via public API with a service This change creates a new FontManagerService, in charge of providing font management data. It exposes a public API to retrieve the information in fonts.xml without accessing it directly. To do this, it also refactors FontListParser's internal classes into a new public FontConfig class holding all the font data. getSystemFonts() returns all the available information in fonts.xml as well as file descriptors for all the fonts. This allows us to share the memory consumed by these files between all clients. Bug: 34190490 Test: See attached CTS change in topic Change-Id: I0e922f8bcc9a197a1988d04071eb485328d66fb7
/frameworks/base/graphics/java/android/graphics/FontListParser.java
|
a3b9f2e3c66ec485f3b712560d52e31632a9cbe8 |
|
20-Jan-2017 |
Siyamed Sinir <siyamed@google.com> |
Revert "Introduce set/getFontVariationSettings." This reverts commit ba3028c1fc9fca2d45acc841557da2c9a83923bf. Bug: 34378805 Change-Id: I8250c87af5d65fb45789632580be4ae1b8711372
/frameworks/base/graphics/java/android/graphics/FontListParser.java
|
ba3028c1fc9fca2d45acc841557da2c9a83923bf |
|
30-Nov-2016 |
Seigo Nonaka <nona@google.com> |
Introduce set/getFontVariationSettings. 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
/frameworks/base/graphics/java/android/graphics/FontListParser.java
|
0ec4f416ffbcbfb30fb61fb5bae2fe1c1cde8042 |
|
02-Dec-2016 |
Seigo Nonaka <nona@google.com> |
Allow only U+0020..U+007E characters for axis tag. 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
/frameworks/base/graphics/java/android/graphics/FontListParser.java
|
3002ab6729237dd608a8640794c52960b3ec54d0 |
|
24-Nov-2016 |
yirui <yirui@google.com> |
Introduce font variation settings parser 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
/frameworks/base/graphics/java/android/graphics/FontListParser.java
|
008c6c54908c423a034c40b3f79e712176c141b6 |
|
17-Mar-2016 |
Ben Wagner <bungeman@google.com> |
Fix shift precedence in FontListParser. BUG=27707457 Change-Id: I7ea7a5fa67ec540401454136427b37562a4eef30
/frameworks/base/graphics/java/android/graphics/FontListParser.java
|
a87b07d7fafd59ae26073a80cd742b17ea427ecd |
|
06-Nov-2015 |
Ben Wagner <bungeman@google.com> |
Add support for gx font variation axes. This adds an 'axis' child element to the 'font' element. The 'axis' element has attributes 'tag' (a four byte identifier) and 'stylevalue' (a float value) to the parser. This also modifies reading the font file name in a backwards compatible fashion by using only the direct #text children of the 'font' element. (Both the Minikin and Skia parsers now allow the font file name on a separate line in the fonts.xml file). This information is then passed through to Skia in order to select the desired variation. The Skia parser already parses this way and has for some time, so Chrome and WebView can already read this format. Change-Id: I15623fe864fa92b2bf0705af5e389daedfb77e5c (cherry picked from commit b8e367fb7428076ff2e4aa2a97adaed1ef806e92)
/frameworks/base/graphics/java/android/graphics/FontListParser.java
|
8349b7a063824dcbf3291d308aafd1dfbae3c76c |
|
12-Dec-2015 |
Ben Wagner <bungeman@google.com> |
Use 'index' instead of 'ttcIndex' for attribute name. There are two reasons for this. First, the name 'ttcIndex' is over specific, there are many indexed font containers in addition to ttc, such as fon, pfr, bdf, and dfont. There may be others in the future. Second, Skia implemented this attribute with the name 'index' quite some time ago. By naming this attribute 'index' even existing apps will be able to use this attribute (including Chrome). BUG: 10861108 Change-Id: I68d2b69fad304d93313f96bf3365af71906dfe69
/frameworks/base/graphics/java/android/graphics/FontListParser.java
|
ac3f10f153319e2494fb57a90360031f148e404c |
|
11-Dec-2015 |
Seigo Nonaka <nona@google.com> |
Fix invalid API use of XmlPullParser.getAttributeValue. The 1st argument of the getAttributeValue is a namespace of the xml. Bug: 10861108 Change-Id: I73fd15eca7101b745870ca7b6509b1dbfcc9b0d7
/frameworks/base/graphics/java/android/graphics/FontListParser.java
|
3fa667e22401bf3ba96957fe31167bf05d164c55 |
|
10-Dec-2015 |
Seigo Nonaka <nona@google.com> |
Introduce ttcIndex attribute into system font configuration. ttcIndex is used for specifying index of the TrueType Collection. No user visible change is expected with this CL. BUG: 10861108 Change-Id: I76a1c890164bb55a7ece7b9c7db2ce2bac3f8b89
/frameworks/base/graphics/java/android/graphics/FontListParser.java
|
117cbebe810613d4a6de034f02652cdbbfef4cde |
|
25-Aug-2014 |
Raph Levien <raph@google.com> |
New weight-aware font config Parse new fonts.xml config file, and resolve weight selection based on the base weight of the font (as defined by a weight alias specified in the config file) and the requested bold flag. This change improves the appearance of bold spans for alternate weights of Roboto. In addition, this patch enables weight selection for fallback fonts. For example, if an additional font with a weight of 100 is added to the Hebrew font family in the fallback list, then requesting "sans-serif-thin" would select that font for Hebrew text. Bug: 14538154 Change-Id: I99a04fad4f7bf01c75726e760d42735dd9003496
/frameworks/base/graphics/java/android/graphics/FontListParser.java
|
f9e3d311275c37fe5f2562993687a1627780a6d0 |
|
28-May-2014 |
Raph Levien <raph@google.com> |
Language and variant selection for Minikin This is the frameworks/base side of what's needed to support language selection (especially Han unification, but also compact/elegant selection for scripts that require more vertical space). This is part of the fix for bug 15179652 "Japanese font isn't shown on LMP". Change-Id: I8f0f3aa9a1915659f8d0b590cf1c56529356049a
/frameworks/base/graphics/java/android/graphics/FontListParser.java
|
9a5b61ccc83303ceeec2059f58c1977af9faa9e3 |
|
30-Apr-2014 |
Raph Levien <raph@google.com> |
Parsing of XML font configuration files for Minikin This patch improves Minikin-based font handling, to deal with error conditions (missing fonts and so on), and also moves the parsing of fallback_fonts.xml and system_fonts.xml into Java code. Change-Id: Ib0debdbd56ad3b0196be6d2a35668d711c98f1e5
/frameworks/base/graphics/java/android/graphics/FontListParser.java
|