Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 09-09-2018, 04:01 PM   #76
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,206
Karma: 16228558
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by Owl_ View Post
Indeed this is only the exemple I quoted from this thread; I'm running a 4.6.9995, I'm not sure if it is the fastest and stablest one today.

The patch remove totally the 4 margins? (What must I write otherwise?)

Can I obtain something like thisin the popup window of my dictionary:

entry1definition1definition1definition1definition1defini tion1definition1definition1definition1definition1d efinition1definition1definition1definition1definit ion1definition1definition1definition1
entry2definition2definition2definition2definition2defini tion2definition2definition2definition2definition2d efinition2definition2definition2definition2definit ion2
entry3definition3definition3definition3definition3defini tion3definition3definition3definition3definition3d efinition3definition3definition3definition3definit ion3definition3definition3definition3definition3de finition3definition3definition3definition3definiti on3definition3definition3definition3
entry4definition4definition4definition4definition4defini tion4
entry5definition5definition5definition5definition5defini tion5definition5definition5definition5definition5d efinition5definition5definition5definition5definit ion5
Sorry, I think you will need to rephrase your question because I haven't a clue what you are asking
jackie_w is offline   Reply With Quote
Old 09-09-2018, 05:07 PM   #77
Owl_
Enthusiastic reader
Owl_ ought to be getting tired of karma fortunes by now.Owl_ ought to be getting tired of karma fortunes by now.Owl_ ought to be getting tired of karma fortunes by now.Owl_ ought to be getting tired of karma fortunes by now.Owl_ ought to be getting tired of karma fortunes by now.Owl_ ought to be getting tired of karma fortunes by now.Owl_ ought to be getting tired of karma fortunes by now.Owl_ ought to be getting tired of karma fortunes by now.Owl_ ought to be getting tired of karma fortunes by now.Owl_ ought to be getting tired of karma fortunes by now.Owl_ ought to be getting tired of karma fortunes by now.
 
Posts: 423
Karma: 3860889
Join Date: Mar 2017
Location: Italy
Device: Kindle paperwhite3, Kobo aura one, kobo touch 2.0, Kobo Clara HD,Poke2
Quote:
Originally Posted by jackie_w View Post
Sorry, I think you will need to rephrase your question because I haven't a clue what you are asking
I've 3 questions:

1)Is the firmware 4.6.9995 the fastest and stablest one today?

2)Does the patch `Dictionary text font-family/font-size/line-height - beta` remove totally the 4 margins? (What must I write otherwise?)

3)Can I edit the abovementioned patch in order to obtain something like this in the popup window of my dictionary? Example:

entry1definition1definition1definition1definition1defini tion1definition1definition1definition1definition1d efinition1definition1definition1definition1definit ion1definition1definition1definition1
entry2definition2definition2definition2definition2defini tion2definition2definition2definition2definition2d efinition2definition2definition2definition2definit ion2
entry3definition3definition3definition3definition3defini tion3definition3definition3definition3definition3d efinition3definition3definition3definition3definit ion3definition3definition3definition3definition3de finition3definition3definition3definition3definiti on3definition3definition3definition3
entry4definition4definition4definition4definition4defini tion4
entry5definition5definition5definition5definition5defini tion5definition5definition5definition5definition5d efinition5definition5definition5definition5definit ion5
Owl_ is offline   Reply With Quote
Old 09-09-2018, 06:16 PM   #78
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,206
Karma: 16228558
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by Owl_ View Post
1)Is the firmware 4.6.9995 the fastest and stablest one today?
Speed and stability is in the eye of the beholder. I can't really comment. But 4.6.9995 is almost a year old and there have been many later releases.

Quote:
Originally Posted by Owl_ View Post
2)Does the patch `Dictionary text font-family/font-size/line-height - beta` remove totally the 4 margins? (What must I write otherwise?)
Well, this particular patch is not really about margins at all, it's about the font-family, font-size and line-height used for the dictionary definitions.

However, if you want to experiment yourself, and you know what you're doing, you could customise the base patch to see if you like it better. Change where I've highlighted in red from 1em to 0px. You must not change the length of the old and new strings.

