https://docs.unity3d.com/ScriptReference/TrueTypeFontImporter.html

 

Unity - Scripting API: TrueTypeFontImporter

Success! Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable. Close

docs.unity3d.com

 

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

#if UNITY_EDITOR
using UnityEditor;
public class FontIncludeTester : MonoBehaviour
{
    public Font font;

    public void Do()
    {    	
        var _path    = AssetDatabase.GetAssetPath(font);
        var _impoter = AssetImporter.GetAtPath(_path) as TrueTypeFontImporter;

        if (null == _impoter) return;

        _impoter.includeFontData = !_impoter.includeFontData;
        _impoter.SaveAndReimport();
    }
	
    // 버튼 생성 에디터 코드
    [CustomEditor(typeof(FontIncludeTester))]
    public class FontIncludeTesterEditor : Editor
    {
        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();

            if (true == GUILayout.Button("테스트"))
            {
                (target as FontIncludeTester).Do();
            }
        }
    }
}
#endif

- UI를 번들에서 로드하도록 수정 했더니 메모리에 동일한 폰트가 중복으로 로드되는 현상이 발생
- 동일한 폰트여도 각 번들마다 개별적으로 로드되는 것으로 추정
- 폰트 에셋의 Include Font Data 체크 해제를 해주면 폰트가 번들에 포함되는것을 막을 수 있다.
- Include Font Data 체크를 해제하면 해당 폰트가 적용된 UI는 기본 폰트로 출력된다. 
- 작업은 체크를 한 상태에서 하고, TrueTypeFontImporter를 이용해 번들 빌드전에 includeFontData을 false로 만들어주고, 번들 빌드가 끝난 후 다시 true로 만들어 주면된다.(참고 : https://codingstarter.tistory.com/38)

 

IOS 11부터 UIImagePickerController를 사용하기 위한 권한 요청 필요없어짐.

https://eeyatho.tistory.com/141

 

Swift ) UIImagePickerController 권한 필요없음 - EEYatHo iOS

한줄 요약 iOS11부터, UIImagePickerController로 사진을 가져올 때는, 라이브러리 권한이 필요없게 되었습니다. [ 관련 WWDC17 영상 ] WWDC말고 관련된 문서가 없네요.. 정리좀 해놓지..ㅡ.ㅡ What's New in Phot..

eeyatho.tistory.com

https://developer.apple.com/videos/play/wwdc2017/505/?time=136

+ Recent posts