Commit 1cfeda5b authored by zlzleking's avatar zlzleking

webfont delivery method change, optimization

parent 6ec27b6b
......@@ -27,11 +27,13 @@ class LibertyHooks extends Hooks {
'options' => [
'기본값' => "default",
'본고딕' => "Noto Sans KR",
'스포카 한 산스' => "Spoqa Han Sans",
'나눔고딕' => "Nanum Gothic",
'나눔명조' => 'Nanum Myeongjo',
'독도' => 'Dokdo',
'개구쟁이' => 'Gaegu',
'KoPub돋움' => 'KoPub Dotum',
'한겨레결체' => 'Hankc',
'청소년체' => 'Youth',
'맑은 고딕' => 'Malgun Gothic'
],
'help-message' => 'liberty-pref-fonts-help'
......
......@@ -150,11 +150,6 @@ class SkinLiberty extends SkinTemplate {
'<link href="https://fonts.googleapis.com/css?family=Dokdo|Gaegu|Nanum+Gothic|Nanum+Gothic+Coding|Nanum+Myeongjo|Noto+Sans+KR&display=swap&subset=korean" rel="stylesheet">'
);
$out->addHeadItem(
'webfonts-kopub',
// @codingStandardsIgnoreLine
'<link rel="stylesheet" href="//cdn.jsdelivr.net/font-kopub/1.0/kopubdotum.css">'
);
// Only load AdSense JS is ads are enabled in site configuration
if ( !is_null( $wgLibertyAdSetting['client'] ) ) {
$out->addHeadItem(
......
/* 스포카 한 산스 */
@font-face {
font-family: 'Spoqa Han Sans';
font-weight: 700;
src: local('Spoqa Han Sans Bold'),
url('https://cdn.jsdelivr.net/gh/spoqa/spoqa-han-sans@01ff0283e4f36e159ffbf744b36e16ef742da6d8/Subset/SpoqaHanSans/SpoqaHanSansBold.woff2') format('woff2'),
url('https://cdn.jsdelivr.net/gh/spoqa/spoqa-han-sans@01ff0283e4f36e159ffbf744b36e16ef742da6d8/Subset/SpoqaHanSans/SpoqaHanSansBold.woff') format('woff'),
url('https://cdn.jsdelivr.net/gh/spoqa/spoqa-han-sans@01ff0283e4f36e159ffbf744b36e16ef742da6d8/Subset/SpoqaHanSans/SpoqaHanSansBold.ttf') format('truetype');
}
@font-face {
font-family: 'Spoqa Han Sans';
font-weight: 400;
src: local('Spoqa Han Sans Regular'),
url('https://cdn.jsdelivr.net/gh/spoqa/spoqa-han-sans@01ff0283e4f36e159ffbf744b36e16ef742da6d8/Subset/SpoqaHanSans/SpoqaHanSansRegular.woff2') format('woff2'),
url('https://cdn.jsdelivr.net/gh/spoqa/spoqa-han-sans@01ff0283e4f36e159ffbf744b36e16ef742da6d8/Subset/SpoqaHanSans/SpoqaHanSansRegular.woff') format('woff'),
url('https://cdn.jsdelivr.net/gh/spoqa/spoqa-han-sans@01ff0283e4f36e159ffbf744b36e16ef742da6d8/Subset/SpoqaHanSans/SpoqaHanSansRegular.ttf') format('truetype');
}
@font-face {
font-family: 'Spoqa Han Sans';
font-weight: 300;
src: local('Spoqa Han Sans Light'),
url('https://cdn.jsdelivr.net/gh/spoqa/spoqa-han-sans@01ff0283e4f36e159ffbf744b36e16ef742da6d8/Subset/SpoqaHanSans/SpoqaHanSansLight.woff2') format('woff2'),
url('https://cdn.jsdelivr.net/gh/spoqa/spoqa-han-sans@01ff0283e4f36e159ffbf744b36e16ef742da6d8/Subset/SpoqaHanSans/SpoqaHanSansLight.woff') format('woff'),
url('https://cdn.jsdelivr.net/gh/spoqa/spoqa-han-sans@01ff0283e4f36e159ffbf744b36e16ef742da6d8/Subset/SpoqaHanSans/SpoqaHanSansLight.ttf') format('truetype');
}
@font-face {
font-family: 'Spoqa Han Sans';
font-weight: 100;
src: local('Spoqa Han Sans Thin'),
url('https://cdn.jsdelivr.net/gh/spoqa/spoqa-han-sans@01ff0283e4f36e159ffbf744b36e16ef742da6d8/Subset/SpoqaHanSans/SpoqaHanSansThin.woff2') format('woff2'),
url('https://cdn.jsdelivr.net/gh/spoqa/spoqa-han-sans@01ff0283e4f36e159ffbf744b36e16ef742da6d8/Subset/SpoqaHanSans/SpoqaHanSansThin.woff') format('woff'),
url('https://cdn.jsdelivr.net/gh/spoqa/spoqa-han-sans@01ff0283e4f36e159ffbf744b36e16ef742da6d8/Subset/SpoqaHanSans/SpoqaHanSansThin.ttf') format('truetype');
}
/* 한겨레결체*/
@font-face {
font-family: 'Hankc';
font-style: normal;
font-weight: 400;
src: local('한겨레결체'),
url('//cdn.jsdelivr.net/korean-webfonts/1/corps/hani/Hankc/Hankc.woff2') format('woff2'), url('//cdn.jsdelivr.net/korean-webfonts/1/corps/hani/Hankc/Hankc.woff') format('woff');
}
/* 청소년체 */
@font-face {
font-family: 'Youth';
font-style: normal;
font-weight: 400;
src: local('청소년서체'),
url('//cdn.jsdelivr.net/korean-webfonts/1/orgs/othrs/kywa/Youth/Youth.woff2') format('woff2'), url('//cdn.jsdelivr.net/korean-webfonts/1/orgs/othrs/kywa/Youth/Youth.woff') format('woff');
}
\ No newline at end of file
......@@ -34,5 +34,5 @@
"liberty-pref-color-second-help": "사이트에서 보조로 사용할 색상을 정합니다.",
"liberty-pref-fonts": "사용하실 폰트를 선택하세요.",
"liberty-pref-fonts-helplabel": "설명",
"liberty-pref-fonts-help": "여기서 설정한 폰트는 사용자의 해당 폰트가 디바이스에 설치되었을 때만 적용됩니다. 다만 본고딕, 나눔고딕 등은 웹폰트로 로딩되어서 적용됩니다."
"liberty-pref-fonts-help": "선택하신 폰트는 웹폰트로 로드됩니다. 하지만 맑은 고딕은 사용자의 시스템에 설치되어 있어야 적용됩니다."
}
\ No newline at end of file
......@@ -40,6 +40,9 @@
"css/only-mw.css": {
"media": "all"
},
"css/webfont.css": {
"media" : "all"
},
"css/wiki-table.css": {
"media": "all"
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment