<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Is it possible to export to from Space Center to a multi-page or tall-page PDF?]]></title><description><![CDATA[<p dir="auto">I'm getting a lot of value out of mojo.UI <code>SpaceCenterToPDF()</code>, but finding a major limitation:</p>
<p dir="auto">The PDFs I export cut off after a single page. So, I can't proof more than a very small sample of text.</p>
<p dir="auto">Is there a way to export to more than a single page?</p>
<p dir="auto">My current code is here: <a href="https://github.com/thundernixon/quick-proofs/blob/master/space-center-to-cloud-pdf.py" rel="nofollow">https://github.com/thundernixon/quick-proofs/blob/master/space-center-to-cloud-pdf.py</a></p>
]]></description><link>https://forum.robofont.com/topic/658/is-it-possible-to-export-to-from-space-center-to-a-multi-page-or-tall-page-pdf</link><generator>RSS for Node</generator><lastBuildDate>Thu, 23 Apr 2026 03:42:35 GMT</lastBuildDate><atom:link href="https://forum.robofont.com/topic/658.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 25 Jun 2019 17:14:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Is it possible to export to from Space Center to a multi-page or tall-page PDF? on Tue, 25 Jun 2019 17:16:31 GMT]]></title><description><![CDATA[<p dir="auto">I'm getting a lot of value out of mojo.UI <code>SpaceCenterToPDF()</code>, but finding a major limitation:</p>
<p dir="auto">The PDFs I export cut off after a single page. So, I can't proof more than a very small sample of text.</p>
<p dir="auto">Is there a way to export to more than a single page?</p>
<p dir="auto">My current code is here: <a href="https://github.com/thundernixon/quick-proofs/blob/master/space-center-to-cloud-pdf.py" rel="nofollow">https://github.com/thundernixon/quick-proofs/blob/master/space-center-to-cloud-pdf.py</a></p>
]]></description><link>https://forum.robofont.com/post/2458</link><guid isPermaLink="true">https://forum.robofont.com/post/2458</guid><dc:creator><![CDATA[StephenNixon]]></dc:creator><pubDate>Tue, 25 Jun 2019 17:16:31 GMT</pubDate></item><item><title><![CDATA[Reply to Is it possible to export to from Space Center to a multi-page or tall-page PDF? on Wed, 31 Jul 2019 18:43:34 GMT]]></title><description><![CDATA[<p dir="auto">hello <a class="plugin-mentions-user plugin-mentions-a" href="https://forum.robofont.com/uid/230">@StephenNixon</a>,</p>
<p dir="auto">the pdf export from Space Center is very low-level (basically just the eps/pdf data which is drawn on screen).</p>
<p dir="auto">to generate multipage PDF proofs, DrawBot is more appropriate. have a look at <a href="http://robofont.com/documentation/building-tools/toolspace/drawbot/" rel="nofollow">Scripts using DrawBot</a> for some examples. you can try reading the Space Center contents and using it as input for the PDF proofs.</p>
<p dir="auto">hope this helps!</p>
]]></description><link>https://forum.robofont.com/post/2459</link><guid isPermaLink="true">https://forum.robofont.com/post/2459</guid><dc:creator><![CDATA[gferreira]]></dc:creator><pubDate>Wed, 31 Jul 2019 18:43:34 GMT</pubDate></item><item><title><![CDATA[Reply to Is it possible to export to from Space Center to a multi-page or tall-page PDF? on Wed, 26 Jun 2019 13:08:15 GMT]]></title><description><![CDATA[<p dir="auto">Interesting, okay!</p>
<p dir="auto">How might I get the contents and sizing (font and window) from the Space Center?</p>
<p dir="auto">Is this something I would have to add an observer to detect, or is there some other way to detect the content typed in the Space Center?</p>
]]></description><link>https://forum.robofont.com/post/2460</link><guid isPermaLink="true">https://forum.robofont.com/post/2460</guid><dc:creator><![CDATA[StephenNixon]]></dc:creator><pubDate>Wed, 26 Jun 2019 13:08:15 GMT</pubDate></item><item><title><![CDATA[Reply to Is it possible to export to from Space Center to a multi-page or tall-page PDF? on Wed, 26 Jun 2019 13:22:58 GMT]]></title><description><![CDATA[<p dir="auto">Shoot, also: do you know if there a way to use the <code>CurrentFont()</code> as the font in a DrawBot script?</p>
<p dir="auto">My hope:</p>
<ul>
<li>Write a RoboFont script that calls DrawBot as a module</li>
<li>Within that script, set the font with <code>font(CurrentFont())</code></li>
<li>Get the text and sizing from the <code>CurrentSpaceCenter()</code></li>
<li>Create a drawbot composition with these ingredients</li>
<li>Save to PDF</li>
</ul>
<p dir="auto">The closest things I have found so far:</p>
<ul>
<li>
<p dir="auto"><code>drawGlyph(glyph)</code> allows me to draw a single RGlyph object to the DrawBot canvas. I guess I could iterate through the text in the space center, and use <code>drawGlyph()</code> for each, as is written here: <a href="https://robofont.com/documentation/building-tools/toolspace/drawbot/proof-words/" rel="nofollow">https://robofont.com/documentation/building-tools/toolspace/drawbot/proof-words/</a></p>
</li>
<li>
<p dir="auto">I could test install the font with <code>CurrentFont().testInstall()</code>, then use that as the <code>font()</code> in DrawBot, similar to <a href="https://robofont.com/documentation/building-tools/toolspace/drawbot/proof-spacing/" rel="nofollow">https://robofont.com/documentation/building-tools/toolspace/drawbot/proof-spacing/</a>. I would worry that it might be easy to use an old version of the font this way, but I suppose I could even temporarily rename the font to test install and use it, then revert to the normal name at the end of the script. This might get blocked by feature code issues, etc, however.</p>
</li>
</ul>
<p dir="auto">Is there anything simpler? Either method above would take some level of fuss to make work...</p>
]]></description><link>https://forum.robofont.com/post/2461</link><guid isPermaLink="true">https://forum.robofont.com/post/2461</guid><dc:creator><![CDATA[StephenNixon]]></dc:creator><pubDate>Wed, 26 Jun 2019 13:22:58 GMT</pubDate></item><item><title><![CDATA[Reply to Is it possible to export to from Space Center to a multi-page or tall-page PDF? on Wed, 31 Jul 2019 18:43:13 GMT]]></title><description><![CDATA[<p dir="auto">hi <a class="plugin-mentions-user plugin-mentions-a" href="https://forum.robofont.com/uid/230">@StephenNixon</a>,</p>
<blockquote>
<p dir="auto">do you know if there a way to use the <code>CurrentFont()</code> as the font in a DrawBot script?</p>
</blockquote>
<p dir="auto">that’s not possible, because:</p>
<ul>
<li><code>font()</code> takes a string (font name or path to OpenType font file)</li>
<li><code>CurrentFont()</code> returns an <code>RFont</code> object</li>
</ul>
<hr />
<p dir="auto">I see now that the <code>SpaceCenter</code> object is missing from the <code>mojo.UI</code> docs, hope to fix it soon. in the meantime, here’s a quick way to access it:</p>
<pre><code class="language-python">from mojo.UI import CurrentSpaceCenter

