Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 04-01-2026, 08:27 PM   #31
ElMiko
Fanatic
ElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileRead
 
ElMiko's Avatar
 
Posts: 555
Karma: 65460
Join Date: Jun 2011
Device: Kindle Voyage, Boox Go 7
Quote:
Originally Posted by Turtle91 View Post
Oh! That’s much easier; that’s just a basic span.

Code:
.bigger {font-size=1.1em}

<p>BORN: Dec. <span class="bigger">15, 1948</span></p>

~OR~

.smaller {font-size=.9em}

<p><span class="smaller">BORN: Dec.</span> 15, 1948</p>
Yes, it's easy but more cumbersome that you think. Because the actual code would look like:

Code:
<p><span class="smaller">BORN</span>: <span class="smaller">Dec</span>. 15, 1948</p>
And the example I used was just for illustrative purpose. Expand it across 30 or 40 more characters with a similar mix of numbers, punctuation, and letters. (Again, for example: "BORN: DEC. 15, 1948 / DIED: OCT. 10, 1984 / A MOTHER, A SISTER, A DAUGHTER; LOVED BY ALL.")

As I said at the outset, this was my original solution, but i was wondering if there was a way to automatically isolate sizing to a specific type of character. (Which RbnJrg demonstrated, albeit strictly in a epub3 context)

Last edited by ElMiko; 04-01-2026 at 08:34 PM.
ElMiko is offline   Reply With Quote
Old Yesterday, 02:44 PM   #32
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,480
Karma: 21000001
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Another option is to use small-caps css

Code:
.sc {font-variant:small-caps}
<p class="sc">BORN: Dec. 15, 1948 / DIED: Oct. 10, 1984 / A MOTHER, A SISTER, A DAUGHTER; LOVED BY ALL.</p>
Small-caps css is supported widely - it’s been around since css 1 in 1996 - and you can easily have a smaller font-size capital letter by putting a lowercase letter in the string. eg "Dec" looks like "DEC"

I also think it leaves the font-size of the numbers alone… so you can play around with that.

Some people don’t like using it, and I’m sure they’ll jump on here and say "it’s an ePub3 thing so don’t use it"… but that is just not true. There may be devices/apps that don’t do it "perfectly", but it’ll look great for most and acceptable for anyone else.
Turtle91 is offline   Reply With Quote
Advert
Old Yesterday, 10:24 PM   #33
ElMiko
Fanatic
ElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileRead
 
ElMiko's Avatar
 
Posts: 555
Karma: 65460
Join Date: Jun 2011
Device: Kindle Voyage, Boox Go 7
Quote:
Originally Posted by Turtle91 View Post
Another option is to use small-caps css

Code:
.sc {font-variant:small-caps}
<p class="sc">BORN: Dec. 15, 1948 / DIED: Oct. 10, 1984 / A MOTHER, A SISTER, A DAUGHTER; LOVED BY ALL.</p>
Small-caps css is supported widely - it’s been around since css 1 in 1996 - and you can easily have a smaller font-size capital letter by putting a lowercase letter in the string. eg "Dec" looks like "DEC"

I also think it leaves the font-size of the numbers alone… so you can play around with that.

Some people don’t like using it, and I’m sure they’ll jump on here and say "it’s an ePub3 thing so don’t use it"… but that is just not true. There may be devices/apps that don’t do it "perfectly", but it’ll look great for most and acceptable for anyone else.
A few things....

Small caps won't change the height of the capital letters. As I've said a couple of times, the original question was about modifying ALL letters—uppercase and lowercase—to be smaller without numbers or punctuation being affected.

Second, unfortunately, small caps is less reliable than you might think. NeoReader, for example, is very inconsistent in recognizing them. Trust me on this, small-caps does not solve this issue. Period. Particularly because if it fails on all lower-case text it will be be really disruptive (e.g. <span class="sc">no exit</span> hung over the door.)

Are there other workarounds? Sure. I could just leave all the text in caps without stylizing further at all. Or deciding that it's okay to shrink the numbers and punctuation. But that's solving the problem by deciding that you don't want to solve the problem. I already know how to do that. From what I can see, the only solutions to making the text look the way I said in the original post are a) swiss cheese <span>s, and b) RbnJrg's targeted Unicode approach.

Last edited by ElMiko; Yesterday at 10:26 PM.
ElMiko is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Moon+ Reader your favorite font and font size? loodio Android Devices 6 01-30-2016 06:50 PM
Problem changing font size using font size key Waylander Conversion 0 10-02-2013 03:30 PM
Determine font and font size on incoming epub? peaceridge Calibre 4 01-30-2012 03:35 PM
PRS-300 Med font size too big, but small font size too small eli2k Sony Reader 4 05-28-2010 09:47 AM


All times are GMT -4. The time now is 12:24 AM.


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