TypefaceHelper
TypefaceHelper copied to clipboard
Fetching a Typeface from the TypefaceCache
This library is great. However there are scenarios where you can set a widget's font only via its public methods.
ex. public void setValueTypeface(Typeface tf)
It would be great to have a method in TypefaceHelper that just returns the Typeface for a String resource.
@cioraneanu I wasn't able to understand the use case yet. Are these third-party widget libraries? If so, I guess we could broaden the visibility of our TypefaceCache or add a method on the helper to get it from TypefaceCache.
@jfsso Exactly. Charting libraries, or any view that draws its content via the Canvas API(with custom typeface setters) falls into this category.
I think it would be better to have a method in TypefaceHelper that returns mCache.get(typefaceName) instead of juggling with instances of TypefaceHelper and TypefaceCache separately.
This is released as TypefaceHelper 1.2.0!