FontLab Forum
2012-02-08, 21:13:12 *
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: CallCommand 'create glyphs if empty'  (Read 3655 times)
emtype
Beta: FontLab Studio Mac
Sr. Member
***

Karma: +0/-0
Spain Spain

Posts: 8



WWW
« on: 2009-05-11, 10:26:35 »

Hello,

Anybody know the CallCommand equivalent for 'create glyphs if empty'?

I know SymbolNew CallCommand (32884) it's similar but works a bit diferent...

thank you,


Eduardo Manso { www.emtype.net }

Logged
Eigi
Beta: FontLab Studio Mac
Hero Member
***

Karma: +7/-0
Germany Germany

Posts: 55



WWW
« Reply #1 on: 2009-05-11, 12:41:28 »

Hell,

you can use this to get a full list of all CallCommand constants:
Code:
import fl_cmd

l = dir(fl_cmd)
l.sort()
for i in l:
print i, getattr(fl_cmd, i)

To fill empty slots in the curent encoding, try this:
Code:
enc = fl.font.encoding
for i in range(len(enc)):
if not fl.font.has_key(enc[i].name):
glyph = fl.font.GenerateGlyph(enc[i].name)
if len(glyph.components) > 0:
fl.font.glyphs.append(glyph)
fl.UpdateFont(fl.ifont)

regards

Eigi
Logged
emtype
Beta: FontLab Studio Mac
Sr. Member
***

Karma: +0/-0
Spain Spain

Posts: 8



WWW
« Reply #2 on: 2009-05-12, 04:58:35 »

Eigi,

both things are exactly what I'm was looking...

Thank you!

Eduardo Manso { www.emtype.net }

Logged
Arno Enslin
Hero Member
*****

Karma: +8/-0
Germany Germany

Posts: 98



« Reply #3 on: 2010-11-11, 02:38:01 »

Why does fl.CallCommand(33538) not work? "33538" is the code for clearing the output window.
Logged
Eigi
Beta: FontLab Studio Mac
Hero Member
***

Karma: +7/-0
Germany Germany

Posts: 55



WWW
« Reply #4 on: 2010-11-11, 04:09:26 »

Hello,

I don't know why the command does't work. But you can try something like this
Code:
fl.output = ''

Eigi
Logged
Arno Enslin
Hero Member
*****

Karma: +8/-0
Germany Germany

Posts: 98



« Reply #5 on: 2010-11-11, 05:35:27 »

Yes, this works. Thanks, Eigi.
Logged
Tags: CallCommand 
Pages: [1]
  Print  
 
Jump to:  

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