Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 09-02-2021, 11:11 PM   #1
Skinkie
Member
Skinkie began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Aug 2013
Device: Kobo Aura HD
border-radius with RMSDK?

I am trying something very simple, or so I thought, having a div with a rounded corner in ePub. My HTML works flawless with the beta browser on my Kobo HD, but opening the epub will give me a square box.

Is there any way to get this to work?

Code:
<html>
<body>
<p>Hello world</p>
<div style="-webkit-border-radius: 50px; border-radius: 50px; background: #73AD21; padding: 30px; display: inline-block; color: #FFF; font-size: 1em; font-family: sans;">
        <p style="margin: 0">Kan nu niet bellen. Wat heb je gehoord?</p>
        <p style="float: right; margin: 0; margin-top: 0.4em;">12:00</p>
</div>
<p>Daar is weer tekst</p>
</body>
</html>
Skinkie is offline   Reply With Quote
Old 09-03-2021, 12:11 AM   #2
Skinkie
Member
Skinkie began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Aug 2013
Device: Kobo Aura HD
I think this thread does exactly what I want. But I can't get it to render on the Kobo HD.
Skinkie is offline   Reply With Quote
Advert
Old 09-03-2021, 07:04 AM   #3
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,023
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
It won't work on most physical ereaders. I'm actually amazed the plain box with no radius on the corner seems to work so well, including internal spacing and line width, on physical ereaders.

Also "Float" is a dubious property for many ereaders.
Quoth is offline   Reply With Quote
Old 09-03-2021, 02:34 PM   #4
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,745
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 Quoth View Post
It won't work on most physical ereaders. I'm actually amazed the plain box with no radius on the corner seems to work so well, including internal spacing and line width, on physical ereaders.

Also "Float" is a dubious property for many ereaders.
I've not had a problem with Float on any Reader using RMSDK.

Kobo is not using the latest RMSDK so it's no wonder curves do not work. I don't know if curves will work with the current RMSDK but maybe.
JSWolf is offline   Reply With Quote
Old 09-03-2021, 07:32 PM   #5
Skinkie
Member
Skinkie began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Aug 2013
Device: Kobo Aura HD
I basically have three options.
1. fix my SVG example that uses text, it blows up in Kobo's RMSDK.
2. find a way to scale a pure-SVG (text becomes paths) with the current line height. I dislike this solution, because it requires magic to become accessible again. It is a solution that works though.
3. accept square boxes, and hope for a better future. (at least on Kobo, on Kindle it does not work at all)

Last edited by Skinkie; 09-03-2021 at 07:33 PM. Reason: add kindle
Skinkie is offline   Reply With Quote
Advert
Old 09-04-2021, 07:24 AM   #6
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,023
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Right angle corner boxes work on my Kindles. Conversion from epub2 and import from docx saved from LO Writer. No edit of CSS or HTML. I enabled lines on all four sides of a paragraph style. Line width recognised too.
Quoth is offline   Reply With Quote
Old 09-04-2021, 07:26 AM   #7
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,023
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
I've not had a problem with Float on any Reader using RMSDK.
I know the thread is about Kobo & RMSDK, but I'm sure Float is a problem on some other ereaders. I anchor images as a Character and usually in their own paragraph.
Quoth is offline   Reply With Quote
Old 09-04-2021, 01:11 PM   #8
Skinkie
Member
Skinkie began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Aug 2013
Device: Kobo Aura HD
Quote:
Originally Posted by Quoth View Post
Right angle corner boxes work on my Kindles. Conversion from epub2 and import from docx saved from LO Writer. No edit of CSS or HTML. I enabled lines on all four sides of a paragraph style. Line width recognised too.
I have asked someone what the Texties document looks like on a Kindle, which basically is a textual mess. Are you sure this works?
Skinkie is offline   Reply With Quote
Old 09-05-2021, 07:42 AM   #9
MicroDrie
Connoisseur
MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.
 
Posts: 58
Karma: 438844
Join Date: Aug 2019
Device: PC, Linux Mint, Tablet, and Telephone
Quote:
Originally Posted by Skinkie View Post
I am trying something very simple, or so I thought, having a div with a rounded corner in ePub. My HTML works flawless with the beta browser on my Kobo HD, but opening the epub will give me a square box.

Is there any way to get this to work?

Code:
<html>
<body>
<p>Hello world</p>
<div style="-webkit-border-radius: 50px; border-radius: 50px; background: #73AD21; padding: 30px; display: inline-block; color: #FFF; font-size: 1em; font-family: sans;">
        <p style="margin: 0">Kan nu niet bellen. Wat heb je gehoord?</p>
        <p style="float: right; margin: 0; margin-top: 0.4em;">12:00</p>
</div>
<p>Daar is weer tekst</p>
</body>
</html>
In recent years, the CSS code of webkit has changed quite a bit and we don't know which version webkit is used. Let's try if we can address webkit on the unsupported CSS elements.

What is the result of the code below?

