Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 09-02-2022, 03:53 PM   #31
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,354
Karma: 20171571
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
Quote:
Originally Posted by Quoth View Post
Small Caps is a decorative feature for paragraph lead in. If you are putting the text of a telegram the source should be all caps. Small caps isn't needed and shouldn't be used for complete paragraphs. It's an alternate ancient style for lower case. Lower case (or Minuscule) was an innovation about 1400 years ago. The Romans only had upper case. Some writing systems just have a printed version and a handwritten version.

The SMALL CAPS is a decorative feature and shouldn't be used just to make a paragraph all capitalised. Change the source to do that. It doesn't affect capitals because they should be bigger normally.
Quote:
Originally Posted by Quoth View Post
Another use of small caps is specified by some style guides, mainly USA, for initialisms such as FM, NATO, BC, BCE, AD, CE, AM, PM. But apart from am and pm those are all usually typed in upper-case in the source, so not sure that CSS small-caps is useful?
The am and pm have many styles.

It’s pretty cool learning about the origins of small-caps, and I agree that I use it primarily for the opening line in the first paragraph of a new chapter:

Code:
p.first::first-line {font-variant:small-caps; font-size:1.15em}
But you can use the look anywhere you wish (banners, signs, grave stones, AM/PM, etc.)

Spoiler:
Some examples of Small Caps
Code:
<body>
  <hr/>

  <p class="sc">Rest In Peace<span>Cousin Huet</span>we all know<br/>you didn't do it</p>

  <hr/>

  <p class="sc">Here Lies<span>Good Old Fred</span>a great big rock<br/>fell on his head<br/><br/>R.I.P.</p>

  <hr/>

  <p class="sc">Hear Ye! Hear Ye!<span class="u">Cascading Style Class</span>Start: 12:30 p.m.<br/>
Where: Mobile Read Forums<br/><br/>stand ready to be amazed!</p>

  <hr/>
</body>
Code:
hr {
  border: none;
  margin: 1em auto;
  height: 1.5em;
  background: transparent url("../Images/FleurDeLis.svg") no-repeat center;
  background-size: auto 100%;
  overflow: hidden;
  page-break-inside: avoid;
  break-inside: avoid;
}

.sc {
  font-variant: small-caps;
  text-align: center;
  text-indent: 0;
}

.sc span {
  display: block;
  font-size: 1.1em;
  margin: .3em 0;
}

.u {
  text-decoration: underline;
}

Headstones courtesy of Disney's Haunted Mansion

Quote:
Originally Posted by JSWolf View Post
...
Smallcaps only work if the letters are lowercase...
That's not quite true...and to be a little nit-picky... Smallcaps work on uppercase letters as well... it just doesn't appear to change anything because they are already uppercase letters. lol
Smallcaps doesn't fail on uppercase letters. It tells the reading system/browser to use an SC font (if available) to the entire phrase. It also ensures the uppercase (capital) letters are larger than the smallcaps (lowercase) letters. You can also apply other styling, like font-size, that applies the appropriate relative size change to ALL the letters.


Quote:
Originally Posted by JSWolf View Post
@Turtle91 your samples are correct. The all uppercase is all uppercase. The all lowercase is in smallcaps. The text with the mixed case is both uppercase and smallcaps. That why I put text-transform: lowercase; in the CSS because if the text is originally using a simulated smallcaps, it's going to be all uppercase.
Some publishers might use the technique of all uppercase with a small font size, it doesn't follow that they ALL do. When fixing a book I correct those phrases to use the proper mixed cases, then apply the small-caps. Even IF all the letters are uppercase...isn't that what you are trying to do with your small-caps?? All you would really need to do is change the font-size....

Isn’t the point of small-caps to differentiate between uppercase and lowercase letters while displaying all the letters using the uppercase glyph??
You mistakenly think that all letters MUST be the same size. (Definition - here and here )

If you were correct then you wouldn't need font-variant:small-caps at all - you could easily create that style with:

