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 12-23-2023, 03:32 AM   #31
Toolpost
Junior Member
Toolpost began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Apr 2019
Device: Kobo Glo HD
Quote:
Originally Posted by jackie_w View Post

In other words, trying to customise dictionary font-family no longer works as well as it once did if you're trying to use a sideloaded custom font. The only custom fonts which have been reported as working (by various users) are those already listed as options in the patch, as per your quoted extract. As you can see they are all built-in fonts.
This is really a bad news. I have read it what you said in the libnickel.so.1.0.0.yaml file, but couldn't realise the depth of the situation.

Quote:
Originally Posted by jackie_w View Post

Quite recently I discovered that using the following steps I was able to make the dictionary use a sideloaded font. I use the font-family from your quoted patch as an example below, 'Noto Sans Malayalam':
  1. Load a designated kepub to your Kobo [* See Note 1 below]. It will need to remain on your Kobo permanently.
  2. Open the designated kepub.
  3. Use the [Aa] font menu to set the font for this book to 'Noto Sans Malayalam'. This font should be automatically stored permanently for this book in the Kobo database.
  4. Long-press a word [** See Note 2 below] and choose your 'English-Malayalam' dictionary to lookup the word. This chosen dictionary should be automatically stored permanently for this book in the Kobo database.
Thanks for the workaround. If you don't notice I have mentioned it in my first post.

Quote:
Originally Posted by Toolpost View Post
The dictionary displays proper Malayalam text if I change the book font to any of the sideloaded Malayalam unicode font.
This works, but whenever I open a book, I have to change the font to another font first (enen if the current saved font is Noto Sans Malayalam), then revert back to Noto Sans Malayalam again (or any other Malayalam sideloaded font) to see the dictionary output. After that I can change the book font again to any "system font" for better rendering of the English text, the dictionary font persists as the "Noto Sans Malayalam" and will be rendered properly. So, if i do this procedure each time opening a new book, things are working fine.

So what I observed here is, Kobo saves the book font each time, but at the beginning the dictionary font is reverted back to the system font again.

For now, I did the above mentioned procedure with a regular EPUB file, since I am still using the old regular EPUB files in the reader. Only now I was reading the forums and get to know the benefits of using KEPUBs. Seems like I can do the conversion easily with a Calibre plugin. I will try with a KEPUB and update you.

Thank you very much for the response and your time.
Toolpost is offline   Reply With Quote
Old 12-23-2023, 12:11 PM   #32
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,234
Karma: 16537336
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by Toolpost View Post
This works, but whenever I open a book, I have to change the font to another font first (enen if the current saved font is Noto Sans Malayalam), then revert back to Noto Sans Malayalam again (or any other Malayalam sideloaded font) to see the dictionary output. After that I can change the book font again to any "system font" for better rendering of the English text, the dictionary font persists as the "Noto Sans Malayalam" and will be rendered properly. So, if i do this procedure each time opening a new book, things are working fine.

So what I observed here is, Kobo saves the book font each time, but at the beginning the dictionary font is reverted back to the system font again.

For now, I did the above mentioned procedure with a regular EPUB file, since I am still using the old regular EPUB files in the reader. Only now I was reading the forums and get to know the benefits of using KEPUBs. Seems like I can do the conversion easily with a Calibre plugin. I will try with a KEPUB and update you.
You seem to be saying that you can't get your chosen Malayalam dictionary font to "stick" as you move from book to book. This is not what I experienced. Once I've got the En-En dictionary to display with my Arial font it "sticks" until the next reboot, no matter how many different books I open, nor how many different dictionaries I open.

However, all my custom dictionaries are different variations of En-En (i.e. not translation dictionaries) so it's possible my testing wasn't broad enough for your purposes. If you want to PM me a link to both the English-Malayalam dictionary and Malayalam fonts you're trying to use I could have another look.
jackie_w is offline   Reply With Quote
Advert
Old 12-23-2023, 05:52 PM   #33
Aleron Ives
Wizard
Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.
 
Posts: 1,489
Karma: 16300090
Join Date: Sep 2022
Device: Kobo Libra 2
The other solution would be to roll back to 4.31 to avoid all of this, wouldn't it?
Aleron Ives is offline   Reply With Quote
Old 12-23-2023, 06:04 PM   #34
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: 76,994
Karma: 138588794
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 Aleron Ives View Post
The other solution would be to roll back to 4.31 to avoid all of this, wouldn't it?
Which firmware was the one that caused all the problems?
JSWolf is offline   Reply With Quote
Old 12-23-2023, 08:10 PM   #35
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,234
Karma: 16537336
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by Aleron Ives View Post
The other solution would be to roll back to 4.31 to avoid all of this, wouldn't it?
Well, maybe you could do that, but as the "problem" arose from Kobo deciding to change the way fonts are handled it's unlikely to ever be "fixed" so you'd be marooned on fw <4.32 forever. I'm not sure I'd describe that as a real solution. For example, you couldn't do that on a Clara 2E because its earliest fw was 4.33.x (or 4.34.x), I think.
jackie_w is offline   Reply With Quote
Advert
Old 12-24-2023, 02:27 AM   #36
Toolpost
Junior Member
Toolpost began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Apr 2019
Device: Kobo Glo HD
Quote:
Originally Posted by jackie_w View Post
You seem to be saying that you can't get your chosen Malayalam dictionary font to "stick" as you move from book to book. This is not what I experienced. Once I've got the En-En dictionary to display with my Arial font it "sticks" until the next reboot, no matter how many different books I open, nor how many different dictionaries I open.
Yes, not even book to book. If I press the back button and go to the books menu, reopen the same book again, I have to redo the entire procedure to get the dictionary Malayalam font rendered.

Quote:
Originally Posted by jackie_w View Post
However, all my custom dictionaries are different variations of En-En (i.e. not translation dictionaries) so it's possible my testing wasn't broad enough for your purposes. If you want to PM me a link to both the English-Malayalam dictionary and Malayalam fonts you're trying to use I could have another look.
I have posted the dictionary in this forum. Please see this link

https://www.mobileread.com/forums/sh...&postcount=797

I have sent you the font file as PM. Please check.

Thank you,
Toolpost is offline   Reply With Quote
Old 12-24-2023, 12:13 PM   #37
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,234
Karma: 16537336
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by Toolpost View Post
Yes, not even book to book. If I press the back button and go to the books menu, reopen the same book again, I have to redo the entire procedure to get the dictionary Malayalam font rendered.
I've installed your 'Noto Sans Malayalam' font (regular only) and your dicthtml-en-ml.zip translation dictionary on my Libra2. I also customised the patch as you originally quoted:
Code:
  - ReplaceString: {Offset: 54, Find: "%4, serif            ", Replace: "'Noto Sans Malayalam'", MustMatchLength: yes}
If I follow the steps I outlined in post #30 after a reboot, everything appears to work as expected. See screenshots below. The only exception is the dictionary's name label on the top line of the pop-up (Pic2/Pic3).

It doesn't seem to matter which epub/kepub I open/re-open, if I do a dictionary lookup (any dictionary) the word definition uses the Malayalam Regular font for the parts of the definition which are intended to be displayed as Regular. I don't know how to fix the dictionary label's Malayalam characters but if it's a problem, a simple renaming of dicthtml-en-ml.zip may be the easiest workaround.
  • Pic1: The test kepub with its [Aa] font set/stored as 'Noto Sans Malayalam' and its dictionary set/stored as 'En-Malayalam'. I've attached a copy of the test kepub I use in case it's any help. You can just drag-drop it to your Kobo.
  • Pic2: A dictionary lookup using the 'En-Malayalam' dictionary in a random English KEPUB on the Libra2 with its [Aa] font set to my normal reading font.
  • Pic3: Same as Pic2 except using an EPUB.
Attached Thumbnails
Click image for larger version

Name:	1_test_kepub.png
Views:	841
Size:	151.0 KB
ID:	205391   Click image for larger version

Name:	2_library_kepub.png
Views:	800
Size:	227.2 KB
ID:	205392   Click image for larger version

