|
|
@@ -6,6 +6,7 @@ package kr.co.zumo.app.lifeplus.supervisor;
|
|
|
import android.content.Context;
|
|
|
import android.graphics.Typeface;
|
|
|
import android.support.v4.content.res.ResourcesCompat;
|
|
|
+import android.util.Log;
|
|
|
|
|
|
import java.lang.reflect.Field;
|
|
|
import java.util.HashMap;
|
|
|
@@ -35,20 +36,28 @@ public class TypefaceUtil {
|
|
|
// private static final String REGULAR_FONT_FILE = "/system/fonts/droid_sans.ttf"; // 사용 가능하지만 없는 유저도 있을 수 있어서 asset 에 임베딩
|
|
|
|
|
|
private static final String FONT_DEFAULT = "DEFAULT";
|
|
|
+ private static final String FONT_DEFAULT_BOLD = "DEFAULT_BOLD";
|
|
|
+ private static final String FONT_SERIF = "SERIF";
|
|
|
+ private static final String FONT_SANS_SERIF = "SANS_SERIF";
|
|
|
+ private static final String FONT_MONOSPACE = "MONOSPACE";
|
|
|
|
|
|
public void init(Context context) {
|
|
|
try {
|
|
|
// Typeface regular = createFont(context, REGULAR_FONT_ASSET_NAME);
|
|
|
// Typeface medium = createFont(context, MEDIUM_FONT_ASSET_NAME);
|
|
|
Typeface regular = ResourcesCompat.getFont(context, R.font.droid_sans);
|
|
|
- Typeface medium = ResourcesCompat.getFont(context, R.font.bmyeonsung);
|
|
|
+// Typeface medium = ResourcesCompat.getFont(context, R.font.bmyeonsung);
|
|
|
|
|
|
Map<String, Typeface> fonts = new HashMap<>();
|
|
|
- fonts.put(context.getString(R.string.lifeplus_font1), regular);
|
|
|
- fonts.put(context.getString(R.string.lifeplus_font2), medium);
|
|
|
+ fonts.put(context.getString(R.string.lifeplus_font_sans_serif), regular);
|
|
|
+ fonts.put(context.getString(R.string.lifeplus_font_serif), regular);
|
|
|
overrideFonts(fonts);
|
|
|
|
|
|
overrideFont(FONT_DEFAULT, regular);
|
|
|
+ overrideFont(FONT_SERIF, regular);
|
|
|
+ overrideFont(FONT_SANS_SERIF, regular);
|
|
|
+ overrideFont(FONT_MONOSPACE, regular);
|
|
|
+ overrideFont(FONT_DEFAULT_BOLD, regular);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
@@ -85,6 +94,7 @@ public class TypefaceUtil {
|
|
|
Map<String, Typeface> oldFonts = new HashMap<>();
|
|
|
|
|
|
for (Map.Entry<?, ?> entry : tempMap.entrySet()) {
|
|
|
+ Log.w("APP# TypefaceUtil | overrideFonts", "|" + entry.getKey());
|
|
|
oldFonts.put((String) entry.getKey(), (Typeface) entry.getValue());
|
|
|
}
|
|
|
|