How to remove the texture inside the glyph?

Hi, Tell me please, how to remove the texture inside the glyph? Or to fill the whole glyph with one color to make texture disappear.

What kind of glyph you have as a start? Could you show us an example?

edit: Assuming you have some kind of roughness texture (i.e. whole bunch of small paths), I think the easiest non-script way is to select the paths you want to keep and cut them temporarily, select & delete all the rest, then paste back the paths you cut earlier.

I want to merge everything into 1 spot to make dark letters.

Okay, I still stand by the original suggestion, but I wrote a script for you anyway. Please open the Macro Window, paste these lines of code, and run it. It will apply to selected glyphs. This will delete all paths except when: 1. the path is a black shape, or 2. it’s among the three largest paths (because I do not want to delete counter paths for letters like A, B, and O).

# n = number of largest paths you want to keep
n = 3
pathsToBeSaved = []
for l in Glyphs.font.selectedLayers:
	areas = sorted([ p.area() for p in l.paths ])[-n:]
	for p in l.paths:
		if p.direction == -1 or p.area() in areas:
			pathsToBeSaved.append(p.copy())
	l.paths=[]
	for p in pathsToBeSaved:
		l.paths.append(p)

This should make your life easier. Let me know if it works!

1 Like

You’re just an angel that you did it for me))) Thank you so much)))
I’ll try and let you know)))

Everything works perfectly. Thank you, thank you very much.

Great to know that it’s working! You might have tried already, but if it is deleting too many nodes and you want it to be more conservative, you need to increase the n number.

There is also a script in Mekkablues repository that deletes all paths that are smaller then a certain size.

It is a plugin in the Plugin Manager. Delete Small Paths, I think.