Change fonts from DejaVu to Noto Sans Regular
This commit is contained in:
parent
28df59e55f
commit
cd206988ac
BIN
DejaVuSans.ttf
Normal file
BIN
DejaVuSans.ttf
Normal file
Binary file not shown.
BIN
NotoSans-Regular.ttf
Normal file
BIN
NotoSans-Regular.ttf
Normal file
Binary file not shown.
Binary file not shown.
@ -99,11 +99,11 @@ class PrintView(View):
|
||||
order_products = OrderProduct.objects.filter(order=order_num)
|
||||
|
||||
buffer = io.BytesIO()
|
||||
pdfmetrics.registerFont(TTFont('DejaVuSans', 'DejaVuSans.ttf'))
|
||||
pdfmetrics.registerFont(TTFont('NotoSans-Regular', 'NotoSans-Regular.ttf'))
|
||||
p = canvas.Canvas(buffer, pagesize=A4)
|
||||
p.setFont("DejaVuSans", 18)
|
||||
p.setFont("NotoSans-Regular", 18)
|
||||
self.obj_writer(p, [240, 800], "ΠΑΡΑΓΓΕΛΙΑ #{}".format(order_data.id))
|
||||
p.setFont("DejaVuSans", 12)
|
||||
p.setFont("NotoSans-Regular", 12)
|
||||
self.obj_writer(p, [40, 770], "Κατάσταση:")
|
||||
self.obj_writer(p, [220, 770], "{}".format(order_data.order_status))
|
||||
self.obj_writer(p, [40, 750], "Πελάτης:")
|
||||
@ -134,10 +134,10 @@ class PrintView(View):
|
||||
y = 650
|
||||
y = self.obj_writer(p, [220, y], "{}".format(order_data.order_info))
|
||||
y -= 15
|
||||
p.setFont("DejaVuSans", 16)
|
||||
p.setFont("NotoSans-Regular", 16)
|
||||
y -= 15
|
||||
y = self.obj_writer(p, [170, y], "Προϊόντα Παραγγελίας")
|
||||
p.setFont("DejaVuSans", 10)
|
||||
p.setFont("NotoSans-Regular", 10)
|
||||
y -= 20
|
||||
for order_product in order_products:
|
||||
y = self.obj_writer(p, [40, y], "Προϊόν:")
|
||||
|
Loading…
x
Reference in New Issue
Block a user