# Replace a shape by another all across the font

**URL:** <https://forum.glyphsapp.com/t/replace-a-shape-by-another-all-across-the-font/8045>\
**Category:** Uncategorized\
**Created:** [January 26, 2018, 4:24pm UTC](https://forum.glyphsapp.com/t/replace-a-shape-by-another-all-across-the-font/8045 "2018-01-26T16:24:03Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![alepaul](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/alepaul/32/4551_2.png) [@alepaul](https://forum.glyphsapp.com/u/alepaul)\
**Post date:** [January 26, 2018, 4:24pm UTC](https://forum.glyphsapp.com/t/replace-a-shape-by-another-all-across-the-font/8045/1 "2018-01-26T16:24:03Z")

</div>

Hello, is any script or function to select a shape (could be a serif or any shape that is being used a lot) and replace it by another all around the font? thanks for the help

---

<div class="post-metadata">

**Author:** ![GeorgSeifert](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/georgseifert/32/259_2.png) [@GeorgSeifert](https://forum.glyphsapp.com/u/GeorgSeifert)\
**Post date:** [January 26, 2018, 4:36pm UTC](https://forum.glyphsapp.com/t/replace-a-shape-by-another-all-across-the-font/8045/2 "2018-01-26T16:36:00Z")

</div>

You mean path that is repeated/duplicated? I’m working on something. But it will take a bit more time.

---

<div class="post-metadata">

**Author:** ![mekkablue](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/mekkablue/32/23_2.png) [@mekkablue](https://forum.glyphsapp.com/u/mekkablue)\
**Post date:** [January 26, 2018, 6:43pm UTC](https://forum.glyphsapp.com/t/replace-a-shape-by-another-all-across-the-font/8045/3 "2018-01-26T18:43:11Z")

</div>

If you work from the start with corner and cap components, they are easy to replace, but I suppose you have a project with many existing outlines…?

---

<div class="post-metadata">

**Author:** ![alepaul](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/alepaul/32/4551_2.png) [@alepaul](https://forum.glyphsapp.com/u/alepaul)\
**Post date:** [January 26, 2018, 7:00pm UTC](https://forum.glyphsapp.com/t/replace-a-shape-by-another-all-across-the-font/8045/4 "2018-01-26T19:00:32Z")

</div>

You are right, I have many dots that should be stars. Thousand of them.

---

<div class="post-metadata">

**Author:** ![mekkablue](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/mekkablue/32/23_2.png) [@mekkablue](https://forum.glyphsapp.com/u/mekkablue)\
**Post date:** [January 27, 2018, 10:51am UTC](https://forum.glyphsapp.com/t/replace-a-shape-by-another-all-across-the-font/8045/5 "2018-01-27T10:51:34Z")

</div>

> [@alepaul](#):
>
> You are right, I have many dots that should be stars. Thousand of them.

Can you post a screenshot? Are _all_ paths dots that should be stars? Would this method work for you: measure all path bounding boxes, and insert a star component in the right scale?

---

<div class="post-metadata">

**Author:** ![alepaul](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/alepaul/32/4551_2.png) [@alepaul](https://forum.glyphsapp.com/u/alepaul)\
**Post date:** [January 27, 2018, 3:51pm UTC](https://forum.glyphsapp.com/t/replace-a-shape-by-another-all-across-the-font/8045/6 "2018-01-27T15:51:50Z")

</div>

![](https://forum.glyphsapp.com/uploads/default/original/2X/7/7a44f5fc0ea99a106a2d3c0aaf146584dc3c6e3c.png)

I want to find all circles and replace by all stars

---

<div class="post-metadata">

**Author:** ![alepaul](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/alepaul/32/4551_2.png) [@alepaul](https://forum.glyphsapp.com/u/alepaul)\
**Post date:** [January 27, 2018, 3:53pm UTC](https://forum.glyphsapp.com/t/replace-a-shape-by-another-all-across-the-font/8045/7 "2018-01-27T15:53:05Z")

</div>

to help, there is a find outline/replace outline option in fontlab that is not actually replacing fine.

---

<div class="post-metadata">

**Author:** ![mekkablue](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/mekkablue/32/23_2.png) [@mekkablue](https://forum.glyphsapp.com/u/mekkablue)\
**Post date:** [January 27, 2018, 6:55pm UTC](https://forum.glyphsapp.com/t/replace-a-shape-by-another-all-across-the-font/8045/8 "2018-01-27T18:55:09Z")

</div>

Ale, can you send me the file, so I can have a look?

---

<div class="post-metadata">

**Author:** ![dergraph](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/dergraph/32/17473_2.png) [@dergraph](https://forum.glyphsapp.com/u/dergraph)\
**Post date:** [January 27, 2018, 9:20pm UTC](https://forum.glyphsapp.com/t/replace-a-shape-by-another-all-across-the-font/8045/9 "2018-01-27T21:20:29Z")

</div>

replacing the shape with a component might be even more elegant  
making further changes easy as pie

---

<div class="post-metadata">

**Author:** ![mekkablue](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/mekkablue/32/23_2.png) [@mekkablue](https://forum.glyphsapp.com/u/mekkablue)\
**Post date:** [January 28, 2018, 7:48pm UTC](https://forum.glyphsapp.com/t/replace-a-shape-by-another-all-across-the-font/8045/10 "2018-01-28T19:48:25Z")

</div>

I had a look at your file, and all paths have the same shape. I just wrote a script for that in _[mekkablue scripts](http://github.com/mekkablue/Glyphs-Scripts) \> Components \> Replace all Paths with Component._ It should be pretty self-explanatory.

---

<div class="post-metadata">

**Author:** ![alepaul](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/alepaul/32/4551_2.png) [@alepaul](https://forum.glyphsapp.com/u/alepaul)\
**Post date:** [January 28, 2018, 8:57pm UTC](https://forum.glyphsapp.com/t/replace-a-shape-by-another-all-across-the-font/8045/11 "2018-01-28T20:57:35Z")

</div>

Great but

 ![](https://forum.glyphsapp.com/uploads/default/original/2X/2/28e974a6325d9d6079be4bb892198149d29d26b9.png)I created the star as a new glyph called star, then I do what you mention and the ending result is…  
whats wrong?

---

<div class="post-metadata">

**Author:** ![GeorgSeifert](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/georgseifert/32/259_2.png) [@GeorgSeifert](https://forum.glyphsapp.com/u/GeorgSeifert)\
**Post date:** [January 28, 2018, 9:29pm UTC](https://forum.glyphsapp.com/t/replace-a-shape-by-another-all-across-the-font/8045/12 "2018-01-28T21:29:57Z")

</div>

There is a glyph called ‘star’ but it has no outlines.

---

<div class="post-metadata">

**Author:** ![mekkablue](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/mekkablue/32/23_2.png) [@mekkablue](https://forum.glyphsapp.com/u/mekkablue)\
**Post date:** [January 29, 2018, 3:56am UTC](https://forum.glyphsapp.com/t/replace-a-shape-by-another-all-across-the-font/8045/13 "2018-01-29T03:56:52Z")

</div>

Fixing this: Copy one of the star outlines into the glyph `star`, move it over the origin point, that should fix it.

Starting anew: Go into your glyph with the star outlines, select a star by double clicking, right click and choose _Component from Selection,_ call it `_star`. Then run the script.

Also, I just found a bug in the script that may have created this situation. Let me upload the new version. _Update: fixed. Please get the new version and try again,_

---

<div class="post-metadata">

**Author:** ![alepaul](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/alepaul/32/4551_2.png) [@alepaul](https://forum.glyphsapp.com/u/alepaul)\
**Post date:** [January 29, 2018, 1:30pm UTC](https://forum.glyphsapp.com/t/replace-a-shape-by-another-all-across-the-font/8045/14 "2018-01-29T13:30:14Z")

</div>

you both are genious, thanks!

---

<div class="post-metadata">

**Author:** ![sergio391](https://forum.glyphsapp.com/letter_avatar_proxy/v4/letter/s/e8c25b/32.png) [@sergio391](https://forum.glyphsapp.com/u/sergio391)\
**Post date:** [February 1, 2018, 3:16am UTC](https://forum.glyphsapp.com/t/replace-a-shape-by-another-all-across-the-font/8045/15 "2018-02-01T03:16:02Z")

</div>

Ale, conectate con Guido Ferreyra. El desarrolló un script para Sole Fontana que hace justamente eso.

---

<div class="post-metadata">

**Author:** ![bojjoe](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/bojjoe/32/34065_2.png) [@bojjoe](https://forum.glyphsapp.com/u/bojjoe)\
**Post date:** [June 7, 2025, 2:09pm UTC](https://forum.glyphsapp.com/t/replace-a-shape-by-another-all-across-the-font/8045/16 "2025-06-07T14:09:51Z")

</div>

> [@mekkablue](#):
>
> mponents \> Replace all Paths with

This would be mega helpful, is it me or is this not in the mekkablue scripts anymore?

---

<div class="post-metadata">

**Author:** ![George\_Thomas](https://forum.glyphsapp.com/letter_avatar_proxy/v4/letter/g/c77e96/32.png) [@George\_Thomas](https://forum.glyphsapp.com/u/George_Thomas)\
**Post date:** [June 8, 2025, 3:05pm UTC](https://forum.glyphsapp.com/t/replace-a-shape-by-another-all-across-the-font/8045/17 "2025-06-08T15:05:40Z")

</div>

@mekkablue — Perhaps a script for G2 that was too difficult to update for G3?

---

<div class="post-metadata">

**Author:** ![mekkablue](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/mekkablue/32/23_2.png) [@mekkablue](https://forum.glyphsapp.com/u/mekkablue)\
**Post date:** [June 8, 2025, 7:59pm UTC](https://forum.glyphsapp.com/t/replace-a-shape-by-another-all-across-the-font/8045/18 "2025-06-08T19:59:45Z")

</div>

It’s too long ago, I don’t remember. But you have git, you can checkout the repo as of end of 2018.

---

<div class="post-metadata">

**Author:** ![GeorgSeifert](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/georgseifert/32/259_2.png) [@GeorgSeifert](https://forum.glyphsapp.com/u/GeorgSeifert)\
**Post date:** [June 8, 2025, 8:08pm UTC](https://forum.glyphsapp.com/t/replace-a-shape-by-another-all-across-the-font/8045/19 "2025-06-08T20:08:36Z")

</div>

You can search/replace outlines directly. Select the shape (even parts of a shape should work) and got to Edit \> Find \> Use selection for Find. Then hit Cmd+g to get ot the congruent shape (in the same layer or in other glyphs).  
I just saw that you need to start with a glyph early in the file as it doesn’t jump to the from the end to the beginning.

---

<div class="post-metadata">

**Author:** ![George\_Thomas](https://forum.glyphsapp.com/letter_avatar_proxy/v4/letter/g/c77e96/32.png) [@George\_Thomas](https://forum.glyphsapp.com/u/George_Thomas)\
**Post date:** [June 8, 2025, 10:09pm UTC](https://forum.glyphsapp.com/t/replace-a-shape-by-another-all-across-the-font/8045/20 "2025-06-08T22:09:24Z")

</div>

@bojjoe The script was dropped July, 2019.

[Next page](https://forum.glyphsapp.com/t/replace-a-shape-by-another-all-across-the-font/8045.md?page=2)
