Hey guys, I'm trying to create a text field with chinese characters by using the font name installed on my iOS device.
Using Jeff's nice class found here: https://gist.github.com/jamikado/dc9fdaba9e1b34567b9d
I have found the following Chinese specific font names while running on my iOS device:
PingFang SC Light, PingFang SC, PingFang SC Regular, PingFang SC Thin, PingFang SC Medium
but now... how do I create a text field that uses these font? I'm at a loss.
I've tried variations of:
var tformat:TextFormat = new TextFormat("PingFang-SC-Regular", 30); var tf:TextField = new TextField(300, 60, "你好。这是中国一句。", tformat);
with the following font names:
"PingFang SC Regular"
(also tried all of the above with the textformat set to be bold)
(and tried all of the above for Light, and Medium as well)
But nothing I do ever changes the look of the textfield on the iphone. It's always showing up as the default (you put the wrong fontname in your format) font.
How can I get the real name I am supposed to type in the format?
I've searched google and it looks like the names I am typing are correct...
Like, on people's CSS stylesheets they also type the same names...
Also I realize typing _sans will give me a working Chinese font, but I need some font weights... even _sans with the format set to bold gives me the same font as a normal _sans, and its also ugly...
Thanks for any help