Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 09-26-2022, 05:42 PM   #16
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,419
Karma: 22335557
Join Date: Dec 2010
Device: Kindle PW2
According to the Adobe Canto website:
  • Not all Canto font variations support swashes.
  • Most Adobe fonts support font feature settings.
  • Swashes are deactivated by default and need to be activated with the following class definition:

Code:
.class {
  -moz-font-feature-settings: "swsh";
  -webkit-font-feature-settings: "swsh";
  font-feature-settings: "swsh";
}
I played with OpenType features some time ago, when someone wanted to display special Bulgarian glyphs and created a proof-of-concept epub.

If font-feature-settings: "swsh" doesn't work, you might have to select a particular stylistic set using ssXX or salt.

You might find the OpenType Tester website useful for experimenting with OpenType features.

As you've probably already guessed, not all apps and readers support rendering swashes and/or selecting stylistic sets.

Last edited by Doitsu; 09-26-2022 at 05:46 PM.
Doitsu is offline   Reply With Quote
Old 09-26-2022, 07:25 PM   #17
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 10,560
Karma: 146051411
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by Doitsu View Post
According to the Adobe Canto website:
  • Not all Canto font variations support swashes.
  • Most Adobe fonts support font feature settings.
  • Swashes are deactivated by default and need to be activated with the following class definition:

Code:
.class {
  -moz-font-feature-settings: "swsh";
  -webkit-font-feature-settings: "swsh";
  font-feature-settings: "swsh";
}
I played with OpenType features some time ago, when someone wanted to display special Bulgarian glyphs and created a proof-of-concept epub.

If font-feature-settings: "swsh" doesn't work, you might have to select a particular stylistic set using ssXX or salt.

You might find the OpenType Tester website useful for experimenting with OpenType features.

As you've probably already guessed, not all apps and readers support rendering swashes and/or selecting stylistic sets.

MWAHAHAHA.. the "as you've probably already guessed" comment left me in giggles. YUP, I'm pretty sure 'bout that. But if I can make this sucker fallback nicely, huzzah.

Thanks Doits. You're the best. I shall revert, when I knoweth more.

Hitch
Hitch is offline   Reply With Quote
Old 09-26-2022, 09:08 PM   #18
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 10,560
Karma: 146051411
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by Doitsu View Post
According to the Adobe Canto website:
  • Not all Canto font variations support swashes.
  • Most Adobe fonts support font feature settings.
  • Swashes are deactivated by default and need to be activated with the following class definition:

Code:
.class {
  -moz-font-feature-settings: "swsh";
  -webkit-font-feature-settings: "swsh";
  font-feature-settings: "swsh";
}
I played with OpenType features some time ago, when someone wanted to display special Bulgarian glyphs and created a proof-of-concept epub.

If font-feature-settings: "swsh" doesn't work, you might have to select a particular stylistic set using ssXX or salt.

You might find the OpenType Tester website useful for experimenting with OpenType features.

As you've probably already guessed, not all apps and readers support rendering swashes and/or selecting stylistic sets.
Well, we can make it work in an iPad and Azardi, but it's as dead as a doornail in Kindle, from start-2-finish. Doesn't work (so far) in ADE.

Could be that I'm just a lazy you-know-what, not wanting to sit here and replace 01, 02, etc. 20x, trying to find the "set" (the undocumented set, mind you) that might work.

We'll keep hammering at it, thanks, Doits. (I can make the Swashes display, on the OTT site, but...that's about it. So far, swsh works for ipad/iBooks and Azardi. Other than that, not much luv. (From the devices to me, I mean.)

Hitch
Hitch is offline   Reply With Quote
Old 09-27-2022, 01:52 PM   #19
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,450
Karma: 17222221
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Hitch View Post
Could be that I'm just a lazy you-know-what, not wanting to sit here and replace 01, 02, etc. 20x, trying to find the "set" (the undocumented set, mind you) that might work.
No need to blindly try all possible numbers (or no need to do it slowly, at least). You can find the effect with something like FontForge. Please forgive me if you already know and have tried this.

Take a font like Unifraktur Maguntia (which is full of alternate glyphs) as an example. Open it in FontForge, and go to Window > New Metrics Window. Type the letters you want to find swashes for (e.g. "AGKNSY"), and then you toggle the different sets in the left column (Ctrl+click to keep the previous selection as you activate a new one). You'll find that "aalt" activates the alternate forms for all these letters, "cv04" activates the modern "A", "cv05" and "cv06" for "G" and "K", etc. There's probably something similar (but maybe less exhaustive and well documented) for your font. I guess you can't share it? You can examine the substitution tables in Element > Font Info > Lookups, but you probably won't want to do that. There must be some tool that gives you a dump of the tables in text format for easier examination (a custom-made python script at least).

Still, it won't work in devices/format that don't support/ignore OpenType features, but it should degrade nicely (i.e. simply show swash-less variants).

Quote:
For each and every alternate letter, is that right?
If they must be enabled on a case-by-case basis, yes. But if you just want to use the swash variants when they're available and the normal variants when they aren't, you can simply enable "swsh" for the whole element. Try writing the full text in FontForge and see how it behaves. Suppose only capital letters have swash variants, then you could have:

Code:
<h1>This Is A Title</h1>
with the "swsh" feature enabled for the whole h1, and the "T"s, "I" and "A" will be swash. But if you want only the first "T" to be swash and not the second... then you'd need a span or something to individualize them. An extreme case would be something like Zapfino, where each letter has several variants and you can choose a different one for each instance.
Attached Thumbnails
Click image for larger version

Name:	font1.png
Views:	30
Size:	30.2 KB
ID:	196829   Click image for larger version

Name:	font2.png
Views:	28
Size:	29.5 KB
ID:	196830   Click image for larger version

Name:	font3.png
Views:	30
Size:	31.7 KB
ID:	196831   Click image for larger version

Name:	font4.png
Views:	29
Size:	32.1 KB
ID:	196832  
Jellby is offline   Reply With Quote
Old 09-27-2022, 06:42 PM   #20
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 10,560
Karma: 146051411
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by Jellby View Post
No need to blindly try all possible numbers (or no need to do it slowly, at least). You can find the effect with something like FontForge. Please forgive me if you already know and have tried this.

Take a font like Unifraktur Maguntia (which is full of alternate glyphs) as an example. Open it in FontForge, and go to Window > New Metrics Window. Type the letters you want to find swashes for (e.g. "AGKNSY"), and then you toggle the different sets in the left column (Ctrl+click to keep the previous selection as you activate a new one). You'll find that "aalt" activates the alternate forms for all these letters, "cv04" activates the modern "A", "cv05" and "cv06" for "G" and "K", etc. There's probably something similar (but maybe less exhaustive and well documented) for your font. I guess you can't share it? You can examine the substitution tables in Element > Font Info > Lookups, but you probably won't want to do that. There must be some tool that gives you a dump of the tables in text format for easier examination (a custom-made python script at least).

Still, it won't work in devices/format that don't support/ignore OpenType features, but it should degrade nicely (i.e. simply show swash-less variants).



If they must be enabled on a case-by-case basis, yes. But if you just want to use the swash variants when they're available and the normal variants when they aren't, you can simply enable "swsh" for the whole element. Try writing the full text in FontForge and see how it behaves. Suppose only capital letters have swash variants, then you could have:

Code:
<h1>This Is A Title</h1>
with the "swsh" feature enabled for the whole h1, and the "T"s, "I" and "A" will be swash. But if you want only the first "T" to be swash and not the second... then you'd need a span or something to individualize them. An extreme case would be something like Zapfino, where each letter has several variants and you can choose a different one for each instance.
Jellby:

I'm going to reach out to you,privately, and show you the font. It's a bloody nightmare and here's a weird one--I've made it work, in Azardi. But ixnay (not) in KP3, despite the fact that Doits' Bulgarian special use fonts worked in KP3. That gets right up my nose! P.S, and here's a poser--I cannot FIND the particular swash that the customer demanded, for an upper-cae E, in the New Metrics Window--as if it doesn't exist. If I use the Swsh category, in the CSS, the file works in Azardi. But wait, there's more--it works even though the font was subset. Now, explain THAT one to me!

