From dc2edb4e5fb779b7c54f5e1472172e098ce2f8da Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Tue, 6 Jan 2015 21:36:13 +0000 Subject: [PATCH] Added local font file loading. Although I'm finding that only the Medium-weight Noto fonts will load that way. --- resources/report/css/typography.css | 48 +++++++++++++++++++---------- 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/resources/report/css/typography.css b/resources/report/css/typography.css index 5b5c0c44..2a8362fb 100644 --- a/resources/report/css/typography.css +++ b/resources/report/css/typography.css @@ -4,99 +4,115 @@ font-family: 'Roboto'; font-style: normal; font-weight: 300; - src: url('../fonts/Roboto-Light.ttf'); + src: local('Roboto'), + url('../fonts/Roboto-Light.ttf'); } @font-face { font-family: 'Roboto'; font-style: italic; font-weight: 300; - src: url('../fonts/Roboto-LightItalic.ttf'); + src: local('Roboto'), + url('../fonts/Roboto-LightItalic.ttf'); } @font-face { font-family: 'Roboto'; font-style: normal; font-weight: 400; - src: url('../fonts/Roboto-Regular.ttf'); + src: local('Roboto'), + url('../fonts/Roboto-Regular.ttf'); } @font-face { font-family: 'Roboto'; font-style: italic; font-weight: 400; - src: url('../fonts/Roboto-Italic.ttf'); + src: local('Roboto'), + url('../fonts/Roboto-Italic.ttf'); } @font-face { font-family: 'Roboto'; font-style: normal; font-weight: 500; - src: url('../fonts/Roboto-Medium.ttf'); + src: local('Roboto'), + url('../fonts/Roboto-Medium.ttf'); } @font-face { font-family: 'Roboto'; font-style: italic; font-weight: 500; - src: url('../fonts/Roboto-MediumItalic.ttf'); + src: local('Roboto'), + url('../fonts/Roboto-MediumItalic.ttf'); } @font-face { font-family: 'Roboto'; font-style: normal; font-weight: 700; - src: url('../fonts/Roboto-Bold.ttf'); + src: local('Roboto'), + url('../fonts/Roboto-Bold.ttf'); } @font-face { font-family: 'Roboto'; font-style: italic; font-weight: 700; - src: url('../fonts/Roboto-BoldItalic.ttf'); + src: local('Roboto'), + url('../fonts/Roboto-BoldItalic.ttf'); } /* Noto - Korean */ @font-face { font-family: 'Noto'; font-style: normal; font-weight: 300; - src: url('../fonts/NotoSansCJKkr-Light.otf'); + src: local('Noto Sans CJK KR Light'), + url('../fonts/NotoSansCJKkr-Light.otf'); } @font-face { font-family: 'Noto'; font-style: normal; font-weight: 400; - src: url('../fonts/NotoSansCJKkr-Regular.otf'); + src: local('Noto Sans CJK KR Regular'), + url('../fonts/NotoSansCJKkr-Regular.otf'); } @font-face { font-family: 'Noto'; font-style: normal; font-weight: 500; - src: url('../fonts/NotoSansCJKkr-Medium.otf'); + src: local('Noto Sans CJK KR Medium'), + url('../fonts/NotoSansCJKkr-Medium.otf'); } @font-face { font-family: 'Noto'; font-style: normal; font-weight: 700; - src: url('../fonts/NotoSansCJKkr-Bold.otf'); + src: local('Noto Sans CJK KR Bold'), + url('../fonts/NotoSansCJKkr-Bold.otf'); } /* Noto - Simplified Chinese */ @font-face { font-family: 'Noto'; font-style: normal; font-weight: 300; - src: url('../fonts/NotoSansCJKsc-Light.otf'); + src: local('Noto Sans CJK SC Light'), + url('../fonts/NotoSansCJKsc-Light.otf'); } @font-face { font-family: 'Noto'; font-style: normal; font-weight: 400; - src: url('../fonts/NotoSansCJKsc-Regular.otf'); + src: local('Noto Sans CJK SC Regular'), + url('../fonts/NotoSansCJKsc-Regular.otf'); } @font-face { font-family: 'Noto'; font-style: normal; font-weight: 500; - src: url('../fonts/NotoSansCJKsc-Medium.otf'); + src: local('Noto Sans CJK SC Medium'), + url('../fonts/NotoSansCJKsc-Medium.otf'); } @font-face { font-family: 'Noto'; font-style: normal; font-weight: 700; - src: url('../fonts/NotoSansCJKsc-Bold.otf'); + src: local('Noto Sans CJK SC Bold'), + url('../fonts/NotoSansCJKsc-Bold.otf'); } /* Typography */