View Single Post
Old 09-27-2022, 12: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,560
Karma: 20150435
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:	208
Size:	30.2 KB
ID:	196829   Click image for larger version

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

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

Name:	font4.png
Views:	198
Size:	32.1 KB
ID:	196832  
Jellby is offline   Reply With Quote