Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Generate vfb's from Fontlab MM vfb
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  12 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
ttmt  
View profile  
 More options Jul 14 2012, 11:43 am
From: ttmt <ttm...@googlemail.com>
Date: Sat, 14 Jul 2012 08:43:25 -0700 (PDT)
Local: Sat, Jul 14 2012 11:43 am
Subject: Generate vfb's from Fontlab MM vfb

Hi all

Is it possible to use Robofab to generate weights from an MM vfb.
I have a Fontlab MM vfb that I want to generate weights from.
I can do this using Fontlab Tools > Multiple Maters > Generate Instance etc.
but I was hoping to use a Robofab script to quickly generate the weights.

ttmt


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Frank Grießhammer  
View profile  
 More options Jul 14 2012, 12:12 pm
From: Frank Grießhammer <frankr...@gmail.com>
Date: Sat, 14 Jul 2012 09:12:28 -0700
Local: Sat, Jul 14 2012 12:12 pm
Subject: Re: [rf] Generate vfb's from Fontlab MM vfb
Hi,

following up on my comment on Typophile (http://ww.typophile.com/node/94659):
How recent is the version of Robofab you’re using? Updating might be a solution.

Otherwise, you can to re-write the script to not use dialogues – judging by your traceback, a module (part of Carbon?) is imported, which no longer exists.

Cheers,
Frank

On 14.Jul2012, at 08:43 , ttmt wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ttmt  
View profile  
 More options Jul 15 2012, 5:54 am
From: ttmt <ttm...@googlemail.com>
Date: Sun, 15 Jul 2012 02:54:38 -0700 (PDT)
Local: Sun, Jul 15 2012 5:54 am
Subject: Re: [rf] Generate vfb's from Fontlab MM vfb

Hi

I just installed the lastest version of Robofab
- RoboFab560M_plusDependencies

Still no luck with the Ben Kiel script - I have looked through the script
but I don't understand enough python to re-write it without dialogues.

I don't need the code to be expandable, I just need a hard coded function
that will generate 6 vfb weights from a MM vfb.

Is there a Robofab function that can generate vfb's ?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Miguel Sousa  
View profile  
 More options Jul 15 2012, 6:56 am
From: Miguel Sousa <mso...@adobe.com>
Date: Sun, 15 Jul 2012 03:56:14 -0700
Local: Sun, Jul 15 2012 6:56 am
Subject: Re: [rf] Generate vfb's from Fontlab MM vfb

If the only thing you need is to make vfb font instances, then the script below should do it.
Keep in mind that it assumes that the MM font has only one axis.
To support MM fonts with more axes just edit the tuples in the instValues list.

M.

####
fontMM = fl.font
instValues = [(200),(500),(800)]

for value in instValues:
fontInstance = Font(fontMM, value)
fl.Add(fontInstance)
###

On 2012/07/15, at 02:54, ttmt wrote:

Hi

I just installed the lastest version of Robofab - RoboFab560M_plusDependencies

Still no luck with the Ben Kiel script - I have looked through the script but I don't understand enough python to re-write it without dialogues.

I don't need the code to be expandable, I just need a hard coded function that will generate 6 vfb weights from a MM vfb.

Is there a Robofab function that can generate vfb's ?

On Saturday, July 14, 2012 5:12:28 PM UTC+1, frankrolf wrote:

Hi,

following up on my comment on Typophile (http://ww.typophile.com/node/94659):
How recent is the version of Robofab you’re using? Updating might be a solution.

Otherwise, you can to re-write the script to not use dialogues – judging by your traceback, a module (part of Carbon?) is imported, which no longer exists.

Cheers,
Frank

On 14.Jul2012, at 08:43 , ttmt wrote:

--
You received this message because you are subscribed to the Google Groups "RoboFab" group.
To post to this group, send email to robofab@googlegroups.com<mailto:robofab@googlegroups.com>
To unsubscribe from this group, send email to robofab-unsubscribe@googlegroups.com<mailto:robofab-unsubscribe@googlegroup s.com>
For more options, visit this group at http://groups.google.com/group/robofab?hl=en

Messages from newly joined members are subject to moderation.
Download RoboFab and documentation at http://robofab.com<http://robofab.com/>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ttmt  
View profile  
 More options Jul 15 2012, 7:43 am
From: ttmt <ttm...@googlemail.com>
Date: Sun, 15 Jul 2012 04:43:31 -0700 (PDT)
Local: Sun, Jul 15 2012 7:43 am
Subject: Re: [rf] Generate vfb's from Fontlab MM vfb

Thank you Miguel, thats exactly what I was looking for.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ttmt  
View profile  
 More options Jul 15 2012, 9:22 am
From: ttmt <ttm...@googlemail.com>
Date: Sun, 15 Jul 2012 06:22:27 -0700 (PDT)
Local: Sun, Jul 15 2012 9:22 am
Subject: Re: [rf] Generate vfb's from Fontlab MM vfb

It appears I need more.

Would it be possible to add a weight name and value to the instance as they
are created.

I was hoping something like this might work.

from robofab.world import CurrentGlyph, CurrentFont

####
fontMM = fl.font
instValues = [(0),(200),(400),(600),(800),(1000)]
weights = ['Thin','Light','Regular','Medium','Bold','Heavy']
weightVals = [(250),(300),(400),(500),(700),(900)]

for value in instValues:
fontInstance = Font(fontMM, value)
fl.Add(fontInstance)
 fl.info.familyName = "TestFont"
fl.info.weightName = weights[value]
fl.info.weightValue = weightVals[value]
###


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Twardoch  
View profile  
 More options Jul 15 2012, 9:36 am
From: Adam Twardoch <a...@twardoch.com>
Date: Sun, 15 Jul 2012 15:36:33 +0200
Local: Sun, Jul 15 2012 9:36 am
Subject: Re: [rf] Generate vfb's from Fontlab MM vfb
Miguel's code uses the FontLab Python API ( http://e-font.de/flpydoc/ ),
not the RoboFab API. Those APIs use different notation for attributes
such as family name etc. So the code you need is:

####

fontMM = fl.font

instValues = [(0),(200),(400),(600),(800),(1000)]

weights = ['Thin','Light','Regular','Medium','Bold','Heavy']

weightVals = [(250),(300),(400),(500),(700),(900)]

for index in range(len(instValues)):

    instValue = instValues[index]

    font = Font(fontMM, instValue)

    fl.Add(font)

    font.pref_family_name = "TestFont"

    font.weight = weights[index]

    font.pref_style_name = font.weight

    font.weight_code = weightVals[index]

    font.family_name = font.pref_family_name + " " + font.pref_style_name

    font.style_name = "Regular"

    font.full_name = font.pref_family_name + " " + font.pref_style_name

    font.font_name = font.pref_family_name.replace(" ", "") + "-" + font.pref_style_name.replace(" ", "")

###

Best,
Adam

On 12-07-15 15:22, ttmt wrote:

--

May success attend your efforts,
-- Adam Twardoch
(Remove "list." from e-mail address to contact me directly.)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ttmt  
View profile  
 More options Jul 15 2012, 11:33 am
From: ttmt <ttm...@googlemail.com>
Date: Sun, 15 Jul 2012 08:33:40 -0700 (PDT)
Local: Sun, Jul 15 2012 11:33 am
Subject: Re: [rf] Generate vfb's from Fontlab MM vfb

Thanks Adam thats exactly what I was looking for.

Does the Fontlab Python API have a Save function to save the generated vfb
- I have looked but can't see it.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Twardoch  
View profile  
 More options Jul 15 2012, 11:37 am
From: Adam Twardoch <a...@twardoch.com>
Date: Sun, 15 Jul 2012 17:37:25 +0200
Local: Sun, Jul 15 2012 11:37 am
Subject: Re: [rf] Generate vfb's from Fontlab MM vfb

fl.font = font
fl.Save(vfbpath)
where font is your instance font and vfbpath is the path to your desired VFB file.

Sent from my mobile phone.

On 15.07.2012, at 17:33, ttmt <ttm...@googlemail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Twardoch  
View profile  
 More options Jul 15 2012, 11:49 am
From: Adam Twardoch <a...@twardoch.com>
Date: Sun, 15 Jul 2012 17:49:11 +0200
Local: Sun, Jul 15 2012 11:49 am
Subject: Re: [rf] Generate vfb's from Fontlab MM vfb

So at the end the beginning of the script, you might add:

import os.path

and at the end of the "for" loop you might add:

  font.file_name = os.path.join(os.path.split(fontMM.file_name)[0], font.font_name + ".vfb")
  fl.font = font
  fl.Save(font.file_name)

Then the VFBs will be saved in the same folder as your MM.

A.

Sent from my mobile phone.

On 15.07.2012, at 17:37, Adam Twardoch <a...@twardoch.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ben Kiel  
View profile  
 More options Jul 15 2012, 12:13 pm
From: Ben Kiel <b...@houseind.com>
Date: Sun, 15 Jul 2012 12:13:45 -0400
Local: Sun, Jul 15 2012 12:13 pm
Subject: Re: [rf] Generate vfb's from Fontlab MM vfb

Ttmt:

It's likely that you don't have the latest version of RobFab installed, or that it's not installed correctly. You didn't say if you were on a Mac or a PC, and which version of FontLab or OS you are using, so it's pretty hard to diagnose.

You may want to look at this: https://vimeo.com/36877594

You may also need to install the SVN version of Robofab. If SVN isn't your thing, then you can just download the latest svn Lib folder here:

http://cl.ly/3B070X401O2S3x0O2M2j

Replace your RoboFab lib folder with that, and all may work.

If you're having problems with scripts, it'd be nice for you to contact the author, my contact info is easy to find. I don't follow much on Typophile.

Best,
Ben

On Jul 15, 2012, at 5:54 AM, ttmt wrote:

Ben Kiel
http://www.houseind.com
Direct Dial: (302) 766-7593

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ttmt  
View profile  
 More options Jul 29 2012, 3:47 am
From: ttmt <ttm...@googlemail.com>
Date: Sun, 29 Jul 2012 00:47:27 -0700 (PDT)
Local: Sun, Jul 29 2012 3:47 am
Subject: Re: [rf] Generate vfb's from Fontlab MM vfb

Sorry for not replying here, I;m using Mac 10.7, Fontlab 5.1.1, I have the
latest Robofab installed - I used the tutorial you supplied on  vimeo.

I've got what I need using the script Adam supplied.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »