forked from aquavitae/docker-weasyprint
-
Notifications
You must be signed in to change notification settings - Fork 14
/
fonts.py
39 lines (38 loc) · 1.15 KB
/
fonts.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from weasyprint import CSS
from weasyprint.text.fonts import FontConfiguration
def css_for_extra_fonts():
font_config = FontConfiguration()
return CSS(string='''
@font-face {
font-family: 'BC Sans Regular';
src: local('BCSans-Regular');
}
@font-face {
font-family: 'BC Sans Bold';
src: local('BCSans-Bold');
}
@font-face {
font-family: 'BC Sans Light';
src: local('BCSans-Light');
}
@font-face {
font-family: 'BC Sans Bold Italic';
src: local('BCSans-BoldItalic');
}
@font-face {
font-family: 'BC Sans Italic';
src: local('BCSans-Italic');
}
@font-face {
font-family: 'BC Sans Light Italic';
src: local('BCSans-LightItalic');
}
@font-face {
font-family: 'Noto Sans Light';
src: local('NotoSans-Light');
}
@font-face {
font-family: 'Noto Sans Light Italic';
src: local('NotoSans-LightItalic');
}
''', font_config=font_config), font_config