-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Find and Use Better Default Font #186
Comments
@riconeitzel recommends http://font.ubuntu.com/ if I see this correct, we are allowed to use it http://font.ubuntu.com/licence/ |
@sprankhub will you have a look here please? :) |
I just implemented this. I do not have any good news. The file size increases dramatically when using a custom font (e.g. from 5,2kB to 361kB). The problem is that by default, Zend includes the font into the PDF file, so that it can be viewed on every computer even if the font is not installed. It can be configured that it should not include the font (pass Fun fact: The Ubuntu font is even not installed on a default Ubuntu system :D I think 360kB is too much for a simple invoice PDF. @riconeitzel is there any font which can be considered save to use, because it is installed on nearly all computers? |
Arial … ? |
While I'm still fine with 360k … as long as it's not explodes to 1.5MB it's good, isn't it? |
The implementation can be found here: https://github.com/firegento/firegento-pdf/tree/ubuntu-font @Schrank what do you think, what should we do? |
Does the Invoice looks better? :) If yes, I would go with this as standard. We can change the "upload your own font" selectbox to Use: Ubuntu, Helvetica, Arial, ... and put a comment that with ubuntu the pdf will be 360kb vs 6kb |
Generating the PDF reveals that the font is embedded as ANSI. (CTRL+D in Adobe Acrobat > Fonts) Somewhere in \Zend_Pdf_Font::fontWithPath I think its going wrong when loading the default file. The Magento Standard file "LinLibertine" is embedded to the PDF as "IDENTIY-H", which to my knowledge reveals all chars this font has. Looking at a rendered PDF in magento standard and firegento PDF this seems to be the only difference. I might test the branch for the Ubuntu font to find out if that fixes the problem (altough a different font to use might cause more trouble ?) |
Unfortunately I don't have enough knowledge to follow you properly but this sounds amazing. If we can help you somehow, tell us - although our time is currently highly limited :-/ |
@pquerner I just updated the ubuntu-font branch (merged development into it), so feel free to test it. |
We use it, but when we have a customer with e.g. character š it will be displayed as 8. |
http://font.ubuntu.com/ |
We should find a better default font which is not as bad as Zend's Helvetica. We have to check if we are allowed to use it for this project. It should support regular/bold/italic font styles and should support a wide range of languages. We already had problems with the Slovenian as well as Chinese language.
The text was updated successfully, but these errors were encountered: