Blazor로 Google Fonts 테스트 웹 사이트 만들기

4225 단어 Blazor
Blazor에서 자유롭게 사용할 수 있는 Google Fonts에서 일본어 글씨체를 테스트하는 사이트를 만들고 싶습니다.
Google Fonts
https://fonts.google.com/
Google Foonts + 일본어
https://googlefonts.github.io/japanese/
Demo
샘플 코드

Google Fonts 가져오기


Blazor를 사용하여 Google Fonts를 가져오려면 index.html에 설명되어 있습니다.
EarlyAccess Edition은 linkタグ입니다.goole Fonts에서 제공하는 필요한 물건을 골라서 만들기@import.
wwwroot/index.html
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title>BlazorAppGoogleFonts</title>
    <base href="/" />
    <link href="css/bootstrap/bootstrap.min.css" rel="stylesheet" />
    <link href="css/site.css" rel="stylesheet" />

    <!--EarlyAccessフォント-->
    <link href="https://fonts.googleapis.com/earlyaccess/hannari.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/earlyaccess/nikukyu.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/earlyaccess/nicomoji.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/earlyaccess/kokoro.css" rel="stylesheet">
    <!--通常のフォント-->
    <style>
        @import url('https://fonts.googleapis.com/css?family=Kosugi|Kosugi+Maru|M+PLUS+1p:100,300,400,500,700,800,900|M+PLUS+Rounded+1c:100,300,400,500,700,800,900|Noto+Sans+JP:100,300,400,500,700,900|Noto+Serif+JP:200,300,400,500,600,700,900|Sawarabi+Gothic|Sawarabi+Mincho&display=swap');
    </style>
</head>

사용법


원하는 스타일font-family 또는 font-weight을 지정합니다.
<p style="font-family:Kosugi;font-weight:bold;">おはようございます</p>
비록 일본어의 글씨체는 매우 적지만, 나는 아주 잘 쓰고 싶다.

좋은 웹페이지 즐겨찾기