Quote:
Originally Posted by Toolpost
My device is GloHD running firmware 4.38.21908.
I am trying to add a font for the custom built English-Malayalam language dictionary, which I have been using for few years. I tried two sideloaded fonts but couldn't make it work.
Code:
# Un-comment ONE ONLY of the following 4 ReplaceString examples
#- ReplaceString: {Offset: 54, Find: "%4, serif ", Replace: "sans-serif", MustMatchLength: yes}
#- ReplaceString: {Offset: 54, Find: "%4, serif ", Replace: "'KBJ-TsukuMin Pr6N RB'", MustMatchLength: yes}
#- ReplaceString: {Offset: 54, Find: "%4, serif ", Replace: "'KBJ-TsukuMin Pr6N RB'", MustMatchLength: yes}
#- ReplaceString: {Offset: 54, Find: "%4, serif ", Replace: "'KBJ-UDKakugo Pr6N M'", MustMatchLength: yes}
#- ReplaceString: {Offset: 54, Find: "%4, serif ", Replace: "'AR UDJingxihei'", MustMatchLength: yes}
#- ReplaceString: {Offset: 54, Find: "%4, serif ", Replace: "Keraleeyam", MustMatchLength: yes}
- ReplaceString: {Offset: 54, Find: "%4, serif ", Replace: "'Noto Sans Malayalam'", MustMatchLength: yes}
The dictionary displays proper Malayalam text if I change the book font to any of the sideloaded Malayalam unicode font.
Any advice, please?
|
If you read the Description of this patch in libnickel.so.1.0.0.yaml you will see this note:
Quote:
4.32.19501: major font handling changes. Customising font-family now very limited
|
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.
That's the bad news! However, if you want it badly enough and you are prepared to be disciplined every time you reboot the Kobo there is a possible workaround. I wouldn't describe it as "convenient"
Some background, based on observation rather than real knowledge... After a reboot the current firmware (since 4.32.19501) seems to only load "as required" what it considers non-essential fonts. Unfortunately for us that appears to include all sideloaded fonts. So it's necessary to find some way to force your preferred dictionary font to be loaded very soon after every reboot.
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':
- Load a designated kepub to your Kobo [* See Note 1 below]. It will need to remain on your Kobo permanently.
- Open the designated kepub.
- 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.
- 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.
This should force the firmware to load your 'Noto Sans Malayalam' sideloaded font into memory for use in both book reading and dictionary lookups. It should stay in memory - and therefore work correctly in the dictionary - until the next full reboot or full power off. This means it should survive either a USB connection or putting the Kobo to sleep/standby mode.
After every reboot/power off you will need to re-do Steps 2. and 4. and I suggest you do them *immediately* because, as far as I can tell, once the dictionary opens using the "wrong" font you can't get rid of it except by doing another reboot.
---
My own testing was done using a sideloaded sans-serif font, Arial (Regular, Bold, Italic, BoldItalic), with the default Kobo English-English dictionary.
If you (
or anyone else still reading this post) decide you're prepared to go to this much trouble to make it work (and keep it working) please give feedback about whether it works for you. If it's worthwhile I'll add a link to the patch's Description pointing back to this post for future reference.
---
Notes:- * I used a designated kepub for my own tests. An epub may also work but I haven't tested it. It can be any book you like. I just created a tiny 1-page test kepub.
- ** If your chosen sideloaded dictionary font, 'Noto Sans Malayalam' consists of only a single Regular sub-family .ttf/.otf file, you can use any word you like to do the dictionary lookup. However, you will need to be more careful if 'Noto Sans Malayalam' consists of more than one sub-family file (Regular, Bold, Italic, BoldItalic). To make sure all sub-family font files are stored in memory you need to pick a word whose definition uses all the sub-families.