SOLVED Guidelines: color and measurements



  • Couple of questions regarding FontParts x RF:

    1. FontParts has a color argument in the appendGuideline() method. Doesn't seem to individually override color preferences in Robofont. Am I doing something wrong?

    2. Robofont has a great feature that allows guides to Show Measurements. Any way to individually specify this when appending a guideline with Python?

    TIA,
    Ryan



  • hi @ryan,

    1. as far as I know, all local guides and all global guides have the same colors (defined in Preferences > Glyph View > Appearance).

    2. you can turn on measurements by setting a guide’s showMeasurements attribute to True:

      glyph = CurrentGlyph()
      guide = glyph.appendGuideline((0, 200), 0)
      guide.showMeasurements = True
      


  • @gferreira

    1 - Yeah I guess I'm just wondering what use the color attribute has in FontParts if it can't change individual guides in RF. In the case below, the yellow guideline color I set does not visually override my preferences, which specify blue. It stays blue, but the yellow value is still stored. Is it a non-visual marking system that one can use to categorize guides programmatically?
    dff411ea-3cc3-4ad3-83cc-11f927ef990f-image.png

    2 - Great, thanks! I was having difficulty finding this on FontParts, but now see that it's here on Robofont’s site.


  • admin

    so far RoboFont does not apply guide color while drawing the guideline, and maybe it should...

    see the guideline spec



  • I'd really like guildeline colors. :)



  • guideline colors are coming in RF3.3b :)

    Screen Shot 2019-03-01 at 09.31.20.png

    g = CurrentGlyph()
    g.appendGuideline((0, 100), 0)
    g.appendGuideline((0, 200), 0, color=(1, 0, 0, 1))
    g.appendGuideline((0, 300), 0, color=(0, 1, 0, 1))
    g.appendGuideline((0, 400), 0, color=(0, 0, 1, 1))
    

    thanks @frederik !



  • Yay! Thanks Frederik! Can the alpha value be set to 0 to hide the guides? I could use that.


  • admin

    a cloaking guideline device, cool!!

    it is possible to set the alpha to zero, its not hidden but invisible



  • @frederik Cool. This will be really useful. I have a smart guide extension that doesn't work so well because it adds/removes guidelines. It'll be much better with this new cloaking method.



  • Yes! Thanks @frederik & all :) Looking forward to it.