mirror of https://github.com/axmolengine/axmol.git
Fix more js parser font setting error
This commit is contained in:
parent
d82b6b6f1c
commit
0fcfb359d2
|
@ -565,7 +565,7 @@
|
||||||
widget.setFontSize(fontSize);
|
widget.setFontSize(fontSize);
|
||||||
|
|
||||||
var fontName = json["FontName"];
|
var fontName = json["FontName"];
|
||||||
if(fontName != null)
|
if(fontName && "" !== fontName)
|
||||||
widget.setFontName(fontName);
|
widget.setFontName(fontName);
|
||||||
|
|
||||||
var areaWidth = json["AreaWidth"];
|
var areaWidth = json["AreaWidth"];
|
||||||
|
@ -601,7 +601,7 @@
|
||||||
if(fontResource != null){
|
if(fontResource != null){
|
||||||
var path = fontResource["Path"];
|
var path = fontResource["Path"];
|
||||||
//resoutceType = fontResource["Type"];
|
//resoutceType = fontResource["Type"];
|
||||||
if(path != null){
|
if(path){
|
||||||
if (cc.sys.isNative) {
|
if (cc.sys.isNative) {
|
||||||
fontName = cc.path.join(cc.loader.resPath, resourcePath, path);
|
fontName = cc.path.join(cc.loader.resPath, resourcePath, path);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1133,7 +1133,7 @@
|
||||||
widget.setFontSize(fontSize);
|
widget.setFontSize(fontSize);
|
||||||
|
|
||||||
var fontName = json["FontName"];
|
var fontName = json["FontName"];
|
||||||
if(fontName != null)
|
if(fontName && "" !== fontName)
|
||||||
widget.setFontName(fontName);
|
widget.setFontName(fontName);
|
||||||
|
|
||||||
var maxLengthEnabled = json["MaxLengthEnable"];
|
var maxLengthEnabled = json["MaxLengthEnable"];
|
||||||
|
@ -1154,7 +1154,7 @@
|
||||||
if(fontResource != null){
|
if(fontResource != null){
|
||||||
var path = fontResource["Path"];
|
var path = fontResource["Path"];
|
||||||
//resoutceType = fontResource["Type"];
|
//resoutceType = fontResource["Type"];
|
||||||
if(path != null){
|
if(path){
|
||||||
if (cc.sys.isNative) {
|
if (cc.sys.isNative) {
|
||||||
fontName = cc.path.join(cc.loader.resPath, resourcePath, path);
|
fontName = cc.path.join(cc.loader.resPath, resourcePath, path);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue