New to Typophile? Accounts are free, and easy to set up.
Hi all,
I've been doing some experiments with the Blend Fonts command to produce interpolated weights.
My question concerns the interpolation of the kerning values. The interpolated weights produced from the master blended font contains some of the kerning pairs that are present in the orginal fonts but not all of them.
I made sure that the orginal light and bold weights had the same kerning pairs but with different values.
Should the kerning be interpolated ?
Is there a better way of doing this ?
Is there a reason way some kerning pairs are present and not others ?
1 Jul 2008 — 12:52pm
You can interpolate kerning with Superpolator.
—K
1 Jul 2008 — 12:59pm
I don't have OS X 10.5
1 Jul 2008 — 1:09pm
> The interpolated weights produced from the master blended font contains some of the kerning pairs that are present in the orginal fonts but not all of them. [...] Is there a reason way some kerning pairs are present and not others ?
Maybe because those pairs had a kerning value of 0 (zero) in the interpolated instance?
I work with MM fonts all the time containing thousands of pairs and I never had a problem. If there's a problem it might be in the Blend Fonts function. I recall it being quite buggy in regards of handling kerning.
1 Jul 2008 — 1:51pm
ReginaldV,
I suggest you ditch the Blend feature approach and build your MM fonts with the Mask-to-Master technique.
James
1 Jul 2008 — 1:54pm
Yes I think you could be right about Blend font being buggy.
Is it best then to create a MM font and generate the weights from that.
I'm reading the FL manual now but finding it hard to work out how to create a MM font from the light and bold weights.
I'm I barking up the wrong tree here ?
1 Jul 2008 — 2:17pm
James,
What is the Mask-to-Master technique ?
1 Jul 2008 — 3:33pm
[Ups, didn't read careful enough ...]
1 Jul 2008 — 4:36pm
I agree to terminaldesign, forget the blend feature and use Mask to Master. However, Mask to Master does not merge the kerning.
If you need to transfer the kerning between masters or fonts you can use afm files. The metrics window allows you to export and import them. When you import an afm into an MM font, only the currently active master will be affected. Same for export. This works really reliably and has helped me repair MM fonts quite a few times already.
1 Jul 2008 — 5:40pm
Didn't FL used to have a bug where exported AFM files were sometimes incomplete? Was that fixed in a dot release?
T
1 Jul 2008 — 7:33pm
MM via Mask-to master
1. Create two fonts that you want to create a MM with. Export their afm files via the metrics window.
2. Make sure all the glyphs have the same number and type of points, in the same relative position. Also make sure all path directions are the same for each glyph.
3. Assign one of the fonts to the mask layer Tools>Mask> Assign Font Mask
4. Define the appropriate axis: Tools> Multiple Master> Define New Axis
5. At this point if not before, it is a good idea to Save As and assign this soon to be MM vfb a new name. Just in case something goes wrong
6. Select the glyphs in the font window and using Mask to Master convert the Mask to the appropriate Master Axis: Tools>Multiple Master> Mask to Master. When you are asked whether to let FontLab add points where necessary, make sure you select NO
If you have done your prep correctly you will have no problems, but that hardly ever happens, you will always have a few problems. At this point you will most likely have to import the kerning and sometimes the metrics via the afm files you created to the newly created MM axes.
1 Jul 2008 — 7:35pm
I would also recommend not kerning anything in the original fonts, and do all your kerning in the newly created MM vfb. But that is just a personal preference.
2 Jul 2008 — 12:52am
terminaldesign,
I'm confused by your description
I have two fonts that I want to make into one MM font, so
3. Assign one of the fonts to the mask layer Tools>Mask> Assign Font Mask
I do this to the first font (Font 1)
4. Define the appropriate axis: Tools> Multiple Master> Define New Axis
This applies to Font 1
5. At this point if not before, it is a good idea to Save As and assign this soon to be MM vfb a new name. Just in case something goes wrong
Save Font 1 as the MM font
6. Select the glyphs in the font window and using Mask to Master convert the Mask to the appropriate Master Axis: Tools>Multiple Master> Mask to Master. When you are asked whether to let FontLab add points where necessary, make sure you select NO
Does this apply to Font 1 or is this Font 2 ?
I can't work out how I get the two fonts into one file.
Sorry if I'm being stupid
2 Jul 2008 — 2:58am
The Bold font and the light font are both open.
Assign the light font to the mask layer of the bold font.
Define the new axis (weight)
Using Mask to Master, assign the mask (light font) to the Wt0 axis. (As opposed to the Wt1 axis which would be the Bold font)
You now have the light font at axis Wt0 and the Bold font at axis Wt1.
Both axes are in the one font. Which started out as just your bold font
2 Jul 2008 — 4:29am
Perhaps this small Mac/Win command line Java tool is useful in this case:
http://www.fonttools.org/downloads/DTL_AFMInterpolator.zip
________________________________________________________________
DTL AFM Interpolator version 1.1
last update: 2 July 2008
New in version 1.1:
- also interpolates POS values next to KPX
- negligible values (specified by an optional, extra argument) are left out
- instead of using a space as delimiter character, it now delimits using any amount of whitespace
Usage:
java AFMInterpolator [file1] [file2] [factor] [flag] [output] ([limit])
- file1: first AFM file
- file2: second AFM file
- factor: interpolation percentage (0-100)
- flag: 0 leaves incomplete pairs out, 1 ignores missing pairs and calculates using 0 instead
- output: output file
- limit: lower limit for values, leaves pairs with values smaller or equal out (optional)
example use:
java AFMInterpolator fontname_regular.afm fontname_bold.afm 50 1 fontname_medium.afm 10
Note: output file is automatically overwritten
2 Jul 2008 — 4:39am
Very cool! Need to try that later. Thanks for sharing.
The next thing would be to get the kerning data converted to OT feature code elegantly, for use with AFDKO. Could that be done alongside?
3 Jul 2008 — 12:57am
Hi Tim, this would need additional information: your class definitions, plus, per class, which is the key glyph and whether the class is used left, right or both side(s).
3 Jul 2008 — 5:37am
Alternatively, Robofab offers a kerning interpolation method where the kerning of two seperate fonts can be interpolated in another font directly in FontLab:
from robofab.world import CurrentFont
from robofab.interface.all.dialogs import SelectFont
interpolval = 0.5 # 50% interpolation
f1 = CurrentFont()
f2 = SelectFont('please select mininum pole')
f3 = SelectFont('please select maximum pole')
k1 = f1.kerning
k2 = f2.kerning
k3 = f3.kerning
k1.interpolate(k2, k3, interpolval, clearExisting = True)
f1.update()
print 'done'
3 Jul 2008 — 11:29am
I've gone down the route of creating the MM font with the 'Mask to Master' technique described above. Surprisingly everything seems to be going really well (I was always concerned that making an MM font would be complicated).
All the glyphs are coloured green, (which means there are no problems right). The spacing and kerning all seems to be interpolating correctly with the same number of pairs in all generated instances. Before I get too excited is there anything else I should be looking for. I did spend a long time preping the light and bold weights, but my experience of developing fonts has always been two steps forward and one step back. This seems like two steps forward and I'm worried I'm missing something.
3 Jul 2008 — 12:02pm
> Before I get too excited is there anything else I should be looking for.
Sometimes it happens that the masters look good, but in an interpolated instance some glyphs are mangled. This is caused by incompatibilities between the masters, things like,
-- different starting point node
-- contours in different order*
-- contours in different directions (I'm not sure of this one)
*pay close attention to glyphs like the ellipsis, the colon, the equal sign, the double quotes, etc.
3 Jul 2008 — 3:34pm
The last item in Font Info is Multiple Master Settings. I suggest you move the slider to some middle position between your two axes. This will change the display of the font in the Font Window and you'll have a better chance of seeing any mangled glyphs.
4 Jul 2008 — 3:13am
Is there any relevant diference on using the "Assign Master" command insted of the "Mask to Master" operation? Would be the result any diferent, or do they work alike?
Regards