So, yes: a glyph I cannot find, at all, in FontForge, works in an ePUB, even though some other glyph, that is not the glyph I seek, was called and it/they work---even though the font was subset, which means that the glyphs oughtn't be there at all. Nor can I see or find any aalt (per Doits' comments) to show me "all" the alternatives. (I wonder if that's only alts with hex or code points?)

Do I know how to have a good time, or what?

GRRRRRRRRRRRRRRRRRRRRRR,
I don't like it when files disobey. I really, really don't.
Hitch is offline   Reply With Quote
Old 09-28-2022, 01:47 PM   #21
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,450
Karma: 17222221
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Hitch View Post
So, yes: a glyph I cannot find, at all, in FontForge, works in an ePUB, even though some other glyph, that is not the glyph I seek, was called and it/they work---even though the font was subset, which means that the glyphs oughtn't be there at all.
It depends on what the tool doing the subsetting actually did. Some tools may keep only the plain letters, some tools may keep also the possible variants, some tools may keep all variants, ligatures, etc. (even if they involve only removed letters), because they cannot/will not figure out if they're needed or not.

Quote:
Nor can I see or find any aalt (per Doits' comments) to show me "all" the alternatives. (I wonder if that's only alts with hex or code points?)
What exactly are the different features present in a font, and what they actually do is up to the font designer. The names are only orientative/conventional.
Jellby is offline   Reply With Quote
Old 09-28-2022, 03:07 PM   #22
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 10,560
Karma: 146051411
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by Jellby View Post
It depends on what the tool doing the subsetting actually did. Some tools may keep only the plain letters, some tools may keep also the possible variants, some tools may keep all variants, ligatures, etc. (even if they involve only removed letters), because they cannot/will not figure out if they're needed or not.



What exactly are the different features present in a font, and what they actually do is up to the font designer. The names are only orientative/conventional.
Man, and I thought that making ePUBs and MOBis, back in the day, was the Wild Wild West of coding. It's NOTHING compared to this BS with fonts. NOZZINK!

@Doitsu: do you have/remember the name of/can point me to that Bulgarian font you used in that ePUB?

Hitch
Hitch is offline   Reply With Quote
Old 09-28-2022, 06:55 PM   #23
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 1,526
Karma: 14325062
Join Date: Nov 2019
Device: none
Quote:
Originally Posted by Hitch View Post
Man, and I thought that making ePUBs and MOBis, back in the day, was the Wild Wild West of coding. It's NOTHING compared to this BS with fonts. NOZZINK!

Hitch
You've probably heard that saying we have way out west, "You can tell who the pioneers are; they're the ones on the ground with arrows sticking out of their backs."
hobnail is offline   Reply With Quote
Old 09-28-2022, 08:44 PM   #24
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 10,560
Karma: 146051411
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by hobnail View Post
You've probably heard that saying we have way out west, "You can tell who the pioneers are; they're the ones on the ground with arrows sticking out of their backs."
Yes and I am now, pretty much officially, giving up. Firstly, I'm trying to do this whilst medicated (trust me, s**t idea); I've managed to get someone's name wrong and...it's just not going well.

I am officially ending this.

Hitch
Hitch is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Troubleshooting Embedding font breaks font-family? Calan Amazon Kindle 1 06-13-2020 12:48 PM
Embedding font in books that already have embedded font Barty Calibre 2 10-17-2013 12:38 AM
Font Embedding? teh603 Writer2ePub 75 01-08-2013 08:57 PM
Font embedding sachin Sigil 3 03-21-2012 10:19 AM
Do I need a font license if all I'm doing is referring to the font (not embedding)? Stodder Workshop 21 04-21-2011 05:19 AM


All times are GMT -4. The time now is 04:50 AM.


MobileRead.com is a privately owned, operated and funded community.