옥션고딕 을 사용하여 raw폴더에 집어넣어 FileIO 로 사용하여 파일로 불러들여
폰트를 hashmap에 저장해서 사용하고 있습니다.
근데 망 to the 할 옵시리즈가 폰트가 꺠져서 나오내요 다른 기종은 잘되는데..
파일 불러들일때 잘못된걸까요???
스택오버플로우에서 파일인풋하는 법 소스 참고한건데.. ㅜㅜ
public Typeface FileStreamTypeface(int string,Context context)
{
Typeface tf = null;
InputStream is = context.getResources().openRawResource(string);
String path = Environment.getExternalStorageDirectory().getAbsolutePath();
File f = new File(path);
if (!f.exists())
{
if (!f.mkdirs())
return null;
}
String outPath = path + "/nanumgothic.raw";
try
{
byte[] buffer = new byte[is.available()];
BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(outPath));
int l = 0;
while((l = is.read(buffer)) > 0)
{
bos.write(buffer, 0, l);
}
bos.close();
tf = Typeface.createFromFile(outPath);
File f2 = new File(outPath);
f2.delete();
}
catch (IOException e)
{
return null;
}
return tf;
}