Load font from mobile device and assign as fallback TMP_FontAsset

Unity3D 2022. 5. 3. 17:21
반응형

https://forum.unity.com/threads/load-font-from-mobile-device-and-assign-as-fallback-tmp_fontasset.657151/

 

Load font from mobile device and assign as fallback TMP_FontAsset

I'm working on a mobile app with multi-language support, including Japanese. I do not want to include the Japanese font in the app, but I also want to...

forum.unity.com

 

 

Project에서 가져온 글꼴 파일과 달리 CreateDynamicFontFromOSFont를 사용하여 만든 글꼴에 글꼴 파일/글꼴 데이터에 대한 참조가 없기 때문에 이 기능이 작동하지 않습니다. 

TMP에서 사용하는 FontEngine은 지정된 글꼴의 파일 경로에서 글꼴 자산을 만들 수 있습니다. 따라서 이 OS 글꼴 파일의 경로를 가지고 있다면 이 경로를 사용하는 CreateFontAsset에 대한 새로운 오버로드를 TMP에 추가할 수 있습니다. 또는 CreateDynamicFontFromOSFont를 사용하여 만든 글꼴에서 fontData를 참조하도록 하거나 글꼴에 대한 파일 경로에 참조를 표시하도록 Font 클래스를 수정하도록 Unity를 변경해야 합니다. 이 두 가지 옵션 모두 변경 사항을 백포팅해야 하기 때문에 문제가 됩니다.

반응형
: