Rotated glyph preview?

Sometimes when I’m drawing I make glyphs with rotated and flipped components: it’s a good way of finding errors in point placement and curve smoothness. But it’s a clumsy way that adds extra glyphs that will need removing later.

I wonder if anyone has made a plugin to show all the orientations in the preview, something like this?

2 Likes

Not showing all rotations in the bottom preview, but still useful for rotation is my Show Rotated Plugin:

Show Rotated

It could be updated to show those steps in the bottom preview. Or to customize colors.

1 Like

That looks good, I’ll try it! For me it’d be better to see the rotations separately so they don’t interfere with the drawing and moving nodes, and also to see all the rotations at once even when hitting spacebar. I’d love if you can update, maybe then it would become the Pro version and people can pay for the plugin? Or does @GeorgSeifert also have any plans to add more functions to the Preview pane?

The bottom preview might be rather simple to implement.
Showing the rotations in the edit view on space might cause the question: what happens, if not only one glyph is sitting in the tab?

1 Like

Ah I see why you have it superimposed :slight_smile:

That is also for symmetrifying things manually. If you don’t want to use the Script for that, think of the tilde for example. You can see itself rotated behind itself and adjust the curves. That is from a time before the Symmetrify script was to my knowledge though :smiley:

1 Like

There seems to be a problem currently with the callback method of a Reporter Plugin that draws into that bottom preview.

I wanted to quickly add those pre-rotated versions there, but am stuck cuz Glyphs does not respond to that callback method … #pending

1 Like

Oh Mark you’re excellent, I was hoping you might want to help with this one :smiley:

Let’s wait and see if Georg can assist

Florian helped me figure out what changed in the API. I think in a few moments your draft with the bottom preview rotations could be online for you to see how it works.

You want 90 degree rotations and then the same 4 rotations but flipped once? So 8 in total?

Show Rotated


TODO: fix one problem where the glyphs overlap when there are more than one in the Edit Tab

TODO: it would be helpful to add a label to the preview that tells the user that it origins in the Show Rotated plugin, otherwise it could be confusing why those glyphs are rotated when one expects to see all instances or such.

Todos are opened as issues here, in case anyone wants to help:

4 Likes

my goodness how fast! Yeah I had 8 rotations, I think that’s great :smiley:
Maybe an icon in the bottom of the preview panel, similar to the invert colour and justification icons, then it would be highlighted when the rotations are the active view?

what happens if the glyph has a long extender?

I think there is no API to add oneself to those icons/buttons.

That’ll have to be examined. At the moment I added a little dirty max bounds check for the translation (but I think it is commented out, as it didn’t work as I anticipated). Let’s leave it as a quick prototype for tonight and collect ideas for improvement. I need your input on that :handshake:

1 Like

Have a look at the Underline plugin:

2 Likes

This is going to be super handy! I’m really grateful :smiley:

2 Likes

Thanks Florian!

Thanks Ben, could you try it already? Let me know if there is something odd with it. I will see if I can add your button how Florian suggested.

1 Like

For me this is working exactly as I imagined!

In most cases I wouldn’t need the shaded version in the edit view, could that be a toggle from the context menu?

2 Likes

Sure.

I am adding the button right now, but I have some troubles making it work. Cap components, their rotations and decomposition with the “Glyph As Image” Filter are still so buggy that I cannot get a proper simple icon as PDF out of Glyphs :cry:

Screenshot 2024-06-15 at 17.32.47
^ Using components and rotating them. Does export into the PDF only as 4 open-path-looking curves
Screenshot 2024-06-15 at 17.33.15
^ Attempt to use one cap component, works for most rotations but one

If anyone wants to provide a button icon, I am happy to add it to the bottom toolbar.


Glyph As Image settings:

  • 1000 by 1000 source, Height 20, 1x, PDF (generates a wrong image)
  • saving as PNG looks like expected, but is not a usable format for UI

And here is the icon file if anyone (Georg, Florian, Rainer) wants to check the cap buggyness :sweat:
Show Rotated Icons.glyphs.zip (3.7 KB)

1 Like

I could also never understand how to get Glyph As Image to produce anything useable. I’ll think about what kind of icon I could create.

Here’s my attempt, Glyph As Image doesn’t even include the whole glyph.

1 Like

If you set the category of the glyph to “icon”, you can set the size. Everyting outside will be cut off.

but congrats on getting such a smooth rotated image and all paths properly showing in the pdf!

I use it all the time (almost all icons in Glyphs are made with it). And I made it mostly for that purpose and just put it in as I found it to be too useful to not do that.

But it might be a tricky to us. One thing I always do is to draw everything 10 time bigger that the final output size. E.g. if you need a 18x18 px pdf, set the icon size to 180x180. And set the grid to 10/10 to see rough guides where the pixels are.
In the filter setting, set the “Height” to 18. That will scale it down to 10%. And only draw above the baseline.

1 Like