View Single Post
Old 05-22-2024, 06:52 PM   #5
1ily
Connoisseur
1ily doesn't litter1ily doesn't litter
 
Posts: 61
Karma: 190
Join Date: Sep 2023
Device: Kobo Libra 2
Quote:
Originally Posted by JSWolf View Post
Here's what the CSS needs to look like.

Code:
.smallcaps {
  font-variant: small-caps;
  text-transform : lowercase;
;
What you do is make sure the span surrounds text you want to be in small-caps. What your screen grab looks like is that the text is in uppercase. small-caps won't work unless the test is in lowercase.

As for the small-cap font you installed in the fonts directory. it won't work for KePub.

The original book had the css settings as:

Code:
.smallcaps {
  font-variant: small-caps;
  text-transform: uppercase;
}
I changed the text transform to lowercase, but the font size still appears inconsistent compared to the rest of the text

Here's a snippet of the book's text & the code. The classes are being applied correctly

Code:
<p class="body-text">Flags whipped and snapped in the breeze. 
<span class="smallcaps">Unity</span>, one declared in plain, black thread. 
<span class="smallcaps">Strength</span>. The others bore the insignia of the revolution, the same one that had been chalked on Jack’s dance floor: the sun with its searing rays.</p>
Attached Thumbnails
Click image for larger version

Name:	screen_039.png
Views:	115
Size:	131.3 KB
ID:	208437  
1ily is offline   Reply With Quote