jared.olson Posted October 20, 2017 Report Share Posted October 20, 2017 Hi, My company is working on a project using uGFX, in which we need to support European languages, such as Spanish, French, etc. Up until now, we have only implemented our application with English, using the DejaVu fonts included with uGFX by default. However, since the default DejaVu fonts only contain a limited character set to preserve space, we have had to convert our own DejaVu fonts with custom character filtering that includes the characters we need for the European languages. I was able to convert the fonts using the uGFX online font converter, add the .c files to the project, and display all of the characters that we need. However, the user fonts that I converted, despite being the same font, size, typeface, etc. as the default fonts, do not look the same as the default DejaVu fonts do. While the default fonts generally look very clean, straight, and uniform, as you would expect, the user fonts look jagged and uneven. I have attached a PDF I put together to illustrate this comparison. Has anyone else experienced issues like this? Is there something I am doing wrong or should be doing differently? Is there an issue with the online font converter that is causing it to render the fonts poorly? I uploaded the DejaVu .ttf files that came with uGFX, so I would surprised if it was an issue with the .ttf files I am using. Is there a different conversion tool I could use? Any help would be greatly appreciated! Thanks! jared.olson - Default Vs. User DejaVu Font Comparisons.pdf Link to comment Share on other sites More sharing options...
inmarket Posted October 20, 2017 Report Share Posted October 20, 2017 I don't know of anything that would cause this as all our fonts with the exception of the UI fonts have been created using that same tool. The UI fonts were handcrafted by us in bitmap format so that is why they didn't use the font converter. A few things to check... Check you are using the same version of DejaVu font. From memory our original ttf font versions are still in the gdisp/fonts folder. Mcufont supports multiple ways to encode a font and several different ways of optimising them. The way we built them is in a script called buildfonts.sh (I think) in that same directory. Note that script uses the command line font converter which can be found in both source and binary forms in the ugfx tools directory. The command line version contains features we have not exposed through the web interface. Internally the web interface uses the same binary. After you have tried the above options it could be that the ttf fonts in our repository have been corrupted. It can happen with win32 git where it tries to do incorrect newline conversions. In that case search the internet and find new versions of the ttf. Note: due to font versioning it may not be exactly the font we used. I hope that helps. Link to comment Share on other sites More sharing options...
jared.olson Posted November 7, 2017 Author Report Share Posted November 7, 2017 Hi inmarket, Thanks for the tips. After experimenting with all of your suggestions and other ideas to no avail, a solution that we finally found was converting fonts in a Linux environment using the Linux binary. This produced C files that were 100% identical to the default fonts. Why we were unable to achieve that with the online converter and the Windows binary I do not know, but the Linux binary worked great and due to time constraints we have had to just run with that for now. Thanks again! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now