|
![]() |
|
Thread Tools | Search this Thread |
![]() |
#1 |
Zealot
![]() Posts: 133
Karma: 10
Join Date: Nov 2021
Device: Kobo Libra 2
|
How to force old-style figures ("text figures") in conversion to kepub?
Does anyone know whether it's possible, using the KoboTouchExtended plugin (or otherwise), to format all of the numerals so that they appear as properly typset text figures, rather than the more ugly lining figures?
In case anyone wonders: yes, I'm using a font that includes old-style figures. |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,095
Karma: 237627567
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
|
Is the original epub? Why not just read that, without converting?
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
Having said that, you shouldn't have to do anything. The built-in font Georgia has the old style numbers and they are used when numbers are used in the text. Most of the other built-in fonts use lining figures, and again, that is how numbers appear with these fonts. To user your font, either embed it in the book and select "Publisher Default" as the font. Or add the fonts to the device and select it. If the font you want to use does something else, then you would need to edit the book to match how it works. I can only think that would be if the font has both styles with one style in the "normal" place, and the other somewhere else. Then you would need to edit the book to change the numbers to use the other characters. |
|
![]() |
![]() |
![]() |
#4 | |||
Zealot
![]() Posts: 133
Karma: 10
Join Date: Nov 2021
Device: Kobo Libra 2
|
Quote:
Quote:
Quote:
|
|||
![]() |
![]() |
![]() |
#5 |
Zealot
![]() Posts: 133
Karma: 10
Join Date: Nov 2021
Device: Kobo Libra 2
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Running with scissors
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,581
Karma: 14328510
Join Date: Nov 2019
Device: none
|
In my standard stylesheet.css I use when redoing a Project Gutenberg book for the body tag I have
Code:
body { border: 0; font-feature-settings: "kern", "liga", "clig", "onum", "pnum"; font-kerning: normal; font-style: normal; font-variant: common-ligatures oldstyle-nums proportional-nums; hyphens: auto; margin: 0; padding: 0; text-rendering: optimizeLegibility; width: auto; } |
![]() |
![]() |
![]() |
#7 | |
Zealot
![]() Posts: 133
Karma: 10
Join Date: Nov 2021
Device: Kobo Libra 2
|
Quote:
|
|
![]() |
![]() |
![]() |
#8 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Any chance of posting a sample Word document to show the problem? That gives those who are interested a chance to try it and see what happens.
|
![]() |
![]() |
![]() |
#9 | |
Zealot
![]() Posts: 133
Karma: 10
Join Date: Nov 2021
Device: Kobo Libra 2
|
Quote:
When I send this to my device using KoboTouchExtended, most of the formatting shows up fine - including, for example, the small caps on the opening line and in "BC" (in a couple of places in the text). But all of the numerals revert to lining figures. (So, in "284 BC", in the final para., "BC" is set correctly, but "284" isn't.) A case like this is what made me notice the issue in the first place. Just to clarify: I've installed Minion Pro on the device - but the same issue can be seen using one of the fonts that comes with it, e.g. Malabar. Last edited by Liudprand; 11-26-2021 at 12:17 PM. Reason: To correct a typo. |
|
![]() |
![]() |
![]() |
#10 | |
Member
![]() Posts: 16
Karma: 10
Join Date: May 2018
Device: calibre
|
Quote:
This just just solved my issue as I want the lining numbers for legibility, so I'm removing "oldstyle-nums" in the CSS at the individual class level by adding "font-variant: common-ligatures proportional-nums;" and leaving it at the "body" level as "font-variant: common-ligatures oldstle-nums proportional-nums;." I quite honestly forgot I had this declared at the body level. You can open your book file with Claibre's ebook-edit.exe and edit the CSS directly. It's fairly simple to follow the constructs, and toward the top you will see the "body" section where hobnail's "font-variant:" example can be added. Just beware that each individual class can have its own font-variant and if there is a "font-variant: normal" property at the class level, this will override anything declared at the body level. Any property declared below a previous declaration takes precedence. The "body" properties are for the entire layout, but if a body property is changed in a following "class", the class property takes precedence. That's not the whole of CSS rules, but it may be enough to fix your problem. |
|
![]() |
![]() |
![]() |
#11 |
Member
![]() Posts: 16
Karma: 10
Join Date: May 2018
Device: calibre
|
One more thing I meant to tell you. Presently, Kindle doesn't honor the "oldstyle-num" property and Kobo may not either. Calibre and Apple Books presently both do honor "oldstyle-num" and it's difficult to say which eReaders will or will not, and whether one will at some point in time, and then not at another.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Figures overlap text | LeeHigbie | Introduce Yourself | 0 | 03-12-2020 10:47 PM |
Forcing old-style figures from a font in Kindle | Enterio | Kindle Formats | 21 | 03-11-2020 04:07 AM |
I imported a "kepub.ebub" book into Calibre, but Calibre converted to "epub". Why? | droopy | Calibre | 5 | 12-23-2019 07:33 AM |
Where To Put <style type="text/css"> Code | SeaCanary | Sigil | 4 | 01-28-2014 08:33 PM |
Figures that contain text | xmlgirl | Workshop | 9 | 05-11-2012 11:22 AM |