소스 검색

Добавил шрифт Avrile

Book Pauk 6 년 전
부모
커밋
bdf0388049
4개의 변경된 파일13개의 추가작업 그리고 2개의 파일을 삭제
  1. 6 0
      client/components/App.vue
  2. 7 2
      client/components/Reader/TextPage/TextPage.vue
  3. BIN
      client/components/fonts/avrile.ttf
  4. BIN
      client/components/fonts/avrile.woff

+ 6 - 0
client/components/App.vue

@@ -291,4 +291,10 @@ body, html, #app {
   src: url('fonts/rubik.woff2') format('woff2');
   src: url('fonts/rubik.woff2') format('woff2');
 }
 }
 
 
+@font-face {
+  font-family: 'Avrile';
+  src: url('fonts/avrile.woff') format('woff'),
+       url('fonts/avrile.ttf') format('truetype');
+}
+
 </style>
 </style>

+ 7 - 2
client/components/Reader/TextPage/TextPage.vue

@@ -101,10 +101,13 @@ class TextPage extends Vue {
         this.fontShifts = {//%
         this.fontShifts = {//%
             ReaderDefault: 0,
             ReaderDefault: 0,
             Roboto: 0,
             Roboto: 0,
-            OpenSans: 0
+            OpenSans: 0,
+            Archivo: 0,
+            Rubik: 0,
+            Avrile: -10,
         }
         }
         if (!this.fontShifts.hasOwnProperty(this.fontName))
         if (!this.fontShifts.hasOwnProperty(this.fontName))
-            this.fontShifts[this.fontName] = 0;
+            this.fontShifts[this.fontName] = this.fontVertShift;
         this.fontList = [];
         this.fontList = [];
         for (let fontName in this.fontShifts)
         for (let fontName in this.fontShifts)
             this.fontList.push(`12px ${fontName}`);
             this.fontList.push(`12px ${fontName}`);
@@ -234,6 +237,8 @@ class TextPage extends Vue {
         this.fontSize = 35;// px
         this.fontSize = 35;// px
         this.fontName = 'Archivo';
         this.fontName = 'Archivo';
         this.fontCssUrl = '';
         this.fontCssUrl = '';
+        this.fontVertShift = 0;
+
         this.lineInterval = 7;// px, межстрочный интервал
         this.lineInterval = 7;// px, межстрочный интервал
         this.textAlignJustify = true;// выравнивание по ширине
         this.textAlignJustify = true;// выравнивание по ширине
         this.p = 50;// px, отступ параграфа
         this.p = 50;// px, отступ параграфа

BIN
client/components/fonts/avrile.ttf


BIN
client/components/fonts/avrile.woff