Giter VIP home page Giter VIP logo

redarrow-glyphs's Introduction

RedArrow-Glyphs

Now Glyphs users can also have red arrows!

This plugin points at possible outline errors, like FontAudit in FontLab Studio. This version only works in Glyphs 2.3 and newer.

When the plugin is active, red arrows will point to possible mistakes in your outlines.

These kinds of errors are detected:

  • Missing extremum points
  • Fractional coordinates
  • Fractional transformations
  • Incorrect smooth connections
  • Empty segments
  • Collinear vectors
  • Semi-horizontal and semi-vertical lines
  • Zero handles

Installation

Use the Plugin Manager.

But now that you’re here, you are probably looking for manual installation. Download the complete ZIP file and unpack it, or clone the repository.

Double click the .glyphsReporter file and confirm the dialog that appears in Glyphs.

Restart Glyphs.

Usage Instructions

To Display Outline Errors In The Current Glyph

Open a glyph in Edit View. Use View > Show Red Arrows to toggle the arrows.

To Show/Hide Error Description Labels

In the glyph view, open the context menu and choose Hide Error Labels/Show Error Labels.

To Find All Glyphs With Outline Errors

Go to the Font overview tab and choose the master you want to check. Use Edit > Select Glyphs With Outline Errors to select affected glyphs, then add a mark color to them, make a new list filter, or open a new tab. Whatever you like best that allows you to step through the glyphs and fix the outline errors.

Known bugs

  • Select Glyphs With Outline Errors doesn't catch errors in layers that are not in a master (exception layers).

Check the issue tracker and feel free to add any problems that you may encounter.

redarrow-glyphs's People

Contributors

jenskutilek avatar rafalbuchner avatar schriftgestalt avatar weiweihuanghuang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

redarrow-glyphs's Issues

Suppress fractional coordinates when Glyphs grid is subdivided

Hi, using RedArrow-Glyphs in a file where the unit grid-spacing has a subdivision of 5, almost every BCP is arrowed as an error with Fractional Coordinates, though in this context that is not an error. Could RedHandles be tweaked to respect the Glyphs grid settings?
Thanks

Collinear vectors

‘Collinear vectors’ errors are erroneously reported on the last segment of a contour.

Plugin not showing up on 2.6.4 (build 1286)

Hello Jens,

Hope you're well :)

For some reason the plugin doesn't show up in Glyphs. I've tried installing it manually from releases, as well as from the Plugin Manager. It's possible that I might be doing something wrong, but I don't know what.

I'm on macOS 10.15.5

Best,
Kalapi

Labels don't appear unless clicked

I'm on Glyphs Version 2.6.7 (1355) using the latest version of Red Arrows (1.0.1?). The text labels don't appear unless I click near the red arrow? Is this a new feature?

Feature request: Hovering on arrow should allow me to insert node

Hi Jens, I have an idea for improvement. Often Glyphs is not smart enough to insert extrema nodes, but Red Arrows of course sees them. It would be handy to be able to click on the arrows (or a click + some command key) to insert a node at the extremum without having to zoom in and out and change tool to do it.

Screenshot 2023-07-22 at 14 30 34

Issue with RedArrow-Glyphs

This is supposed to be only for Glyphs2, but if one double-clicks on the Reporter file to do the install it activates the older Glyphs app when both versions are installed but neither is open. It probably won't be a problem as long as anyone installing it notices that Glyphs v1.x.x is open, not G2.

Interference with other Plugin(s)

Sometimes I had users reporting, that my Variable Font Preview goes a little loco when the Red Arrows Plugin is also active.

I could now reproduce this while improving management of multiple fonts. Once Red Arrows is active, VFP can only deal with the first open font well. Wenn switching to another font, the redrawing gets very glitchy.

@jenskutilek do you happen to have an idea what part of Red Arrows could potentially cause other plugins to be affected in a way or another?

VFP is written in objc and I am prefixing all my classes. Currently I am rather clueless.

Edit: It is even more curious: When I launch Glyphs with Red Arrows off, VFP also behaves odd in some spots, then I turn RA on, and it keeps odd, but when turning RA off then, all is fine. :D

Not blaming your code at all. Just wanted add it for the record …

Red Arrow labels not showing

In the latest G3 [3072), macOS 10.13.6, no labels show up unless I hover over the red arrow. I know about the Hide/Show option; mine has always been set to Show.

