Script Presentation – Font Dashboard

Font Dashboard - Glyph Script

Font Dashboard is a script to follow the development of your font.
Based on the color of your layers, it prints a complete report in the Macro Panel.

https://github.com/HugoJourdan/Glyphs-Script/tree/main/Font%20Dashboard

How to custom

If you want to customize color order and color description you can check the README in the GitHub repo.

This script is my very first script using Python and Glyph API, It is undoubtedly greatly improvable, I will welcome your advice with great pleasure.

4 Likes

Very nice! I will add it to the Plugin Manager. Please consider adding a README.md and a LICENSE in the root level of the repo. See other script repos for reference, I recommend the Apache license like the mekkablue scripts have them too.

Update @HugoJ : I just created a pull request for avoiding code reduplication. Take a look at the loop structure. Ping me if you want to go through the code together.

1 Like

Thanks Rainer, it’s done!

This is a list of things that could be improved :

  • Add a .txt to custom the order and description of the colors (like the β€œLabel Key” Plugin)
    (For the moment, the user have to edit the .py to do that)

  • (Line 39 from 388) I’m sure there is a way to code it in much less line.

1 Like

Nice!

You can check how functions work so you can avoid duplicate code.
Also, you could make something so that your progress bar fills up dynamically based on your percent value instead of relying on multiple if/elif statements.

Here’s an example:

steps = 10

def make_bar(value):
	bar = ''
	for i in range(steps-1):
		if i < value:
			bar += 'β–ˆ'
		else:
			bar += 'β–‘'
	return bar

for i in range(steps):
	status_bar = make_bar(i)
	print(status_bar)

β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘
β–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘
β–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘
β–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘
β–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ

2 Likes