Name:	3_library_epub.png
Views:	809
Size:	149.9 KB
ID:	205393  
Attached Files
File Type: epub Kobo_dictionary_force_font.kepub.epub (19.2 KB, 508 views)
jackie_w is offline   Reply With Quote
Old 12-27-2023, 03:04 AM   #38
Toolpost
Junior Member
Toolpost began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Apr 2019
Device: Kobo Glo HD
Quote:
Originally Posted by jackie_w View Post

If I follow the steps I outlined in post #30 after a reboot, everything appears to work as expected. See screenshots below. The only exception is the dictionary's name label on the top line of the pop-up (Pic2/Pic3).

It doesn't seem to matter which epub/kepub I open/re-open, if I do a dictionary lookup (any dictionary) the word definition uses the Malayalam Regular font for the parts of the definition which are intended to be displayed as Regular. I don't know how to fix the dictionary label's Malayalam characters but if it's a problem, a simple renaming of dicthtml-en-ml.zip may be the easiest workaround.
Apologies for the delayed response. I've spent the last two days experimenting with various settings on my Glo HD. it's really strange, why things did not work as expected.

I was facing the same behavior as described in my previous posts despite multiple attempts, till I loaded the kepub test file you provided. What I observed is, after loading the kepub and setting the fonts in it, especially the "supplemental" font, things started to change. In kepub, for the first time, the Malayalam font was saved and retained upon reopening.

Encouraged by this experience, I decided to clean up my entire book library on the device. I installed the latest version of Calibre with the kepub conversion plugin, and reuploded the entire library of books in kepub format. Additionally, I moved my dictionary from '/.kobo/dicts' to '/.kobo/custom-dict'. Later the kobopatch with the custom dictionary font is applied again.

Now everything is working smoothly. I really like the the functionality 'supplemental font' with kepub files. For English books, I can set the main font to 'Amasis' and the supplemental font to 'Noto Sans Malayalam'. I even experimented with other installed Malayalam fonts as supplemental fonts, and they all worked seamlessly. Notably, Kobo seems to save this information with the kepub, as it survives a reboot.

Thank you so much for your response and detailed instructions.
Toolpost is offline   Reply With Quote
Old 12-27-2023, 09:58 AM   #39
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,234
Karma: 16537336
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by Toolpost View Post
Thank you so much for your response and detailed instructions.
I'm glad you've got things working

Just FYI, I didn't set Malayalam as a Supplemental font during my testing but if that also makes things better - great!
jackie_w is offline   Reply With Quote
Old 01-10-2024, 08:49 PM   #40
Usered
Member
Usered began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Jan 2024
Device: Kobo Libra 2
Hi, may I have some help? I've tried this process multiple times and still couldn't manage to find any koboroot file in the out folder. The firmware version is right (the last one), what can I do? Should I apply every modification of the files (the ones with the yes/no values) one at a time or what else? I don't understand :\

Last edited by Usered; 01-10-2024 at 08:54 PM.
Usered is offline   Reply With Quote
Old 01-10-2024, 09:01 PM   #41
Uncle Robin
Diligent dilettante
Uncle Robin ought to be getting tired of karma fortunes by now.Uncle Robin ought to be getting tired of karma fortunes by now.Uncle Robin ought to be getting tired of karma fortunes by now.Uncle Robin ought to be getting tired of karma fortunes by now.Uncle Robin ought to be getting tired of karma fortunes by now.Uncle Robin ought to be getting tired of karma fortunes by now.Uncle Robin ought to be getting tired of karma fortunes by now.Uncle Robin ought to be getting tired of karma fortunes by now.Uncle Robin ought to be getting tired of karma fortunes by now.Uncle Robin ought to be getting tired of karma fortunes by now.Uncle Robin ought to be getting tired of karma fortunes by now.
 
Uncle Robin's Avatar
 
Posts: 3,512
Karma: 49052844
Join Date: Sep 2019
Location: in my mind
Device: Kobo Sage; Kobo Libra H2O
Quote:
Originally Posted by Usered View Post
Hi, may I have some help? I've tried this process multiple times and still couldn't manage to find any koboroot file in the out folder. The firmware version is right (the last one), what can I do? Should I apply every modification of the files (the ones with the yes/no values) one at a time or what else? I don't understand :\
Is there a log.txt file in the "Out" folder? If there is, checking it will alert you to any conflicts that prevented the generation of the KoboRoot.tgz

