Google Material Icons Font
- Stewart Marshall
- Posts: 417
- Joined: Thu Nov 05, 2015 5:25 pm
Google Material Icons Font
The Google Material Icons (https://design.google.com/icons/) can be used in browser applications by making use of the Material Icons Font.
As the icons are delivered as a font, they follow the same styling rules as all other fonts, allowing the foreground color to be changed and the font to appear in many different sizes.
The attached import contains a Webpage, Reusable part and a Widget. The page uses a Tile control with an individual tile for each of the 900+ listed icons. The IconName property of the widget is set to the required icon name and the icon will be shown at runtime.
As the icons are delivered as a font, they follow the same styling rules as all other fonts, allowing the foreground color to be changed and the font to appear in many different sizes.
The attached import contains a Webpage, Reusable part and a Widget. The page uses a Tile control with an individual tile for each of the 900+ listed icons. The IconName property of the widget is set to the required icon name and the icon will be shown at runtime.
- Attachments
-
- GoogleIcons.zip
- (22.9 KiB) Downloaded 11930 times
- Stewart Marshall
- Posts: 417
- Joined: Thu Nov 05, 2015 5:25 pm
Re: Google Material Icons Font
No sooner had I posted this than I was provided with a URL and code to get the icon names from github, so here's an updated version
- Attachments
-
- GoogleIcons.zip
- (17.67 KiB) Downloaded 11760 times
Re: Google Material Icons Font
I've downloaded this project but I'm having some issues. Running under debug I get as far as the line.
#GetIconNames.ExecuteAsync
In the browser it immediately displays
Fatal Error:
Failed to load /lansa/v40/xdemo_65.js?v=1485995731_dev
Reported By:
http://localhost/lansa/lansa_14_1_0_3/lansa.js, line 18
However, in the debugger the code keeps running and I can see the icon list returned and parsed out.
Any ideas?
#GetIconNames.ExecuteAsync
In the browser it immediately displays
Fatal Error:
Failed to load /lansa/v40/xdemo_65.js?v=1485995731_dev
Reported By:
http://localhost/lansa/lansa_14_1_0_3/lansa.js, line 18
However, in the debugger the code keeps running and I can see the icon list returned and parsed out.
Any ideas?
- Stewart Marshall
- Posts: 417
- Joined: Thu Nov 05, 2015 5:25 pm
Re: Google Material Icons Font
Have you compiled both the WebPage and the reusable part (xDemoWebGoogleIconTileDesign)?
Re: Google Material Icons Font
You are correct, I hadn't compiled the tile design. After compiling all the RPs I still had an issue because I hadn't compiled the widget. It is now working.
There must be a better way to handle this. The error message doesn't always tell where the problem is and as only the short name is displayed it is difficult to locate the offending object. I'd like to be able to see the web pages dependencies in a single view and compile them with a single click.
There must be a better way to handle this. The error message doesn't always tell where the problem is and as only the short name is displayed it is difficult to locate the offending object. I'd like to be able to see the web pages dependencies in a single view and compile them with a single click.
Re: Google Material Icons Font
I find displaying the name and ID together in the IDE to be useful at times
Re: Google Material Icons Font
Mark
You are right but when you have a runtime error in XAAPART03 tracking that down is not easy when the full name could be nothing like it
You are right but when you have a runtime error in XAAPART03 tracking that down is not easy when the full name could be nothing like it
Re: Google Material Icons Font
Hi
I tried to work with the Google Icon Fonts.
The icons are displayed locally on server: ...but on on a client
(IE) (FF)
Does anybody know what I'm doing wrong?
I tried to work with the Google Icon Fonts.
The icons are displayed locally on server: ...but on on a client
(IE) (FF)
Does anybody know what I'm doing wrong?
-
GregSippel
- Posts: 25
- Joined: Thu May 19, 2016 11:34 am
Re: Google Material Icons Font
Dominique,
I suggest first check that the browser on the machine you are using is able to load the following urls,
https://fonts.googleapis.com/icon?family=Material+Icons
https://fonts.gstatic.com/s/materialico ... DsNc.woff2
The widget used in the example provided must download these files in order to display the icons. This download is done on the client PC by browser used. If either file cannot be downloaded, you will get an effect similar to the above.
Hope this helps
I suggest first check that the browser on the machine you are using is able to load the following urls,
https://fonts.googleapis.com/icon?family=Material+Icons
https://fonts.gstatic.com/s/materialico ... DsNc.woff2
The widget used in the example provided must download these files in order to display the icons. This download is done on the client PC by browser used. If either file cannot be downloaded, you will get an effect similar to the above.
Hope this helps
Re: Google Material Icons Font
Thanks Greg
I can load both URLs without Problems.
Any other ideas?
regards
Dominique
I can load both URLs without Problems.
Any other ideas?
regards
Dominique
-
GregSippel
- Posts: 25
- Joined: Thu May 19, 2016 11:34 am
Re: Google Material Icons Font
When running the VL web page, have a look at the browser console and see if you are getting any errors. The issue could be related to cross-site scripting.
Hope this helps
Greg
Hope this helps
Greg