www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

fonts.less (2322B)


      1 @font-folder: "fonts";
      2 @use-eot: true;
      3 @use-ttf: true;
      4 @use-woff: true;
      5 @use-woff2: true;
      6 
      7 .use-eot(@family, @family-suffix) when (@use-eot = true) {
      8     src: url('@{font-folder}/KaTeX_@{family}-@{family-suffix}.eot');
      9     src+: url('@{font-folder}/KaTeX_@{family}-@{family-suffix}.eot#iefix') format('embedded-opentype')
     10 }
     11 
     12 .use-woff2(@family, @family-suffix) when (@use-woff2 = true) {
     13     src+: url('@{font-folder}/KaTeX_@{family}-@{family-suffix}.woff2') format('woff2')
     14 }
     15 
     16 .use-woff(@family, @family-suffix) when (@use-woff = true) {
     17     src+: url('@{font-folder}/KaTeX_@{family}-@{family-suffix}.woff') format('woff')
     18 }
     19 
     20 .use-ttf(@family, @family-suffix) when (@use-ttf = true) {
     21     src+: url('@{font-folder}/KaTeX_@{family}-@{family-suffix}.ttf') format('truetype')
     22 }
     23 
     24 .generate-suffix(@weight, @style) when (@weight = normal) and (@style = normal) {
     25     @suffix: 'Regular';
     26 }
     27 .generate-suffix(@weight, @style) when (@weight = normal) and (@style = italic) {
     28     @suffix: 'Italic';
     29 }
     30 .generate-suffix(@weight, @style) when (@weight = bold) and (@style = normal) {
     31     @suffix: 'Bold';
     32 }
     33 .generate-suffix(@weight, @style) when (@weight = bold) and (@style = italic) {
     34     @suffix: 'BoldItalic';
     35 }
     36 
     37 .font-face(@family, @weight, @style) {
     38     .generate-suffix(@weight, @style);
     39     @font-face {
     40         font-family: 'KaTeX_@{family}';
     41         .use-eot(@family, @suffix);
     42         .use-woff2(@family, @suffix);
     43         .use-woff(@family, @suffix);
     44         .use-ttf(@family, @suffix);
     45         font-weight: @weight;
     46         font-style: @style;
     47     }
     48 }
     49 
     50 .font-face('AMS', normal, normal);
     51 .font-face('Caligraphic', bold, normal);
     52 .font-face('Caligraphic', normal, normal);
     53 .font-face('Fraktur', bold, normal);
     54 .font-face('Fraktur', normal, normal);
     55 .font-face('Main', bold, normal);
     56 .font-face('Main', normal, italic);
     57 .font-face('Main', normal, normal);
     58 // .font-face('Math', bold, italic);
     59 .font-face('Math', normal, italic);
     60 // .font-face('Math', normal, normal);
     61 // .font-face('SansSerif', bold, normal);
     62 // .font-face('SansSerif', normal, italic);
     63 .font-face('SansSerif', normal, normal);
     64 .font-face('Script', normal, normal);
     65 .font-face('Size1', normal, normal);
     66 .font-face('Size2', normal, normal);
     67 .font-face('Size3', normal, normal);
     68 .font-face('Size4', normal, normal);
     69 .font-face('Typewriter', normal, normal);