Create cc.Font from font file

I want to make cc.Font object from ttf font file.

 var urlFont = cc.url.raw('resources/ExtraBold.ttf');
 var fontObj = new cc.Font(urlFont);
 this.label.getComponent(cc.Label).font = fontObj;

but if i make font like this code, just make cc.Font is empty
and if i set this font to label, there is no change.
how can i fix this problem?

not just insert font file in cocos creator,
I want to control with code.