[LayaNative 2.0]Laya2.6.0 升级至Laya2.8.0 Native环境 加载ttf 字体不生效

Laya2.6.0 升级至Laya2.8.0 Native环境 加载ttf 字体不生效
之前 2.6.0 好好的  2.8.0 一样的代码 就不生效了。。。。。。
 
代码如下:
 
        let font1Req =  new Promise((resolve => {
            Laya.loader.load("res/fonts/OPPOSANS-R.TTF", Laya.Handler.create(this, (success: boolean) => {
                if (!success) {
                    console.error("OPPOSANS-R ttf 字体加载失败");
                } else {
                    console.log("OPPOSANS-R ttf 字体加载成功");
                }
                return resolve(success);
            }), Laya.Handler.create(this, (pro) => {
                console.log("lobby ttf 字体加载进度:" + pro);
            }, null, false), Laya.Loader.TTF)
        }));
        let font2Req = new Promise((resolve => {
            Laya.loader.load("res/fonts/OPPOSANS-H.TTF", Laya.Handler.create(this, (success: boolean) => {
                if (!success) {
                    console.error("OPPOSANS-H.ttf ttf 字体加载失败");
                } else {
                    console.log("OPPOSANS-H.ttf ttf 字体加载成功");
                }
                return resolve(success);
            }), Laya.Handler.create(this, (pro) => {
                console.log("lobby ttf 字体加载进度:" + pro);
            }, null, false), Laya.Loader.TTF)
        }));
生效2.6_.0_.png 不生效2.8_.0_.png 代码.png 日志.png
已邀请:

lv

赞同来自:

发下完整的demo

AILHC

赞同来自:

请问楼主解决了吗?

AILHC

赞同来自:

请问楼主解决问题了吗?

IXgSoul

赞同来自:

把字体的命名改成全小写就解决了,留个言,以敬后来者

要回复问题请先

商务合作
商务合作