-The RoboFab developers, Erik van Blokland, Tal Leming and Just van Rossum would like to thank some folks for helping in one way or the other.
-
-
-
Thanks
-
-Testing and support: Paul van der Laan, Peter Bil'ak, Seonil Yun, Cyrus Highsmith. Rich Roat for a lot of things.
-
-
-
-
Resources
-
Thanks to the FontLab developers for supporting Python. Adam Twardoch and Eigi Eigendorf for the fontlab documentation and feedback. Apple Computer, Adobe Systems for their tools and documentation. Just van Rossum for TTX, GLIF and fontTools. The other van Rossum and Python.org for Python. Have a look at the link section for addresses for most of these.
-
-So you have read and agreed to the License Agreement. Select the RoboFab installer in the archive format of choice.
-All installers contain the same code and support files. They're just packaged differently.
-
-
-
RoboFab + FontTools Combo Deluxe
-
If you don't have fontTools or don't know what fontTools is, take this version. It will install RoboFab and the appropriate FontTools at the same time.
-
-This RoboFab License Agreement ("Agreement") is a legal agreement
-between you (either an individual or a single entity known as
-"Customer") and The RoboFab Consortium (Just van Rossum, Erik van
-Blokland, Tal Leming), which owns a library of computer software with
-associated files. By installing, copying, or otherwise using the
-Software or any Software Updates, Customer agrees to be bound by the
-terms of this Agreement. If Customer does not agree to the terms of
-this Agreement, do not install, copy, or use the Software, including
-all Software Updates that Customer receives as part of the Software
-(each, an "Update"). By installing, copying, or otherwise using an
-Update, Customer agrees to be bound by the additional license terms
-that accompany such Update. If Customer does not agree to the terms of
-the additional license terms that accompany the Update, disregard the
-Update and the additional license terms that accompany the Update. In
-this event, Customer's rights to use the Software shall continue to be
-governed by the then-existing Agreement.
-
-
-
1. Copyright
-
-
-Unless noted otherwise, all rights, title, interests in and to copyrights in the Software
-(including but not limited to any software components, product
-documentation and associated media, sample files, extension files,
-tools and utilities, miscellaneous technical information, and any
-copies of the Software, are owned exclusively (or licensed) by The
-RoboFab Developers. The Software is protected by The Netherlands
-copyright laws and international treaty provisions. Therefore, you must
-treat the Software like any other copyrighted material. The Software is licensed, not
-sold.
-
-
-
2. Grant of Limited Use License
-
-
-
-a. The RoboFab Consortium grants Customer a limited right to use the
-Software for development purposes only. This agreement DOES NOT GRANT
-any other right or license, including but not limited to distribution, or commercial use. Commercial use of the Software is
-granted only by executing a separate commercial use license agreement
-that can be obtained from The RoboFab Consortium.
-
-
-
3. Other Restrictions
-
-
-
-a. The Software is the property of The RoboFab
-Developers, including, but not limited to, all applicable rights to
-patents, copyrights, trademarks and trade secrets and is provided for
-Customer's exclusive use for the purposes of this Agreement.
-
-
-b. Customer will not alter, remove or obscure any
-designation name or mark from any supplied material that identifies
-such material as belonging to or developed by The RoboFab Consortium or other developers.
-
-
-c. Customer may not transfer, rent, lease, or sublicense the Software.
-
-
-
4. Termination
-
-
-a. Without prejudice to any other rights, The RoboFab Consortium may
-terminate this Agreement and the functionality of the Software at any
-time at its sole discretion. All rights granted hereunder shall
-immediately terminate upon Customer's failure to comply with the terms
-and conditions of this Agreement. In either such event, Customer agrees
-to destroy all copies of the Software in any form and all of its
-component parts.
-
-
-
5. Disclaimer of Warranty
-
-
-a. NO WARRANTIES. THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF
-ANY KIND. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THE
-ROBOFAB DEVELOPERS DISCLAIMS ALL WARRANTIES, EXPRESSED OR IMPLIED,
-INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY
-AND FITNESS FOR A PARTICULAR PURPOSE AND ANY WARRANTY AGAINST
-INFRINGEMENT, WITH REGARD TO THE SOFTWARE. THIS LIMITED WARRANTY GIVES
-YOU SPECIFIC LEGAL RIGHTS. YOU MAY HAVE OTHERS, WHICH VARY FROM
-STATE/JURISDICTION TO STATE/JURISDICTION.
-
-
-
-b. NO LIABILITY FOR DAMAGES. TO THE MAXIMUM EXTENT PERMITTED BY
-APPLICABLE LAW, IN NO EVENT SHALL The RoboFab Consortium BE LIABLE FOR
-ANY DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
-OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
-INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE,
-EVALUATION OR INABILITY TO USE OR EVALUATE THE SOFTWARE, EVEN IF THE
-ROBOFAB DEVELOPERS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-BECAUSE SOME STATES/JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR
-LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, THE
-ABOVE LIMITATION MAY NOT APPLY TO YOU.
-
-
-
6. Governing Law
-
-
-This Agreement shall be construed in accordance with
-the laws of The Netherlands without regard to conflicts of law
-provisions. In the event of any dispute arising out of or relating to
-this Agreement, the parties agree to jurisdiction and venue of the
-applicable court in The Netherlands.
-
-
-
7. Trademarks
-
-RoboFab, RoboThon, and the The RoboFab Consortium logo
-are all trademarks of The RoboFab Consortium.
-
-
-
-
Agree
-
-
-CUSTOMER ACKNOWLEDGES THAT CUSTOMER HAS READ THIS AGREEMENT, UNDERSTAND
-IT AND AGREES TO BE BOUND BY ITS TERMS AND CONDITIONS. CUSTOMER FURTHER
-AGREES THAT IT IS THE COMPLETE AND EXCLUSIVE STATEMENT OF THE AGREEMENT
-BETWEEN CUSTOMER AND The RoboFab Consortium WHICH SUPERSEDES ANY
-PROPOSAL OR PRIOR AGREEMENT, ORAL OR WRITTEN, AND ANY OTHER
-COMMUNICATIONS BETWEEN CUSTOMER AND The RoboFab Consortium RELATING TO
-THE SOFTWARE.
-
- RoboFab is the result of over 6 man-years of concentrated coding. The package combines a solid Pythonic API with over 40 standardized classes of objects for font and glyph related data. With RoboFab installed, the scripter will find it easier to produce scripts, API standardization means fewer things to remember or look up -- eventhough RoboFab comes with extensive documentation and example code.
-
-
-The Font/Glyph/Contour/Point model can be tailored to the needs of the scripter, manipulating data from glyph to glyph or font to font and addressing the outline data point by point, as offcurve/oncurve segments or as conventional knots with incoming / oncurve / outgoing attributes. RoboFab's Kerning object delivers the kerning data as a standard Python dictionary object. The Lib objects will soon take advantage of FontLab's new PythonDict field for storing Python data inside FontLab .vfb sources.
-
-
-RoboFab's pen objects (an implementation of FontTools' pen classes) provide a powerful method to interface with glyph data, either for actual drawing (for instance on screen, or some sort of vector based file format), complex comparisons, transformations and filtering.
-
-
-RoboFab offers a large selection of standardised UI dialogs, ranging from plain messaging to very powerful font and glyph retrieval functionality.
-
-
-RoboFab also brings extensive support for import and export of glyph and font data to UFO, an open industry standard based on XML. UFO makes it possible to, for instance, store text versions of glyphs and fonts in large SQL databases and apply standard text source management tools (such as cvs, diff) to glyphsets.
-
-
-
-
\ No newline at end of file
diff --git a/Documentation/robofabManual/manual/feedback.html b/Documentation/robofabManual/manual/feedback.html
deleted file mode 100644
index acb5af4fa..000000000
--- a/Documentation/robofabManual/manual/feedback.html
+++ /dev/null
@@ -1,130 +0,0 @@
-
-
-
-
-RoboFab Feedback and Contact
-
-
-
-
-
-
-
-
-
- Installing RoboFab is pretty straightforward as installing Python libraries go. But considering this might be the first time you do this, here are a couple of things to pay attention to. First, have a look at the installation notes.
-
-
-
Some remarks
-
-
-
In MacOSX, you need to have admin permissions to install robofab in MacOS 9 Python.
-
-
If you've downloaded the MacOSX diskimage installer, first copy the entire thing to a nice, accessible place on your harddisk. The install.py script makes a link to the folder it's in, so if you were to run the install script from the mounted diskimage, RoboFab would be gone after you unmount the diskimage.
-
-
-
-
-
-
FontLab Macros
-
-RoboFab has some example scripts that show how it can be used in FontLab. In the RoboFab folder, there's a folder named "Scripts". In it are two folders that you can drag to FontLab's "Macros" folder. After restarting the application the "Utils" and "RoboFabIntro" folder have been added to the macro list.
-
-
-
Then what?
-
-It depends on your proficiency in scripting and operating fonteditors like FontLab. Some notes on scripting are available in the how to section. There's this manual which offers documentation, examples and background. Help with operating your fonteditor of choice is not available from this site or from the RoboFab developers. Read the manual.
-
-RoboFab objects support basic mathematical operations. Glyphs can be added, substracted and multiplied. The operations apply to all coordinates and all points. See also how to use GlyphMath.
-
-Name for RoboFab and python environment which is independent of FontLab. If something works in NoneLab it means that it can run on any platform that runs python with RoboFab installed.
-
-
- The "save" argument in font.close is now False by default. Any scripts that rely on font.close() to save fonts should be modified.
-
-
- font.close(save=False) now suppresses the save dialog.
-
-
- GuessSmoothPointPen is now robust against closed contours containing just one point.
-
-
- Fixed a bug that was causing objectsRF to mark glyphs as dirty after simply being loaded.
-
-
- The GlyphSet in glifLib has a new getUnicodes method for quickly extracting unicodes from all GLIF files.
-
-
- The UFOReader in ufoLib has a new getCharacterMapping method for quickly extracting unicodes from all GLIF files.
-
-
- Fixed a RContour.clockwise bug that was causing incorrect results to be returned if the contour had overlapping points.
-
-
- Fixed a RFont.insertGlyph(..., as=name) bug that was causing the "as" name to not be applied in some cases.
-
-
- The result of glyph.copy() no longer has a parent.
-
-
- Setting italicAngle and slantAngle now forces the values to be floats.
-
-
- glyphNameSchemes now forces the conversion to big endian so the results will be the same on Windows and Mac.
-
-
- Components with negative scale values now return correct bounding boxes.
-
-
- dialogs.py no longer has a win32com dependency when used in FontLab Windows.
-
-
-
-
-
February 7, 2005 - version 1.1
-
-
-
- Fixed a minor rounding error in flPen.py that was allowing unrounded data to be passed to FontLab.
-
-
- objectsRF.RComponent decomposes properly now.
-
-
- Added new filterPen.py to pens: a module with some useful and sample pens illustrating non-drawing applications of pen objects. StatsPen: a pen returning the length of the contour, FlattenPen: a cubic path flattener. And a couple of helpers to make filtering easier.
-
-
- robofab.features but that may be moving to a private location...
-
-
- RInfo now has createdBy, weightValue, weightName and widthName attributes. These are also now written into info.plist in UFOs.
-
-
- RGlyph has a fun new rasterize method.
-
-
- RContour now has rotate and skew methods.
-
-
- New robofab.path.intersect module for calculating intersections.
-
-
- New FindGlyph dialog added to dialogs.py. This dialog is similar to SelectGlyph, but it contains a search field. Very handy when working with large fonts.
-
-
- Setting objectsFL.unitsPerEm is now buffered against possible float values
-
-
- Added UNIX ASCII (PFA) as a generating option in RFont (use "unixascii" as the type in the generate method). It has been here all along, but it was incorrectly labeled as PC Type 1 ASCII.
-
-
- Retrieving groups from a VFB is now more stable.
-
-
- RFont.insertGlyph has a new as=something argument in order to easily insert one glyph under a different name.
-
-
- RGlyph interpolation and glyph math have been completely rewritten. Now the methods are much more flexible about point types and off curve point counts. The methods are still very strict regarding the count of on curve points. In addition to being much more flexible, it is also much faster.
-
-
- RGlyph.isCompatible returns results that follow the same logic as RGlyph.interpolate
-
-
- RContour.interpolate and the math methods in RContour, RSegment, RPoint, RAnchor and RComponent have all been deprecated.
-
-
- RGlyph.note is now properly encoded.
-
-
- A provision for alternate .glif namingschemes has been added. During the writing of UFO the user can now specify a function (for instance robofab.tools.glyphNameSchemes.glyphNameToShortFileName) to create .glif filenames for glyphs. Previously all glyphnames mapped to filenames directly, which made it impossible to export glyphs with long names in some pythons. The default glif naming scheme in ObjectsFL has been set to the aforementioned glyphNameToShortFileName, check the module for a detailed description of the algorithm. Note that this only affects new exports. Existing UFO's and .glifs are not changed. See How to use glyph naming schemes
-
-
- Fixed a bug that could pontially cause a GLIF to be saved outside of the proper UFO.
-
-
- New scripts located in robofab/Scripts/RoboFabUFO: DumpOneGlyphToGlif.py, DumpOneGlyphToUFO.py, ExportFontToUFO.py, ImportFontFromUFO.py, ImportOneGlyphFromUFO.py
-
-
- Bug in script GenerateKernProof.py fixed.
-
-
- RFont now has a handy getReverseComponentMapping method for getting a reversed component mapping.
-
-
- AllFonts bugs squashed.
-
-
- plistlib modified to by Python 2.2 compatible
-
-
- Glyph order is now stored and read from font.lib["org.robofab.glyphOrder"]. Importing a UFO into FontLab now follows this order.
-
-
- Raw FDK-style OT feature code is now stored in font.lib["org.robofab.opentype.classes"] and font.lib["org.robofab.opentype.features"] in UFOs. This data is stored in the OpenType fields in FontLab files.
-
-
- robofab.world no longer prints nag during import.
-
-
- Fixed bug in objectsRF.RFont.save that was occasionally (very, very rarely) forcing save operations to be considered save as operations.
-
-
- Added deprecation warnings to family.py and featureLib.py.
-
-
- Added warning to nameTable.py.
-
-
- Removed properties.py.
-
-
- Removed unused Point and Offset classes from objectsBase.
-
-
- Fixed a bug that would raise an error in robofab.interface.all.dialogs.AskString
-
-
- Backported RoboFab to Python 2.2.1. This is now the oldest version of Python we support. Python 2.2 is not supported.
-
-
- RoboFab now includes a Python 2.2 compatible version of sets.py (found here). In Python 2.3+ the sets from the standard lib will be used in place of this version.
-
-
- Reworked the way RPoint determines its type attribute in objectsFL.
-
-
- Patched a small bug in BaseContour.draw that occured when a contour begins with a qcurve in FontLab.
-
-
- Removed support for drawing with antique RoboFab pens. Only FontTools pens are supported now.
-
-
- Removed support for drawing with antique RoboFab pens. Only FontTools pens are supported now.
-
-
- Components now have a read-only box attribute.
-
-
-
-
-
-
March 26, 2004 - version 1.01
-
-
-
- Renamed the folder with utility scripts for FontLab to "RoboFab Utils" as not to overwrite any other folders named "Utils" which might live in the FontLab macros folder.
-
-
- Fixed a problem with glyph.box which would show up in some cases in plain Python use of RoboFab with glyphs which have anchors outside of the horizontal bounds of the glyph.
-
-
-
-
-
-
-
March 14, 2004 - version 1.0
-
- First public release.
-
-
-
-
-
January 2004
-
- We've done some projects using RoboFab at the center and it's fast to work with and reliable. We considered ways to reschedule the conference and couldn't plan anything for a couple of unrelated but unchangeable reasons. We decide for a release.
-
-
-
-
-
September 2003: RoboThon '03
-
- Worked very hard to get RoboFab 1.0b1 ready for the RoboThon conference in September. The RoboThon was cancelled at the last minute to make room for hurricane Isabel. We soon released the beta to a small group but the missed conference made it difficult for folks to get started.
-
-
-
-
-
July 2003: New Fileformat
-
- Summer 2003 we started defining the UFO file format, using GLIF for glyph information and Apple's .plist (also XML based and entirely cross platform) for any other data as listings, indices, etc.
-
-
-
-
-
April 2003: New Objects
-
- April 2003 we started new objects to live on top of the FontLab objects. Just van Rossum started work on the GLIF file format.
-
-
-
-
February 2003: Start
-
- RoboFab was started sometime during the TypoTechnica in Heidelberg, 2003. Tal Leming, Erik van Blokland and Just van Rossum combined their FontLab code into a new library. At first it was an odd collection of fixes and workarounds.
-
-Making accented glyphs is a job where scripting can help save some time. When you have prepared all the parts, the base glyphs and the accents, a script can help to assemble the combinations. There are various ways of doing it, let's start with a simple one.
-
-In this example the script creates a new glyph, aacute, then proceeds to add components, references to other glyphs rather than the glyphs themselves. The glyph method appendComponent is used to do this. See how the acute component has an extra argument, (200, 0) - this the offset for the accent. Finally the new glyph is given the width of the base a.
-
-
-This example illustrates the use of the very basic appendComponent method. But it's not a very useful way to make glyphs. For instance, the string "aacute" could easily be made into a variable taken from a list. And dealing with the offsets when placing the accent isn't going to be efficient either when you want to make a large list of accented glyphs. How to go about it that?
-
-
-
Building accents automagically
-
-RoboFab has its own database which connects glyphnames to components. In the RoboFab distribution folder, go to Data/GlyphConstruction.txt. This text file contains a list of glyphnames and from which components they should be built. The RoboFab Glyph Construction database was based on FontLab's glyph list. This list contains information about where components should be connected.
-
-
-
-Acircumflexdotaccent: A circumflex.top dotaccent.bottom
-
-
-
-This entry shows that Acircumflexdotaccent is constructed with components from A, a circumflex using the top anchor, and dotaccent using the bottom anchor.
-
-
-
Generate a glyph
-
-RoboFab's Font object has several ways of starting component glyphs and adding stuff to them. There are different strategies possible for different kinds of problems.
-
-The easiest method to add an assembled glyph to a font is using the font's generateGlyph method. This will look for the glyphname in the glyph construction database and attempt to get all the components and place them at the anchors listed in the database. Let's have a look at its parameters.
-
-
glyphName: the name of the glyph, has to correspond to a name in the glyph construction database.
-
replace: default set to True, the new glyph will replace the old one if it exists.
-
preflight: default set to False, preflight gives you the opportunity to run the glyph creation process without actually adding it to the font. This is useful if you're building the characterset and you don't have all the parts yet. Preflight will return a list of missing anchor points, missing accents, components, etc. Note that it can take several iterations of fixing problems and discovering new ones. If for instance a glyph for a componnent can't be found, it also means that some problems with that glyph are hidden. i.e. when a glyph "A" can't be found, preflight can't tell you that this glyph is missing a required anchor point either.
-
printErrors: default set to True, print any errors and problems to the standard output window.
-Compile a glyph with specified components. If you want to assemble accents that are not the glyph construction database, using compileGlyph.
-
-
-
glyphName: the name of the glyph where it all needs to go.
-
baseName: the name of the base glyph. accentNames: a list of accentName, anchorName tuples, [('acute', 'top'), etc]
-
preflight: default set to False, preflight gives you the opportunity to run the glyph creation process without actually adding it to the font. This is useful if you're building the characterset and you don't have all the parts yet. Preflight will return a list of missing anchor points, missing accents, components, etc.
-
printErrors: default set to True, print any errors and problems to the standard output window.
-
-
-
-
AccentBuilder
-
-RoboFab comes with a versatile accent building tool, AccentBuilder. Have a look at robofab.tools.accentbuilder. AccentBuilder deals with components, anchorpoints.
-
-
-
-from robofab.accentBuilder import AccentTools, buildRelatedAccentList
-font = CurrentFont
-
-# a list of accented glyphs that you want to build
-myList=['Aacute', 'aacute']
-
-# search for glyphs related to glyphs in myList and add them to myList
-myList=buildRelatedAccentList(font, myList)+myList
-
-# start the class
-at=AccentTools(font, myList)
-
-# clear away any anchors that exist (this is optional)
-at.clearAnchors()
-
-# add necessary anchors if you want to
-at.buildAnchors(ucXOffset=20, ucYOffset=40, lcXOffset=15, lcYOffset=30)
-
-# print a report of any errors that occured
-at.printAnchorErrors()
-
-# build the accented glyphs if you want to
-at.buildAccents()
-
-# print a report of any errors that occured
-at.printAccentErrors()
-
-
-
-
Building your own accentbuilders
-
-For typeface production it is a good idea to build a set of standardised tools with which you finalise the font data. Here's an example of a script which adds a standardised list of accents to a font. It does not do automatic anchor placement because the scripter wanted to do this manually. But the rest is done automatically. The script also deals correctly with smallcap glyphnames with .sc.
-
-
-
-
-# a script to generate all necessary accented characters.
-# this assumes all anchor points are set correctly.
-# including doublelayer accents. so, add anchorpoints on the accents too!
-# (c) evb
-
-from robofab.world import CurrentFont
-from robofab.tools.toolsAll import readGlyphConstructions
-
-f = CurrentFont()
-
-import string
-
-theList = [
- # caps
- 'AEacute',
- 'AEmacron',
- 'Aacute',
- 'Abreve',
- # add all the accents you want in this list
-]
-
-
-con = readGlyphConstructions()
-theList.sort()
-
-def accentify(f, preflight=False):
- print 'start accentification', f.info.fullName
- slots = con.keys()
- slots.sort()
- for k in theList:
- if k[-3:] in [".sc"]:
- isSpecial = True
- tag = k[-3:]
- name = k[:-3]
- else:
- isSpecial = False
- tag = ""
- name = k
- parts = con.get(name, None)
- if parts is None:
- print k, "not defined?"
- continue
- base = parts[0]
- accents = parts[1:]
- f.generateGlyph(k, preflight=preflight)
- f[k].mark = 100 + randint(-20, 20)
- f[k].autoUnicodes()
- f[k].update()
- f.update()
-
-accentify(f)
-print 'done'
-
-
-
-
-
\ No newline at end of file
diff --git a/Documentation/robofabManual/manual/howto/drawingexample.jpg b/Documentation/robofabManual/manual/howto/drawingexample.jpg
deleted file mode 100644
index d5beb9ee7..000000000
Binary files a/Documentation/robofabManual/manual/howto/drawingexample.jpg and /dev/null differ
diff --git a/Documentation/robofabManual/manual/howto/fontlabremote.html b/Documentation/robofabManual/manual/howto/fontlabremote.html
deleted file mode 100644
index 38fd0699b..000000000
--- a/Documentation/robofabManual/manual/howto/fontlabremote.html
+++ /dev/null
@@ -1,261 +0,0 @@
-
-
-
-
-FontLab Remote
-
-
-
-
-
-
-
-
-
- A neat feature in RoboFab for FontLab on MacOS. RoboFab can install an AppleEvent handler in FontLab to make FontLab respond to calls from other applications. There is code to communicate with FontLab using this AppleEvent and to make it execute code and exchange data such as glyphs. How useful this remote stuff is depends on what you want to do with it. We thought it was cool. The 'remote' relates to one application controlling another. Both applications need to run on the same machine, it does not mean that FontLab is accepting commands over a network for instance. For that we need another tool.
-
-
How?
Step 1: Start the remote stuff in FontLab
-
- The first thing you need to do is start the AppleEvent support in FontLab. That's done by importing the remote module.
-
-
-# start the remote stuff in FontLab
-import robofab.tools.remote
->>> FontLabRemote is on.
-
Step 2: Start the Python IDE
-
- You can now send commands, bits of code and entire glyphs to FontLab from the Python IDE.
-
-
-
-# first, try a bit of python code
-from robofab.tools.remote import runFontLabRemote
-print runFontLabRemote("print 1+1")
->>> 2
-
-
- The function runFontLabRemote() sends a piece of Python code to FontLab's python interpreter and has it executed. In this example the code is "print 1+1". The result, the output of FontLab running this piece of code is then returned to the Python IDE. Note that the output is always a string. Depending on the code you throw at FontLab it could even contain tracebacks or other output.
-
-
- When FontLab receives and executes a remote command, it will print a note to the FontLab Output window.
-
- That means that FontLab is doing remote stuff.
-
-
Step 3: Teleporting a Glyph
-
- The remote module has support to send and receive Glyphs. For the next example open a new font in FontLab first (command N), then run the following code in the Python IDE. Make sure you have a UFO font handy somewhere.
-
-
-from robofab.tools.remote import transmitGlyph
-
-# Pick a UFO font:
-f = OpenFont()
-
-# one to beam up, Scotty!
-transmitGlyph(f['n'])
-
-
- If all went well, you now have the 'n' from your UFO copied to the right slot in your FontLab font. As noted earlier, if all you want to do is import some glyphs from a UFO into FontLab there is absolutely no need to use all this remote stuff.
-
-
Why?
-
- The remote module only takes care of the communication with FontLab. Possible applications which could be built on top of this are:
-
-
-
- Use FontLab to perform outline operations such as remove overlap.
-
-
- Use FontLab to batch process font generation.
-
-
- Build an external editor to augment the functionality of FontLab
-
-
-
- As noted before, the remote stuff only works on MacOS.
-
-
Example
-
- Example in which a glyph from a UFO opened in plain Python is copied to FontLab. After removing overlap the glyph is returned and inserted in the UFO.
-
-
-
-#FLM: Remove overlap from Remote Glyph.
-
-
-from robofab.world import OpenFont
-from robofab.tools.remote import transmitGlyph, receiveGlyph, runFontLabRemote
-
-# Pick a UFO font:
-f = OpenFont()
-
-print "Number of contours before", len(f['A'])
-
-
-# call FontLab to make a new font
-startNewFontCode = """from robofab.world import NewFont
-f = NewFont()
-f.info.fullName = 'Temporary Font generated by RoboFab Remote'"""
-
-print runFontLabRemote(startNewFontCode)
-
-# send a glyph to FontLab,
-# it will be inserted in the CurrentFont.
-transmitGlyph(f['A'])
-f.removeGlyph('A')
-
-# send instructions to remove overlap for this glyph
-overlapCode = """from robofab.world import CurrentFont
-from robofab.tools.remote import transmitGlyph
-f = CurrentFont()
-f["A"].removeOverlap()
-f.update()
-transmitGlyph(f['A'])
-"""
-
-# send the code and catch the output
-x = runFontLabRemote(overlapCode)
-# interpret the output
-receiveGlyph(x, f)
-print "Number of contours after: ", len(f['A'])
-
-# send instructions to FontLab to close the font again.
-closeFontCode = """from robofab.world import CurrentFont
-f = CurrentFont()
-f.close(None)
-"""
-print runFontLabRemote(closeFontCode)
-print 'done!'
-
-# possible results:
->>> Number of contours before 6
->>> Number of contours after: 4
-
-
Notes
-
- While experimenting with robofab.tools.remote we found that after some time it's possible that FontLab grows weary of the remote fussing and the scripts stop working. Restarting FontLab usually solves that situation.
-
-
-
-
\ No newline at end of file
diff --git a/Documentation/robofabManual/manual/howto/generatefonts.html b/Documentation/robofabManual/manual/howto/generatefonts.html
deleted file mode 100644
index 1e166472a..000000000
--- a/Documentation/robofabManual/manual/howto/generatefonts.html
+++ /dev/null
@@ -1,205 +0,0 @@
-
-
-
-
-How to: Generate Fonts
-
-
-
-
-
-
-
-
-
- A RFont object in FontLab can call FontLab to generate fonts. Generating fonts can be time consuming, even when all the right parameters are set. So this is a nice candidate for automation. First of all a generator script will give you consistency between generations and versions. But also it means you can set a machine to work to generate batches of fonts and focus on more creative tasks.
-
-
- Note: the generate method only calls on FontLab to generate the fonts in a particular format. It does not prepare the font data for that specific format, i.e. for example when you're generating for PC Truetype, generate() won't select the appropriate encodings or special windows flags. You need to do that.
-
-
RFont.generate(outputType, path=None)
-
- Generate the font. outputType is the type of font to output. An overview of available output Types in FontLab:
-
-
-
- pctype1:PC Type 1 font (binary/PFB)
-
-
- pcmm: PC MultipleMaster font (PFB)
-
-
- pctype1ascii: PC Type 1 font (ASCII/PFA)
-
-
- pcmmascii: PC MultipleMaster font (ASCII/PFA)
-
-
- mactype1:Mac Type 1 font (generates suitcase and LWFN file)
-
-
- otfcff: PS OpenType (CFF-based) font (OTF)
-
-
- otfttf: PC TrueType/TT OpenType font (TTF)
-
-
- macttf: Mac TrueType font (generates suitcase)
-
-
- macttdfont: Mac TrueType font (generates suitcase with resources in data fork)
-
-
- (doc adapted from http://dev.fontlab.net/flpydoc/)
-
-
-
Notes
-
- path can be a directory or a directory file name combo:
-
-
-
- path="DirectoryA/DirectoryB"
-
-
- path="DirectoryA/DirectoryB/MyFontName"
-
-
- path="DirectoryA/DirectoryB/ < filename >"
-
-
-
- If no path is given, the file will be output in the same directory as the vfb file. If no filename is given, the filename will be the vfb file name with the appropriate suffix.
-
-
Examples
-
- FontLab can generate many different formats for different platforms. Please refer to the FontLab manual for specifics. Some formats generate several files, others only one. Some formats are not available in all versions of FontLab.
-
-The names of the GLIF xml files, in the UFO are related to the glyph names. It used to be a 1:1 relationship, but then glyphnames grew really long and some file systems don't support long filenames. So something had to give.
-
-
-
-
GlyphNamingSchemes
-
- The objectsFL.RFont.writeUFO() method can take a special callback function in order to convert the actual glyphname to a suitable filename. The goal is to create unique filenames so that glyphs won't overwrite each other's exports, also comply to certain filesystems which require filenames to be shorter than a certain number of characters, while retaining a high level of human-readability. Have a look at robofab/tools/glyphNameSchemes.py for the currently available callbacks. With glyphNameSchemes, the glyphName and the glif filename no longer have a direct relationship.
-
-
-
glyphNameToShortFileName(glyphName, glyphSet)
-
- Features a garuanteed maximum filename (default 31 characters) for really long glyphnames, and clash testing.
-
-
-
all non-ascii characters are converted to "_" (underscore), including "."
-
all glyphnames which are too long are truncated and a hash is added at the end
-
the hash is generated from the whole glyphname
-
finally, the candidate glyphname is checked against the contents.plist
- and a incrementing number is added at the end if there is a glyph with that name already.
-
-
-
-glyphNameToShortFileName is the default naming scheme for exporting UFOs from FontLab. For most everyday use, this callback does all the work and there is no need to tweak it. Below are some examples to give you an idea of what the callback does:
-
-
-
-
-# examples of glyphname to glif name transformations
-from robofab.tools.glyphNameSchemes import glyphNameToShortFileName
-
-# a short name
-print glyphNameToShortFileName("accent", None)
->>> "accent.glif"
-
-# a short name, starting with capital letter
-print glyphNameToShortFileName("Accent", None)
->>> "A_ccent.glif"
-
-# a really long name - note the hexadecimal hash at the end
-print glyphNameToShortFileName("this_is_a_very_long_glyph_name.altswash2", None)
->>> "this_is_a_very_lon340a8fa5.glif"
-
-# a name with a period in it, 1
-print glyphNameToShortFileName("a.alt", None)
->>> "a_alt.glif"
-
-# a name with a period in it, 2
-print glyphNameToShortFileName(".notdef", None)
->>> "_notdef.glif"
-
-# a name with non-ascii characters
-print glyphNameToShortFileName("ünicøde", None)
->>> "_nic_de.glif"
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Documentation/robofabManual/manual/howto/glyphmath.html b/Documentation/robofabManual/manual/howto/glyphmath.html
deleted file mode 100644
index 8788ca63e..000000000
--- a/Documentation/robofabManual/manual/howto/glyphmath.html
+++ /dev/null
@@ -1,235 +0,0 @@
-
-
-
-
-How to: Glyph Math
-
-
-
-
-
-
-
-
-
- RGlyph objects have methods that allow the objects to behave a bit like variables in simple math. These methods do not do additions or substractions of the surface area of the glyphs, like layering two glyphs on top of each other and than doing "remove overlap". Instead, they return new glyph objects in which each coordinate in each contour is the product of the two glyphs.
-
-
Objects
-
- All glyph math operations in have new, orphaned, objects as result. For instance a substraction of two FontLab RoboFab glyphs will result in a new glyph object, but it won't be part of the font. If you want the result to be part of the font you have to add it explicitly, see the example at the bottom of this page. There are several reasons for this:
-
-
-
- the result might not even come from glyphs in the same font, i.e. you can substract a glyph in one font from a glyph in another font. Where should the result live? you decide.
-
-
- You might not want the result to be part of your font when you're using it for further calculations. So: results from glyphmath operations are orphan glyphs that do not belong to any font.
-
-
- the results need to use floating point (19.234943) numbers for precision, FontLab only stores integer numbers (19)
-
-
-
- If you want to add a glyph (of any flavor, FontLab or UFO) to a font use the appendGlyph method:
-
-
-
-someNewGlyph = aFont.newGlyph("someNewGlyph")
-someNewGlyph.appendGlyph(restultFromGlyphMath)
-
-# note you have to set the width, appendGlyph does not automatically
-# take the value.
-someNewGlyph.width = restultFromGlyphMath.width
-
-
Substraction
-
- Substraction returns a new glyph object with contours which represent the difference between the two previous glyphs. As a glyph itself, it's not much to look at. If you draw the result of a substraction it will probably look like a crumpled outline.
-
-
Example Substraction
f = CurrentFont()
-g = f["a"]
-h = f["b"]
-# suppose g and h have compatible point structures
-myRelativeGlyph = g - h
-
Addition
-
- Addition returns a new glyph object with the contours which is the product of the two previous glyphs. If you just add two "normal" glyphs from a font (or multiple fonts for that matter) it will look odd. But you can also easily add a relative glyph (a result of substracting one glyph from another), which effectively means you're applying the difference between two glyphs to a third. And that can be a very useful action.
-
-
Example Addition
# continue with myRelativeGlyph from the previous example
-newglyph = f["x"] + myRelativeGlyph
-
Multiplication
-
- When a normal glyph is multiplied it looks as if the glyph has been scaled. For instance multiplying a glyph with 0.5 scales the shapes 50%.
-
-
Example Multiplication
# continue with myRelativeGlyph from the previous example
-newglyph = f["x"] + 0.25 * myRelativeGlyph
-
-# this works too:
-newglyph = f["x"] + myRelativeGlyph * 0.25
-
-# and this works as well:
-newglyph = f["x"] + myRelativeGlyph * (0.33, 0.99)
-# see what that does? it multiplies with different factors for x and y!
-# for instance:
-newglyph = f["x"] + myRelativeGlyph * (1, 0)
-# would only apply the horizontal effect of the relative glyph to f['x'].
-
Division
-
- Divisions works just like multiplications, you just need to make sure not to divide by zero.
-
-
Example Division
# continue with myRelativeGlyph from the previous example
-newglyph = f["x"] + myRelativeGlyph / 4
-
-# this works too:
-newglyph = f["x"] + myRelativeGlyph / (0.25, 2)
-
Combinations
-
- These examples are simple enough, but when you combine them the operations can become really powerful. You could recreate font interpolation using GlyphMath, or construct new networks of interpolations, additions, shifts, deltas that were impossible to build.
-
-
All together now
-
- This is from the demo_GlyphMath.py which should be in the Scripts/RoboFabIntro folder.
-
-
-#FLM: Fun with GlyphMath
-
-# this example is meant to run with the RoboFab Demo Font
-# as the Current Font. So, if you're doing this in FontLab
-# import the Demo Font UFO first.
-
-from robofab.world import CurrentFont
-from random import random
-
-f = CurrentFont()
-condensedLight = f["a#condensed_light"]
-wideLight = f["a#wide_light"]
-wideBold = f["a#wide_bold"]
-
-diff = wideLight - condensedLight
-
-destination = f.newGlyph("a#deltaexperiment")
-destination.clear()
-x = wideBold + (condensedLight-wideLight)*random()
-
-destination.appendGlyph( x)
-destination.width = x.width
-
-f.update()
-
Implementation limits
-
- In objectsFL (for use in FontLab), only RGlyph has glyphmath operators implemented. The result of a glyphmath operation in FontLab is always an object from objectsRF. In ObjectsRF most objects have *, + and - implemented. But considering the operators are mainly used for Glyph stuff, the RGlyph object is a bit more kitted out with division as well.
-
-
-
-
\ No newline at end of file
diff --git a/Documentation/robofabManual/manual/howto/index.html b/Documentation/robofabManual/manual/howto/index.html
deleted file mode 100644
index 5be8de7e8..000000000
--- a/Documentation/robofabManual/manual/howto/index.html
+++ /dev/null
@@ -1,152 +0,0 @@
-
-
-
-
-RoboFab How To's
-
-
-
-
-
-
-
-
-
- RoboFab's interpolation is independent of the interpolation tools provided in FontLab. First of all that means that you can interpolate UFO fonts without the help of FontLab. It also means that the interpolation engine works different than the one in FontLab.
-
-
Strict
-
- RoboFab interpolation is very strict. It won't interpolate unless the point structures of both extremes match. It won't mess with the masters, force points or anything. The user has to get it right.
-
-
aGlyph.isCompatible(otherGlyph, report=True)
-
- Glyph has a method isCompatible() which reports whether or not the point structures are capable of interpolating. With this method you can run through your proposed interpolation first and see if all glyphs work, and perhaps send feedback to the user.
-
- isCompatible has a flag report which if set to True will return a tuple with a report on the incompatibilities.
-
-
-from robofab.world import CurrentFont
-f = CurrentFont()
-a = f["a"]
-print a.isCompatible(f["b"], True)
->>> (False, ["Fatal error: contour 0 in glyph a
- and glyph b don't have the
- same number of segments."])
-
-Interpolate by factor between minFont and maxFont. In FontLab the result of the interpolation will be rounded to whole integers. In NoneLab (outside FontLab, operating on a UFO), the result of the interpolation is a font with glyphs with floating point coordinates so if you want to use the result of one interpolation as a master in the next you won't loose precision to rounding errors. It might mean that for some uses of UFO you need to round the glyphs afterwards. aFont.interpolate also interpolates the positions of components, anchors, ascender, descender, and glyph widths for the whole font.
-
-
-
-
-
- factor either a number or a tuple of numbers. Usually factor is a float number between 0 and 1. 0 produces minGlyph, 1 produces maxGlyph. Values > extrapolates beyong maxGlyph. Values < extrapolate beyond minGlyph. If you pass (x, y) to factor it will interpolate horizontal values differently from vertical values. For instance (0, 1) as factor produces a font (or a glyph) which horizontally looks like the minimum, but vertically it looks like the maximum.
-
-
- minFont RFont object, the font for the minimum master.
-
-
- maxFont RFont object, the font for the maximum master.
-
-
- suppressError (optional) will supress all tracebacks it finds on the way. That means that interpolation problems in individual glyphs won't stop the rest of the font from getting done. Default set to True.
-
- analyzeOnly (optional) will do a dry run of the interpolation and do a full analysis of the compatibility and problems. It won't produce any outlines in the font. Default set to False.
-
-
-
-Kerning objects have an interpolation method as well. It is debateable whether an interpolation of two fonts should also automatically interpolate the kerning, so we picked the more explicit approach: in your interpolation script you have to do the interpolation of the kerning objects seperately.
-
-
-
Examples
-
-
Straight interpolating (either FontLab or UFO)
-
-
-Setting a third font to an interpolation of two others.
-
-
-
-from robofab.world import OpenFont
-minFont = OpenFont(pathToMinFont)
-maxFont = OpenFont(pathToMaxFont)
-# or any other way you like to get two font objects
-
-inbetweenFont = OpenFont(pathToInbetweenFont)
-# so now we have 3 font objects, right?
-
-inbetweenFont.interpolate(.5, minFont, maxFont)
-# presto, inbetweenFont is now 50% of one and 50% of the other
-
-inbetweenFont.interpolate((.92, .12), minFont, maxFont)
-# presto, inbetweenFont is now horizontally
-# vertically interpolated in different ways.
-
-
-
Interpolating two glyphs in the same font
-
-
-For any number of reasons you might want to interpolate a glyph within the same font. Here's how to do it.
-
-
-
-from robofab.world import CurrentFont
-f = CurrentFont()
-g = f.newGlyph("interpolated")
-g.interpolate(.5, f["a"], f["b"]
-# if you're in fontlab:
-g.update()
-
-
-
Alternatives
-
-These are the conventional ways of doing interpolation. Have a look at RoboFab's GlyphMath for alternatives for blending and interpolating glyphs together.
-
-
-
-
\ No newline at end of file
diff --git a/Documentation/robofabManual/manual/howto/lowlevel.html b/Documentation/robofabManual/manual/howto/lowlevel.html
deleted file mode 100644
index a49ce774b..000000000
--- a/Documentation/robofabManual/manual/howto/lowlevel.html
+++ /dev/null
@@ -1,149 +0,0 @@
-
-
-
-
-How to get to FontLab internals
-
-
-
-
-
-
-
-
-
- If you're using RoboFab in FontLab, it can happen that you need to access a method or attribute of a glyph or font object which does not seem to have an equivalent in RoboFab. What to do?
-
-
Get Naked
-
-RoboFab Glyph and Font objects have a special method, naked() which returns the actual, low level FontLab object. This object can then be used with the documented FontLab methods and attributes. The methods and attributes of these FontLab objects are very different from RoboFab.
-
-
-from robofab.world import CurrentFont
-f = CurrentFont()
-print f
-# this is the high level RoboFab object
->>> < RFont font for TemplatefontPro Rg Regular >
-
-print f.naked()
-# this is the low level FontLab object, not a part of RoboFab
->>> < Font 'TemplatefontPro Rg Regular' >
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Documentation/robofabManual/manual/howto/makeufo.html b/Documentation/robofabManual/manual/howto/makeufo.html
deleted file mode 100644
index 417a47b40..000000000
--- a/Documentation/robofabManual/manual/howto/makeufo.html
+++ /dev/null
@@ -1,195 +0,0 @@
-
-
-
-
-How to make a UFO
-
-
-
-
-
-
-
-
-
select the Export Current Font to UFO Format script
-
run it
-
-
-
- The .ufo will be in the same directory as the original .vfb file. Have an in-depth look at the ufo format here.
-
-
-
- If you want to export a new FontLab font to UFO, it is important that you save the font to .vfb first.
-
-
-
Importing a UFO into FontLab
-
-
-
select the RoboFabUFO menu in the Macro toolbar
-
select the Import .ufo File into FontLab script
-
run it
-
-
-
- This script create a new, empty FontLab font, then proceed to ask you for a .ufo directory.
-
-
-
-
- Due to some limitations in how FontLab keeps track of new, untitled, unsaved fonts, it is vital to make sure that there are no other unsaved, untitled fonts open when you run this script. Because if there are, FontLab will be confused about where to import the glyphs from the .ufo and none of the fonts will show the new glyphs. It's ok to have other fonts open when importing .ufo, they just to have been saved previously.
-
-
-
Importing a bunch of UFO's into FontLab
-
- What if you need to import a whole family of UFO's?
-
-
-
-
select the RoboFabUFO menu in the Macro toolbar
-
select the Import all UFO's in a folder script
-
run it
-
-
-
- This script will prompt you for a folder with UFO's. Pick one. The script will proceed to import the UFO's one by one.
-
-
-
- Sometimes, some versions of FontLab can get a bit tired of importing UFO's in a batch. When this happens not all UFO's will be imported and FontLab may crash. When this happens, just import the fonts one by one.
-
-
-
-
Making a UFO from a font binary
-
- Using FontTools you can make a UFO directly from a font binary. This is very fast, and it works outside of FontLab, but not all data (for instance kerning and apperently metrics) is imported. So your mileage may vary.
-
-RGlyph objects have methods that allow the objects to behave a bit like variables in simple math. These methods do not do additions or substractions of the surface area of the glyphs, like layering two glyphs on top of each other and than doing "remove overlap". Instead, they return new glyph objects in which each coordinate in each contour is the product of the two glyphs.
-
-
-
Objects
-
-All glyph math operations in have new, orphaned, objects as result. For instance a substraction of two FontLab RoboFab glyphs will result in a new glyph object, but it won't be part of the font. If you want the result to be part of the font you have to add it explicitly, see the example at the bottom of this page. There are several reasons for this:
-
-
the result might not even come from glyphs in the same font, i.e. you can substract a glyph in one font from a glyph in another font. Where should the result live? you decide.
-
You might not want the result to be part of your font when you're using it for further calculations. So: results from glyphmath operations are orphan glyphs that do not belong to any font.
-
the results need to use floating point (19.234943) numbers for precision, FontLab only stores integer numbers (19)
-
-
-If you want to add a glyph (of any flavor, FontLab or UFO) to a font use the appendGlyph method:
-
-someNewGlyph = aFont.newGlyph("someNewGlyph")
-someNewGlyph.appendGlyph(restultFromGlyphMath)
-
-# note you have to set the width, appendGlyph does not automatically
-# take the value.
-someNewGlyph.width = restultFromGlyphMath.width
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Documentation/robofabManual/manual/howto/objectinheritance.jpg b/Documentation/robofabManual/manual/howto/objectinheritance.jpg
deleted file mode 100644
index 6b2663edb..000000000
Binary files a/Documentation/robofabManual/manual/howto/objectinheritance.jpg and /dev/null differ
diff --git a/Documentation/robofabManual/manual/howto/scripting.html b/Documentation/robofabManual/manual/howto/scripting.html
deleted file mode 100644
index 27d843435..000000000
--- a/Documentation/robofabManual/manual/howto/scripting.html
+++ /dev/null
@@ -1,235 +0,0 @@
-
-
-
-
-RoboFab Scripting
-
-
-
-
-
-
-
-
-
-Scripting with RoboFab is programming in Python. Everything is possible, it's just that some things are easier than others.
-
-
-
For Python Newbies
-
-If you don't have much programming experience, or you're not familiar with Python, have a look at Just van Rossum's Drawbot (if you're on OSX that is). Drawbot is a low threshold app to play with python code and get awarded with nice eye candy. Learn the princples of programming, loops, variables, by building with graphic shapes, paths, colors.
-
-
-
-RoboFab uses objects to address the various things you find in a font. Objects are a useful way to think about code. A font is an object. It has some attributes, values that belong to that object. A font object is also capable of doing stuff by calling its methods. None of this is specific to RoboFab, a lot of programming languages use objects, and Python does as well. Objects can contain other objects. Have a look at the RoboFab object model to see how they are structured and what other objects there are besides Font.
-
-
-
Other resources
-
This is an interesting introduction into programming with Python as well: How to think like a computer scientist.. A full introduction into programming goes beyond the scope of this manual. Then there are tons of books, websites, stuff. Do some googling.
-
-
-
For RoboFog Converts
-
For those of you joining us from the cohorts of RoboFog users, here some some of the main points of difference. Maybe others will find this part interesting too.
-
-
Packages and modules
-
Robofab is set up with packages. This is to organise the large volume of code into smaller, easier to manage modules. RoboFab does not have any builtins anymore, so you have to import the stuff you want to work with. Look at for the use of the world module which is where a lot of stuff is made available for you.
-
-
-
CurrentFont(), CurrentGlyph()
-
We've kept the CurrentFont function to provide a font object for the front most font. And we've renamed CurrentChar into CurrentGlyph as RoboFab is fully unicode aware and we're dealing with glyphs, not characters. CurrentGlyph() returns a glyph object for the front most glyph.
-
-
-
-
Segments, bPoints
-
-Fonts store glyphs, glyphs store contours, just like RoboFog. Contours however have a few more tricks than their RoboFog counterparts. Contours have Segments, a kind of cluster of a series of offcurve points and one on curve point (see understanding contours. Contours also have lists of points and bpoints.. Depending on what you need to do you can iterate through the segments or points or bPoints.
-
-
-
Conversion, drawing
-
-For scripts which convert or transform outline data in some way, consider writing a pen object for that conversion. These are also handy for drawing in glyphs.
-
-
-
Where to start
-
-You've seen that a lot of the examples in this manual start by importing some objects or functions from robofab.world. This is an easy way to get to a font, and through the font you can get access to the glyphs and all other values that are associated with them.
-
-
-
Open a font from any file
-
-from robofab.world import OpenFont
-f = OpenFont()
-# hey look! an open font dialog!
-print f
->>> None # or a font object, depending on what you select
-
-
-
Open a font from a specific file
-
-from robofab.world import OpenFont
-path = "MyDrive/Folder1/Work/somefile"
-f = OpenFont(path)
-# hey look! it opens the file without asking..
-print f
->>> #a font object
-
-
-
Do something with the font that's open
-
-# in Fontlab:
-from robofab.world import CurrentFont
-f = CurrentFont()
-print f
->>> #a font object for the font that's on top.
-
-
-
How to proceed?
-
-Programming is for a large part the art of picking one seemingly single problem apart and make a lot of smaller, solveable problems from it. Some random thoughts on the subject:
-
-
-
First think about where to start:
-
-
does your problem have something to do with the entire font?
-
or the metrics? the widths? sidebearings? kerning?
-
or one single glyph? or perhaps a group of glyph while excluding others?
-
do you need to move stuff around?
-
do you need to create new glyphs?
-
-
-
Can you describe each step of the process
-
-
-
RoboFab can't be instructed to make judgements on esthetics
-
you have to formulate small steps, first do this, then compare that.
-
use approaches and tricks you learned before to get ahead
-
start with the simplest possible loop and test
-
play around - pick and object and try to make it do tricks. Use this documentation to see what methods and attributes each has.
-
-
-
Be patient
-
-
-
Programming and scripting is a skill just like any other.
-
Eventhough some folks pick it up faster, anyone clever enough to understand typedesign can learn scripting.
-
Read the documentation, try the examples, try the demos. Are there scripts that do something like what you want to do? pick them apart, see how they work. Learn from the source.
-
If you think that scripting is nothing like design consider this: it's certainly a nicer intellectual challenge to try to write some code, then it is to manually do repetitive, stupid production things for hours or days on end. Make the computers work for you, instead of the other way round. Scripting is control.
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Documentation/robofabManual/manual/howto/understandcontours.html b/Documentation/robofabManual/manual/howto/understandcontours.html
deleted file mode 100644
index 44376cd65..000000000
--- a/Documentation/robofabManual/manual/howto/understandcontours.html
+++ /dev/null
@@ -1,205 +0,0 @@
-
-
-
-
-How to Understand Contours
-
-
-
-
-
-
-
-
-
- Now, this is an important part of RoboFab so pay attention. In the world of digital font formats we have several different kinds of ways of describing outlines. Bezier curves for PostScript fonts, Quadratic curves for TrueType fonts. Each with their own peculiarities. RoboFab is format agnostic so it should be able to store all postscript and all truetype points. The structure here is meant to be able to do all that.
-
-
- Diagrams by Tal Leming.
-
-
Contours
-
- A glyph can contain one or more contours. Depending on what you want to do, there are different ways of looking at the data of the contour, the points, the line segments. The RContour object is way to the outlines. A description of the RContour object.
-
-
-
-
-
# take a glyph (one with outlines obviously)
-c = CurrentGlyph()
-# get to contours by index:
-print c[0]
->>> < RContour for Mailer-Regular.a[0] >
-
-print len(c[0])
->>> 15
-# 15? 15 of what?
-
Segments
-
- This circle consists of a couple of segments, each a piece of of the contour. A contour is a sequence of segments, you can iterate through a contour to get segments. A contour also has methods for adding and deleting segments.
-
-
-
-
-
# segment code example
-
-
-In turn, a segment is made up of a sequence of points. Any number of off-curve points followed by an on-curve point. For the PostScript-centric designers: in TrueType outlines it is allowed to have any number of off-curve points before an on-curve. These points know whether they need to be rendered as bezier of quadratic curves. A description of the RSegment object.
-
-
-
-
-
Points
-
- Another way to look at a contour is as a sequence of on-curve and off-curve points. This is the approach taken by glyph.drawPoints() and PointPen. A description of the RPoint object.
-
-
-
-
-
-# get straight to the points in a contour through the points attribute
-g = CurrentGlyph()
-for aPt in g[0].points:
->>> < RPoint for Special-Bold.A[0][0] >
- < RPoint for Special-Bold[1][1] >
- etc..
-
bPoints
-
- This is another way to look at contours and its parts: bPoints behave very much like RoboFog points used to do. A point object has an incoming bcp, an on-curve ("anchor point" fog called it) and an outgoing bcp. This approach has been added for folks more at ease with the RoboFog structure. Note: if the contour contains series of off-curve points, bPoints won't help you. A description of the bPoint object.
-
-On the pens page we discussed the different pens and their methods. Here we'll look at some practical applications of pens in RoboFab.
-
-
-
Drawing stuff in glyphs
-
-
-
-Sometimes it is necessary to draw things in glyph with a script. Boxes around glyphs, logos, patterns. Whatever the reason, a pen is the way to do it. Rather than constructing all the Contour and Segment objects yourself (it's complex and it can be a pain to get it right), just use a pen to tell the Glyph what you want to draw. In order to make it somewhat easier to find the right pen for the right glyph, RGlyph.getPen() will return a pen object for the current environment. So if you're in FontLab getPen() returns a pen fit for drawing in FontLab RGlyphs. In UFO based fonts, getPen() returns a pen for drawing in UFO glyphs. This way you can keep the code free of environment specific imports.
-
-The DigestPointPen is a pointsPen and it doesn't draw anything, but collects all the coordinates and drawing instructions from glyph.drawPoints(). When the drawing is done you can get to the data with myPen.getDigest(). The result is a tuple with a series of coordinates and instructions. Because it is a tuple you can use it to compare it to other digests, for instance if you want to test if two glyphs are the same or not.
-
-The DigestPointStructurePen is very similar to the DigestPointPen, but it only returns a tuple of the structure without any coordinates. This is very useful in comparing point structures between glyphs. For instance if you want to test if the glyphs can be used in interpolation. Using the same glyph as the example above, compare the results.
-
-As you can see, pen objects are handy tools to get to the glyph data. The filterPen.py module contains a couple of pens which modify the contour when it is being drawn. Basically a filterPen controls another pen to do the drawing.
-
-
-
-
FlattenPen and flattenGlyph()
-
-Process the contours into a series of straight lines by flattening the curves. That means that a curve is drawn as a series of straight lines, approximating the curve. The length of the segment (and therefor the number of segments) determines the precision. The pen can be controlled to flatten with different lengths. FlattenPen works slightly differently from the PostScript "flattenpath" operator: flattenpath slices a cubic curve a fixed number of times, causing the segments to be of different lengths. The FlattenPen measures each segment and tries to get them all the same length.
-
-
-
-In order to make working with the FlattenPen easier, filterPen.py also has a convenience function flattenGlyph(). This takes care of the one-pen-controlling-another thing, and replaces the current outlines with the filtered results.
-
-Different values for d will result in different lengths for the segments drawn by the FlattenPen.
-
-
-
-
ThresholdPen and thresholdGlyph()
-
-ThresholdPen only draws segments which are longer than a certain distance. This can be useful for filtering small unnecessary details from autotraced contours. Obviously this is not a replacement for a trained eye, more like a vacuumcleaner for points.
-
-The lib is very much like a plain dictionary: you use keys to store stuff in it. The nice thing about them is that they save their contents in the font and are available (after the font is saved) to scripts the next time you open the file again. In FontLab the libs (because there are several) are stored in the .vfb source. In UFO based fonts the font.libs end up in their own, XML based .plist files, inside th UFO package. The Glyph.libs end up in the .glif files.
-
-
-
Which lib?
-
-Sometimes it is handy to store values directly in the font that needs them. Rather than saving something in a seperate file (which could easily get lost), you can store data like this in the lib. A RFont has a lib and each single RGlyph has a lib as well.
-
-RoboFog users might remember the various applications. It is likely that stuff will collect in the font and glyph libs, so it is wise to pay some attention to naming the entries. If you use undescriptive or generic names like 'a' or 'mydata', there's a chance that another script will overwrite the data. So the RoboFab developers propose to use the 'reverse domain name scheme' which works out something like this:
-
-
-# storing something that belongs to a letterror script
-aFont.lib['com.letterror.develop.markers']
-
-# storing something that belongs to a aFoundry script
-aFont.lib['com.aFoundry.bud.notes']
-
-
-The lib is a flat dictionary. For RoboFog users: the RoboFog lib nested and tried to be very clever. Unfortunately it meant that sometimes data would get lots in confusing situations. A flat dictionary solves that.
-
-
-
Note
-
-In FontLab version 4.5 and 4.6 there's a nasty bug which causes FontLab to crash after something has been added to the font.customdata or glyph.customdata fields. Unfortunately these fields were used to store the robofab.font.lib and robofab.glyph.lib data. We hope future versions of FontLab will address this. In UFO files the libs for font and glyphs work fine.
-
-
aFont.lib
-
-
-
-
anyGlyph.lib
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Documentation/robofabManual/manual/howto/usetransformations.html b/Documentation/robofabManual/manual/howto/usetransformations.html
deleted file mode 100644
index f5cbb2121..000000000
--- a/Documentation/robofabManual/manual/howto/usetransformations.html
+++ /dev/null
@@ -1,203 +0,0 @@
-
-
-
-
-Using transformations
-
-
-
-
-
-
-
-
-
-Matrix transformations in RoboFab are done with the help of the matrix module from fontTools. RContour, RPoint, RbPoint, RGlyph all have transform() methods which accept a matrix object.
-
-
-
-
-
Transform objects and the Identity transform
-
-
-A Transform object from fontTools is a 2x2 transformation matrix plus offset, a.k.a. Affine transform. Transform instances are "immutable": all transforming methods, eg. rotate(), return a new Transform instance.
-
-One way to make a new transform object is by importing the Identity transform from fontTools.misc.transform. Identity is an instance of Transform and it is initialised to transform to itself (i.e. no visible transformation). The you modify the Identity object: each method (such as rotate(), translate() etc) returns a new Transform object with the last transformation added to it.
-
-
-
Oh no! Math!
-
-Transform objects are a fast and powerful way to do math with matrices. If you don't know what that means don't worry. If you follow the examples you can build Transform objects that rotate, translate and skew. Of course you can look up affine transform on google for some more in depth explanation of transformations.
-
-
-
Angles
-
-Angles in all Python's math modules are measured in radians by default. A radian is a (perhaps) more scientific unit for angles than the regular "degrees", measuring the "distance travelled" over the circle rather than the angle. The length of a full circle (with radius 1) is 2 * pi. 90 degrees = 1/2 pi radians. One can easily be converted to the other using conversion methods from the math module.
-
-
-import math
-# example of a conversion of degrees to radians
-print math.radians(90)
-
-# example of a conversion from radians to degrees
-print math.degrees(math.pi)
-
See the source code of fontTools.misc.transform for detailed descriptions and examples.
-
-
reverseTransform(): Return a new transformation, which is the other transformation transformed by self. self.reverseTransform(other) is equivalent to
- other.transform(self)
-
rotate(angle): Return a new transformation, rotated by angle (in radians).
-
skew(x, y): Return a new transformation, skewed by x and y (in radians).
-
scale(x=1, y=None): Return a new transformation, scaled by x, y. The 'y' argument
- may be None, which implies to use the x value for y as well.
-
toPS(): returns a string with the values of the transform written out in the PostScript manner: [1 0 0 1 0 0]
-
transform(other): Return a new transformation, transformed by another transformation.
-
inverse(): Return the inverse transformation.
-
transformPoint((x,y)): Transform a point, i.e. apply the transformation to the point.
-
transformPoints(points): Transform a list of points.
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Documentation/robofabManual/manual/howto/world.html b/Documentation/robofabManual/manual/howto/world.html
deleted file mode 100644
index 6804aea52..000000000
--- a/Documentation/robofabManual/manual/howto/world.html
+++ /dev/null
@@ -1,226 +0,0 @@
-
-
-
-
-The RoboFab world
-
-
-
-
-
-
-
-
-
- RoboFab can operate in many different environments. When RoboFab is running in FontLab it needs to do different things than when you're using it on for instance Linux or Windows or OSX Python. robofab.world is a module which helps you by providing the objects and functions which are appropriate for the environment you're working in.
-
-
-
-
Portable code
-
-Rather than include code in your scripts which try to figure out what functionality is available, and what machine, Python version etc. just ask RoboFab.world. Run a script in FontLab and you'll get RoboFab objects that interface with the FontLab fonts and glyphs. Run the same script outside FontLab, and you need objects that interface with UFO files. robofab.world makes the choosing of the right objects a bit more transparent. Just import from the world module and it will pick the right one.
-
-
- Using robofab.world is not compulsory - you can load the objects from the modules yourself. In some cases robofab.world doesn't even load the objects you might need. But scripts that import from robofab.world can actually work in FontLab, but also outside of it. With a bit of care, your scripts can work on UFO and FontLab fonts without ever noticing the difference. That saves a lot of time and effort.
-
-
Stuff in robofab.world
-
- Here are the objects and functions you can import from robofab.world. if you want to see exactly when and which object are selected, have a look in the robofab.world source.
-
-
robofab.world.world
-
- A collection of parameters about the world RoboFab works in. When the robofab.world module is loaded, the first time you call for it, it creates an instance of a special object which catalogs as much as possible about the environment it woke up in. This object is also called world. It's simpler than it sounds really, have a look at the examples.
-
-
-
-# in the Python IDE it looks like this:
-from robofab.world import world
-print world
->>> [Robofab is running on darwin.
- Python version: 2.3,
- Mac stuff: X,
- PC stuff: None,
- FontLab stuff: False,
- FLversion: None]
-
-# in a FontLab macro (Mac FontLab) it looks like this:
-from robofab.world import world
-print world
->>> [Robofab is running on mac.
- Python version: 2.3,
- Mac stuff: pre-X,
- PC stuff: None,
- FontLab stuff: True,
- FLversion: 4.6.1/Mac]
-
-# see the difference?
-
OpenFont(path)
-
- OpenFont is a function which opens a font. When called with a path it will open the font at that location. Without a path it will try to offer some appropriate interface to pick a font. In FontLab, OpenFont() gives you the standard font-opening-interface, and OpenFont(path) will open a FontLab fontwindow for that font. Outside FontLab, for instance in the Python IDE, you get a file dialog to point at a UFO package. If you look at the source code of OpenFont, you'll see that it is not just one function, there are several for different kinds of environments. By importing OpenFont from robofab.world, your script always has the right one and you don't have to change it when the script moves from one environment to the other.
-
-
-
- In places where there is no UI available, for instance when RoboFab is running on a Linux server, OpenFont(path) might try to import UI parts and fail. If you already know the path of a font, use RFont(path) instead.
-
-
-
-from robofab.world import OpenFont
-f = OpenFont()
-# dialog appears
-print f
->>> < Font MyFont >
-
CurrentFont()
-
- CurrentFont is an old favorite from RoboFog. It returns a font object for the top most font or the last imported font. It is very useful to write short scripts that manipulate the current font in one way or the other, so you don't have to enter the font's name.
-
-
-
-from robofab.world import CurrentFont
-f = CurrentFont()
->>> < RFont font for MyFontOT-Regular >
-
CurrentGlyph()
-
- CurrentGlyph similar to CurrentFont, except that it return the top most glyph. CurrentGlyph returns None when there isn't a glyphwindow open.
-
-AllFonts returns a list with font objects for all fonts which are 'open' at the moment. In FontLab that means one RFont object for each font window. Outside FontLab it means a list of all font objects that exist at the moment. Note: it is possible to have more than one font object for the same UFO, so if you use AllFonts for UFOs you need to take that into account. AllFonts is easy if you want to do something to all open fonts.
-
-
-from robofab.world import AllFonts
-for f in AllFonts():
- print f
->>> < RFont for aFont-Plain.00 >
->>> < RFont for aFont-Italic.00 >
->>> < RFont for aFont-Bold.00 >
-
-
-
RFont, RGlyph
-
-RFont and RGlyph classes are also loaded by robofab.world. In FontLab these objects will be imported from objectsFL.py (the FontLab implementation of the Unified Font Objects), and otherwise from objectsRF.py, the UFO objects.
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Documentation/robofabManual/manual/img/CVS/Entries b/Documentation/robofabManual/manual/img/CVS/Entries
deleted file mode 100644
index d0f15cab5..000000000
--- a/Documentation/robofabManual/manual/img/CVS/Entries
+++ /dev/null
@@ -1,33 +0,0 @@
-/drawmodel.jpg/1.1/Sun Feb 6 19:42:36 2005//
-/drawmodel_header.jpg/1.1/Sun Feb 6 19:42:36 2005//
-/flatten.gif/1.1/Sun Feb 6 19:42:36 2005//
-/halftone.gif/1.1/Sun Feb 6 19:42:36 2005//
-/logo.gif/1.1/Sun Feb 6 19:42:36 2005//
-/offdrawmodel_02.gif/1.1/Sun Feb 6 19:42:36 2005//
-/offdrawmodel_05.gif/1.1/Sun Feb 6 19:42:36 2005//
-/offdrawmodel_07.gif/1.1/Sun Feb 6 19:42:36 2005//
-/offdrawmodel_11.gif/1.1/Sun Feb 6 19:42:36 2005//
-/offdrawmodel_13.gif/1.1/Sun Feb 6 19:42:36 2005//
-/offdrawmodel_17.gif/1.1/Sun Feb 6 19:42:36 2005//
-/offdrawmodel_20.gif/1.1/Sun Feb 6 19:42:36 2005//
-/offdrawmodel_22.gif/1.1/Sun Feb 6 19:42:36 2005//
-/offdrawmodel_26.gif/1.1/Sun Feb 6 19:42:36 2005//
-/offdrawmodel_28.gif/1.1/Sun Feb 6 19:42:36 2005//
-/offdrawmodel_30.gif/1.1/Sun Feb 6 19:42:36 2005//
-/offdrawmodel_34.gif/1.1/Sun Feb 6 19:42:36 2005//
-/ondrawmodel_02.gif/1.1/Sun Feb 6 19:42:37 2005//
-/ondrawmodel_05.gif/1.1/Sun Feb 6 19:42:37 2005//
-/ondrawmodel_07.gif/1.1/Sun Feb 6 19:42:37 2005//
-/ondrawmodel_11.gif/1.1/Sun Feb 6 19:42:37 2005//
-/ondrawmodel_13.gif/1.1/Sun Feb 6 19:42:37 2005//
-/ondrawmodel_17.gif/1.1/Sun Feb 6 19:42:37 2005//
-/ondrawmodel_20.gif/1.1/Sun Feb 6 19:42:37 2005//
-/ondrawmodel_22.gif/1.1/Sun Feb 6 19:42:37 2005//
-/ondrawmodel_26.gif/1.1/Sun Feb 6 19:42:37 2005//
-/ondrawmodel_28.gif/1.1/Sun Feb 6 19:42:37 2005//
-/ondrawmodel_30.gif/1.1/Sun Feb 6 19:42:37 2005//
-/ondrawmodel_34.gif/1.1/Sun Feb 6 19:42:37 2005//
-/spike.gif/1.1/Sun Feb 6 19:42:37 2005//
-/temptitle.gif/1.1/Sun Feb 6 19:42:37 2005//
-/threshold.gif/1.1/Sun Feb 6 19:42:37 2005//
-D
diff --git a/Documentation/robofabManual/manual/img/CVS/Repository b/Documentation/robofabManual/manual/img/CVS/Repository
deleted file mode 100644
index 52d3d7773..000000000
--- a/Documentation/robofabManual/manual/img/CVS/Repository
+++ /dev/null
@@ -1 +0,0 @@
-projects/robofab/Documentation/robofabManual/manual/img
diff --git a/Documentation/robofabManual/manual/img/CVS/Root b/Documentation/robofabManual/manual/img/CVS/Root
deleted file mode 100644
index e8742a488..000000000
--- a/Documentation/robofabManual/manual/img/CVS/Root
+++ /dev/null
@@ -1 +0,0 @@
-:pserver:Erik@letterror.xs4all.nl:/Library/cvsroot
diff --git a/Documentation/robofabManual/manual/img/drawmodel.jpg b/Documentation/robofabManual/manual/img/drawmodel.jpg
deleted file mode 100644
index 1f073a6f0..000000000
Binary files a/Documentation/robofabManual/manual/img/drawmodel.jpg and /dev/null differ
diff --git a/Documentation/robofabManual/manual/img/drawmodel_header.jpg b/Documentation/robofabManual/manual/img/drawmodel_header.jpg
deleted file mode 100644
index 6eca9d271..000000000
Binary files a/Documentation/robofabManual/manual/img/drawmodel_header.jpg and /dev/null differ
diff --git a/Documentation/robofabManual/manual/img/flatten.gif b/Documentation/robofabManual/manual/img/flatten.gif
deleted file mode 100644
index 6477776b2..000000000
Binary files a/Documentation/robofabManual/manual/img/flatten.gif and /dev/null differ
diff --git a/Documentation/robofabManual/manual/img/halftone.gif b/Documentation/robofabManual/manual/img/halftone.gif
deleted file mode 100644
index 4eabb652a..000000000
Binary files a/Documentation/robofabManual/manual/img/halftone.gif and /dev/null differ
diff --git a/Documentation/robofabManual/manual/img/logo.gif b/Documentation/robofabManual/manual/img/logo.gif
deleted file mode 100644
index 91428d5ec..000000000
Binary files a/Documentation/robofabManual/manual/img/logo.gif and /dev/null differ
diff --git a/Documentation/robofabManual/manual/img/offdrawmodel_02.gif b/Documentation/robofabManual/manual/img/offdrawmodel_02.gif
deleted file mode 100644
index cfa5e3f9a..000000000
Binary files a/Documentation/robofabManual/manual/img/offdrawmodel_02.gif and /dev/null differ
diff --git a/Documentation/robofabManual/manual/img/offdrawmodel_05.gif b/Documentation/robofabManual/manual/img/offdrawmodel_05.gif
deleted file mode 100644
index f9d6400ff..000000000
Binary files a/Documentation/robofabManual/manual/img/offdrawmodel_05.gif and /dev/null differ
diff --git a/Documentation/robofabManual/manual/img/offdrawmodel_07.gif b/Documentation/robofabManual/manual/img/offdrawmodel_07.gif
deleted file mode 100644
index a0c1bdfa3..000000000
Binary files a/Documentation/robofabManual/manual/img/offdrawmodel_07.gif and /dev/null differ
diff --git a/Documentation/robofabManual/manual/img/offdrawmodel_11.gif b/Documentation/robofabManual/manual/img/offdrawmodel_11.gif
deleted file mode 100644
index 0b8047fbd..000000000
Binary files a/Documentation/robofabManual/manual/img/offdrawmodel_11.gif and /dev/null differ
diff --git a/Documentation/robofabManual/manual/img/offdrawmodel_13.gif b/Documentation/robofabManual/manual/img/offdrawmodel_13.gif
deleted file mode 100644
index 45238c34b..000000000
Binary files a/Documentation/robofabManual/manual/img/offdrawmodel_13.gif and /dev/null differ
diff --git a/Documentation/robofabManual/manual/img/offdrawmodel_17.gif b/Documentation/robofabManual/manual/img/offdrawmodel_17.gif
deleted file mode 100644
index 4f0f4545f..000000000
Binary files a/Documentation/robofabManual/manual/img/offdrawmodel_17.gif and /dev/null differ
diff --git a/Documentation/robofabManual/manual/img/offdrawmodel_20.gif b/Documentation/robofabManual/manual/img/offdrawmodel_20.gif
deleted file mode 100644
index 22fe5edcb..000000000
Binary files a/Documentation/robofabManual/manual/img/offdrawmodel_20.gif and /dev/null differ
diff --git a/Documentation/robofabManual/manual/img/offdrawmodel_22.gif b/Documentation/robofabManual/manual/img/offdrawmodel_22.gif
deleted file mode 100644
index 8bb0b9b0e..000000000
Binary files a/Documentation/robofabManual/manual/img/offdrawmodel_22.gif and /dev/null differ
diff --git a/Documentation/robofabManual/manual/img/offdrawmodel_26.gif b/Documentation/robofabManual/manual/img/offdrawmodel_26.gif
deleted file mode 100644
index d677c034d..000000000
Binary files a/Documentation/robofabManual/manual/img/offdrawmodel_26.gif and /dev/null differ
diff --git a/Documentation/robofabManual/manual/img/offdrawmodel_28.gif b/Documentation/robofabManual/manual/img/offdrawmodel_28.gif
deleted file mode 100644
index a9a6fe7d8..000000000
Binary files a/Documentation/robofabManual/manual/img/offdrawmodel_28.gif and /dev/null differ
diff --git a/Documentation/robofabManual/manual/img/offdrawmodel_30.gif b/Documentation/robofabManual/manual/img/offdrawmodel_30.gif
deleted file mode 100644
index a6e9a6bb1..000000000
Binary files a/Documentation/robofabManual/manual/img/offdrawmodel_30.gif and /dev/null differ
diff --git a/Documentation/robofabManual/manual/img/offdrawmodel_34.gif b/Documentation/robofabManual/manual/img/offdrawmodel_34.gif
deleted file mode 100644
index c635a2afc..000000000
Binary files a/Documentation/robofabManual/manual/img/offdrawmodel_34.gif and /dev/null differ
diff --git a/Documentation/robofabManual/manual/img/ondrawmodel_02.gif b/Documentation/robofabManual/manual/img/ondrawmodel_02.gif
deleted file mode 100644
index f676b6f56..000000000
Binary files a/Documentation/robofabManual/manual/img/ondrawmodel_02.gif and /dev/null differ
diff --git a/Documentation/robofabManual/manual/img/ondrawmodel_05.gif b/Documentation/robofabManual/manual/img/ondrawmodel_05.gif
deleted file mode 100644
index 374ab7809..000000000
Binary files a/Documentation/robofabManual/manual/img/ondrawmodel_05.gif and /dev/null differ
diff --git a/Documentation/robofabManual/manual/img/ondrawmodel_07.gif b/Documentation/robofabManual/manual/img/ondrawmodel_07.gif
deleted file mode 100644
index 4ecd20314..000000000
Binary files a/Documentation/robofabManual/manual/img/ondrawmodel_07.gif and /dev/null differ
diff --git a/Documentation/robofabManual/manual/img/ondrawmodel_11.gif b/Documentation/robofabManual/manual/img/ondrawmodel_11.gif
deleted file mode 100644
index f8b936f8f..000000000
Binary files a/Documentation/robofabManual/manual/img/ondrawmodel_11.gif and /dev/null differ
diff --git a/Documentation/robofabManual/manual/img/ondrawmodel_13.gif b/Documentation/robofabManual/manual/img/ondrawmodel_13.gif
deleted file mode 100644
index 457dde39a..000000000
Binary files a/Documentation/robofabManual/manual/img/ondrawmodel_13.gif and /dev/null differ
diff --git a/Documentation/robofabManual/manual/img/ondrawmodel_17.gif b/Documentation/robofabManual/manual/img/ondrawmodel_17.gif
deleted file mode 100644
index cfa43a64e..000000000
Binary files a/Documentation/robofabManual/manual/img/ondrawmodel_17.gif and /dev/null differ
diff --git a/Documentation/robofabManual/manual/img/ondrawmodel_20.gif b/Documentation/robofabManual/manual/img/ondrawmodel_20.gif
deleted file mode 100644
index c0860fcda..000000000
Binary files a/Documentation/robofabManual/manual/img/ondrawmodel_20.gif and /dev/null differ
diff --git a/Documentation/robofabManual/manual/img/ondrawmodel_22.gif b/Documentation/robofabManual/manual/img/ondrawmodel_22.gif
deleted file mode 100644
index 50d2319d1..000000000
Binary files a/Documentation/robofabManual/manual/img/ondrawmodel_22.gif and /dev/null differ
diff --git a/Documentation/robofabManual/manual/img/ondrawmodel_26.gif b/Documentation/robofabManual/manual/img/ondrawmodel_26.gif
deleted file mode 100644
index 4166e4df4..000000000
Binary files a/Documentation/robofabManual/manual/img/ondrawmodel_26.gif and /dev/null differ
diff --git a/Documentation/robofabManual/manual/img/ondrawmodel_28.gif b/Documentation/robofabManual/manual/img/ondrawmodel_28.gif
deleted file mode 100644
index 2a2a83a66..000000000
Binary files a/Documentation/robofabManual/manual/img/ondrawmodel_28.gif and /dev/null differ
diff --git a/Documentation/robofabManual/manual/img/ondrawmodel_30.gif b/Documentation/robofabManual/manual/img/ondrawmodel_30.gif
deleted file mode 100644
index e6bc161b6..000000000
Binary files a/Documentation/robofabManual/manual/img/ondrawmodel_30.gif and /dev/null differ
diff --git a/Documentation/robofabManual/manual/img/ondrawmodel_34.gif b/Documentation/robofabManual/manual/img/ondrawmodel_34.gif
deleted file mode 100644
index 8c51fe97a..000000000
Binary files a/Documentation/robofabManual/manual/img/ondrawmodel_34.gif and /dev/null differ
diff --git a/Documentation/robofabManual/manual/img/spike.gif b/Documentation/robofabManual/manual/img/spike.gif
deleted file mode 100644
index 72686b116..000000000
Binary files a/Documentation/robofabManual/manual/img/spike.gif and /dev/null differ
diff --git a/Documentation/robofabManual/manual/img/temptitle.gif b/Documentation/robofabManual/manual/img/temptitle.gif
deleted file mode 100644
index 994776693..000000000
Binary files a/Documentation/robofabManual/manual/img/temptitle.gif and /dev/null differ
diff --git a/Documentation/robofabManual/manual/img/threshold.gif b/Documentation/robofabManual/manual/img/threshold.gif
deleted file mode 100644
index 39b05ea54..000000000
Binary files a/Documentation/robofabManual/manual/img/threshold.gif and /dev/null differ
diff --git a/Documentation/robofabManual/manual/index.html b/Documentation/robofabManual/manual/index.html
deleted file mode 100644
index a53c01d2a..000000000
--- a/Documentation/robofabManual/manual/index.html
+++ /dev/null
@@ -1,156 +0,0 @@
-
-
-
-
-RoboFab
-
-
-
-
-
-
-
-
-
- RoboFab is a Python library with objects that deal with data usually associated with fonts and type design. RoboFab reads and writes UFO font files and works in any Python 2.3 (and 2.2.1), as well as in FontLab 4.6 and up.
-
- RoboFab is developed and maintained by Tal Leming, Erik van Blokland, Just van Rossum (in no particular order)
-
-
Contact
-
- Email the RoboFab Consortium at
-
- i n f o (at) r o b o f a b (dot) o r g
-
-
Copyrights
-
- The package is copyrighted by the RoboFab developers and can only be used with the permission of the developers. See the legal note.. RoboFab is built in Python. Parts of RoboFab use fontTools, an OpenSource font toolkit by Just van Rossum. Parts of the RoboFab library are built to work with code from FontLab, which is a product of Pyrus Inc. Parts of RoboFab implement the Property List file format in XML, copyright Apple Computer. Parts of RoboFab implement tables and names from PostScript and the OpenType FDK, copyright Adobe.
-
-
-
-
\ No newline at end of file
diff --git a/Documentation/robofabManual/manual/install.html b/Documentation/robofabManual/manual/install.html
deleted file mode 100644
index d33563ba2..000000000
--- a/Documentation/robofabManual/manual/install.html
+++ /dev/null
@@ -1,299 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- If you're using RoboFab in conjunction with FontLab, there are some restrictions imposed by FontLab's taste in Python. On MacOS the Python version that will work with both FontLab and RoboFab is MacPython-OS9 2.3. FontLab on Windows requires Python 2.2.1 and other OS's: Python 2.3. RoboFab is backwards compatible to Python 2.2.1, but not 2.2. RoboFab now includes a Python 2.2 compatible version of sets.py.
-
-
- Please refer to FontLab documentation for up to date and version specific info on which Python is needed for which FontLab.
-
-
- About install.py
-
-
- In the package, on the same level as this read me there's a install.py script. Running this script creates a file named
-
- robofab.pth
-
- in site-packages. This robofab.pth file contains the path to the current location of the RoboFab package. It does not copy the RoboFab package to site-packages itself, you need to keep the RoboFab package. Also: if you _move_ the RoboFab folder to some other location (or rename any of the directories the RoboFab folder is nested in), you have to run the install.py script again to update the path.
-
- Some parts of RoboFab depend on other Python modules and packages. These need to be installed as well.
-
-
-
-
- FontTools:
-
- Robofab requires Just van Rossum's FontTools package (not to be confused with Apple Inc's set of tools for fonts with the same name). It is recommended that you use the RoboFab installer with FontTools built in, available at
-
- the download section. If you must pick up FontTools separately, download the latest snapshot at
-
- fonttools.sf.net
-
-
-
-
- The Numeric Python module, available from sourceforge
-
- here. Note that downloading and installing a project from sourceforge might seem a bit dauting. Unfortunately there is no room here to maintain an install instruction for Numeric as well - please refer to the documentation provided at the project site. NoneLab use of RoboFab and reading and writing of UFO's requires Numeric. Using the RoboFab objects in FontLab can probably work without it.
-
-
-
- RoboFab bundled with FontLab Studio 5
-
-
- FontLab Studio 5 comes with RoboFab preinstalled. At the time of the 1.1.1 release (September 2005) we don't know just yet how the bundling will work exactly, where the files will be located, how to update etc. We assume that the next release will have more info on that. RoboFab 1.1.1 was released specifically with fixes for this bundle. We tested with FontLab Studio 5 Beta on Windows.
-
-
- Installing RoboFab on MacPython on Mac OSX, and most Unix.
-
-
- Python on MacOS is going through an interesting and important transition. It means however that there are several different Python solutions available on different versions of MacOS. Have a look at the
-
- MacPython pages
-
- to familiarize yourself with the options. Apart from that, installing RoboFab consists of running the install.py script in a Python of your choice.
-
-
- Installing on Mac OSX MacPython "OS9" 2.3, for FontLab.
-
-
- FontLab 4.6 on Mac OSX has to work with MacPython "OS9" 2.3 (available from
-
- MacPython). Currently FontLab does not work with the Framework version of Python. In Application/MacPython-OS9 2.3 find the
-
- PythonInterpreter. Then go to the directory where you downloaded RoboFab. Drag install.py on top of PythonInterpreter to run it. If it says 'RoboFab is installed' you're done. Since FontLab uses this version of Python, this procedure also installs RoboFab for use inside FontLab.
-
-
- RoboFab has two folders of demo scripts and utilities which can be used in FontLab. Copy the contents of the
-
- Scripts
-
- folder to the FontLab/Macros folder to make them available to FontLab.
-
-
- Permissions
-
-
- Make sure you have admin permissions on the machine when you install the various packages. When installing as a normal priviliged user, it can sometimes happen that certain files can't be written, and the installation remains incomplete. The most common problem is that one or two preference files need to be written, but the current user does not have enough permissions to delete them. Read the traceback, locate the file, delete, install again.
-
-
- Installing on Windows
-
-
- Installing RoboFab on windows should be pretty straightforward. RoboFab is backwards compatible to Python 2.2.1, but not 2.2. RoboFab now includes a Python 2.2 compatible version of sets.py.
-
-
- Note
-
-
- FontLab 4.54 (and higher) offer some basic file dialogs which RoboFab 1.1.1 uses. If you want to use file dialogs on Windows in an older (pre- 4.54) version of FontLab, or you want to use file dialogs on Windows, outside of FontLab (NoneLab), then you need to install the free win32 module, which might have dependencies of its own.
-
-
-
-
- The win32 module, available for download
-
- here. This module is needed for some simple dialogs and messages. We might actually move to another module for these services in the future.
-
-
-
- Tested in Windows XP Home Edition. If there are special requests or procedures we've forgotten to mention, please let us know.
-
-
- Installing on other platforms
-
-
- Place the robofab directory in a place where you can leave it for a while. Not on the desktop or a temporary download folder. Run install.py in a Python interpreter.
-
-
- Initial testing
-
-
- Open a Python interactive interpreter window.
-
-
import robofab
-# notice, all lowercase!
-
-
- If you don't get an traceback, you're good to go.
-
-
- In Scripts/RoboFabIntro/ there are some test scripts, simple examples and some utilities. Read the source to learn more about what the examples do and where they want to run.
-
-
- Detailed unittesting
-
-
- Robofab has unittesting to make sure all parts function properly. If you don't know what unittesting is, don't sweat it. If you're interested, go to
-
- robofab/test/runAll.py.
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Documentation/robofabManual/manual/intro.html b/Documentation/robofabManual/manual/intro.html
deleted file mode 100644
index 73aea9b4f..000000000
--- a/Documentation/robofabManual/manual/intro.html
+++ /dev/null
@@ -1,201 +0,0 @@
-
-
-
-
-RoboFab Intro
-
-
-
-
-
-
-
-
-
-
-RoboFab is a library of Python code for manipulation and storage of font and glyph related data. RoboFab implements a new font file format, the Unified Font Objects or .ufo for short. UFO is a format for font sources (similar to something like .fog or .vfb) except that UFO is XML based (see Glyph Interchange Format), readable, well documented and easily extended to contain different kinds of data.
-
-
-
-
Long term sources
-
-
-
-
-
-
- Traditionally, font editors have their own file formats to store the work in progress. Generated fonts are optimised for size and speed and they have no extra room to store all the additional information one needs during the design of a font (for instance background layers, notes, information for other font formats). When a company stops working on their application (it happens), the binary source files become a burden. Not immediately, but soon enough as system updates make the last version of the program impossible to run. When that happens, all the binary source files are impossible to read. The formats are not or badly documented. They've locked themselves and your work is gone.
-Type design is a long term endeavour and it makes sense to store font source material in a long term format. UFO is our idea of how such a format should look like: XML based, object oriented and flexible. Text is just so much easier to handle.
-
-
-
Unified Font Objects
-
-
-RoboFab reads and writes UFO, but it also provides a range of Python objects to work with these Unified Font Objects. We have implemented the UFO objects for use in FontLab (based on top of FontLab's own objects) and another one which implements the UFO objects for use in a plain-Python environment, NoneLab. That means you can access and manipulate font and glyph data in Python without running a font editor (but it has some other drawbacks). It's possible to write scripts with RoboFab that work the same in FontLab as they do in a plain Python environment. Unified Font Objects can store quadratic and bezier splines.
-
-
-
-
-
-
RoboFab environments
-
-Parts of RoboFab can be used in FontLab, other parts work outside FontLab, in normal Python interpreters. Some parts work in both. This is a powerful feature of RoboFab, but it can sometimes be a bit confusing. Have a look at the world module for some help in making scripts that work everywhere.
-
-
-
RoboFab in plain Python
-
-After RoboFab is installed you can write plain non-FontLab Python scripts that open, manipulate and save .ufo files. Through the RoboFab objects you have access to all data in the font: names, glyphs, contours, widths, kerning, the lot. Use the objects overview or the objects map to get an idea of what these things can do. Plain Python can be a Python IDE, or a python command line interpreter. RoboFab runs on any Python 2.2.1+ installation, Linux, Unix, Mac OSX, MacOS9, Windows. Python ports to lots of platforms and so does RoboFab.
-
-
-
RoboFab in FontLab's Python
-
-
-RoboFab can also run in FontLab and transparently implements the RoboFab object structure on top of the FontLab objects. That means that with RoboFab installed you can talk to FontLab fonts using the same methods and attributes as you use to write scripts for UFO fonts. The RoboFab objects in FontLab can manipulate the font data you see in the FontLab windows. Some RoboFab objects in FontLab have extra attributes and methods to deal with FontLab specific functionality. For example font generation, guides and access to the underlying FontLab objects.
-
-
-
-
RoboFab and UFO
-
-RoboFab Font objects can export and import the UFO format. So you can write scripts in FontLab that export data to UFO, and other scripts that edit these UFO's, and then later import the UFO back into FontLab.
-
-
-
What RoboFab is not..
-
-
Not entirely RoboFog MkII
-
-RoboFab is not a port of RoboFog to OSX, nor is it a complete font editor with interfaces, font and glyph windows etc. It is a toolkit that you can use to build your tools with. You can start by using RoboFab to make scripting in FontLab easier. But you can also use RoboFab to build elaborate tools (for instance MetricsMachine) that read and write UFO fonts and work on the data. Other RoboFab based tools are under construction.
-
-
-
-
-
Not entirely RoboFog Compatible
-
-We've poured all our experience from writing RoboFog into the RoboFab objects. You will recognise a lot. But the font world has grown a lot more complex since Fontographer 3.5 so RoboFab objects need to deal with a lot more than their RoboFog ancestors. Your RoboFog scripts won't work with RoboFab, sorry. But they're structured quite similarly and you won't have much trouble adapting. We thought about building objects with the RoboFab API for RoboFog, but their functionality depends too much on features that were introduced after Python 1.5.2. It would be too complex. But we've provided an alternative: export scripts for RoboFog to UFO format, so that you can write UFOs for all your RoboFog sources and use them in the new UFO tools.
-
-
-
Not entirely Open Source
-
-
-
-RoboFab comes with the Python sources. By all means dig in and mess with it. But there is a license. RoboFab is free for personal use and development. But RoboFab is not GPL or LGPL. There are some restrictions on redistributing the code. For instance bundling RoboFab in applications you want to sell or give away. If you have plans for some app, please get in touch and we can discuss a licensing agreement.
-
-
-
-
-The license is for our code, the implementation. The UFO file format as described on the LettError wiki is free and can be implemented by anyone using any language.
-
-
-
-
-
Where next?
-
- First you could download the library and install it. Then you could browse through this documentation and see what the various objects are, what they can do etc. You could have a look at a discussion on scripting.
-
-
-
-
\ No newline at end of file
diff --git a/Documentation/robofabManual/manual/legal.html b/Documentation/robofabManual/manual/legal.html
deleted file mode 100644
index 2e0468e75..000000000
--- a/Documentation/robofabManual/manual/legal.html
+++ /dev/null
@@ -1,118 +0,0 @@
-
-
-
-
-New Page
-
-
-
-
-
-
-
-
-
- An overview of known problems, bugs and implementation limits. These are issues we are aware of. Some of them are things we have to fix in RoboFab, others are limitations that are just part of the world we have to work in.
-
-
FontLab
-
- Known problems in FontLab 4.6.1
-
-
flfont.customdata, flglyph.customdata
-
- There is a bug in FontLab which caused FontLab to crash shortly after Python has written something in the flfont.customdata or flglyph.customdata fields. RoboFab uses the customdata fields to store the font.lib and glyph.lib. RoboFab is just using the functionality of these fields in FontLab, there's nothing we can do to fix it in RoboFab. The problem has been reported to the FontLab developers.
-
-
-
FontLab Studio 5 probably has a new attribute for font and glyph objects to store arbitrary Python data. This attribute will replace the customdata attribute. At the time of the 1.1.1 release we have not tested this attribute. We expect a future release to make use of them.
-
-
Hints
-
- Hint data is not exported to UFO format. We're looking into ways to support this. Any hint data can be added to the UFO without much trouble, but experimentation shows disabling stability issues in FontLab itself.
-
-
Multiple Master
-
- RoboFab glyphs do not offer direct access to FontLab's Multiple Master-masters. If you need access to that data, use the glyph.naked() method to get to the FontLab glyph object which have access.
-
-
-
- If you're considering scripting complex interpolation systems, have a look at Superpolation.
-
-
UFO format
-
- Known problems or limitations in the UFO format, RoboFab version 1.0b1 and 1.0.
-
-
Export of OT features
-
- RoboFab does not automatically export the feature descriptions from FontLab to UFO. The featureLib.py offers some tools to export the feature text to the font.lib and import them from the lib as well, but this needs to be called seperately after reading and before writing the UFO. Or export all features to a seperate .fea file.
-
-
Macroman encoded XML files from UFO Exporter in RoboFog
-
-Not a problem, but just something to be aware of: UFO files exported from the UFO Exporter scripts in RoboFog are text files with macroman text encoding. The XML files identify the encoding as such and XML interpreters seem to respect and understand this. UFO files exported written by the UFO writers in RoboFab use UTF-8 as default encoding for the XML text. The macroman export is necessary because encodings are not supported in Python 1.5.2.
-
-
-
Objects
-
- Known problems with Objects
-
-
GlypMath on Contour, Segment, Point in FontLab
-
-Contour, Segment, Point and BPoint objects in ObjectsFL (the objects you get when you use RoboFab in FontLab) do not have GlypgMath operators. All GlyphMath operations in FontLab are handled by the Glyph object and then quickly deferred to objects from ObjectsRF which do know how to handle GlyphMath operations. This is not necessarily a bug, but an effect of differences between the way RoboFab objects work in FontLab and how they work in plain Python.
-
Building accents: use RoboFab to build accented glyphs with components.
-RContour: belongs to a Glyph, contains Segments
-RComponent: belongs to a Glyph, refers to other Glyphs
-
contour
Understanding Contours: how contours, segments and points work.
-Using transformations: matrix transformations in RoboFab
-RAnchor: a connection point for Components
-RPoint: a point on a Contour
-RContour: belongs to a Glyph, contains Segments
-RSegment: a part of a Contour, a series of severall off and one oncurve Points
-RComponent: belongs to a Glyph, refers to other Glyphs
-bPoint: a point on a Contour which behaves like a RoboFog point
-
font
Generate Fonts: how to generate fonts with RoboFab in FontLab.
-RFont: contains Glyphs, names, kerning, data
-RLib: part of a Font, contains all arbitrary data
-
fontlab
FontLab Remote: use AppleEvents to control FontLab in Mac OSX
-
Using transformations: matrix transformations in RoboFab
-Using Glyph Math: applying math operators on glyph objects.
-RContour: belongs to a Glyph, contains Segments
-RGlyph: belongs to a Font, contains contours, components etc.
-Pen objects: about Pen objects
-RFont: contains Glyphs, names, kerning, data
-RComponent: belongs to a Glyph, refers to other Glyphs
-RLib: part of a Font, contains all arbitrary data
-
RInfo: part of a Font, contains all names, dimensions
-RInfo: part of a Font, contains all names, dimensions
-RFont: contains Glyphs, names, kerning, data
-
FontLab Remote: use AppleEvents to control FontLab in Mac OSX
-Using the lib: make the glyph.lib and font.lib work for you.
-RLib: part of a Font, contains all arbitrary data
-
RKerning: part of a Font, contains all kerning data
-
names
RInfo: part of a Font, contains all names, dimensions
-
objects
RAnchor: a connection point for Components
-Objects: Overview of the objects, their methods and attributes
-RPoint: a point on a Contour
-Object model: a map of the structure.
-RInfo: part of a Font, contains all names, dimensions
-RContour: belongs to a Glyph, contains Segments
-RSegment: a part of a Contour, a series of severall off and one oncurve Points
-RGlyph: belongs to a Font, contains contours, components etc.
-Pen objects: about Pen objects
-RKerning: part of a Font, contains all kerning data
-RFont: contains Glyphs, names, kerning, data
-RComponent: belongs to a Glyph, refers to other Glyphs
-RLib: part of a Font, contains all arbitrary data
-bPoint: a point on a Contour which behaves like a RoboFog point
-
Understanding Contours: how contours, segments and points work.
-RSegment: a part of a Contour, a series of severall off and one oncurve Points
-bPoint: a point on a Contour which behaves like a RoboFog point
-
f = CurrentFont()
-for c in f:
- if len(c.anchors) > 0:
- print c, c.anchors
->>> < RGlyph for RoboFab Demo Font.A >
- [ < RAnchor for RoboFab Demo Font.A.anchors[0] >]
-
-
Description
-
-
-Anchors are single points in a glyph which are not part of a contour. Anchors have a name and a position, and they're used as connection points for Components. In FontLab the anchors have a special appearance and can be edited. Anchors are stored in GLIF as single, named, moveto's. i.e. any single, named moveto in GLIF will become an anchor in FontLab. RoboFab's own font.generateGlyph() also uses the anchors to assemble the components.
-
-
-
-
Attributes
-
-
index: the index of the anchor. (read only)
-
position: the position of the anchor (x, y)
-
x: the x position of the anchor.
-
y: the y position of the anchor.
-
name: the name of the anchor.
-
-
Attribute examples
-
c = CurrentGlyph()
-if len(c.anchors) > 0:
- for a in c.anchors:
- print a.position
-
-
-
Methods
-
-
-
copy(): return a deepcopy of the object.
-
move((x, y)): move the anchor of the bPoint to (x,y). The relative coordinates of the bcpIn and bcpOut will remain the same, which means that in fact, they move the same distance.
-
scale((x, y), center=(0, 0)): scale the anchor.
round(): round the coordinates to whole integers.
-
-
draw(aPen): draw the object with a RoboFab segment pen.
-
drawPoints(aPen): draw the object with a point pen. See how to use pens.
-
-
transform(matrix): Transform this point. Use a
-Transform matrix
- object to mess with the point. See how to use transformations.
-
-
-
-
-
Method examples
-
#method examples
-
-
-
-
-
\ No newline at end of file
diff --git a/Documentation/robofabManual/manual/objects/anchor.jpg b/Documentation/robofabManual/manual/objects/anchor.jpg
deleted file mode 100644
index 68c7802e5..000000000
Binary files a/Documentation/robofabManual/manual/objects/anchor.jpg and /dev/null differ
diff --git a/Documentation/robofabManual/manual/objects/bpoint.html b/Documentation/robofabManual/manual/objects/bpoint.html
deleted file mode 100644
index 0ba7e8a24..000000000
--- a/Documentation/robofabManual/manual/objects/bpoint.html
+++ /dev/null
@@ -1,187 +0,0 @@
-
-
-
-
-RoboFab Objects: bPoint
-
-
-
-
-
-
-
-
-
g = CurrentGlyph()
-for aPt in g[0].bPoints:
->>> < RbPoint for Special-Bold.A[0][0] >
-
Description
-
-The bPoint is a point object which mimics the old "Bezier Point" from RoboFog. It has attributes for bcpIn, anchor, bcpOut and type. The coordinates in bcpIn and bcpOut are relative to the position of the anchor. For instance, if the bcpIn is 20 units to the left of the anchor, its coordinates would be (-20,0), regardless of the coordinates of the anchor itself. Also: bcpIn will be (0,0) when it is "on top of the anchor", i.e. when there is no bcp it will still have a value. The parent of a bPoint is usually a Contours
-
-
-
Understanding Contours and outlines
-
-The way outline data is organised in RoboFab, and how the various objects relate is described here: understanding contours.
-
-
-
Attributes
-
-
anchor: the position of (oncurve) anchor. (x, y)
-
bcpIn: the position of the incoming (offcurve) bezier control point. (x, y)
-
bcpOut: the position of the outgoing (offcurve) bezier control point. (x, y)
-
type: the type of the bPoint. Either corner or curve
move((x, y)): move the anchor of the bPoint to (x,y). The relative coordinates of the bcpIn and bcpOut will remain the same, which means that in fact, they move the same distance.
-
round(): round the coordinates to whole integers.
-
select(state=True): select this point.
-
transform(matrix): Transform this point. Use a Transform matrix
- object to mess with the point. See how to use transformations.
-
-
Method examples
-
#method examples
-
-
-
-
-
\ No newline at end of file
diff --git a/Documentation/robofabManual/manual/objects/component.html b/Documentation/robofabManual/manual/objects/component.html
deleted file mode 100644
index 4a86ae37c..000000000
--- a/Documentation/robofabManual/manual/objects/component.html
+++ /dev/null
@@ -1,201 +0,0 @@
-
-
-
-
-RoboFab Objects: RComponent
-
-
-
-
-
-
-
-
-
# the easiest way to get to a component
-# is to get one from a glyph
-from robofab.world import CurrentFont
-f = CurrentFont()
-g = f['adieresis']
-for c in g.components:
- print c
->>> < RComponent for Excellent-Regular.adieresis.components[0] >
->>> < RComponent for Excellent-Regular.adieresis.components[1] >
-
-
Description
-
-A component can be a part of a glyph and it is a reference to another glyph in the same font. With components you can make glyphs depend on other glyphs. Changes to the baseGlyph will reflect in the component as well. Fontographer and RoboFog called them composites. The parent of a component is usually a glyph. Components can be decomposed: they replace themselves with the actual outlines from the baseGlyph. When that happens the link between the original and the component is broken: changes to the baseGlyph will no longer reflect in the glyph that had the component.
-
-
Attributes
-
-
baseGlyph: the name of the glyph the component points to. The glyph is assumed to be present in the same font.
-
index: the index of the component in the list of components in the parent glyph. i.e. the first component in a glyph has index 0.
-
offset: offset vector (x, y). The distance the component has been moved.
-
-
scale: scale (x, y). The distance the component has been moved.
-
-
box: the bounding box for the component (read only).
-
-
-
Attribute examples
-
print f['adieresis'].components[0].baseGlyph
->>> a
-
-print f['adieresis'].components[1].baseGlyph
->>> dieresis
-
-# move the component in the base glyph
-f['adieresis'].components[1].offset = (100,100)
-
-# scale the component in the base glyph
-f['adieresis'].components[0].scale = (.5, .25)
-
-
Methods
-
-
-
-
decompose(): in the parent glyph replace this component object with the actual contours. This practically ends the existence of the component object.
-
move((x, y)): move the component to position (x, y)
-
draw(aPen): draw this component with aPen
-
drawPoints(aPointPen): draw this component with aPointPen. Note: both these drawing methods are usually called by aGlyph.draw() and aGlyph.drawPoints() as part of the drawing process.
-
copy(): return a deep copy of the object.
-
setChanged(): call to indicate that something about the component has changed.
-
-
Method examples
-
#method examples
-
-
-
-
-
\ No newline at end of file
diff --git a/Documentation/robofabManual/manual/objects/component.jpg b/Documentation/robofabManual/manual/objects/component.jpg
deleted file mode 100644
index 17d0415b4..000000000
Binary files a/Documentation/robofabManual/manual/objects/component.jpg and /dev/null differ
diff --git a/Documentation/robofabManual/manual/objects/contour.html b/Documentation/robofabManual/manual/objects/contour.html
deleted file mode 100644
index ff4d3d219..000000000
--- a/Documentation/robofabManual/manual/objects/contour.html
+++ /dev/null
@@ -1,222 +0,0 @@
-
-
-
-
-RoboFab Objects: RContour
-
-
-
-
-
-
-
-
-
# take a glyph (one with outlines obviously)
-c = CurrentGlyph()
-# get to contours by index:
-print c[0]
->>> < RContour for Mailer-Regular.a[0] >
-
-
Description
-
-RContour is an object for, well, contours. A contour is a single path of any number of points and shape. A glyph usually consists of a couple fo contours, and this the object that represents each one. The RContour object offers access to the outline matter in various ways. The parent of RContour is usually RGlyph.
-
-
-
Understanding Contours and outlines
-
-The way outline data is organised in RoboFab, and how the various objects relate is described here: understanding contours.
-
-
-
If you want to add new contours to a glyph it's easier to draw them with a pen than to construct the shapes from segments.
-
-
Attributes
-
-
index: the index of the contour in the Glyph.
-
selected: returns 1 if the contour is selected, 0 if it isn't.
-
box: the bounding box for the contour (read only).
-
clockwise: direction of contour: 1=clockwise 0=counterclockwise
#Usage examples
-# start using the current font
-f = CurrentFont()
-
-# get a clean, empty new font object,
-# appropriate for the current environment
-f = robofab.world.RFont()
-
-# get an open dialog and start a new font
-f = OpenFont()
-
-# open the font at path
-f = OpenFont(path)
-
-
Description
-
- Perhaps the first object you get to play with. The RFont object is the central part that connects all glyphs with font information (like names, key dimensions etc.). In FontLab the RFont object talks directly to the glyphs and font data in the FontLab font it belongs to. In UFO or NoneLab use, the RFont object contains the data and saves it to UFO. RFont object behave like dictionaries: the glyphname is the key and the returned value is a RGlyph object for that glyph. If the glyph does not exist RFont will raise an IndexError.
-RFont has a couple of important sub-objects which are worth checking out. The font's kerning is stored in a RKerning object and can be reached as an attribute at RFont.kerning. Fontnames, key dimensions, flags etc are stored in a RInfo object which is available through RFont.info. The RFont.lib is an RLib object which behaves as a dictionary.
-
-
Iterating
-
-One of the most important uses of the RFont object is that it makes it really easy to iterate ("step through") the glyphs in the font.
-
- All basic attributes, methods and behaviour for RFont objects made in FontLab or in NoneLab are identical. However, the RFont objects in FontLab have some additional attributes and methods that make special FontLab functionality available. These extra methods and attributes are listed seperately below.
-
- info: the RInfo object with all the font's names and key dimensions.
-
-
- lib: the lib object which behaves like a dictionary for arbitrary data that needs to be stored with the font. In FontLab the lib is stored in the .vfb file. In UFO based fonts the lib is a seperate .plist file. Have a look at how to use the lib
-
-
-
Attribute examples
# Most useful attributes of RFont are
-# actually stored in RFont.info
-f = CurrentFont()
-print f.info.unitsPerEm
->>> 2048
-
-# len() gives you the "length" of the font, i.e. the number of glyphs
-print len(f)
->>> 1120
-
-# treat a font object as a dictionary to get to the glyphs
-print f["A"]
->>> < Glyph for MyFont.A >
-
RFont Methods available in FontLab and UFO
-
-
-
-
- RFont[glyphName]: asking the font for a glyph by glyphName like a dictionary.
-
-
- has_key(glyphName): return True if glyphName is present in the font.
-
-
- keys(): return a list of all glyphnames in this font.
-
-
- newGlyph(glyphName, clear=True): create a new, empty glyph in the font with glyphName. If clear is True (by default) this will clear the glyph if it already exists under this name.
-
-
- removeGlyph(glyphName): remove a glyph from the font. This method will show a slightly different behaviour in FontLab and pure Python. In FontLab, components that reference the glyph that is being removed will be decomposed. In plain Python, the components will continue to point to the glyph.
-
insertGlyph(aGlyph, as=None) inserts aGlyph in the font, the new glyph obejct is returned. If the font already has a glyph with the same name the exisiting data is deleted. The optional as parameter is an alternative glyph name, to be used if you want to insert the glyph with a different name.
-
- compileGlyph(glyphName, baseName, accentNames, adjustWidth=False, preflight=False, printErrors=True): Compile components into a new glyph using components and anchorpoints. glyphName: the name of the glyph where it all needs to go. baseName: the name of the base glyph. accentNames: a list of accentName, anchorName tuples, [('acute', 'top'), etc]
-
-
- generateGlyph(glyphName, replace=True, preflight=False, printErrors=True): Generate a glyph and return it. Assembled from GlyphConstruction.txt. replace is True the font will replace the glyph if there is already one with this name. preflight is True: the font will attempt to generate the glyph without adding it to the font. Do this to find out if there are any problems to make this glyph. For instance missing glyphs or components could be a problem. See building accents.
-
-
-getReverseComponentMapping(): Get a reversed map of component references in the font.
-
- save(destDir=None, doProgress=False, saveNow=False): Save the font.
-
-
- autoUnicodes(): Using fontTools.agl, assign Unicode lists to all glyphs in the font
-
-
- interpolate(): see how to interpolate for a detailed description of the interpolate method in RFont.
-
-
- round(): round all of the coordinates in all of the glyphs to whole integer numbers. For instance a point at (12.3, -10.99) becomes (12, -11). UFO based fonts can deal with floating point coordinates, but for use in FontLab everything needs to be rounded otherwise bad things happen.
-
-
- update(): call to FontLab to refresh the font. You call update() after doing lots of manipulating and editing. In UFO based RFont objects update() doesn't do anything, but it exists.
-
-
- copy(): returns a deep copy of the font, i.e. all glyphs and all associated data is duplicated.
-
-
- getCharacterMapping(): returns a dict of unicode values to glyph names.
-
-
-
-
-
-
Method examples
-f = CurrentFont()
-
-# the keys() method returns a list of glyphnames:
-print f.keys()
->>> ['A', 'B', 'space', 'adieresis.alt1']
-
-# find unicodes for each glyph by using the postscript name:
-f.autoUnicodes()
-
-
-
-
RFont Methods available in FontLab only
-
-
- naked(): return the wrapped fontlab font object itself. This can be useful if you want to set very specific values in the fontlab font that aren't wrapped or handled by RoboFab objects.
-
-
- writeUFO((path=None, doProgress=False,
- glyphNameToFileNameFunc=None): write the font to UFO at path. doProgress=True gives you a progressbar if you want. glyphNameToFileNameFunc is an optional callback for alternative naming schemes. See How to use glyph naming schemes
-
-
- close(): close the font object and the font window in FontLab.
-
-
- appendHGuide(): append a horizontal guide.
-
-
- appendVGuide(): append a vertical guide.
-
-
- clearHGuides(): clear all horizontal guides
-
-
- clearVGuides(): clear all vertical guides
-
-
- generate(outputType, path=None): call FontLab to generate fonts with these parameters and location. Have a look at generate fonts for a more detailed description of this method and how to use it.
-
-
-
RFont Attributes available in FontLab only
-
-
- selection: a list of selected glyph names in the font window.
-
-
-
-
Attribute examples
-f = CurrentFont()
-
-# the keys() method returns a list of glyphnames:
-print f.selected
->>> ['A']
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Documentation/robofabManual/manual/objects/font.jpg b/Documentation/robofabManual/manual/objects/font.jpg
deleted file mode 100644
index 3a8ee8f0c..000000000
Binary files a/Documentation/robofabManual/manual/objects/font.jpg and /dev/null differ
diff --git a/Documentation/robofabManual/manual/objects/generic.html b/Documentation/robofabManual/manual/objects/generic.html
deleted file mode 100644
index 1792ccd47..000000000
--- a/Documentation/robofabManual/manual/objects/generic.html
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- The RGlyph object represents a glyph, its parts and associated data. In FontLab RGlyph talks directly to a glyph in an open font. In NoneLab the RGlyph refers to data read from (and written to) a specific glif file in a UFO. RGlyph can be used as a list of RContours. When RGlyph is obtained from a RoboFab font object (see examples), the font is the parent object of the glyph.
Attributes
-
-
-
-
- components: a list of the Components in this glyph.
-
- aGlyph[index]: get the Contour object at index.
-
-
- width: the horizontal advance width of the glyph.
-
-
- leftMargin: the left margin of the glyph.
-
-
- rightMargin: the right margin of the glyph.
-
-
- name: the glyph name.
-
-
- box: the bounding box. The values are (xMin, yMin, xMax, yMax). Note: these values represent the actual measurements of the shape of the glyph. They're usually different from the rectangle described by glyph.width / font.info.unitsPerEm
-
-from robofab.world import CurrentFont
-f = CurrentFont()
-
-g = f["Adieresis"]
-# get the width
-print g.width
->>> 358
-
-# get the width
-print g.name
-# surprise!
->>> Adieresis
-
-print g.unicodes
-# a list of unicode values for this glyph. Can be more than 1!
->>> [196]
-
-# set the width
-g.width = 1000
-print g.width
->>> 1000
-
-# get the number of contours in a glyph:
-print len(g)
->>> 3
-
-# get the name of the glyph
-print g.name
->>> Adieresis
-
-
-
Methods
-
-
-
- appendComponent(baseGlyph, offset=(0, 0), scale=(1, 1)): Append a component to the glyph. x and y are optional offset values.
-
-
- appendContour(aContour): add a contour to the glyph.
-
-
- appendComponent(glyphName, (offsetX=0, offsetY=0), (scaleX=1, scaleY=1)): add a component to the glyph. Optional values for offset and scale.
-
-
->>>>>>> 1.14
- appendGlyph(aGlyph): add a whole glyph. This adds all the contours, anchors and components to the glyph.
-
-
- autoUnicodes(): try to find unicode values for this glyph. This method tries to match the glyph name to a known value.
-
-
- copy(): returns a deep copy of this glyph. That means that all parts of the glyph: contours, components, anchors etc. are duplicated.
-
-
- correctDirection(): correct the direction of all contours in this glyphs.
-
-
- autoContourOrder(): automatically order the contours based on (in this order): the point count of the contours, the segment count of the contours, the x value of the center of the contours, the y value of the center of the contours and the surface of the bounding box of the contours.
-
-
- pointInside((x, y)): returns True if the point is inside the "black" area of the glyph or False if the point is inside the "white" area of the glyph.
-
-
- draw(aPen): get this glyph to draw itself with the pen on offer.
-
-
- drawPoints(aPointsPen): get this glyph to draw itself with the points pen on offer. For differences between Pen and PointsPen see here Pens.
-
-
- getPen() returns an appropriate Pen object to draw in this glyph.
-
-
- getPointPen() returns an appropriate Point Pen object to draw in this glyph.
-
-
- removeOverlap(): remove overlap in this glyph (currently only supported in FontLab)
-
-
- interpolate(factor, minGlyph, maxGlyph, suppressError=True, analyzeOnly=False): make this glyph the interpolation between minGlyph and maxGlyph by factor. When suppressError is True (the default value) this method will not complain if the interpolation is not possible. When analyzeOnly is True (default is False), this method will only analyze if the interpolation is possible and provide a report if something is wrong. See also how to interpolate.
-
-
- isCompatible(anotherGlyph, report=True): returns True if the glyph has a compatible point structure as anotherGlyph. When report is True, isCompatible also returns a report on what the problems could be. See also how to interpolate.
-
-
- isEmpty(): returns True when the glyph does not contain any contours, components or anchors.
-
-
- move(x, y), contours=True, components=True, anchors=True): Move a glyph's items that are flagged as True
-
-
- scale((x, y), center=(0, 0)): Scale the glyph by x and y. Optionally set the center of the scale.
-
-
- rotate(angle, offset=None): Rotate the glyph by angle (in degrees). Optionally set an offset value.
-
-
- skew(angle, offset=None): Skew the glyph by angle (in degrees). Optionally set an offset value.
-
-
- rasterize(cellSize=50, xMin=None, yMin=None, xMax=None, yMax=None): Slice the glyph into a grid based on the cell size. It returns a list of lists containing bool values that indicate the black (True) or white (False) value of that particular cell. These lists are arranged from top to bottom of the glyph and proceed from left to right. This is an expensive operation!
-
-
-
-
Method examples
-
-
-# get a glyph object from a font
-f = CurrentFont()
-g = f["A"]
-print g
->>> < RGlyph for MyFont-Regular.ufo >
-
-# move the glyph 10 units to the right, and 200 units up:
-g = f["a"]
-g.move((10, 200))
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Documentation/robofabManual/manual/objects/glyph.jpg b/Documentation/robofabManual/manual/objects/glyph.jpg
deleted file mode 100644
index e239e4ddd..000000000
Binary files a/Documentation/robofabManual/manual/objects/glyph.jpg and /dev/null differ
diff --git a/Documentation/robofabManual/manual/objects/glyphlib.jpg b/Documentation/robofabManual/manual/objects/glyphlib.jpg
deleted file mode 100644
index 4008a77da..000000000
Binary files a/Documentation/robofabManual/manual/objects/glyphlib.jpg and /dev/null differ
diff --git a/Documentation/robofabManual/manual/objects/index.html b/Documentation/robofabManual/manual/objects/index.html
deleted file mode 100644
index 8a882622f..000000000
--- a/Documentation/robofabManual/manual/objects/index.html
+++ /dev/null
@@ -1,191 +0,0 @@
-
-
-
-
-RoboFab Objects
-
-
-
-
-
-
-
-
-
- The most detailed information about RoboFab objects is available in robofabDocs in the RoboFab distribution. This overview here focusses on a couple of the more important objects and offers examples on how to use them.
-
RSegment: a part of a Contour, a series of severall off and one oncurve Points
-
-
-
-
-
Scope
-
-
-
Naming conventions in RoboFab
-
- Attributes and method names follow a couple of consistent rules which make it easier to remember what they're called.
-
-
Class names start with a capital: RGlyph, BasePen etc.
-
method and attribute names start with lowercase: glyph.center(), glyph.width
-
private attributes and methods start with underscore. point._index. Note: private methods and attributes are needed to make the objects work, but they're not intended for users to mess with, that's why they're called private. The description of the objects in this manual then do not list them.
-
all names follow camelCaseNaming as much as possible. So glyph name becomes glyphName
-
-
-
-
Availability of methods, attributes
-
- Unless noted otherwise, the examples, methods and attributes should work in all implementations of RoboFab, so within FontLab as well as NoneLab. These reference pages are written by an experienced RoboFab user, not a robot. All the objects have more attributes and methods than listed here. But these are the most important ones to get started with. For a full list refer to the robofabDocs in the RoboFab distribution.
-
-
-
-
Perhaps not documented yet
-
- As noted earlier, this documentation is written by a person, not a machine. So it is possible attributes, objects, methods are missing. Drop us a line if you're missing something.
-
-
-
-
\ No newline at end of file
diff --git a/Documentation/robofabManual/manual/objects/info.html b/Documentation/robofabManual/manual/objects/info.html
deleted file mode 100644
index a61e6efdb..000000000
--- a/Documentation/robofabManual/manual/objects/info.html
+++ /dev/null
@@ -1,219 +0,0 @@
-
-
-
-
-RoboFab Objects: RInfo
-
-
-
-
-
-
-
-
-
-from robofab.world import CurrentFont
-f = CurrentFont()
-print f.info.fullName
->>> MyFont Regular
-
-print f.info.designer
->>> Huib van Krimpen
-f.info.designer = "Jan van Krimpen"
-print f.info.designer
->>> Jan van Krimpen
-
-print f.info.ttVendor
->>> LTTR
-
-print f.info.unitsPerEm
->>> 1000
-
-print f.info.xHeight
->>> 307
-
-print f.info.licenseURL
->>> http://www.letterror.com/foundry/license.html
-
-# but you can set the values as well
-f.info.uniqueID = 4309359
-f.info.designer = "Eric Gill"
-
-
Description
-
-RInfo contains all names, numbers, URL's, values, etc. that would otherwise clutter up the font object. You don't have to create a RInfo object yourself, RFont makes one when it is created. In FontLab the RInfo data is tunneled to the appropriate places in the FontLab font. In UFO land the data ends up in info.plist. In all implementations RInfo doesn't check the validity of the entries, it just provides storage or access to them. It is likely that the attributes of RInfo are extended in the future.
-
-
-
Attributes
-
The list below is likely to grow.
-
-
ascender: ascender value, an integer
-
capHeight: cap height value, an integer
-
copyright: copyright string, a string
-
createdBy: field for the creator for the font, i.e. the foundry
-
defaultWidth: value for default width of missing glyphs, an integer
-
designer: name of the designer, a string
-
designerURL: web address for the designer, a URL
-
familyName: family name of the font, a string
-
fondID: MacOS FOND resource number, an integer
-
fondName: MacOS FOND name, a string
-
fontName: font name, a string
-
fontStyle: the font style code, integer
-
fullName: the full name of the font, a string
-
parent: reference to the parent object (a font usually)
-
italicAngle: the italic angle, integer
-
license: the font license text, a string
-
licenseURL: web address for the license agreement, a URL
-
menuName: one of the menu names, a string
-
msCharSet: flag for windows fonts
-
note: the font note, a string
-
notice: a notice about the font, different from note and copyrright, a string
-
otFamilyName: family name specific for OpenType fonts a string
-
otStyleName: style name specific for OpenType fonts, a string
-
otMacName: Mac name specific for OpenType fonts, a string
-
selected: whether or not the font is selected, a boolean
-
slantAngle: slant angle, different from italic angle, an integer
-
styleName: the style name, a string
-
trademark: the trademark statement, a string
-
ttUniqueID: unique ID for TrueType fonts, an integer
-
ttVendor: Microsoft vendor code, a 4 character string
-
ttVersion: which truetype version
-
uniqueID: unique PostScript ID number, an integer
-
unitsPerEm: units per em, integer
-
vendorURL: web address for the font's vendor, a URL
-
versionMajor: value for major version
-
versionMinor: value for minor version
-
weightName: the name of the weight, i.e. "Semi Bold", used in naming stuff.
-
weightValue: value for the weight. FontLab calls Regular 500 (or something like that)
-
widthName: the name of the width, i.e. "Condensed"
-
year: the year in which the font was produced
-
-
-
-
-
\ No newline at end of file
diff --git a/Documentation/robofabManual/manual/objects/info.jpg b/Documentation/robofabManual/manual/objects/info.jpg
deleted file mode 100644
index 37bfb19b6..000000000
Binary files a/Documentation/robofabManual/manual/objects/info.jpg and /dev/null differ
diff --git a/Documentation/robofabManual/manual/objects/kerning.html b/Documentation/robofabManual/manual/objects/kerning.html
deleted file mode 100644
index f584a1c3f..000000000
--- a/Documentation/robofabManual/manual/objects/kerning.html
+++ /dev/null
@@ -1,208 +0,0 @@
-
-
-
-
-RoboFab Objects: RKerning
-
-
-
-
-
-
-
-
-
f = CurrentFont()
-print f.kerning
->>> < RKerning for Mailer-Regular >
-
-# getting a value from the kerning dictionary
-print f.kerning[('V', 'A')]
->>> -123
-
-print f.kerning[('T', 'X')]
->>> None
-
-print f.kerning.keys()
->>> [('X', 'emdash'),
- ('K', 'v'),
- ('two', 'perthousand'),
- ('guilsinglleft', 'a'),
- ... etc.
-
-
Description
-
-RKerning is a dictionary of kerning values. RFont makes a RKerning object when it is created and makes available as aFont.kerning attribute. The keys are tuples of the glyphs listed by their names: ('T', 'e'), ('V', 'A') etc. None is returned if the pair does not exist, rather than raising an IndexError. The parent of a kerning object is usually a Font.
-
-
Methods
-
-
-
-
add(value): add value to all kerning pairs.
-
asDict(): return the object as a plain dictionary.
-
clear(): clear all the kerning (why would you want to do that?)
-
combine(kerningDicts, overwriteExisting=True): combine two or more kerning dictionaries. Overwrite exsisting duplicate pairs if overwriteExisting=True
-
eliminate(leftGlyphsToEliminate=None, rightGlyphsToEliminate=None, analyzeOnly=False): eliminate pairs containing a left glyph that is in the leftGlyphsToEliminate list
- or a right glyph that is in the rightGlyphsToELiminate list.
- sideGlyphsToEliminate can be a string: 'a' or list: ['a', 'b'].
- analyzeOnly will not remove pairs. it will return a count
- of all pairs that would be removed.
-
explodeClasses(leftClassDict=None, rightClassDict=None, analyzeOnly=False): turn class kerns into real kerning pairs. classes should
- be defined in dicts: {'O':['C', 'G', 'Q'], 'H':['B', 'D', 'E', 'F', 'I']}.
- analyzeOnly will not remove pairs. it will return a count of all pairs that would be added
-
get(aPair): get a value. return None if the pair does not exist.
-
getAverage(): return average of all kerning pairs
-
getExtremes(): return the lowest and highest kerning values.
-
getLeft(glyphName): Return a list of kerns with glyphName as left character.
-
getRight(glyphName): Return a list of kerns with glyphName as right character.
-
has_key(pair): returns True if it has the pair.
-
implodeClasses(leftClassDict=None, rightClassDict=None, analyzeOnly=False): condense the number of kerning pairs by applying classes. This will eliminate all pairs containg the classed glyphs leaving
- pairs that contain the key glyphs behind. analyzeOnly will not
- remove pairs. it will return a count of all pairs that would be removed.
-
importAFM(path, clearExisting=True): Import kerning pairs from an AFM file. clearExisting=True will clear all exising kerning
-
-interpolate(sourceDictOne, sourceDictTwo, value, clearExisting=True): interpolate the kerning between sourceDictOne and sourceDictTwo. clearExisting will clear existing
- kerning first.
-
items(): return a list of (pair, value) tuples.
-
keys(): returns a lust of available pairs.
-
minimize(minimum=10): eliminate pairs with value less than minimum
-
-occurrenceCount(glyphsToCount): return a dict with glyphs as keys and the number of occurances of that glyph in the kerning pairs as the value
- glyphsToCount can be a string: 'a' or list: ['a', 'b']
-
-remove(pair): remove a kerning pair
-
round(multiple=10): round the kerning pair values to increments of multiple
-
scale(value): scale all kernng pairs by value
-
swapNames(swapTable): change glyph names in all kerning pairs based on swapTable:
swapTable = {'BeforeName':'AfterName', }
-
update(kerningDict): replace kerning data with the data in the given kerningDict.
-
values(): return a list of kerning values
-
-
-
-
-
\ No newline at end of file
diff --git a/Documentation/robofabManual/manual/objects/kerning.jpg b/Documentation/robofabManual/manual/objects/kerning.jpg
deleted file mode 100644
index 1cf9e4ffe..000000000
Binary files a/Documentation/robofabManual/manual/objects/kerning.jpg and /dev/null differ
diff --git a/Documentation/robofabManual/manual/objects/lib.html b/Documentation/robofabManual/manual/objects/lib.html
deleted file mode 100644
index d24325892..000000000
--- a/Documentation/robofabManual/manual/objects/lib.html
+++ /dev/null
@@ -1,179 +0,0 @@
-
-
-
-
-RoboFab Objects: RLib
-
-
-
-
-
-
-
-
-
-# RFont objects have a lib:
-print aFont.lib
->>> < RLib for Salmiak-Regular >
-
-# content of the lib of a font exported from RoboFog
-print f.lib.keys()
->>>['org.robofog.ufoExport.date',
- 'org.robofog.ufoExport.encoding.current',
- 'org.robofog.ufoExport.font.italicOffset',
- 'org.robofog.ufoExport.sourcePath']
-
-
-
Description
-
-RFont and RGlyph objects get lib objects when they're created, so you don't have to explicxitly make one. Lib objects behave like normal dictionaries.
-
-
-
Where is this data stored?
-
-
-
-In RoboFab 1.0 and FontLab 4.6.1, the lib is saved inside the (FontLab native attributes!) glyph.customdata and font.customdata in the .vfb file. Note: a bug in FontLab 4.6.1 prevents the glyph.lib from being used: when data is stored in this field, the font can no longer be edited. FontLab Studio 5 introduces a new attribute customdict which is exclusively for storing Python data. Early tests indicate that RoboFab storage of lib data can move to this attribute, but further testing and introduction of the MacOS version are needed before RoboFab's Lib support can move to it.
-In UFO based fonts the libs are stored as .plist in the .UFO. Have a look at how to use the lib.
-
-
-
-
Methods
-
-
-
-
keys(): return a list of the keys. Normal dictionary stuff.
-
-
-
-
-
\ No newline at end of file
diff --git a/Documentation/robofabManual/manual/objects/lib.jpg b/Documentation/robofabManual/manual/objects/lib.jpg
deleted file mode 100644
index 780ca8682..000000000
Binary files a/Documentation/robofabManual/manual/objects/lib.jpg and /dev/null differ
diff --git a/Documentation/robofabManual/manual/objects/model.html b/Documentation/robofabManual/manual/objects/model.html
deleted file mode 100644
index c7350ef21..000000000
--- a/Documentation/robofabManual/manual/objects/model.html
+++ /dev/null
@@ -1,302 +0,0 @@
-
-
-
-
-RoboFab Object Model
-
-
-
-
-
-
-
-
-
-
-
-Pens are very useful and powerful objects. The idea is this: a glyph contains drawing information like contours, components etc. There is a lot of code that wants to work with this drawing information. But rather than to give access to these contours directly, the glyph and pen work together. Each glyph has a draw() method which takes a pen as a parameter. The pen object has a couple of standard methods (along the lines of lineto, moveto, curveto etc.) which are called by the glyph in the right order and with the right coordinates.
-
-
-
Abstraction
-
-Using the pen as an intermediate, the code that just wants to draw a glyph doesn't have to know the internal functions of the glyph, and in turn, the glyph doesn't have to learn anything about specific drawing environments. Different kinds of glyph object (for instance the objectsFL.RGlyph and the objectsRF.RGlyph) work very different on the inside. One stores data in FontLab, the other stores the coordinates itself and writes to GLIF. But both RGlyph objects have a draw method which follows the same abstract drawing procedures. So the code that uses the RGlyph.draw(pen) is not aware of the difference between the two kinds of glyphs.
-
-
-
Why pens?
-
-In order to make a glyph draw in for instance a new graphics environment, you only need to write a new pen and implement the standard methods for the specifics of the environment. When that's done, all RoboFab glyphs can draw in the new world. But pens have also proven to be very useful as a means to get access to the outline data stored in a glyph without messing with the internal workings of a glyph. So even if you don't want to actually draw something on screen, the pen and draw() interface can help in for instance conversion, transformations, etc. One glyph can draw itself into another glyph as a way of copying itself while avoiding nasty dependencies, and circular references.
-
-
-
-
Flavors of Pen
-
-RoboFab has two different kinds of pen which do different things for different purposes and they're intended for different methods in Glyph. Have a look in robofab/pens/ to see different kinds of pen objects for different purposes. RoboFab already has a fair number of pens in stock, chances are you'll find something you need. Have a look at the LettError wiki, it has a section on PenProtocols. Examples of Penmanship at the How to use Pens.
-
-
-
Pen()
-
-The normal Pen object and pen that descend from it can be passed to aGlyph.draw(aPen). The Glyph calls these methods of the pen object to draw. It's very similar to "Drawing like postscript"
-
-
moveTo(pt, smooth=False): move the pen to the (x, y) in pt.
-
lineTo(pt, smooth=False): draw a straight line to the coordinate in pt (x, y).
-
curveTo(pt1, pt2, pt3, smooth=False): draw a classic Cubic Bezier ("PostScript") curve through pt1 (offcurve), pt2 (also offcurve) and pt3 which is oncurve again.
-
qCurveTo(*pts, **kwargs): draw a Quadratic ("TrueType") curve through, well, any number of offcurve points. This is not the place to discuss Quadratic esoterics, but at least: this pen can deal with them and draw them.
-
closePath(): tell the pen the path is finished.
-
addComponent(baseName, offset=(0, 0), scale=(1, 1)): tell the pen to add a component of baseName, at offset and with scale.
-
addAnchor(name, (x, y)): tell the pen to add an Anchor point with a name and a position.
-
setWidth(width): tell the pen to set the width of the glyph. (deprecated)
-
setNote(note): tell the pen to add a note to the glyph. (deprecated)
-
doneDrawing(): tell the pen the drawing is done.
-
-
-
-
PointsPen()
-
-Where the normal pen is an easy tool to think about drawing, the PointsPen is geared towards accessing all the data in the contours of the glyph. A PointsPen has a very simple interface, it just steps through all the points in a Glyph. Too complicated if you just want your script to draw in a glyph somewhere, but very useful for conversions of one thing to another, and when you're dealing with more elaborate point structures like several consecutive offcurve points. Again, have a look in the robofab/pens to see the available pens. Also the LettError wiki has an in-depth description of the pen protocols. The PointsPen is passed to the aGlyph.drawPoints(aPointsPen)
-
-
beginPath(): start a new sub path.
-
endPath(): end the current sub path.
-
addPoint(pt, segmentType=None, smooth=False, name=None, **kwargs): add a point to the current sub path.
-
addComponent(self, baseGlyphName, transformation): add a sub glyph.
-
-
-
-
Need a pen?
-
-If you need a pen to do some drawing in a Glyph object, you can ask the glyph to get you one. Depending on the environment you're in RoboFab will get you the right kind of pen object to do the drawing.
-
-
-
-from robofab.world import CurrentGlyph
-newGlyph = CurrentGlyph()
-pen = newGlyph.getPen()
-# do stuff with the pen to draw in this glyph
-
-
contour = CurrentGlyph()[0]
-print contour.points[0]
->>> < RPoint for AFont.A[0][0] >
-
-
-from random import randint
-for p in contour.points:
- p.x += randint(-10,10)
- p.y += randint(-10,10)
-c.update()
-
-
Description
-
-RPoint is perhaps the smallest object in RoboFab objects. It represents one single point with a particular coordinate in a contour. It is used to access off-curve and on-curve points alike. It's cousin, bPoint also provides access to incoming and outgoing bcps. RPoint is exclusively only one single point.
-
-
-
Understanding Contours and outlines
-
-The way outline data is organised in RoboFab, and how the various objects relate is described here: understanding contours.
-
-
-
-
Attributes
-
-
-
x: the x coordinate of this point.
-
y: the y coordinate of this point.
-
type: the type of this point.
-
selected: boolean for selection state. i.e. "True" or "False"
-
-
-
UFO only attributes
-
-
-
name: the name of the point (UFO only)
-
-
-
-
Methods
-
-
-
copy(): return a deepcopy of the object.
-
move((x, y)): move the anchor of the bPoint to (x,y). The relative coordinates of the bcpIn and bcpOut will remain the same, which means that in fact, they move the same distance.
-
round(): round the coordinates to whole integers.
-
select(state=True): select this point.
-
transform(matrix): Transform this point. Use a Transform matrix
- object to mess with the point. See how to use transformations.
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Documentation/robofabManual/manual/objects/point.jpg b/Documentation/robofabManual/manual/objects/point.jpg
deleted file mode 100644
index 9d473eaf8..000000000
Binary files a/Documentation/robofabManual/manual/objects/point.jpg and /dev/null differ
diff --git a/Documentation/robofabManual/manual/objects/segment.html b/Documentation/robofabManual/manual/objects/segment.html
deleted file mode 100644
index 02f1cc8ef..000000000
--- a/Documentation/robofabManual/manual/objects/segment.html
+++ /dev/null
@@ -1,222 +0,0 @@
-
-
-
-
-RoboFab Objects: RSegment
-
-
-
-
-
-
-
-
-
f = OpenFont()
-
-for c in f:
- for contour in c:
- for segment in contour:
- print segment
->>> < RSegment for RoboFab Demo Font.R[0][0] >
- < RSegment for RoboFab Demo Font.R[0][1] >
- < RSegment for RoboFab Demo Font.R[0][2] >
- < RSegment for RoboFab Demo Font.R[0][3] >
- < RSegment for RoboFab Demo Font.R[0][4] >
-
-
-
Description
-
-A Contour object is a list of segments. A segment is a list of points with some special attributes and methods. See the LettError wiki for a comprehensive explanation of segments.
-
-
-
Understanding Contours and outlines
-
-The way outline data is organised in RoboFab, and how the various objects relate is described here: understanding contours.
-
-
-
Attributes
-
-
- type: Type of segment
-
-
- smooth: True if the segment is smooth, False if not.
-
-
- selected: Returns True if the segment is selected, False if not.
-
-
- points: List of points in the segment.
-
-
- onCurve: Returns the oncurve point associated with the segment.
-
-
- offCurve: Returns a list of offcurve points associated with the segment.
-
-
-
Attribute examples
-
f = OpenFont()
-
-for c in f:
- for contour in c:
- for segment in contour:
- print len(segment)
- print segment.type
- print segment.smooth
- print segment.points
- print segment.onCurve
- print segment.offCurve
- print segment.selected
-
-
Methods
-
-
-
-
copy(): return a deepcopy of the object.
-
move((x, y)): move the anchor of the bPoint to (x,y). The relative coordinates of the bcpIn and bcpOut will remain the same, which means that in fact, they move the same distance.
-
round(): round the coordinates to whole integers.
-
transform(matrix): Transform this point. Use a Transform matrix
- object to mess with the point. See how to use transformations.
-
-
Method examples
-
f = OpenFont()
-
-for c in f:
- for contour in c:
- for segment in contour:
- segment.move((50, 25))
-
-This will at some time in the future contain a small shop with some additional scripts and packages for RoboFab.
-
-
-
-
Products
-
-
RoboFab Develop Donation
-
-
-Donate $50 to support the development of RoboFab.
-
-
-
-
-
Price USD 50 for single user.
-
-
-
-
RoboFog to UFO Exporter
-
-
-
-
-Export RoboFog sources to UFO format. A set of scripts compatible with RoboFog's Python 1.5.2. which exports the glyphs and background glyphs in a RoboFog source file to XML as .GLIF files. It also exports the font.lib and glyph.lib to UFO compatible lib format. The exporter respects alternate glyphnames created with the AGL Glyphnamer script in RoboFog.
-
-
-
-
-
Format: a set of scripts, including source.
-
Required: MacOS 9, Python 1.5.2, RoboFog
-
Price USD 200 for single user.
-
-
-
-
-
RoboThon 2003 T Shirt
-
-Unique T shirt from the first RoboFab conference which didn't happen, sporting exclusive lettering by Ken Barber. Supplies are limited.
-
-
-
-
-
Format: high quality 100% cotton T.
-
Price USD 30 for single user.
-
-
-
-
-
Coming Soon
-
-
MM: MetricsMachine
-
-
-The Cocoa version of the award winning MetricsMachine tool by Tal Leming. MetricsMachine reads and writes UFO. Build powerful groups. Kern and space in an evironment built for industrial strength metrics.
-screenshot
-
-
-
-
-
Format: application, help files.
-
Required: MacOSX 10.3+ (not 10.2)
-
Price USD 300 for single user.
-
-
-
-
-
-
Title
-
-Description.
-
-
-
-
-
Format: a set of scripts, including source.
-
Required: MacOSX 10.2+, , Python IDE, W,
-
Price USD xxx for single user.
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Documentation/robofabManual/manual/shop/index.html b/Documentation/robofabManual/manual/shop/index.html
deleted file mode 100644
index ba46fd0fb..000000000
--- a/Documentation/robofabManual/manual/shop/index.html
+++ /dev/null
@@ -1,146 +0,0 @@
-
-
-
-
-RoboFab Shop
-
-
-
-
-
-
-
-
-
-Export RoboFog sources to UFO format. A set of scripts compatible with RoboFog's Python 1.5.2. which exports the glyphs and background glyphs in a RoboFog source file to XML as .GLIF files. It also exports the font.lib and glyph.lib to UFO compatible lib format. The exporter respects alternate glyphnames created with the AGL Glyphnamer script in RoboFog. Documented and commented sources are included to allow for extensive customisation.
-
-
-
-
-
Format: a set of scripts, including source.
-
Required: MacOS 9 or Classic under OSX, Python 1.5.2, RoboFog 1.6.3
-Sometimes you need simple dialogs to get scripts to talk to the user. As RoboFab can run in many different environments, this dialog module tries to offer consistent functionality in all worlds. Most of the dialogs work in FontLab Mac/Win and Python IDE Mac. Some dialogs also work in windows. This module offers the right kind of dialog for the environment you call them in. A bit like robofab.world helps you out by finding the right objects. Availability: FontLab means that the dialogs are available in FontLab on either platform. Mac means that the dialogs are available in plain Python for OS9 as well as OSX. Windows means the dialogs are available in plain Python in Windows.
-
-
-
-
Overview
-
-
Message(message, title='RoboFab')
-
A simple message dialog with just one OK button. It does not return any values.
-
-
-
-from robofab.interface.all.dialogs import Message
-Message("A Message From RoboFab")
-
-
-
-
Available on FontLab, Macintosh
-
-
-
-
-
-
AskString(prompt, value='', title='RoboFab')
-
Asks for a string and return it. Returns None if the user cancelled.
-
-The RoboFab library contains other code besides the various objects. An overview of a some of the interesting ones. Feel free to browse around in the source code at any time. Some places to look are:
-
-The RoboFab Tools directory contains a groups of useful and sometimes stray bit of code which don't fit anywhere else.
-
-
-
robofab.tools.toolsAll
-
-
-ToolsAll contains useful functions for any and all implementation of RoboFab. It does (or should not) contain any platform or version specific code. Some of this code is used by other parts of RoboFab. The user serviceable parts are discussed here.
-
-
-
toolsAll.readFoundrySettings(dstPath)
-
-Read the foundry settings xml file and return a keyed dict. The idea is that a foundry will have certain, ofter recurring preferences for some fields in fonts. For instance foundry names, codes etc. These can be stored in .plist format, at a particular location. It's up to the user to make sure the values make sense and to keep track of the file.
-
-
-
toolsAll.fontToUFO(src, dst, fileType=None)
-
-Open a font binary pointed to by src, decompile it using fontTools and write a UFO at location dst. If no filetype is given, fontToUFO attempts to guess the type. Valid types are TTF and "Type 1". While this function does a good job at extracting contours and basic font information, it is possible that not all values are extracted. Please refer to the result UFO for a precise overview.
-
-
-
-
robofab.tools.toolsFL
-
-Tools for use within FontLab. Some of the functions in toolsFL are available through robofab.world. The user serviceable parts are discussed here.
-
-
-
-
toolsFL.AppFolderRenamer()
-
-AppFolderRenamer renames the directoru the FontLab application is in. It attempts to add the version number of the application to the folder name. This can be helpful to keep different versions of FontLab seperated. Warning: it messes with the paths of your app, if you have items that hardwired to this path you'd be in trouble.
-
duplicate the file in the finder (icon looks weird, but it works)
-
open the duplicate
-
decompose the glyphs
-
remove overlaps
-
return the fontobject
-
-font is either a FL Font or RF RFont object.Problems: doesn't check if the filename is getting too long. Note: it will overwrite older files with the same name.
-
-
-
toolsFL.makePSFontName(name)
-
-Create a postscript filename out of a regular postscript fontname, using the old fashioned macintosh 5:3:3 convention.
-
-
-
robofab.tools.toolsRF
-
-
-These are no special tools for RF or NoneLab use at the moment.
-
-No. The RoboFab developers felt the need for a flexible, text based (XML) format to store data related to typedesign. RoboFab Python objects work with UFO files, but the UFO specification is open: others can write implementations of the UFO format in other languages for other purposes. The UFO format is well documented at the LettError wiki (see the links page).
-
-
-
-
GLIF
-
-
-
-
-
-
-
-Glyphs and glyph related data is stored in a GLIF file which lives with its friends in a folder. Just van Rossum developed the XML format and described the tags in great detail at the LettErrorWiki. A GLIF file describes all parts of the glyph: contours, points, off curves, on curves, width, even the glyph lib is stored here. RoboFab reads and writes GLIF. You could email a glyph by including the text in the email body. GLIFs have been sent through text chats and even SMS text messaging. GLIFs could be printed out on paper, stored, typed in after a 1000 years and all the data would still be present. More on GLIF here.
-
-
-
GlyphSet
-
-A GlyphSet is an object which manages the GLIF files. It can make an index of all GLIF files in a folder and store it in a seperate .plist file in which glyph names are mapped to GLIF file names. When a GlyphSet is asked for a particular Glyph, it can refer to the index and retrieve the right file. GlyphSet is "lazy loading", it will only read and parse XML for Glyphs that are asked for. Font objects in NoneLab use GlyphSet to access and write the GLIFs.
-
-By standardising the API of the RoboFab objects, scripts become more portable between different font applications. This means saving time and effort which can be spent more creatively. Fonts, glyphs and contours aren't going to change a lot. More likely, stuff will be added to it and exist next to the other data. RoboFab and UFO can deal with the future.
-
-
-
Unified Font Objects Consortium
-
-
-The RoboFab developers extend an invitation to all other font tool developers to support the UFO file format, and perhaps if possible the UFO object API as well. We're ready to license or cross license the RoboFab library for bundling with other applications.
-
-
-
-
Which apps?
-
- Through RoboFab normal non-FontLab python scripts can read and write UFO font data. RoboFab has scripts that take care of exporting and importing UFO font data into FontLab's .vfb files. And recently RoboFog was added to the list with some scripts from LettError that facilitate exporting RoboFog data into UFO format. A compact and fast-loading version of UFO is under construction.
-
-
-
-
\ No newline at end of file
diff --git a/Documentation/robofabManual/manual/ufo/xmltext.jpg b/Documentation/robofabManual/manual/ufo/xmltext.jpg
deleted file mode 100644
index 0d0158817..000000000
Binary files a/Documentation/robofabManual/manual/ufo/xmltext.jpg and /dev/null differ