Closed Explorare closed 1 year ago
It is currently using Qt5. I plan to update NodeGui from Qt5 to Qt6 in the coming months.
@Explorare Can you test this problem again using the latest Extraterm release. It is on Qt6 these days.
Just tested on v0.71.0 and still got the same issue.
[Log]
I figured out that he root cause of this issue may be the malfunction of the ligatures support.
I came across this issue #420 and find an interesting error log:
On line 2 it blamed an error about the
calt
OpenType feature, here is the description for it from Adobe:
This feature, in specified situations, replaces default glyphs with alternate forms which provide better joining behavior. Like ligatures (though not strictly a ligature feature), contextual alternates are commonly used to harmonize the shapes of glyphs with the surrounding context.
The setting for this feature in the config file is terminalDisplayLigatures
and the default value is true
. And the setting in the GUI is Enable Ligatures
below the font settings.
I mistakenly thought that it's a compatibility issue with TTC fonts, but those fonts are built to support modern OpenType features, including
It still could be the issue with GSUB support in TTC format which cause the software failed to load the calt
.calt
table.
Here are some test results. (Tested with v0.71.0) | Fonts | Format | calt support |
calt ON |
---|---|---|---|---|
cascadia-code | TTF | yes | works as intend | |
cascadia-code | OTF static | yes | works as intend | |
FiraCode | TTF | yes | crashed | |
Iosevka | TTF | yes | work as intend | |
Consolas | TTF | yes(?) | no difference | |
Ink Free | TTF | NO | crashed | |
source-code-pro | OTF | NO | no difference | |
Sarasa Term J | TTC | yes | crashed | |
Sarasa Term J | TTF | yes | works as intend |
You can find programming fonts with ligatures support here Programming Fonts - Test Drive You can see if one font supports ligatures or not using FontDrop!.
So there are actually 2 separate issues need to be fixed:
calt
table from a font.calt
support.Thank you for looking into this. From the stack trace you put here it looks like the gsub
table is missing. I guess it is possible that the calt
table is also missing. Either way it will have to carefully check for the existence of both before it blindly goes crash.
But for Sarasa Term J, it supports calt
and works as intend in Windows Terminal. But extraterm seems having issue to load the calt
table. I'm wondering what's the difference that makes cascadia-code works but Sarasa Term J not.
I'm pretty fine with ligatures disabled to use Sarasa Term J for CJKV support. A quick patch to stop the program from crashing while calt
is not loaded successfully is enough. Maybe a complete fix for calt
tablet support in the future will be awesome. Thank you for this great project.
Since per @Explorare Iosevka itself is working, maybe it is related to the TTC format?
I've tried the TTF version of Sarasa Term J and it works as intend. So the broken support for GSUB in TTC format is the root cause?
I've been digging into this and have found a test case where it hangs, spinning CPU. There can always be another bug.
SourceHanSans is working fine now in Extraterm. I'll do a release in the next few days. Thanks for everyone's help here.
Released in 0.71.1.
[Environment] Windows 10 22H2 x64 extraterm v0.68.0
[Issue] This program could not handle OpenType Font Collection (.TTC) fonts correctly.
Introduction to OpenType Font Collection
>An OpenType Font Collection (formerly known as TrueType Collection) is a means of delivering multiple OpenType font resources in a single file structure. The format for font collections allows font tables that are identical between two or more fonts to be shared. Font collections containing outline glyph data (TrueType, CFF, CFF2 or SVG) are most useful when the fonts to be delivered together share many glyphs in common. By allowing multiple fonts to share glyph sets and other common font tables, font collections can result in **a significant saving of file space**. >OpenType font files should use the extension .OTF, .TTF, .OTC or .TTC. (The extension may be upper or lower case.) The extensions .OTC and .TTC should only be used for [font collection](https://learn.microsoft.com/en-us/typography/opentype/spec/otff#collections) files. Source: [OpenType font file (OpenType 1.9) - Typography | Microsoft Learn](https://learn.microsoft.com/en-us/typography/opentype/spec/otff#font-collections)The program will crash after setting the font of terminal to a
.TTC
font. I have tested be5invis/Sarasa-Gothic and adobe-fonts/source-han-sans, both of them will cause the same issue. While launching the program again after the crash, no GUI was created, three processes were created, which areextraterm
,Vmmem
andQode.js JS Runtime for Qt
. TheQode.js
process will exit seconds after it been launched, and then the main process, andvmmem
may also stop after minutes of inavtive.In the document for Qt 6.4, it says TTC is supported.
And Calibre 6, which is also built with Qt6, support TTC fonts correctly. So I think this may be an implementation issue, not the Qt6 framework.
304 may be related.
[Steps to reproduce]
.TTF
or.OTF
font will make it work again.[Config]
Click me
```json { "commandLineActions": [], "sessions": [ { "uuid": "6f270b82-00c3-442f-9c9f-e002a5a26ed8", "name": "PowerShell Core", "type": "windows-console", "exe": "pwsh.exe", "args": "", "initialDirectory": null }, { "uuid": "bc53e522-f99f-4da6-bfaa-b83efcdca2a0", "name": "WSL Default", "type": "wsl", "useDefaultShell": true, "shell": "", "args": "", "distribution": "", "initialDirectory": "", "extensions": {} }, { "uuid": "4886fb8e-6ceb-4416-b135-48ca6ec86d21", "name": "WSL Debian", "type": "wsl", "useDefaultShell": true, "shell": "", "args": "", "distribution": "Debian", "initialDirectory": null }, { "uuid": "d0e63509-3abc-4f5d-bef3-ba02e718422c", "name": "CMD", "type": "windows-console", "exe": "cmd.exe", "args": "", "initialDirectory": "", "extensions": {} }, { "uuid": "77c248c5-d802-4732-8d02-607148ac4505", "name": "PowerShell", "type": "windows-console", "exe": "powershell.exe", "args": "", "initialDirectory": null } ], "autoCopySelectionToClipboard": true, "blinkingCursor": false, "cursorStyle": "block", "frameRule": "frame_if_lines", "frameRuleLines": 10, "keybindingsName": "pc-style", "minimizeToTray": false, "showTrayIcon": false, "scrollbackMaxFrames": 100, "scrollbackMaxLines": 10000, "terminalFont": "Sarasa Term J", "terminalFontSize": 13, "terminalDisplayLigatures": true, "terminalMarginStyle": "normal", "tipCounter": 0, "tipTimestamp": 0, "titleBarStyle": "native", "uiScalePercent": 100, "windowBackgroundMode": "opaque", "windowBackgroundTransparencyPercent": 50, "closeWindowWhenEmpty": true, "middleMouseButtonAction": "paste", "middleMouseButtonShiftAction": "paste", "middleMouseButtonControlAction": "paste", "rightMouseButtonAction": "context_menu", "rightMouseButtonShiftAction": "context_menu", "rightMouseButtonControlAction": "context_menu", "activeExtensions": {}, "themeTerminal": "itermcolors-terminal-theme-provider:Two Dark.itermcolors", "windowConfiguration": { "0": { "isMaximized": true, "x": 0, "y": 23, "width": 1500, "height": 938 } } } ```[Log]
Click me
```sh 2022-12-15 12:13:48.050 INFO [main #0] Recording logs to C:\Users\explo\AppData\Roaming\extratermqt\Config\extraterm.log 2022-12-15 12:13:58.178 INFO [main #0] User extension directory is: C:\Users\explo\AppData\Roaming\extratermqt\Config\extensions 2022-12-15 12:13:58.179 INFO [ExtensionManager #0] Scanning 'C:\Program Files\extratermqt\extensions' for extensions. 2022-12-15 12:13:58.184 INFO [ExtensionManager #0] Read extension metadata from 'C:\Program Files\extratermqt\extensions\About'. 2022-12-15 12:13:58.188 INFO [ExtensionManager #0] Read extension metadata from 'C:\Program Files\extratermqt\extensions\Autocomplete'. 2022-12-15 12:13:58.191 INFO [ExtensionManager #0] Read extension metadata from 'C:\Program Files\extratermqt\extensions\Autolink'. 2022-12-15 12:13:58.192 INFO [ExtensionManager #0] Read extension metadata from 'C:\Program Files\extratermqt\extensions\CommunityTerminalThemes'. 2022-12-15 12:13:58.195 INFO [ExtensionManager #0] Read extension metadata from 'C:\Program Files\extratermqt\extensions\CopyBlock'. 2022-12-15 12:13:58.197 INFO [ExtensionManager #0] Read extension metadata from 'C:\Program Files\extratermqt\extensions\CopyLink'. 2022-12-15 12:13:58.198 INFO [ExtensionManager #0] Read extension metadata from 'C:\Program Files\extratermqt\extensions\DefaultKeybindings'. 2022-12-15 12:13:58.199 INFO [ExtensionManager #0] Read extension metadata from 'C:\Program Files\extratermqt\extensions\DefaultTerminalTheme'. 2022-12-15 12:13:58.201 INFO [ExtensionManager #0] Read extension metadata from 'C:\Program Files\extratermqt\extensions\DirectoryCommands'. 2022-12-15 12:13:58.203 INFO [ExtensionManager #0] Read extension metadata from 'C:\Program Files\extratermqt\extensions\DownloadBlock'. 2022-12-15 12:13:58.206 INFO [ExtensionManager #0] Read extension metadata from 'C:\Program Files\extratermqt\extensions\Find'. 2022-12-15 12:13:58.209 INFO [ExtensionManager #0] Read extension metadata from 'C:\Program Files\extratermqt\extensions\ImageBlock'. 2022-12-15 12:13:58.212 INFO [ExtensionManager #0] Read extension metadata from 'C:\Program Files\extratermqt\extensions\InjectShellIntegration'. 2022-12-15 12:13:58.214 INFO [ExtensionManager #0] Read extension metadata from 'C:\Program Files\extratermqt\extensions\InsertEmoji'. 2022-12-15 12:13:58.222 INFO [ExtensionManager #0] Read extension metadata from 'C:\Program Files\extratermqt\extensions\InternalCommands'. 2022-12-15 12:13:58.224 INFO [ExtensionManager #0] Read extension metadata from 'C:\Program Files\extratermqt\extensions\ITermColorsTerminalThemeProvider'. 2022-12-15 12:13:58.227 INFO [ExtensionManager #0] Read extension metadata from 'C:\Program Files\extratermqt\extensions\OpenLink'. 2022-12-15 12:13:58.229 INFO [ExtensionManager #0] Read extension metadata from 'C:\Program Files\extratermqt\extensions\ProxySessionBackend'. 2022-12-15 12:13:58.231 INFO [ExtensionManager #0] Read extension metadata from 'C:\Program Files\extratermqt\extensions\ProxySessionEditor'. 2022-12-15 12:13:58.233 INFO [ExtensionManager #0] Read extension metadata from 'C:\Program Files\extratermqt\extensions\StyleGuide'. 2022-12-15 12:13:58.237 INFO [ExtensionManager #0] Read extension metadata from 'C:\Program Files\extratermqt\extensions\TerminalTitle'. 2022-12-15 12:13:58.239 INFO [ExtensionManager #0] Read extension metadata from 'C:\Program Files\extratermqt\extensions\TLDRPages'. 2022-12-15 12:13:58.242 INFO [ExtensionManager #0] Read extension metadata from 'C:\Program Files\extratermqt\extensions\WindowsConsoleSessionBackend'. 2022-12-15 12:13:58.244 INFO [ExtensionManager #0] Read extension metadata from 'C:\Program Files\extratermqt\extensions\WindowsConsoleSessionEditor'. 2022-12-15 12:13:58.245 INFO [ExtensionManager #0] Starting extension 'about' 2022-12-15 12:13:58.266 INFO [ExtensionManager #0] Starting extension 'autocomplete' 2022-12-15 12:13:58.272 INFO [ExtensionManager #0] Starting extension 'autolink' 2022-12-15 12:13:58.278 INFO [ExtensionManager #0] Starting extension 'community-terminal-themes' 2022-12-15 12:13:58.278 INFO [ExtensionManager #0] Starting extension 'copy-block' 2022-12-15 12:13:58.281 INFO [ExtensionManager #0] Starting extension 'copy-link' 2022-12-15 12:13:58.285 INFO [ExtensionManager #0] Starting extension 'default-keybindings' 2022-12-15 12:13:58.285 INFO [ExtensionManager #0] Starting extension 'default-terminal-theme' 2022-12-15 12:13:58.285 INFO [ExtensionManager #0] Starting extension 'directory-commands' 2022-12-15 12:13:58.288 INFO [ExtensionManager #0] Starting extension 'download-block' 2022-12-15 12:13:58.315 INFO [ExtensionManager #0] Starting extension 'find' 2022-12-15 12:13:58.324 INFO [ExtensionManager #0] Starting extension 'image-block' 2022-12-15 12:13:58.331 INFO [ExtensionManager #0] Starting extension 'inject-shell-integration' 2022-12-15 12:13:58.331 INFO [ExtensionManager #0] Starting extension 'insert-emoji' 2022-12-15 12:13:58.344 INFO [ExtensionManager #0] Starting extension 'internal-commands' 2022-12-15 12:13:58.345 INFO [ExtensionManager #0] Starting extension 'itermcolors-terminal-theme-provider' 2022-12-15 12:13:58.383 DEBUG [itermcolors-terminal-theme-provider] ITermColorTerminalThemeProvider activating 2022-12-15 12:13:58.383 INFO [ExtensionManager #0] Starting extension 'open-link' 2022-12-15 12:13:58.387 INFO [ExtensionManager #0] Starting extension 'proxy-session-backend' 2022-12-15 12:13:58.481 INFO [ExtensionManager #0] Starting extension 'proxy-session-editor' 2022-12-15 12:13:58.486 INFO [proxy-session-editor] ProxySessionEditorExtension activate 2022-12-15 12:13:58.500 INFO [ExtensionManager #0] Starting extension 'styleguide' 2022-12-15 12:13:58.503 WARN [ExtensionManager #0] Unable to load C:\Program Files\extratermqt\extensions\StyleGuide\dist\StyleGuideExtension.cjs. Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'C:\Program Files\extratermqt\extensions\StyleGuide\dist\StyleGuideExtension.cjs' imported from C:\Program Files\extratermqt\main\dist\main.cjs 2022-12-15 12:13:58.503 INFO [ExtensionManager #0] Starting extension 'terminal-title' 2022-12-15 12:13:58.529 INFO [ExtensionManager #0] Starting extension 'tldr-pages' 2022-12-15 12:13:58.534 INFO [ExtensionManager #0] Starting extension 'windows-console-session-backend' 2022-12-15 12:13:58.569 INFO [ExtensionManager #0] Starting extension 'windows-console-session-editor' 2022-12-15 12:13:58.598 WARN [ConfigDatabase #0] Unable to find config for key system 2022-12-15 12:13:58.754 INFO [LocalHttpServer #0] Local HTTP IPC server running on http://127.0.0.1:6302/50b7c553c562fac235b294f1103f0b8b ```