10-22-2019, 02:33 AM | #1 |
Annabelle Viau
Posts: 43
Karma: 16664
Join Date: Jan 2015
Location: Rishikesh, India
Device: iPad, Kobo, Windows 10 (ADE, Azardi), Android (Google Books, Bluefire)
|
Alternate glyph support (font-variant-alternates)
Hello everyone,
Does anyone know if the CSS font-variant-alternates is supported in ePub3? I tried in Sigil and it doesn’t seem to be working, and I can’t seem to find any information about it for ePubs. I have a book where alternate glyphs are used for certain letters, so if that doesn’t work, I’ll have to turn them into images I guess. Any information or ideas would be of great help Thanks! |
10-22-2019, 12:16 PM | #2 |
Bibliophagist
Posts: 35,356
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
As far as I am aware, font-variant-alternates is part of the supported CSS for epub3. It does require use of an OpenType font that supports features such as 'historical-forms' which is a pretty limited set. Equally sadly, font-variant-alternates is not supported by most renderers. Pretty much a useless feature.
|
10-22-2019, 03:19 PM | #3 | |
Resident Curmudgeon
Posts: 73,938
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
The image based solution would only be needed for Mobi on an old Kindle if the font doesn't have the glyphs/. So if you can get access to an old Kindle or ask on MR if someone has such can test some words for you, then you'll know if you need the images or not. |
|
10-22-2019, 05:53 PM | #4 | |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
https://developer.mozilla.org/en-US/...ant-alternates it's only supported in Firefox currently. What's the use-case? Can you show example text of what you're trying to achieve? |
|
10-23-2019, 03:32 AM | #5 |
Annabelle Viau
Posts: 43
Karma: 16664
Join Date: Jan 2015
Location: Rishikesh, India
Device: iPad, Kobo, Windows 10 (ADE, Azardi), Android (Google Books, Bluefire)
|
I’m converting a children book into fixed-layout. The printed book is using the font Bree with the alternates glyphs for the letters « Q » and « v » as the default ones are a bit hard to read.
If font-variant-alternates is supposed to be supported, I’d love to try this out first as it’d be the best option, but I’m unable to make the code work. I even tried outside of ePub and it’s just not working. InDesign is telling me that the alternates are in the salt group, all the code seems right, but, nothing... I,m stuck I joined my test ePub, maybe one of you know how to solve this? |
10-23-2019, 03:47 AM | #6 |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
You could try using Fontsquirrel's Webfont Generator in expert mode and flatten the font.
|
10-23-2019, 07:25 AM | #7 | |
Resident Curmudgeon
Posts: 73,938
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
10-23-2019, 08:40 AM | #8 |
Annabelle Viau
Posts: 43
Karma: 16664
Join Date: Jan 2015
Location: Rishikesh, India
Device: iPad, Kobo, Windows 10 (ADE, Azardi), Android (Google Books, Bluefire)
|
Well, I found a bypass solution which worked but is pretty messy, I wouldn’t recommend that to anyone... I edited the font using FontForge and replaced the normal letters with their alternate glyphs
I really wish I could figure out how to make the font-variant-alternates work though. In the print version, alternate glyphs are used, which I am unable to reproduce in the ePub. Alternate glyph means both letters are attributed to the same unicode. So in the print version, instead of using the regular « Q » and « v », it is the alternate ones that are used. Only some rare fonts have alternate glyphs (like the famous Zapfino) and this function is really not widely used, except for ligatures I believe. |
10-23-2019, 08:58 AM | #9 | |
Annabelle Viau
Posts: 43
Karma: 16664
Join Date: Jan 2015
Location: Rishikesh, India
Device: iPad, Kobo, Windows 10 (ADE, Azardi), Android (Google Books, Bluefire)
|
Quote:
So, well, I still wish to make that font-variant-alternates work hehe |
|
10-23-2019, 04:18 PM | #10 | |
Resident Curmudgeon
Posts: 73,938
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
10-23-2019, 09:14 PM | #11 | ||
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
It's not like some of those dingbat/foreign fonts that replaced "abcd" with absolutely different symbols "αβγδ". It's substituting a swashy 'Q' with a normal 'Q'. Or 'a' with a more rounded 'a' (as a child would write [see GIF below]): https://helpx.adobe.com/content/dam/...n-type-bar.gif https://helpx.adobe.com/illustrator/...haracters.html Before: https://ilovetypography.com/OpenType/_img/salt_src.gif After: https://ilovetypography.com/OpenType/_img/salt_trgt.gif I would agree with Doitsu, your best best would probably be to flip the alternate symbol in the font itself, then embed that modified font into the Fixed Format Ebook. Currently, that advanced CSS3 is just not well supported across readers/browsers. Side Note: If you look at the font OP mentioned, the 'v' looks a lot like a 'u', and in a children's book, I could see how that would be extremely confusing. Quote:
Anyway, it all stems back to a problem of reader support:
If you created a book which relied on alternate characters for comprehension, you most likely have serious underlying issues in your text. Last edited by Tex2002ans; 10-23-2019 at 09:26 PM. |
||
03-22-2020, 06:07 AM | #12 |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
font-variant-alternates
Hi
Is this necro-posting? It's still about the CSS property font-variant-alternates to be used in an ePub3. My OT font is Linux Libertine. I'd like to write in the CSS at the body place, the following line: font-variant-alternates: stylistic (); Question: I do not know how to fill-up what must be inserted within the red brackets. In the text of the ePub, I'd like to make appear the alternate character instead of & My font has the stylistic set ss06 (see screenshot). Currently, I can make appear the alternate character only using the smcp set as you can see (other screenshot), but then I have to wrap a span around each & which is not very convenient. I'm afraid I have not been clear... Last edited by roger64; 03-22-2020 at 06:20 AM. |
03-22-2020, 08:34 AM | #13 | |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
Code:
body { font-family: 'Linux Libertine'; -moz-font-feature-settings: "salt"; -webkit-font-feature-settings: "salt"; font-feature-settings: "salt"; } |
|
03-22-2020, 09:35 AM | #14 |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Code:
font-feature-settings: "salt"; It would be convenient for a span around the &, but then I would not be any better than the smcp solution. Last edited by roger64; 03-22-2020 at 09:54 AM. |
03-22-2020, 10:22 AM | #15 |
Resident Curmudgeon
Posts: 73,938
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
But it doesn't work with ADE 2.0.1 or even ADE 3.x. So it's not a good idea to use it as a lot of Readers or programs with RMSDK are not using the latest version and thus do not support such.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
glyph font for member names is annoying. | Phogg | Feedback | 3 | 02-01-2016 01:07 PM |
variable width font with slash/dot zero glyph | rem736 | General Discussions | 3 | 07-28-2015 03:02 PM |
Add alternates to tab delimited dictionary | Magvidal | Kindle Formats | 3 | 02-25-2015 07:36 PM |
DR1000 FW2.0 - RC2 - font-variant: small-caps | ThR | iRex | 0 | 06-29-2010 05:31 AM |
Hacks Alternate Kindle 2 Font Hack | daffy4u | Amazon Kindle | 29 | 09-19-2009 08:47 PM |