블로그 이미지
Every unexpected event is a path to learning for you.

카테고리

분류 전체보기 (2738)
Unity3D (817)
Programming (475)
Server (33)
Unreal (4)
Gamebryo (56)
Tip & Tech (228)
협업 (58)
3DS Max (3)
Game (12)
Utility (136)
Etc (96)
Link (32)
Portfolio (19)
Subject (90)
iOS,OSX (53)
Android (14)
Linux (5)
잉여 프로젝트 (2)
게임이야기 (3)
Memories (20)
Interest (38)
Thinking (38)
한글 (30)
PaperCraft (5)
Animation (408)
Wallpaper (2)
재테크 (18)
Exercise (3)
나만의 맛집 (3)
냥이 (10)
육아 (16)
Total
Today
Yesterday
05-01 00:02

exception : Not a valid calendar for the given culture. Parameter name: value

 

---------------------------------------------------------------------------------------

 

iOS에서 시스템 언어가 태국어(Thai) 일 때, 위와 같은 에러가 나서 확인해보니,

il2cpp에서 태국어 일 때 CultureInfo를 제대로 생성 못하는 버그가 있다고 한다.

 

그래서 [참조] 링크의 내용을 참조해서 아래와 같이 소스를 넣고, 앱 시작 시 실행하도록 소스를 추가 했다.

(아랍어도 같은 이슈가 있다고 해서 소스를 같이 추가함)

 

    public static void InitArabicCalendarCrashFix()
    {
        // Two Letter ISO Language
        string strTwoLetterISOLanguage = System.Threading.Thread.CurrentThread.CurrentCulture.TwoLetterISOLanguageName;
        Debug.LogFormat("[CurrentCulture.strTwoLetterISOLanguage] {0}", strTwoLetterISOLanguage);
        if (strTwoLetterISOLanguage == "ar")
        {
            new System.Globalization.UmAlQuraCalendar();
        }

        // CultureName
        //string strCurrentCultureName = System.Threading.Thread.CurrentThread.CurrentCulture.Name;
        //Debug.LogFormat("[CurrentCulture.Name] {0}", strCurrentCultureName);
        //if (strCurrentCultureName == "ar-SA")
        //{
        //    new System.Globalization.UmAlQuraCalendar();
        //}
    }

    public static void InitThaiCalendarCrashFix()
    {
        // Two Letter ISO Language
        string strTwoLetterISOLanguage = System.Threading.Thread.CurrentThread.CurrentCulture.TwoLetterISOLanguageName;
        Debug.LogFormat("[CurrentCulture.strTwoLetterISOLanguage] {0}", strTwoLetterISOLanguage);
        if (strTwoLetterISOLanguage == "th")
        {
            new System.Globalization.ThaiBuddhistCalendar();
        }

        // CultureName
        //string strCurrentCultureName = System.Threading.Thread.CurrentThread.CurrentCulture.Name;
        //Debug.LogFormat("[CurrentCulture.Name] {0}", strCurrentCultureName);
        //if (strCurrentCultureName == "th-TH")
        //{
        //    new System.Globalization.ThaiBuddhistCalendar();
        //}
    }

 

 

 

[참조]

forums.xamarin.com/discussion/42899/datetime-tostring-throws-argumentoutofrangeexception-in-thai-locale

 

DateTime.ToString() throws ArgumentOutOfRangeException in Thai locale

Hi, We're seeing an issue when our app is being used on iOS when in the Thai locale, seemingly down to the DateTime.ToString() method throwing an ArgumentOutOfRangeException with the message "Not a valid calendar for the given culture".

forums.xamarin.com

 

반응형
Posted by blueasa
, |

fontforge를 사용 하면 쉬운 작업입니다 .

먼저 글리프가없는 글꼴을 열고을 선택 Element -> Merge Fonts합니다. 이 예에서 E및에 대한 글리프는 F누락 된 글리프입니다 . 

글리프를 가져올 글꼴을 선택하십시오. 기존 커닝을 유지할 것인지 묻습니다. No여기서 선택하고 싶겠지 만 이상한 결과가 나오면 fontforge를 닫고로 다시 시도하십시오 Yes.

누락 된 글리프는 잠시 후에 추가해야합니다.

마지막으로 File -> Generate Fonts글꼴을 원하는 위치로 내보내십시오.

 

 

[출처] qastack.kr/superuser/490922/merging-two-fonts

 

두 개의 글꼴 병합

 

qastack.kr

 

반응형
Posted by blueasa
, |

Problems that Thai is [?] In [Unity] iOS13

phenomenon

If when you try to multi-lingual in Unity Oke Select the default font asset referred to as "Arial", so you use Yoshinani the system font, but I did not have a problem until now, generating a phenomenon that garbled in iOS13 are you with.

Screenshot is iOS13.2.1 (iPhone8). In the middle of the screen [?] [?] [?] [?] And is in a place that is garbled applicable.
VIEW IMAGE

Investigation

Even Unity of the Issue have been reported, Armenian in addition to Thai, it seems to become garbled in Georgian.

For more details, it might be good to get a look at the people of Issue.

