Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Sony Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 07-27-2007, 11:19 AM   #1
Greg Rosler
Junior Member
Greg Rosler began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jul 2007
Device: Sony Reader
Bulk file font size conversion

Hi, is there any way to convert around 200+ .rtf files from one font size to another?

I'd rather do this in bulk than file by file.




Thanks,
Greg
Greg Rosler is offline   Reply With Quote
Old 08-05-2007, 11:02 PM   #2
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 76,446
Karma: 136564696
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Not that I know of. Good luck hand converting.
JSWolf is online now   Reply With Quote
Advert
Old 08-05-2007, 11:11 PM   #3
KaiGoth
Enthusiast
KaiGoth began at the beginning.
 
Posts: 48
Karma: 22
Join Date: Aug 2007
Device: Sony PRS500 & PRS700
Quote:
Originally Posted by Greg Rosler View Post
Hi, is there any way to convert around 200+ .rtf files from one font size to another?

I'd rather do this in bulk than file by file.




Thanks,
Greg
EDIT:
OOPS. The below only works for converting from RTF, not leaving in that format.

Use the "delta-font" option in libprs500. I used it for a few hundred lit conversions using lit2rtf and it worked great (went smaller "--delta-font=-1.25"). Don't do windows shell scripting, but if you are using Mac OS X or some form of Linux you can use the shell script I put in another thread to quickly run a large batch.

I'm "assuming" that the delta-font option works as well in rtf2lrf as it does in lit2lrf though, as I haven't tested it.

Last edited by KaiGoth; 08-05-2007 at 11:13 PM.
KaiGoth is offline   Reply With Quote
Old 08-05-2007, 11:29 PM   #4
KaiGoth
Enthusiast
KaiGoth began at the beginning.
 
Posts: 48
Karma: 22
Join Date: Aug 2007
Device: Sony PRS500 & PRS700
Just opened up an RTF, and you should easily be able to create a shell that will do what you want. I've never played with the RTF tags before, but they look pretty simple. I'm attaching a small section on an RTF with the font size bolded. You should then be able to open up yours, find the original font size for the text sections you want to adjust, and write a quick find/replace script. A simple sed 's/fs12/fs14/g' file.rtf command should change all the size 12 font to size 14 in the file. Create a script that reads in all the file names and performs that command and you are done.

Quote:
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl {\f0\fswiss\fcharset0 Arial;}{\f1\fmodern\fcharset0 Courier New;}{\f2\froman\fcharset0 Times New Roman;}{\f3\fswiss\fcharset0 Tahoma;}}
{\colortbl ;\red0\green0\blue0;\red255\green255\blue255;}
\viewkind4\uc1\pard\cbpat2\nowidctlpar\qc\cf1\f0\fs72 THE\cf0\par
\cf1 ROCK RATS\cf0\par
\cf1\fs51 Book II of the Asteroid Wars\par
\par
\par
\cf0\fs24\par
\cf1\b\fs20 TOR\'ae\cf0\b0\fs24\par
\cf1\f1\fs29 A TOM DOHERTY ASSOCIATES BOOK NEW YORK\cf0\f0\fs24\par
\cf1\fs56 BEN BOVA\cf0\par

Last edited by KaiGoth; 08-05-2007 at 11:32 PM.
KaiGoth is offline   Reply With Quote
Old 08-06-2007, 06:49 PM   #5
KaiGoth
Enthusiast
KaiGoth began at the beginning.
 
Posts: 48
Karma: 22
Join Date: Aug 2007
Device: Sony PRS500 & PRS700
Actually, after just reading up on RTF (check out http://search.cpan.org/~sburke/RTF-W...F/Cookbook.pod), it looks like the font size command is doubled, so fs24 would equal 12 point font.

Doing a bulk modification on RTF docs should be incredibly easy, as long as each document follows the standard. I'd read up on the prior link and it shouldn't take more than a few minutes to throw together a script. I had no idea how simple RTF was as I never use it for anything.
KaiGoth is offline   Reply With Quote
Advert
Old 08-07-2007, 08:57 AM   #6
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Quote:
Originally Posted by KaiGoth View Post
I had no idea how simple RTF was as I never use it for anything.
RTF was designed as a document interchange format, rather than a "native" file format, so it is very simple (but very "bulky").
HarryT is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't change font or font size in ereaders jmacg Sigil 30 10-23-2010 10:21 PM
Font size after conversion draghetto Calibre 1 06-30-2010 12:57 PM
PRS-300 Med font size too big, but small font size too small eli2k Sony Reader 4 05-28-2010 10:47 AM
LIT->LRF Conversion - Quirky Base Font Size Setting orion2001 Calibre 6 09-27-2009 01:10 AM
DOC to PDF conversion - font size issues icebattle PDF 4 02-15-2009 04:32 AM


All times are GMT -4. The time now is 05:45 PM.


MobileRead.com is a privately owned, operated and funded community.