Font size shows as it should on Linnux Mint 64 bit but not on RPi Stretch
Re: Font size shows as it should on Linnux Mint 64 bit but not on RPi Stretch
Thanks David
Mint on PC: RPi: Could this be relevant?
Mint on PC: RPi: Could this be relevant?
Last edited by philjynx on Mon Mar 19, 2018 10:45 am, edited 1 time in total.
Re: Font size shows as it should on Linnux Mint 64 bit but not on RPi Stretch
Do you have the image labels reversed? My virtualbox Mint seems to have 3.18, and my (real) debian stretch 3.22.
Anyway, they use different gtk+ versions so that explains the spam. As doublemax has said, the 'font' sample will help show if that's relevant to your real problem (though it could be other system things too e.g. your DE/WM).
Anyway, they use different gtk+ versions so that explains the spam. As doublemax has said, the 'font' sample will help show if that's relevant to your real problem (though it could be other system things too e.g. your DE/WM).
Re: Font size shows as it should on Linnux Mint 64 bit but not on RPi Stretch
I've corrected the labels!
Dunno what " e.g. your DE/WM" is...
Although the font sample works on the RPi, we're not looking at it's own menu fonts being changed i.e. the whole app.
I've had a gander at the code and it does loads of canvas painting (at least something I have familiarity with, since I wrote my own VCL for Delphi years ago as Borland's didn't do what I wanted - lots of canvas painting).
Wherever such things happen with a bog standard wxApp is, I imagine, a wxWidgets library thing - outside my control.
Dunno what " e.g. your DE/WM" is...
Although the font sample works on the RPi, we're not looking at it's own menu fonts being changed i.e. the whole app.
I've had a gander at the code and it does loads of canvas painting (at least something I have familiarity with, since I wrote my own VCL for Delphi years ago as Borland's didn't do what I wanted - lots of canvas painting).
Wherever such things happen with a bog standard wxApp is, I imagine, a wxWidgets library thing - outside my control.
Re: Font size shows as it should on Linnux Mint 64 bit but not on RPi Stretch
Desktop Environment and Window Manager.Dunno what " e.g. your DE/WM" is...
I'm not sure I understand what you mean. In the 'font' sample menubar, does 'Font > Increase font size by 2 points' work for you? If so, that means your font system can't be completely broken.Although the font sample works on the RPi, we're not looking at its own menu fonts being changed i.e. the whole app.
I'm also not clear about what the real problem is. Whose idea is it to set a particular font/font-size anyway? Is it something you know you need, or just something that wxFormBuilder happens to do, that turns out wrong on the RPi? If the latter, what happens if you fix your wxFB options (or hack out the font settings by hand)?
Re: Font size shows as it should on Linnux Mint 64 bit but not on RPi Stretch
The font sample app has a menu, with text in it. This text does not get changed in any way. Yes, the font sample app changes the fonts on the canvas that it has screeds of code for. From an application programmer's point of view, (I'm going to harp on about Delphi again, so look out!), you design your form on the screen - each control can either inherit all it's font properties from it's parent (form, panel, whatever), or on a control by control basis you can set any aspect of the font you desire, just by changing that item's properties - no need to write masses of stuff just to change the font, in fact no need to write any code at all for that.I'm not sure I understand what you mean. In the 'font' sample menubar, does 'Font > Increase font size by 2 points' work for you? If so, that means your font system can't be completely broken.
It has to be said, that on the Mint PC, the same is true - (as per an earlier screenshot) I've only set the font once, in one place - namely the 'topframe', and all it's kids dutifully do what Ma (or Pa) - topframe says - no direct changes to the children's properties on my part.
On RPi, it's as though the kids are a little older and are ignoring their parent and doing what the kids next door are all doing!
Desktop Environment and Window Manager - ok, that's what the abbreviations meant, but even so, I don't know what to do with those two expansions either! Call me thick, if you like....Desktop Environment and Window Manager.
Mine and yes it is something I need, wxFormBuilder has put that font setting code in because I asked it to (i.e. I chose the font setting I wanted in the properties of that particular frame - which happens to be the top of the app i.e. the main one that appears when you launch it.Whose idea is it to set a particular font/font-size anyway? Is it something you know you need, or just something that wxFormBuilder happens to do, that turns out wrong on the RPi?
Here's why I need nice big fonts: This gizmo has a teensy 3.5 and RPi (amongst other things).
The Teensy handles the expression pedals, and the 24 RGB illuminated switches (optical switches) It also communicates via MIDI in three ways.
1 - DIN midi bi-directional communication with the GR55 synthesiser.
2 - USB midi bi-directional with laptop running Mobius Looping software.
3 - direct UART to UART link to the RPi
The RPi, acts as a bridge between the Teensy & the Katana amplifier via USB Midi, leaving 3 more USB ports free for other devices in the future.
In case anyone is wondering, the above is not my intention, all this gear designed and built by me, works reliably and as intended.
So, given that this MIDI controller lives on the floor, it needs big text in order for me to be able to read the screen!
The plan is for it to show Patch names from the synthesiser and the guitar amp and also (eventually) provide a configuration interface to change the settings for patches. At present, all the patches are hard coded into the Teensy and the RPi is simply providing that bridge I mentioned.
I doubt that wxFormBuilder is the culprit here, after all, it doesn't build the app, and that bit of code that it puts in because I wanted a bigger font
Code: Select all
this->SetFont( wxFont( 32, 70, 90, 90, false, wxEmptyString ) );
Re: Font size shows as it should on Linnux Mint 64 bit but not on RPi Stretch
Hi,
If the font sample does not work for you on the RPI, it means 2 things - either you don't have this specific font installed or something is preventing the font size change.
I presume you have a gdb and debug version of the wxWidgets built for Raspberry?
If yes - please try to run the font sample under gdb and do the "Font -> Inscrease the font by 2 pixels" menu. See if that code fails and why.
Most likely there is nothing wrong with your app.
Try to install different font on your Raspberry. I don't know if it has its own repository or how does it manages packages, but you should be able to find something either on the web or Raspberry forums.
All in all you just proved that this is a "missing font" or GTK+ problem issue - nothing is wrong with your app.
Thank you.
If the font sample does not work for you on the RPI, it means 2 things - either you don't have this specific font installed or something is preventing the font size change.
I presume you have a gdb and debug version of the wxWidgets built for Raspberry?
If yes - please try to run the font sample under gdb and do the "Font -> Inscrease the font by 2 pixels" menu. See if that code fails and why.
Most likely there is nothing wrong with your app.
Try to install different font on your Raspberry. I don't know if it has its own repository or how does it manages packages, but you should be able to find something either on the web or Raspberry forums.
All in all you just proved that this is a "missing font" or GTK+ problem issue - nothing is wrong with your app.
Thank you.
Re: Font size shows as it should on Linnux Mint 64 bit but not on RPi Stretch
This is what I said
I did not say that the font sample doesn't work.The font sample app has a menu, with text in it. This text does not get changed in any way. Yes, the font sample app changes the fonts on the canvas that it has screeds of code for.
Re: Font size shows as it should on Linnux Mint 64 bit but not on RPi Stretch
Ah, OK.
Sorry I misread your responce.
In any case look at the documentation on how the new font is created and try to correct the code wxFB is generating. See if that helps.
If it does - than we can go and file a report with wxFB about misconfiguring the font creation code.
Thank you.
Sorry I misread your responce.
In any case look at the documentation on how the new font is created and try to correct the code wxFB is generating. See if that helps.
If it does - than we can go and file a report with wxFB about misconfiguring the font creation code.
Thank you.
Re: Font size shows as it should on Linnux Mint 64 bit but not on RPi Stretch
Surely if wxFB code was wrong it would fail everywhere, not just on the RPi?
It works perfectly on Mint PC.
It works perfectly on Mint PC.
Re: Font size shows as it should on Linnux Mint 64 bit but not on RPi Stretch
Please take the "minimal" sample and paste the following code at the end of the MyFrame constructor:
Build and run on the RPi.
If you get a button with a big font, the problem is somewhere in your (or wxFB's) code.
If not, the problem lies somewhere in the DE/WM on the RPi system and it would require debugging to find out what's going on.
Code: Select all
wxPanel *panel = new wxPanel(this, wxID_ANY);
wxFont big_font(48, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL );
wxButton *button = new wxButton(panel, wxID_ANY, "Button", wxPoint(20,20), wxSize(300,70) );
button->SetFont( big_font );
If you get a button with a big font, the problem is somewhere in your (or wxFB's) code.
If not, the problem lies somewhere in the DE/WM on the RPi system and it would require debugging to find out what's going on.
Use the source, Luke!
Re: Font size shows as it should on Linnux Mint 64 bit but not on RPi Stretch
Fair enough.Here's why I need nice big fonts:
FWIW, adding this code:
Code: Select all
SetFont(GetFont().Scale(2));
Alternatively, why not alter the RPi's system default font size?
Re: Font size shows as it should on Linnux Mint 64 bit but not on RPi Stretch
Can't change the system font to 32! That would render everything except my app impossible to operate.DavidHart wrote:Fair enough.Here's why I need nice big fonts:
FWIW, adding this code:to the frame ctor of the wx3.0.4 'text' sample works for all it's children too; that's on my non-RPi debian stretch. It doesn't affect the menubar; I don't know of a wx to do that. Presumably menus are less important for your use-case.Code: Select all
SetFont(GetFont().Scale(2));
Alternatively, why not alter the RPi's system default font size?
You're bang on the money regarding menus (if you mean in my App) - there won't be any menus, it's a full screen buttons only thing.
Thing is, it's ok for the configuration screens that the 'Settings' buttons lead to to be normal sized fonts since they are for fiddly setup which you wouldn't do standing up with the device on the floor.
I'll have a bash with that fragment you put (above).
Re: Font size shows as it should on Linnux Mint 64 bit but not on RPi Stretch
I'll give that a go!doublemax wrote:Please take the "minimal" sample and paste the following code at the end of the MyFrame constructor:Build and run on the RPi.Code: Select all
wxPanel *panel = new wxPanel(this, wxID_ANY); wxFont big_font(48, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL ); wxButton *button = new wxButton(panel, wxID_ANY, "Button", wxPoint(20,20), wxSize(300,70) ); button->SetFont( big_font );
If you get a button with a big font, the problem is somewhere in your (or wxFB's) code.
If not, the problem lies somewhere in the DE/WM on the RPi system and it would require debugging to find out what's going on.
Re: Font size shows as it should on Linnux Mint 64 bit but not on RPi Stretch
Well, it's promising, I tried the scaling thing. Problem is the text then doesn't fit the button and the button text is no longer vertically aligned with the label text and (fanfare) it makes no difference at all on the RPi!
Re: Font size shows as it should on Linnux Mint 64 bit but not on RPi Stretch
Tried the BIG BUTTON here's how it went - big button, but font unaffected.
Somewhat annoying.....
Debugging this issue on the RPi? I think that is way out of my league.
So, not a code issue, an RPi one.Somewhat annoying.....
Debugging this issue on the RPi? I think that is way out of my league.