besser fonts
This commit is contained in:
@@ -62,7 +62,9 @@ class HtmlTemplate:
|
||||
# convert HTML to PDF
|
||||
pisa_status = pisa.CreatePDF(
|
||||
source_html, # the HTML to convert
|
||||
dest=result_file) # file handle to recieve result
|
||||
path='test_data/templates/fonts',
|
||||
dest=result_file
|
||||
) # file handle to recieve result
|
||||
|
||||
# close output file
|
||||
result_file.close() # close output file
|
||||
|
||||
@@ -15,7 +15,7 @@ class DataObject:
|
||||
|
||||
|
||||
def parse_yaml_file(file_path):
|
||||
with open(file_path, 'r') as file:
|
||||
with open(file_path, 'r', encoding='utf-8') as file:
|
||||
return yaml.safe_load(file)
|
||||
|
||||
|
||||
|
||||
@@ -3,33 +3,33 @@
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: "Barlow Semi Condensed";
|
||||
src: url("test_data/templates/fonts/BarlowSemiCondensed-Regular.ttf");
|
||||
src: url("fonts/BarlowSemiCondensed-Regular.ttf");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Barlow Semi Condensed";
|
||||
src: url("test_data/templates/fonts/BarlowSemiCondensed-Light.ttf");
|
||||
src: url("fonts/BarlowSemiCondensed-Light.ttf");
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Barlow Semi Condensed";
|
||||
src: url("test_data/templates/fonts/BarlowSemiCondensed-LightItalic.ttf");
|
||||
src: url("fonts/BarlowSemiCondensed-LightItalic.ttf");
|
||||
font-style: italic;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Barlow Semi Condensed";
|
||||
src: url("test_data/templates/fonts/BarlowSemiCondensed-Bold.ttf");
|
||||
src: url("fonts/BarlowSemiCondensed-Bold.ttf");
|
||||
font-style: normal;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Barlow Semi Condensed";
|
||||
src: url("test_data/templates/fonts/BarlowSemiCondensed-BoldItalic.ttf");
|
||||
src: url("fonts/BarlowSemiCondensed-BoldItalic.ttf");
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
}
|
||||
@@ -166,9 +166,9 @@
|
||||
<table>
|
||||
<tr class="head underline">
|
||||
<th class="links" style="width: 55%">Aktivität</th>
|
||||
<th class="rechts"style="width: 15%">Anzahl</th>
|
||||
<th class="rechts"style="width: 15%">Einheit</th>
|
||||
<th class="rechts"style="width: 15%">Betrag</th>
|
||||
<th class="rechts" style="width: 15%">Anzahl</th>
|
||||
<th class="rechts" style="width: 15%">Einheit</th>
|
||||
<th class="rechts" style="width: 15%">Betrag</th>
|
||||
</tr>
|
||||
{% for position in invoice.Positions %}
|
||||
<tr class="positionen">
|
||||
|
||||
Reference in New Issue
Block a user