Skip to content

Support selected range, keep layers - #7

Open
slobzheninov wants to merge 2 commits into
Ricard-Garcia:masterfrom
slobzheninov:patch-1
Open

Support selected range, keep layers#7
slobzheninov wants to merge 2 commits into
Ricard-Garcia:masterfrom
slobzheninov:patch-1

Conversation

@slobzheninov

@slobzheninov slobzheninov commented Aug 16, 2021

Copy link
Copy Markdown

If some text is selected, change only the selected part. Otherwise, change case of the whole tab.
Use tab.layers instead of tab.text to keep layers (since tabs can contain multiple layers).

If some text is selected, change only the selected part. Otherwise, change case of the whole tab.
Use tab.layers instead of tab.text to keep layers.
A little typo fixed

@Ricard-Garcia Ricard-Garcia left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really appreciate your collaboration with this plugin! When I wrote this plugin is was just starting to code and applying some of the Python I learnt at TypeMedia to my first group of scripts and plugins.

I'm sure you've tested and worked with this new feature. I'll just add @mekkablue as a reviewer as well just in case we are missing a small detail. Otherwise, the way of storing layers in an array and display them looks great to me.

Again, thank you so much!

newText = ""

# change the whole tab
if tab.textRange == 0:

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know about this textRange property. I'm currently focused on other programming projects not related to type design at this moment so I'll need to catch up on Glyphs 3 and its API.

Maybe @mekkablue can give some feedback because I would like to keep this plugin working for Glyphs 2 for a bit longer.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seem to work fine in Glyphs 2 as well!

@Ricard-Garcia Ricard-Garcia added the enhancement New feature or request label Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants