Erik van Blokland 3646055ea2 initial import
git-svn-id: http://svn.robofab.com/trunk@1 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2008-01-07 17:40:34 +00:00

179 lines
4.4 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>RoboFab Objects: RLib</title>
<link href="../default.css" type="text/css" rel="stylesheet" />
</head>
<body>
<div id="modellogo">
<img src="../img/drawmodel_header.jpg" width="595" height="112" />
</div>
<div class="leftcontent">
<h2 class="crb-seealso">
RoboFab
</h2>
<p class="menu">
<a href="../index.html">
Home
</a>
<br />
<a href="../download/license.html">
Download v1.1.1
</a>
<br />
<a href="../intro.html">
Intro
</a>
<br />
<a href="../install.html">
Install Notes
</a>
<br />
<a href="../history.html">
History
</a>
<br />
<a href="../executive.html">
Summary
</a>
</p>
<p class="menu">
<a href="../howto/index.html">
How to's
</a>
<br />
<a href="index.html">
Fab Objects
</a>
<br />
<a href="model.html">
Fab Map
</a>
<br />
<a href="../tools/index.html">
Fab Tools
</a>
<br />
<a href="../ufo/index.html">
UFO Overview
</a>
<br />
<a href="../limitations.html">
Fab Limitations
</a>
</p>
<p class="menu">
<a href="../links/index.html">
Links
</a>
<br />
<a href="../glossary/index.html">
Glossary
</a>
<br />
<a href="../credits.html">
Credits
</a>
</p>
<br />
<br />
<p class="crb-uplink"><a href="index.html">Back to Objects</a></p>
<br />
<br />
<p class="menu">
<a href="../howto/fontlabremote.html">FontLab Remote</a><br />
<a href="../howto/generatefonts.html">Generate Fonts</a><br />
<a href="../howto/glyphmath.html">Using Glyph Math</a><br />
<a href="../howto/usethelib.html">Using the lib</a><br />
<a href="../howto/usetransformations.html">Using transformations</a><br />
<a href="anchor.html">RAnchor</a><br />
<a href="bpoint.html">bPoint</a><br />
<a href="component.html">RComponent</a><br />
<a href="contour.html">RContour</a><br />
<a href="font.html">RFont</a><br />
<a href="glyph.html">RGlyph</a><br />
<a href="index.html">Objects</a><br />
<a href="info.html">RInfo</a><br />
<a href="kerning.html">RKerning</a><br />
<a href="model.html">Object model</a><br />
<a href="pen.html">Pen objects</a><br />
<a href="point.html">RPoint</a><br />
<a href="segment.html">RSegment</a><br />
</p>
</div>
<div class="footer">
<a href="../feedback.html">
Feedback
</a>
<br />
<a href="../map.html">
Sitemap
</a>
<br />
Please also refer to the
<a href="../download/license.html">
Legal
</a>
<br />
Copyright 2003-2005 RoboFab
<br />
version 1.1.1
</div>
<div id="titlepic">
<img src="../img/offdrawmodel_02.gif" alt="" border="0" />
</div>
<div class="content">
<h1>RoboFab RLib</h1>
<h3>Usage</h3>
<pre>
# 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']
</pre>
<h3>Description</h3>
<p>
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.
</p>
<h3>Where is this data stored?</h3>
<p class="note">
In RoboFab 1.0 and FontLab 4.6.1, the lib is saved inside the (FontLab native attributes!) <strong>glyph.customdata</strong> and <strong>font.customdata</strong> in the .vfb file. Note: a bug in <strong>FontLab 4.6.1</strong> 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 <strong>customdict</strong> 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 <a href="../howto/usethelib.html">how to use the lib</a>.
</p>
<h3>Methods</h3>
<p>
</p>
<ul>
<li><strong>keys()</strong>: return a list of the keys. Normal dictionary stuff.</li>
</ul>
</div>
</body>
</html>