X-Git-Url: http://gitweb.fperrin.net/?a=blobdiff_plain;f=src%2Fcom%2Fhughes%2Fandroid%2Fdictionary%2FDictionaryActivity.java;h=5d937f8078a0179a1c2e26f0359eadf9211664a3;hb=3c64fc1b4f0a77ce6c06f86b7b3d5f880050fe29;hp=3b01133c0f4bf999e762c3080c2365cd40ea1cac;hpb=133a6113ded7fd6a709083e8aad7b2c7c7385cc1;p=Dictionary.git diff --git a/src/com/hughes/android/dictionary/DictionaryActivity.java b/src/com/hughes/android/dictionary/DictionaryActivity.java index 3b01133..5d937f8 100644 --- a/src/com/hughes/android/dictionary/DictionaryActivity.java +++ b/src/com/hughes/android/dictionary/DictionaryActivity.java @@ -251,7 +251,12 @@ public class DictionaryActivity extends ListActivity { if ("SYSTEM".equals(fontName)) { typeface = Typeface.DEFAULT; } else { - typeface = Typeface.createFromAsset(getAssets(), fontName); + try { + typeface = Typeface.createFromAsset(getAssets(), fontName); + } catch (Exception e) { + Log.w(LOG, "Exception trying to use typeface, using default.", e); + Toast.makeText(this, getString(R.string.fontFailure, e.getLocalizedMessage()), Toast.LENGTH_LONG).show(); + } } if (typeface == null) { Log.w(LOG, "Unable to create typeface, using default.");