Author Topic: Dynamic font are missing sometimes.  (Read 16655 times)

raon

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
Dynamic font are missing sometimes.
« on: June 03, 2013, 12:19:57 AM »
I think same problem like http://www.tasharen.com/forum/index.php?topic=4412.0

sometimes happen to between 5 minutes ~ 30 minutes

I'll try this NGUITools.Broadcast("Refresh"); http://www.tasharen.com/forum/index.php?topic=4415.msg21464#msg21464

But it's not fixed.

If you not happend to this issue. Please use this font http://cdn.naver.com/naver/NanumFont/fontfiles/NanumFont_TTF_ALL.zip -> NanumGothicBold.ttf

It's same english at this font. (It shown like : HIGH -> H  H)

I already check z-orders.

Missing font device : Optimus G Pro, Galaxy Note 1 (Screen density 320)
Not shown device : Galaxy S2, Iphone 4s, Iphone 5

Unity : 4.1.3f3
NGUI : 2.6.1c

Thanks and Regards,
« Last Edit: June 03, 2013, 07:04:52 AM by raon »

haoxiucai001

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 12
    • View Profile
Re: Dynamic font are missing sometimes.
« Reply #1 on: June 03, 2013, 12:26:10 AM »
我也遇到了类似问题,在mi1 mi2 mi2s 华为,均有这种问题,在ios上就不会出现这类问题,纠结好长时间了,项目就因为这个动态字体更新问题迟迟得不到解决,打算用纹理贴图替换,亟待官方解决

haoxiucai001

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 12
    • View Profile
Re: Dynamic font are missing sometimes.
« Reply #2 on: June 03, 2013, 04:57:22 AM »
我感觉应该是uifont的问题,我们游戏的界面,用了三套字体,聊天界面单独用一套,ui界面单独用一套、特殊的较大字体的ui界面再用一套,写了个测试代码实时获取当前字体的贴图尺寸,在游戏过程中,尺寸也都是控制在256*256,就从来没发生过改变,也会出现字体混乱,
看官方说有部分设备不支持渲染2048*2048的图,我的游戏的字体贴图就从来没有超过256*256 。时而乱,时而不乱,还有就是多个界面用到的都是同一个字体,一个界面存在多个label,多个label有多个层,不知道与这个有没有关系。
还有就是用官方的3dText是没有问题的,不会发生混乱,用BMfont做的贴图纹理也不会出现这问题,非常希望写这块儿的把这个动态自己的问题解决了,中文、韩文、日文、都应是这样。

eddieB

  • Guest
Re: Dynamic font are missing sometimes.
« Reply #3 on: June 04, 2013, 12:15:30 AM »
try to use the language of the forum (english) so people can understand and eventually answer your questions.

请用英语说明,这样的话知道解决办法的人就可以回答你的问题了,这样更便利不是么。

eddieB

  • Guest
Re: Dynamic font are missing sometimes.
« Reply #4 on: June 04, 2013, 12:20:14 AM »
i was thinking that the problem was only on chinese and japanese font but it look like it also happen on the english Font.
for you debugging make a GUI button and call the function i talk about here http://www.tasharen.com/forum/index.php?topic=4412.0 so you can push and test the function when the bug occur.

just refreshing one the font of the Uilabel make all the label of the same font refreshing well.

mikecy

  • Guest
Re: Dynamic font are missing sometimes.
« Reply #5 on: September 15, 2013, 10:49:59 AM »
以下訊息供高手參考, 以求有解決的方法, 謝謝!

目前我只有試驗過兩種裝置來測試用nGUI UIFont Dynamic Fon所呈現的中/英/數文字內容: 一是用Nexus 7測試結果沒有掉字的問題; 另外是用小米2S(MI2)測試當重複顯示文字幾次後就發生有些字會掉.
有趣的是, 當發生問題時, 若使用nGUI 2.3.3h上, 只要有做過全域Localization切換更新文字, 就會恢復正常. 然而, 若是用最新2.7.0只能重啓程式才能看到完整不掉字的畫面, 此問題在重複顯示文字數次後仍會再次發生.

The following referral information is for someone of advanced expert who may help to resolve this problem. Thanks!

Now I'd only tried 2 devices on character missing problem using nGUI UIFont Dynamic Font for Chines/English/Number text contents.
One is Nexus 7 works perfect w/o this problem; the other one iis XIAOMI 2S (MI2) may encounter some characters missing problem.
It is interesting, if that applies nGUI 2.3.3h, the problem on MI2 will disappeared after global Localization had been switched and text contents refreshed.
However, if that applies latest nGUI 2.7.0, it only can see the normal text contents after terminate the program and launch again.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Dynamic font are missing sometimes.
« Reply #6 on: September 16, 2013, 12:20:30 AM »
2.3.3 doesn't support dynamic fonts at all. Dynamic font support was first added in NGUI 2.5.0.

