Geek Posted July 8, 2011 Posted July 8, 2011 <div class="KonaBody"><p><img src="http://osxdaily.com/wp-content/uploads/2011/07/convert-font-and-text-size.jpg" alt="Convert font and text size of a document" title="convert-font-and-text-size" width="534" height="245" class="aligncenter size-full wp-image-18440" /></p> <p>In addition to being able to <a href="http://osxdaily.com/2011/07/06/convert-a-text-file-to-rtf-html-doc-and-more-via-command-line/">convert TXT files to RTF or other filetypes</a>, you can use textutil to convert the font family and font size of a document from the command line.</p> <p>The syntax for doing this is:</p> <p><code>textutil -convert filetype -font fontfamily -fontsize ## filename.txt</code></p> <p>For example, to convert file.txt to an RTF document with size 24 Helvetica font, we would use:</p> <p><code>textutil -convert rtf -font Helvetica -fontsize 24 file.txt</code></p> <p>The conversion is practically instantaneous. Because this is scriptable from the <a href="http://osxdaily.com/category/command-line/">command line</a>, it is potentially more useful than just opening a document in TextEdit and going about this through the GUI, at least for some Mac users.</p> </div> <p><a href="http://feedads.g.doubleclick.net/~a/tTjNgsIc9TvBv6Tj54q8k-mzkXk/0/da"><img src="http://feedads.g.doubleclick.net/~a/tTjNgsIc9TvBv6Tj54q8k-mzkXk/0/di" border="0" ismap="true"></img></a><br/> <a href="http://feedads.g.doubleclick.net/~a/tTjNgsIc9TvBv6Tj54q8k-mzkXk/1/da"><img src="http://feedads.g.doubleclick.net/~a/tTjNgsIc9TvBv6Tj54q8k-mzkXk/1/di" border="0" ismap="true"></img></a></p><div class="feedflare"> <a href="http://feeds.feedburner.com/~ff/osxdaily?a=9j7_H8BRODQ:2VUPh6Skidk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/osxdaily?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/osxdaily?a=9j7_H8BRODQ:2VUPh6Skidk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/osxdaily?i=9j7_H8BRODQ:2VUPh6Skidk:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/osxdaily?a=9j7_H8BRODQ:2VUPh6Skidk:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/osxdaily?i=9j7_H8BRODQ:2VUPh6Skidk:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/osxdaily?a=9j7_H8BRODQ:2VUPh6Skidk:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/osxdaily?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/osxdaily?a=9j7_H8BRODQ:2VUPh6Skidk:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/osxdaily?d=qj6IDK7rITs" border="0"></img></a> </div><img src="http://feeds.feedburner.com/~r/osxdaily/~4/9j7_H8BRODQ" height="1" width="1"/> View the full article
Recommended Posts