[問題] Flash CS3 字型設定 有程式碼下載
想請教各位前輩setTextFormat()的問題。
若我場景上有一個textField叫my_text,為動態文字,裡面的文字有中文也有英文。
EX:「小明的英文名字為Eric」。
而我的textField在介面上的預設字型為Times New Roman。
===================================================================
當我用ActionScript3去改變my_text的中文字型為「華康仿宋體」,
總是改不到我要的仿宋體字型,似乎會變成新細明體或什麼的。
但英文又改得了Arial。
===================================================================
以下為程式碼
var textformat_chi = new TextFormat();
textformat_chi.font = "華康仿宋體W6";
textformat_chi.bold = true;
var textformat_eng = new TextFormat();
textformat_eng.font = "Arial";
textformat_eng.bold = true;
textformat_eng.italic = true;
my_text.setTextFormat(textformat_chi,0);
my_text.setTextFormat(textformat_chi,1);
my_text.setTextFormat(textformat_eng,9);
===============================================================
"小" "明"
該二字都會變粗體,但字型就改像是flash預設的新細明體。
"E"
可成功更改。
==================================================================
所以,是不是當我的my_text原預設字型為中文時,中文字型可成功更改。
但英文一經過setTextFormat去改成Arial,英文就會變成Flash預設的Times New Roman?
反之,是不是當我的my_text原設設字型為英文時,英文字型可成功更改。
但中文一經過setTextFormat去改成華康,中文就會變成Flash預設的新細明體?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.43.76.63
推
02/28 00:49, , 1F
02/28 00:49, 1F
→
02/28 00:50, , 2F
02/28 00:50, 2F
→
02/28 00:51, , 3F
02/28 00:51, 3F
→
02/28 00:51, , 4F
02/28 00:51, 4F
→
02/28 00:51, , 5F
02/28 00:51, 5F
推
02/28 00:54, , 6F
02/28 00:54, 6F
→
03/04 16:09, , 7F
03/04 16:09, 7F
→
03/04 16:10, , 8F
03/04 16:10, 8F
→
03/04 16:49, , 9F
03/04 16:49, 9F
→
03/04 16:50, , 10F
03/04 16:50, 10F
→
03/04 17:45, , 11F
03/04 17:45, 11F
→
03/04 17:45, , 12F
03/04 17:45, 12F
Flash 近期熱門文章
PTT數位生活區 即時熱門文章