king2 Posted January 28, 2016 Report Posted January 28, 2016 Hello developers! uGFX uses converted fonts. If user will use several sizes of same font in application, this approach requires much space in firmware, one for each size.Did you tried to use direct embedding TTF to firmware? In some cases this can save space and make firmware size smaller, and will allow to use any font size!I found gdispScaleFont in gdisp_fonts.c file. Can I use it to reduce space required for fonts if I need same font with different sizes?Thanks!
inmarket Posted January 28, 2016 Report Posted January 28, 2016 Yes you can use that call to cheaply do scaled fonts. Note it just uses integer scaling so you get the normal pixel doubling artifacts.My experience is that doubling horizontally looks much better than doubling vertically. Note the UI1 and 2 fonts already have wide versions automatically included using this font scaling capability.The reason we don't directly embed true type fonts are multiple.. true type fonts require special curve drawing routines that are complex (large amounts of code) true type fonts are slow to draw they require large amounts of ram (for an embedded platform) they are generally bigger than our optimized fonts there may be IP and patent issues with the true type formatTheir only advantage is that they scale to multiple sizes easily.For these reasons we currently don't support true type fonts directly. We may add support in future but they will always be secondary and optional because they just don't perform as well in an embedded project.
king2 Posted January 28, 2016 Author Report Posted January 28, 2016 Thank you for answer!Indeed, because these reasons TTF engine is not best idea ever
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