Code:
<html>
<body>
<p>Hello world</p>
<div style="-webkit-background-clip: text; border-radius: 50px;-webkit-border-radius: 50px;display: inline-block;background: #73AD21;color: #FFF;padding: 30px;font-size: 1em;font-family: sans;">
        <p style="margin: 0">Kan nu niet bellen. Wat heb je gehoord?</p>
        <p style="float: right; margin: 0; margin-top: 0.4em;">12:00</p>
</div>
<p>Daar is weer tekst</p>
</body>
</html>

Last edited by MicroDrie; 09-05-2021 at 07:49 AM. Reason: Wrong background-clip: text deleted
MicroDrie is offline   Reply With Quote
Old 09-05-2021, 02:51 PM   #10
Semwize
Guru
Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.
 
Posts: 914
Karma: 275656
Join Date: Jun 2016
Device: Kobo
Quote:
Originally Posted by MicroDrie View Post
What is the result of the code below?

Code:
<html>
<body>
<p>Hello world</p>
<div style="-webkit-background-clip: text; border-radius: 50px;-webkit-border-radius: 50px;display: inline-block;background: #73AD21;color: #FFF;padding: 30px;font-size: 1em;font-family: sans;">
        <p style="margin: 0">Kan nu niet bellen. Wat heb je gehoord?</p>
        <p style="float: right; margin: 0; margin-top: 0.4em;">12:00</p>
</div>
<p>Daar is weer tekst</p>
</body>
</html>
This will not work in epub, can not even try it.

Last edited by Semwize; 09-05-2021 at 03:13 PM.
Semwize is offline   Reply With Quote
Old 09-05-2021, 02:54 PM   #11
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,745
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 MicroDrie View Post
What is the result of the code below?

Code:
<html>
<body>
<p>Hello world</p>
<div style="-webkit-background-clip: text; border-radius: 50px;-webkit-border-radius: 50px;display: inline-block;background: #73AD21;color: #FFF;padding: 30px;font-size: 1em;font-family: sans;">
        <p style="margin: 0">Kan nu niet bellen. Wat heb je gehoord?</p>
        <p style="float: right; margin: 0; margin-top: 0.4em;">12:00</p>
</div>
<p>Daar is weer tekst</p>
</body>
</html>
The code will not work as RMSDK does not use webkit.
JSWolf is offline   Reply With Quote
Old 09-05-2021, 09:20 PM   #12
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,181
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by Skinkie View Post
I am trying something very simple, or so I thought, having a div with a rounded corner in ePub. My HTML works flawless with the beta browser on my Kobo HD, but opening the epub will give me a square box.

Is there any way to get this to work?
Since you are asking this in a Kobo forum, you can always use the alternative renderer built into the Kobo firmware. See the attached images for the display using both renderers on the code posted by MicroDrie.
Attached Thumbnails
Click image for larger version

Name:	radius_epub.png
Views:	151
Size:	34.1 KB
ID:	189125   Click image for larger version

Name:	radius_kepub.png
Views:	142
Size:	43.7 KB
ID:	189126  
DNSB is offline   Reply With Quote
Old 09-06-2021, 04:33 AM   #13
Skinkie
Member
Skinkie began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Aug 2013
Device: Kobo Aura HD
Quote:
Originally Posted by DNSB View Post
you can always use the alternative renderer built into the Kobo firmware.
And what alternative renderer supporting ePub natively do you mean here? I am aware of the beta webbrowser.

Out of curiosity how did you make the screenshots?
Skinkie is offline   Reply With Quote
Old 09-06-2021, 07:53 AM   #14
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,511
Karma: 78910202
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Kobo uses two different reading engines; one for Epub and a second for Kobo Epub. The choice of engine is based on the file name. Files ending in .epub are processed by a RMSDK engine, while those ending in .kepub.epub are processed by an Access NetFront based engine.

Some info on the Kobo format can be found at https://github.com/kobolabs/epub-spec

Screenshots can be enabled via an entry in the kobo.conf file and then taken with the power switch. The simplest way to manage the required change to the conf file is to use nickle Menu.

Sent from my Pixel 4a using Tapatalk
PeterT is offline   Reply With Quote
Old 09-06-2021, 08:13 AM   #15
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,023
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
And the screenshots are in colour if the content is colour, so not the black, 14 greys and white of the actual display even for monochrome content.

You'd want a sleep cover if using the power switch for screenshots. But does the kobo.conf setting work for all FW or models?
Quoth is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Border-radius in pdf not working kghugo Calibre 1 07-10-2019 02:35 PM
ADE 3.0 and RMSDK 10 released Doitsu ePub 14 01-24-2014 11:06 AM
RMSDK Santanu ePub 4 05-07-2012 02:02 AM
RMSDK Santanu Android Developer's Corner 6 03-17-2012 12:27 AM
Renderer resolution with RMSDK Mark.Vasconcelos Android Developer's Corner 1 10-05-2011 04:38 AM


All times are GMT -4. The time now is 12:50 PM.


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