Skip to content

Commit

Permalink
Fix selecting FreeSerif in settings.
Browse files Browse the repository at this point in the history
  • Loading branch information
rdoeffinger committed Sep 20, 2015
1 parent 1f3adae commit 803fc0b
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.hughes.android.dictionary"
android:installLocation="auto"
android:versionCode="33"
android:versionCode="34"
android:versionName="5.0.7" >

<uses-sdk
Expand Down
2 changes: 1 addition & 1 deletion res/values-de/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<resources>

<string-array name="fontKeys">
<item>FreeSerif.ttf.jpg</item>
<item>FreeSerif.otf.jpg</item>
<item>SYSTEM</item>
<item>SERIF</item>
<item>SANS_SERIF</item>
Expand Down
2 changes: 1 addition & 1 deletion res/values-es/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<resources>

<string-array name="fontKeys">
<item>FreeSerif.ttf.jpg</item>
<item>FreeSerif.otf.jpg</item>
<item>SYSTEM</item>
<item>SERIF</item>
<item>SANS_SERIF</item>
Expand Down
2 changes: 1 addition & 1 deletion res/values-fr/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<resources>

<string-array name="fontKeys">
<item>FreeSerif.ttf.jpg</item>
<item>FreeSerif.otf.jpg</item>
<item>SYSTEM</item>
<item>SERIF</item>
<item>SANS_SERIF</item>
Expand Down
2 changes: 1 addition & 1 deletion res/values-it/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<resources>

<string-array name="fontKeys">
<item>FreeSerif.ttf.jpg</item>
<item>FreeSerif.otf.jpg</item>
<item>SYSTEM</item>
<item>SERIF</item>
<item>SANS_SERIF</item>
Expand Down
2 changes: 1 addition & 1 deletion res/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<resources>

<string-array name="fontKeys">
<item>FreeSerif.ttf.jpg</item>
<item>FreeSerif.otf.jpg</item>
<item>SYSTEM</item>
<item>SERIF</item>
<item>SANS_SERIF</item>
Expand Down
4 changes: 2 additions & 2 deletions res/xml/preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
android:title="@string/fontTitle"
android:summary="@string/fontSummary"
android:persistent="true"
android:defaultValue="FreeSerif.ttf.jpg"
android:defaultValue="FreeSerif.otf.jpg"
android:entries="@array/fonts"
android:entryValues="@array/fontKeys"
/>
Expand Down Expand Up @@ -76,4 +76,4 @@
android:entryValues="@array/themeKeys"
/>

</PreferenceScreen>
</PreferenceScreen>
3 changes: 3 additions & 0 deletions src/com/hughes/android/dictionary/DictionaryActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,9 @@ public void run() {
} else if ("MONOSPACE".equals(fontName)) {
typeface = Typeface.MONOSPACE;
} else {
if ("FreeSerif.ttf.jpg".equals(fontName)) {
fontName = "FreeSerif.otf.jpg";
}
try {
typeface = Typeface.createFromAsset(getAssets(), fontName);
} catch (Exception e) {
Expand Down

0 comments on commit 803fc0b

Please sign in to comment.