Is it possible to check in which family the Typeface object is used in Android API 8?
I create a Typeface for the Paint object this way
Later I would like to check out the family like this
Typeface tf= paint.getTypeface(); if (tf.equals(Typeface.DEFAULT) || tf.equals(Typeface.DEFAULT_BOLD)) { //do something } else if (...) { //do something else }
This does not work, since they are not the same object, I also tried tf == value , but again the result. The Typeface object does not show anything useful to help with family discovery, is there a workaround for this? I only need to identify the main Android fonts (SERIF, SANS-SERIF, DEFAULT, MONOSPACE, etc.)
source share