View Single Post
Old 06-16-2023, 10:45 AM   #12
Ken_Moorhead
Junior Member
Ken_Moorhead began at the beginning.
 
Ken_Moorhead's Avatar
 
Posts: 8
Karma: 10
Join Date: Jun 2023
Device: Apple Books
I'm going to tack this on this thread mostly for feedback, that is, why what I stumbled across is wrong

I was playing with the e-readers at my disposal, all of them apps really, just to see what changing the font did. Then I could adjust the CSS accordingly and find a different way to highlight what I was highlighting with fonts.

Then I noticed that while the body font face changed, the header font face did not change. However, color and size adjusted as expected. This worked in the Nook app, the current Kindle app as AZW3 for Mac OS (iOS to be tested later today), All variants of Apple Books I can lay hands on, and the Pocket Books app.

After some digging I discovered that tags h1... h6 were ignored when the font changes.

So, of course I set about trying to use this to protect my font.

And it sort of worked.

I gave up on the text body protection since h1 thru h6 are intended to be single line animals and technically paragraphs as children of headers is a no-no. I could fake it with old school breaks but that looked worse and seemed too hacky for the real world.

But, this trick was very useful for the section break glyph. I have an unhealthy aversion to the three asterisk business, it's ugly.

If I wrap up like so:

Code:
<h4 class="p-section_20_break">
P
</h4>
Where p-section_20_break defines the font, weigh, and alignment, I get a protected glyph that is ignored when the readers (at least the ones I have tried) change the font. But changes to color and size execute nicely. All in all it seems to work. For the purposes of my beta-readers it suffices since I know what devices are in play.

I have no doubt this is NOT a real world fix. There has got to be an e-reader out there that changes the headers too.

But, my question is three fold:
  1. Why does this even work?
  2. Is there any way of knowing which readers ignore h1...h6 or is it just dumb luck?
  3. Once the TOC written, do headers, as intended, ever matter any more? Or is it just an artifact of how Calibre got from ODT to ePub?

The book goes out to the first betas this weekend, so the time for mucking with it is over. At this point it is just curiosity.

Thanks!

Ken
Ken_Moorhead is offline   Reply With Quote