11-30-2022, 08:13 PM | #1 |
Zealot
Posts: 149
Karma: 474196
Join Date: Jan 2011
Location: Ottawa
Device: Kobo Aura H2O
|
Kobo-compatible upside-down text
I'm editing a book that contains some upside-down text, and I'm having issues getting it to show correctly on my Kobo Libra 2. Here is my current CSS class:
Code:
.anclrg-ud { transform: scale(-1, -1); -ms-transform: scale(-1, -1); -webkit-transform: scale(-1, -1); -o-transform: scale(-1, -1); -moz-transform: scale(-1, -1); } My Kobo is at the latest stock firmware. I should mention I'm using ePub 2. I'd rather not go to 3 because I don't use any of its other features and hate seeing the nav file in Sigil, but if that's what's necessary then it is what it is. Thanks in advance! Last edited by Vanguard3000; 12-01-2022 at 11:27 AM. |
11-30-2022, 09:45 PM | #2 |
Bibliophagist
Posts: 35,215
Karma: 145277352
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
As an experiment, kepubify your epub and send it to your Kobo to use the webkit based renderer rather that the Adobe RMSDK renderer. The simplest way for a quick and dirty test would be to rename the epub from filename.epub to filename.kepub.epub otherwise you can use kepubify or the KoboTouchExtended plugin for calibre to do the conversion.
|
12-01-2022, 09:21 AM | #3 |
Sigil Developer
Posts: 7,602
Karma: 5433388
Join Date: Nov 2009
Device: many
|
FWIW, under epub3, the nav does not have to be in the spine at all. You just need to not have the nav landmarks point to the nav itself as you can not include a non-spine item in the nav landmarks.
If you go that way the nav is treated exactly like the old ncx under epub2 and is not seen by the user as part of the text. And if it helps, afaik CSS transform was added in CSS 1 and updated in CSS 2, so it should work properly in decent epub 2 readers even those using older Adobe Reader sdks. Perhaps some readers bail on the css when they see the older platform specific versions in the css? Last edited by KevinH; 12-01-2022 at 10:56 AM. |
12-01-2022, 12:32 PM | #4 | |
Zealot
Posts: 149
Karma: 474196
Join Date: Jan 2011
Location: Ottawa
Device: Kobo Aura H2O
|
That seems to work, even with just renaming it. So is there an Adobe-compatible version of the property or is this the only way? I'd rather not have a mixture of formats in my library if possible.
As a sidenote, I have the same issue with smallcaps not working on my Kobos as well - I often change the tags to 80% sized caps as long as it's not a mix of upper- and lowercase. Quote:
As to your epub3 comment, I'm not sure I understand; Sigil can't remove the nav file, and craps out if I try any funny business like blanking it out. Is the "spine" the file structure as visible in Sigil, WinRar, etc? Or is it within an eReader? |
|
12-01-2022, 12:44 PM | #5 |
Sigil Developer
Posts: 7,602
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Sigil does not default to "hiding" the nav from the reader. Sigil assumes that setting linear="no" is enough for real epub3 readers but not all follow that part of the spec.
So to do this inside Sigil requires manually editing the nav and manually editing the opf as the very last step. In the nav landmarks section you remove the epub-type toc link that points to the nav itself. In the opf, you remove the nav's entry from the spine. This must be done last thing before saving to prevent Sigil from reverting things the next time is rebuilds the opf. The nav will still show in Sigil's BookBrowser but will not show in the e-reader as a "text chapter" and will only show via the TOC just like the ncx. FYI, The spec states the nav itself can only link to resources listed in the spine. If you manually remove the nav from the spine, then the nav can't link to itself, or it violates the spec. Last edited by KevinH; 12-01-2022 at 01:10 PM. |
12-01-2022, 06:00 PM | #6 | ||
Bibliophagist
Posts: 35,215
Karma: 145277352
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
I've never tried using transform but very likely, not supported in RMSDK. Quote:
You can't remove the nav document since like the ncx document in epub2, it's a required element. |
||
12-02-2022, 12:12 PM | #7 |
Zealot
Posts: 149
Karma: 474196
Join Date: Jan 2011
Location: Ottawa
Device: Kobo Aura H2O
|
Oog. I tried converting to epub3, but my Kobo still won't render the text upside down, with or without the fallbacks. But I appreciate the info on hiding the nav file from you both.
Incidentally, I've change the code to Code:
.anclrg-ud { font-family: hv-AncientRunes; text-align: center; font-size: 150%; transform: rotate(180deg); -ms-transform: rotate(180deg); -webkit-transform: rotate(180deg); -o-transform: rotate(180deg); -moz-transform: rotate(180deg); } As far as I can tell, the only thing I can do is rename it to be a kepub file (using kepubify changes the code, and I don't use Calibre to sync my devices - I strictly sideload manually, for better or worse). It's my one kepub in my ~3500-epub library, which is going to drive me nuts. So is this my only good option, aside from making the upside-down text an image (I don't want to do this)? I briefly looked into svg images but this seems like a totally different headache. On a side-note, my kepub file has a much smaller default (per Kobo) font than my epubs. is there a way to synchronize this so I don't have to adjust my device for one book? Also, I realize a lot of this is just me being cranky about irrelevant issues. I take reat care of my epub library and am very particular when something goes awry, |
12-02-2022, 05:45 PM | #8 | |
Bibliophagist
Posts: 35,215
Karma: 145277352
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Note that the list in those messages may not be completely up to date though I think geek1011 has been attempting to keep it up to date in the second message. |
|
12-02-2022, 06:19 PM | #9 |
A Hairy Wizard
Posts: 3,093
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Just curious... can you post an image of what result you are going for? There might be an alternate css method to achieve it.
|
12-03-2022, 08:36 PM | #10 |
Zealot
Posts: 149
Karma: 474196
Join Date: Jan 2011
Location: Ottawa
Device: Kobo Aura H2O
|
Here's a sanitized version of what I'm trying to do. It's pretty straightforward - just centred, 150% size, and upside-down, with a custom .ttf font. On the Kobo itself it looks exactly as pictured except the text isn't upside-down. The font, size, and justification are correct.
|
12-04-2022, 10:13 AM | #11 | |
Wizard
Posts: 1,539
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
Code:
.anclrg-ud { text-align: center; font-size: 1.5em; transform: rotate(180deg); -webkit-transform: rotate(180deg); } Regards |
|
12-05-2022, 04:43 PM | #12 | |
Zealot
Posts: 149
Karma: 474196
Join Date: Jan 2011
Location: Ottawa
Device: Kobo Aura H2O
|
Quote:
I've been avoiding this because I'm a simple-minded old crank who likes to just drag and drop things, but I'm looking into using Calibre to sync my book to my device. I hate it. I hate it so much. But with the KoboTouchExtended plugin it lets me keep my library in epub format on my PC, while using kepub on my device. Anyway, thanks everyone for the help! |
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
KOReader 2019.10 and Kobo Libra: Upside down and reversed! | linguinee | KOReader | 3 | 10-26-2019 11:52 AM |
Kobo Forma Orientation Sticking Upside Down | squiresque | Kobo Reader | 9 | 11-09-2018 11:26 AM |
Upside down text on REB 1100 | Dr. Drib | Legacy E-Book Devices | 3 | 05-09-2008 11:44 AM |