Commit b39f49ae authored by Sven Franck's avatar Sven Franck Committed by Tristan Cavelier

erp5_font: use pdf css file to remove unneeded font formats in wkhtmltopdf conversion

Separate css files for embedding during wkhtmltopdf pdf-conversion. only use ttf format to reduce payload.

/reviewed-on !690
parent b2a2a413
/*
Generated by Font Squirrel (http://www.fontsquirrel.com) on February 25, 2016
==============================
SIL Open Font License v1.10
This license can also be found at this permalink: https://www.fontsquirrel.com/license/eb-garamond
Copyright (c) 2010, 2011 Georg Duffner (http://www.georgduffner.at)
==============================
*/
@font-face {
font-family: 'Garamond';
src: url('eb-garamond/eb-garamond-regular-12.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Garamond';
src: url('eb-garamond/eb-garamond-italic-12.ttf') format('truetype');
font-weight: normal;
font-style: italic;
}
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>eb-garamond.pdf.css</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/css</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>eb-garamond.pdf.css</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>font-awesome.custom.pdf.css</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/css</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>font-awesome.custom.css</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>font-awesome.pdf.css</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/css</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>font-awesome.pdf.css</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
/*
Generated by Font Squirrel (http://www.fontsquirrel.com) on February 25, 2016
==============================
SIL Open Font License v1.10
Copyright 1989, 1991 Adobe Systems Incorporated. All rights reserved.
Utopia is either a registered trademark or trademark of Adobe Systems
Incorporated in the United States and/or other countries. Used under
license.
Copyright 2006 Han The Thanh, Vntopia font family, http://vntex.sf.net
Copyright (c) 2008-2012, Andrey V. Panov (panov@canopus.iacp.dvo.ru),
with Reserved Font Name Heuristica.
==============================
*/
@font-face {
font-family: 'Heuristica';
src: url('heuristica/heuristica-regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Heuristica';
src: url('heuristica/heuristica-italic.ttf') format('truetype');
font-weight: normal;
font-style: italic;
}
@font-face {
font-family: 'Heuristica';
src: url('heuristica/heuristica-bold.ttf') format('truetype');
font-weight: bold;
font-style: normal;
}
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>heuristica.pdf.css</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/css</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>heuristica.pdf.css</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
/*
Generated by Font Squirrel (http://www.fontsquirrel.com) on February 25, 2016
==============================
SIL Open Font License v1.10
Copyright (c) 2010-2014, Łukasz Dziedzic (dziedzic@typoland.com),
with Reserved Font Name Lato.
==============================
*/
@font-face {
font-family: 'Lato';
src: url('lato/lato-regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Lato';
src: url('lato/lato-light.ttf') format('truetype');
font-weight: 100;
font-style: normal;
}
@font-face {
font-family: 'Lato';
src: url('lato/lato-italic.ttf') format('truetype');
font-weight: normal;
font-style: italic;
}
@font-face {
font-family: 'Lato';
src: url('lato/lato-bold.ttf') format('truetype');
font-weight: bold;
font-style: normal;
}
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>lato.pdf.css</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/css</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>lato.pdf.css</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
/*
* Noto Sans SC (Chinese Simplified) http://www.google.com/fonts/earlyaccess
XXX missing .ttf required for wkhtmltopdf
*/
@font-face {
font-family: 'Noto Sans Sc';
src: url('noto-sans-cjk-sc/noto-sans-cjk-sc-regular.otf') format('otf');
font-weight: 400;
font-style: normal;
}
@font-face {
font-family: 'Noto Sans Sc';
src: url('noto-sans-cjk-sc/noto-sans-cjk-sc-thin.otf') format('otf');
font-weight: 100;
font-style: normal;
}
@font-face {
font-family: 'Noto Sans Sc';
src: url('noto-sans-cjk-sc/noto-sans-cjk-sc-bold.otf') format('otf');
font-weight: 700;
font-style: normal;
}
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>noto-sans-cjk-sc.pdf.css</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/css</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>noto-san-cjk-sc.pdf.css</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
/*
Generated by Font Squirrel (http://www.fontsquirrel.com) on February 25, 2016
==============================
Apache License v2.00
Copyright 2012 Google Inc. All Rights Reserved.
==============================
*/
@font-face {
font-family: 'Noto Serif';
src: url('noto-serif/noto-serif-regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Noto Serif';
src: url('noto-serif/noto-serif-italic.ttf') format('truetype');
font-weight: normal;
font-style: italic;
}
@font-face {
font-family: 'Noto Serif';
src: url('noto-serif/noto-serif-bold.ttf') format('truetype');
font-weight: bold;
font-style: normal;
}
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>noto-serif.pdf.css</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/css</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>noto-serif.pdf.css</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
/*
taken from https://github.com/FontFaceKit/open-sans
==============================
Apache License v2.00
Copyright 2012 Google Inc. All Rights Reserved.
==============================
*/
@font-face {
font-family: 'Open Sans';
src: url('open-sans/open-sans-regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Open Sans';
src: url('open-sans/open-sans-light.ttf') format('truetype');
font-weight: 100;
font-style: normal;
}
@font-face {
font-family: 'Open Sans';
src: url('open-sans/open-sans-italic.ttf') format('truetype');
font-weight: normal;
font-style: italic;
}
@font-face {
font-family: 'Open Sans';
src: url('open-sans/open-sans-bold.ttf') format('truetype');
font-weight: bold;
font-style: normal;
}
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>open-sans.pdf.css</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/css</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>open-sans.pdf.css</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
/* Generated by Font Squirrel (http://www.fontsquirrel.com) on February 25, 2016 */
@font-face {
font-family: 'Roboto Condensed';
src: url('roboto/roboto-condensed-regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Roboto Condensed';
src: url('roboto/roboto-condensed-light.ttf') format('truetype');
font-weight: 100;
font-style: normal;
}
@font-face {
font-family: 'Roboto Condensed';
src: url('roboto/roboto-condensed-italic.ttf') format('truetype');
font-weight: normal;
font-style: italic;
}
@font-face {
font-family: 'Roboto Condensed';
src: url('roboto/roboto-condensed-bold.ttf') format('truetype');
font-weight: bold;
font-style: normal;
}
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>roboto-condensed.pdf.css</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/css</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>roboto-condensed.pdf.css</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
/*
Generated by Font Squirrel (http://www.fontsquirrel.com) on February 25, 2016
==============================
Apache License v2.00
Copyright 2012 Google Inc. All Rights Reserved.
==============================
*/
@font-face {
font-family: 'Roboto';
src: url('roboto/roboto-regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Roboto';
src: url('roboto/roboto-light.ttf') format('truetype');
font-weight: 100;
font-style: normal;
}
@font-face {
font-family: 'Roboto';
src: url('roboto/roboto-italic.ttf') format('truetype');
font-weight: normal;
font-style: italic;
}
@font-face {
font-family: 'Roboto';
src: url('roboto/roboto-bold.ttf') format('truetype');
font-weight: bold;
font-style: normal;
}
/*
Generated by Font Squirrel (http://www.fontsquirrel.com) on February 25, 2016
==============================
SIL Open Font License v1.10
Copyright 2014 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved
Font Name ‘Source’. All Rights Reserved. Source is a trademark of Adobe Systems
Incorporated in the United States and/or other countries.
==============================
*/
@font-face {
font-family: 'Source Serif Pro';
src: url('source-serif-pro/source-serif-pro-regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Source Serif Pro';
src: url('source-serif-pro/source-serif-pro-bold.ttf') format('truetype');
font-weight: bold;
font-style: normal;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment