BinaryKits.Zpl
BinaryKits.Zpl copied to clipboard
Viewer default fonts not displayed as expected
I'm currently hosting dockerized Viewer from arm mac and default font seem to be wrong for me.
Docker image it self only contains dejavu font in usr/shared/font
Right, it is not 100% matching. Same on our viewer online https://binarykits-zpl-viewer.azurewebsites.net/ (Examle 9)
The default fontface is Helvetica Narrow (Semi-Condensed) Bold for font 0
, and DejaVu Sans Mono for all others:
https://github.com/BinaryKits/BinaryKits.Zpl/blob/8381d676916a820ac80cd819152b57acf63107e6/src/BinaryKits.Zpl.Viewer/ElementDrawers/DrawerOptions.cs#L24-L32
I suspect the first of those may not be installed on the target system.
Of course, extracting the "Swiss 721" font from a Zebra printer and using that in your application will give a much better result:
Well each printer could use what ever font, and therefore is impossible to please every one. For example I'm currently working with honeywell/datamax printer, which has their own defaults.
What do you think is it possible to implement feature that enables to setup custom fonts from per environment.
for example for docker api could be something like
# docker-compose.yml
zpl-viewer:
image: yipingruan/binarykits-zpl:latest
ports:
- '40080:80'
environment:
FONT_0: ./../fonts/...ttf
FONT_A1: ./../fonts/DejaVuSansMono.ttf
I have zero experience with C# so this might sound that I'm just asking features, but I can try to help as much as I can, if it's needed.