Skip to content
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

Emojis not appearing in candidate list #985

Closed
hexchain opened this issue Mar 10, 2024 · 4 comments
Closed

Emojis not appearing in candidate list #985

hexchain opened this issue Mar 10, 2024 · 4 comments

Comments

@hexchain
Copy link

hexchain commented Mar 10, 2024

Describe the bug
With Classic UI, Emoji characters in the candidate list appear as blank spaces.

To Reproduce
Steps to reproduce the behavior:
Try to type anything that may bring up Emoji candidates, e.g. 青蛙

Expected behavior
The emoji characters should show up correctly.

Desktop (please complete the following information):

  • Desktop: KDE Plasma 6, Arch Linux
  • Display server type: Wayland
  • The output of fcitx5-diagnose if possible.
fcitx5-diagnose

System Info:

  1. uname -a:

    Linux hitori 6.7.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 08 Mar 2024 01:59:01 +0000 x86_64 GNU/Linux
    
  2. lsb_release -a:

    LSB Version:	n/a
    Distributor ID:	Arch
    Description:	Arch Linux
    Release:	rolling
    Codename:	n/a
    
  3. lsb_release -d:

    Description:	Arch Linux
    
  4. /etc/lsb-release:

    DISTRIB_ID="Arch"
    DISTRIB_RELEASE="rolling"
    DISTRIB_DESCRIPTION="Arch Linux"
    
  5. /etc/os-release:

    NAME="Arch Linux"
    PRETTY_NAME="Arch Linux"
    ID=arch
    BUILD_ID=rolling
    ANSI_COLOR="38;2;23;147;209"
    HOME_URL="https://archlinux.org/"
    DOCUMENTATION_URL="https://wiki.archlinux.org/"
    SUPPORT_URL="https://bbs.archlinux.org/"
    BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues"
    PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
    LOGO=archlinux-logo
    
  6. Desktop Environment:

    Desktop environment is kde.

  7. XDG SESSION TYPE:

    XDG_SESSION_TYPE='wayland'
    
  8. Bash Version:

    BASH_VERSION='5.2.26(1)-release'
    

Environment:

  1. DISPLAY:

    DISPLAY=':0'
    
    
    WAYLAND_DISPLAY='wayland-0'
    
  2. Keyboard Layout:

    1. setxkbmap:

      WARNING: Running setxkbmap against an Xwayland server
      xkb_keymap {
      	xkb_keycodes  { include "evdev+aliases(qwerty)"	};
      	xkb_types     { include "complete"	};
      	xkb_compat    { include "complete"	};
      	xkb_symbols   { include "pc+us+inet(evdev)"	};
      	xkb_geometry  { include "pc(pc105)"	};
      };
      
    2. xprop:

      _XKB_RULES_NAMES(STRING) = "evdev", "pc105", "us", "", ""
      
  3. Locale:

    1. All locales:

      C
      C.utf8
      en_US.utf8
      ja_JP.utf8
      POSIX
      zh_CN.utf8
      
    2. Current locale:

      LANG=en_US.UTF-8
      LC_CTYPE="en_US.UTF-8"
      LC_NUMERIC=en_US.utf8
      LC_TIME=en_US.UTF-8
      LC_COLLATE="en_US.UTF-8"
      LC_MONETARY=en_US.utf8
      LC_MESSAGES="en_US.UTF-8"
      LC_PAPER=en_US.utf8
      LC_NAME="en_US.UTF-8"
      LC_ADDRESS="en_US.UTF-8"
      LC_TELEPHONE="en_US.UTF-8"
      LC_MEASUREMENT=en_US.utf8
      LC_IDENTIFICATION="en_US.UTF-8"
      LC_ALL=
      
  4. Directories:

    1. Home:

      /home/hexchain
      
    2. ${XDG_CONFIG_HOME}:

      Environment variable XDG_CONFIG_HOME is not set.

      Current value of XDG_CONFIG_HOME is ~/.config (/home/hexchain/.config).

    3. Fcitx5 Settings Directory:

      Current fcitx5 settings directory is ~/.config/fcitx5 (/home/hexchain/.config/fcitx5).

  5. Current user:

    The script is run as hexchain (1000).

