Author Topic: Dynamic font doesn't work in Input component at the WebGL  (Read 14369 times)

YuliyF

  • Newbie
  • *
  • Thank You
  • -Given: 7
  • -Receive: 1
  • Posts: 11
    • View Profile
Dynamic font doesn't work in Input component at the WebGL
« on: June 28, 2015, 09:48:27 AM »
only static - but it's look terrible(, I'm using 3.8.0 version, is in 3.9 it working?

YuliyF

  • Newbie
  • *
  • Thank You
  • -Given: 7
  • -Receive: 1
  • Posts: 11
    • View Profile
Re: Dynamic font doesn't work in Input component at the WebGL
« Reply #1 on: June 28, 2015, 10:44:01 AM »
in my case static font don't work too, but him: http://forum.unity3d.com/threads/backspace-key-doesnt-work-in-webgl-build.336789/ - almost all ok

Wisteso

  • Full Member
  • ***
  • Thank You
  • -Given: 21
  • -Receive: 3
  • Posts: 103
    • View Profile
Re: Dynamic font doesn't work in Input component at the WebGL
« Reply #2 on: June 28, 2015, 01:17:19 PM »
Just a little tip: I don't think this post is going to get an answer. I have no idea, at all, what you're asking.

Use pictures if you have to, or just better explain the issue.

YuliyF

  • Newbie
  • *
  • Thank You
  • -Given: 7
  • -Receive: 1
  • Posts: 11
    • View Profile
Re: Dynamic font doesn't work in Input component at the WebGL
« Reply #3 on: June 28, 2015, 02:37:13 PM »
I have a chat, in Unity Player its work nice, but in WebGL I can't input text to the Input box, it's just empty only Input Caret.(in unity all work, bug in build of webGL)

Wisteso

  • Full Member
  • ***
  • Thank You
  • -Given: 21
  • -Receive: 3
  • Posts: 103
    • View Profile
Re: Dynamic font doesn't work in Input component at the WebGL
« Reply #4 on: June 28, 2015, 07:28:55 PM »
Ah okay. That could be a Unity bug, web browser bug, or yeah perhaps NGUI.

One way to rule out NGUI would be to write a script to see if any input is received by your game at all.

Since you didn't specify if other input works, I'm just assuming you haven't tested that.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Dynamic font doesn't work in Input component at the WebGL
« Reply #5 on: June 29, 2015, 07:21:29 AM »
Sounds like a Unity bug, yeah. Do a simple scene where you check Input.inputString in Update() using NGUITools.Log to print it to the screen if it's not empty and try pressing keys. If you see nothing, then Unity is not reporting any input, and it's a Unity bug you can submit to them.

YuliyF

  • Newbie
  • *
  • Thank You
  • -Given: 7
  • -Receive: 1
  • Posts: 11
    • View Profile
Re: Dynamic font doesn't work in Input component at the WebGL
« Reply #6 on: July 13, 2015, 06:38:58 AM »
Is NGUI support a font mode Custom Set in Character ?
It's very angry at line
  1. if (dynamicFont.GetCharacterInfo((char)ch, out mTempChar, finalSize, fontStyle))
in NGUIText (using 3.8.0)

In uGUI I use Custom Set on font and can write by Cyrillic. Demo: http://dragonfly.com.ua/webGlTesting/
but it needs in NGUI. Even if I generate font from a bitmap with a cyrillic letters- it's not work
« Last Edit: July 13, 2015, 10:07:26 AM by YuliyF »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Dynamic font doesn't work in Input component at the WebGL
« Reply #7 on: July 14, 2015, 11:52:52 PM »
First, please update to the latest version of NGUI. Second, please provide more information -- such as how you create the font. Using NGUI's Font Maker you can specify a custom set of characters to include. As long as the font actually has the glyphs, it will work. If it doesn't, it won't.

Note that Unity automatically falls back to built-in Arial font if the font you are trying to use doesn't support the characters. Try finding a font that actually has Cyrillic, and it'll work as expected.

Attached one will work, for example.

YuliyF

  • Newbie
  • *
  • Thank You
  • -Given: 7
  • -Receive: 1
  • Posts: 11
    • View Profile
Re: Dynamic font doesn't work in Input component at the WebGL
« Reply #8 on: July 23, 2015, 05:06:08 PM »
Quote
First, please update to the latest version of NGUI
done.

I get your font - Qlassik.otf and made in Font Maker a font type of Imported Bitmap. I was using BMFont to create a bitmap from font. And Cyrillic letters are not working in WebGL, it works in Unity Player and Unity Editor and in EXE file, but not in WebGL,
demo: http://dragonfly.com.ua/webGlTesting/

Cyrillic is not work in Input field, in Label is all ok

Attach a font.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Dynamic font doesn't work in Input component at the WebGL
« Reply #9 on: July 24, 2015, 10:46:12 AM »
Ah, then it's a Unity issue. Please report a bug to them, explaining that Input.inputString doesn't detect Cyrillic characters in WebGL, while it works fine on other platforms.