Dynamic load bitmap font from server and assign to cc.Label

Any person has any idea how to assign bitmap font after downloading .fnt and .png files from server?

I have tried doing this. Image below didn’t show the process on how to load the image but I’m certain it is downloaded as cc.TextAsset and cc.Texture2D

image

Directly using .fnt and .png files is very easy to cause problems. I thing is better to put your bmfont into asset bundle, then use them like this.

    changeFont() {
        cc.assetManager.loadBundle("font", (err, bundle) => {
            bundle.load("Blue", cc.BitmapFont, (err, font) => {
                if (err) {
                    return;
                }
                this.label.font = font;
            })
        })
    }