Code:
.small {text-transform:uppercase; font-size: .7em}
If you wanted to differentiate between capitals (eg. proper name) and lower case using your technique, you would need to use multiple ugly spans.

Code:
<p>H<span class="small">i</span>! 
M<span class="small">y name is</span> 
D<span class="small">ion the</span> 
B<span class="small">enificent</span>. 
N<span class="small">ice to meet you</span>. </p>
OR … you could just use small-caps the way it was designed:

Code:
.sc {font-variant:small-caps}
<p class="sc">Hi! My name is Dion the Beneficent. Nice to meet you.</p>
It automatically changes the lowercase characters to the uppercase equivalent with a smaller font size.

You, of course, can do it however you want to. I was simply pointing out that applying text-transform:lowercase before font-variant:small-caps is defeating the purpose of small-caps.


edit: Sorry for the edits...I was trying to figure out how to insert an image inside the spoiler tags...got it working!

Last edited by Turtle91; 09-02-2022 at 05:30 PM.
Turtle91 is offline   Reply With Quote
Old 09-02-2022, 06:00 PM   #32
enuddleyarbl
Guru
enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.
 
enuddleyarbl's Avatar
 
Posts: 776
Karma: 1538394
Join Date: Sep 2013
Device: Kobo Forma
Quote:
Originally Posted by Turtle91 View Post
... I use it primarily for the opening line in the first paragraph of a new chapter:

Code:
p.first::first-line {font-variant:small-caps; font-size:1.15em}
...
That looks really nice. I keep seeing publishers doing all kinds of weird capitalizations and spans (like you pointed out later in our post) that I end up having to manually remove. I'm going to look into applying your first-line stuff automatically:
Code:
h2 + p::first-line, ...	{
  font-variant:	small-caps;
  font-size:	1.15em;
  }
I'll still have to manually remove the source all-caps, but this is a good semi-automatic replacement for what I think the publishers were trying to do.
enuddleyarbl is offline   Reply With Quote
Advert
Old 09-02-2022, 06:17 PM   #33
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,354
Karma: 20171571
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
Quote:
Originally Posted by enuddleyarbl View Post
That looks really nice. I keep seeing publishers doing all kinds of weird capitalizations and spans (like you pointed out later in our post) that I end up having to manually remove. I'm going to look into applying your first-line stuff automatically:
Code:
h2 + p::first-line, ...	{
  font-variant:	small-caps;
  font-size:	1.15em;
  }
I'll still have to manually remove the source all-caps, but this is a good semi-automatic replacement for what I think the publishers were trying to do.
Coolio!

Just a reminder that some devices don't play well with small-caps, or pseudo-elements...that's why those publishers reverted to those spans - for maximum compatibility across the most devices. But if your device works with it (as mine does) then it is a great tool!

Also, as mentioned in other locations, if you can embed a font that is a true small-caps font, then things look even better to the discerning eye. I'm not that discerning yet....

Last edited by Turtle91; 09-02-2022 at 06:20 PM.
Turtle91 is offline   Reply With Quote
Old 09-02-2022, 09:38 PM   #34
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by Turtle91 View Post
Since this is just for your own personal use on a device that supports font-variant:small-caps then there is no reason NOT to use it...if that is the style you are looking for.
Yep.

And for the ultimate discussion on all things smallcaps, see many of the posts I linked to here:

Quote:
Originally Posted by Turtle91 View Post
Just a reminder that some devices don't play well with small-caps, or pseudo-elements...that's why those publishers reverted to those spans - for maximum compatibility across the most devices. But if your device works with it (as mine does) then it is a great tool!
I say set "font-variant: small-caps" and forget it!

If the device doesn't support it, too bad! Complain to the device/app makers to fix their crap!

Quote:
Originally Posted by jackie_w View Post
What Wesley Moore omitted is that the method he documented only ever worked for standard epubs not kepubs.

In addition Kobo's font handling changed a lot in fw 4.32.19501 (April 2022). Since then the rules have changed:
Thanks for all that latest info.

Any reason why Kobo still hasn't included a monospace font? Hasn't this bug/complaint been known about for years and years?

Last edited by Tex2002ans; 09-02-2022 at 09:41 PM.
Tex2002ans is offline   Reply With Quote
Old 09-03-2022, 04:53 AM   #35
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: 79,758
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by bookman156 View Post
There is nothing simpler than using c2sc and smcp. If they are unsupported or a different font is used by the reader you get a better result as fallback. What's difficult about that?

If the font is changed or c2sc and smcp aren't supported, the full caps will stay as full caps, whereas the smcp can be backed up with font-variant-caps: small-caps; so you still get small caps if that is supported.

You've done it the best as is possible.
You don't get it. This is all wrong. You want to do it in a way that works bet in most situations. That is to make sure the small-caps are lowercase and then they will render correctly in software that support small-caps..

Don't use some non-standard font that doesn't work the way most fonts do. That's not good form.
JSWolf is offline   Reply With Quote
Advert
Old 09-03-2022, 05:03 AM   #36
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: 79,758
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Turtle91 View Post
You, of course, can do it however you want to. I was simply pointing out that applying text-transform:lowercase before font-variant:small-caps is defeating the purpose of small-caps.
The thing is, if you are changing the CSS of where the text is uppercase and a smaller font size is applied (I like 0.8333em), then you do need to make sure the letters you want to appear as smallcaps are lowercase. So you do need the text-transform: lowercase; Otherwise you won't have smallcaps. You will still have uppercase. If the text is lowercase to start with, then the text-transform won't do anything and font-variant: small-caps; will still work.

Making the text lowercase is not defeating the purpose. It's allowing the text to be changed to smallcaps. Uppercase text does not become smallcaps using small-caps.
JSWolf is offline   Reply With Quote
Old 09-03-2022, 05:48 AM   #37
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 14,048
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Quote:
Originally Posted by JSWolf View Post
You don't get it. This is all wrong. You want to do it in a way that works bet in most situations. That is to make sure the small-caps are lowercase and then they will render correctly in software that support small-caps.
Then don't use small-caps (SMALL CAPS) at all! We only use them in source to be exported as PDF for POD.
Quoth is offline   Reply With Quote
Old 09-03-2022, 07:18 AM   #38
bookman156
Addict
bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.
 
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
Quote:
You don't get it. This is all wrong. You want to do it in a way that works bet in most situations. That is to make sure the small-caps are lowercase and then they will render correctly in software that support small-caps..

Don't use some non-standard font that doesn't work the way most fonts do. That's not good form.
You are criticising something you haven't attempted to acquaint yourself with. I am doing it in a way that works best in all situations. Take the time to understand it rather than knee-jerk denounce based on ideas you haven't changed in a long while. This way of doing it isn't very well known, sure, but it works perfectly well where it is supported, and is passed over where not with a better fallback, since you can determine whether your hoped-for small caps fall back to lowercase or full cap uppercase. Don't write something off just because it is currently outside of your knowledge.

I am talking about OTF fonts with built-in c2sc and smcp functionality that is often turned off by default but can be turned on with the requisite stylesheet, and font-variant can also be used secondarily for smcp.

But I think you aren't really interested in this. Others might be.

Last edited by bookman156; 09-03-2022 at 07:26 AM.
bookman156 is offline   Reply With Quote
Old 09-03-2022, 09:08 AM   #39
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,354
Karma: 20171571
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
Quote:
Originally Posted by JSWolf View Post
You don't get it. This is all wrong. You want to do it in a way that works bet in most situations. That is to make sure the small-caps are lowercase and then they will render correctly in software that support small-caps..

Don't use some non-standard font that doesn't work the way most fonts do. That's not good form.
Actually, no. The OP specifically said this was for their own personal use on a device that supports this function.

Quote:
Originally Posted by JSWolf View Post
The thing is, if you are changing the CSS of where the text is uppercase and a smaller font size is applied (I like 0.8333em), then you do need to make sure the letters you want to appear as smallcaps are lowercase. So you do need the text-transform: lowercase; Otherwise you won't have smallcaps. You will still have uppercase. If the text is lowercase to start with, then the text-transform won't do anything and font-variant: small-caps; will still work.

