Get all the possible combination of Material Symbols!
This repo provides fonts in fonts/
path. You can also use generator.py
to generate latest fonts yourself. These will be saved in fonts/
dir.
Format of fonts: Material_Symbols_<FONT_TYPE>-<OPTICAL_SIZE>-<WEIGHT>-<FILL>_<GRAD>.ttf
Possible values:
# Possible values
FONT_TYPE = ["Outlined", "Rounded", "Sharp"]
OPTICAL_SIZE = ["20", "24", "40", "48"] # in px
GRAD = ["-25", "0", "200"]
WEIGHT = ['100', '200', '300', '400', '500', '600', '700']
FILL = [1,0]
What does this means:
See More : https://m3.material.io/styles/icons/overview
This project exists because not all libraries support variable fonts, such as SDL. It aims to provide a solution for using variable fonts in libraries that do not support them. By converting the variable font to a set of static fonts, this project allows for the use of variable fonts in any library that supports static fonts.
To use this repository, follow these steps:
- Choose your favorite font file and download it. You can use it anywhere.
- Type the Unicode character, for example:
\ue769
You can find the Unicode character for each icon at https://fonts.google.com/icons.
Here's an example of how the icon would look like with its Unicode character:
That's it! You can now use any Material Symbol for your projects.
Kivy Example:
from kivy.app import App
from kivy.lang import Builder
UI = Builder.load_string(
"""
Label:
text:"\ue769"
font_name:"fonts/Material_Symbols_Rounded-20-100-0_-25.ttf"
font_size:"300sp"
halign:"center"
"""
)
class Testapp(App):
def build(self):
return UI
Testapp().run()