It summarizes the results of actually examined.

  • If you set the Thai fonts will be displayed without any problems.

    Screenshot is iOS13.2.1 (iPhone8). VIEW IMAGE
  • In iOS12.4.1 it will be as normally displays the Thai below.

    Screenshot is iOS12.4.1 (iPhoneXR). VIEW IMAGE
  • In Android10 it will be as normally displays the Thai below.
  • Unity version was also confirmed at 2018.3 and 2019.1, but it was the same result.

The method and the iOS language settings to use the system font to fall back a font to another tried such as the Thai, but it did not change.

temporary solution

Since it has published an app that was the Thai correspondence, it does not need to wait for the renovation of Unity.

Thinking of correspondence has the following procedure.

  1. Put the Thai font, eliminate garbled
  2. Raise Unity and is After the corresponding version

Since there is a free font Fortunately Thai, and the garbled solve with it.

Since a little thinner than the default font, it may not afford the alternative as long as there is a commitment.

I learned for the first time a license that GPL font exception. I did not know what I do a credit notation, it was for the time being added. If you have somebody who is familiar wait for information.

Font size was 480KB. I thought one more font size increases, but I have put in a not too nervous and if this much. But does not recommend because as far as possible towards the size of the app is small, I think good for the user.

Something like the following, we have set the font in the timing of switching to Thai.

text.font = Resources.Load<Font> ("Fonts/THSarabunNew/THSarabunNew");

It was also good as switched fallback, but because the provisional support of easy-to-understand on the code TODOhas been switched by the code this time on the grounds that I wanted to write a.

Summary

Because of what is in the Unity side, but have no idea what is in the iOS side, is a story that has survived for the time being in the provisional support.

We look forward to information If you know the other way.

reference

Unity Issue Tracker - [iOS 13.0] Some languages symbols are replaced with a [?] marks
https://issuetracker.unity3d.com/issues/ios-13-dot-0-all-thai-symbols-are-replaced-with-a-marks

Font - Unity manual
https://docs.unity3d.com/ja/2018.1/Manual/class-Font.html

[Unity] want to use a font that is installed on the OS in the Unity - Terra sur-blog
http://tsubakit1.hateblo.jp/entry/2018/05/30/234314

Public institutions of Thailand to issue "Thai font free" | Thailand favor
https://thaion.net/thai-font-sipa

Fxnt. Khxm »Fxnt Sarbrrn Prabprung Run Him" Sarabun New "
https://www.f0nt.com/release/th-sarabun-new/

GPL font exception - Wikipedia
Https://Ja.Wikipedia.Org/wiki/GPL font exception

 

 

[참조1] issuetracker.unity3d.com/issues/ios-13-dot-0-all-thai-symbols-are-replaced-with-a-marks

 

Unity IssueTracker - [iOS 13.0] Some languages symbols are replaced with a [?] marks

To reproduce: 1. Download attached "Thai Font Issue Example.zip" project and open in Unity 2. Build for iOS 3. Deploy the Xcode proj...

issuetracker.unity3d.com

 

[참조2] qiita.com/canecco/items/50b27ba214926e690ab0

 

【Unity】iOS13でタイ語が[?]になる問題 - Qiita

現象 Unityで多言語に対応しようとすると「Arial」というデフォルトのフォントアセットを選択しておけば、システムフォントをよしなに使ってくれるので今まで問題がなかったのですが、iOS13

qiita.com

 

[출처] titanwolf.org/Network/Articles/Article?AID=0f5127d9-dcac-4e95-8c1b-a97b6bc9a5c7#gsc.tab=0

 

Problems that Thai is [?] In [Unity] iOS13(Others-Community)

 

titanwolf.org

 

반응형
Posted by blueasa
, |

[문제원인]

  • 유니티에서 사용하는 C#에서 DateTime을 사용하여 달력정보를 가져올 경우 태국어에서 문제 발생.
    • 역법의 차이에서 문제가 발생.
    • 대부분의 국가는 그레고리력을 사용중이지만, 태국은 태국역법을 사용하여, 543년의 차이 발생.

         * 표준 불력은 석가모니 입적인 기원전 544년을 기준으로 사용. 태국은 이 표준불력에서 1년의 차이 발생.

  • 서버에서 내려주는 달력정보 스트링을 파싱하는 과정에서 태국어일 경우 문제 발생.
    • 스트링 포맷의 차이를 제대로 인지하지 못하고 파싱 실패. (표기 방법 상이)

 

[해결방안]

  • 클라이언트가 시스템 시간정보를 읽어 올 때, 태국어 예외 처리.

            DateTime lTime = DateTime.Now;
            if (System.Threading.Thread.CurrentThread.CurrentCulture.Name == "th-TH" 

            && Application.platform == RuntimePlatform.IPhonePlayer)
            {
                lTime = lTime.AddYears(-543);
            }

           서버에서 사용하는 그레고리력으로 통일

  • 서버에서 내려주는 달력정보의 스트링을 파싱하는 함수 변경. (포맷을 명확히 지정)

           String lCalendar = "";

           DateTime.Parse(lCalendar)  -> DateTime.ParseExact( lCalendar, "yyyy-MM-ddTHH:mm:ss.fffZ", null);

           서버에서 내려주는 포맷을 일치 시킬수 있도록 주의

 

 

반응형
Posted by blueasa
, |