mopsicus / umi

Unity mobile input (UMI) plugin for Android and iOS, allows to use features of mobile native input fields
MIT License
398 stars 92 forks source link

Some ".ttf" fonts are not woking in iOS. #78

Closed ManikandanDennis closed 8 months ago

ManikandanDennis commented 3 years ago

PoppinsSemiBold.ttf.zip

Attached font is not working on MobileInputField in iOS. It gets replaced with iOS default font.

mopsicus commented 3 years ago

59

ManikandanDennis commented 3 years ago

In android all fonts are working fine. but when it came to iOS getting this error when try to load "not working" font. CFErrorRef Error Domain=NSPOSIXErrorDomain Code=22 'Invalid argument'

When loading your demo scene font "Chilanka.ttf", CFErrorRef is null.

JustFinRadio commented 3 years ago

I am also having trouble with some custom fonts in MobileInputField on iOS.

Poppins-Regular is working fine for me, but I have been unable to get any other custom fonts to work so far.

When a font fails to load, TimesNewRoman is used instead, and I get the following output in the debug log:

CoreText note: Client requested name ".Helvetica NeueUI", it will get TimesNewRomanPSMT rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[UIFont systemFontOfSize:].

2021-06-25 23:24:39.181771+0100 FirstContact[497:60183] CoreText note: Set a breakpoint on CTFontLogSystemFontNameRequest to debug.

Plugins receive data: {"name":"mobileinput","data":"{\"msg\":\"READY\",\"id\":2}"}
Mopsicus.Plugins.Plugins:OnDataReceive(String)

Any ideas on how to fix this would be much appreciated!

Thank you :)