spaceCenter = CurrentSpaceCenter()
print('glyph names:', spaceCenter.get())
print('characters:', spaceCenter.getRaw())
print('fontSize:', spaceCenter.getPointSize())
print('lineheight:', spaceCenter.getLineHeight())
print('tracking:', spaceCenter.getTracking())
print('before:', spaceCenter.getPre())
print('after:', spaceCenter.getAfter())

# list all attributes &amp; methods
# print(dir(spaceCenter))
</code></pre>
<hr />
<blockquote>
<p dir="auto">Is there anything simpler?</p>
</blockquote>
<p dir="auto">things are simple if you use the Space Center to proof on screen, and the DrawBot extension to generate PDFs (from UFOs or OTFs).</p>
<p dir="auto">using the Space Center to create multi-page PDFs is a nice idea, but you’ll need to fill in the gaps because the Space Center was not built to generate PDFs. that’s what makes the idea exciting: it takes some level of fun to make it work ;)</p>
]]></description><link>https://forum.robofont.com/post/2463</link><guid isPermaLink="true">https://forum.robofont.com/post/2463</guid><dc:creator><![CDATA[gferreira]]></dc:creator><pubDate>Wed, 31 Jul 2019 18:43:13 GMT</pubDate></item><item><title><![CDATA[Reply to Is it possible to export to from Space Center to a multi-page or tall-page PDF? on Thu, 27 Jun 2019 20:41:20 GMT]]></title><description><![CDATA[<p dir="auto">while working on the <code>SpaceCenter</code> API docs, I stumbled across the <code>glyphRecords</code> attribute, which returns the computed glyphs (including pre/after contexts, suffix, selected layer, etc). adding a bit of code to fold the glyphs into lines and pages, we can make a simple multi-page PDF exporter:</p>
<pre><code class="language-python">'''SpaceCenter to multipage PDF'''

