View Single Post
Old 12-24-2015, 12:01 PM   #12
Thom*
The Fumbler
Thom* began at the beginning.
 
Posts: 66
Karma: 10
Join Date: Jun 2015
Device: android 4.2/fbreader
The size of the first letter in a paragraph is probably controled by a CSS file. In the CSS file you would find something like:

span.dropcaps
{
float: left;
font-size: 100px;
line-height: 100px;
padding-top: 1px;
margin-top: -.10em;
margin-right: .09em;
color: #5E5E5E;
}

Then the first character in each paragraph is coded something like this:

<span class="dropcaps">W</span>

"Dropcaps" is the class name and it could be something else. Whatever is in the <span> statement is what you are looking for.

You can change the size of the first letter by changing the class in the CSS file. For example, to reduce the size from 100 pixels to 50 pixels change the CSS file to look like this:

span.dropcaps
{
float: left;
font-size: 50px;
line-height: 50px;
padding-top: 1px;
margin-top: -.10em;
margin-right: .09em;
color: #5E5E5E;
}

That will effectively change the size of all letter surrounded by <span class="dropcaps">Whatever</span>.

An alternative is to eliminate the "dropcaps" altogether resulting in a font size that is normal for the paragraph. This can be accomplished with a Regex search and replace:

Search: <span class="dropcaps">(.*?)</span>
Replace: \1

Actually, I would change that search to <span class="dropcaps">(((?!<span).)*?)</span> just in case there exist nested spans in you book.

I hope that helps.

Merry Christmas
Thom* is offline   Reply With Quote