11-04-2017, 08:34 AM | #16 |
creator of calibre
Posts: 43,853
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I dont know, depends on how the browser does font loading. The viewer just passes the styleshet unmodified to the browser. Experiment and see.
|
11-04-2017, 08:58 AM | #17 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
To experiment it would be helpful if I knew where to find the phone's local copies of
|
Advert | |
|
11-04-2017, 11:34 AM | #18 |
creator of calibre
Posts: 43,853
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
They're stored in indexedDB and are loaded via BLOB URLs. You cant use relative paths, you would have to use absolute paths.
|
11-04-2017, 03:07 PM | #19 | |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
My font .ttf files are in /fonts in phone internal storage. Using an Android file manager I can navigate to them in 2 ways:
To minimise typing until I can get it working (or not). I'm assuming the User style sheet would look something like this: Code:
@font-face {font-family: MyFont; src: url("abs_path_to_fonts/MyFont-Regular.ttf")} body {font-family: MyFont, serif} |
|
11-04-2017, 09:22 PM | #20 |
creator of calibre
Posts: 43,853
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Sorry I spend almost no time exploring the internals of phone OSes, which I regard as computers dumbed down to the point of near uselessness. But as a workaround, simply upload the fonts somewhere on the web and use an http URL to the font in your stylesheet. To make it robust you would set the cache control headers to never expire, that way the browser on your phone should never need to reload the fonts, after the first time they are downloaded.
|
Advert | |
|
11-04-2017, 10:31 PM | #21 | |
Well trained by Cats
Posts: 29,799
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
./ would be relative to the current dir |
|
11-05-2017, 05:55 AM | #22 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Thanks for your suggestions but I'll have to admit defeat on this one. I don't have a website. I'm sure embedding a body font in every epub would work but that's neither practical nor desirable.
Maybe some day someone with better knowledge who cares about font usage on Android phones will stop by and post a neat solution. |
11-24-2017, 08:16 PM | #23 | |
Fanatic
Posts: 516
Karma: 32106
Join Date: Feb 2012
Device: Onyx Boox Leaf
|
Quote:
Sent from my ONEPLUS A3000 using Tapatalk |
|
11-29-2017, 12:31 PM | #24 | |
Connoisseur
Posts: 63
Karma: 10
Join Date: Jul 2011
Device: Sony Touch, Nook Simple Touch, Kobo Aura, Android w/CoolReader
|
Quote:
Honestly, this fixed all my heartache with the browser reader. Thanks so much. ETA: Using Calibre 3.12 with Android Galaxy Note 3 on Chrome for Android browser. I haven't tried the browser viewer with the samsung browser since it recently update as the earlier version didn't work, but now that I've thought of it I guess I'll have a look. But the bit of code you posted put into the css stylesheet spot under preferences in the browser viewer put me back on serif fonts, which has negated my need to use another piece of software. Total. Win. UPDATE: Calibre's Browser Viewer now seems to work with the updated Samsung Browser. I feel like Kovid has given me the majority of my holiday gifts. Last edited by MizSuz; 11-29-2017 at 12:44 PM. |
|
11-29-2017, 12:55 PM | #25 |
creator of calibre
Posts: 43,853
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You are welcome
|
11-30-2017, 08:34 PM | #26 |
Fanatic
Posts: 516
Karma: 32106
Join Date: Feb 2012
Device: Onyx Boox Leaf
|
Dear Kovid,
I created a shortcut (Home screen) to the content server, which has been improved now and I decided to keep a computer running Calibre permanently for the first time, and anytime I tap on such Chrome shortcut it opens the book but not in fullscreen mode. I need to tap and tap to activate fullscreen again. Is it something that you can fix or it is a Chrome feature? Regarding the Page Layout, can you add {title} {author} or custom fields to the footer where reading progress is indicated now? Last edited by nqk; 11-30-2017 at 08:40 PM. |
11-30-2017, 10:26 PM | #27 |
creator of calibre
Posts: 43,853
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Browsers require explicit user action to enter full screen mode.
Creating a template for headers/footers is on my TODO list (it requires some code to get the current chapter name as well, so you can use that in your headers and footers). |
12-02-2017, 03:11 AM | #28 |
Fanatic
Posts: 516
Karma: 32106
Join Date: Feb 2012
Device: Onyx Boox Leaf
|
Dear Kovid,
I'm seriously trying Browser Viewer now and I have encountered a number of issues that may need your golden touches. Sorry that the contents of the thread have gone far from the intended title. 1) I created a number of virtual libraries and set user accessibility accordingly. It works. However users are able to see the full list of VLs, even the search commands applied. Is it possible that the users can only see VLs that they CAN access to? An option to turn off VL selection button applicable to certain users? 2) Users with "write access" now can sync their reading progresses. But does that mean they will be able to change the books in the future when you implement such features? 3) I think you should include link color in Themes as well. Default blue links look bad in dark background themes. Of course I can overwrite these with a {color: yellow;} but then switching themes requires manual changes to the user style sheet, too. Last edited by nqk; 12-02-2017 at 03:14 AM. |
12-02-2017, 03:57 AM | #29 |
creator of calibre
Posts: 43,853
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
1) No, I'm afraid not. The names of VLs will always be visible to everybody.
2) IIRC you dont need write access to sync books, but I could be misremembering. 3) Something worth doing, I think. Open a ticket for it so I dont forget. |
01-17-2018, 09:36 PM | #30 | |
Fanatic
Posts: 516
Karma: 32106
Join Date: Feb 2012
Device: Onyx Boox Leaf
|
Quote:
I installed this free Webview app in my phone, and configured it to open the content server. Http auth must be in 'basic' mode. That's it. It feels like Lithium with all the added features (user style sheet, last reading position etc.). Download button doesn't work though, but I don't mind that and it is easy to switch back to browser (Chrome) for that. Changing the app icon makes it look like a dedicated Calibre reader on Android. Last edited by nqk; 01-17-2018 at 11:58 PM. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
What is K3 Sans Serif font? | lkkmaths | Amazon Kindle | 0 | 04-27-2011 07:03 AM |
Serif font for JBL | demingite | Ectaco jetBook | 3 | 12-13-2010 09:41 PM |
how to get a serif font to work in an epub | Ray Tayek | Calibre | 3 | 11-29-2010 05:36 PM |
What is the K3 default sans serif font? | jswinden | Amazon Kindle | 4 | 09-20-2010 11:59 AM |
Do you prefer the Reader's serif or its sans serif font? (poll) | Alexander Turcic | Sony Reader | 9 | 11-25-2006 12:15 PM |