Fcitx State:

  1. executable:

    Found fcitx5 at /usr/bin/fcitx5.

  2. version:

    Fcitx version: 5.1.8

  3. process:

    Found 3 fcitx5 processes:

     618969 fcitx5-wayland-
     618970 fcitx5
     618975 fcitx5-plasma-t
    
  4. fcitx5-remote:

    fcitx5-remote works properly.

  5. DBus interface:

    Using dbus-send to check dbus.

    Owner of DBus name org.fcitx.Fcitx5 is :1.368.

    PID of DBus name org.fcitx.Fcitx5 owner is 618970.

    Debug information from dbus:

       Group [x11::0] has 0 InputContext(s)
    Group [wayland:] has 4 InputContext(s)
      IC [18fa19a574a54e7bb5f1660df424cca0] program:chrome-bcngdmpegpihnheapppgoniglphkpfhm-Default frontend:wayland cap:72 focus:0
      IC [2525a48b828b4fdf80edac89206251dd] program:google-chrome frontend:wayland cap:80072 focus:0
      IC [b4e6da6014d0480bacea64a26bbee1a0] program:org.wezfurlong.wezterm frontend:wayland cap:72 focus:1
      IC [902af1f2bb9c4f848de7508564c0675b] program: frontend:wayland cap:72 focus:0
    Input Context without group
    

Fcitx Configure UI:

  1. Config Tool Wrapper:

    Found fcitx5-configtool at /usr/bin/fcitx5-configtool.

  2. Config GUI for qt:

    Found fcitx5-config-qt at /usr/bin/fcitx5-config-qt.

  3. Config GUI for kde:

    kcmshell5 not found.

Frontends setup:

The environment variable checked by this script only shows the environment under current shell. It is still possible that you did not set the environment to the whole graphic desktop session. You may inspect the actual environment variable of a certain process by using xargs -0 -L1 /proc/$PID/environ for a certain process that you find not working.

Xim:

  1. ${XMODIFIERS}:

    Environment variable XMODIFIERS is set to "@im=fcitx" correctly.
    Xim Server Name from Environment variable is fcitx.

  2. XIM_SERVERS on root window:

    Xim server name is the same with that set in the environment variable.

Qt:

  1. qt4 - ${QT4_IM_MODULE}:

    Please set environment variable QT_IM_MODULE to "fcitx" using the tool your distribution provides or add export QT_IM_MODULE=fcitx to your ~/.xprofile. See Input Method Related Environment Variables: QT_IM_MODULE.

    fcitx5-qt4-immodule-probing not found.

  2. qt5 - ${QT_IM_MODULE}:

    Please set environment variable QT_IM_MODULE to "fcitx" using the tool your distribution provides or add export QT_IM_MODULE=fcitx to your ~/.xprofile. See Input Method Related Environment Variables: QT_IM_MODULE.

    It is OK to use qt5 built-in Wayland im module if your compositor fully supports text-input protocol used by qt5.

    Using fcitx5-qt5-immodule-probing to check the actual im module to be used under current environment:

    QT_QPA_PLATFORM=wayland
    QT_IM_MODULE=
    IM_MODULE_CLASSNAME=QtWaylandClient::QWaylandInputContext
    
  3. qt6 - ${QT_IM_MODULE}:

    Please set environment variable QT_IM_MODULE to "fcitx" using the tool your distribution provides or add export QT_IM_MODULE=fcitx to your ~/.xprofile. See Input Method Related Environment Variables: QT_IM_MODULE.

    It is OK to use qt6 built-in Wayland im module if your compositor fully supports text-input protocol used by qt6.

    Using fcitx5-qt6-immodule-probing to check the actual im module to be used under current environment:

    QT_QPA_PLATFORM=wayland
    QT_IM_MODULE=
    IM_MODULE_CLASSNAME=QtWaylandClient::QWaylandInputContext
    
  4. Qt IM module files:

    Found fcitx5 im module for qt: /usr/lib/qt/plugins/platforminputcontexts/libfcitx5platforminputcontextplugin.so.
    Found fcitx5 qt6 module: /usr/lib/fcitx5/qt6/libfcitx-quickphrase-editor5.so.
    Found fcitx5 qt5 module: /usr/lib/fcitx5/qt5/libfcitx-quickphrase-editor5.so.
    Found fcitx5 im module for qt6: /usr/lib/qt6/plugins/platforminputcontexts/libfcitx5platforminputcontextplugin.so.
    Found unknown fcitx qt module: /usr/lib/qt6/plugins/plasma/kcms/systemsettings/kcm_fcitx5.so.

    Following error may not be accurate because guessing Qt version from path depends on how your distribution packages Qt. It is not a critical error if you do not use any Qt application with certain version of Qt or you are using text-input support by Qt under Wayland.
    Cannot find fcitx5 input method module for Qt4.