from mojo.UI import CurrentSpaceCenter

# --------
# settings
# --------

pageSize = 'A4Landscape'
margin = 40

# ------------
# calculations
# ------------

f = CurrentFont()
spaceCenter = CurrentSpaceCenter()

size(pageSize)

s = spaceCenter.getPointSize() / f.info.unitsPerEm # scale factor
L = (f.info.unitsPerEm + f.info.descender) * s # first line shift

w = width()  - margin * 2
h = height() - margin * 2
x = margin
y = height() - margin - L

# ----------
# make pages
# ----------

translate(x, y)
scale(s)
X, Y = 0, 0 

for gr in spaceCenter.glyphRecords:

    # linebreak
    if (X + gr.glyph.width) * s &gt; w:
        X = 0
        Y -= f.info.unitsPerEm * (1 + spaceCenter.getLineHeight() / 800)

    # pagebreak
    if (abs(Y * s) + L) &gt; h:
        newPage(pageSize)
        translate(x, y)
        scale(s)
        X, Y = 0, 0 

    with savedState():
        translate(X, Y)
        drawGlyph(gr.glyph)

    X += gr.glyph.width
</code></pre>
<p dir="auto"><img src="/assets/uploads/files/1561652645438-screen-shot-2019-06-27-at-13.16.20.png" alt="Screen Shot 2019-06-27 at 13.16.20.png" class="img-responsive img-markdown" /></p>
<p dir="auto"><img src="/assets/uploads/files/1561652650092-screen-shot-2019-06-27-at-13.16.26.png" alt="Screen Shot 2019-06-27 at 13.16.26.png" class="img-responsive img-markdown" /></p>
<p dir="auto">you could try adding more features: font name, page number, date and time, glyph metrics, vertical metrics…</p>
<p dir="auto">I hope this is useful!</p>
]]></description><link>https://forum.robofont.com/post/2465</link><guid isPermaLink="true">https://forum.robofont.com/post/2465</guid><dc:creator><![CDATA[gferreira]]></dc:creator><pubDate>Thu, 27 Jun 2019 20:41:20 GMT</pubDate></item><item><title><![CDATA[Reply to Is it possible to export to from Space Center to a multi-page or tall-page PDF? on Sat, 29 Jun 2019 00:03:16 GMT]]></title><description><![CDATA[<p dir="auto">Hey Gustavo,</p>
<p dir="auto">This is amazing; thanks so much for going above and beyond, yet again!</p>
<p dir="auto">I definitely agree that it's fun to figure this stuff out; I just like to feel relatively confident that I'm not doing something the slow way if there's something simple that I haven't noticed.</p>
<p dir="auto">I'll try this on proofing very soon, and update the thread with my improvements! :)</p>
]]></description><link>https://forum.robofont.com/post/2467</link><guid isPermaLink="true">https://forum.robofont.com/post/2467</guid><dc:creator><![CDATA[StephenNixon]]></dc:creator><pubDate>Sat, 29 Jun 2019 00:03:16 GMT</pubDate></item><item><title><![CDATA[Reply to Is it possible to export to from Space Center to a multi-page or tall-page PDF? on Sat, 29 Jun 2019 01:45:03 GMT]]></title><description><![CDATA[<p dir="auto">@ThunderNixon I still just use indesign and build proofs manually. Don't worry, you're fine :D</p>
]]></description><link>https://forum.robofont.com/post/2468</link><guid isPermaLink="true">https://forum.robofont.com/post/2468</guid><dc:creator><![CDATA[FosterType]]></dc:creator><pubDate>Sat, 29 Jun 2019 01:45:03 GMT</pubDate></item><item><title><![CDATA[Reply to Is it possible to export to from Space Center to a multi-page or tall-page PDF? on Mon, 01 Jul 2019 14:06:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.robofont.com/uid/314">@FosterType</a> haha, thanks for letting me know!</p>
<p dir="auto">Sometimes, InDesign is definitely the fastest way forward. Other times, though, the siren song of a "one-click" proof is pretty compelling...</p>
]]></description><link>https://forum.robofont.com/post/2470</link><guid isPermaLink="true">https://forum.robofont.com/post/2470</guid><dc:creator><![CDATA[StephenNixon]]></dc:creator><pubDate>Mon, 01 Jul 2019 14:06:24 GMT</pubDate></item><item><title><![CDATA[Reply to Is it possible to export to from Space Center to a multi-page or tall-page PDF? on Mon, 01 Jul 2019 14:08:12 GMT]]></title><description><![CDATA[<p dir="auto">it all depends on when the proof is needed in a scope of a design process: is it for you only, for a client, for collaborating typedesigners, your boss...</p>
]]></description><link>https://forum.robofont.com/post/2471</link><guid isPermaLink="true">https://forum.robofont.com/post/2471</guid><dc:creator><![CDATA[frederik]]></dc:creator><pubDate>Mon, 01 Jul 2019 14:08:12 GMT</pubDate></item><item><title><![CDATA[Reply to Is it possible to export to from Space Center to a multi-page or tall-page PDF? on Mon, 01 Jul 2019 14:27:02 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto">it all depends on when the proof is needed in a scope of a design process</p>
</blockquote>
<p dir="auto">In this case, I am proofing my own work, plus collaborating with others on UFOs. I want to find the quickest way to look at the glyphs they are drawing and give feedback.</p>
<p dir="auto">So far, a handy way to do this has been to export the space center to a PDF, which I draw on with the iPad app, Notability. I can then email/screenshot those proofs. It would take longer to do a TestInstall(), then set up a proof in InDesign to make a PDF, then proof that – especially because the TestInstall might conflict with existing versions of the font I have installed on my computer, in general (unless I change naming, but then that's a whole other set of steps).</p>
]]></description><link>https://forum.robofont.com/post/2473</link><guid isPermaLink="true">https://forum.robofont.com/post/2473</guid><dc:creator><![CDATA[StephenNixon]]></dc:creator><pubDate>Mon, 01 Jul 2019 14:27:02 GMT</pubDate></item><item><title><![CDATA[Reply to Is it possible to export to from Space Center to a multi-page or tall-page PDF? on Mon, 01 Jul 2019 16:10:01 GMT]]></title><description><![CDATA[<p dir="auto">Question for <a class="plugin-mentions-user plugin-mentions-a" href="https://forum.robofont.com/uid/22">@gferreira</a> or <a class="plugin-mentions-user plugin-mentions-a" href="https://forum.robofont.com/uid/1">@frederik</a></p>
<p dir="auto">Having tried Gustavo's excellent starter script, it's a really helpful start! I am now trying to make the text scale so that the PDF width will match the Space Center width, and therefore make it easier to layout basic proofs, right in the Space Center.</p>
<p dir="auto">However, I'm not quite sure how to get a value for the Space Center width.</p>
<p dir="auto">If I use <code>help(CurrentSpaceCenter())</code>, I see (among other things) what seems to be the answer:</p>
<pre><code class="language-console"> |  getPosSize(self)
 |      The position and size of the object as a tuple of form *(left, top, width, height)*.
