koreader / kindlepdfviewer

(DEPRECATED, please use KOReader instead) A PDF (plus DJVU, ePub, TXT, CHM, FB2, HTML...) viewer made for e-ink framebuffer devices, using muPDF, djvulibre, crengine
GNU General Public License v3.0
498 stars 98 forks source link

Feature: allow multiple font directories in FONTDIR. #242

Open tigran123 opened 12 years ago

tigran123 commented 12 years ago

Currently the location for fonts is taken (see font.lua) either from the environment variable FONTDIR or (if not set) is hardcoded as "./fonts".

Now, every kindlepdfviewer installation probably has CoolReader installed as well, and therefore plenty of nice compatible fonts in "../cr3/fonts". So, if we could include this location in FONTDIR (as a semicolon-separated list) in kpdf.sh script, then we could share CoolReader's resources for free. The only issue is naming convention --- we should follow CoolReader's naming convention for regular/bold/italic/bolditalic glyph shapes in a given font family.

For example, nowadays I read a lot with Adobe Garamond Premier Pro Opticals and having two copies of this family (one for CoolReader and another for KPV) seems like a waste of disk space. (and vfat filesystem doesn't support symlinks, so we can't just point to cr3's fonts from within our "./fonts" directory).

dpavlin commented 12 years ago

This is great idea. Multiple fonts dirs would also help #230 since we could ship droid fonts and include them only if they are not already on system (to prevent duplicates)

houqp commented 12 years ago

Except for ../cr3/fonts, what other dirs can we make use of? We need to make a list first :)

dpavlin commented 12 years ago

../fbKindle/qtKindle/lib/fonts/ is one additional directory on my kindle, but we can also run find /mnt/us -name '*.ttf' and include them all if we really want to :-)