【发布时间】:2018-01-23 18:34:06
【问题描述】:
我正在使用 Angular 4 和 ngx-translate。我有一个多语言应用程序,我想为其中一种语言使用特殊字体。
这是我的 html 的一部分:
<ngx-datatable-column prop="title">
<ng-template let-column="column" let-sort="sortFn" ngx-datatable-header-template>
<span (click)="sort()" class="font">{{'IncomingTable.Title' | translate}}</span>
</ng-template>
<ng-template let-value="value" let-row="row" ngx-datatable-cell-template>
<a (click)="showViewForm(row);showView=true;showIncomingTable=false">{{value}} </a>
</ng-template>
这是scss:
@font-face {
font-family: 'IRANSansWeb_Medium';
src: url($IRANSansWeb_Medium_woff_path) format('woff'),
url($IRANSansWeb_Medium_woff2_path) format('woff2');
font-weight: normal;
font-style: normal;
}
.font{
font-family:'IRANSansWeb_Medium';
}
我有两种语言,我只想将此字体系列用于一种语言!我该怎么办?
【问题讨论】:
标签: angular typescript fonts ngx-translate