$notos-font-path: "./fonts" !default; $fonts-list: ( NotoSansKR-Light: ( "Noto Sans KR", "Light", ), NotoSansKR-Regular: ( "Noto Sans KR", "Regular", ), NotoSansKR-Medium: ( "Noto Sans KR", "Medium", ), NotoSansKR-Bold: ( "Noto Sans KR", "Bold", ), ); $font-weight: ( Light: 300, Regular: 400, Medium: 500, Bold: 700, ); @mixin noto-sans-generate($font-file, $family, $weight, $style) { @font-face { font-family: $family; font-weight: $weight; font-style: $style; src: url("#{$notos-font-path}/#{$font-file}.eot"); src: url("#{$notos-font-path}/#{$font-file}.eot?#iefix") format("embedded-opentype"), url("#{$notos-font-path}/#{$font-file}.woff2") format("woff2"), url("#{$notos-font-path}/#{$font-file}.woff") format("woff"); } } @each $key, $val in $fonts-list { @include noto-sans-generate( $key, nth($val, 1), map-get($font-weight, nth($val, 2)), normal ); }