Replies: 2 comments 5 replies
-
Hi Giancarlo, I had a quick look at that, and yes, it would be possible. The currently used The question is, should I tend not to, because it seems a little error-prone to me. I asked ChatGPT, and it gave me just a few weird regular expressions, and I think it's more reasonable to leave the part of loading the file in the developers' hands. They usually know where the fonts come from and what APIs are available to load them 😅. But this means one has to change the constructor, something like that: constructor(
fontBuffer: ArrayBuffer | SharedArrayBuffer,
options?: ObfuscationOptions,
) {
this.options = {
...DEFAULT_OPTIONS,
...options,
};
this.font = parse(fontBuffer);
} What do you think? |
Beta Was this translation helpful? Give feedback.
-
Resolved, from Version 2.1.0 onwards, one can instantiate Noscrape either by a local file path (string) or an ArrayBuffer. |
Beta Was this translation helpful? Give feedback.
-
Hi!
First, I want to thank you for the splendid work on this lib! It's a awesome idea and already helping me a lot with my job.
And, I want to ask if there's a possibility of reading fonts from a direct file URL (something like
https://mydomain.com/font.woff2
) in order to use this with client side only, to usage with React Apps with Vite, for example.If it's possible, I want to contribute with this change!
Again, thanks a lot o/
Beta Was this translation helpful? Give feedback.
All reactions