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

페이지 정보

yadolee 루루아빠 2,757 2015.10.27 00:57:58

평점

  • 평점 : 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>
추천인
  • 추천해 주세요
yadolee
6
루루아빠 - 회원등급 : 최고관리자 - 포인트 : 1,332,582
레벨 100
경험치 1,487,820

Progress Bar 9.4%

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

댓글

첫 번째 댓글을 남겨 주세요

Total 7622639 페이지

제목 글쓴이 날짜 조회 추천
그누•영카트  🏆 영카트 5.4.1.2 shadow2fox 2019.12.10 2,432 0
그누•영카트  댓글+2🏆 그누보드 5.4.4.5 shadow2fox 2021.01.09 2,431 2
이윰  댓글+4🏆 태그 앞과 뒤 공백 제거하기 shadow2fox 2019.06.25 2,430 2
에디터  댓글+1🏆 SmartEditor2 포토 업로더 모바일에서 사진 순서 정렬하기 shadow2fox 2020.04.05 2,426 1
그누•영카트  🏆 그누보드 5.2.6 패치 루루아빠 2017.01.20 2,420 0
그누•영카트  🏆 영카트 5.3.2.8 shadow2fox 2019.03.19 2,419 0
그누•영카트  🏆 영카트 5.3.1.8 패치 shadow2fox 2018.10.15 2,417 0
이윰  🏆 Eyoom Builder 1.3.1 패치 루루아빠 2017.11.21 2,404 0
제로  🏆 💾 원하는 곳에 카테고리 뿌려주기(메뉴로 활용 가능) 루루아빠 2005.07.08 2,404 0
이윰  댓글+1🏆 PHP 8.x Fatal error : 중괄호 사용으로 인한 json.class.php 오류 shadow2fox 2021.02.17 2,402 1
에디터  댓글+1🏆 SmartEditor2 주소 자동 링크 기능 끄기 shadow2fox 2020.04.06 2,400 1
그누•영카트  🏆 영카트 5.4.2.3 shadow2fox 2020.03.14 2,392 0
그누•영카트  댓글+2🏆 그누보드 5.4.4.7.1 shadow2fox 2021.01.14 2,382 2
그누•영카트  🏆 영카트 5.3.2.2 shadow2fox 2018.12.18 2,377 0
이윰  🏆 내글반응 내용 추출 쌍 따옴표가 &#034;로 표시되는 문제 해결하기 shadow2fox 2018.06.18 2,373 0
이윰  댓글+2🏆 작성글 날림 방지하기 shadow2fox 2018.07.04 2,371 0
이윰  댓글+4🏆 다중 태그 입력 올바르게 shadow2fox 2021.03.12 2,366 2
그누•영카트  🏆 영카트 5.3.2.1 패치 shadow2fox 2018.12.11 2,365 0
그누•영카트  🏆 영카트 5.3.1.7 패치 shadow2fox 2018.09.18 2,364 0
제로  🏆 비회원은 회원정보 보지 못하게 루루아빠 2005.07.04 2,358 0