Making the text lowercase is not defeating the purpose. It's allowing the text to be changed to smallcaps. Uppercase text does not become smallcaps using small-caps.
Jon. Take a step back for a second. Deep breath.....now, read what was actually printed instead of assuming your method is correct for everyone in every situation.
Turtle91 is offline   Reply With Quote
Old 09-03-2022, 11:30 AM   #40
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by Tex2002ans View Post
Any reason why Kobo still hasn't included a monospace font? Hasn't this bug/complaint been known about for years and years?
I don't know but some thoughts.

Short answer:
Cost to license one? Not enough demand to include one? Not enough complaints about its absence? Take your pick

Longer answer:
Kobo probably think they've already 'fixed it' for those who care enough, i.e. use epub with a sideloaded Courier font. All they needed to do was to fix one of the pre-existing settings in the Adobe-supplied epub reading app. Effort required minimal - nevertheless appreciated by some of us.

Fixing it for kepub is another matter entirely. If the user was willing to leave their Kobo selected font permanently at 'Publisher default' then there would be a chance that font-family:monospace; could be directed to use a default mono font, if it existed, in the same way that they currently direct font-family:serif; and font-family:sans-serif; to Georgia and 'Avenir Next' respectively.

However, as soon as the user selects a custom font to display main body text in their kepubs then the sledgehammer kepub override CSS for font-family comes into play, namely
* { font-family: %1 !important;}
Every one of the kepub's CSS styles containing the font-family property will be overridden, i.e. the whole book will be displayed in the single user-selected font, which may, or may not, be what the user really wanted.

Kobo *could* make the kepub font-family override CSS less aggressive (there are kobopatches which can do this). It would almost certainly lead to more complaints for their Help Desk when the less aggressive font-family override failed to override in the way the user expected because of the badly-designed CSS found in so many retail books.

In summary, for people who care enough and are prepared to put in the effort there are workarounds and Kobo probably know that. For everyone else they have their fallback response as explicitly stated in their Kobo EPUB Guidelines
Quote:
Content creators are advised against referencing fonts in the CSS that are not embedded in the ePub.
jackie_w is offline   Reply With Quote
Old 09-03-2022, 02:21 PM   #41
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 14,048
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Plenty of totally free Courier style / monospace fonts. They already using Linux. There probably is already a monospace font in there.

It's just corporate stupidity more typical of Alphabet, MS or Apple (in a general sense, not regarding a font).
Quoth is offline   Reply With Quote
Old 09-03-2022, 03:35 PM   #42
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by jackie_w View Post
Kobo probably think they've already 'fixed it' for those who care enough, i.e. use epub with a sideloaded Courier font. All they needed to do was to fix one of the pre-existing settings in the Adobe-supplied epub reading app. Effort required minimal - nevertheless appreciated by some of us.
Thanks.

I remembered JSWolf talking about the monospace bug + how to work around it years ago.

A few years ago, I emailed one of the head QA guys at Kobo about a question I had from his ebookcraft 2018 talk.

After answering, since I had him, I pointed him to those monospace threads too. :P

He forwarded the info to the QA team, so I assume they are/have been aware of it!

Then just a few weeks ago, I finally began applying some custom patches to my Kobo Forma.

I saw some of those "rendering fixes" mentioned in the official notes, so I hoped that was one of them!

Shame to see nothing has moved on that front, and if anything, they made it harder to work around. (No more easy sideloading monospace fonts.)

Quote:
Originally Posted by jackie_w View Post
Kobo *could* make the kepub font-family override CSS less aggressive (there are kobopatches which can do this). It would almost certainly lead to more complaints for their Help Desk when the less aggressive font-family override failed to override in the way the user expected because of the badly-designed CSS found in so many retail books.
Could you point me to those patches?

I was trying to find those a few weeks ago, but couldn't. And there was just so much info to dig through... heh.
Tex2002ans is offline   Reply With Quote
Old 09-03-2022, 06:54 PM   #43
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by Tex2002ans View Post
Then just a few weeks ago, I finally began applying some custom patches to my Kobo Forma.
Better late than never.

