373b15bda93c8b400c5e1271bc93cbef26af503f |
|
02-May-2017 |
Seigo Nonaka <nona@google.com> |
Fix double bolding resolveStyle increases minikinStyle's weight value based on Skia's style value. Since we compute Skia's style based on given weight value, we should not add extra bold weight to minikinStyle. This CL also fixes misunderstanding of base weight. The base weight is only used for computing weight relative to the weighted alias. Thus, base weight should not be updated except for createWeightAlias method. To be clear, this CL changes the function names but keeps the same semantics as before. Test: adb shell /data/nativetest/hwui_unit_tests/hwui_unit_tests Test: am instrument -w -e class android.graphics.cts.TypefaceTest\ android.graphics.cts/android.support.test.runner.AndroidJUnitRunner Bug: 37880319 Merged-In: Ied73189b11792fb062da46f45afd2db664e6ecb4 Change-Id: I82350a1bfb99ce198b955f127949e21bccccb1cb
/frameworks/base/libs/hwui/hwui/Typeface.cpp
|
d154829cb15d61f1469f939d608e691256e2a765 |
|
12-Apr-2017 |
Seigo Nonaka <nona@google.com> |
Use provided style for fallback font selection If the developer gives some weight/italic to the Typeface.Builder the fallback used the metadata in the font file. We should use provided data instead. This CL also adjusts upper and lower limits on weight, from 100..900 to 1..1000 Bug: 37257745 Bug: 37251569 Test: android.graphics.cts.TypefaceTest passes Change-Id: I7cf390d96b49afcce359928373698b0c9a9babd8
/frameworks/base/libs/hwui/hwui/Typeface.cpp
|
5b6347a6af668ba47b3fab14cefbe03cc440c3a4 |
|
31-Mar-2017 |
Seigo Nonaka <nona@google.com> |
Introduce setFallbackTypeface setFallbackTypeface is returned by Builder.build() method when the provided font is not loaded due to some reasons. The fallback family is resolved with width/italic passed to Builder. Bug: 36794225 Test: android.graphics.cts.TypefaceTest passes Change-Id: I65e220aca823fd815a52437b11c8e6dc952de8e2
/frameworks/base/libs/hwui/hwui/Typeface.cpp
|
c7064146f959caec058980ced144942c8044a169 |
|
10-Feb-2017 |
Seigo Nonaka <nona@google.com> |
Follow Minikin's signature changes. Minikin now uses shared_ptr instead of MinikinRefCounted. Bug: 28119474 Test: manually tested Test: hwui_unit_tests passed. Change-Id: Ie0564851a8a798af112679e15f7a07db000a977e
/frameworks/base/libs/hwui/hwui/Typeface.cpp
|
7a18b799617465a0a27dde1cf0c5f48c52db7980 |
|
13-Feb-2017 |
Seigo Nonaka <nona@google.com> |
Implement getAxes() method. getAxes() is necessary for calling hb_font_set_variations. Test: None Change-Id: Iec4759189b0653aa483ba85682d10b2b81beaab8
/frameworks/base/libs/hwui/hwui/Typeface.cpp
|
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/libs/hwui/hwui/Typeface.cpp
|
8b48e624457e438fcc2b6b9363329036ef2f7743 |
|
07-Jan-2017 |
Seigo Nonaka <nona@google.com> |
Follow minikin::FontFamily constructor signature change. This is 2nd attempt of Id10ca97f6f6f5bbe4999c1ad2736423a204d6e87. The root caus of crash is due touching null pointer in nUnrefFamily. After above change, native object may not be created on error case. In that case, nUnrefFamily can not be called. In addition to this issue there is also memory leak on error case. This fixes it by introducing abortCreation method. Also this contains fix of layout lib breakage done by jgaillard@. Originally submitted by Ic8872a43993bcb0a157c5e3f0ce423af9b47f606 Here is original commit message of reverted change. 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. Bug: 34042446 Bug: 28119474 Bug: 34378805 Test: hwui test has passed Test: m layoutlib layoutlib-tests Change-Id: Ic34ebaa8191273d4c9f49c43124f15a1da5f7b78
/frameworks/base/libs/hwui/hwui/Typeface.cpp
|
c0d685b87aa544bc23c1ed1c01e88f6c04855f72 |
|
20-Jan-2017 |
Siyamed Sinir <siyamed@google.com> |
Revert "Follow minikin::FontFamily constructor signature change." This reverts commit a0a4828614edfd633ab86f04408e7f4e55b491dd. Bug: 34378805 Change-Id: Icbdbfbde2efe8eaebbe4334a679e3b3247057388
/frameworks/base/libs/hwui/hwui/Typeface.cpp
|
a3b9f2e3c66ec485f3b712560d52e31632a9cbe8 |
|
20-Jan-2017 |
Siyamed Sinir <siyamed@google.com> |
Revert "Introduce set/getFontVariationSettings." This reverts commit ba3028c1fc9fca2d45acc841557da2c9a83923bf. Bug: 34378805 Change-Id: I8250c87af5d65fb45789632580be4ae1b8711372
/frameworks/base/libs/hwui/hwui/Typeface.cpp
|
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/libs/hwui/hwui/Typeface.cpp
|
a0a4828614edfd633ab86f04408e7f4e55b491dd |
|
07-Jan-2017 |
Seigo Nonaka <nona@google.com> |
Follow minikin::FontFamily constructor signature change. 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
/frameworks/base/libs/hwui/hwui/Typeface.cpp
|
b7e33a09843302c578e433a06e56583f0ff241d2 |
|
18-Oct-2016 |
Seigo Nonaka <nona@google.com> |
Remove obsolete interface GetTable. GetTable is only used in test. To use production interface, need to pass the raw buffer and size to the MinikinSkia. This CL does not change any production behaviors. Test: ran hwui microbench, macrobench, hwui_unit_tests Change-Id: Ia657a0d061984d705f333ed3944effb1eba8ca4d
/frameworks/base/libs/hwui/hwui/Typeface.cpp
|
b6e20139755afbb4968ec0ac71182c179ea33ac0 |
|
14-Nov-2016 |
Seigo Nonaka <nona@google.com> |
Move test only initialization to each test setup. Global default typeface initialization is only used by test code. It is good to do in test and remove from production. Test: ran hwuimicro hwui_unit_tests hwuimacro Change-Id: I7090b1794828072112540b4e357a6d24bf8f664a
/frameworks/base/libs/hwui/hwui/Typeface.cpp
|
0b5c6430442067cae8f01e17b2deb405468abe6a |
|
11-Nov-2016 |
John Reck <jreck@google.com> |
Fix unit tests This is a partial revert of e2179925df2ce174d81dd6f7abae626cc859ce00 with the TODO comment replaced with why this can happen. Test: Ran hwui's unit tests Change-Id: I0d35eef773a401585bb8e75415da66de5aeb27d1
/frameworks/base/libs/hwui/hwui/Typeface.cpp
|
e2179925df2ce174d81dd6f7abae626cc859ce00 |
|
27-Oct-2016 |
Seigo Nonaka <nona@google.com> |
Make sure the Typeface is loaded before calling measureText. This is a clean up CL by resolving TODO in hwui/Typeface.cpp Usually Typeface is listed in preloaded-classes and loaded during Zygote initialization. However, on some devices, class preloading is disabled. Paint.measureText can not be called before Typeface static initializer and it may not load Typeface class. To ensure that the font preloading happens in ZygoteInit even on such devices, refer Typeface.DEFAULT static field in TextView.preloadFontCache in TextView which also happens during zygote initialization. Bug: 32374752 Test: Manually done Change-Id: I773c154671c170bebad3aa0f9c04eee5a664b849
/frameworks/base/libs/hwui/hwui/Typeface.cpp
|
21c2e9e60c9e66e848fc9276b878c1ab1bd66aa9 |
|
17-Oct-2016 |
Mark Salyzyn <salyzyn@google.com> |
Merge "missing includes" am: 78929f3ee0 am: 6a8f0d70b0 am: 6e60ab12e7 Change-Id: I1b5c6f49d2ae565ebd59c6ce8d590512ab306487
|
4d6c372eaebc6d227f7222a92950a64c76fd4baf |
|
17-Oct-2016 |
Mark Salyzyn <salyzyn@google.com> |
missing includes Assumptions are made about header side effects Test: compile Bug: 30465923 Change-Id: Icc9415aed5e54b2bc00b70aa0da6df4148f30654
/frameworks/base/libs/hwui/hwui/Typeface.cpp
|
81be3a96e080f8f30653f926934fc072143ef368 |
|
05-Aug-2016 |
Ben Wagner <bungeman@google.com> |
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: I017ceb681d2c338e6913aa267915d03a7d3a898b
/frameworks/base/libs/hwui/hwui/Typeface.cpp
|
ae1aa85d0c7305bb621f1f8003bd674285aa3b63 |
|
09-Jun-2016 |
Seigo Nonaka <nona@google.com> |
Follow the minikin namespace changes Bug: 29233740 Change-Id: I0ec7c5c88e64daa626751d3a03e24b9c36521c17
/frameworks/base/libs/hwui/hwui/Typeface.cpp
|
296bf8c55aaba0025f3e5b904fda3b6e15686753 |
|
07-Apr-2016 |
Raph Levien <raph@google.com> |
Avoid copying of font table data, provide raw font bytes Minikin is changing its approach to table access to use HarfBuzz to access the tables, based on raw font data, rather than calling the MinikinFont::GetTable() virtual method. This patch provides raw access to the font data to make this work. There's a bit of plumbing to make sure fonts get a pointer to the raw data as well. Bug: 27860101 Change-Id: I638e18cf363644bf22fbc9fb9b3358a9e731087f
/frameworks/base/libs/hwui/hwui/Typeface.cpp
|
bad99183916ba2bac6659efc8a28273e344ba511 |
|
17-Mar-2016 |
sergeyv <sergeyv@google.com> |
Clean up and rename TypefaceImpl bug:25865834 Change-Id: I77e8a627163e040a5c25865054a8a936052af367
/frameworks/base/libs/hwui/hwui/Typeface.cpp
|