FontLab Forum
2012-05-22, 05:58:48 *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to the FontLab forum, read how to use it! Update: Archives from old MSN forums are now available on our forum.
 
   Home   Help Search Calendar Downloads Tags Login Register  
Del.icio.us Digg FURL FaceBook Stumble Upon Reddit SlashDot

Pages: [1]
  Print  
Author Topic: Command "Select all glyphs with same mark color as selected glyph"  (Read 1826 times)
Arno Enslin
Hero Member
*****

Karma: +8/-0
Germany Germany

Posts: 98



« on: 2010-05-26, 04:16:42 »

If you have color marked glyphs, it would be useful to have a command, with the help of which you can select all glyphs, that are marked in the same color as glyphs, that are actually selected. If more than one glyph is selected, the procedure should check, whether the selected glyphs have the same color. If not, it should post the message "Error: Selected glyphs are marked with different colors!"
Logged
mekkablue
Beta: FontLab Studio Mac
Hero Member
***

Karma: +0/-0
Austria Austria

Posts: 40



WWW
« Reply #1 on: 2010-06-21, 10:58:29 »

You can do that already in FLS5. The following script takes the mark color of the current glyph as reference. There can be only one current glyph, so there is no need for an error message:
Code:
#FLM: Select same color
schrift = fl.font
if schrift == None:
exit

curgly = fl.glyph

for index in range( len( schrift ) ):
glyph = schrift[index]
if glyph.mark == curgly.mark:
fl.Select( index )
Logged
Tags:
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!