Skip to content

Commit

Permalink
[common] fix font family for 'rtl' locale
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkadushkin committed Feb 6, 2024
1 parent cffa274 commit 9f5537d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions apps/common/main/lib/util/htmlutils.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ if ( ui_rtl && !isIE ) {
document.body.classList.add('rtl');
}

var isLangRtl = function (lang) {
return lang.lastIndexOf('ar', 0) === 0;
}

if ( isLangRtl(window.lang || lang) ) {
document.body.classList.add('rtl-font');
}

function checkScaling() {
var matches = {
'pixel-ratio__1_25': "screen and (-webkit-min-device-pixel-ratio: 1.25) and (-webkit-max-device-pixel-ratio: 1.49), " +
Expand Down
2 changes: 1 addition & 1 deletion apps/common/main/resources/less/variables.less
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
// Typography
// -------------------------

.rtl {
.rtl-font {
--font-family-base-custom: system-ui, -apple-system, "Geeza Pro", "Segoe UI", "Traditional Arabic", "Noto Sans";
}

Expand Down

0 comments on commit 9f5537d

Please sign in to comment.