Gtk:

  1. gtk - ${GTK_IM_MODULE}:

    Please set environment variable GTK_IM_MODULE to "fcitx" using the tool your distribution provides or add export GTK_IM_MODULE=fcitx to your ~/.xprofile. See Input Method Related Environment Variables: GTK_IM_MODULE.

    It is OK to use gtk built-in Wayland im module if your compositor fully supports text-input protocol used by gtk.

    Using fcitx5-gtk2-immodule-probing to check the actual im module to be used under current environment:

    GTK_IM_MODULE=fcitx5
    

    Using fcitx5-gtk3-immodule-probing to check the actual im module to be used under current environment:

    GTK_IM_MODULE=wayland
    

    Using fcitx5-gtk4-immodule-probing to check the actual im module to be used under current environment:

    GTK_IM_MODULE=gtk-im-context-simple
    
  2. gtk-query-immodules:

    1. gtk 2:

      Found gtk-query-immodules for gtk 2.24.33 at /usr/bin/gtk-query-immodules-2.0.
      Version Line:

      # Created by /usr/bin/gtk-query-immodules-2.0 from gtk+-2.24.33
      

      Found fcitx5 im modules for gtk 2.24.33.

      "/usr/lib/gtk-2.0/2.10.0/immodules/im-fcitx5.so" 
      "fcitx" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*" 
      "fcitx5" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*" 
      
    2. gtk 3:

      Found gtk-query-immodules for gtk 3.24.41 at /usr/bin/gtk-query-immodules-3.0.
      Version Line:

      # Created by /usr/bin/gtk-query-immodules-3.0 from gtk+-3.24.41
      

      Found fcitx5 im modules for gtk 3.24.41.

      "/usr/lib/gtk-3.0/3.0.0/immodules/im-fcitx5.so" 
      "fcitx" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*" 
      "fcitx5" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*" 
      
  3. Gtk IM module cache:

    1. gtk 2:

      Found immodules cache for gtk 2.24.33 at /usr/lib/gtk-2.0/2.10.0/immodules.cache.
      Version Line:

      # Created by /usr/bin/gtk-query-immodules-2.0 from gtk+-2.24.33
      

      Found fcitx5 im modules for gtk 2.24.33.

      "/usr/lib/gtk-2.0/2.10.0/immodules/im-fcitx5.so" 
      "fcitx" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*" 
      "fcitx5" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*" 
      
    2. gtk 3:

      Found immodules cache for gtk 3.24.41 at /usr/lib/gtk-3.0/3.0.0/immodules.cache.
      Version Line:

      # Created by /usr/bin/gtk-query-immodules-3.0 from gtk+-3.24.41
      

      Found fcitx5 im modules for gtk 3.24.41.

      "/usr/lib/gtk-3.0/3.0.0/immodules/im-fcitx5.so" 
      "fcitx" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*" 
      "fcitx5" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*" 
      
  4. Gtk IM module files:

    1. gtk 2:

      All found Gtk 2 immodule files exist.

    2. gtk 3:

      All found Gtk 3 immodule files exist.

    3. gtk 4:

      All found Gtk 4 immodule files exist.

Configuration:

Fcitx Addons:

  1. Addon Config Dir:

    Found fcitx5 addon config directory: /usr/share/fcitx5/addon.

  2. Addon List:

    1. Found 28 enabled addons:

      Simplified and Traditional Chinese Translation 5.1.4
      Classic User Interface 5.1.8
      Clipboard 5.1.8
      Cloud Pinyin 5.1.4
      DBus 5.1.8
      DBus Frontend 5.1.8
      Emoji 5.1.8
      Fcitx4 Frontend 5.1.8
      Full width character 5.1.4
      IBus Frontend 5.1.8
      Input method selector 5.1.8
      Keyboard 5.1.8
      KDE Input Method Panel 5.1.8
      Mozc 
      Status Notifier 5.1.8
      Notification 5.1.8
      Pinyin 5.1.4
      Extra Pinyin functionality 5.1.4
      Punctuation 5.1.4
      Quick Phrase 5.1.8
      Spell 5.1.8
      Table 5.1.4
      Unicode 5.1.8
      DBus Virtual Keyboard 5.1.8
      Wayland 5.1.8
      Wayland Input method frontend 5.1.8
      XCB 5.1.8
      X Input Method Frontend 5.1.8
      
    2. Found 0 disabled addons:

  3. Addon Libraries:

    All libraries for all addons are found.

  4. User Interface:

    Found 3 enabled user interface addons:

    Classic User Interface
    KDE Input Method Panel
    DBus Virtual Keyboard
    