Also I'm now noticing another colored arrow which I never noticed before (not often though), kind of a yellow color.

Are these changes intentional?

Follow-up (May 3): Have you had a chance to check with Georg on the issue of labels only showing with a hover?

Errors Not Showing Up

Version 2.5.1 (1134)
I recall fractional scaling, and floating point co-ordinates used to show up, now they don't?

No dialog appears

I'm using Red Arrows with Glyphs 2.6.5, but I can't get the dialog like the image.

image

I only want to check for extremes errors, can't I do this with this version?

Python error

Thanks for the tool! Seems very handy.

After setting the Preferences, I get the following error:

Traceback (most recent call last):
File "GlyphsApp/GlyphsApp/plugins.py", line 1158, in drawForegroundForLayer_options_
File "plugin.py", line 172, in foreground
self._updateOutlineCheck(layer)
File "plugin.py", line 289, in _updateOutlineCheck
self.outline_test.checkLayer()
File "outlineTestGlyphs.py", line 356, in checkLayer
self._runCurveTests(node)
File "outlineTestGlyphs.py", line 386, in _runCurveTests
self._checkInflectionsCurve(node)
File "outlineTestGlyphs.py", line 568, in _checkInflectionsCurve
ok, err = getInflectionsForCubic(
File "outlineTestGlyphs.py", line 130, in getInflectionsForCubic
if err_min < r < err_max:
TypeError: '<' not supported between instances of 'float' and 'objc.pyobjc_unicode'

Hope this helps!
– Tim

Visualisation problem

Hello! I have been using Red Arrow for a while, and it worked very well, but when I installed the new version, I don't see the plugin in Glyphs View window. It appears on my addons list though.

Any suggestions?
Thank you!

Differentiate Extremum Errors

It should be possible to classify missing extremum points by severity, e.g.

  • Bounding box relevant
  • Hinting relevant
  • LSB relevant

etc.

Version 0.6.2 (92c8cc8f4b) and later does not appear

Hi,

I’ve manually installed to 0.6.2 (92c8cc8) on the environment described below but RedArrow does not appear.

The logs from system.log is as follow:

Glyphs[19034]: Error loading /Library/Python/2.7/site-packages/vanilla/externalFrameworks/RBSplitView/RBSplitView.framework/RBSplitView:  dlopen(/Library/Python/2.7/site-packages/vanilla/externalFrameworks/RBSplitView/RBSplitView.framework/RBSplitView, 265): no suitable image found.  Did find:
		/Library/Python/2.7/site-packages/vanilla/externalFrameworks/RBSplitView/RBSplitView.framework/RBSplitView: file too short
Glyphs[19034]: RedArrow has encountered a fatal error, and will now terminate.

Version 0.6.2 (22347fe) and before works fine.

macOS: 10.9.5 Mavericks
Glyphs: Version 2.3 (895)

Best regards,
Yutaka

AttributeError: 'objc.native_selector' object has no attribute 'parent'

I get this error sometimes now, not sure what triggers it atm

Traceback (most recent call last):
  File "GlyphsApp/GlyphsApp/plugins.py", line 1145, in drawForegroundForLayer_options_
  File "~/Library/Application Support/Glyphs/Plugins/RedArrow.glyphsReporter/Contents/Resources/plugin.py", line 104, in foreground
    self._updateOutlineCheck(layer)
  File "~/Library/Application Support/Glyphs/Plugins/RedArrow.glyphsReporter/Contents/Resources/plugin.py", line 214, in _updateOutlineCheck
    self.options["grid_length"] = layer.parent.parent.gridLength
AttributeError: 'objc.native_selector' object has no attribute 'parent'

V 0.6.6 does not show

Hello,
I’ve manually updated RA to Version 0.6.6 on Mavericks OS 10.9.5 G2 Version 2.4.2 (1009) but it doesn’t display in the app :/


13/04/17 10:45:54,173 Glyphs[83966]: RedArrow has encountered a fatal error, and will now terminate.
13/04/17 10:45:54,173 Glyphs[83966]: An uncaught exception was raised during execution of the main script:

error: _ModalWindow is overriding existing Objective-C class

This may mean that an unexpected error has occurred, or that you do not have all of the dependencies for this bundle.
13/04/17 10:45:54,173 Glyphs[83966]: Problem with Plugin at Path: /Users/xxxxx/Library/Application Support/Glyphs/Plugins/RedArrow.glyphsReporter
13/04/17 10:45:54,174 Glyphs[83966]: Problem with Plugin at Path: /Users/xxxxx/Library/Application Support/Glyphs/Plugins/RedArrow.glyphsReporter (protocol)

0.6.2 crashes build 1007

OS X 10.10.5, Build 1007 -- In font window, Select Glyphs With Outline Errors panel open, click OK using defaults, G2 crashes consistently. Crash report sent to Georg.

Idea for "Select Glyphs With Outline Errors"

Hi,

I think it would be really useful to be able to choose which outlines errors should be included in the selection, preferably with a checkbox dialog. Something like this:

—— Select Glyphs with Outline Errors ————————
|                                           |
|   [x] Missing extremum points             |
|   [ ] Fractional coordinates              |
|   [ ] Fractional transformations          |
|   [ ] Incorrect smooth connections        |
|   [x] Empty segments                      |
|   [ ] Collinear vectors                   |
|   [ ] Semi-horizontal/vertical lines      |
|   [ ] Zero handles                        |
|                                           |
|                       – Select glyphs –   |
|                                           |
—————————————————————————————————————————————

Thank you for the good work!

Regards,
Erik

Fractional transformations after simple rotation

After rotating a simple component, I get a Fractional transformations error. I just used the rotation tool in the right sidebar to rotate it 180 degrees. Is this expected? What is fractional transformation mean exactly?

Screen Shot 2020-06-03 at 9 03 05 PM

Load/Save Preferences

Use the dialog shown in "Select Glyphs with Outline Errors" to save preferences

  • in the current Glyphs file
  • in the app defaults

Maybe offer different presets?

Vanilla not detected?

I get this error:

Please install vanilla to enable UI dialogs for RedArrow. You can install vanilla through Glyphs > Preferences > Addons > Modules.

But definitely have Vanilla:
<module 'vanilla' from '/Library/Python/2.7/site-packages/vanilla-0.1-py2.7.egg/vanilla/__init__.pyc'>

Version 2.5.1 (1138)

Disable while on Hand tool or cursor

I tried to do this but it didnt work 😅😅
usually add this:

currentController = self.controller.view().window().windowController()
if currentController:
    tool = currentController.toolDrawDelegate()
    # don't activate if on cursor tool, or pan tool
    if not tool.isKindOfClass_( NSClassFromString("GlyphsToolText") ) and not tool.isKindOfClass_( NSClassFromString("GlyphsToolHand") ):

Red Arrow is broken again in Glyphs latest beta Version 2.5.2 (1147)

Red Arrow is broken again in Version 2.5.2 (1147). I tried reinstalling Red Arrows via the plugins manager and get “Task exited with status 128” error message. I installed Red Arrows by double clicking on the GlyphsReporter plugin file and reinstalling the modules vanilla. After restarting Glyphs the plugin manager shows Red Arrows as not installed and I get the following output in the macro panel

Traceback (most recent call last):
File “GlyphsApp/GlyphsApp/plugins.py”, line 1152, in drawForegroundForLayer_options_
File “/Users/wascoj/Library/Application Support/Glyphs/Plugins/RedArrow.glyphsReporter/Contents/Resources/plugin.py”, line 104, in foreground
self._updateOutlineCheck(layer)
File “/Users/wascoj/Library/Application Support/Glyphs/Plugins/RedArrow.glyphsReporter/Contents/Resources/plugin.py”, line 216, in _updateOutlineCheck
layer.drawPoints(outline_test_pen)
File “GlyphsApp/GlyphsApp/init.py”, line 5954, in DrawPointsWithPen
File “GlyphsApp/GlyphsApp/init.py”, line 6794, in GSPath__drawPoints
File “/Users/wascoj/Library/Application Support/Glyphs/Plugins/RedArrow.glyphsReporter/Contents/Resources/miniFontTools/pens/pointPen.py”, line 112, in endPath
self._flushContour(segments)
File “/Users/wascoj/Library/Application Support/Glyphs/Plugins/RedArrow.glyphsReporter/Contents/Resources/outlineTestPenGlyphs.py”, line 88, in _flushContour
super(OutlineTestPenGlyphs, self)._flushContour(reordered_segments)
File “/Users/wascoj/Library/Application Support/Glyphs/Plugins/RedArrow.glyphsReporter/Contents/Resources/outlineTestPen.py”, line 613, in _flushContour
self._prev_ref = prev_points[-2][0]
IndexError: list index out of range

Doesn't work in latest G3 [3002]

Macro Panel output from [3002]:

_flushContour
_runMoveTests
1 [(, False, None, {})]
_runLineTests
1 [(, False, None, {})]
runLineTests
65 [(, False, None, {})]
65 [(, False, None, {})]
35 [(, True, None, {})]
Traceback (most recent call last):
File "GlyphsApp/plugins.py", line 1124, in drawForegroundForLayer_options

File "plugin.py", line 112, in foreground
self._updateOutlineCheck(layer)
File "plugin.py", line 232, in _updateOutlineCheck
layer.drawPoints(outline_test_pen)
File "GlyphsApp/init.py", line 6805, in DrawPointsWithPen
File "GlyphsApp/init.py", line 7844, in GSPath__drawPoints
File "pointPen.py", line 140, in endPath
self._flushContour(segments)
File "outlineTestPen.py", line 866, in _flushContour
bcp1, bcp2, pt = points[0][0], points[1][0], points[2][0]
IndexError: list index out of range
_flushContour
_runMoveTests
1 [(, False, None, {})]
_runLineTests
1 [(, False, None, {})]
_runLineTests
65 [(, False, None, {})]
65 [(, False, None, {})]
35 [(, True, None, {})]
_flushContour
_runMoveTests
1 [(, False, None, {})]
_runLineTests
1 [(, False, None, {})]
_runLineTests
65 [(, False, None, {})]
65 [(, False, None, {})]
35 [(, True, None, {})]
_flushContour
_runMoveTests
1 [(, False, None, {})]
_runLineTests
1 [(, False, None, {})]
_runLineTests
65 [(, False, None, {})]
65 [(, False, None, {})]
35 [(, True, None, {})]
_flushContour
_runMoveTests
1 [(, False, None, {})]
_runLineTests
1 [(, False, None, {})]
_runLineTests
65 [(, False, None, {})]
65 [(, False, None, {})]
35 [(, True, None, {})]
_flushContour
_runMoveTests
1 [(, False, None, {})]
_runLineTests
1 [(, False, None, {})]
_runLineTests
65 [(, False, None, {})]
65 [(, False, None, {})]
35 [(, True, None, {})]
_flushContour
_runMoveTests
1 [(, False, None, {})]
_runLineTests
1 [(, False, None, {})]
_runLineTests
65 [(, False, None, {})]
65 [(, False, None, {})]
35 [(, True, None, {})]
_flushContour
_runMoveTests
1 [(, False, None, {})]
_runLineTests
1 [(, False, None, {})]
_runLineTests
65 [(, False, None, {})]
65 [(, False, None, {})]
35 [(, True, None, {})]
_flushContour
_runMoveTests
1 [(, False, None, {})]
_runLineTests
1 [(, False, None, {})]
_runLineTests
65 [(, False, None, {})]
65 [(, False, None, {})]
35 [(, True, None, {})]
_flushContour
_runMoveTests
1 [(, False, None, {})]
_runLineTests
1 [(, False, None, {})]
_runLineTests
65 [(, False, None, {})]
65 [(, False, None, {})]
35 [(, True, None, {})]
_flushContour
_runMoveTests
1 [(, False, None, {})]
_runLineTests
1 [(, False, None, {})]
_runLineTests
65 [(, False, None, {})]
65 [(, False, None, {})]
35 [(, True, None, {})]
_flushContour
_runMoveTests
1 [(, False, None, {})]
_runLineTests
1 [(, False, None, {})]
_runLineTests
65 [(, False, None, {})]
65 [(, False, None, {})]
35 [(, True, None, {})]
_flushContour
_runMoveTests
1 [(, False, None, {})]
_runLineTests
1 [(, False, None, {})]
_runLineTests
65 [(, False, None, {})]
65 [(, False, None, {})]
35 [(, True, None, {})]
_flushContour
_runMoveTests
1 [(, False, None, {})]
_runLineTests
1 [(, False, None, {})]
_runLineTests
65 [(, False, None, {})]
65 [(, False, None, {})]
35 [(, True, None, {})]
_flushContour
_runMoveTests
1 [(, False, None, {})]
_runLineTests
1 [(, False, None, {})]
_runLineTests
65 [(, False, None, {})]
65 [(, False, None, {})]
35 [(, True, None, {})]
_flushContour
_runMoveTests
1 [(, False, None, {})]
_runLineTests
1 [(, False, None, {})]
_runLineTests
65 [(, False, None, {})]
65 [(, False, None, {})]
35 [(, True, None, {})]
_flushContour
_runMoveTests
1 [(, False, None, {})]
_runLineTests
1 [(, False, None, {})]
_runLineTests
65 [(, False, None, {})]
65 [(, False, None, {})]
35 [(, True, None, {})]
_flushContour
_runMoveTests
1 [(, False, None, {})]
_runLineTests
1 [(, False, None, {})]
_runLineTests
65 [(, False, None, {})]
65 [(, False, None, {})]
35 [(, True, None, {})]
_flushContour
_runMoveTests
1 [(, False, None, {})]
_runLineTests
1 [(, False, None, {})]
_runLineTests
65 [(, False, None, {})]
65 [(, False, None, {})]
35 [(, True, None, {})]
_flushContour
_runMoveTests
1 [(, False, None, {})]
_runLineTests
1 [(, False, None, {})]
_runLineTests
65 [(, False, None, {})]
65 [(, False, None, {})]
35 [(, True, None, {})]
_flushContour
_runMoveTests
1 [(, False, None, {})]
_runLineTests
1 [(, False, None, {})]
_runLineTests
65 [(, False, None, {})]
65 [(, False, None, {})]
35 [(, True, None, {})]
_flushContour
_runMoveTests
1 [(, False, None, {})]
_runLineTests
1 [(, False, None, {})]
_runLineTests
65 [(, False, None, {})]
65 [(, False, None, {})]
35 [(, True, None, {})]
_flushContour
_runMoveTests
1 [(, False, None, {})]
_runLineTests
1 [(, False, None, {})]
_runLineTests
65 [(, False, None, {})]
65 [(, False, None, {})]
35 [(, True, None, {})]
_flushContour
_runMoveTests
1 [(, False, None, {})]
_runLineTests
1 [(, False, None, {})]
_runLineTests
65 [(, False, None, {})]
65 [(, False, None, {})]
35 [(, True, None, {})]
_flushContour
_runMoveTests
1 [(, False, None, {})]
_runLineTests
1 [(, False, None, {})]
_runLineTests
65 [(, False, None, {})]
65 [(, False, None, {})]
35 [(, True, None, {})]
_flushContour
_runMoveTests
1 [(, False, None, {})]
_runLineTests
1 [(, False, None, {})]
_runLineTests
65 [(, False, None, {})]
65 [(, False, None, {})]
35 [(, True, None, {})]
_flushContour
_runMoveTests
1 [(, False, None, {})]
_runLineTests
1 [(, False, None, {})]
_runLineTests
65 [(, False, None, {})]
65 [(, False, None, {})]
35 [(, True, None, {})]
_flushContour
_runMoveTests
1 [(, False, None, {})]
_runLineTests
1 [(, False, None, {})]
_runLineTests
65 [(, False, None, {})]
65 [(, False, None, {})]
35 [(, True, None, {})]
_flushContour
_runMoveTests
1 [(, False, None, {})]
_runLineTests
1 [(, False, None, {})]
_runLineTests
65 [(, False, None, {})]
65 [(, False, None, {})]
35 [(, True, None, {})]
_flushContour
_runMoveTests
1 [(, False, None, {})]
_runLineTests
1 [(, False, None, {})]
_runLineTests
65 [(, False, None, {})]
65 [(, False, None, {})]
35 [(, True, None, {})]
_flushContour
_runMoveTests
1 [(, False, None, {})]
_runLineTests
1 [(, False, None, {})]
_runLineTests
65 [(, False, None, {})]
65 [(, False, None, {})]
35 [(, True, None, {})]
_flushContour
_runMoveTests
1 [(, False, None, {})]
_runLineTests
1 [(, False, None, {})]
_runLineTests
65 [(, False, None, {})]
65 [(, False, None, {})]
35 [(, True, None, {})]
_flushContour
_runMoveTests
1 [(, False, None, {})]
_runLineTests

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.