-
Notifications
You must be signed in to change notification settings - Fork 153
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
Support mixed font rendering #627
Comments
Would you please name a terminal emulator that does that? I do the same thing with gnome-terminal and it shows nothing at all. |
@tsujan the image shows qterminal on the left and xfce4-terminal on the right. xfce4-terminal supports mixed rendering. |
xfce4-terminal is exactly like gnome-terminal here: shows nothing at all, even when I choose Noto Color Emoji as its font. It should be some other setting in your case. |
@tsujan could be your distro I'm not sure I know for a fact on two Debian bullseye installs this works correctly on xfce terminal. |
I may be wrong but I guess this isn't about the terminal itself. |
@yan12125 is the expert in this area. Let's wait for him to see this. |
OK, I was right: This doesn't have anything to do with terminals. Read https://www.reddit.com/r/linux/comments/ao0mp3/how_to_better_enable_color_emojis/ , do as it says, and you'll have colored emoji inside QTerminal, FeatherPad,... without needing to change their fonts. EDIT: For me, adding these lines to <!-- For colored emojis: -->
<match target="pattern">
<test name="family"><string>monospace</string></test>
<edit name="family" mode="append"><string>Noto Color Emoji</string></edit>
</match> |
ok - after 0.15 - maybe before, we have to polish some configurations - font config is one of them, there is an ancient debian report about and the report is right - will file something if not in our bugs yet |
@agaida These emojis need special fonts. Adding 4 lines to Anyhow, although this report wasn't valid, it had a good result. |
grml - we shouldn't use fonts:conf any longer - thats what the debian report is about - instead we should use fonts.conf.d https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=834599 EDIT: More precise - Nobody should use generic configurations if there is a config dir available for a certain application |
OK. In any of these cases, two things need to be added:
Would you open an issue for them and also for |
The
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="pattern">
<test qual="any" name="family"><string>mono</string></test>
<edit name="family" mode="assign"><string>monospace</string></edit>
</match>
<match>
<test name="family"><string>monospace</string></test>
<edit name="family" mode="prepend" binding="strong"><string>Noto Color Emoji</string></edit>
</match>
</fontconfig>
Working emoji terminus and Noto: But doing things like this have side affects, whatever font you match in this case With Without Using font-config matching is not the answer, though I am not saying that I do know what xfce4-terminal is doing to render correctly and I certainly didn't have to go messing about with font-config matching it just worked. |
→ What I said above about monospace. Something like this: <alias>
<family>monospace</family>
<prefer>
<family>DejaVu Sans Mono</family>
</prefer>
</alias>
This isn't "messing" but "configuring". Of course, anyone could mess with any configuration. |
@tsujan - right now i'm working on The basic KCM thing is dead simple, but the sorting need to be refined i guess - same for run-time dependencies, different story. |
That will still make DejaVu Sans Mono render incorrectly and once again xfce terminal did not need configuring and works even without the fontconfig changes you've shown so how do you explain that? |
All in all: <?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<!-- Previous lines, if any -->
<!-- For colored emojis: -->
<match target="pattern">
<test name="family"><string>monospace</string></test>
<edit name="family" mode="append"><string>Noto Color Emoji</string></edit>
</match>
<!-- To fix monospace: -->
<alias>
<family>monospace</family>
<prefer>
<family>DejaVu Sans Mono</family>
</prefer>
</alias>
</fontconfig> LXQt font config should do it automatically in future. @agaida I don't think KDE has what I requested above. I might look into it when I find the time. |
I can't explain what a GTK terminal does -- a terminal that can't insert emojis even with the correct font and have problems in text rendering (see my screenshot). GTK apps may need some things that only GTK DEs provide. |
Just a little note that tripped me up for a bit, configs in |
@tsujan I refined the config down you don't need the work around
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<match target="pattern">
<test name="family"><string>monospace</string></test>
<edit name="family" mode="append"><string>Noto Color Emoji</string></edit>
</match>
</fontconfig> This seems to work with no issues and be the most minimal form, being a |
It depends on the system and its font configs. Hopefully, we won't need to edit the file manually in near future. Those flags are OK in FeatherPad with As for how GTK does it, I think it has its own settings. In Arch, xfce4-terminal needs libxfce4ui, libxfce4util and xfconf but they can't fix xfce4-terminal's problem. Maybe another xfce package is needed too. For now, I don't have time to investigate it. |
@tsujan least this gets it somewhat usable now. |
@konomikitten If you find time, please see what happens with Konsole. I'm like this now: 🤪 |
@tsujan the config works fine with konsole too, ignore the weird spacing when typing it isn't related to the config |
@konomikitten - the numbers are important in cases where the sort in which the configs are readed is important - so it is good practice that the basic configurations (upstream) are read first, afterwards the distribution configs - after that the derivatives and other configs - so we should not provide 99-foo.conf as upstream :P |
@konomikitten Thanks! So, those flags aren't specific to QTerminal, although they aren't related to Qt either. QTerminal was forked from Konsole a long time ago. |
Attached are thousands of emojis for those who want to test quickly. All of them should be seen correctly in FeatherPad if the font config is right. |
I have enabled wiki for qterminal some time ago. Feel free to write fontconfig tricks there. https://github.com/lxqt/qterminal/wiki |
Expected Behavior
Rendering of mixed fonts.
Current Behavior
At the moment qterminal only allows for using a single font for rendering. A good example for this is how you're unable to see emoji from the Noto Color Emoji font when not using it as your main font for qterminal.
Possible Solution
None.
Steps to Reproduce (for bugs)
Context
Not sure what to put here.
System Information
The text was updated successfully, but these errors were encountered: