Поправки в шрифтах
This commit is contained in:
@@ -53,7 +53,7 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.(ttf|eot|woff)$/,
|
test: /\.(ttf|eot|woff|woff2)$/,
|
||||||
loader: "file-loader",
|
loader: "file-loader",
|
||||||
options: {
|
options: {
|
||||||
prefix: "font/"
|
prefix: "font/"
|
||||||
|
|||||||
@@ -260,7 +260,7 @@ body, html, #app {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
font: normal 12pt Arial, Verdana, Sans-serif;
|
font: normal 12pt ReaderDefault;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
@@ -280,4 +280,10 @@ body, html, #app {
|
|||||||
src: url('fonts/roboto.woff') format('woff'),
|
src: url('fonts/roboto.woff') format('woff'),
|
||||||
url('fonts/roboto.ttf') format('truetype');
|
url('fonts/roboto.ttf') format('truetype');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Archivo';
|
||||||
|
src: url('fonts/archivo.woff2') format('woff2');
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -176,6 +176,7 @@ class TextPage extends Vue {
|
|||||||
let loaded = await Promise.all(this.fontList.map(font => document.fonts.check(font)));
|
let loaded = await Promise.all(this.fontList.map(font => document.fonts.check(font)));
|
||||||
if (loaded.some(r => !r)) {
|
if (loaded.some(r => !r)) {
|
||||||
loaded = await Promise.all(this.fontList.map(font => document.fonts.load(font)));
|
loaded = await Promise.all(this.fontList.map(font => document.fonts.load(font)));
|
||||||
|
await document.fonts.ready;
|
||||||
if (loaded.some(r => !r.length))
|
if (loaded.some(r => !r.length))
|
||||||
throw new Error('some font not loaded');
|
throw new Error('some font not loaded');
|
||||||
}
|
}
|
||||||
@@ -196,8 +197,8 @@ class TextPage extends Vue {
|
|||||||
this.backgroundColor = '#478355';
|
this.backgroundColor = '#478355';
|
||||||
this.fontStyle = '';// 'bold','italic'
|
this.fontStyle = '';// 'bold','italic'
|
||||||
this.fontSize = 33;// px
|
this.fontSize = 33;// px
|
||||||
this.fontName = 'XoloniumRegular';
|
this.fontName = 'Archivo';
|
||||||
this.fontCssUrl = 'https://fontlibrary.org/face/xolonium';
|
this.fontCssUrl = '';
|
||||||
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/archivo.woff2
Normal file
BIN
client/components/fonts/archivo.woff2
Normal file
Binary file not shown.
Reference in New Issue
Block a user