Code:
# ##### N.B. Do not change the next 2 lines #####
find_base_address = `* { font: %1px %2; line-height: %5em; }`
replace_string = 0000, `* { font: %1px %2; line-height: %5em; }\ndiv.descriptionFont { font-family: %3; }\nol { font-size: %1px; font-weight: bold; margin-left: %4em; margin-top: 0px; }\nol p { font-size: %1px; font-weight:normal; }\n`, `* { font-size: 40px; line-height: 1.4em; font-family: Georgia                                           ;}\n        \nol   { margin-left: 1em; margin-top: 0px; }\nol p { font-size:  1em; font-weight:normal; }\n`
# ##### N.B. Do not change anything above this line #####
However, there's only so much you can do because you can't change the underlying HTML structure inside the built-in Kobo dictionaries which are encrypted. I believe they use an HTML ordered list structure (<ol> and <li>'s) for the multiple definitions. <ol> and <li> tags carry a certain amount of implied default styling.
jackie_w is offline   Reply With Quote
Old 09-10-2018, 03:35 AM   #79
Owl_
Enthusiastic reader
Owl_ ought to be getting tired of karma fortunes by now.Owl_ ought to be getting tired of karma fortunes by now.Owl_ ought to be getting tired of karma fortunes by now.Owl_ ought to be getting tired of karma fortunes by now.Owl_ ought to be getting tired of karma fortunes by now.Owl_ ought to be getting tired of karma fortunes by now.Owl_ ought to be getting tired of karma fortunes by now.Owl_ ought to be getting tired of karma fortunes by now.Owl_ ought to be getting tired of karma fortunes by now.Owl_ ought to be getting tired of karma fortunes by now.Owl_ ought to be getting tired of karma fortunes by now.
 
Posts: 423
Karma: 3860889
Join Date: Mar 2017
Location: Italy
Device: Kindle paperwhite3, Kobo aura one, kobo touch 2.0, Kobo Clara HD,Poke2
Quote:
Originally Posted by jackie_w View Post
Speed and stability is in the eye of the beholder. I can't really comment. But 4.6.9995 is almost a year old and there have been many later releases.


Well, this particular patch is not really about margins at all, it's about the font-family, font-size and line-height used for the dictionary definitions.

However, if you want to experiment yourself, and you know what you're doing, you could customise the base patch to see if you like it better. Change where I've highlighted in red from 1em to 0px. You must not change the length of the old and new strings.

Code:
# ##### N.B. Do not change the next 2 lines #####
find_base_address = `* { font: %1px %2; line-height: %5em; }`
replace_string = 0000, `* { font: %1px %2; line-height: %5em; }\ndiv.descriptionFont { font-family: %3; }\nol { font-size: %1px; font-weight: bold; margin-left: %4em; margin-top: 0px; }\nol p { font-size: %1px; font-weight:normal; }\n`, `* { font-size: 40px; line-height: 1.4em; font-family: Georgia                                           ;}\n        \nol   { margin-left: 1em; margin-top: 0px; }\nol p { font-size:  1em; font-weight:normal; }\n`
# ##### N.B. Do not change anything above this line #####
However, there's only so much you can do because you can't change the underlying HTML structure inside the built-in Kobo dictionaries which are encrypted. I believe they use an HTML ordered list structure (<ol> and <li>'s) for the multiple definitions. <ol> and <li> tags carry a certain amount of implied default styling.
ok
Owl_ is offline   Reply With Quote
Old 01-04-2019, 10:07 AM   #80
vostro
Connoisseur
vostro has become a pillar of the MobileRead communityvostro has become a pillar of the MobileRead communityvostro has become a pillar of the MobileRead communityvostro has become a pillar of the MobileRead communityvostro has become a pillar of the MobileRead communityvostro has become a pillar of the MobileRead communityvostro has become a pillar of the MobileRead communityvostro has become a pillar of the MobileRead communityvostro has become a pillar of the MobileRead communityvostro has become a pillar of the MobileRead communityvostro has become a pillar of the MobileRead community
 
Posts: 83
Karma: 15734
Join Date: Dec 2016
Device: Scribe,Elipsa,PWSE,FORMA,KOA2,KV,KA1, KAH2O, PW1-4, KA, AKT,
any dictionary font patch for 4.12.12111? thanks.
vostro is offline   Reply With Quote
Old 01-04-2019, 03:51 PM   #81
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,730
Karma: 6678757
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Quote:
Originally Posted by vostro View Post
any dictionary font patch for 4.12.12111? thanks.
Yes (https://github.com/geek1011/kobopatc...ckie_w.yaml#L2), it's been there for quite a while.
geek1011 is offline   Reply With Quote
Old 01-05-2019, 05:36 AM   #82
jcn363
absolute beginner
jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.
 
jcn363's Avatar
 
Posts: 323
Karma: 1750999
Join Date: May 2017
Location: Go with the wind (43°19'17.7"N 2°00'19.4"W)
Device: ka1
@Owl_
If you're still interested in list style, you can test this nickel patch.
Spoiler:

Code:
Main list definition:
  - Enabled: no
  - Description: |
      Your own list style.
  - FindZlib: "reader_head"
  - ReplaceZlib:
      Find:    ".text_body ul, \n.text_body ol \n{\n\tmargin: 1.5em 0px 2em 2em;\n}\n\
                .text_body li \n{\n\tmargin: 0px 0px 0.25em 0px;\n}\n\
                .text_body ul ul,\n.text_body ol ol \n{\n\tmargin: 0.75em 0 1em 2em;\n\tmin-width: 250px;\n}"
      Replace: ".text_body ul,.text_body ol{margin:1em 0em 1em 0em;}\n\
                .text_body li{margin:0em 0em 0.25em 0em;}\n\
                .text_body ul ul,.text_body ol ol{margin:0.5em 0em 0em 0em;min-width:250px;}"
or
Code:
Your own list styles:
  - Enabled: no
  - Description: |
      Your own list styles.
  - FindZlib: "reader_head"
  - ReplaceZlib:
      Find:    ".text_body ul, \n.text_body ol \n{\n\tmargin: 1.5em 0px 2em 2em;\n}\n\This's my dictionary
                .text_body li \n{\n\tmargin: 0px 0px 0.25em 0px;\n}\n\
                .text_body ul ul,\n.text_body ol ol \n{\n\tmargin: 0.75em 0 1em 2em;\n\tmin-width: 250px;\n}"
      Replace: ".text_body ul{margin:1em 0em 1em 0em;}\n\
                .text_body ol{margin:1em 0em 1em 0em;}\n\
                .text_body li{margin:0em 0em 0.25em 0em;}\n\
                .text_body ul ul{margin:0.5em 0em 0em 0em;min-width:250px;}\n\
                .text_body ol ol{margin:0.5em 0em 0em 0em;min-width:250px;}"

NOTE:
Set the margin for each side of an element (top, right, bottom, and left) into Replace.

Good luck.

EDIT:
Warning: Obviously, I didn't probe it on 4.4.9298 but I think this piece doesn't changed.

EDIT²:
Read the next post.

Last edited by jcn363; 01-05-2019 at 10:28 AM. Reason: EDIT²
jcn363 is offline   Reply With Quote
Old 01-05-2019, 08:21 AM   #83
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,206
Karma: 16228558
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by jcn363 View Post
EDIT²:
Into libnickel:
The 'Dictionary text font-family/font-size/line-height - beta' (for libnickel.so.1.0.0) has been a part of the standard patch pack for a long time. I have the responsibility for maintaining it. Why are you rewriting it?

If you think you've got some good ideas how to improve it then the polite thing to do would be to discuss it with me in one of the patch threads. If appropriate, I can then incorporate any improvements into the standard pack. However, in this particular case, the code you highlighted in red is already part of the standard patch. What are you hoping to achieve?

IMHO rewriting someone else's patch without reference to the original is extremely rude and it's not the first time you've done something similar. We already have enough problems with conflicting patches without you making it worse.
jackie_w is offline   Reply With Quote
Old 01-05-2019, 10:02 AM   #84
vostro
Connoisseur
vostro has become a pillar of the MobileRead communityvostro has become a pillar of the MobileRead communityvostro has become a pillar of the MobileRead communityvostro has become a pillar of the MobileRead communityvostro has become a pillar of the MobileRead communityvostro has become a pillar of the MobileRead communityvostro has become a pillar of the MobileRead communityvostro has become a pillar of the MobileRead communityvostro has become a pillar of the MobileRead communityvostro has become a pillar of the MobileRead communityvostro has become a pillar of the MobileRead community
 
Posts: 83
Karma: 15734
Join Date: Dec 2016
Device: Scribe,Elipsa,PWSE,FORMA,KOA2,KV,KA1, KAH2O, PW1-4, KA, AKT,
is there a simple way that i could just replace kobo's system font with a MS font which has all set of various language characters by just copy MS font to Kobo and rename it with system default font name?
vostro is offline   Reply With Quote
Old 01-05-2019, 10:04 AM   #85
jcn363
absolute beginner
jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.
 
jcn363's Avatar
 
Posts: 323
Karma: 1750999
Join Date: May 2017
Location: Go with the wind (43°19'17.7"N 2°00'19.4"W)
Device: ka1
Quote:
Originally Posted by jackie_w View Post
Why are you rewriting it?
Sorry, it was not my intention to rewrite, just an indication in red, for a particular purpose: list margin (Owl_ wanted to change).

Good luck.

Last edited by jcn363; 01-05-2019 at 10:18 AM.
jcn363 is offline   Reply With Quote
Old 01-23-2019, 06:42 AM   #86
Owl_
Enthusiastic reader
Owl_ ought to be getting tired of karma fortunes by now.Owl_ ought to be getting tired of karma fortunes by now.Owl_ ought to be getting tired of karma fortunes by now.Owl_ ought to be getting tired of karma fortunes by now.Owl_ ought to be getting tired of karma fortunes by now.Owl_ ought to be getting tired of karma fortunes by now.Owl_ ought to be getting tired of karma fortunes by now.Owl_ ought to be getting tired of karma fortunes by now.Owl_ ought to be getting tired of karma fortunes by now.Owl_ ought to be getting tired of karma fortunes by now.Owl_ ought to be getting tired of karma fortunes by now.
 
Posts: 423
Karma: 3860889
Join Date: Mar 2017
Location: Italy
Device: Kindle paperwhite3, Kobo aura one, kobo touch 2.0, Kobo Clara HD,Poke2
Quote:
Originally Posted by jcn363 View Post
@Owl_
If you're still interested in list style, you can test this nickel patch.
Spoiler:

Code:
Main list definition:
  - Enabled: no
  - Description: |
      Your own list style.
  - FindZlib: "reader_head"
  - ReplaceZlib:
      Find:    ".text_body ul, \n.text_body ol \n{\n\tmargin: 1.5em 0px 2em 2em;\n}\n\
                .text_body li \n{\n\tmargin: 0px 0px 0.25em 0px;\n}\n\
                .text_body ul ul,\n.text_body ol ol \n{\n\tmargin: 0.75em 0 1em 2em;\n\tmin-width: 250px;\n}"
      Replace: ".text_body ul,.text_body ol{margin:1em 0em 1em 0em;}\n\
                .text_body li{margin:0em 0em 0.25em 0em;}\n\
                .text_body ul ul,.text_body ol ol{margin:0.5em 0em 0em 0em;min-width:250px;}"
or
Code:
Your own list styles:
  - Enabled: no
  - Description: |
      Your own list styles.
  - FindZlib: "reader_head"
  - ReplaceZlib:
      Find:    ".text_body ul, \n.text_body ol \n{\n\tmargin: 1.5em 0px 2em 2em;\n}\n\This's my dictionary
                .text_body li \n{\n\tmargin: 0px 0px 0.25em 0px;\n}\n\
                .text_body ul ul,\n.text_body ol ol \n{\n\tmargin: 0.75em 0 1em 2em;\n\tmin-width: 250px;\n}"
      Replace: ".text_body ul{margin:1em 0em 1em 0em;}\n\
                .text_body ol{margin:1em 0em 1em 0em;}\n\
                .text_body li{margin:0em 0em 0.25em 0em;}\n\
                .text_body ul ul{margin:0.5em 0em 0em 0em;min-width:250px;}\n\
                .text_body ol ol{margin:0.5em 0em 0em 0em;min-width:250px;}"

NOTE:
Set the margin for each side of an element (top, right, bottom, and left) into Replace.

Good luck.

EDIT:
Warning: Obviously, I didn't probe it on 4.4.9298 but I think this piece doesn't changed.

EDIT²:
Read the next post.
I would run it on a 4.6.9995 . Can I paste it directly in the nikel file? Or must I change samething?

Could you write what I can paste?

many thanks
Owl_ is offline   Reply With Quote
Old 01-24-2019, 10:04 AM   #87
jcn363
absolute beginner
jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.
 
jcn363's Avatar
 
Posts: 323
Karma: 1750999
Join Date: May 2017
Location: Go with the wind (43°19'17.7"N 2°00'19.4"W)
Device: ka1
Quote:
Originally Posted by Owl_ View Post
I would run it on a 4.6.9995 . Can I paste it directly in the nikel file? Or must I change samething?
Apparently, this piece of code has not changed. Therefore, you can apply it as is (the first one if you want all the lists to look the same and the second one if you want to differentiate between ordered and unordered lists).
You only have to copy the desired patch in your nickel.yaml, put the values you want and enable it.
jcn363 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Instructions for patching firmware 3.17.3 GeoffR Kobo Developer's Corner 60 09-17-2015 05:35 PM
Instructions for patching firmware 3.17.0 GeoffR Kobo Developer's Corner 49 08-16-2015 05:20 AM
Instructions for patching firmware 3.16.10 GeoffR Kobo Developer's Corner 12 08-14-2015 03:40 AM
Instructions for patching firmware 3.8.0 GeoffR Kobo Developer's Corner 92 10-22-2014 07:22 AM
Instructions for patching firmware 3.3.x, 3.4.x, 3.5.x GeoffR Kobo Developer's Corner 285 08-27-2014 10:06 AM


All times are GMT -4. The time now is 06:57 PM.


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