tldraw / tldraw-v1

A tiny little drawing app. This is the original 2021-2022 version, released under MIT.
https://old.tldraw.com
MIT License
61 stars 36 forks source link

[bug] Calls For Google Fonts Create Potential GDPR Violation #61

Closed KDSBrowne closed 8 months ago

KDSBrowne commented 1 year ago

tldraw currently downloads fonts from Google https://github.com/tldraw/tldraw/blob/2352985e949d14270fc89dc60144239c37c8ff91/packages/tldraw/src/hooks/useStylesheet.ts https://github.com/tldraw/tldraw/blob/2352985e949d14270fc89dc60144239c37c8ff91/apps/www/styles/globals.css

This causes conflicts with the General Data Protection Regulation.

Hosting the required fonts locally may be a potential solution.

steveruizok commented 1 year ago

Yikes. Happy to take a PR here if anyone's up for moving the fonts into the repo instead.

marekhrabe commented 1 year ago

This might be a viable alternative without distributing the fonts directly in the repo: https://bunny.net/fonts/

danimo commented 1 year ago

@marekhrabe Why use a 3rd party CDN in the first place? With HTTP2 and asset caching, using CDNs seems to be more trouble than its worth.

danimo commented 1 year ago

@marekhrabe Why use a 3rd party CDN in the first place? With HTTP2 and asset caching, using CDNs seems to be more trouble than its worth.

On top of that, bunny.net uses CDN77.com, which is a UK company, which is outside of the European Union. And even if the UK hadn't decided to exit the EU, bunny.net still would need to be listed as a Data Provider by everyone using tldraw (either directly or through 3rd party products like BigBlueButton) in the EU. To top it off it also needs an agreement and is a paid for service.

danimo commented 1 year ago

Please see https://github.com/tldraw/tldraw/pull/1091. Tests need fixing, but the fix has been verified to work manually. Advise is appreciated, esp. on the failing tests.

danimo commented 1 year ago

Note in order to be in compliance with GDPR for SVG exports, it is necessary to set opts.includeFonts. However, this will ship the full set of fonts with every SVG export.