I've had this happen to me A LOT, when I unintentionally enabled two patches that are mutually exclusive and cannot be enabled together. If that happens, no KoboRoot.tgz is generated, and the log file records which conflict caused the failure
Uncle Robin is online now   Reply With Quote
Old 01-10-2024, 09:16 PM   #42
Usered
Member
Usered began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Jan 2024
Device: Kobo Libra 2
Thank you so much! Apparently I applied two incompatible patches for the home screen
Usered is offline   Reply With Quote
Old 01-10-2024, 09:52 PM   #43
Uncle Robin
Diligent dilettante
Uncle Robin ought to be getting tired of karma fortunes by now.Uncle Robin ought to be getting tired of karma fortunes by now.Uncle Robin ought to be getting tired of karma fortunes by now.Uncle Robin ought to be getting tired of karma fortunes by now.Uncle Robin ought to be getting tired of karma fortunes by now.Uncle Robin ought to be getting tired of karma fortunes by now.Uncle Robin ought to be getting tired of karma fortunes by now.Uncle Robin ought to be getting tired of karma fortunes by now.Uncle Robin ought to be getting tired of karma fortunes by now.Uncle Robin ought to be getting tired of karma fortunes by now.Uncle Robin ought to be getting tired of karma fortunes by now.
 
Uncle Robin's Avatar
 
Posts: 3,512
Karma: 49052844
Join Date: Sep 2019
Location: in my mind
Device: Kobo Sage; Kobo Libra H2O
Quote:
Originally Posted by Usered View Post
Thank you so much! Apparently I applied two incompatible patches for the home screen
Based on my own personal experience, I thought that most likely - I have a habit of getting greedy and thinking "ooh, that one and that one and that one and.." and then nothing
Uncle Robin is online now   Reply With Quote
Old 01-11-2024, 12:13 PM   #44
Usered
Member
Usered began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Jan 2024
Device: Kobo Libra 2
Another tip if anybody can help: how should I edit the nickel.yaml file under the "Custom header/footer captions" patch if I only want the header and footer font to show in grey, and no other change (I'm satisfied enough with the reduced space from another patch)?

Plus, is there any patch to force the kepub reader on the device to show ligatures and good kerning (seems only avaiable for epubs)?

Thanks!
Usered is offline   Reply With Quote
Old 01-11-2024, 03:26 PM   #45
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: 76,994
Karma: 138588794
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 Usered View Post
Another tip if anybody can help: how should I edit the nickel.yaml file under the "Custom header/footer captions" patch if I only want the header and footer font to show in grey, and no other change (I'm satisfied enough with the reduced space from another patch)?

Plus, is there any patch to force the kepub reader on the device to show ligatures and good kerning (seems only avaiable for epubs)?

Thanks!
I've posted my kobopatch.yaml file. It has all of the patches. You just have to change the yes/no as you need. There are some comments to let me know witch patches I've customized. At the end is the cpmmand to also install the better hyphenation dictionary so I don't have to do it manually. The thread for the better hyphenation dictionaries is at https://www.mobileread.com/forums/sh...d.php?t=252405
Attached Files
File Type: zip kobopatch.yaml.zip (2.5 KB, 586 views)
JSWolf is offline   Reply With Quote
Reply

Tags
kobopatch, patch, patch32lsb, patches, patching


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 06:35 PM
Instructions for patching firmware 3.17.0 GeoffR Kobo Developer's Corner 49 08-16-2015 06:20 AM
Instructions for patching firmware 3.2.0 DNSB Kobo Developer's Corner 66 12-05-2014 08:28 AM
Instructions for patching firmware 3.8.0 GeoffR Kobo Developer's Corner 92 10-22-2014 08:22 AM
Instructions for patching firmware 3.1.1 GeoffR Kobo Developer's Corner 64 04-18-2014 02:23 PM


All times are GMT -4. The time now is 04:17 AM.


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