Hi,
is there,
i was wondering if there is any possibility to load base64 encrypted font files. Or to use encrypted fonts through any method.
cheers dennis
Hi,
is there,
i was wondering if there is any possibility to load base64 encrypted font files. Or to use encrypted fonts through any method.
cheers dennis
Hello, and welcome to the forum, @DennisM!
I don’t know anything about encrypted font files. Maybe you are referring to Base64 encoded font files? In that case yes, it should be doable using loadFont
and data URLs:
let myFont;
function preload() {
// The example data URL below is incomplete, you have to replace it whit the actual data URL of your font.
myFont = loadFont('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAHwwABMAAAAA[...]AA==');
}
function setup() {
fill('#ED225D');
textFont(myFont);
textSize(36);
text('p5*js', 10, 50);
}
Thanks Sven!
Works fine for me!