Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 08-02-2013, 01:35 PM   #31
jgoguen
Generally Awesome Person
jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.
 
Posts: 1,100
Karma: 2191133
Join Date: Jan 2013
Location: /dev/kmem
Device: Kobo Clara HD, Kindle Oasis
What's the language identifier set to in the OPF file and each content file?
jgoguen is offline   Reply With Quote
Old 08-02-2013, 02:16 PM   #32
Anak
Guru
Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.
 
Posts: 603
Karma: 641742
Join Date: Mar 2012
Location: DE
Device: Kobo Glo
Quote:
Originally Posted by jgoguen View Post
What's the language identifier set to in the OPF file and each content file?
xml:lang="nl" and <dc:language>nl</dc:language>
Anak is offline   Reply With Quote
Advert
Old 08-02-2013, 02:57 PM   #33
jgoguen
Generally Awesome Person
jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.
 
Posts: 1,100
Karma: 2191133
Join Date: Jan 2013
Location: /dev/kmem
Device: Kobo Clara HD, Kindle Oasis
In addition to xml:lang, can you set lang="nl" on each <html> element?
jgoguen is offline   Reply With Quote
Old 08-02-2013, 03:19 PM   #34
Anak
Guru
Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.
 
Posts: 603
Karma: 641742
Join Date: Mar 2012
Location: DE
Device: Kobo Glo
Quote:
Originally Posted by jgoguen View Post
In addition to xml:lang, can you set lang="nl" on each <html> element?
<html xmlns="http://www.w3.org/1999/xhtml" lang="nl" xml:lang="nl">

Doesn't work.
Anak is offline   Reply With Quote
Old 08-02-2013, 03:30 PM   #35
jgoguen
Generally Awesome Person
jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.
 
Posts: 1,100
Karma: 2191133
Join Date: Jan 2013
Location: /dev/kmem
Device: Kobo Clara HD, Kindle Oasis
That's unfortunate. I'm out of ideas.
jgoguen is offline   Reply With Quote
Advert
Old 08-03-2013, 11:02 AM   #36
tartanpion
Enthusiast
tartanpion began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Nov 2011
Location: france
Device: kobo libra 2
is there a way to overcome the line-height fixed to 1.3 in a paragraph with this custom css ?
tartanpion is offline   Reply With Quote
Old 08-03-2013, 01:37 PM   #37
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,471
Karma: 169115146
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by tartanpion View Post
is there a way to overcome the line-height fixed to 1.3 in a paragraph with this custom css ?
Have you tried adding a line such as the one below?

Code:
body {line-height: 1.1 !important;}
You can also try using the universal selector by adding:

Code:
* {line height: 1.1 !important;}
though I am not fond of using that selector.

Regards,
David

Last edited by DNSB; 08-03-2013 at 01:45 PM.
DNSB is offline   Reply With Quote
Old 08-03-2013, 05:58 PM   #38
tartanpion
Enthusiast
tartanpion began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Nov 2011
Location: france
Device: kobo libra 2
It does not work. Or i make a mistake somewhere...
tartanpion is offline   Reply With Quote
Old 08-03-2013, 06:26 PM   #39
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Only an idea. Let us presume the renderer merges the user stylesheet with its own internal stylesheet in a way that the internal style blocks follow the style blocks of the user style sheet (and thereby overwrite them if there is an overlap and if it is possible). If this is true, one could search libnickel (in FW 2.8.1 maybe nickel) for "body, p { line-height: %1em !important; }" and remove !important.
Note: I haven't do this myself and therefore don't know whether it works.
tshering is offline   Reply With Quote
Old 08-03-2013, 08:07 PM   #40
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,471
Karma: 169115146
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by tartanpion View Post
It does not work. Or i make a mistake somewhere...
Here's what I've tried as a kepub-book.css. My main wants were to have the font size when I open a .kepub to be closer to the font size when I open a .epub and to reduce the left/right margins. From the Kobo GUI, the line height and margin sliders are fully to the left, the font size slider is in the middle.

Code:
body {
   -webkit-hyphens: auto !important;
   font-size: 150%!important;
   line-height: 1.0 !important;
   widows:  0 !important;
   orphans:  0 !important;
   margins: 5pt !important;
   padding-bottom: 0 !important;
   }
div {
   font-size: 1em !important;
   line-height: 1.0; !important;
   margin-bottom: 0.2em !important;
   margin-left: 0 !important;
   margin-right: 0 !important;
   margin-top: 0 !important;
   text-align: left !important;
   text-indent: 4% !important;
   widows:  0 !important;
   orphans:  0 !important;
   padding-bottom: 0 !important;
   }
p {
   font-size: 1em !important;
   line-height: 1.0; !important;
   margin-bottom: 0.2em !important;
   margin-left: 0 !important;
   margin-right: 0 !important;
   margin-top: 0 !important;
   text-align: left !important;
   text-indent: 4% !important;
   widows:  0 !important;
   orphans:  0 !important;
   padding-bottom: 0 !important;
   }
I've attached screenshots of what the ebook looks like with and without the custom css. Items such as the chapter headers moving to the left as the text-align left directive is applied to them. It appears this ebooks uses a lot of <div> tags instead of <p> tags.

Regards,
David
Attached Thumbnails
Click image for larger version

Name:	without_css.png
Views:	532
Size:	243.9 KB
ID:	108879   Click image for larger version

