Code Monkey home page Code Monkey logo

Comments (11)

ddd-zero avatar ddd-zero commented on May 18, 2024 8

省流:
1.下载 https://github.com/mozilla/twemoji-colr/releases 字体,解压为所有用户安装
2.在“设置”-“主题”-往下拉-“Font Family”填上"Roboto", "Helvetica", "Arial", sans-serif, "Twemoji Mozilla" 然后保存,重启软件

from clash-verge.

malagebidi avatar malagebidi commented on May 18, 2024 4

这样也可以,就不用捣鼓css注入了。默认的字体是"Roboto", "Helvetica", "Arial", sans-serif,所以可以填上"Roboto", "Helvetica", "Arial", sans-serif, "Twemoji Mozilla"

建议把这个字体内置了,默认显示emoji

from clash-verge.

zzzgydi avatar zzzgydi commented on May 18, 2024

换可以显示国旗emoji字体就可以了,新版加上可以增加自定义字体的设置

from clash-verge.

Littleweisheit avatar Littleweisheit commented on May 18, 2024

我还以为是chromium的问题,因为chromium都是显示字母,而firefox能显示国旗

from clash-verge.

zzzgydi avatar zzzgydi commented on May 18, 2024

而firefox能显示国旗

好像是firefox自己带了字体

from clash-verge.

zzzgydi avatar zzzgydi commented on May 18, 2024

昨晚实现了更换字体和注入css的功能(还有换主题色)。通过设置字体注入css片段,比如@font-face的声明,就可以实现在windows里显示emoji国旗。

本地安装字体之后,填css片段,再在font-family里填上Flags即可。上面的unicode-range最好设置一下,不然可能有点小问题,这还是和引用的字体有关。下面贴一下css片段,参考链接:https://www.bilibili.com/read/cv13600525

@font-face {
  font-family: Flags;
  src: local("Twemoji Mozilla");
  unicode-range: U+1F1E6-1F1FF, U+1F3F3-1F3F4, U+E0001-E007F;
}

src里可以用local()也可以用url(),不过可能要注意CSP限制的问题,我测试了file://协议不行,https://还是可以的。

from clash-verge.

Littleweisheit avatar Littleweisheit commented on May 18, 2024

我把Twemoji Mozilla 填入主题设置-〉family font里面国旗显示了,但是显示有问题,数字不显示。

from clash-verge.

zzzgydi avatar zzzgydi commented on May 18, 2024

https://github.com/mozilla/twemoji-colr/releases 可以在这里下载和安装字体,一定要本地安装,不然src就要填url

然后在 主题设置 -> CSS Injection里填入

@font-face {
  font-family: Flags;
  src: local("Twemoji Mozilla");
  unicode-range: U+1F1E6-1F1FF, U+1F3F3-1F3F4, U+E0001-E007F;
}

然后在 主题设置 -> Font Family 里填入 Flags

from clash-verge.

zzzgydi avatar zzzgydi commented on May 18, 2024

实测了一下,还是有好多问题,上面的方法有可能可行,但非常折腾。

  • 字体不支持local,字体的问题
  • 应用不支持url获取字体,CSP的限制
  • 字体转base64,emoji颜色丢失了,不知道啥问题

from clash-verge.

9uanhuo avatar 9uanhuo commented on May 18, 2024

Font Family 中可以填写多个字体做 fallback,例如 思源黑体, Twemoji Mozilla,Win10 除日志界面外,其他 Emoji 修改成功,Win11 未测试。

from clash-verge.

zzzgydi avatar zzzgydi commented on May 18, 2024

这样也可以,就不用捣鼓css注入了。默认的字体是"Roboto", "Helvetica", "Arial", sans-serif,所以可以填上"Roboto", "Helvetica", "Arial", sans-serif, "Twemoji Mozilla"

from clash-verge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.