-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Linux appimage 版 emoji 显示不正确 #13213
Comments
这个只能在系统上安装 Emoji 字体才行,否则只能用集市中的 emoji 插件了。 |
其他 emoji 插件有没有这个问题?还有字体插件 |
我系统有noto color emoji啊,而且安装插件只有代码块里能显示。 |
换了一个还是不行 |
暂时不清楚原因,保持打开一段时间看看其他用户反馈,谢谢。 |
1)请关闭所有思源的字体插件和emoji 插件 测试文档:emoji.sy.zip 可以看出完全默认情况下是走思源的本身字体,包含不了了在走系统,系统没有显示空白或方块。 不同字体主题表情包均包含了自身字体,不同字体 emoji 显示细节都有差别 |
在 Arch Linux 系统中,如果你要单独设置字体,请添加或编辑 ~/.config/fontconfig/fonts.conf 文件,我的配置如下: https://github.com/wwxiaoqi/dotfiles-hypr/blob/main/dot_config/fontconfig/fonts.conf |
|
|
|
参考Linux fontconfig 的字体匹配机制 字体匹配优先级问题,fontconfig 没有命中想要的字体 |
这样设置已经写了Noto Color Emoji啊,那咋还是不行,要放第一行? |
放了试下,另外改动这个配置是不是需要重新登录或者刷新一下? |
|
你的字体要在 修改完成不生效可以使用 更加常见的一种情况就是思源的字体中已经包含了这个 emoji, 还有就是 emoji 众多,哪怕是 noto-fonts-emoji 也不能完全适配完成... |
相关字体安装:
|
fc-list | grep emoji没输出 奇怪了 |
|
刚刚我在找内置 emoji 字体的时候遇到了类似的情况,发现默认主题里 font-family 的顺序有点莫名奇妙,所以我怀疑是 font-family 的问题。 @Littleweisheit 你试一下新建工作空间,然后只用这个代码片段: :root {
--b3-font-family: "Helvetica Neue", "Luxi Sans", "DejaVu Sans", "Hiragino Sans GB", "Microsoft Yahei", sans-serif, var(--b3-font-family-emoji), "EmojiSymbols";
--b3-font-family-emoji: "Noto Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Android Emoji";
} p.s. 系统需要安装有 Noto Color Emoji 字体 以及关闭代码片段之后再试一下安装这个插件: |
我系统有Noto Color Emoji字体
|
还可能缺字体了,试试在代码片段前面加一行:
用于从 Google 获取最新的字体 |
不行 |
不知道其他用 Linux 的用户有没有这个问题,还是只有你的设备的 DejaVu Sans 才会产生问题 |
dejavu-fonts/dejavu-fonts 字体似乎加了一些奇怪的 Unicode 字形, 然后将 DejaVu Sans 替换成 Bitstream Vera Sans Mono,则显示正常 Windows 的渲染好像另外处理了这一种情况。 |
直接拿你的字体 --b3-font-family 那一块的配置文件,然后删掉 DejaVu Sans,其他什么都不用动 |
说到换字体,我之前查到这个说法:
|
https://gist.github.com/DeeDeeG/d562a997ba8e79fad165c7d01cbdd22f 好像是这个DejaVu优先级很高,把noto color emoji挤下去了 |
应该就是这个问题,所以我选择 sudo pacman -R ttf-dejavu 直接删掉,显示正常 |
@zxkmm 说他用这个没问题:
|
https://github.com/androlabs/emoji-archlinux 这里的处理也是将 DejaVu 后移,拿这可能就是 Linux 通病了 |
但是我其他软件没这个问题啊🤔 |
其他软件不一定用 DejaVu |
他这个用了不行,难道electron不会受fontconfig设置吗? |
渲染的页面是靠 CSS 指定字体的吧 |
软件内优先级更高,软件内设置了就没有必要往外找了 |
我先按我的想法改了 #13219 |
|
最简单的方法就是你别改, |
我感觉用 |
数字变宽的问题我有点眉目了,emoji 字体里会有数字的字形,覆盖了正常的字形 |
@Littleweisheit 你试试用这个代码片段: @font-face {
src: local("Segoe UI Emoji"),
local("Segoe UI Symbol"),
local("Apple Color Emoji"),
local("Twemoji Mozilla"),
local("Noto Color Emoji"),
local("Android Emoji");
unicode-range: U+1F000-1F644, U+203C-3299, U+1F300-1F3FF; /* 排除数字和字母 */
}
:root {
--b3-font-family: "Segoe UI Emoji", "Segoe UI Symbol", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "Android Emoji", "Helvetica Neue", "Luxi Sans", "DejaVu Sans", "Hiragino Sans GB", "Segoe UI", "Microsoft Yahei", sans-serif, "EmojiSymbols";
--b3-font-family-emoji: "Segoe UI Emoji", "Segoe UI Symbol", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "Android Emoji";
} |
是宽的 |
你截图给我看看编辑器里的数字和 emoji 分别是长什么样的? |
用默认主题明亮模式、关闭除了刚刚的那个代码片段以外的其他代码片段、关闭所有插件、重启思源,然后再放大编辑器字号截图看看,方便我看清楚一些 |
把DejaVu Sans里面的emoji字形排除不是更好吗? |
实际上不只是 DejaVu Sans 有问题,并且我刚刚发现定义字体范围有点复杂,还要再想想 |
@Littleweisheit 试试这个:
|
|
Is there an existing issue for this?
Can the issue be reproduced with the default theme (daylight/midnight)?
Could the issue be due to extensions?
Describe the problem
Expected result
图标全部正确显示
Screenshot or screen recording presentation
No response
Version environment
Log file
I 2024/11/20 16:44:01 runtime.go:86: kernel is booting:
* ver [3.1.13]
* arch [amd64]
* os [cachyos]
* pid [7848]
* runtime mode [prod]
* working directory [/tmp/.mount_siyuanfoiPQn/resources]
* read only [false]
* container [std]
* database [ver=20220501]
* workspace directory [/home/XXXXX/SiYuan]
I 2024/11/20 16:44:01 conf.go:130: loaded conf [/home/XXXXX/SiYuan/conf/conf.json]
I 2024/11/20 16:44:01 conf.go:511: user has disabled [Google Analytics]
I 2024/11/20 16:44:01 runtime.go:138: use network proxy [system]
I 2024/11/20 16:44:01 serve.go:189: kernel [pid=7848] http server [127.0.0.1:33643] is booting
I 2024/11/20 16:44:01 pandoc.go:146: built-in pandoc [ver=3.5, bin=/home/XXXXX/SiYuan/temp/pandoc/bin/pandoc]
I 2024/11/20 16:44:01 conf.go:1110: pandoc initialized, set pandoc bin to [/home/XXXXX/SiYuan/temp/pandoc/bin/pandoc]
I 2024/11/20 16:44:02 fixedport.go:35: fixed port service [127.0.0.1:6806] is running
I 2024/11/20 16:44:02 sync.go:147: sync before boot
I 2024/11/20 16:44:02 repo.go:649: walk data [files=662] cost [28.548821ms]
I 2024/11/20 16:44:06 sync.go:1585: got cloud latest [device=776613414ce4459288b38bfa214a98c4/linux, id=66177566d57bd9e4791e095b9741a4967b25e3a2, files=662, size=123.67 MB, created=2024-11-20 16:42:51]
I 2024/11/20 16:44:06 repository.go:1334: boot get sync cloud files elapsed [4.04s]
I 2024/11/20 16:44:06 conf.go:851: database size [34.61 MB], tree/block count [67/4757]
I 2024/11/20 16:44:06 working.go:193: kernel booted
I 2024/11/20 16:44:06 box.go:77: auto stat [trees=67, blocks=4757, dataSize=124.07 MB, assetsSize=98.79 MB]
I 2024/11/20 16:44:06 disk.go:33: disk usage [total=97.95 GB, used=26.47 GB, free=70.38 GB]
I 2024/11/20 16:44:09 session.go:121: auth success [ip=127.0.0.1:54494]
E 2024/11/20 16:44:10 system.go:74: changelog not found: /tmp/.mount_siyuanfoiPQn/resources/changelogs/v3.1.13/v3.1.13.md
E 2024/11/20 16:46:44 system.go:74: changelog not found: /tmp/.mount_siyuanfoiPQn/resources/changelogs/v3.1.13/v3.1.13.md
E 2024/11/20 16:47:01 system.go:74: changelog not found: /tmp/.mount_siyuanfoiPQn/resources/changelogs/v3.1.13/v3.1.13.md
E 2024/11/20 16:47:46 system.go:74: changelog not found: /tmp/.mount_siyuanfoiPQn/resources/changelogs/v3.1.13/v3.1.13.md
E 2024/11/20 16:48:36 system.go:74: changelog not found: /tmp/.mount_siyuanfoiPQn/resources/changelogs/v3.1.13/v3.1.13.md
I 2024/11/20 16:49:03 repository.go:1396: syncing data repo [device=776613414ce4459288b38bfa214a98c4, kernel=1uoi1up, provider=2, mode=a/false]
I 2024/11/20 16:49:03 repo.go:649: walk data [files=662] cost [29.292079ms]
I 2024/11/20 16:49:03 ref.go:64: updated local latest to [device=776613414ce4459288b38bfa214a98c4/linux, id=5419e7ee5967d5b064ed5f2f5b720512dcb8c66a, files=662, size=123.67 MB, created=2024-11-20 16:49:03]
I 2024/11/20 16:49:08 sync.go:1585: got cloud latest [device=776613414ce4459288b38bfa214a98c4/linux, id=66177566d57bd9e4791e095b9741a4967b25e3a2, files=662, size=123.67 MB, created=2024-11-20 16:42:51]
I 2024/11/20 16:49:09 sync.go:239: got local latest [5419e7ee5967d5b064ed5f2f5b720512dcb8c66a] files [662]
I 2024/11/20 16:49:09 sync.go:1456: got latest sync [device=776613414ce4459288b38bfa214a98c4/linux, id=66177566d57bd9e4791e095b9741a4967b25e3a2, files=662, size=123.67 MB, created=2024-11-20 16:42:51]
I 2024/11/20 16:49:09 diff.go:49: upsert [lID=638173e5fbc7b3ec8101a396322f747254565c7b, lPath=/storage/petal/siyuan-plugin-background-grid/config.json, lUpdated=2024-11-20 16:41:43, rID=efece440e3618efcdbd3d96f2def7f42d4723bad, rPath=/storage/petal/siyuan-plugin-background-grid/config.json, rUpdated=2024-11-20 16:48:36]
I 2024/11/20 16:49:09 sync.go:256: cloud upsert [638173e5fbc7b3ec8101a396322f747254565c7b, /storage/petal/siyuan-plugin-background-grid/config.json, 2024-11-20 16:41:43]
I 2024/11/20 16:49:09 sync.go:262: local upsert [efece440e3618efcdbd3d96f2def7f42d4723bad, /storage/petal/siyuan-plugin-background-grid/config.json, 2024-11-20 16:48:36]
I 2024/11/20 16:49:11 sync.go:1174: uploaded index [device=776613414ce4459288b38bfa214a98c4/linux, id=5419e7ee5967d5b064ed5f2f5b720512dcb8c66a, files=662, size=123.67 MB, created=2024-11-20 16:49:03]
I 2024/11/20 16:49:12 sync.go:907: uploaded cloud ref [refs/latest, id=5419e7ee5967d5b064ed5f2f5b720512dcb8c66a]
I 2024/11/20 16:49:12 ref.go:64: updated local latest to [device=776613414ce4459288b38bfa214a98c4/linux, id=5419e7ee5967d5b064ed5f2f5b720512dcb8c66a, files=662, size=123.67 MB, created=2024-11-20 16:49:03]
I 2024/11/20 16:49:12 sync.go:1384: updated latest sync [device=776613414ce4459288b38bfa214a98c4/linux, id=5419e7ee5967d5b064ed5f2f5b720512dcb8c66a, files=662, size=123.67 MB, created=2024-11-20 16:49:03]
I 2024/11/20 16:49:13 repository.go:1468: synced data repo [device=776613414ce4459288b38bfa214a98c4, kernel=1uoi1up, provider=2, mode=a/false, ufc=4, dfc=2, ucc=0, dcc=0, ub=36.55 kB, db=36.24 kB] in [10.38s], merge result [conflicts=0, upserts=0, removes=0]
I 2024/11/20 16:49:13 index_fix.go:50: start checking index...
I 2024/11/20 16:49:13 index_fix.go:70: finish checking index
I 2024/11/20 16:49:13 store.go:61: purging data repo [/home/XXXXX/SiYuan/repo/], retention indexes [38]
I 2024/11/20 16:49:13 store.go:238: purged data repo [/home/XXXXX/SiYuan/repo/], [0] indexes, [0] objects, [0] bytes
More information
No response
The text was updated successfully, but these errors were encountered: