View Single Post
Old 06-01-2012, 10:23 PM   #235
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
If file /mnt/us/USE_ALT_FONTS exists, KT uses fonts with families/typefaces:
  • alternate1, alternate2, alternate3 (for firmwares up to 5.1.0)
  • all found (except some stock) (for 5.1.0)
I don't know whether restart of whole framework is needed to handle this file (or it's abscence) or just restart of reader booklet is sufficient, but believe former is true.

Also starting from 5.1.0, stock fontconfig configuration includes file /mnt/us/fonts/alternate.conf (with ignore_missing=yes). Include is defined in /etc/fonts/conf.d/70-lab126-altfonts.conf. There are also: rewriting of font families of example fonts to alternateX, making of /mnt/us/fonts directory visible to fc-cache and some alias/prefer directives (which, I think, are for overriding system fonts) in that configuration file.

Fonts used by KT with the help of this mechanism are displayed in Aa dialog in standard reader.

Hope, it will useful in some way. Remember about fc-cache (/usr/bin/fc-cache.sh is more suited) and check for proper handling of new and removing of stale fonts from cache. Otherwise, framework can crash on invoking Aa dialog.

UPD but, honestly, it's partially old news

UPD2 and /usr/bin/fc-cache.sh could be invoked with ;fc-cache debug command (shoud be entered in search bar). So with knowledge of fontconfig configuration syntax, it's possible to add new fonts without jailbreak.

UPD3 /mnt/us/fonts/alternate.conf isn't processed, at least at 5.1.0 (include is really defined, but it's value contains newlines at start and end, so defined file isn't found). However, as /mnt/us/fonts is defined as font directory, any font file in this directory is automatically catched by fontconfig.
Attached Thumbnails
Click image for larger version

Name:	alt_fonts_select.gif
Views:	7232
Size:	35.2 KB
ID:	87207  

Last edited by eureka; 06-03-2012 at 08:55 PM. Reason: improvements
eureka is offline   Reply With Quote