Forum Replies Created
-
AuthorPosts
-
The mark color is saved in the lib and is actually changing the font data, so it makes sense that the save state of the document will update.
There are some options:
set the change count of the document to zero after changing the font data, just be careful with data loss, of unsaved fonts
from AppKit import NSChangeCleared font = CurrentFont() for glyphName in font.selection + font.templateSelection: glyph = font[glyphName] glyph.mark = (1, 0, 0, 1) document = font.document() if document: # set the document change count to zero document.updateChangeCount_(NSChangeCleared)
Adding an L or N (for glyph.note) is a bit more difficult cause you have to overwrite the defcon representation factory generating the glyph cell.
Adding smart sets is probably the easiest.But I guess your proposed solutions are not the best options for the problem…
however, good luck!
when holding cmd down on a “smooth” point, tangent points are smooth points, will not move the bcp(s) but only the anchor points across the angle of the bcp(s)
a small script that “corrects” wrong smooht points by toggling the smooth flag of each point
# get the current glyph g = CurrentGlyph() # loop over all contours for c in g: # loop over all points for p in c.points: # deslect all points p.selected = False # if the point is an off curve don't do anything if p.type == "offCurve": continue # if the point is smooth if p.smooth: # set smooth to false p.smooth = False # select the point p.selected = True # get the naked selection object and toggle the smoothness g.naked().selection.toggleSmoothness() # whoehoe, done g.update()
good luck
you are asking the font for a glyph that doesnt exist
# robothon 2009 # interpolate two glyphs in the same font a bunch of times from robofab.world import CurrentFont f = CurrentFont() for i in range(0, 10): factor = i*.1 name = "result_%f"%factor print "interpolating", name # create a new glyph f.newGlyph(name, clear=True) f[name].interpolate(factor, f["A"], f["B"]) f.update()
good luck
Thanks Bas
Yanone: how do you end up with a UFO file with 10 zones? (just curious)
its been patched already and will be fixed in the next version of RF
http://code.typesupply.com/changeset/1174
thanks
It’s disabled by default cause transforming multiple glyphs can end up with a double transformation on glyphs with components, one time by the referenced glyph and other one by transforming the component itself.
its highly recommended to set at least the four first char as followed:
http://partners.adobe.com/public/developer/opentype/index_recs.html
The transformations are saved and stored as a transform matrix [xx, xy, yx, yy, x, y] and when ever there is a rotate or skew transform its impossible to revert the matrix back to readable, understandable and simple values like position, scale, rotation,….
This can help to transform components: Use the transformation pane in the inspector, but be sure you enabled “Transform Components” in the transform pane option menu.
or with code:
g = CurrentGlyph() for component in g.components: center = (100, 100) component.rotate(50, center) # component.transalte((100, 100)) # component.scaleTransformation((.3, .3), center)
understandable… :)
Why Mac Roman: FDK is already using this for their default glyph ordering (see MakeOTFUserGuide.pdf page 10)
FYI: it will be switched off as default in the next version
kiekeboe!
Anno 2013 there are still a of awesome nasty text setters around.
MacRoman came out of a discussion a long long time ago on the beta list.
Personally I set my own glyph order and be sure that it is starting with a .notdef ….(maybe its should be switched off by default…..)
The kerning keys can be either glyph names or group names.
If they are group names (starting with an ‘@’) you can edit them in with the groups objectsf = CurrentFont() f.groups["@MMK_L_f"]
Its possible that this group isn’t not in your groups but already hard coded into the features.
(normally MM is adding those kerning groups also asfont.groups
itemsnote:
RoboFont does not automically convertfont.groups
to feature groups.
Use this extension for converting and adding groups to the feature file: https://github.com/typemytype/RoboFontExtensions/tree/master/groups2Featuresgood luck
the ttf “path”:
RF UFO > internal ttf compiler on top of ufo2fdk > glyph data .ttf > fdk for some tables > .ttf
In RoboFont there are two possible ways to convert outlines:
(see Spline Conversion http://doc.robofont.com/documentation/workspace/font-info/robofont/)One is 100% accurate to the outlines, which mean points will be added
the other one is 100% accurate to the amounts of points, but the changes to the curve is minor, handy for interpolation afterwardsnot sure I understand what you mean.
Anyhow:
The OT features and naming tables are compiled by FDK and merged back in a ttf file with the converted glyph with cubic curves.no, do this on the fly, make a script that extract only the glyph you need from a master UFO
-
AuthorPosts