How do you handle the oversized fonts in WebButton and WebPopupMenu when viewed with Firefox on Linux? Firefox on Windows and OS X is fine but when used on Ubuntu or Mint to view pages of a Web App, the fonts are so large in WebButton and WebPopupMenu that they are often cutoff at the bottom.
Any idea why the font is so large for those two controls but not WebLabel, WebTextField or WebTextArea? Ideally the font would be the same size for all of the Web controls.
What I’ve done in the past is increase the height of WebButton and WebPopupMenu if Session.Platform = WebSession.PlatformType.Linux but it’s far from ideal since Linux distributions vary when sizing fonts for those controls. I like your idea of sizing the font based on pixels since that should keep the height consistent relative to the control it is in. Thanks for the tip Brock!
[quote=147263:@Tim Jones]Look at the DPI setting for your Linux system. The default is a bit large (probably 120DPI for most new 16:9 displays).
The only way around this is Check the platform and change the font size if it’s Linux.
This is true for Desktop apps, as well.
All of my controls are subclassed and have one of these in the Open event:
[code]// Small Buttons and Labels #if TargetLinux
Me.Height = Me.Height + 2
Me.Top = Me.Top -1
Me.TextSize = 10 #endif
// Normal Buttons and Labels #if TargetLinux
Me.Height = Me.Height + 5
Me.Top = Me.Top -3
Me.TextSize = 11 #endif[/code][/quote]
All of my Desktop apps have similar code for changing the height of certain controls when running on Linux but it’s not elegant for the same reasons I described in my reply to Brock. For Web apps, why does the DPI for the hosting system matter since the web pages are being presented on remote systems? Do the two systems, host and remote, impact the font presented on the remote system? I’ve not done enough testing to know but my assumption is that the remote system and browser are the major influencers. I’ll do some more testing now that you’ve got me thinking about it. Thanks Tim!
Does anyone know why the font size is so much larger in WebButton and WebPopupMenu than WebLabel, WebTextField or WebTextArea when viewing a Web app with Firefox on Ubuntu and Mint? The controls are all standard with no WebStyle applied or resizing. This dramatic difference in font size does not occur with Firefox on Windows or OS X.