04-15-2014, 01:04 PM | #16 |
Wizard
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
∃, ∀, ∧, ∨, ¬, are all present in Kobo's built-in Ryumin and Gothic fonts.
However in general I think embedding a subset of a font with all the symbols you need is the right way to go. And for mathematics, rather than just using individual symbols from the embedded font, I would put the whole expression including numerals and variables in the embedded font, because some standard fonts (e.g. Georgia) have lower-case style numerals that look bad in mathematical expressions, or the user might have cranked the font weight up so high that it is hard to distinguish regular from bold variables, etc. Edit: You might like to look at the STIX fonts: http://www.ctan.org/pkg/stix for either embedding in epubs or sideloading to your Kobo. Last edited by GeoffR; 04-15-2014 at 01:30 PM. Reason: Add link to STIX fonts |
04-16-2014, 10:20 AM | #17 |
Connoisseur
Posts: 54
Karma: 10
Join Date: Mar 2014
Device: none
|
Thanks for the comments and for suggesting the Stix font, which is very nice, and complete for mathematics.
To sum up I downloaded the font here: http://www.ctan.org/pkg/stix) Then I created a trimmed version (stix-regular-webfont.ttf) with only the symbols I need plus English here: http://www.fontsquirrel.com/tools/webfont-generator This reduces the size a lot. For mathematical symbols and formulas, I've specified the following in my CSS: Code:
@font-face { font-family: 'StixRegular'; src: url('../Fonts/stix-regular-webfont.ttf'); } .maths { font-family: 'StixRegular'; } Code:
<span class="maths">∧∨∃∀→↔≡≤<¬σ∪</span> PS: Alternatively, I could have specified, in the CSS, that the entire text should be in StixRegular. But this would presumably give readers "less freedom" to change fonts on their reader: using a specific font on a reader, say Georgia, might make it impossible to see some mathematical characters not contained in Georgia. Last edited by 8140david; 04-16-2014 at 10:26 AM. |
Advert | |
|
04-16-2014, 11:33 AM | #18 | |
Pain in the arse
Posts: 758
Karma: 77856
Join Date: Apr 2013
Device: Kobo Aura One, Kindle 4
|
Quote:
@8140david: sorry for the suggestion of DejaVu. Since it's a popular unicode font I wrongly supposed it has also all math symbols. Unfortunately math will be never popular. |
|
04-16-2014, 12:34 PM | #19 |
Connoisseur
Posts: 54
Karma: 10
Join Date: Mar 2014
Device: none
|
By the way, I just noticed that Sigil offers reports about the epub.
Among them, one is "Characters in the files"; in my case: Code:
!"#&'()*+,-./0123456789:;<=>?ABCDEFGHIJKLMNOPQRSTUVWXYZ[]abcdefghijklmnopqrstuvwxyz~*§¬°ÀÇÉÊàâäçèéêëîïôöùûüœσ—‘’…→↔↵∀∃∧∨∪≡≤ |
04-16-2014, 01:12 PM | #20 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Another option if you also happen to be a calibre user, the calibre epub/azw3 Editor has an option to subset any embedded fonts (i.e. auto-remove unused characters). The same option is also included in the calibre Polish feature (that's Polish as in "shine" not Polish the language BTW) if you want to font subset many epub/azw3 books in one go.
|
Advert | |
|
04-16-2014, 01:22 PM | #21 |
Pain in the arse
Posts: 758
Karma: 77856
Join Date: Apr 2013
Device: Kobo Aura One, Kindle 4
|
An idea: I think a Calibre plugin could extract fonts in documents you have on Kobo and install them on the device. This way you'll save space without trimming fonts.
|
04-16-2014, 01:36 PM | #22 |
Grand Sorcerer
Posts: 12,228
Karma: 74000000
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
|
One MAJOR problem with the extracting of fonts and installing them would be if the font was subsetted, then installation of it would probably not have the desired effect for other books.
|
04-16-2014, 02:03 PM | #23 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
You don't need a calibre plugin to make your epubs access a font sideloaded into the Kobo's /fonts directory - instead of embedded into the actual epub. All that should be required is
Again FYI, if you're a calibre user, you can have the above css automatically added to epubs during the calibre/Kobo send-to-device process, leaving the calibre master epub unchanged. However, I think the OP wanted to embed the font so that it would be sure to work on any epub reading device/app not just the Kobo. |
04-16-2014, 02:49 PM | #24 |
Pain in the arse
Posts: 758
Karma: 77856
Join Date: Apr 2013
Device: Kobo Aura One, Kindle 4
|
Yes, this is the greatest problem. You could simply check the font file size, but it seems unreliable to me. A better approach is to compare supported chars. I think it could be done using fontforge py module.
|
04-16-2014, 02:53 PM | #25 | |
Pain in the arse
Posts: 758
Karma: 77856
Join Date: Apr 2013
Device: Kobo Aura One, Kindle 4
|
Quote:
EDIT: I didn't find that option in Calibre for now. Anyway, what I'm thinking about is not a simple CSS change, but also an automatic extraction and installation of fonts for the entire collection. Anyway, as you pointed out, this is slightly OT Last edited by Lucas Malor; 04-16-2014 at 03:22 PM. |
|
04-16-2014, 03:46 PM | #26 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
If you want to investigate further it's an option in the standard Kobo driver.
|
04-16-2014, 03:49 PM | #27 |
Zealot
Posts: 112
Karma: 100
Join Date: Aug 2011
Device: Touch, Aura
|
Another possibility I saw on my Kobo Touch (not sure it works on Aura as well but, why not?!). I've created a "fonts" folder in the root directory of Kobo (when connected through USB, obviously) the I've put the Unifont TTF file you can download from here http://unifoundry.com/pub/unifont-6....3.20140214.ttf and when reading books in Japanese language (before Rakuten and Japanese firmware), the firmware was able to automagically select such font for symbols that were unknown or unavailable in the font I was using for reading.
I still using this font (by selecting it through the menu) for novels and so on. Obviously technical books with programming languages and things like that are better with "default" one due to normal text, fixed width and so on. But still, Unifont is "the whole" human-readable character set... and it's also free as in GPL! So if you have symbols problems, take a look. NOTE: the font it's hugely huge (>10MB but contains glyphs for every printable code point in the Unicode 6.3 Basic Multilingual Plane (BMP). The BMP occupies the first 65,536 code points of the Unicode space, denoted as U+0000..U+FFFF.) |
04-16-2014, 09:31 PM | #28 | |
Connoisseur
Posts: 54
Karma: 10
Join Date: Mar 2014
Device: none
|
Thanks all for these interesting suggestions!
If I have problems reading some epub on my Kobo Aura, I'll try them. But concerning my particular issue for now, jackie_w is right: Quote:
Of course, as mentioned here and there, trimming is a good idea only when one is sure that the text of the epub is final (won't be modified). When one is not, it's safer to embed the entire font needed (or a sufficient large subset of it). Last edited by 8140david; 04-16-2014 at 09:48 PM. |
|
04-17-2014, 12:27 AM | #29 |
Wizard
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
I think a good way to do it is to embed the whole font, and select the embedded font at body level to make it the document default font (i.e. body {font-family: 'STIX'} ), and also select it for those special spans/paragraphs where you need the mathematical symbols.
This way if the reader chooses the "Document Default" font they see the whole book in the embedded font, but if they choose another font such as Georgia then they see the main text in Georgia but the special spans/paragraphs will still be in the embedded font. |
04-17-2014, 01:23 AM | #30 |
Connoisseur
Posts: 54
Karma: 10
Join Date: Mar 2014
Device: none
|
This makes sense, thanks.
I was toying with the idea but didn't want to trim 3 fonts (regular, bold, italic) on the website I was mentioning, as this is a rather slow operation. But doing it with Calibre is easy and very quick, so I've done it. And it works! I personnally prefer to use the Georgia font on my Kobo Aura. But it's also fine with the document default, in this case, Stix. So here are the current declarations concerning Stix in the css of the epub (I didn't need bold italic): Code:
@font-face { font-family: 'Stix'; font-weight: normal; font-style: normal; src: url('../Fonts/STIX-Regular.otf'); } @font-face { font-family: 'Stix'; font-weight: normal; font-style: italic; src: url('../Fonts/STIX-Italic.otf'); } @font-face { font-family: 'Stix'; font-weight: bold; font-style: normal; src: url('../Fonts/STIX-Bold.otf'); } body { font-family: 'Stix' } .maths { font-family: 'Stix'; } Last edited by 8140david; 04-17-2014 at 01:36 AM. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Aura HD Kobo Glo/Aura/Aura HD future firmware feature request thread | arspr | Kobo Reader | 25 | 03-26-2015 05:19 AM |
KOBO AURA HD vs the KOBO AURA and Paperwhite 1 | Josieb1 | Kobo Reader | 81 | 05-04-2014 01:52 PM |
Dymo tape fix for eBay Kobo Aura and Aura HD covers | RobertJSawyer | Kobo Reader | 2 | 02-10-2014 10:34 AM |
Canadian shoppers discount on kobo aura and aura hd | eejit | Deals and Resources (No Self-Promotion or Affiliate Links) | 4 | 11-28-2013 01:43 AM |
Conversion from azw (Kindle) to epub (Kobo) format with Calibre garbages symbols | myildi | Conversion | 2 | 09-13-2013 03:19 AM |