Input Methods:

  1. /home/hexchain/.config/fcitx5/profile:

    [Groups/0]
    # Group Name
    Name=Default
    # Layout
    Default Layout=us
    # Default Input Method
    DefaultIM=shuangpin
    
    [Groups/0/Items/0]
    # Name
    Name=keyboard-us
    # Layout
    Layout=
    
    [Groups/0/Items/1]
    # Name
    Name=shuangpin
    # Layout
    Layout=
    
    [Groups/0/Items/2]
    # Name
    Name=mozc
    # Layout
    Layout=
    
    [GroupOrder]
    0=Default
    

Log:

  1. date:

    Sun Mar 10 04:59:50 PM +08 2024
    
  2. /home/hexchain/.config/fcitx5/crash.log:

    =========================
    Fcitx 5.0.13 -- Get Signal No.: 11
    Date: try "date -d @1642511911" if you are using GNU date ***
    ProcessID: 2707555
    

Additional context

The emoji font is Noto Color Emoji, but Twemoji also does not work.

image

~/.config/fontconfig/conf.d/75-emoji.conf
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <match target="pattern">
    <test qual="any" name="family">
      <string>emoji</string>
    </test>
    <edit name="family" mode="assign" binding="same">
      <string>Noto Color Emoji</string>
    </edit>
  </match>
  <match target="pattern">
    <test name="family">
      <string>sans</string>
    </test>
    <edit name="family" mode="append">
      <string>Noto Color Emoji</string>
    </edit>
  </match>
  <match target="pattern">
    <test name="family">
      <string>serif</string>
    </test>
    <edit name="family" mode="append">
      <string>Noto Color Emoji</string>
    </edit>
  </match>
  <match target="pattern">
    <test name="family">
      <string>sans-serif</string>
    </test>
    <edit name="family" mode="append">
      <string>Noto Color Emoji</string>
    </edit>
  </match>
  <match target="pattern">
    <test name="family">
      <string>monospace</string>
    </test>
    <edit name="family" mode="append">
      <string>Noto Color Emoji</string>
    </edit>
  </match>
  <match target="scan">
    <test name="family" compare="contains">
      <string>DejaVu</string>
    </test>
    <edit name="charset" mode="assign" binding="same">
      <minus>
        <name>charset</name>
        <charset>
          <range>
            <int>0x1f600</int>
            <int>0x1f640</int>
          </range>
        </charset>
      </minus>
    </edit>
  </match>
  <match target="pattern">
    <test qual="any" name="family">
      <string>EmojiOne</string>
    </test>
    <edit name="family" mode="assign" binding="same">
      <string>Noto Color Emoji</string>
    </edit>
  </match>
  <match target="pattern">
    <test qual="any" name="family">
      <string>Emoji One</string>
    </test>
    <edit name="family" mode="assign" binding="same">
      <string>Noto Color Emoji</string>
    </edit>
  </match>
  <match target="pattern">
    <test qual="any" name="family">
      <string>EmojiOne Color</string>
    </test>
    <edit name="family" mode="assign" binding="same">
      <string>Noto Color Emoji</string>
    </edit>
  </match>
  <match target="pattern">
    <test qual="any" name="family">
      <string>EmojiOne Mozilla</string>
    </test>
    <edit name="family" mode="assign" binding="same">
      <string>Noto Color Emoji</string>
    </edit>
  </match>
  <match target="pattern">
    <test qual="any" name="family">
      <string>Apple Color Emoji</string>
    </test>
    <edit name="family" mode="assign" binding="same">
      <string>Noto Color Emoji</string>
    </edit>
  </match>
  <match target="pattern">
    <test qual="any" name="family">
      <string>Segoe UI Emoji</string>
    </test>
    <edit name="family" mode="assign" binding="same">
      <string>Noto Color Emoji</string>
    </edit>
  </match>
  <match target="pattern">
    <test qual="any" name="family">
      <string>Segoe UI Symbol</string>
    </test>
    <edit name="family" mode="assign" binding="same">
      <string>Noto Color Emoji</string>
    </edit>
  </match>
  <match target="pattern">
    <test qual="any" name="family">
      <string>Twemoji</string>
    </test>
    <edit name="family" mode="assign" binding="same">
      <string>Noto Color Emoji</string>
    </edit>
  </match>
  <match target="pattern">
    <test qual="any" name="family">
      <string>NotoColorEmoji</string>
    </test>
    <edit name="family" mode="assign" binding="same">
      <string>Noto Color Emoji</string>
    </edit>
  </match>
  <match target="pattern">
    <test qual="any" name="family">
      <string>Android Emoji</string>
    </test>
    <edit name="family" mode="assign" binding="same">
      <string>Noto Color Emoji</string>
    </edit>
  </match>
  <match target="pattern">
    <test qual="any" name="family">
      <string>Noto Emoji</string>
    </test>
    <edit name="family" mode="assign" binding="same">
      <string>Noto Color Emoji</string>
    </edit>
  </match>
  <match target="pattern">
    <test qual="any" name="family">
      <string>Twitter Color Emoji</string>
    </test>
    <edit name="family" mode="assign" binding="same">
      <string>Noto Color Emoji</string>
    </edit>
  </match>
  <match target="pattern">
    <test qual="any" name="family">
      <string>JoyPixels</string>
    </test>
    <edit name="family" mode="assign" binding="same">
      <string>Noto Color Emoji</string>
    </edit>
  </match>
  <match target="pattern">
    <test qual="any" name="family">
      <string>Twemoji Mozilla</string>
    </test>
    <edit name="family" mode="assign" binding="same">
      <string>Noto Color Emoji</string>
    </edit>
  </match>
  <match target="pattern">
    <test qual="any" name="family">
      <string>TwemojiMozilla</string>
    </test>
    <edit name="family" mode="assign" binding="same">
      <string>Noto Color Emoji</string>
    </edit>
  </match>
  <match target="pattern">
    <test qual="any" name="family">
      <string>EmojiTwo</string>
    </test>
    <edit name="family" mode="assign" binding="same">
      <string>Noto Color Emoji</string>
    </edit>
  </match>
  <match target="pattern">
    <test qual="any" name="family">
      <string>Emoji Two</string>
    </test>
    <edit name="family" mode="assign" binding="same">
      <string>Noto Color Emoji</string>
    </edit>
  </match>
  <match target="pattern">
    <test qual="any" name="family">
      <string>EmojiSymbols</string>
    </test>
    <edit name="family" mode="assign" binding="same">
      <string>Noto Color Emoji</string>
    </edit>
  </match>
  <match target="pattern">
    <test qual="any" name="family">
      <string>Symbola</string>
    </test>
    <edit name="family" mode="assign" binding="same">
      <string>Noto Color Emoji</string>
    </edit>
  </match>
