![]() |
#1 |
Member
![]() Posts: 13
Karma: 10
Join Date: Mar 2014
Device: Kobo Aura HD
|
![]()
Hi all,
Apologies in advance if this has been raised before, I couldn't find anything on google. I'm currently running 3.2.0 with this patch. My intention is to modify the font face used in the dictionary so it can display Vietnamese correctly. I'm partially successful but the solution is not as "clean" as I would like. I was able to change the dictionary font to a Vietnamese-compatible Unicode font (Kobo Nickel for example). The problem is upon reboot, if I go straight to the dictionary (Extras > Dictionary) or look-up a word from a book, the font used in the dictionary appears to be Georgia still. The only way for the dictionary to display Kobo Nickel correctly is to open a book, go to font-properties menu/popup [Aa] first. After that, Kobo Nickel would be used in the dictionary. This opening of the font-properties menu appears to "load" the font cache to make the fonts available to nickel. From my tests, this is true to both built-in fonts as well as external ones. I'm investigating ways to automate this loading/refreshing of the font cache upon boot but don't know where to start. Any input is much appreciated. ![]() |
![]() |
![]() |
![]() |
#2 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
|
Quote:
I had once a similar experience with having to open the font menu or a book which had a certain font already assigned to it, in order to get this font working. I had two fonts with the same name installed, one was Gothic for Japanese, and the other Gothic for Chinese; one was located on the system partition, the other on the user partition. After booting (user language was Japanese) all the menus were displayed in one Gothic font, after opening a book with assigned Gothic font, the menus changed to the other Gothic font. I know it is not directly related to the dictionaries, but maybe it triggers some ideas. |
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | ||
Member
![]() Posts: 13
Karma: 10
Join Date: Mar 2014
Device: Kobo Aura HD
|
tshering,
Thanks for your reply. Quote:
Quote:
|
||
![]() |
![]() |
![]() |
#4 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
|
Quote:
I switched to JP only for test purposes at that time. Usually (and now) I use EN_GB. As for the font used by the interface, I am not sure. Some screens, for instance, "Settings" use a font with serifs, others, for instance "Accounts", use a font without serifs. I think it is Avenir and Giorgia. Last edited by tshering; 03-18-2014 at 06:16 PM. |
|
![]() |
![]() |
![]() |
#5 |
Member
![]() Posts: 13
Karma: 10
Join Date: Mar 2014
Device: Kobo Aura HD
|
That's interesting, must be a difference between the Glo and the Touch. On my Glo, the interface uses Georgia consistently throughout the menus.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
|
Another idea would be to use strace. You can find instructions and a link to the executable in this thread. The strace log will show you at which point nickel opens (and tries to open) a certain font file. However, I don't know exactly whether and how these information can help you solve your problem.
In this case I would not follow the instructions, but start strace from the rcS, in order to see also the start up process. I would be something like Code:
logfile=/mnt/onboard/.kobo/log_nickel_strace.txt /mnt/onboard/.kobo/strace -o $logfile /usr/local/Kobo/nickel -qws -skipFontLoad Generally, I would recommend using the Kobo Start Menu for this kind of job, but it is having problems with FW 3.2.0. Last edited by tshering; 03-19-2014 at 05:23 AM. |
![]() |
![]() |
![]() |
#7 |
Member
![]() Posts: 13
Karma: 10
Join Date: Mar 2014
Device: Kobo Aura HD
|
tshering,
Thanks for the instructions. I was able to produce the strace log and found out that there are only 3 fonts got loaded from boot: Avenir, Georgia, and Gothic. All other fonts are loaded when the [Aa] menu is activated. This must be why you can see Gothic used in the dictionary straight away, without intervening. If only the stock fonts are not obfuscated, I can simply rename and replace one of them. Thanks for the help so far. Will continue to investigate. |
![]() |
![]() |
![]() |
#8 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
|
I just tested this with some funny font, and see the same result as you. Apart from renaming a font, I see two other easy workarounds.
1) Don't power off. I think a lot of users almost never power off. 2) Use kepub.epub instead of epub. Once you assign your font to a kepub.epub, the font is loaded as soon as you open this book (and available to the dictionary). This should be sufficient for in-book-dictionary-look-ups. |
![]() |
![]() |
![]() |
#9 |
Member
![]() Posts: 13
Karma: 10
Join Date: Mar 2014
Device: Kobo Aura HD
|
tshering,
Apparently if the USB port is connected, mounted, and then ejected, the fonts will be updated as well. When these things happen, libnickel call "ACTION=add /usr/local/Kobo/udev/usb" and "ACTION=remove /usr/local/Kobo/udev/usb". I'm looking into calling "/usr/local/Kobo/udev/usb" after boot somehow to simulate these events, however am unsure of whether libnickel will respond to this. |
![]() |
![]() |
![]() |
#10 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
|
There were some attempts to simulate an usb connection. This one is working
Code:
echo usb plug add >> /tmp/nickel-hardware-status sleep 5 echo usb plug remove >> /tmp/nickel-hardware-status |
![]() |
![]() |
![]() |
#11 |
Member
![]() Posts: 13
Karma: 10
Join Date: Mar 2014
Device: Kobo Aura HD
|
Thanks tshering, it looks as though a clean solution is unachievable at this stage...
|
![]() |
![]() |
![]() |
#12 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
|
What about your idea of renaming your font to Giorgia and replacing the original? Does it really matter that your font is not obfuscated?
|
![]() |
![]() |
![]() |
#13 |
Member
![]() Posts: 13
Karma: 10
Join Date: Mar 2014
Device: Kobo Aura HD
|
I think it does, I've tried renaming Gentium Book Basic (and a few others) to Georgia but that didn't work. The internal fonts has to be obfuscated I believe.
|
![]() |
![]() |
![]() |
#14 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
|
|
![]() |
![]() |
![]() |
#15 |
Junior Member
![]() Posts: 8
Karma: 10
Join Date: Mar 2015
Device: Kobo Glo
|
@zecoj: not sure if you are reading this thread but could you please tell me how to change the font of dictionary in Kobo Glo? My firmware is 3.3.0. Thank you!
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Odyssey Stuck as "Connected..." on boot after update | noteventime | Bookeen | 3 | 12-27-2012 10:34 PM |
PRS-T1 Help!T1 can't boot.Stop in"opening book"screen. | networm | Sony Reader Dev Corner | 3 | 05-09-2012 03:58 PM |
Slow boot time "solution" | nbfsinger | enTourage Archive | 3 | 03-06-2011 09:25 AM |
Firmware Update No "Update your Kindle" option in "Settings" | shimoncellos | Amazon Kindle | 4 | 05-26-2010 05:37 PM |
Custom boot logo, "freezing" the screen | guylhem | Sony Reader Dev Corner | 1 | 11-09-2008 11:45 AM |