뉴비코더
나는 코딩뉴비
뉴비코더
전체 방문자
오늘
어제
  • 분류 전체보기 (91)
    • 개발입문뉴비 - 국비지원 ( Front End ) (91)
      • html (26)
      • css (58)
      • javascript (6)
      • Library React.js (0)
    • FrontEnd ( Self-study ) (0)
      • html5, CSS3 (0)
      • Vanilla JS (0)
      • Clone Code (0)
    • BackEnd ( self-study ) (0)
      • Library Node.js (0)
      • Python (0)
      • Go (0)

블로그 메뉴

  • 홈
  • 방명록

공지사항

인기 글

태그

  • js 이벤트객체
  • Transition
  • 코딩진화
  • Margin
  • 웹개발
  • js 생성 함수
  • 웹개발입문
  • boxmodel
  • boxmodeling
  • webfont
  • css3
  • parseInt
  • position
  • 가상클래스
  • js event object
  • HTML
  • UL
  • ol
  • transform
  • js event
  • 클론코딩
  • 마크업
  • 하이퍼링크
  • 국비지원
  • psuedo-class
  • JavaScript
  • HTML5
  • Javascript 배열
  • padding
  • 프론트엔드

최근 댓글

최근 글

티스토리

hELLO · Designed By 정상우.
뉴비코더

나는 코딩뉴비

[2021/12/29]국비지원 CSS3 9-(6) 웹폰트
개발입문뉴비 - 국비지원 ( Front End )/css

[2021/12/29]국비지원 CSS3 9-(6) 웹폰트

2022. 2. 1. 05:41

 

 

      • 배포 기준
        • 유료
          • DaFont - Download fonts
             

            DaFont - Download fonts

             

            www.dafont.com

        • 무료 ( 상업적 사용 가능 여부 및 저작권 확인 중요 )
          • 전체 안심글꼴 - 무료폰트(목록) | 공유 마당 (copyright.or.kr)
             

            무료폰트(목록) | 공유 마당

             

            gongu.copyright.or.kr

          • 눈누 (noonnu.cc)
             

            눈누

            상업용 무료한글폰트 사이트

            noonnu.cc

          • Browse Fonts - Google Fonts
             

            Google Fonts

            Making the web more beautiful, fast, and open through great typography

            fonts.google.com

      • 확장자
        • otf
        • ttf
        • woff 
        • 기타
          • woff2 : Chromium 베이스에서만 지원 ( Chrome, 불여우, 오페라 )
          • eot : 현재는 故pro가 되신 IE의 버전 8 이하에서 지원
          • iconfont ( 유료, 무료 혼재 ) - 담임강사는 이 거 쓰는 법 안 가르쳐줌 ( 독학 )
            • Free Icon Font & SVG Icons | IcoFont
               

              Free Icon Font & SVG Icons | IcoFont

               

              icofont.com

              •  
          • Iconify
             

            Iconify

            Thousands of icons, one unified framework.

            iconify.design

          • Hosting Font Awesome Yourself | Font Awesome
             

            Font Awesome

            The world’s most popular and easiest to use icon set just got an upgrade. More icons. More styles. More Options.

            fontawesome.com

 

  • 소환 위치
    • 시스템 : windows, Mac, Linux 등 Local에 설치되어 내가 볼 때만 소환
    • 웹서버 : 내 컴퓨터엔 없지만 웹을 통해서 소환 가능

 


 

웹서버를 통해 소환한 폰트 = 웹폰트

  • html에서 바로 불러오기 : link href = "웹 상의 경로"
  • 설치된 폰트를 불러오기 : @font-face { font-family : 파일명, 또는 임의; src : url( 설치 경로 ); }
  • css로 불러오기 : @import url( 웹 상의 경로 )


추천되는 방식 : link href or @import url()
@font-face 는 서버에서 폰트가 차지하는 용량이 커질 가능성이 높음

 

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>@font-face 웹폰트</title>
    <link href="https://fonts.googleapis.com/css2?family=Cute+Font&family=Licorice&family=Nanum+Gothic:wght@400;700;800&family=Noto+Sans+KR:wght@100;300;400;500;700;900&family=Pushster&display=swap" rel="stylesheet">

    <style type="text/css">
    @font-face {
        font-family: roboto;
        src: url(font/Roboto-Regular.ttf);
    }
    @font-face {
        font-family: kawaiifoodfont;
        src: url(font/KawaiiFoodFont.ttf);
    }
    @font-face {
        font-family: merrychristmas;
        src: url(font/MerryChristmasStar.ttf);
    }
    @font-face {
    font-family: establishRoomNo703;
    src: url(font/Room\ No.703.ttf);
    }  
        /* 구글폰트, 구글폰트 earlyaccess, 
            영문, 일문 다폰트(라이센스, 유료 확인 = 라이센스 무시하면 잣됨)
            한글폰트 눈누*/
        /* 저장사용 : @font-face = 꼭 웹클라우드에 동봉해야됨, 바로 불러오기 : link */
        .txt1{font-family: roboto;}
        .txt1_1{font-family:establishRoomNo703}
    @import url(//fonts.googleapis.com/earlyaccess/jejuhallasan.css);
        .txt2{font-family: 'Licorice', cursive;}
        .txt3{font-family: kawaiifoodfont;font-size: 30px;}
        .txt4{font-family: 'Nanum Gothic', sans-serif;}
        .txt4_1{font-family: 'Noto Sans KR', sans-serif;}
        .txt5{font-family: 'Jeju Hallasan', cursive;}
        .txt5_1{font-family: 'Cute Font', cursive;}
        .txt6{font-family: 'Pushster', cursive;}
        .txt7{font-family: merrychristmas;}
    </style>
</head>
<body>
    <div class="normal_text">ABCDE</div>
    <div class="txt1">ABCDEFGHIJKLMNOPQRSTUVWXYZ</div>
    <div class="txt1_1">ABCDEFGHIJKLMNOPQRSTUVWXYZ</div>
    <div class="txt2">ABCDEFGHIJKLMNOPQRSTUVWXYZ</div>
    <div class="txt3">abcdefghijklmnopqrstuvwxyz</div>
    <div class="txt3_1">abcdefghijklmnopqrstuvwxyz</div>
    <div class="txt4">나눔고딕이 적용 됩니다.</div>
    <div class="txt4_1">노토산스 적용 됩니다.</div>
    <div class="txt5">나눔고딕 아닙니다. 제주 한라산입니다.</div>
    <div class="txt5_1">우리말 좋은말 사용해요.</div>
    <div class="txt6">Merry Christmas</div>
    <div class="txt7">Merry Christmas</div>
</body>
</html>

 


 

결과물

저작자표시 비영리 변경금지 (새창열림)
    '개발입문뉴비 - 국비지원 ( Front End )/css' 카테고리의 다른 글
    • [2021/12/30]국비지원 CSS3 10-(1) 29일 과제
    • [2021/12/29]국비지원 CSS3 9-(7) transform, transform-origin
    • [2021/12/29]국비지원 CSS3 9-(5) 과제2
    • [2021/12/29]국비지원 CSS3 9-(4) psuedo-element, psuedo-class :first
    뉴비코더
    뉴비코더
    FrontEnd 지망 - 코딩뉴비를 위한(?), 뉴비에 의한, 뉴비의 블로그 - 코딩뉴비의 코딩 학습 기록 - 첨가물 : 약간의 불평/사족

    티스토리툴바