</code></pre>
<p dir="auto">However, if I then use <code>print(CurrentSpaceCenter().getPosSize())</code>, I simply get this:</p>
<pre><code class="language-console">(0, 0, 0, 0)
</code></pre>
<p dir="auto">Needless to say, my current Space Center is not <code>0</code> in size. It looks like this:</p>
<p dir="auto"><img src="/assets/uploads/files/1561991632296-04d220f9-c31b-4b27-9ed2-8908bfb79c60-image-resized.png" alt="04d220f9-c31b-4b27-9ed2-8908bfb79c60-image.png" class="img-responsive img-markdown" /></p>
<p dir="auto">Am I perhaps missing some way to access this value from <code>VanillaBaseObject</code>?</p>
]]></description><link>https://forum.robofont.com/post/2474</link><guid isPermaLink="true">https://forum.robofont.com/post/2474</guid><dc:creator><![CDATA[StephenNixon]]></dc:creator><pubDate>Mon, 01 Jul 2019 16:10:01 GMT</pubDate></item><item><title><![CDATA[Reply to Is it possible to export to from Space Center to a multi-page or tall-page PDF? on Wed, 31 Jul 2019 18:42:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.robofont.com/uid/230">@StephenNixon</a>  this will give you the current width &amp; height of the Space Center window:</p>
<pre><code class="language-python">from mojo.UI import CurrentSpaceCenter
(x, y), (w, h) = CurrentSpaceCenter().getNSView().bounds()
print(w, h)
</code></pre>
]]></description><link>https://forum.robofont.com/post/2480</link><guid isPermaLink="true">https://forum.robofont.com/post/2480</guid><dc:creator><![CDATA[gferreira]]></dc:creator><pubDate>Wed, 31 Jul 2019 18:42:46 GMT</pubDate></item></channel></rss>