mirror of
https://github.com/braver/programmingfonts.git
synced 2024-10-07 10:33:58 +02:00
67 lines
1.0 KiB
Plaintext
Executable File
67 lines
1.0 KiB
Plaintext
Executable File
@root-path: '../resources';
|
|
|
|
|
|
.font (@name, @weight, @style, @file)
|
|
when (@weight = normal)
|
|
and (@style = normal) {
|
|
|
|
|
|
@font-path: '@{root-path}/@{file}';
|
|
|
|
@font-face {
|
|
font-family: @name;
|
|
font-weight: @weight;
|
|
font-style: @style;
|
|
src: url(@font-path);
|
|
}
|
|
|
|
}
|
|
|
|
.font (@name, @weight, @style, @file)
|
|
when (@weight = bold)
|
|
and (@style = normal) {
|
|
|
|
|
|
@font-path: '@{root-path}/@{file}';
|
|
|
|
@font-face {
|
|
font-family: @name;
|
|
font-weight: @weight;
|
|
font-style: @style;
|
|
src: url(@font-path);
|
|
}
|
|
|
|
}
|
|
|
|
.font (@name, @weight, @style, @file)
|
|
when (@weight = normal)
|
|
and (@style = italic) {
|
|
|
|
|
|
@font-path: '@{root-path}/@{file}';
|
|
|
|
@font-face {
|
|
font-family: @name;
|
|
font-weight: @weight;
|
|
font-style: @style;
|
|
src: url(@font-path);
|
|
}
|
|
|
|
}
|
|
|
|
.font (@name, @weight, @style, @file)
|
|
when (@weight = 'bold')
|
|
and (@style = 'italic') {
|
|
|
|
|
|
@font-path: '@{root-path}/@{file}';
|
|
|
|
@font-face {
|
|
font-family: @name;
|
|
font-weight: @weight;
|
|
font-style: @style;
|
|
src: url(@font-path);
|
|
}
|
|
|
|
}
|