기타 > HTML > 나눔고딕 사용하기
Redjini WiKi
웹폰트 적용하기
css 방식
<link rel="stylesheet" href="http://fonts.googleapis.com/earlyaccess/nanumgothic.css">
css import 방식
@import url(http://fonts.googleapis.com/earlyaccess/nanumgothic.css);
웹폰트 로더 등록(등기방식)
<script src="http://ajax.googleapis.com/ajax/libs/webfont/1.4.10/webfont.js"></script>
<script type="text/javascript">
WebFont.load({
// For google fonts
google: {
families: ['Droid Sans', 'Droid Serif']
}
// For early access or custom font
custom: {
families: ['Nanum Gothic'],
urls: ['http://fonts.googleapis.com/earlyaccess/nanumgothic.css']
}
});
</script>
Mediawiki에서 나눔고딕 사용하기
extensions 에 HtmlSkinHead 추가
<?php
if ( ! defined( 'MEDIAWIKI' ) ) { die( ); }
$wgExtensionCredits['parserhook'][] = array(
'path' => __FILE__,
'name' => 'Acepro HtmlSkinHead',
'descriptionmsg' => 'html-skin-head-desc',
'version' => "0.0.1",
'author' => 'Acepro',
'url' => '',
);
// language files:
$wgHooks['BeforePageDisplay'][] ='onBeforePageDisplay';
function onBeforePageDisplay( OutputPage &$out, Skin &$skin ){
//Googole 웹폰트
$script = '<link rel="stylesheet" href="http://fonts.googleapis.com/earlyaccess/nanumgothic.css">';
$out->addHeadItem("webfont style", $script);
return true;
};
LocalSettins.php 수정
require_once "$IP/extensions/HtmlSkinHead/HtmlSkinHead.php";