Mobileread
Font sizes
#1  DaleDe 09-14-2009, 03:55 PM
When I move (via save html) a doc file to Sigil the html source is full of hard coded font sizes. These get remembered in Sigil which means that the font size changes in ADE don't work. It would be nice if there was a command that would strip out all hardcoded fixed size font specifications. Currently I make the ePUB file and them rebuild it in Calibre to remove this information. This is automatic in Calibre but I really would prefer it was a manual step as some users may want to control this for some reason. Is there an easier way to make this work in Sigil?

Dale
Reply 

#2  Valloric 09-14-2009, 04:57 PM
Quote DaleDe
When I move (via save html) a doc file to Sigil the html source is full of hard coded font sizes. These get remembered in Sigil which means that the font size changes in ADE don't work. It would be nice if there was a command that would strip out all hardcoded fixed size font specifications. Currently I make the ePUB file and them rebuild it in Calibre to remove this information. This is automatic in Calibre but I really would prefer it was a manual step as some users may want to control this for some reason. Is there an easier way to make this work in Sigil?
So what you're saying is that Word hard-codes font sizes into the HTML, and you would want Sigil to remove this for you? Preferably as an option?

BTW I'd like to see a sample of this HTML, just so that I have an idea of what you're talking about.
Reply 

#3  DaleDe 09-15-2009, 06:50 PM
Here is a test case. It is the first few chapters of a book I am trying to convert. There is some font boiler plate at the front that would be good to remove also. This is a typical Word file saved as html. I chopped the main part of the file off so some rules such as /html entry are missing and some links won't work. There is also an @page entry that I trimmed the margins out of so that they wouldn't get in the way of a good ePUB.

Dale
[zip] testcase.zip (48.8 KB, 247 views)
Reply 

#4  Valloric 09-15-2009, 07:36 PM
Quote DaleDe
Here is a test case. It is the first few chapters of a book I am trying to convert. There is some font boiler plate at the front that would be good to remove also. This is a typical Word file saved as html. I chopped the main part of the file off so some rules such as /html entry are missing and some links won't work. There is also an @page entry that I trimmed the margins out of so that they wouldn't get in the way of a good ePUB.
You still haven't said what do you want Sigil to do with this.

If you want Sigil to remove the various junk with which Word fills the exported HTML, then that's already planned. Tidy has some nice flags for this and I'll be extending that behavior too. This would be available through a dialog that pops up on import and asks the user to check importing options like "Remove excessive Word markup" or whatever.

If this is what you want, add it to the tracker so I don't forget. But bear in mind that this is not high on my list of priorities because there are more important things to implement first.
Reply 

#5  DaleDe 09-16-2009, 10:48 AM
I was responding for your request for a sample. My original request was to trim the font size hard coded implementation as Calibre does. This is the most troublesome feature so far as ePUB is concerned.

Dale
Reply 

#6  Valloric 09-16-2009, 11:48 AM
Quote DaleDe
I was responding for your request for a sample. My original request was to trim the font size hard coded implementation as Calibre does. This is the most troublesome feature so far as ePUB is concerned.
Add it to the tracker. It would be implemented as part of the aforementioned "Remove Word cruft" feature.
Reply 

#7  blvd 03-13-2010, 08:51 AM
DaleDe
This topic, hard coded font size information from a doc file, is this the reason why the font size won't actually change on my reader (Stanza on an iPod touch)? The spacing will change, but not the actual font size.
Thanks
Reply 

#8  DaleDe 03-13-2010, 12:45 PM
Quote blvd
DaleDe
This topic, hard coded font size information from a doc file, is this the reason why the font size won't actually change on my reader (Stanza on an iPod touch)? The spacing will change, but not the actual font size.
Thanks
I suspect so. It happens in a lot of formats but it also seems to happen in DOC sourced files unless you edit the intermediate format.

Dale
Reply 

#9  blvd 03-13-2010, 05:52 PM
Hey, thanks for your reply. Actually you were a great help.

I just heard about this Sigil this morning. I downloaded, installed and set to work on one of my favorite novels that I had converted with the Aspose plug-in for Word. A big book (250,000 words and close to eighty chapters) that really slowed my device down and drained the battery in nothing flat. No pleasure.

Anyways, due to your reply, I was forced to actually view the CODE. I was really hoping to avoid that because I know just next to nothing about html and had never heard of CSS until today. But it worked out for me. I just deleted the very beginning CSS tags? that instructed about various fonts and sizes. I retained a few for italics and some centering I had done. Then I broke the document up into Chapters, applied Header formatting. Et voila! And I even have a TOC! I have to say that this document looks and performs better than some that I have purchased specifically for the ePub format!

So,I guess what *you* were referring to is all of the css stuff left in the body of the document, clutter. Hey, Stanza and my iPod touch clearly don't care that it is there. But I guess it makes the file size a bit bigger? Perhaps conflicts with other readers, like ADE?
Anyways, thanks again. I am a very happy reader now!
Reply 

Today's Posts | Search this Thread | Login | Register