Merge pull request #894 from pdvyas/local-font-printformat

[WIP] embed font-face css and use noto sans from local assets
This commit is contained in:
Rushabh Mehta 2014-10-22 17:23:08 +05:30
commit 7b239ebd33
4 changed files with 13 additions and 1 deletions

Binary file not shown.

Binary file not shown.

View file

@ -1,4 +1,15 @@
@import url(https://fonts.googleapis.com/css?family=Noto+Sans:400,700);
@font-face {
font-family: 'Noto Sans';
font-style: normal;
font-weight: 400;
src: local('Noto Sans'), local('NotoSans'), url({{ frappe.get_url("/assets/frappe/css/font/notosans-400.ttf") }}) format('truetype');
}
@font-face {
font-family: 'Noto Sans';
font-style: normal;
font-weight: 700;
src: local('Noto Sans Bold'), local('NotoSans-Bold'), url({{ frappe.get_url("/assets/frappe/css/font/notosans-700.ttf")}}) format('truetype');
}
@media screen {
.print-format-gutter {

View file

@ -47,6 +47,7 @@ def get_allowed_functions_for_jenv():
# make available limited methods of frappe
"frappe": {
"_": frappe._,
"get_url": frappe.utils.get_url,
"format_value": frappe.format_value,
"format_date": frappe.utils.data.global_date_format,
"form_dict": frappe.local.form_dict,