jarjin

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 28
    • View Profile
Re: Dynamic font are missing sometimes.
« Reply #7 on: September 18, 2013, 08:52:11 AM »
Dynamic font are missing sometimes on NGUI 2.7.0
Android platform

mikecy

  • Guest
Re: Dynamic font are missing sometimes.
« Reply #8 on: September 24, 2013, 02:16:13 PM »
Sorry, my bad, my 2.3.3 was referring old readme file name had been upgraded to 2.5.0.
So I meant it was 2.5.0 has such problem of Asian wordings that can be recovered by localization switches.
However, the 2.6.x and 2.7.0 seems have worse result w/ on some Android MI series system.
I guess there might be someting wrong on UIFont texture mapulation or conflicts w/ something caused character imissing problem.

Regarding iOS, the 2.6.x also have a random character corruption problem on iOS (just flash a short time of the corruption and back to normal quickly), but not seen in 2.5.0.

Thought?

Thanks You!
« Last Edit: September 24, 2013, 02:40:42 PM by mikecy »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Dynamic font are missing sometimes.
« Reply #9 on: September 24, 2013, 05:58:19 PM »
Yes, and this problem will keep existing in all versions leading up to 3.0. 3.0 is when it was fixed.

mikecy

  • Guest
Re: Dynamic font are missing sometimes.
« Reply #10 on: September 30, 2013, 06:40:47 AM »
Thanks, ArenMook,

However, after I tried nGUI 3.0 the characters random missing problem still exists.

Now I am suspecting this may be a bug of Unity or CPU/GPU compatiblity while rendering texture for Dynamic Font, please refer to this link:

http://forum.unity3d.com/threads/190158-Dynamic-Font-Missing-Character-Info-on-certain-devices

My tested device (MI2) has this failure mode is made w/ Qualcomm SnapDragon CPU.
If this problem exists, I will only publish my game for iOS App Store, or I need to specify some certain devices are having this problem for my game's Android Market declaration.
« Last Edit: October 01, 2013, 02:42:06 PM by mikecy »

mikecy

  • Guest
Re: Dynamic font are missing sometimes.
« Reply #11 on: October 12, 2013, 03:54:14 PM »
I have a new finding....

If I use Bitmap font for UILabel, I still can this problem that some characters missing (blank) randomly on the MI2 (Qualcomm CPU).

And I had tried on my new purchased Lenovo IdeaPad S6000 (MediaTek MT8389 / 8125 CPU), it works fine using Dynamic font and Bitmap font both.

iOS all kinds of Device works perfect w/o this issue, iPhone 3GS, iPod 3, iPhone 4, iPhone 4S, iPhone5, iPad1, iPad3 had been tested since several nGUI versions.

According to this finding, now I am thinking this may not be a Unity Dynamic Font engine problem, I am confused what the root cause is?

The character texture coordination churning or truncating?




ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Dynamic font are missing sometimes.
« Reply #12 on: October 13, 2013, 10:08:32 AM »
You should submit a bug to Unity about it -- although I think they are already aware of it.

mikecy

  • Guest
Re: Dynamic font are missing sometimes.
« Reply #13 on: October 13, 2013, 02:32:58 PM »
Thanks, ArenMook,
I found a problem of my code regarding the UILocalize.cs KEY assignment by empty KEY may have condition cause Localization warning from Unity Editor log that may cause BMFont missing character as well. After I update fixed KEY for warning elimination, then the BMFont character missing issue disappeared.
So I had confirm the BMFont has no such problem at all. Sorry for confusion. :P

I think that should be Unity's problem from Unity RequestCharactersInTexture API, then I will submit a bug to Unity.

Besides, do you think Unity need to have a algorithm to avoid re-draw the same character from different times of requests.
Or that should be controlled by script, like an additional look up table to decide usage of existing character texture or request new?   ???

QiuLei

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: Dynamic font are missing sometimes.
« Reply #14 on: March 05, 2014, 12:43:42 AM »
I wonder that whether the dynamic font missing problem has been fixed by ngui or unity by now :-\
Thanks, ArenMook,
I found a problem of my code regarding the UILocalize.cs KEY assignment by empty KEY may have condition cause Localization warning from Unity Editor log that may cause BMFont missing character as well. After I update fixed KEY for warning elimination, then the BMFont character missing issue disappeared.
So I had confirm the BMFont has no such problem at all. Sorry for confusion. :P

I think that should be Unity's problem from Unity RequestCharactersInTexture API, then I will submit a bug to Unity.

Besides, do you think Unity need to have a algorithm to avoid re-draw the same character from different times of requests.
Or that should be controlled by script, like an additional look up table to decide usage of existing character texture or request new?   ???