Quote:
Originally Posted by Tex2002ans View Post
Could you point me to those patches?

I was trying to find those a few weeks ago, but couldn't. And there was just so much info to dig through... heh.
The patch(es) you need are in libnickel.so.1.0.0.yaml. They're completely independent of each other so enable either or both.
  • epubs: Un-force font-family override p tags (std epubs)
    Default epub override is body, p { font-family: -ua-default !important; }
    and the patch changes it to body { font-family: -ua-default !important; }
  • kepubs: Un-Force user font-family in KePubs
    Default kepub override is * { font-family: %1 !important; }
    and the patch gives you the choice of 3 less aggressive alternatives
    1. div,p{font-family:%1!important; }
    2. body,p{font-family:%1!important; }
    3. body{font-family:%1!important; }
    %1 points to the font you've currently got selected in the Kobo GUI [Aa] font menu.
jackie_w is offline   Reply With Quote
Old 09-03-2022, 06:57 PM   #44
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: 79,758
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Tex2002ans View Post
Could you point me to those patches?

I was trying to find those a few weeks ago, but couldn't. And there was just so much info to dig through... heh.
The patch you want is in libnickel.so.1.0.0.yaml. Given that I check the CSS, I decided to use method 3 so I can let the CSS make more font decisions as needed.

Code:
Un-Force user font-family in KePubs:
  - Enabled: no
  - Description: |
      The KePub reader uses a very heavy-handed method of setting the font selected
      by the user, overriding all fonts set by the publisher in the book unless
      "Publisher Default" is selected.
      This patch lets the font-family set by the publisher in the KePub stylesheet
      override the font-family selected by the reader from the device in some
      cases, which allows a mix of user-selected and publisher-selected fonts.
      Alternatives 1-3 give increasing preference to the publisher-selected fonts.
  - FindBaseAddressString: "* { font-family: %1 !important; }\n"
    #
    # Alternative 1:
    #     * { font-family: %1 !important; }\n
    # --> div,p{font-family:%1!important; }\n
#  - ReplaceString:
#      Find: "* { font-family: %1 !important; }\n"
#      Replace: "div,p{font-family:%1!important; }\n"
#      MustMatchLength: yes
    #
    # Alternative 2: (Similar to ePub default)
    #     * { font-family: %1 !important; }\n
    # --> body,p{font-family:%1!important;}\n
#  - ReplaceString:
#      Offset: 0
#      Find: "* { font-family: %1 !important; }\n"
#      Replace: "body,p{font-family:%1!important;}\n"
#      MustMatchLength: yes
    #
    # Alternative 3: (similar to ePub with `Un-force font-family override p tags`)
    #     * { font-family: %1 !important; }\n
    # --> body{font-family:%1 !important; }\n
  - ReplaceString:
      Offset: 0
      Find: "* { font-family: %1 !important; }\n"
      Replace: "body{font-family:%1 !important; }\n"
      MustMatchLength: yes
JSWolf is offline   Reply With Quote
Old 09-05-2022, 01:04 AM   #45
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Thanks jackie + JSWolf.

I'll mess with it next time I'm poking around on my Kobo. Want to finish a few books + transfer out all my notes just in case I botch the patches.
Tex2002ans is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Concept] Telegram Bot for converting epubs to kepubs (and transferring) Tommalka Kobo Developer's Corner 2 01-01-2022 04:03 AM
Recipe request: Worcester Telegram NSILMike Recipes 0 12-31-2020 08:52 AM
Worcester Telegram Recipe request NSILMike Recipes 0 10-11-2020 07:39 AM
Green Island - Telegram-channel for authors and writers of books Phil J. Parker Self-Promotions by Authors and Publishers 0 06-26-2018 02:23 PM
E-readers chat (telegram, whatsapp)? Mochy Android Devices 4 07-28-2015 08:46 AM


All times are GMT -4. The time now is 09:30 AM.


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