</fontconfig>
@wengxt
Copy link
Member

wengxt commented Mar 15, 2024

你字体配置有问题,建议检查 embeddedbitmap

图片

@wengxt wengxt closed this as completed Mar 15, 2024
@hexchain
Copy link
Author

没有改动过 embeddedbitmap,而且其他的程序都可以正常显示 emoji。

还有什么设定可能会影响这个吗?

% fc-match -b emoji
Pattern has 44 elts (size 48)
        family: "Noto Color Emoji"(s)
        familylang: "en"(s)
        style: "Regular"(s)
        stylelang: "en"(s)
        fullname: "Noto Color Emoji"(w)
        fullnamelang: "en"(s)
        slant: 0(i)(s)
        weight: 80(f)(s)
        width: 100(f)(s)
        size: 104.64(f)(w)
        pixelsize: 109(f)(s)
        spacing: 100(i)(s)
        foundry: "GOOG"(s)
        antialias: True(w)
        hintstyle: 0(i)(w)
        hinting: False(w)
        verticallayout: False(s)
        autohint: False(s)
        globaladvance: True(s)
        file: "/usr/share/fonts/noto/NotoColorEmoji.ttf"(s)
        index: 0(i)(w)
        outline: False(s)
        scalable: True(s)
        dpi: 75(f)(s)
        rgba: 1(i)(w)
        scale: 1(f)(s)
        matrix: [0.114679 0; 0 0.114679](w)
        fontversion: 133825(i)(s)
        capability: "otlayout:DFLT"(w)
        fontformat: "TrueType"(s)
        embeddedbitmap: True(s)
        decorative: False(s)
        lcdfilter: 1(i)(w)
        namelang: "en"(s)
        prgname: "fc-match"(s)
        postscriptname: "NotoColorEmoji"(s)
        color: True(s)
        symbol: False(s)
        variable: False(s)
        fonthashint: False(s)
        order: 0(i)(s)
        desktop: "KDE"(s)
        namedinstance: False(s)
        pixelsizefixupfactor: 0.114679(f)(w)

@hexchain
Copy link
Author

发现问题了,fonts.conf 里的 [font].hinting 不能为 false,对应 KDE 字体设置里的 Hinting 项不能为 None。

@wengxt
Copy link
Member

wengxt commented May 22, 2024

@hexchain 不同的字体似乎对这些值还有不同的要求

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants