I'd recommend looking at how Scratch 1.4 text costumes are handled in 2.0. The file format is described here: Scratch File Format (2.0) - Scratch Wiki
Making it as similar as possible to Scratch 1.4 would basically mean copying all the relevant text properties. But don't worry about making it easy for Snapinator. What was best for Scratch in 2009 probably isn't what's best for Snap! in 2020, and I'll make it convert to whatever you implement.
And if it would help, here's how Snapinator handles Scratch 1.4 text:
this.zip, baseLayerAssetID, baseLayerExt, this.log, 2, costumeObj.bitmapResolution
);
media[baseLayerMD5Ext] = baseLayerFile;
}
if (costumeObj.text != null) {
const textLayerMD5Ext = costumeObj.textLayerMD5;
const [textLayerMD5, textLayerExt] = textLayerMD5Ext.split('.');
const textLayerAssetID = this.zip instanceof AssetServer ? textLayerMD5 : costumeObj.textLayerID;
if (!media[textLayerMD5Ext]) {
const textLayerFile: ImageFile = await new ImageFile().load(
this.zip, textLayerAssetID, textLayerExt, this.log, 2, costumeObj.bitmapResolution
);
media[textLayerMD5Ext] = textLayerFile;
}
const ctx: CanvasRenderingContext2D = canvas.getContext('2d');
canvas.width = baseImg.width;
canvas.height = baseImg.height;
ctx.drawImage(baseImg, 0, 0);
ctx.drawImage(textImg, 0, 0);
const result: ImageFile = new ImageFile();
result.data = canvas.toDataURL();
result.dataFormat = 'png';
result.dataIsURL = true;
resolve(result);
};
textImg.src = textLayer.toDataURL();
};
baseImg.src = this.toDataURL();
});
}
}
https://github.com/djsrv/snapinator/blob/master/src/objects/Costume.tsx#L33-L37