[그누•영카트] 구글 웹폰트를 적용해보자

페이지 정보

루루아빠 2,453 2015.10.27 00:57

평점

  • 평점 : 0점 (0명 참여)

본문

'관리자 > 레이아웃 추가설정 > 추가 script, css' 에 아래 소스 중 선택하여 추가한다.

1. css import 방식

@import url(http://fonts.googleapis.com/earlyaccess/nanumgothic.css);
2. link import 방식

<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/earlyaccess/nanumgothic.css"> 
3. 웹폰트 로더 동기방식

<script src="//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>
4. 웹폰트 로더 비동기 로딩 방식

<script type="text/javascript">
  WebFontConfig = {
    custom: {
        families: ['Nanum Gothic'],
        urls: ['http://fonts.googleapis.com/earlyaccess/nanumgothic.css']
    }
  };
  (function() {
    var wf = document.createElement('script');
    wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
      '://ajax.googleapis.com/ajax/libs/webfont/1.5.18/webfont.js';
    wf.type = 'text/javascript';
    wf.async = 'true';
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(wf, s);
  })(); 
 </script>

문서 전체에 적용하기 위에 상기 소스 아래에 다음 스타일을 적용한다.

<style> 
body {  
 font-family: 'Nanum Gothic', sans-serif; 
        font-size: 12px;
      } 
</style>
추천인
  • 추천해 주세요
6
루루아빠 - 회원등급 : 최고관리자 - 포인트 : 1,290,461
레벨 96
경험치 1,388,222

Progress Bar 71%

- 가입일 : 2015-03-04 03:24:54
- 서명 : KNOW YOUR LIMITS BUT NEVER STOP TRYING TO EXCEED THEM !!
- 자기소개 : 루루의 자랑 루루아빠랍니다~~

댓글

첫 번째 댓글을 남겨 주세요

Total 7462538 페이지
제목 글쓴이 날짜 조회 추천
이윰  🏆 Eyoom Builder 1.3.16 패치 루루아빠 2018.03.12 2,220 0
그누•영카트  🏆 그누보드 5.2.0 패치 루루아빠 2016.07.25 2,220 0
그누•영카트  댓글+4🏆 📸 5.3.3.3 버전 에서 5.4.1 정식버전으로 패치 shadow2fox 2019.12.03 2,220 2
제로  댓글+1🏆 수정된 정보를 제대로 보여주기 루루아빠 2005.07.03 2,216 0
CSS  🏆 div 클래스에 :last-child css 스타일 적용하기 루루아빠 2016.03.15 2,216 0
그누•영카트  🏆 댓글에 달린 비밀 댓글을 원댓글 작성자에게도 보여주기 루루아빠 2016.01.30 2,204 0
이윰  🏆 이윰빌더 출석부 최신글 스킨 오늘의 랭킹으로만 나타내기 루루아빠 2018.02.03 2,195 0
이윰  🏆 Eyoom Builder 1.3.1 패치 루루아빠 2017.11.21 2,189 0
Bootstrap  🏆 모달창 오픈시 백그라운드(메인 화면) 스크롤 금지 최종 버전 루루아빠 2018.05.16 2,178 0
그누•영카트  🏆 게시판을 디바이스에 따라 보여주기 안보여주기 루루아빠 2015.11.04 2,173 0
이윰  🏆 Eyoom Builder 3.0.5 패치 shadow2fox 2018.09.04 2,173 0
제로  🏆 💾 원하는 곳에 카테고리 뿌려주기(메뉴로 활용 가능) 루루아빠 2005.07.08 2,167 0
그누•영카트  댓글+2🏆 그누보드 5.4.4.5 shadow2fox 2021.01.09 2,166 2
그누•영카트  🏆 그누보드 5.2.6 패치 루루아빠 2017.01.20 2,162 0
이윰  🏆 Eyoom Builder 3.0.3 - 패치에 문제가 있는 버전입니다. shadow2fox 2018.08.20 2,154 0
그누•영카트  🏆 영카트 5.3.2.1 패치 shadow2fox 2018.12.11 2,150 0
이윰  댓글+4🏆 태그 앞과 뒤 공백 제거하기 shadow2fox 2019.06.25 2,150 2
그누•영카트  🏆 그누보드 5.2.9.8.4 패치 루루아빠 2018.03.30 2,147 0
그누•영카트  🏆 영카트 5.3.1.8 패치 shadow2fox 2018.10.15 2,147 0
그누•영카트  🏆 영카트 5.3.1.5 패치 shadow2fox 2018.07.04 2,129 0