2017-02-09 29 views

回答

0

我有同樣的問題@kyw。目前唯一的方法是在需要的地方重寫每個組件中的字體。

將在此之後更換了一些的字體組件:

html * { 
    font-family: "lato", sans-serif; 
    font-style: normal; 
    font-weight: 400; 
} 

希望有人可以給我們帶來更好的提示。

2

我發現最好的辦法是針對所有角材料2選擇如下:

body [class^='mat-'], body [class*=' mat-'] { 
    font-family: "lato"; 
} 

這是因爲角2個組件都有一類以「mat-」。

0

創建自己的SCSS文件並定義FONT-FAMILY這樣

@import '[email protected]/material/theming'; 
$custom-typography: mat-typography-config(
    $font-family: 'Lato' 
); 

@include mat-core($custom-typography); 

檢查了Typography Customization

相關問題