Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
8 Trả lời
8256 Lượt xem

The Odoo website module uses several Google fonts, hosted by Google servers. Is there a way to override this and host the fonts locally?

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

A quick and dirty fix:

Comment out in /addons/website/static/src/scss/website.scss:

$-seen-urls: ();
@each $alias, $key in $o-font-aliases-to-keys {
$-url: o-get-font-info($alias, 'url');
@if $-url and index($-seen-urls, $-url) == null {
$-seen-urls: append($-seen-urls, $-url);
// @import url("https://fonts.googleapis.com/css?family=#{unquote($-url)}&display=swap");
}
}

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hello, from Odoo 15, we added a toggle to select if the google font should be served by Google server or by the Odoo server:

Ảnh đại diện
Huỷ bỏ

Must be improved!
Please prefill the input field and also supply a dialog to switch all fonts to "local"!
Crucial and legally important function !

Câu trả lời hay nhất

I found this tool (no affiliation and unfortunately only in German) helpful to check if all requirements are fulfilled (i.e., check if font is loaded from the Google servers, or not):

https://sicher3.de/google-fonts-checker/

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi to all
To fix this you can deploy this module :

https://apps.odoo.com/apps/modules/13.0/bytist_fix_google_font/

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

You will have to load the font files in your static directory and include it as an asset by inheriting the web front end assets xml file then applying the fonts using a css.

Ảnh đại diện
Huỷ bỏ
Tác giả

Hi guys, is there any update here? Facing the same issue and interested in how you solved this :)

Thanks Mario :)
Then we'll patch odoo here

Câu trả lời hay nhất

Is there an upstream patch for this already. This is becoming a serious threat for German customers. See https://www.datenschutzticker.de/2022/03/einsatz-von-google-fonts-ohne-einwilligung-ist-rechtswidrig/

Ảnh đại diện
Huỷ bỏ
Tác giả

There is a module for replacing Google fonts with BunnyFonts:

https://apps.odoo.com/apps/modules/15.0/hav_remove_google_fonts/

mh thanks but that doesn'r really solve the core problem for the OLG Munich but should be sufficiently good to avoid trouble with lawyers for a while at least ;-)

Tác giả

Even if the fonts are hosted in the EU, the fonts are fetched from a 3rd party. To make 100% sure, put the fonts locally within an addon on the Odoo server.

yes @mario and this one doesn't work without having a doorkeeper route in Odoo as it is an integral part of each website rendered and fetched even before any consent can be given

Besides that oi think thats a core problem to Odoo, that Odoo S.A. should be solving. And i am pretty sure they will as all SaaS instances are similarly affected

Câu trả lời hay nhất


There is a way to change the font source  from default "google servers" to a local font set.   (Website Editor -> "Theme" -> Paragraph -> Font Familiy
The dialog is very bad in the sense that all Google fonts are preset as server loaded and instead of allowing a change easily, a broken form asks to replace the (already existing) font source  AND confirm to store this on the Odoo server.

All preset to cloud! (NONSENSE!)

When selecting one of the fonts we hit this broken dialog:

We have to enter the complete font url.  And change the default "Google Server".
You would have to reset all fonts with this lengthy steps instead of finding a simple switch to "local".

This topic is terribly neglected and misformed in Odoo by - probably - some Google "believers" or interest to push Google tools.
Using Google Fonts is a much worse form of tracking usage statistics than any cookies can be.
When hitting a google fonts block  the Website Editor (or other wysiwyg components) can also fail badly without a usefull error.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi!


I created a module that automatically hosts all the Google fonts used in the website module and replaces the links in the asset bundle with external references to the Google fonts with internal links pointing to the hosted fonts. In this way, privacy problems are mitigated and the solution is more compliant with the European regulation for the GDPR. It works for odoo 18. It's free.


Search this app in the odoo app store: local_google_fonts

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 2 19
5050
2
thg 8 24
1836
3
thg 3 24
5204
1
thg 10 18
2830
0
thg 10 18
3759