DeusExMachina Posted August 27, 2013 Report Posted August 27, 2013 Hello!Please give me step by step algorythm to create Custom button renderer (to draw two lines text in button Caption) and please tell me how to use new Unicode rendering. Included DejaVu font contains Cyrrilic symbols (I guess not). How I can use them or include them into engine? Thanks
Joel Bodenmann Posted August 27, 2013 Report Posted August 27, 2013 The GWIN documentation mentions what steps need to be done for a custom render routine. You can also find a thread with sample code here.You can find all the required information about the widget in the GHandle:typedef struct GWindowObject { #if GWIN_NEED_WINDOWMANAGER // This MUST be the first member of the struct gfxQueueASyncItem wmq; // @< The next window (for the window manager) #endif const struct gwinVMT *vmt; // @< The VMT for this GWIN coord_t x, y; // @< Screen relative position coord_t width, height; // @< Dimensions of this window color_t color, bgcolor; // @< The current drawing colors uint16_t flags; // @< Window flags (the meaning is private to the GWIN class) #if GDISP_NEED_TEXT font_t font; // @< The current font #endif} GWindowObject, * GHandle;I'm going to prepare an example showing how to use cyrillic fonts within the following days.~ Tectu
Joel Bodenmann Posted August 28, 2013 Report Posted August 28, 2013 I just found time to add a very small step-by-step guide to the font documentation. I hope that this helps for the meantime.Please let me know about any upcoming problems.~ Tectu
DeusExMachina Posted August 31, 2013 Author Report Posted August 31, 2013 Hello!I tried step by step guide but without effect (I got last version from bitbucket). I have to modify GDISP_USE_CUSTOM_FONT define and include generated DroidSans10.c instead of userfont.h. But text renders blank...Could you, please, send me a demo project with Cyrillic fonts?
Joel Bodenmann Posted September 1, 2013 Report Posted September 1, 2013 Can you please describe what exactly you did? There happened some real life stuff and I won't be able to put together a full tutorial before wednesday.~ Tectu
Joel Bodenmann Posted September 15, 2013 Report Posted September 15, 2013 I've added a full example using cyrillic fonts to the repository. You can find it in /demos/modules/gdisp/gdisp_fonts_cyrillic. I added some more documentation about how to use the font converter etc.~ Tectu
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