Name:	with_css.png
Views:	541
Size:	160.6 KB
ID:	108880  

Last edited by DNSB; 08-03-2013 at 08:18 PM.
DNSB is offline   Reply With Quote
Old 08-04-2013, 08:49 AM   #41
Ken Maltby
Wizard
Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.
 
Ken Maltby's Avatar
 
Posts: 4,466
Karma: 6900052
Join Date: Dec 2009
Location: The Heart of Texas
Device: Boox Note2, AuraHD, PDA,
Quote:
Originally Posted by DNSB View Post
Here's what I've tried as a kepub-book.css. My main wants were to have the font size when I open a .kepub to be closer to the font size when I open a .epub and to reduce the left/right margins. From the Kobo GUI, the line height and margin sliders are fully to the left, the font size slider is in the middle.

Code:
body {
   -webkit-hyphens: auto !important;
   font-size: 150%!important;
   line-height: 1.0 !important;
   widows:  0 !important;
   orphans:  0 !important;
   margins: 5pt !important;
   padding-bottom: 0 !important;
   }
div {
   font-size: 1em !important;
   line-height: 1.0; !important;
   margin-bottom: 0.2em !important;
   margin-left: 0 !important;
   margin-right: 0 !important;
   margin-top: 0 !important;
   text-align: left !important;
   text-indent: 4% !important;
   widows:  0 !important;
   orphans:  0 !important;
   padding-bottom: 0 !important;
   }
p {
   font-size: 1em !important;
   line-height: 1.0; !important;
   margin-bottom: 0.2em !important;
   margin-left: 0 !important;
   margin-right: 0 !important;
   margin-top: 0 !important;
   text-align: left !important;
   text-indent: 4% !important;
   widows:  0 !important;
   orphans:  0 !important;
   padding-bottom: 0 !important;
   }
I've attached screenshots of what the ebook looks like with and without the custom css. Items such as the chapter headers moving to the left as the text-align left directive is applied to them. It appears this ebooks uses a lot of <div> tags instead of <p> tags.

Regards,
David
I can understand that you might want the 150% font size, but it might make for a better comparison if you had left that out, it kinda overwhelms the comparing of the rest of the alterations.

Luck;
Ken
Ken Maltby is offline   Reply With Quote
Old 08-04-2013, 12:16 PM   #42
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,471
Karma: 169115146
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by Ken Maltby View Post
I can understand that you might want the 150% font size, but it might make for a better comparison if you had left that out, it kinda overwhelms the comparing of the rest of the alterations.
Using the 150% font-size declaration makes the kepub font size match the epub font size. That way, I don't have to muck with the font size slider when I change renderers.

Regards,
David
DNSB is offline   Reply With Quote
Old 08-04-2013, 03:20 PM   #43
Ken Maltby
Wizard
Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.
 
Ken Maltby's Avatar
 
Posts: 4,466
Karma: 6900052
Join Date: Dec 2009
Location: The Heart of Texas
Device: Boox Note2, AuraHD, PDA,
Quote:
Originally Posted by DNSB View Post
Using the 150% font-size declaration makes the kepub font size match the epub font size. That way, I don't have to muck with the font size slider when I change renderers.

Regards,
David
But the pictures you provided do not match in file size, which makes it hard to notice any other effects you may be trying to demonstrate.

Luck;
Ken
Ken Maltby is offline   Reply With Quote
Old 08-04-2013, 10:26 PM   #44
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,471
Karma: 169115146
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by Ken Maltby View Post
But the pictures you provided do not match in file size, which makes it hard to notice any other effects you may be trying to demonstrate.
Effects to notice:

1. All text including the chapter header is left aligned
2. Paragraphs are now ragged right rather than justified
3. Gap between paragraphs have not increased despite the larger font size
4. Paragraphs start with an indented line

And please note the increase in font size is one of the most important items to me. I find it very annoying that the font size using the ACCESS renderer was about 60% of the size of text when the same file with the same css was rendered by Adobe RM requiring me to adjust the font size when switching books.

Regards,
David

Last edited by DNSB; 08-04-2013 at 10:46 PM.
DNSB is offline   Reply With Quote
Old 08-04-2013, 10:44 PM   #45
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,471
Karma: 169115146
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by Ken Maltby View Post
I can understand that you might want the 150% font size, but it might make for a better comparison if you had left that out, it kinda overwhelms the comparing of the rest of the alterations.
Just to make it easier to compare, here's two screen shots, one without the custom css, the other with my custom css with the font-size: 150% line removed. This should allow you to see the extra lines per page due to the reduction in spacing between lines and paragraphs.

Regards,
David
Attached Thumbnails
Click image for larger version

Name:	without_css.png
Views:	491
Size:	263.7 KB
ID:	108930   Click image for larger version

Name:	with_css_100.png
Views:	499
Size:	231.7 KB
ID:	108931  
DNSB is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PRS-950 A little web too to generate custom CSS gsgleason Sony Reader 0 12-18-2011 06:51 PM
Custom CSS Japes Conversion 5 07-09-2011 08:15 PM
PRS-300 Stuck in Opening Book, Loading, restart cycle tiggertiffin87 Sony Reader 0 10-18-2010 08:33 PM
Custom CSS for output deckoff Calibre 1 08-28-2010 11:55 PM
Custom covers for Kobo's book loading screen? Gianorama Kobo Reader 7 07-28-2010 11:44 AM


All times are GMT -4. The time now is 01:41 PM.


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