Jump to content

jarekk

Members
  • Posts

    9
  • Joined

  • Last visited

Posts posted by jarekk

  1. On 10/20/2017 at 23:49, inmarket said:

     

    That is the thing about embedded programming - it is always a compromise between resources and the power of the provided interface.

    Any ideas that you (or anyone else) can provide on how we can offer the same functionality with less resource usage we would love to hear from you. Just create a new forum topic, we need all the help and ideas we can get. :)

     

    Well, that was the reason why I had to go back to uGui ( my setup takes 21.5kB without fonts ). I have STM32F429, but still having quite large functionality besides GUI I could not afford GWIN and GDISP was not enough.  So I am interested too how to scale down uGfx. 

    I can tell you how my current system works, so it may be some inspiration:

    -  There are 3 layers - GDISP ( equivalent),  the other two split GWIN functionality. One ( RENDER) is responsible just for rendering widgets, the other one (MESSAGES) for processing messages from inputs, touch screen etc.

    - It is posisble to use only first two - GDISP and RENDER. 

    - MESSAGES is used on demand - you put event there and it processes object hierarchy to trigger possible reaction ( in this particular system only callbacks are used). It is separated from other modules, just has access to their data.

    I have built my system around GDISP/RENDER only. This means really simple setup - I execute just  rendering widgets. When user touches button, I execute different render , periodically I update measurement data on display ( by updating manually widget texts). 

    It means more manual work, but for simple UI which have basically data outputs and simple selections it is enough.

  2. Hi,

    The original problem was here (generated code):

    resource_manager.h

    // Font indexes
    #define Unnamed 0
    #define Unnamed 1
    #define Unnamed 2
     

    resource_manager.c

    bool_t guiResourcesManagerInit(void)
    {
            size_t i;

            // Open fonts
            _fontsArray[0] = gdispOpenFont(Unnamed);
            _fontsArray[1] = gdispOpenFont(Unnamed);
            _fontsArray[2] = gdispOpenFont(Unnamed);

            return TRUE;
    }
     

    First, the names/font indexes were not unique. Second , gdispOpenFont () expects character string as argument - not number.

    I guess this will be my last comment for a while - I tried to scale down ugfx and it is much more then my previous choice. I have to live with only internal memory so the resources are precious. Especially that I have static gui which needs only simple widgets drawn ( without timers, messages, input etc. - just to update contents  on demand).

     

     

     

     

  3. Hi

    23 hours ago, Joel Bodenmann said:

    Hello @jarekk,

    Thank you for providing your feedback. We added everything to the ToDo list.

    You can either select the font item and hit F2 or double click it to rename. But we'll add Rename as an option to the context menu as well.

    Yes, that would be nice. I also recall that there were some issues with resource manager which wanted fonts by names. I fixed it manually, you could try yourself to generate sample code with new fonts and try if it compiles.

     

     

    23 hours ago, Joel Bodenmann said:

    Can you be more specific on this? Where did I/we mention two default fonts?

     

    You mentioned once that you crafted nice pixel fonts.  I could not use directly the config file generated from ugfx studio, and by default there are no fonts in the system.

    The resource manager , if cannot find fonts tries to give first from its repository , but there must be something. I have fixed it in my config file.

    23 hours ago, Joel Bodenmann said:

    I will look into why the label doesn't get a font assignment. Most likely that just got missed out in the code generator.

    Your widgets do not seem to have font as part of their internal data -  does it mean that you will havo to switch system fonts before creating these widgets ?

    And I guess - the idea is that multiple fonts at once ( well in different widgets) will be supported ?

     

     

     

     

     

  4. One more question

    Should it work in Win32  target ?

    I have managed to compile the generated code on Win32, but there is nothing on the display.

    The uGfx works ( I can e.g. draw shapes), but no text rendering.

    I hav looked at code generated:

        // ghLabel_3
        wi.g.show = TRUE;
        wi.g.x = 36;
        wi.g.y = 128;
        wi.g.width = 120;
        wi.g.height = 30;
        wi.g.parent = 0;
        wi.text = "Label";
        wi.customDraw = 0;
        wi.customParam = 0;
        wi.customStyle = 0;
        ghLabel_3 = gwinLabelCreate(0, &wi);

    There is no font selection ? Looks like not supported yet.

     

     

     

     

     

     

     

  5. Ok,

    I have used the font converter - this works nicely !!!!!!

    First three ordinary fonts, then the last one with anti-aliasing

    image.png.71639d400c7c6967492edea365bbdd24.png

     

    Few technical comments:

    - When adding fonts, there is no hint it needs to compile them. The report comes once it finishes

    - There is no way to name the fonts , they are added as "Unnamed"

    image.png.c1a6c83a79194ba0f013ab717872a314.png

    -  You mentioned two default fonts - there seems to be only one "Default"

    - When adding fonts, I can select widget for preview. But the font changes only when I leave the font selection box - simple change is not enough.

     

     

     

×
×
  • Create New...