|
|
View Full Version : ePub with external font
DairyKnight 10-13-2008, 04:11 AM Inspired by thawk from hi-pda forum, I found we could actually link *any* font from an epub file. :cool:
Just put the following script:
@font-face {
font-family: "Freestyle Script";
src:url(res:///Data/FONT/FREESCPT.TTF);
}
in the CSS and put your font at FONT/FREESCPT.TTF of internal storage.
And actually it supports *any* unicode locale. (Fonts on MS is also possible.)
So no more font embedding. There's no 'Formatting' for ePub and it turns much faster than PDFs.
Valloric 10-13-2008, 06:53 AM Inspired by thawk from hi-pda forum, I found we could actually link *any* font from an epub file. :cool:
Just put the following script:
@font-face {
font-family: "Freestyle Script";
src:url(res:///Data/FONT/FREESCPT.TTF);
}
in the CSS and put your font at FONT/FREESCPT.TTF of internal storage.
And actually it supports *any* unicode locale. (Fonts on MS is also possible.)
So no more font embedding. There's no 'Formatting' for ePub and it turns much faster than PDFs.
This is nice. Thanks for the information.
murraypaul 10-14-2008, 08:45 AM Has anyone got this working?
I've converted a plain text file using any2epb and editted the content\resources\index_0.css file to add:
@font-face {
font-family: "Monotype Corsiva";
src:url(res:///DATA/FONT/MTCORSVA.TTF);
}
I've created DATA\FONT and FONT in the root of the internal memory and copied the font file into both.
But when I recopy and open the book there is no change from the original version. I know the css file is being used, as if I add:
body
{
font-size: 24;
}
Then the text size changes.
I've tried several different fonts.
Any ideas what I'm doing wrong?
llasram 10-14-2008, 11:06 AM src:url(res:///DATA/FONT/MTCORSVA.TTF);
Any ideas what I'm doing wrong?
Capitalization is relevant . The Reader-internal path is "Data", with just the initial 'D' capitalized. Then created just 'FONT' in the Reader-internal memory and put your font-file there.
But only up through the 'Data' part. It's complicated.
murraypaul 10-15-2008, 05:36 AM Capitalization is relevant . The Reader-internal path is "Data", with just the initial 'D' capitalized. Then created just 'FONT' in the Reader-internal memory and put your font-file there.
But only up through the 'Data' part. It's complicated.
Thanks. That (plus realising I hadn't properly understood what the CSS needed to do) has fixed the problem.
This is pretty impressive, it seems like it might be slightly slower paging forward several pages in a go than LRF or and ePub without a font specified, but it is hard create a fair comparison because there is now a different amount of text on the page.
I hadn't realised how much faster ePub was to open and change text size than LRF either, not having to recalculate the number of pages makes a huge difference, from 10 seconds to open to 1, from 22 seconds to change font size to around 6.
astra 10-15-2008, 06:09 AM I hadn't realised how much faster ePub was to open and change text size than LRF either, not having to recalculate the number of pages makes a huge difference, from 10 seconds to open to 1, from 22 seconds to change font size to around 6.
[assuming you don't use embedded fonts]I believe that you still have not realised of how to upload LRF files to your reader properly :)
You have to use eBook Library software to upload LRF files to your reader. Then change of text size takes 1 second. Open any LRF book takes 1-2 seconds as well, if you use eBook Library software to upload the files.
murraypaul 10-15-2008, 08:31 AM [assuming you don't use embedded fonts]I believe that you still have not realised of how to upload LRF files to your reader properly :)
You have to use eBook Library software to upload LRF files to your reader. Then change of text size takes 1 second. Open any LRF book takes 1-2 seconds as well, if you use eBook Library software to upload the files.
I use Calibre, the eBook Library software is unusable if you want to manage large numbers of books in collections, as you have to assign each one manually. I've also had large LRF files (1000+ pages) that when added through eBook Library wouldn't open on the reader at all (Invalid Page error), but would open if added from Calibre and paginated on the reader.
murraypaul 10-15-2008, 09:54 AM Inspired by thawk from hi-pda forum, I found we could actually link *any* font from an epub file. :cool:
Just put the following script:
@font-face {
font-family: "Freestyle Script";
src:url(res:///Data/FONT/FREESCPT.TTF);
}
in the CSS and put your font at FONT/FREESCPT.TTF of internal storage.
And actually it supports *any* unicode locale. (Fonts on MS is also possible.)
So no more font embedding. There's no 'Formatting' for ePub and it turns much faster than PDFs.
Thinking about it, you could just have all your books refer to //Data/FONT/default.ttf, can then you could easily change the font globally without any concern about replacing the builtin fonts.
Xenophon 10-15-2008, 11:30 AM [assuming you don't use embedded fonts]I believe that you still have not realised of how to upload LRF files to your reader properly :)
You have to use eBook Library software to upload LRF files to your reader. Then change of text size takes 1 second. Open any LRF book takes 1-2 seconds as well, if you use eBook Library software to upload the files.
Unless, of course, you use a Mac. Or Linux. Or just don't trust Sony's software on your PC (remember root-kits?). Or...
Seriously, your 'proper' is utterly unavailable to me. I refuse to install Windows on my Mac just to run Sony's eBook Library software.
Xenophon
astra 10-16-2008, 09:48 AM Unless, of course, you use a Mac. Or Linux. Or just don't trust Sony's software on your PC (remember root-kits?). Or...
Seriously, your 'proper' is utterly unavailable to me. I refuse to install Windows on my Mac just to run Sony's eBook Library software.
Xenophon
I fully appreaciate your situation and has nothing against, however,
I hadn't realised how much faster ePub was to open and change text size than LRF either, not having to recalculate the number of pages makes a huge difference, from 10 seconds to open to 1, from 22 seconds to change font size to around 6.
Makes it sound as if epub is a lot faster than lrf.
My point is that lrf is as fast or faster than epub. If you or anyone else refuse to use sony software, it is not Sony reader or LRF fault. They operate just fine. If for some reason it takes so long to open lrf vs. epub it is a user error.
Hadrien 10-16-2008, 09:59 AM My point is that lrf is as fast or faster than epub. If you or anyone else refuse to use sony software, it is not Sony reader or LRF fault. They operate just fine. If for some reason it takes so long to open lrf vs. epub it is a user error.
Wrong. In LRF case, you need to pre-process the file to get any sort of decent speed, so I guess that they cache the different sizes somewhere. This is not suitable for any file format where the user could select a different font family or size.
And if you're not using Windows, it's not "refusing to use sony software": you don't have much of a choice.
astra 10-16-2008, 10:04 AM 1. Wrong. In LRF case, you need to pre-process the file to get any sort of decent speed, so I guess that they cache the different sizes somewhere. This is not suitable for any file format where the user could select a different font family or size.
2. And if you're not using Windows, it's not "refusing to use sony software": you don't have much of a choice.
re: 1
We are not talking about customizing ebook to every whim of any user out there. We are talking about a given gadget with given specifications and features. As long as you use one as you should, it has no speed issues.
re: 2
Just because someone doesn't use Windows, it doesn't make LRF any slower/faster. It is a personal choice.
Valloric 10-16-2008, 10:24 AM As long as you use one as you should, it has no speed issues.
Excuse me if I don't agree with your or Sony's view on how I should use my device.
astra 10-16-2008, 10:32 AM Excuse me if I don't agree with your or Sony's view on how I should use my device.
When you make a decision of purchasing something, you read all the specifications/features/system requirements for the device. The manufacturer promises that it will work properly as long as you follow the instructions.
When you know that you cannot use it as a manufacturer advices you to do and you still buy it, then it is your responsibility to avoid problems and if something doesn't work as it should it is again your personal error/problem/issue.
When you buy Sony Reader you accept that it will work as they promise only if you use eBook Library or else you might encounter problems and you are doing it on your own risk.
astra 10-16-2008, 10:47 AM I believe it is similar to:
When you pass job interview and accept terms and conditions and being empyed to do the job, you cannot come to your boss in a few days and say: my salary is too low and I don't like doing this particular bit. He will tell you that you agreed of your own volition to do the job and perform up to certain standards and to be paid a specific salary.
If you agreed that you have to start your job at 6 am and you signed the contract, you cannot demand alter it and start at 10 am.
Sony Reader is designed in such a way that you can use LRF file with certain fonts and if they are uploaded with eBook Library the paginating is done by the powerful software+pc vs. small and weak reader :)
When you are trying to do something different and get issues with LRF speed, it is not LRF's fault. It is your fault that you do not follow the agreement you have made when you bought the gadget including special software as you were well aware you should do when you paid the money.
If you agreed to pay money for a gadget with optimal performance under Windows OS, you cannot now say epub is a lot faster than LRF because it is not.
P.S. btw., it is nothing personal. And I do not work for Sony :) I am only saying that epub is no faster than LRF :p
pilotbob 10-16-2008, 10:53 AM Excuse me if I don't agree with your or Sony's view on how I should use my device.
You are certainly entitled to that. But, also you can't complain if you try to do something outside of the designed and built in firmware. I doubt Sony cares if you hack it... but don't come crying to them for support and fix if that causes you trouble.
BOb
Valloric 10-16-2008, 11:41 AM You are certainly entitled to that. But, also you can't complain if you try to do something outside of the designed and built in firmware. I doubt Sony cares if you hack it... but don't come crying to them for support and fix if that causes you trouble.
There seems to be some sort of a misunderstanding here. I never said I thought LRF was slower than EPUB. To me, LRF is perfectly fine.
With regards to hacking, I never said I expected Sony to support my or anyone else's modifications to the Reader, or other possible undocumented uses. Anyone using the Reader outside of it's prescribed parameters is on their own, and I'm fairly sure everyone knows that. Let's not be naive.
All I wanted to say--and I agree I should have been more specific--is that what I do with my own device is my own decision. Sony or anyone else can't tell me what I can or can not do with it. I payed for it, it's mine. If I want to completely rewrite its firmware, I have the complete right to do so.
Having said all that, I never intended to use Sony's Library software. I have it installed to check the edits to books I convert to LRF with Book Designer, because it is the only app that has faithful reproduction of what the LRF file will look like on the Reader. I use calibre for ebook transfers, have changed my default fonts, use a wide variety of firmware hacks etc... if something breaks because of any of my modifications, I won't be "crying to Sony".
DaleDe 10-16-2008, 01:20 PM re: 2
Just because someone doesn't use Windows, it doesn't make LRF any slower/faster. It is a personal choice.
It is not windows that causes the difference but the Sony library software. In LRF files there is some metadata that contains the page boundaries and number of pages to the document. This permits jumping reliably to a particular page and knowing the full page count. If the book is download via the Sony library software it presets all the possible font sizes with the appropriate data. Othewise this is done by the reader itself the first time it opens the file or the user changes the font size. This is a one time hit for the document and really slows down the opening of the file but not any subsequent reading of the file. This one time hit is what people are complaining about.
Dale
astra 10-16-2008, 02:08 PM It is not windows that causes the difference but the Sony library software. In LRF files there is some metadata that contains the page boundaries and number of pages to the document. This permits jumping reliably to a particular page and knowing the full page count. If the book is download via the Sony library software it presets all the possible font sizes with the appropriate data. Othewise this is done by the reader itself the first time it opens the file or the user changes the font size. This is a one time hit for the document and really slows down the opening of the file but not any subsequent reading of the file. This one time hit is what people are complaining about.
Dale
I know. Well in general. Didn't know the exact details of what it does and why it helps. Thanks for clarification/
murraypaul 10-17-2008, 04:58 AM I seem to have inadvertently stirred up a storm here.
Perhaps I could say that for people using Calibre to upload books to the 505, rather than the Sony Library software, they might want to consider switching to ePub to see increased speed of opening books and changing font sizes.
Valloric 10-17-2008, 08:16 AM I seem to have inadvertently stirred up a storm here.
Don't worry about it, this happens all the time. :)
Hadrien 10-17-2008, 08:19 AM re: 1
We are not talking about customizing ebook to every whim of any user out there. We are talking about a given gadget with given specifications and features. As long as you use one as you should, it has no speed issues.
I wouldn't call a font size selection with more than 3 sizes "every whim of any user".
Part of the reason why Sony decided to use 3 different font sizes in the first place (and extended this limit to ePub, which is absurd) is based on the way LRF works.
astra 10-17-2008, 08:30 AM Don't worry about it, this happens all the time. :)
True.
And we learn something new as well :)
Hadrien
Well, when I used to read hard back editions of printed books I had zero choice. Now I have 3 different sizes and 3 different fonts (although I use only 2 fonts). I believe it is more than enough (at least for me on ebook reader). Then again, if someone disagrees with it they just should not buy Sony Reader and opt to something else. Thanks industrial progress, we have quite a few out there :)
Does prs-700 has more fonts/sizes? I think it has a bit more, hasn't it?
Hadrien 10-17-2008, 09:14 AM Does prs-700 has more fonts/sizes? I think it has a bit more, hasn't it?
It has five, guess that Sony realized that 3 is not enough.
astra 10-17-2008, 09:19 AM It has five, guess that Sony realized that 3 is not enough.
5 fonts or sizes?
Hadrien 10-17-2008, 09:44 AM 5 fonts or sizes?
Sizes.
Valloric 10-17-2008, 10:33 AM Now I have 3 different sizes and 3 different fonts (although I use only 2 fonts). I believe it is more than enough (at least for me on ebook reader).
"No one will need more than 637 kb of memory for a personal computer." -- Bill Gates, early 1970s.
We want more.
pilotbob 10-17-2008, 01:52 PM "No one will need more than 637 kb of memory for a personal computer." -- Bill Gates, early 1970s.
We want more.
He never said that. It is a myth.
BOb
Valloric 10-17-2008, 02:18 PM He never said that. It is a myth.
Really? Huh...
But that's not the point. The point is we shouldn't stop at a certain level just because it's "OK". "If it ain't broken, don't fix it" does not hold. Three font sizes is OK, five font sizes is better. The PRS-505 the way it is suits my reading habits perfectly, but the PRS-700 will suit them even better with the front light, annotation, and most of all, search functions (I'm guessing and hoping; it has an on-screen keyboard).
Point being, some of us want more. And yes, sometimes it's just because we can, not because we desperately need it.
murraypaul 10-17-2008, 04:32 PM Perhaps I could say that for people using Calibre to upload books to the 505, rather than the Sony Library software, they might want to consider switching to ePub to see increased speed of opening books and changing font sizes.
And actually, having played with it further, it isn't as positive as this after all.
Basically, when you take an action (open, change font) on an LRF file, the Reader calculates page numbers for the entire file, and caches the result. So it takes a long, constant (for a file) time the first time you do it, but is quick after that.
It seems that with an ePub file, when you take an action, it recalculates pages only up to the page you are currently on, and does not cache the result. So opening to page 1 is very quick, as is changing fonts on page 1. However, jumping to the middle of the book takes time, and it takes that time each time you reopen the book and continue reading at that point. Similarly, changing font sizes gets progressively slower as you go through the book.
If you are going to read a book straight through without switching to something else, epub will probably be faster, but if you are switching back and forth, or syncing to the PC often, it may end up slower overall.
Hi all, I am new to the forums and new to using the PRS 505. Forgive me for asking the newb qustion, how do I access the internal memory of my reader to add the font that I want to reference in my CSS? Can I put more than one font there. Any help would be appreciated, thanks.
Hari.
dordale 08-20-2009, 06:44 PM hari--
See Zelda Pinwheel's excellent step-by-step instructions posted here:
http://www.mobileread.com/forums/showpost.php?p=389066&postcount=18
dordale :)
Thank you dordale, thats what I needed.
:DHari
vidgej 02-10-2010, 05:06 PM Capitalization is relevant . The Reader-internal path is "Data", with just the initial 'D' capitalized. Then created just 'FONT' in the Reader-internal memory and put your font-file there.
But only up through the 'Data' part. It's complicated.
I did exactly what is told in this thread but it didn't seem to work. help. :help:
dwanthny 02-22-2010, 01:31 AM I did exactly what is told in this thread but it didn't seem to work. help. :help:
What Sony reader do you have?
|