-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect display of character 'k' for "FantasqueSansMono" when "ss01" font feature is on #901
Comments
While this is easy to fix in Any hint welcomeOther than that, started investigation to use |
Ah yes, of course post is too late, it must be pre, but we do not have the 'infrastructure' for pre-stuff yet 🙄 |
This is my 'stub' where I try to get access (at least read access) to the sub table: for filename in sys.argv[1:]:
fullfile = os.path.basename(filename)
fname = os.path.splitext(fullfile)[0]
font = fontforge.open(filename, 1)
for tab in font.gsub_lookups:
r = re.match('[\'"][sS][sS]([0-9][0-9])[\'"].*', tab)
if not r:
continue
print('TABS {}'.format(r.groups()[0]))
print(' : {}'.format(font.getLookupInfo(tab)))
print(' : {}'.format(font.getLookupInfo(tab)[2]))
print(' {}'.format(font.lookupSetFeatureList(tab,font.getLookupInfo(tab)[2])))
for subtable in font.getLookupSubtables(tab):
print(' - {}'.format(subtable))
print(' {}'.format(font.getLookupSubtableAnchorClasses(subtable)))
font.close() |
Thank you for your work. |
I now know some basic usage of To my understanding the pomicon icons should not be moved otherwise when other projects use one of the pomicons it will display incorrectly. Since it looks like I tried all the getXXX functions and just like you said none of them seems to do what we want to get info like this: Currently the only way I found is through the This would means the script needs to iterate all the glyphs to determine all the mappings (given no prior knowledge), which sounds super inefficient and I don't think should be the way to go. Or can we hard-code the mapping for known fonts, something similar to how src font attrs is doing here? |
Thank you for working on it!! Well, with #914 we already iterate through 'all' glyphs to find refs. Would be easy enough to also look the posSub tables up. And then not patch the Iirc I tried to move the ref'ed glyph to some free space and adapt the references, but ... well that seemed a lot of work for very few ref glyphs. Once you start editing the tables it's a can of worms 😒 as they can be extremely complex. Font based data files are already here, the And/or But is it really an option to skip some symbols on patching just because they are needed for SS12, which probably noone uses? Maybe SS users are required to burn in the style set with a tool (which you need to do anyhow on all the not-styleset-aware terminals ... and then self patch? These are tough questions. Just noticed that the (maybe more important?) PPEM fix #761 does not work with |
Thanks for the explanation.
Indeed, I would prefer skip patching those conflict glyphs too since I don't have a use case for the pomicons. The
I agree that different users might want different things. For some people those missing symbols "might" be important.
That's totally OK. This is just a small issue (almost all the webpages I see don't specify font-features on mono fonts anyways). At worst I can self patch with a |
[why] When a certain 'higher codepoint' glyph is needed for a substitution or ligature rule of a basic glyph and we replace the 'higher codepoint' glyph with a symbol that stylistic set or ligature will be broken. [how] We can not determine if a certain glyph is the _target_ of a pos-sub rule (at least I could not find a way). What we do is remove all pos-sub entries that _start_ at a symbol-patched glyph [1], but that is not the same. Instead of walking through all substitution tables we just examine the 'basic glyphs' and also protect all glyphs that they reference through most of the possub tables. In fact I encountered only "Substitution" entries and never "Ligature" entries, but we handle both alike. "Pair", "AltSub", and "MultSub" are not handled, but could be added if need be. Fixes: #901 Reported-by: Xiangyu Zhu <[email protected]> Signed-off-by: Fini Jastrow <[email protected]>
[why] When a certain 'higher codepoint' glyph is needed for a substitution or ligature rule of a basic glyph and we replace the 'higher codepoint' glyph with a symbol that stylistic set or ligature will be broken. [how] We can not determine if a certain glyph is the _target_ of a pos-sub rule (at least I could not find a way). What we do is remove all pos-sub entries that _start_ at a symbol-patched glyph [1], but that is not the same. Instead of walking through all substitution tables we just examine the 'basic glyphs' and also protect all glyphs that they reference through most of the possub tables. In fact I encountered only "Substitution" entries and never "Ligature" entries, but we handle both alike. "Pair", "AltSub", and "MultSub" are not handled, but could be added if need be. [1] #711 Fixes: #901 Reported-by: Xiangyu Zhu <[email protected]> Signed-off-by: Fini Jastrow <[email protected]>
Did not implement the "move to free space" way, but the glyphs will automatically be marked with |
This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a new issue, complete the issue template with all the details necessary to reproduce, and mention this issue as reference. |
[why] When a certain 'higher codepoint' glyph is needed for a substitution or ligature rule of a basic glyph and we replace the 'higher codepoint' glyph with a symbol that stylistic set or ligature will be broken. [how] We can not determine if a certain glyph is the _target_ of a pos-sub rule (at least I could not find a way). What we do is remove all pos-sub entries that _start_ at a symbol-patched glyph [1], but that is not the same. Instead of walking through all substitution tables we just examine the 'basic glyphs' and also protect all glyphs that they reference through most of the possub tables. In fact I encountered only "Substitution" entries and never "Ligature" entries, but we handle both alike. "Pair", "AltSub", and "MultSub" are not handled, but could be added if need be. [1] ryanoasis#711 Fixes: ryanoasis#901 Reported-by: Xiangyu Zhu <[email protected]> Signed-off-by: Fini Jastrow <[email protected]>
🗹 Requirements
🎯 Subject of the issue
Experienced behavior:
If a webpage enables "ss01" font feature, and render font is chosen as "FantasqueSansMono Nerd Font", then what should be displayed as
a normal
k
will show like a "coffee" icon.Expected behavior:
I see text without emoji
Example symbols:
🔧 Your Setup
Anonymice Powerline Nerd Font Complete.ttf
)?iterm2
,urxvt
,gnome
,konsole
)? alacritty (but this issue happens on webpage)★ Screenshots (Optional)
I initially noticed it here:
I override liberation mono and monospace with FantasqueSansMono Nerd Font using fontconfig's config file, so it's very likely what you see will be fine (because it's not rendered as this font). From the devtools image we can see my browser is rendering using "FantasqueSansMono Nerd Font".
I believe this can be easily reproduced using this html snippet:
The text was updated successfully, but these errors were encountered: