5849500a193ac1327242e01d7f6912d0a384ffc9 |
|
08-Apr-2016 |
Siyamed Sinir <siyamed@google.com> |
Cache Typeface.createFromAsset objects. Caches Typeface objects returned from Typeface.createFromAsset function, Objects are cached in an LruCache with a max size of 16. Bug: 27251075 Change-Id: I6baae4211a0d0d26422945bf1557b364cfe84b2b
/frameworks/base/graphics/java/android/graphics/Typeface.java
|
fb95699364e555148b437cfa1e5c69384f843845 |
|
28-Jan-2016 |
Ben Wagner <bungeman@google.com> |
Deduplicate font file mappings. With ttc and gx variation fonts, it is now possible and common that a number of fonts will use the same font file for data but with different parameters. In the current code each font will map the font file data, taking up an unecessary amount of virtual address space and is inefficient with respect to memory management (like the tlb). This CL deduplicates these file mappings so that a given font file will only be mapped into memory once. DO NOT MERGE Change-Id: I5ca69f963a434c72ec4028402ecbf9e0f0ee7148 (cherry picked from commit fffcf0a31fd4c9a4ec8aa7de70b1eda0d48fb337)
/frameworks/base/graphics/java/android/graphics/Typeface.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/Typeface.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/Typeface.java
|
ffa84e008c712ceffa09d6b89a49882c88b3cca5 |
|
12-Nov-2014 |
Hans Boehm <hboehm@google.com> |
Reduce risk of memory corruption due to finalization. Many classes in graphics/java and elsewhere deallocate native memory in a finalizer on the assumption that instance methods can no longer be called once the finalizer has been called. This is incorrect if the object can be used, possibly indirectly, from another finalizer, possibly one in the application. This is the initial installment of a patch to cause such post-finalization uses to at least see a null pointer rather than causing memory corruption by accessing deallocated native memory. This should make it possible to identify and fix such finalization ordering issues. There are more graphics classes that need this treatment, and probably many more in other subsystems. This solution is < 100% effective if finalizers can be invoked concurrently. We currently promise that they aren't. (In my opinion, the real cause here is a language spec bug. But that ship has sailed.) Bug: 18178237 Change-Id: I844cf1e0fbb190407389c4f8e8f072752cca6198
/frameworks/base/graphics/java/android/graphics/Typeface.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/Typeface.java
|
bf8d5620f7f3be72ec217f4bcc14a417d4e1dee6 |
|
20-Aug-2014 |
Behdad Esfahbod <behdad@google.com> |
Throw exception on nonexistent font In K, this used to throw RuntimeException. Before this patch, NULL was returned and no exceptions thrown. With this patch, FileNotFoundException is thrown. This might be considered API change and be undesirable as callers need to either catch it or declare it to be thrown. Bug: 16180181 Change-Id: If83d76857f640c6293a3d5d08fb89ceddbaf41bc
/frameworks/base/graphics/java/android/graphics/Typeface.java
|
ff86bcd08827d1050a8cfd99b521c21848b3f364 |
|
11-Aug-2014 |
Raph Levien <raph@google.com> |
Resolve invalid Typeface style to default Setting a textAppearance that specified a fontFamily but not a textStyle results in a styleIndex of -1 being passed to the Typeface.create() call. This patch resolves such invalid style indices to the default. Fix for bug 16880318 "Applying TextAppearance To TextView with custom font family incorrectly adds italics style on LMP" Change-Id: I05c9cfc4d76161be21b58abdb4037c51a23cae37
/frameworks/base/graphics/java/android/graphics/Typeface.java
|
3660789f06c5fbcb81e6c7c79612048bff8f0f66 |
|
26-Jun-2014 |
Raph Levien <raph@google.com> |
Switch all text layout to Minikin This patch switches all text layout operations to use Minikin, removes the USE_MINIKIN #ifdef, and deletes some of the code that was only used in the old TextLayout path (although some more refactoring remains). Change-Id: I51b5c4e2bb46cfd9d204c12b9f16f135c769f5b5
/frameworks/base/graphics/java/android/graphics/Typeface.java
|
d573794d83a049fe59e289944f0cd77406dd776a |
|
02-Jun-2014 |
Raph Levien <raph@google.com> |
Support fallbacks for custom typefaces (Minikin) This patch adds the fallback font list to custom typefaces created from files and assets, as well as those created by name. This is a fix for the deskclock half of bug 15139067 "Centered text isn't working". Change-Id: I0cc60951953dfb73817a98ddfee5713f0387ee90
/frameworks/base/graphics/java/android/graphics/Typeface.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/Typeface.java
|
baef8c1ffe5c900fb0da9512654bf249b5fc9269 |
|
20-May-2014 |
Deepanshu Gupta <deepanshu@google.com> |
Layoutlib fixes for L [DO NOT MERGE] This adds the new delegates that were missing. This starts the work on changes related to Minikin Fonts. There are some changes related to TypedArray that still need to be fixed. Change-Id: Ic2397b64aa3f1f48926e849b14689c47d9ee7f8c (cherry picked from commit 7ca3612094270183243938e79337c84effea7ad0)
/frameworks/base/graphics/java/android/graphics/Typeface.java
|
363e21b4518d7059638df2821b8a0947f74eaf2c |
|
09-May-2014 |
Raph Levien <raph@google.com> |
Add fallback fonts to system fonts (Minikin) This patch explicitly keeps the list of fallback fonts, and creates all system fonts including the fallback list as well. At present, fonts created from assets or directly from files do not have the fallback list present, so that remains to be done. This patch affects only builds with USE_MINIKIN defined; otherwise the fallback font processing in Skia will apply. Change-Id: I6148e06a45a11f53a6bb2f04c8813df4968ea8c8
/frameworks/base/graphics/java/android/graphics/Typeface.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/Typeface.java
|
1a73f732f91e97c9c66b808c245ddda36a10e987 |
|
31-Jan-2014 |
Raph Levien <raph@google.com> |
Start of Minikin integration This is the current state of the Minikin integration. All changes are hidden behind USE_MINIKIN #ifdef, so it should be safe to apply. To play with the Minikin branch, set this in your BoardConfig.mk . This change also merges in 64-bit changes that were happenening in parallel. Change-Id: Idd94553bcbe324c5875d0ff06495c966c3e95b7f
/frameworks/base/graphics/java/android/graphics/Typeface.java
|
36bef0bf30d6bae48cf3837df351075ca4fce654 |
|
20-Jan-2014 |
Ashok Bhat <ashok.bhat@arm.com> |
AArch64: Make graphics classes 64-bit compatible This a merger of two commits submitted to AOSP by the following authors: ashok.bhat@arm.com, david.butcher@arm.coma craig.barber@arm.com, kevin.petit@arm.com and marcus.oakland@arm.com Due to the very large number of internal conflicts, I have chosen to cherry-pick this change instead of letting it merge through AOSP because the merge conflict resolution would be very hard to review. Commit messages below: ================================================ AArch64: Make graphics classes 64-bit compatible Changes in this patch include [x] Long is used to store native pointers as they can be 64-bit. [x] Some minor changes have been done to conform with standard JNI practice (e.g. use of jint instead of int in JNI function prototypes) [x] AssetAtlasManager is not completely 64-bit compatible yet. Specifically mAtlasMap member has to be converted to hold native pointer using long. Added a TODO to AssetAtlasManager.java to indicate the change required. Signed-off-by: Ashok Bhat <ashok.bhat@arm.com> Signed-off-by: Craig Barber <craig.barber@arm.com> Signed-off-by: Kévin PETIT <kevin.petit@arm.com> Signed-off-by: Marcus Oakland <marcus.oakland@arm.com> ================================================================== AArch64: Use long for pointers in graphics/Camera For storing pointers, long is used in android/graphics/Camera class, as native pointers can be 64-bit. In addition, some minor changes have been done to conform with standard JNI practice (e.g. use of jint instead of int in JNI function prototypes) Signed-off-by: Ashok Bhat <ashok.bhat@arm.com> Signed-off-by: Marcus Oakland <marcus.oakland@arm.com> =================================================================== Change-Id: Id5793fa0ebc17ee8b1eecf4b3f327977fdccff71
/frameworks/base/graphics/java/android/graphics/Typeface.java
|
7023df08f14ec5dee76ac54c03e870f84e297636 |
|
27-Jan-2014 |
Narayan Kamath <narayan@google.com> |
Revert "AArch64: Make graphics classes 64-bit compatible" This reverts commit 18b4cbeedef21c1fa666a110a157bab66edff976. Change-Id: I0c52983a3ab1ace3ff743de546a43eca28e5cb0e
/frameworks/base/graphics/java/android/graphics/Typeface.java
|
18b4cbeedef21c1fa666a110a157bab66edff976 |
|
20-Jan-2014 |
Ashok Bhat <ashok.bhat@arm.com> |
AArch64: Make graphics classes 64-bit compatible This a merger of two commits submitted to AOSP by the following authors: ashok.bhat@arm.com, david.butcher@arm.coma craig.barber@arm.com, kevin.petit@arm.com and marcus.oakland@arm.com Due to the very large number of internal conflicts, I have chosen to cherry-pick this change instead of letting it merge through AOSP because the merge conflict resolution would be very hard to review. Commit messages below: ================================================ AArch64: Make graphics classes 64-bit compatible Changes in this patch include [x] Long is used to store native pointers as they can be 64-bit. [x] Some minor changes have been done to conform with standard JNI practice (e.g. use of jint instead of int in JNI function prototypes) [x] AssetAtlasManager is not completely 64-bit compatible yet. Specifically mAtlasMap member has to be converted to hold native pointer using long. Added a TODO to AssetAtlasManager.java to indicate the change required. Signed-off-by: Ashok Bhat <ashok.bhat@arm.com> Signed-off-by: Craig Barber <craig.barber@arm.com> Signed-off-by: Kévin PETIT <kevin.petit@arm.com> Signed-off-by: Marcus Oakland <marcus.oakland@arm.com> ================================================================== AArch64: Use long for pointers in graphics/Camera For storing pointers, long is used in android/graphics/Camera class, as native pointers can be 64-bit. In addition, some minor changes have been done to conform with standard JNI practice (e.g. use of jint instead of int in JNI function prototypes) Signed-off-by: Ashok Bhat <ashok.bhat@arm.com> Signed-off-by: Marcus Oakland <marcus.oakland@arm.com> =================================================================== Change-Id: Ib3eab85ed97ea3e3c227617c20f8d213f17d4ba0
/frameworks/base/graphics/java/android/graphics/Typeface.java
|
a033630e805c407080221e20b236b6054f324670 |
|
23-May-2013 |
Raph Levien <raph@google.com> |
Initial integration of Minikin to framework With this patch, framework does at least some of its text rendering using Minikin instead of TextLayoutCache. There's a lot of stuff broken and not yet implemented, but the phone will boot. Changes are hidden behind USE_MINIKIN, which should be set in BoardConfig.mk for the brave. Without that, there are changes to signatures in JNI methods and so on, but shouldn't be any visible changes. This commit also introduces a new abstraction for Typeface: The new TypefaceImpl abstraction represents the functionality that corresponds to a Java Typeface object. Currently it is backed by SkTypeface, but in the migration to Minikin it is a FontCollection combined with a FontStyle. This patch introduces a USE_MINIKIN preprocessor switch, so there is no substantial change to existing Skia-based code, but which lets us start replacing the implementation with the Minikin version. Change-Id: I532c4c2d32d4f4c1f349dc1db37caa112af587ea
/frameworks/base/graphics/java/android/graphics/Typeface.java
|
ca79cf69d09efa0c327e9b1237d86a119aea5da7 |
|
14-Aug-2012 |
Derek Sollenberger <djsollen@google.com> |
Update framework to support r5967 of Skia. bug: 6906025 Change-Id: Iefdb830ec3aa2ab3472c1c142484a7aa21788a15
/frameworks/base/graphics/java/android/graphics/Typeface.java
|
46926698996d3857a650ed535024a88dbeaff1e1 |
|
12-Mar-2012 |
Romain Guy <romainguy@google.com> |
Don't allocate new typefaces when not needed. The Typeface.create(Typeface, int) API can be used to create a new typeface derived from an existing typeface. The implementation would however create a new Typeface instance on every call, creating unnecessary garbage in text-heavy applications. This changelist adds a small cache of derived typefaces to avoid allocations whenever possible. Change-Id: Ib7290b3183e372aae12cf66033690e15cd4d0691
/frameworks/base/graphics/java/android/graphics/Typeface.java
|
7f9f99ea11051614a7727dfb9f9578b518e76e3c |
|
11-Aug-2011 |
Xavier Ducrohet <xav@android.com> |
Make some methods/fields package private so that layoutlib can access them. Change-Id: I4aeadfbaf8a4f6a459fa19937c21ac23d9e5fb64
/frameworks/base/graphics/java/android/graphics/Typeface.java
|
31a69fdbe1edd8d686043e8ca7d278289f65808e |
|
14-Dec-2009 |
Mike Reed <reed@google.com> |
throw if we have a null typeface native instance (so we don't crash in native code) we may still have to native-destroy a Typeface with a null ref, so check for that
/frameworks/base/graphics/java/android/graphics/Typeface.java
|
bbed0d68c815446400193bdc8b16fbf73e1ee664 |
|
01-Oct-2009 |
Mike Reed <reed@google.com> |
hide setGammaForText, which is only used for calibrating new devices
/frameworks/base/graphics/java/android/graphics/Typeface.java
|
dbade9d6a075b1d5b8ebe10ee8961a5de296c93b |
|
25-Aug-2009 |
Mike Reed <reed@google.com> |
expose runtime changes to gamma
/frameworks/base/graphics/java/android/graphics/Typeface.java
|
a87a132ebf1c2dd733cf52feff6e44525257c961 |
|
12-May-2009 |
Romain Guy <romainguy@android.com> |
Fixes #1847219. Add a new API to load fonts from arbitrary files: Typeface.createFromFile(String/File).
/frameworks/base/graphics/java/android/graphics/Typeface.java
|
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 |
|
04-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@135843
/frameworks/base/graphics/java/android/graphics/Typeface.java
|
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 |
|
04-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@135843
/frameworks/base/graphics/java/android/graphics/Typeface.java
|
54b6cfa9a9e5b861a9930af873580d6dc20f773c |
|
21-Oct-2008 |
The Android Open Source Project <initial-contribution@android.com> |
Initial Contribution
/frameworks/base/graphics/java/android/graphics/Typeface.java
|