33 lines
1.2 KiB
XML
33 lines
1.2 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<xml>
|
|
<include src="settings/generic.xml" />
|
|
<synopsis name="How to get to FontLab stuff" description="the naked methods and attributes" keywords="howto, interpolate" />
|
|
<title>How to get to FontLab internals</title>
|
|
<div class="content">
|
|
<h1>How to get to FontLab's internals</h1>
|
|
<p>
|
|
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?
|
|
</p>
|
|
<h3>Get Naked</h3>
|
|
<p>
|
|
RoboFab Glyph and Font objects have a special method, <strong>naked()</strong> 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.
|
|
</p>
|
|
|
|
<python><![CDATA[
|
|
from robofab.world import CurrentFont
|
|
f = CurrentFont()
|
|
print f
|
|
# this is the high level RoboFab object
|
|
|
|
print f.naked()
|
|
# this is the low level FontLab object, not a part of RoboFab
|
|
]]></python>
|
|
|
|
<python type="output"><![CDATA[
|
|
< RFont font for TemplatefontPro Rg Regular >
|
|
< Font 'TemplatefontPro Rg Regular' >
|
|
]]></python>
|
|
|
|
</div>
|
|
</xml>
|