[How To] Jekyll Blog font ๋ฐ”๊พธ๊ธฐ

Updated:

  • google web font import

    ๊ตฌ๊ธ€ ์›น ํฐํŠธ๋ฅผ ์ ์šฉํ•˜๋ฉด ๋‹ค๋ฅธ ์‚ฌ๋žŒ์˜ ์ปดํ“จํ„ฐ์—์„œ๋„ ๋‚ด๊ฐ€ ์›ํ•˜๋Š” ํฐํŠธ๋ฅผ ์ ์šฉ์‹œํ‚ฌ ์ˆ˜ ์žˆ๋‹ค. ํฐํŠธ๋„ ๋””์ž์ธ ์š”์†Œ์ค‘ ํ•˜๋‚˜์ด๊ธฐ ๋•Œ๋ฌธ์—

    ๊ฐ€๋…์„ฑ์ด ์ข‹์€ ํฐํŠธ๋กœ ๋ณ€๊ฒฝํ•ด๋ณด์ž. ๊ตฌ๊ธ€ ์›น ํฐํŠธ๋กœ ์ ‘์†ํ•ด์„œ ์›ํ•˜๋Š” ํฐํŠธ๋ฅผ ๊ณจ๋ผ๋ณด์ž.

    ์•„์ง ํ•œ๊ธ€ํฐํŠธ๋Š” ๋งŽ์ด ์—†์ง€๋งŒ ๊ทธ ์ค‘์—์„œ ๋‚˜๋ˆ”๊ณ ๋”• ํฐํŠธ๋ฅผ ์ ์šฉํ•ด ๋ณด๊ฒ ๋‹ค.

    Import ๋งํฌ๋ฅผ ๋ณต์‚ฌํ•œ ํ›„ /assets/css/main.css ํŒŒ์ผ์„ ์—ด์–ด Import๋ฅผ ํ•ด์ฃผ์ž.

    ---
    # Only the main Sass file needs front matter (the dashes are enough)
    ---
      
    @charset "utf-8";
    @import url('https://fonts.googleapis.com/css?family=Nanum+Gothic');
    @import "minimal-mistakes/skins/air"; // skin
    @import "minimal-mistakes"; // main partials
    

    ์œ„ ๋งํฌ๋ฅผ ํ†ตํ•ด ๋‚˜๋ˆ”๊ณ ๋”• ํฐํŠธ๋ฅผ ๋‹ค์šด๋ฐ›์•„ ์˜ค๋Š” ๊ฒƒ์ด๋‹ค. ๊ทธ๋ž˜์„œ ๋‚˜๋ˆ”๊ณ ๋”•์ด ์—†๋Š” PC์—์„œ๋„ ์ „๋ถ€ ๊ฐ™์€ ํฐํŠธ๋กœ ๋ณผ ์ˆ˜ ์žˆ๋‹ค.

  • font ์ ์šฉ

    Import๋ฅผ ํ•ด์ฃผ์—ˆ์œผ๋‹ˆ /_sass/ minimal-mistakes/ _variables.scss ํŒŒ์ผ์„ ์—ด์–ด ์ ์šฉ์„ ํ•ด์ฃผ๋„๋ก ํ•˜์ž.

    /* system typefaces */
    $serif: Georgia, Times, serif !default; // ํฐํŠธ๋ณ€๊ฒฝ ์œ„์น˜
    $sans-serif: /*-apple-system, BlinkMacSystemFont, */"Nanum Gothic", "Malgun Gothic", "๋ง‘์€ ๊ณ ๋”•", "Roboto", "Segoe UI",
      "Helvetica Neue", "Lucida Grande", Arial, sans-serif !default;
    $monospace: Monaco, Consolas, "Lucida Console", monospace !default;
    

    3๋ฒˆ์งธ ์ค„์„ ๋ณด๋ฉด apple system์— ์ฃผ์„์„ ๋‹ฌ์•„๋†“์€ ๊ฒƒ์„ ๋ณผ ์ˆ˜ ์žˆ๋‹ค.

    ์ด ์ฝ”๋“œ๋Š” apple PC๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ ์‹œ์Šคํ…œ ํฐํŠธ๋ฅผ ์‚ฌ์šฉ ํ•˜๋ผ๋Š” ๋œป์ด๋‹ค.

    ํ•˜์ง€๋งŒ ๋‚˜๋Š” ๋ชจ๋“  PC์— ๋‚˜๋ˆ” ๊ณ ๋”• ํฐํŠธ๋ฅผ ์ ์šฉ ํ•  ๊ฒƒ ์ด๊ธฐ๋•Œ๋ฌธ์— ์ฃผ์„์ฒ˜๋ฆฌ๋ฅผ ํ•ด๋‘์—ˆ๋‹ค.

    ๊ทธ๋ฆฌ๊ณ  ๋’ค์— โ€œNanum Gothicโ€ ์„ ์ถ”๊ฐ€ํ•ด์ฃผ๋ฉด ๋œ๋‹ค. ๋งŒ์•ฝ ๋‚˜๋ˆ” ๊ณ ๋”• ํฐํŠธ๊ฐ€ ์ ์šฉ์ด ์•ˆ๋œ๋‹ค๋ฉด

    ๋ง‘์€ ๊ณ ๋”•์œผ๋กœ ์ ์šฉ์ด ๋œ๋‹ค. ๋ง‘์€ ๊ณ ๋”•์€ ์™ ๋งŒํ•œ PC์— ๊ธฐ๋ณธ ํฐํŠธ๋กœ ์žˆ๊ธฐ ๋•Œ๋ฌธ์— ๋”ฐ๋กœ Import ํ•  ํ•„์š”๊ฐ€ ์—†๋‹ค.

    ๋‚˜๋ˆ” ๊ณ ๋”•๋ฟ๋งŒ ์•„๋‹ˆ๋ผ ๋ชจ๋“  ๊ตฌ๊ธ€ ์›น ํฐํŠธ ์ ์šฉ ๋ฐฉ์‹์€ ๋™์ผํ•˜๋‹ˆ ๊ฐ์ž ๋งˆ์Œ์— ๋“œ๋Š” ํฐํŠธ๋กœ ์ ์šฉ์„ ํ•ด๋ณด์ž !


Leave a comment