Skip to content
This repository has been archived by the owner on May 4, 2022. It is now read-only.

Improvements for Text Position and Label #5

Open
rswift opened this issue Sep 4, 2021 · 3 comments
Open

Improvements for Text Position and Label #5

rswift opened this issue Sep 4, 2021 · 3 comments

Comments

@rswift
Copy link

rswift commented Sep 4, 2021

Hello,

Firstly, thank you for creating this tool - very useful 👍

One improvement that'd make a big difference, for me at least, would be pre-set Text Position settings. I find myself having to change every icon, every time - maybe I'm a numpty when it comes to using Omnigraffle, but I've not found a way to set a default behaviour for this? I have looked at the Font Copy (⌥⌘C) and Copy Object Style (^⌘C) but neither work, the drag & drop from the style well works fine, but for a complex diagram this is very time consuming...

Ideally, a command line toggle on the omnigraffle-stencil command to trigger a setting in the stencil your tool creates? I've made two screen shots to show the differences between default and preferred behaviour:

Default Text Position

Preferred Text Position

It would also be fantastic if the icons could have a label set to the same value as their stencil entry, AWS guidelines state to use their naming convention, so I tend to find myself typing the name in, exactly as per the stencil name, every time.

Thanks for listening - Robert.

@rswift
Copy link
Author

rswift commented Sep 4, 2021

I've fixed my own issue with a hacky edit of the create_image_plist() function:

    image_pl['Wrap'] = "NO"
    image_pl['TextRelativeArea'] = "{{0, 0.66}, {1, 1}}"
    image_pl['Text'] = {"Text": "{\\rtf1\\ansi\\ansicpg1252\\cocoartf2580\\cocoatextscaling0\\cocoaplatform0{\\fonttbl\\f0\fnil\\fcharset0 HelveticaNeue;}{\\colortbl;\\red255\\green255\\blue255;\\red0\green0\\blue0;}{\\*\\expandedcolortbl;;\\cssrgb\\c0\\c0\\c0;}\\paperw11900\\paperh16840\\vieww12000\\viewh15840\\viewkind0\\pard\\tx720\\tx1440\\tx2160\\tx2880\\tx3600\\tx4320\\tx5040\\tx5760\\tx6480\\tx7200\\tx7920\\tx8640\\pardirnatural\\qc\\partightenfactor0\\f0\\fs24 \\cf2 " + stencil_name + "}", "TextAlongPathGlyphAnchor": "center"}

seems the text is RTF and needed to have the backslashes escaped. It'd be fab to have this incorporated formally with options etc. but understand I might be the only human with a desire for this capability :)

@m-radzikowski
Copy link
Owner

Hey,
sorry for the late response. I'm not using omnigraffle right now, so I don't focus on the tool. But if you create a PR with this change, I would be happy to test it and merge. Generating stencils with names should be enabled with a flag in the CLI.

@rswift
Copy link
Author

rswift commented Apr 23, 2022

Thanks for the offer, sorry it has taken so long!

#7 created, hope it works for you as well as it does for me :)

Cheers - Robert...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants