From f0f9879d90d34a9ff4f59d040a9a394baa0acf3a Mon Sep 17 00:00:00 2001 From: Juwon Jeong Date: Fri, 11 Mar 2022 13:29:27 +0900 Subject: [PATCH 1/4] WRN-12925: Remove non-latin font rules Enact-DCO-1.0-Signed-off-by: Juwon Jeong (juwon.jeong@lge.com) --- BodyText/BodyText.module.less | 4 ---- Input/Input.module.less | 4 ++-- Panels/Header.module.less | 6 +++--- styles/internal/fonts.less | 2 +- styles/mixins.less | 19 +++---------------- styles/variables.less | 9 --------- 6 files changed, 9 insertions(+), 35 deletions(-) diff --git a/BodyText/BodyText.module.less b/BodyText/BodyText.module.less index 89785c2481..eea0d8e466 100644 --- a/BodyText/BodyText.module.less +++ b/BodyText/BodyText.module.less @@ -17,10 +17,6 @@ .enact-locale-tallglyph({ font-size: @sand-tallglyph-body-small-font-size; }); - - .sand-locale-non-latin({ - font-size: @sand-non-latin-body-small-font-size; - }); } .enact-locale-rtl({ diff --git a/Input/Input.module.less b/Input/Input.module.less index 237d2de674..24ca9b685c 100644 --- a/Input/Input.module.less +++ b/Input/Input.module.less @@ -97,7 +97,7 @@ } .title { - .sand-font-size(@sand-input-fullscreen-title-font-size, @sand-non-latin-input-fullscreen-title-font-size); + .sand-font-size(@sand-input-fullscreen-title-font-size); } .numberCell { @@ -172,7 +172,7 @@ .title { margin: @sand-input-overlay-title-margin; - .sand-font-size(@sand-input-overlay-title-font-size, @sand-non-latin-input-overlay-title-font-size); + .sand-font-size(@sand-input-overlay-title-font-size); } .inputArea { diff --git a/Panels/Header.module.less b/Panels/Header.module.less index 8b2fb2fe49..8a2006daed 100644 --- a/Panels/Header.module.less +++ b/Panels/Header.module.less @@ -139,7 +139,7 @@ } .title { - .sand-font-size(@sand-header-compact-title-font-size, @sand-non-latin-header-compact-title-font-size); + .sand-font-size(@sand-header-compact-title-font-size); } } @@ -158,7 +158,7 @@ } .title { - .sand-font-size(@sand-header-wizard-title-font-size, @sand-non-latin-header-wizard-title-font-size); + .sand-font-size(@sand-header-wizard-title-font-size); padding: @sand-header-wizard-title-padding; } @@ -188,7 +188,7 @@ } .title { - .sand-font-size(@sand-header-mini-title-font-size, @sand-non-latin-header-mini-title-font-size); + .sand-font-size(@sand-header-mini-title-font-size); } &.withSubtitle { diff --git a/styles/internal/fonts.less b/styles/internal/fonts.less index 8fa411c37a..f71e6da0d8 100644 --- a/styles/internal/fonts.less +++ b/styles/internal/fonts.less @@ -60,7 +60,7 @@ th: local("LG Smart UI AR HE TH") normal 300 600 700; zh-HK: local("LG Smart UI TC") normal 300 600 700; zh-TW: local("LG Smart UI TC") normal 300 600 700; // same as `zh-HK` - + // DEV NOTE: This is the closest proximity to a collection of unit tests that we have to test this system. // name: local("name"); // nameRepeat: local("name"), local("name2"); diff --git a/styles/mixins.less b/styles/mixins.less index a13a158d93..0cb3a10b4a 100644 --- a/styles/mixins.less +++ b/styles/mixins.less @@ -122,7 +122,6 @@ // ThemeDecorator to override the target of the rules. .sand-text-base(@font-size: @sand-body-font-size; @target: normal) { .sand-font({ - font-weight: @sand-non-latin-font-weight; }, @target); font-weight: normal; @@ -248,11 +247,7 @@ font-weight: @sand-body-font-weight; font-size: @sand-body-font-size; font-style: @sand-body-font-style; - .sand-font(@sand-body-font-family; @sand-non-latin-font-family-light; { - font-weight: @sand-non-latin-body-font-weight; - font-size: @sand-non-latin-body-font-size; - font-style: @sand-non-latin-body-font-style; - }); + .sand-font(@sand-body-font-family; @sand-non-latin-font-family-light); .enact-locale-line-height(@sand-body-line-height; @sand-tallglyph-body-line-height); @@ -263,11 +258,7 @@ } .sand-large-button-text() { - .sand-font(@sand-button-font-family; @sand-non-latin-button-font-family; { - font-size: @sand-non-latin-button-large-font-size; - font-style: @sand-non-latin-button-font-style; - font-weight: @sand-non-latin-button-font-weight; - }); + .sand-font(@sand-button-font-family; @sand-non-latin-button-font-family); font-size: @sand-button-font-size; font-style: @sand-button-font-style; font-weight: @sand-button-font-weight; @@ -275,11 +266,7 @@ } .sand-small-button-text() { - .sand-font(@sand-button-small-font-family; @sand-non-latin-button-font-family; { - font-size: @sand-non-latin-button-small-font-size; - font-style: @sand-non-latin-button-small-font-style; - font-weight: @sand-non-latin-button-small-font-weight; - }); + .sand-font(@sand-button-small-font-family; @sand-non-latin-button-font-family); font-size: @sand-button-small-font-size; font-style: @sand-button-small-font-style; font-weight: @sand-button-small-font-weight; diff --git a/styles/variables.less b/styles/variables.less index d1b18aad68..d2bd733ca0 100644 --- a/styles/variables.less +++ b/styles/variables.less @@ -166,20 +166,11 @@ @sand-tallglyph-alert-title-font-size: @sand-alert-title-font-size; @sand-tallglyph-alert-notitle-content-font-size: @sand-alert-notitle-content-font-size; -@sand-non-latin-body-font-size: 54px; -@sand-non-latin-body-small-font-size: 48px; @sand-tallglyph-body-small-font-size: 48px; -@sand-non-latin-button-large-font-size: 72px; -@sand-non-latin-button-small-font-size: 54px; -@sand-non-latin-header-compact-title-font-size: @sand-header-compact-title-font-size; -@sand-non-latin-header-mini-title-font-size: @sand-header-mini-title-font-size; -@sand-non-latin-header-wizard-title-font-size: @sand-header-wizard-title-font-size; @sand-tallglyph-heading-subtitle-font-size: (@sand-heading-subtitle-font-size - 6px); @sand-tallglyph-heading-title-font-size: 114px; @sand-tallglyph-imageitem-caption-font-size: 54px; @sand-tallglyph-imageitem-label-font-size: 36px; -@sand-non-latin-input-fullscreen-title-font-size: @sand-input-fullscreen-title-font-size; -@sand-non-latin-input-overlay-title-font-size: @sand-input-overlay-title-font-size; // Other Font Properties // --------------------------------------- From d19cf80c28e3c97efd004fac4a93c1c972e2c758 Mon Sep 17 00:00:00 2001 From: Juwon Jeong Date: Fri, 11 Mar 2022 13:52:27 +0900 Subject: [PATCH 2/4] Remove unused code from mixins.less Enact-DCO-1.0-Signed-off-by: Juwon Jeong (juwon.jeong@lge.com) --- styles/mixins.less | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/styles/mixins.less b/styles/mixins.less index 0cb3a10b4a..fe09ac9cf5 100644 --- a/styles/mixins.less +++ b/styles/mixins.less @@ -219,20 +219,6 @@ // Text definitions // -.sand-alert-title() { - .sand-font(@sand-alert-font-family; @sand-non-latin-font-family-light); - .enact-locale-line-height(@sand-alert-line-height; @sand-tallglyph-body-line-height); - font-size: @sand-alert-title-font-size; - font-weight: @sand-alert-font-weight; -} - -.sand-alert-subtitle() { - .sand-font(@sand-alert-font-family; @sand-non-latin-font-family-light); - .enact-locale-line-height(@sand-alert-line-height); - font-size: @sand-alert-subtitle-font-size; - font-weight: @sand-alert-font-weight; -} - .sand-alert-overlay-content() { .sand-font(@sand-alert-font-family; @sand-non-latin-font-family-light); .enact-locale-line-height(@sand-alert-line-height; @sand-tallglyph-body-line-height); From c852a292e9d56ded7e31bf0c501977afc4653fc6 Mon Sep 17 00:00:00 2001 From: Juwon Jeong Date: Fri, 11 Mar 2022 14:01:10 +0900 Subject: [PATCH 3/4] Remove latinLanguageOverrides and nonLatinLanguageOverrides Enact-DCO-1.0-Signed-off-by: Juwon Jeong (juwon.jeong@lge.com) --- ThemeDecorator/ThemeDecorator.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/ThemeDecorator/ThemeDecorator.js b/ThemeDecorator/ThemeDecorator.js index 264de4fca2..3fd6c8da20 100644 --- a/ThemeDecorator/ThemeDecorator.js +++ b/ThemeDecorator/ThemeDecorator.js @@ -188,13 +188,7 @@ const ThemeDecorator = hoc(defaultConfig, (config, Wrapped) => { // font stylesheet when the locale changes App = I18nDecorator( { - ...i18n, - // We use the latin fonts (with non-Latin fallback) for these languages (even though - // their scripts are non-latin) - latinLanguageOverrides: ['ko', 'ha', 'el', 'bg', 'mk', 'mn', 'ru', 'uk', 'kk'], - // We use the non-latin fonts for these languages (even though their scripts are - // technically considered latin) - nonLatinLanguageOverrides: ['en-JP'] + ...i18n }, I18nFontDecorator( App From 2c0e01f7e2ac69766394d2351aa006934b9957f6 Mon Sep 17 00:00:00 2001 From: Juwon Jeong Date: Fri, 11 Mar 2022 16:41:01 +0900 Subject: [PATCH 4/4] Fix minor typo Enact-DCO-1.0-Signed-off-by: Juwon Jeong (juwon.jeong@lge.com) --- styles/internal/fonts.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/styles/internal/fonts.less b/styles/internal/fonts.less index f71e6da0d8..8fa411c37a 100644 --- a/styles/internal/fonts.less +++ b/styles/internal/fonts.less @@ -60,7 +60,7 @@ th: local("LG Smart UI AR HE TH") normal 300 600 700; zh-HK: local("LG Smart UI TC") normal 300 600 700; zh-TW: local("LG Smart UI TC") normal 300 600 700; // same as `zh-HK` - + // DEV NOTE: This is the closest proximity to a collection of unit tests that we have to test this system. // name: local("name"); // nameRepeat: local("name"), local("name2");