OpenType aalt feature
Joon Park
Posts: 56
Does anyone have a resource or know a list of features that can be listed in aalt?
0
Comments
-
I guess I didn't fully understand what Access All Alternates does. What does enabling the features by listing under this feature actually do?0
-
I think all the features that contain only substitution lookup type could be added to the aalt. In a text editor it gives user access to all the alternate shapes for the selected glyph. For example in glyphs panel of indesign you can choose to see alternate glyphs for the selected character.0
-
So something like this (http://opentypecookbook.com/common-techniques.html), 2nd method for fraction would not work.0
-
All features that contain only substitution lookup types 1 or 3— aalt will ignore contextual and ligature substitutions.
See: http://www.adobe.com/devnet/opentype/afdko/topic_feature_file_syntax.html#8.aFunction: This feature makes all variations of a selected character accessible. This serves several purposes: An application may not support the feature by which the desired glyph would normally be accessed; the user may need a glyph outside the context supported by the normal substitution, or the user may not know what feature produces the desired glyph.
From: https://www.microsoft.com/typography/otspec/features_ae.htm#aalt
0 -
Kent,
5.c. [GSUB LookupType 3] Alternate substitution
An Alternate Sub rule is specified as:
substitute <glyph> from <glyphclass>; Can "sub <glyphclass> from <glyphclass>;" considered to be type 3 and thus work with aalt?
0 -
Yes it will, I believe. Also be careful, current makeotf silently drops invalid aalt directives https://github.com/adobe-type-tools/afdko/issues/97
0 -
Can "sub <glyphclass> from <glyphclass>;" considered to be type 3 and thus work with aalt?
Only if <glyphclass1> has a single member.
If <glyphclass1> has multiple members, then this syntax will fail to compile, due to the “from” keyword, which only applies to one-from-many substitutions.
0 -
Because aalt is there to provide access to alternate glyphs, I find it much better to just be explicit about these things and write out the "sub x from [x];" syntax for the feature, instead of using the include feature.
If you're using a sane glyph naming scheme, this is pretty easy to script, for example:from robofab.world import CurrentFont font = CurrentFont() def rotate(l,n): return l[-n:] + l[:-n] alts = {} for glyph in font: if "." in glyph.name: if glyph.name.split(".")[0] is not "": if glyph.name.split(".")[0] not in alts: alts[glyph.name.split(".")[0]] = [glyph.name.split(".")[0], glyph.name] else: t = alts[glyph.name.split(".")[0]] if glyph.name not in t: t.append(glyph.name) alts[glyph.name.split(".")[0]] = t keys = alts.keys() keys.sort() for i in keys: s = alts[i] glyphs = [] for n in s: if n in font.keys(): glyphs.append(n) if len(glyphs) > 1: r = len(glyphs) c = 0 while c < r: w = rotate(glyphs, c) sub = "" for n in w: sub = sub + " " + n print " sub " + w[0] + " from ["+ sub[1:] + "];" c += 1
I'm sure that one can come up with something better/cleaner than this example if they wanted.1 -
I've never bothered including the {aalt} feature in fonts, because it seems to me that software should be able to parse the other features and compile its own list of alternates. Basically, I think it's one of those features that Adobe registered in the early days of OpenType without fully considering how the technology might actually work. The use case was always given as the InDesign glyph palette which, unsurprisingly, is perfectly capable of parsing other OTL features to compile lists of alternates.1
-
ty everyone0
-
feature name { # name
# DEFAULT
sub @glyphclass1 by @glyphclass2;
script latn; # Latin
sub @glyphclass1 by @glyphclass2;
language AZE ; # Azeri
language TRK ; # Turkish
language MOL ; # Moldavian
language ROM ; # Romanian
language CRT ; # Crimean Tatar
} name;As you see on example above, I often see features defined default then greek/cyrillic/latin multiple times even if they are same thing as default followed by languages.
It seems redundant, is this something I should just follow?0 -
Wish there's a delete comment option.0
-
That example looks like the result of opening a compiled font into a font editor. This is reflective of the actual structure of the compiled font, where each declared language gets mapped to lookups. “Cracking” open a font into a font editor usually leads to such explicit interpretations.
But in development the redundant declarations are not necessary, as the Adobe syntax compiler will assign defaults to all relevant languages when undeclared.Rules that are specified after the start of a feature and before the first "script" and/or "language" statement will be included in all the language systems specified by the "languagesystem" statements.
[ . . . ]
Once the first script or language statement occurs within a feature block, subsequent lookups and rules are registered only within the currently specified script and language.
From: http://www.adobe.com/devnet/opentype/afdko/topic_feature_file_syntax.html#4.b.ii
2 -
Thank you, Kent0
-
Without an aalt feature, will Illustrator's Stylistic Alternates button work?
0 -
As far as I know, the this button has nothing to do with the aalt feature but uses salt.2
Categories
- All Categories
- 43 Introductions
- 3.7K Typeface Design
- 803 Font Technology
- 1K Technique and Theory
- 620 Type Business
- 444 Type Design Critiques
- 542 Type Design Software
- 30 Punchcutting
- 136 Lettering and Calligraphy
- 83 Technique and Theory
- 53 Lettering Critiques
- 484 Typography
- 302 History of Typography
- 114 Education
- 68 Resources
- 499 Announcements
- 80 Events
- 105 Job Postings
- 148 Type Releases
- 165 Miscellaneous News
- 270 About TypeDrawers
- 53 TypeDrawers Announcements
- 116 Suggestions and Bug Reports