Kattes Posted June 2, 2020 Share Posted June 2, 2020 Hi again, I recently started with my first Web-Application for mobile devices using the special mobile Components of Unigui. In general everything works fine, but I am facing two problems: I am not able to get use of Google Fonts in mobile applications - I tried all the tricks that worked for standard UniGui applications, but for whatever reason I cannot get the Google Fonts working under mobile environment. Full Screen Mode - After putting a link of my App on the home screen of my mobile it starts in full screen mode - so this works as expected. But whenever using UnimEdit, i.e. entering some text in this control it will leave full screen mode immediately , what is likely a bug. You can test this behavior quite easy with http://prime.fmsoft.net/demo/touch/mdemo65.dll/m. Just add it to your home screen of your smartphone and explore the Edit Components after starting in full screen mode.You will probably see the same problem. I hope that somebody knows a trick to avoid this? Best regards, Kattes Link to comment Share on other sites More sharing options...
Sherzod Posted June 2, 2020 Share Posted June 2, 2020 Hello, 11 hours ago, Kattes said: I am not able to get use of Google Fonts in mobile applications - I tried all the tricks that worked for standard UniGui applications, but for whatever reason I cannot get the Google Fonts working under mobile environment. Can you make a simple testcase? 11 hours ago, Kattes said: Full Screen Mode - After putting a link of my App on the home screen of my mobile it starts in full screen mode - so this works as expected. But whenever using UnimEdit, i.e. entering some text in this control it will leave full screen mode immediately , what is likely a bug. You can test this behavior quite easy with http://prime.fmsoft.net/demo/touch/mdemo65.dll/m. Just add it to your home screen of your smartphone and explore the Edit Components after starting in full screen mode.You will probably see the same problem. I hope that somebody knows a trick to avoid this? Which browser are you using!? Link to comment Share on other sites More sharing options...
Kattes Posted June 2, 2020 Author Share Posted June 2, 2020 Hi Sherzod, I am using a P20 Pro running Android 9 and Chrome as shown above for my tests but also saw same behavior on the Apple iPhone from a friend. I will make tomorrow a test cause fore the Google Font issue. Link to comment Share on other sites More sharing options...
Kattes Posted June 8, 2020 Author Share Posted June 8, 2020 Sorry, but I was too busy to care about the test case, but will do that as soon as I can... Nevertheless my issue #2 - the full screen mode problem - is solved! I found out that the full screen mode will be left only if an application does not run on a SSL connection. After I published my application on my web server (which uses SSL) the described problem #2 is gone. 1 Link to comment Share on other sites More sharing options...
Kattes Posted November 7, 2020 Author Share Posted November 7, 2020 To be honest, the Google Fonts almost drove me crazy. I managed to use the "Roboto" font on my UnimLabel components relatively easily, but it just didn't work for the "Baloo 2" font. After much trial and error I decided to use the following routine: procedure ForceLabelFont(var Unimlabel: tUnimLabel); begin Unimlabel.Caption := '<div style="font-family: '''+Unimlabel.Font.Name+''';">'+ Unimlabel.Caption+'</div>'; end; In the unit "Servermodule" I added within CustomCSS the following line: @import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&display=swap'); In case someone has the same problems, please try this solution. Best regards, Kattes 2 Link to comment Share on other sites More sharing options...
Kattes Posted November 7, 2020 Author Share Posted November 7, 2020 .. and this is how it looks like (Baloo Font is used on the bottom): 1 Link to comment Share on other sites More sharing options...
Abaksoft Posted November 8, 2020 Share Posted November 8, 2020 Thank you Kattes Amazing, so wonderful. !!! Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now