12-30-2011, 05:35 AM | #256 | |
Enthusiast
Posts: 25
Karma: 10
Join Date: Dec 2011
Device: Nook 1st Edition
|
Quote:
I see my situation like this: I have been trying to solve an equation with 3 unknowns. To be able to sort it out, all these 3 unknowns should be identified correctly. The unknows I am facing are: 1- Whether the font I try to use includes all Turkish characters correctly. I currently try to use LiberationSerif as it is the one suggested in many blogs. 2- Whether the folder in which this font is located are correctly referred to for my Nook within @font-face declaration, i.e. the blue bits in your post. 3- Whether Calibre correctly converts epub to epub as it was expected to. I understand it does not "Override Css" but puts an "Extra Css" as was named under the "Look & Feel" menu in the latest version of Calibre I have been using, namely 0.8.32. From this different menu item naming, I tend to think that, before Calibre was just overriding the stylesheet.css but now it just adds it by renaming it to stylesheet1.css. But I wonder where the stylesheet.css file then... I realize my long-awaited success will not only be when I correctly resolve each of these 3 unknowns - for each of which there are dozens of alternatives to try; but also I implement only the correct alternatives at once. Perhaps I finally and unwittingly figured out the second unknown correctly but all others were not right when I gave it a try, which eventually led to a failing epub full of ? marks instead of Turkish letters. Frankly speaking I have tried almost all combinations and I am almost about to give up... I cannot tell you enough since when and how many days I have spent so far for a permanent solution. As a last attempt I would like to summarize what I have done so far, despite the fact that I realize this is a thread for Sony readers only, not for Nook; however, I do hope you guys would allow me here as I see many expert comments on this thread relevant to my problem as it is mainly an epub/font/css/Calibre issue: 1- "The font" with Turkish Character set: As per a suggestion in one of the blogs I have read, I first used the LiberationSerif font available in the Calibre2\resources\fonts folder, even though I still don't get the logic behind it. Does this font have a built-in and guaranteed Turkish char set inside? Trials, trials, and later I downloaded the very same font from a website specialized on fonts, which also allowed me for a "test-drive" to be able to check whether the chars I am interested in are displayed correctly. Trials, trials And finally I just used the LiberationSerif set I came across inside one of those rare epubs with which my Nook worked correctly. There were this LiberationSerif set embedded inside the epub and I just copied them to "my fonts" folder in my Nook. I don't know if I could do anything furhter to make sure that the font set is correct. How can I see if a font I am interested in contain all the Turkish characters correctly? I suspect some fonts are already installed in my Windows 7 and therefore they are displayed correctly in W7, but not in Nook, which misleads me a great deal, I think. I use W7 in English, could it be the reason? 2-"Syntax" for referring to "my fonts" folder in @font-face: My Nook shows the location of epub files as: Code:
nook/my documents/[writer's name]/[book name.epub] Code:
src: url(res://../../fonts/LiberationSerif-Italic.ttf); If this syntax is succesful, it would just give me one less issue to worry about. 3- Calibre "epub to epub" conversion: The epub file which perfectly displays the long-sought-for Turkish characters have a stylesheet.css file and is perfectly a match for what was suggested earlier in posts #9 and #18 and is attached below - the second line is quite long and goes to the right: Code:
@namespace h "http://www.w3.org/1999/xhtml"; @font-face {font-style: italic;font-family: 'Liberation', serif, sans-serif;font-weight: normal;src: url(LiberationSerif-Italic.ttf);}@font-face {font-style: normal;font-family: 'Liberation', serif, sans-serif;font-weight: normal;src: url(LiberationSerif-Regular.ttf);}@font-face {font-style: italic;font-family: 'Liberation', serif, sans-serif;font-weight: bold;src: url(LiberationSerif-BoldItalic.ttf);}@font-face {font-style: normal;font-family: 'Liberation', serif, sans-serif;font-weight: bold;src: url(LiberationSerif-Bold.ttf);}.calibre { display: block; font-size: 1em; margin-bottom: 0; margin-left: 5pt; margin-right: 5pt; margin-top: 0; padding-left: 0; padding-right: 0; page-break-before: always } .calibre1 { display: block; font-family: Arial, sans-serif; font-size: 1em; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 0; text-indent: 0 } .calibre2 { font-weight: bolder } .t { font-size: 1.66667em } .t1 { font-size: 1em } Code:
@namespace h "http://www.w3.org/1999/xhtml"; .calibre { display: block; font-family: "LiberationSerif", serif; font-size: 1em; line-height: 1.2; margin-bottom: 0; margin-left: 5pt; margin-right: 5pt; margin-top: 0; padding-left: 0; padding-right: 0 } .calibre1 { display: block; margin-bottom: 1em; margin-left: 0; margin-right: 0; margin-top: 1em } Having seen this and considered it as an incorrect content for the css file, I decided to manually update the stylesheet.css with the @font-face statement that I believe should be working as stated below and added as the second line: Code:
@namespace h "http://www.w3.org/1999/xhtml"; @font-face { font-style: italic; font-family: 'LiberationSerif', serif, sans-serif; font-weight: normal; src: url(res://../../fonts/LiberationSerif-Italic.ttf); } @font-face { font-style: normal; font-family: 'LiberationSerif', serif, sans-serif; font-weight: normal; src: url(res://../../fonts/LiberationSerif-Regular.ttf); } @font-face { font-style: italic; font-family: 'LiberationSerif', serif, sans-serif; font-weight: bold; src: url(res://../../fonts/LiberationSerif-BoldItalic.ttf); } @font-face { font-style: normal; font-family: 'LiberationSerif', serif, sans-serif; font-weight: bold; src: url(res://../../fonts/LiberationSerif-Bold.ttf); } body { margin-right: 8pt; font-family: 'LiberationSerif', serif; } .calibre { display: block; font-size: 1em; margin-bottom: 0; margin-left: 5pt; margin-right: 5pt; margin-top: 0; padding-left: 0; padding-right: 0; page-break-before: always } .calibre1 { display: block; margin-bottom: 1em; margin-left: 0; margin-right: 0; margin-top: 1em } Thinking now, perhaps what you have said Jackie_W is right, perhaps Calibre is just working fine but I ruin the overall file integrity by manually manipulating stylesheet.css with this version of Calibre I have. Because, as you reasoned I checked out the index.html file and all LiberationSerif font statements were there. This brings my mind another question for proper referencing to the fonts folder: What is the correct file now for relative referencing: the html files or stylesheet.css? This might be an issue if these two files are located under different folders within the epub; if not, just forget it. But I recall an epub file inside of which there were several html files split probably because of size limitation and Calibre's option for files larger than 260K. These files were, if I am not wrong, were located under another folder. If this is the case the above question of mine still applies. As you see guys, I feel I am at the end of my adventure with my Nook. And my success is totally depend on fixing each of 3 unknowns and utilizing them in one lucky try. Could you guys give a hand of what items are we certain, what not. This could help me narrow down my trials and reach a final, permanent and long-awaited solution. Many thanks in advance. Kadir |
|
12-30-2011, 07:58 AM | #257 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
@kado,
I suspect it is item 2 which is your main problem. I don't have a Nook so I can't really help you get to the bottom of that. Have you tried the Nook subforum? Surely, there must be many people there with the right experience. I can help you eliminate problems with items 1 and 3. If you attach a TXT file saved in UTF-8 encoding which contains all the Turkish chars you want to check. I can create an epub with Calibre which will work on my Sonys and post a screencap for you to check. If it looks OK, that will confirm that Liberation is OK and that Calibre will put the @font-faces somewhere that an ereader can use them. The only thing then missing is the magic Nook url locations. There is another way you can eliminate problem 2 altogether and that is to 'fully embed' the Liberation font files inside each epub. I think the perfect Turkish epubs you referred to were using that method. Calibre is not a great deal of help with this method so your task is a bit more manual but not difficult. I recently wrote a post outlining how to do this for Sony PRST1 users when we thought this was the only way we were going to get custom fonts to work on our shiny new readers (since then the magic PRST1 url location has been discovered so full embedding is no longer required for T1 owners). I am fairly confident this will work for you (as long as we confirm a good Turkish font). Here's the link. It is referencing Gentium fonts to read in Vietnamese but much of the info is general. If you have trouble with the details feel free to ask. If you do post the Turkish text I will also create and post a fully embedded Liberation epub for you so you've got a sample to examine closely. In the meantime, I wrote another post a few months ago giving a general overview of 3 different ways to customise fonts. It is not specific to any ereader brand but it may provide some background for you. Last edited by jackie_w; 12-30-2011 at 08:50 AM. Reason: added another link |
Advert | |
|
12-30-2011, 03:27 PM | #258 |
Enthusiast
Posts: 25
Karma: 10
Join Date: Dec 2011
Device: Nook 1st Edition
|
Hi Jackie_W,
Many thanks for your kind return and support. Yes, as soon as I finished my post at this Sony-specific thread, I immediately initiated a new thread under Nook subforum here, with a direct link to this thread in order to avoid double effort and identical threads. Currently I am waiting for Nook experts' return on my issues, especially for the issue no 2. As requested, I attach all the problematic Turkish fonts in a txt document. I also attach a screenshot of the fonts so that you could yourself see if they are displayed correctly and get a hint of what we are speaking about. Besides, if you see those letters correctly with any of your fonts, this would mean that in addition to LiberationSerif, that particular font of yours does also support Turkish. This would give me more alternative fonts to use in my Nook. Your support in resolving the issues 1 and 3 will therefore be truly and higly appreciated. Happy new year to everyone. |
12-30-2011, 05:40 PM | #259 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
@kado,
|
12-31-2011, 08:27 AM | #260 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
|
Advert | |
|
12-31-2011, 03:06 PM | #261 | |
Enthusiast
Posts: 25
Karma: 10
Join Date: Dec 2011
Device: Nook 1st Edition
|
Quote:
You won't believe but I came across that page a few hours ago. You are right - it quite looks like what I am missing, i.e. my second concern - reaching my LiberationSerif fonts with correct url string. It also suggests using built-in and hidden Droid fonts. I have just tried each and every alternatives offered here except softrooting and installing the plugin which is effectively the same thing. Guess what, still failing. I cannot tell you enough how I am disappointed. On this special day of the new year eve, look what I am spending my time with. Just two hours left to 2012. I came across several threads directing this page, which are older than 1.5 years. That might be my problem actually. My Nook firmware version is 1.7.0 not 1.5.0 and Calibre is the latest 0.8.32. I really started to think that these two are my current issues. You won't believe, now I am studying how to softroot my device and use ADB - Android Debug Bridge - to be able to see the inner structure of my Nook Classic. Enough is enough. Gosh! Where am I heading to? I myself want to see LiberationSerif in the hidden maze of my Nook with my own eyes or the Droid fonts, which I highly suspect that they do not exist there. There cannot be any other explanation to my failure. If it goes like that, it will mean that in 2012 I will spend all my year with hacking, rooting, debugging some electronic devices, Nook, iPhones, iPads... Thanks for your continuous support. This means a lot to me. |
|
12-31-2011, 04:19 PM | #262 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
That Nook webpage seems quite specific.
P.S. Did the fully embedded epub work on your reader? |
12-31-2011, 05:15 PM | #263 |
Enthusiast
Posts: 25
Karma: 10
Join Date: Dec 2011
Device: Nook 1st Edition
|
Certainly, I was at first quite puzzled with the quotes, sometimes without, sometimes with double quotes. I have tried the exact string. LiberationSerif fonts are copied under "my fonts" as suggested, so the url string should work out correctly.
What I am trying to convert is the attached txt file and the resultant epub is also attached. In the epub, the famous url statement is not in sheetstyle.css but in index.html as we discussed before. There is just a reference to LiberationSerif family in sheetstyle.css rather than the whole Extra CSS block which is: Code:
@font-face { font-style: italic; font-family: 'LiberationSerif', serif, sans-serif; font-weight: normal; src: url('res:///system/media/sdcard/my fonts/LiberationSerif-Italic.ttf'); } @font-face { font-style: normal; font-family: 'LiberationSerif', serif, sans-serif; font-weight: normal; src: url('res:///system/media/sdcard/my fonts/LiberationSerif-Regular.ttf'); } @font-face { font-style: italic; font-family: 'LiberationSerif', serif, sans-serif; font-weight: bold; src: url('res:///system/media/sdcard/my fonts/LiberationSerif-BoldItalic.ttf'); } @font-face { font-style: normal; font-family: 'LiberationSerif', serif, sans-serif; font-weight: bold; src: url('res:///system/media/sdcard/my fonts/LiberationSerif-Bold.ttf'); } body { margin-right: 8pt; font-family: 'LiberationSerif', serif; } If the fonts are correct, if the url string is fine, then I started to think that I am falling victim to Calibre conversion. Really don't know what else to think after all my trials and all those solid and confident suggestions by Nook experts... Another possibility is the firmware difference as I mentioned before. I have a question: When you generate your epub - the one you sent me through, am I right to think that you yourself didn't insert those LiberationSerif fonts inside the epub container, nor the stylesheet.css which I expect it was created by Calibre? What I expect after my conversion is the very same epub but without fonts embedded in the epub. It is 2012 here in Turkey for 8 minutes now. |
12-31-2011, 07:20 PM | #264 |
Enthusiast
Posts: 25
Karma: 10
Join Date: Dec 2011
Device: Nook 1st Edition
|
I just sent out a PM to Kovid -the creator of Calibre, to find out what he thinks of my issue with my Nook Classic and Calibre.
To my surprise I could find in this forum the genius behind that beautiful program ... I didn't miss that opportunity to get acquainted with him... Last edited by kado; 12-31-2011 at 07:46 PM. |
12-31-2011, 07:58 PM | #265 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
@kado,
As our conversation is off-topic for this thread I'm going to continue as a PM. |
12-31-2011, 08:13 PM | #266 |
Enthusiast
Posts: 25
Karma: 10
Join Date: Dec 2011
Device: Nook 1st Edition
|
I still believe our discussion is applicable to this thread as I am switching to Sony from Nook if all this does not work out properly...
Last edited by kado; 01-01-2012 at 08:32 AM. |
12-31-2011, 08:46 PM | #267 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Well then, you'll be delighted to hear that the Sony PRS-T1 contains at least 6 built-in fonts which display Turkish characters OK
|
12-31-2011, 09:28 PM | #268 | |
Enthusiast
Posts: 25
Karma: 10
Join Date: Dec 2011
Device: Nook 1st Edition
|
Quote:
Well I think you are now the most unwelcome person for Sony as you have just saved my Nook's going to wastebin and ruin Sony's hope to sell one more Sony unit to me as I am proceeding now with my Nook. Well, this is my mom's, I will consider a Sony for myself, I promise Yes guys, if anyone follows my threads in many blogs up to this point, my issue has been cleverly resolved by this gentlemen, jackie_w... I truly owe him a lot. My problem turned out to be lack of a proper codepage utilisation. When I choose cp1254 for Turkish (jackie_w says it is cp1252 for English windows users) everthing worked out perfectly. cp1254 should be chosen in Calibre under Common Options/Look and Feel/Input Character Encoding. As part of the solution the ExtraCSS block in Calibre also turned out to be: Code:
@font-face { font-style: italic; font-family: 'LiberationSerif', serif, sans-serif; font-weight: normal; src: url('res:///system/media/sdcard/my fonts/LiberationSerif-Italic.ttf'); } @font-face { font-style: normal; font-family: 'LiberationSerif', serif, sans-serif; font-weight: normal; src: url('res:///system/media/sdcard/my fonts/LiberationSerif-Regular.ttf'); } @font-face { font-style: italic; font-family: 'LiberationSerif', serif, sans-serif; font-weight: bold; src: url('res:///system/media/sdcard/my fonts/LiberationSerif-BoldItalic.ttf'); } @font-face { font-style: normal; font-family: 'LiberationSerif', serif, sans-serif; font-weight: bold; src: url('res:///system/media/sdcard/my fonts/LiberationSerif-Bold.ttf'); } body { margin-right: 8pt; font-family: 'LiberationSerif', serif; } Many thanks again Jackie_W! |
|
01-01-2012, 08:03 AM | #269 | |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
Serif Amasis Sans-serifPalatino Nova Really No2 Frutiger Neue You can also access the internal Droid serif and sans-serif fonts, but not from a simple menu.Univers Next Verdana Charis SIL (serif only), DejaVu (serif, sans, mono) and Droid (serif, sans, mono) fonts are all freely available and are worth a try. I'm not sure just knowing the font names is enough. For instance, the PRST1's version of Amasis font does show Turkish chars but the NookSTR's version of Amasis does not. Even though I don't own a Nook, I managed to get hold of the NookSTR's built-in fonts to test by downloading the latest Nook upgrade file and unzipping it on the PC to extract the fonts directory. Nook Malabar and Ysobel serif fonts show Turkish fonts OK. |
|
01-01-2012, 08:24 AM | #270 |
Enthusiast
Posts: 25
Karma: 10
Join Date: Dec 2011
Device: Nook 1st Edition
|
Wow! Level of your support and guidance is more than I deserve Jackie.
And my depest apologies for omitting the obvious re your nick... With 3108490 karma points divided by circa 2 per your assistance you have rendered so far means it is more than 150000 life saving help cases from you to the people who are lost like myself. Being a lady and with such an angel rank, I wonder how many marriage offers you have received so far. Many many many thanks again. Last edited by kado; 01-01-2012 at 08:29 AM. |
Tags |
epub, fonts |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Any Reader With Custom Fonts and Full Justification? | Loose_Appeal | Which one should I buy? | 2 | 07-16-2010 07:16 AM |
ePub with custom .css on a 505 | dicknskip | Sony Reader Dev Corner | 3 | 06-09-2010 11:34 PM |
Custom TTF fonts in MOBI books? | jpt | Astak EZReader | 21 | 11-21-2009 08:24 AM |
Test for custom entities in ePUB | Jellby | ePub | 9 | 05-27-2009 06:45 AM |