Custom font という仕組み。
自動生成される web.assets_backend.css の body { Font-Family } に IPAmjMincho を追加。
font-family: "Odoo Unicode Support Noto", "Lucida Grande", Helvetica, Verdana, Arial, sans-serif;
生成されたcss
http://localhost:8069/web/content/235-a50e7a9/web.assets_backend.css
"Odoo Unicode Support Noto"が出現する箇所。
/* /web/static/src/scss/import_bootstrap.scss defined in bundle 'web.assets_backend' /
/ /web/static/src/scss/webclient.scss defined in bundle 'web.assets_backend' */
.o_web_accesskey_overlay{font-family: "Odoo Unicode Support Noto", "Lucida Grande", Helvetica, Verdana, Arial, sans-serif;}
???
.o_web_accesskey_overlay {
font-family: $font-family-sans-serif;
}
// Fonts
//
// Font, line-height, and color for body text, headings, and more.
$font-family-sans-serif: o-add-unicode-support-font(("Lucida Grande", Helvetica, Verdana, Arial, sans-serif), 1) !default;
// Odoo defines a limited Noto font-family for a small variety of unicode
// characters that are not necessary defined in the user system or even defined
// but not properly readable. This function allows to add this font family in a
// given font list.
//
// @param {list} $font - a list of font names ending with the generic one.
// @param {integer} [$index] - the position where to add the support font, if
// not given, it will be placed before the generic one.
@function o-add-unicode-support-font($font, $index: false) {
@if $index == false {
$index: length($font);
}
$-with-support-font: ();
@for $i from 1 through length($font) {
@if $i == $index {
$-with-support-font: append($-with-support-font, 'Odoo Unicode Support Noto', $separator: comma);
}
$-with-support-font: append($-with-support-font, nth($font, $i), $separator: comma);
}
@return $-with-support-font;
}
ヒント (追記:2021/07/29)
デフォルトフォントをアラビア文字に変更するモジュール実装
https://apps.odoo.com/apps/modules/14.0/nati_arabic_font/